Class MetadataBlock
- java.lang.Object
-
- org.apache.pinot.common.datablock.BaseDataBlock
-
- org.apache.pinot.common.datablock.MetadataBlock
-
- All Implemented Interfaces:
DataBlock
public class MetadataBlock extends BaseDataBlock
A block type to indicate some metadata about the current processing state. For the different types of metadata blocks seeMetadataBlock.MetadataBlockType.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classMetadataBlock.MetadataBlockType-
Nested classes/interfaces inherited from interface org.apache.pinot.common.datablock.DataBlock
DataBlock.Type
-
-
Field Summary
-
Fields inherited from class org.apache.pinot.common.datablock.BaseDataBlock
_dataSchema, _errCodeToExceptionMap, _fixDataSize, _fixedSizeData, _fixedSizeDataBytes, _metadata, _numColumns, _numRows, _stringDictionary, _variableSizeData, _variableSizeDataBytes, HEADER_SIZE
-
-
Constructor Summary
Constructors Constructor Description MetadataBlock(ByteBuffer byteBuffer)MetadataBlock(MetadataBlock.MetadataBlockType type)
-
Method Summary
Modifier and Type Method Description intgetDataBlockVersionType()Return the int serialized form of the data block version and type.protected intgetOffsetInFixedBuffer(int rowId, int colId)return the offset in_fixedSizeDataBytesof the row/column ID.MetadataBlock.MetadataBlockTypegetType()protected intpositionOffsetInVariableBufferAndGetLength(int rowId, int colId)position the_variableSizeDataBytesto the corresponding row/column ID.MetadataBlocktoDataOnlyDataTable()MetadataBlocktoMetadataOnlyDataTable()-
Methods inherited from class org.apache.pinot.common.datablock.BaseDataBlock
addException, addException, deserializeStringDictionary, getBigDecimal, getBytes, getDataSchema, getDouble, getDoubleArray, getExceptions, getFloat, getFloatArray, getInt, getIntArray, getLong, getLongArray, getMetadata, getNullRowIds, getNumberOfRows, getString, getStringArray, getVersion, serializeStringDictionary, toBytes, toString
-
-
-
-
Constructor Detail
-
MetadataBlock
public MetadataBlock(MetadataBlock.MetadataBlockType type)
-
MetadataBlock
public MetadataBlock(ByteBuffer byteBuffer) throws IOException
- Throws:
IOException
-
-
Method Detail
-
getType
public MetadataBlock.MetadataBlockType getType()
-
getDataBlockVersionType
public int getDataBlockVersionType()
Description copied from class:BaseDataBlockReturn the int serialized form of the data block version and type.- Specified by:
getDataBlockVersionTypein classBaseDataBlock- Returns:
-
getOffsetInFixedBuffer
protected int getOffsetInFixedBuffer(int rowId, int colId)Description copied from class:BaseDataBlockreturn the offset in_fixedSizeDataBytesof the row/column ID.- Specified by:
getOffsetInFixedBufferin classBaseDataBlock- Parameters:
rowId- row IDcolId- column ID- Returns:
- the offset in the fixed size buffer for the row/columnID.
-
positionOffsetInVariableBufferAndGetLength
protected int positionOffsetInVariableBufferAndGetLength(int rowId, int colId)Description copied from class:BaseDataBlockposition the_variableSizeDataBytesto the corresponding row/column ID. and return the length of bytes to extract from the variable size buffer.- Specified by:
positionOffsetInVariableBufferAndGetLengthin classBaseDataBlock- Parameters:
rowId- row IDcolId- column ID- Returns:
- the length to extract from variable size buffer.
-
toMetadataOnlyDataTable
public MetadataBlock toMetadataOnlyDataTable()
-
toDataOnlyDataTable
public MetadataBlock toDataOnlyDataTable()
-
-