Package ai.rapids.cudf
Class JCudfSerialization.SerializedTableHeader
java.lang.Object
ai.rapids.cudf.JCudfSerialization.SerializedTableHeader
- Enclosing class:
- JCudfSerialization
Holds the metadata about a serialized table. If this is being read from a stream
isInitialized will return true if the metadata was read correctly from the stream.
It will return false if an EOF was encountered at the beginning indicating that
there was no data to be read.
-
Constructor Summary
ConstructorsConstructorDescriptionSerializedTableHeader
(int numRows) Constructor for a row-count only table (no columns) -
Method Summary
Modifier and TypeMethodDescriptiongetColumnHeader
(int columnIndex) Get the column header for the corresponding column indexlong
Returns the size of a buffer needed to read data into the stream.int
Returns the number of columns stored in this tableint
Returns the number of rows stored in this table.long
Returns the number of bytes needed to serialize this table header.long
Returns the number of bytes needed to serialize this table header and the table data.boolean
Set to true once data is successfully read from a stream by readTableIntoBuffer.boolean
Returns true if the metadata for this table was read, else false indicating an EOF was encountered.void
writeTo
(ai.rapids.cudf.JCudfSerialization.DataWriter dout)
-
Constructor Details
-
SerializedTableHeader
- Throws:
IOException
-
SerializedTableHeader
public SerializedTableHeader(int numRows) Constructor for a row-count only table (no columns)
-
-
Method Details
-
getColumnHeader
Get the column header for the corresponding column index -
wasDataRead
public boolean wasDataRead()Set to true once data is successfully read from a stream by readTableIntoBuffer.- Returns:
- true if data was read, else false.
-
getDataLen
public long getDataLen()Returns the size of a buffer needed to read data into the stream. -
getNumRows
public int getNumRows()Returns the number of rows stored in this table. -
getNumColumns
public int getNumColumns()Returns the number of columns stored in this table -
wasInitialized
public boolean wasInitialized()Returns true if the metadata for this table was read, else false indicating an EOF was encountered. -
getSerializedHeaderSizeInBytes
public long getSerializedHeaderSizeInBytes()Returns the number of bytes needed to serialize this table header. Note that this is only the metadata for the table (i.e.: column types, row counts, etc.) and does not include the bytes needed to serialize the table data. -
getTotalSerializedSizeInBytes
public long getTotalSerializedSizeInBytes()Returns the number of bytes needed to serialize this table header and the table data. -
writeTo
- Throws:
IOException
-