public class AppendableVec extends Vec
Vec.ESPC, Vec.Holder, Vec.Reader, Vec.VectorGroup, Vec.Writer
Modifier and Type | Field and Description |
---|---|
int |
_chunkOff |
long[] |
_tmp_espc |
_cids, _rowLayout, DO_HISTOGRAMS, KEY_PREFIX_LEN, PERCENTILES, T_BAD, T_CAT, T_NUM, T_STR, T_TIME, T_UUID, TYPE_STR
Constructor and Description |
---|
AppendableVec(Key<Vec> key,
byte type) |
AppendableVec(Key<Vec> key,
long[] tmp_espc,
byte type,
int chunkOff) |
Modifier and Type | Method and Description |
---|---|
long |
byteSize()
Size of compressed vector data.
|
protected long |
chunk2StartElem(int cidx)
Convert a chunk-index into a starting row #.
|
NewChunk |
chunkForChunkIdx(int cidx)
The Chunk for a chunk#.
|
Value |
chunkIdx(int cidx)
Get a Chunk's Value by index.
|
Vec |
close(int rowLayout,
Futures fs) |
static Vec[] |
closeAll(AppendableVec[] avs) |
static Vec[] |
closeAll(AppendableVec[] avs,
Futures fs) |
int |
compute_rowLayout() |
int |
elem2ChunkIdx(long i)
Convert a row# to a chunk#.
|
Vec |
layout_and_close(Futures fs) |
long |
length()
Number of elements in the vector; returned as a
long instead of
an int because Vecs support more than 2^32 elements. |
int |
nChunks()
Number of chunks, returned as an
int - Chunk count is limited by
the max size of a Java long[] . |
protected boolean |
readable()
Default read/write behavior for Vecs.
|
void |
reduce(AppendableVec nv) |
java.lang.String |
toString()
Pretty print the Vec:
[#elems, min/mean/max]{chunks,...} |
protected boolean |
writable()
Default read/write behavior for Vecs.
|
adaptTo, align, at, at16h, at16l, at8, atStr, base, bins, cardinality, checksum_impl, chunkForRow, chunkKey, chunkKey, copyMeta, doCopy, domain, equals, espc, factor, get_type_str, get_type, getVecKey, group, hashCode, isBad, isBinary, isCategorical, isCompatibleWith, isConst, isHomedLocally, isInt, isNA, isNumeric, isString, isTime, isUUID, isVolatile, lazy_bins, makeCon, makeCon, makeCon, makeCon, makeCon, makeCon, makeCon, makeCon, makeCon, makeCon, makeCon, makeCon, makeCon, makeCons, makeCons, makeCopy, makeCopy, makeCopy, makeDoubles, makeRand, makeRepSeq, makeSeq, makeSeq, makeSeq, makeTimeVec, makeVec, makeVec, makeVec, makeVec, makeVec, makeVolatileDoubles, makeVolatileInts, makeZero, makeZero, makeZero, makeZero, makeZero, makeZeros, makeZeros, max, maxs, mean, min, mins, mode, naCnt, newKey, ninfs, nzCnt, open, pctiles, pinfs, postWrite, preWriting, readAll_impl, remove_impl, rollupStatsKey, set, set, set, set, set, setBad, setChunkIdx, setDomain, setNA, sigma, sparseRatio, startRollupStats, startRollupStats, stride, stringAt, toCategoricalVec, toNumericVec, toStringVec, toTwoDimTable, toTwoDimTable, writeAll_impl
checksum, makeSchema, readAll, remove, remove, remove, remove, writeAll
asBytes, clone, copyOver, frozenType, read, readExternal, readJSON, reloadFromBytes, toJsonString, write, writeExternal, writeJSON
public static Vec[] closeAll(AppendableVec[] avs)
public static Vec[] closeAll(AppendableVec[] avs, Futures fs)
public void reduce(AppendableVec nv)
public int compute_rowLayout()
protected boolean readable()
Vec
protected boolean writable()
Vec
public NewChunk chunkForChunkIdx(int cidx)
Vec
chunkForChunkIdx
in class Vec
public Value chunkIdx(int cidx)
Vec
DKV.get()
. Warning: this pulls the data locally; using this call
on every Chunk index on the same node will probably trigger an OOM!public long length()
Vec
long
instead of
an int
because Vecs support more than 2^32 elements. Overridden
by subclasses that compute length in an alternative way, such as
file-backed Vecs.public int nChunks()
Vec
int
- Chunk count is limited by
the max size of a Java long[]
. Overridden by subclasses that
compute chunks in an alternative way, such as file-backed Vecs.public int elem2ChunkIdx(long i)
Vec
elem2ChunkIdx
in class Vec
protected long chunk2StartElem(int cidx)
Vec
public long byteSize()
Vec