Package org.apache.flink.api.common.io
Class BlockInfo
- java.lang.Object
-
- org.apache.flink.api.common.io.BlockInfo
-
- All Implemented Interfaces:
IOReadableWritable
@Public public class BlockInfo extends Object implements IOReadableWritable
A block of 24 bytes written at the end of a block in a binary file, and containing i) the number of records in the block, ii) the accumulated number of records, and iii) the offset of the first record in the block.
-
-
Constructor Summary
Constructors Constructor Description BlockInfo()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longgetAccumulatedRecordCount()Returns the accumulated record count.longgetFirstRecordStart()Returns the firstRecordStart.intgetInfoSize()longgetRecordCount()Returns the recordCount.voidread(DataInputView in)Reads the object's internal data from the given data input view.voidsetAccumulatedRecordCount(long accumulatedRecordCount)Sets the accumulatedRecordCount to the specified value.voidsetFirstRecordStart(long firstRecordStart)Sets the firstRecordStart to the specified value.voidsetRecordCount(long recordCount)Sets the recordCount to the specified value.voidwrite(DataOutputView out)Writes the object's internal data to the given data output view.
-
-
-
Method Detail
-
getInfoSize
public int getInfoSize()
-
getFirstRecordStart
public long getFirstRecordStart()
Returns the firstRecordStart.- Returns:
- the firstRecordStart
-
setFirstRecordStart
public void setFirstRecordStart(long firstRecordStart)
Sets the firstRecordStart to the specified value.- Parameters:
firstRecordStart- the firstRecordStart to set
-
write
public void write(DataOutputView out) throws IOException
Description copied from interface:IOReadableWritableWrites the object's internal data to the given data output view.- Specified by:
writein interfaceIOReadableWritable- Parameters:
out- the output view to receive the data.- Throws:
IOException- thrown if any error occurs while writing to the output stream
-
read
public void read(DataInputView in) throws IOException
Description copied from interface:IOReadableWritableReads the object's internal data from the given data input view.- Specified by:
readin interfaceIOReadableWritable- Parameters:
in- the input view to read the data from- Throws:
IOException- thrown if any error occurs while reading from the input stream
-
getRecordCount
public long getRecordCount()
Returns the recordCount.- Returns:
- the recordCount
-
getAccumulatedRecordCount
public long getAccumulatedRecordCount()
Returns the accumulated record count.- Returns:
- the accumulated record count
-
setAccumulatedRecordCount
public void setAccumulatedRecordCount(long accumulatedRecordCount)
Sets the accumulatedRecordCount to the specified value.- Parameters:
accumulatedRecordCount- the accumulatedRecordCount to set
-
setRecordCount
public void setRecordCount(long recordCount)
Sets the recordCount to the specified value.- Parameters:
recordCount- the recordCount to set
-
-