public class AppendableVec extends Vec
Vec.CollectDomain, Vec.CollectDomainFast, Vec.VectorGroup, Vec.Writer
Keyed.BinarySerializer<X extends Keyed>
Modifier and Type | Field and Description |
---|---|
int |
_chunkOff |
long[] |
_espc |
static byte |
ENUM |
static byte |
NA |
static byte |
NUMBER |
static byte |
STRING |
static byte |
TIME |
static byte |
UUID |
DO_HISTOGRAMS, KEY_PREFIX_LEN, NO_HISTOGRAMS, PERCENTILES, T_BAD, T_ENUM, T_NUM, T_STR, T_TIME, T_TIMELAST, T_UUID, TYPE_STR
_key, EMPTY_KEY_LIST
Constructor and Description |
---|
AppendableVec(Key key) |
AppendableVec(Key key,
long[] espc,
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(Futures fs) |
static Vec[] |
closeAll(AppendableVec[] avs) |
static Vec[] |
closeAll(AppendableVec[] avs,
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) |
void |
setPrecedingChunkTypes(int cidx,
byte type)
This is a hack to fix SVMLight parsing.
|
void |
setSubRange(AppendableVec av)
Add AV build over sub-range of this vec (used e.g.
|
void |
setTypes(byte[] ts) |
boolean |
shouldBeEnum() |
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, domain, equals, factor, get_espc, get_type_str, get_type, getVecKey, group, hashCode, isBad, isBinary, isConst, isEnum, isInt, isNA, isNumeric, isString, isTime, isUUID, lazy_bins, makeCon, makeCon, makeCon, makeCon, makeCon, makeCon, makeCons, makeCopy, makeCopy, makeRand, makeRepSeq, makeSeq, makeSeq, makeVec, makeVec, makeZero, makeZero, makeZero, makeZero, makeZeros, makeZeros, max, maxs, mean, min, mins, naCnt, newKey, ninfs, nzCnt, open, pctiles, pinfs, postWrite, preWriting, remove_impl, set, set, set, set, setDomain, sigma, sparseRatio, startRollupStats, startRollupStats, stride, toByteArray, toDoubleArray, toEnum, toInt, toStringVec
checksum, getBinarySerializer, getPublishedKeys, remove, remove, remove, remove
clone, frozenType, read_impl, read, readExternal, readJSON_impl, readJSON, toJsonString, write_impl, write, writeExternal, writeHTML_impl, writeHTML, writeJSON_impl, writeJSON
public long[] _espc
public static final byte NA
public static final byte ENUM
public static final byte NUMBER
public static final byte TIME
public static final byte UUID
public static final byte STRING
public int _chunkOff
public AppendableVec(Key key)
public AppendableVec(Key key, long[] espc, int chunkOff)
public void setTypes(byte[] ts)
public void setPrecedingChunkTypes(int cidx, byte type)
cidx
- public static Vec[] closeAll(AppendableVec[] avs)
public static Vec[] closeAll(AppendableVec[] avs, Futures fs)
public void setSubRange(AppendableVec av)
av
- public boolean shouldBeEnum()
public void reduce(AppendableVec nv)
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.protected long chunk2StartElem(int cidx)
Vec
public long byteSize()
Vec