Class JCudfSerialization.SerializedTableHeader

java.lang.Object
ai.rapids.cudf.JCudfSerialization.SerializedTableHeader
Enclosing class:
JCudfSerialization

public static final class JCudfSerialization.SerializedTableHeader extends Object
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 Details

    • SerializedTableHeader

      public SerializedTableHeader(DataInputStream din) throws IOException
      Throws:
      IOException
    • SerializedTableHeader

      public SerializedTableHeader(int numRows)
      Constructor for a row-count only table (no columns)
  • Method Details

    • getColumnHeader

      public JCudfSerialization.SerializedColumnHeader getColumnHeader(int columnIndex)
      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

      public void writeTo(ai.rapids.cudf.JCudfSerialization.DataWriter dout) throws IOException
      Throws:
      IOException