|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectwater.Iced
water.ValueArray
public class ValueArray
Large Arrays & Arraylets Large arrays are broken into 4Meg chunks (except the last chunk which may be from 4 to 8Megs). Large arrays have a metadata section in this ValueArray.
Nested Class Summary | |
---|---|
static class |
ValueArray.Column
|
static class |
ValueArray.CsvVAStream
|
static class |
ValueArray.VAStream
|
Field Summary | |
---|---|
ValueArray.Column[] |
_cols
|
Key |
_key
|
long |
_numrows
|
int |
_rowsize
|
long[] |
_rpc
|
static long |
CHUNK_SZ
|
static int |
LOG_CHK
|
Constructor Summary | |
---|---|
ValueArray(Key key,
int[] rows,
int rowsize,
ValueArray.Column[] cols)
|
|
ValueArray(Key key,
long len)
|
|
ValueArray(Key key,
long numrows,
int rowsize,
ValueArray.Column[] cols)
|
Method Summary | |
---|---|
Frame |
asFrame()
|
Frame |
asFrame(java.lang.String input)
|
static Frame |
asFrame(Value value)
|
long |
chknum(long rownum)
Chunk number containing a row |
static long |
chknum(long rownum,
long numrows,
int rowsize)
|
long |
chunks()
Number of chunks |
ValueArray |
clone()
|
java.lang.String[] |
colNames()
An array of column names |
long |
data(AutoBuffer ab,
int row_in_chunk,
int colnum)
|
long |
data(AutoBuffer ab,
int row_in_chunk,
ValueArray.Column col)
|
long |
data(long rownum,
int colnum)
|
double |
datad(AutoBuffer ab,
int row_in_chunk,
int colnum)
|
double |
datad(AutoBuffer ab,
int row_in_chunk,
ValueArray.Column col)
|
double |
datad(long rownum,
int colnum)
|
static Key |
getArrayKey(Key k)
Get the root array Key from a random arraylet sub-key |
static byte[] |
getArrayKeyBytes(Key k)
|
AutoBuffer |
getChunk(Key key)
|
AutoBuffer |
getChunk(long chknum)
|
static long |
getChunkIndex(Key k)
Get the chunk-index from a random arraylet sub-key |
Key |
getChunkKey(long chknum)
|
static Key |
getChunkKey(long chknum,
Key arrayKey)
|
static long |
getChunkOffset(Key k)
|
int[] |
getColumnIds(java.lang.String[] colNames)
|
Key |
getKey()
Return the key that denotes this entire ValueArray in the K/V store. |
boolean |
hasInvalidRows(int colnum)
|
ValueArray |
init(Key key)
|
boolean |
isNA(AutoBuffer ab,
int row_in_chunk,
int colnum)
|
boolean |
isNA(AutoBuffer ab,
int row_in_chunk,
ValueArray.Column col)
|
boolean |
isNA(long rownum,
int colnum)
|
long |
length()
|
int |
numCols()
|
long |
numRows()
|
java.io.InputStream |
openStream()
|
java.io.InputStream |
openStream(Job.ProgressMonitor p)
|
static Key |
readPut(Key k,
java.io.InputStream is)
|
static Key |
readPut(Key k,
java.io.InputStream is,
Job job)
|
static Key |
readPut(java.lang.String keyname,
java.io.InputStream is)
|
int |
rowInChunk(long chknum,
long rownum)
|
int |
rowSize()
Returns the width of a row. |
int |
rpc(long chunknum)
Rows in this chunk |
static int |
rpc(long chunknum,
int rpc,
long numrows)
|
void |
setColumnNames(java.lang.String[] names)
An array of column names |
long |
startRow(long chunknum)
Row number at the start of this chunk |
java.lang.String |
toString()
Pretty print! |
java.lang.String |
toString(long idx)
|
Methods inherited from class water.Iced |
---|
frozenType, newInstance, read, toDocField, write, writeJSON, writeJSONFields |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int LOG_CHK
public static final long CHUNK_SZ
public transient Key _key
public final ValueArray.Column[] _cols
public long[] _rpc
public long _numrows
public final int _rowsize
Constructor Detail |
---|
public ValueArray(Key key, long numrows, int rowsize, ValueArray.Column[] cols)
public ValueArray(Key key, long len)
public ValueArray(Key key, int[] rows, int rowsize, ValueArray.Column[] cols)
Method Detail |
---|
public int[] getColumnIds(java.lang.String[] colNames)
public final Key getKey()
public ValueArray clone()
clone
in class Iced
public final ValueArray init(Key key)
init
in class Iced
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String toString(long idx)
public final java.lang.String[] colNames()
public final void setColumnNames(java.lang.String[] names)
public int rowSize()
public long numRows()
public int numCols()
public long length()
public boolean hasInvalidRows(int colnum)
public int rpc(long chunknum)
public static int rpc(long chunknum, int rpc, long numrows)
public long startRow(long chunknum)
public int rowInChunk(long chknum, long rownum)
public long chunks()
public long chknum(long rownum)
public static long chknum(long rownum, long numrows, int rowsize)
public AutoBuffer getChunk(long chknum)
public AutoBuffer getChunk(Key key)
public double datad(long rownum, int colnum)
public double datad(AutoBuffer ab, int row_in_chunk, int colnum)
public double datad(AutoBuffer ab, int row_in_chunk, ValueArray.Column col)
public long data(long rownum, int colnum)
public long data(AutoBuffer ab, int row_in_chunk, int colnum)
public long data(AutoBuffer ab, int row_in_chunk, ValueArray.Column col)
public boolean isNA(long rownum, int colnum)
public boolean isNA(AutoBuffer ab, int row_in_chunk, int colnum)
public boolean isNA(AutoBuffer ab, int row_in_chunk, ValueArray.Column col)
public Key getChunkKey(long chknum)
public static Key getChunkKey(long chknum, Key arrayKey)
public static Key getArrayKey(Key k)
public static byte[] getArrayKeyBytes(Key k)
public static long getChunkIndex(Key k)
public static long getChunkOffset(Key k)
public static Key readPut(java.lang.String keyname, java.io.InputStream is) throws java.io.IOException
java.io.IOException
public static Key readPut(Key k, java.io.InputStream is) throws java.io.IOException
java.io.IOException
public static Key readPut(Key k, java.io.InputStream is, Job job) throws java.io.IOException
java.io.IOException
public java.io.InputStream openStream()
public java.io.InputStream openStream(Job.ProgressMonitor p)
public static Frame asFrame(Value value)
public Frame asFrame()
public Frame asFrame(java.lang.String input)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |