water.fvec
Class NFSFileVec

java.lang.Object
  extended by water.Iced
      extended by water.fvec.Vec
          extended by water.fvec.ByteVec
              extended by water.fvec.NFSFileVec
All Implemented Interfaces:
java.lang.Cloneable, Freezable

public class NFSFileVec
extends ByteVec


Nested Class Summary
 
Nested classes/interfaces inherited from class water.fvec.Vec
Vec.CollectDomain, Vec.VectorGroup
 
Field Summary
 
Fields inherited from class water.fvec.Vec
_domain, _key, LOG_CHK
 
Method Summary
 long chunk2StartElem(int cidx)
          Convert a chunk-index into a starting row #.
 Value chunkIdx(int cidx)
          Get a Chunk's Value by index.
static int chunkIdx(Key ckey)
           
static long chunkOffset(Key ckey)
           
 long length()
          Number of elements in the vector.
static Key make(java.io.File f)
           
static Key make(java.io.File f, Futures fs)
           
 int nChunks()
          Number of chunks.
 boolean writable()
          Default read/write behavior for Vecs.
 
Methods inherited from class water.fvec.ByteVec
elem2BV, openStream
 
Methods inherited from class water.fvec.Vec
adaptTo, asEnum, at, at8, byteSize, chunk, chunkKey, chunkLen, defaultLevels, domain, domain, group, isEnum, isInt, isNA, makeCon, makeCon, makeTransf, makeTransf, makeZero, max, mean, min, naCnt, postWrite, readable, remove, rollupStats, rollupStats, rollupStats, set, set, set, setNA, sigma, toEnum, toString
 
Methods inherited from class water.Iced
clone, frozenType, init, newInstance, read, toDocField, write, writeJSON, writeJSONFields
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

make

public static Key make(java.io.File f)

make

public static Key make(java.io.File f,
                       Futures fs)

length

public long length()
Description copied from class: Vec
Number of elements in the vector. Overridden by subclasses that compute length in an alternative way, such as file-backed Vecs.

Overrides:
length in class Vec

nChunks

public int nChunks()
Description copied from class: Vec
Number of chunks. Overridden by subclasses that compute chunks in an alternative way, such as file-backed Vecs.

Overrides:
nChunks in class Vec

writable

public boolean writable()
Description copied from class: Vec
Default read/write behavior for Vecs. AppendableVecs are write-only.

Overrides:
writable in class Vec

chunk2StartElem

public long chunk2StartElem(int cidx)
Description copied from class: Vec
Convert a chunk-index into a starting row #. For constant-sized chunks this is a little shift-and-add math. For variable-sized chunks this is a table lookup.

Overrides:
chunk2StartElem in class Vec

chunkOffset

public static long chunkOffset(Key ckey)

chunkIdx

public static int chunkIdx(Key ckey)

chunkIdx

public Value chunkIdx(int cidx)
Description copied from class: Vec
Get a Chunk's Value by index. Basically the index-to-key map, plus the DKV.get. Warning: this pulls the data locally; using this call on every Chunk index on the same node will probably trigger an OOM!

Overrides:
chunkIdx in class Vec