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 long
getAccumulatedRecordCount()
Returns the accumulated record count.long
getFirstRecordStart()
Returns the firstRecordStart.int
getInfoSize()
long
getRecordCount()
Returns the recordCount.void
read(DataInputView in)
Reads the object's internal data from the given data input view.void
setAccumulatedRecordCount(long accumulatedRecordCount)
Sets the accumulatedRecordCount to the specified value.void
setFirstRecordStart(long firstRecordStart)
Sets the firstRecordStart to the specified value.void
setRecordCount(long recordCount)
Sets the recordCount to the specified value.void
write(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:IOReadableWritable
Writes the object's internal data to the given data output view.- Specified by:
write
in 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:IOReadableWritable
Reads the object's internal data from the given data input view.- Specified by:
read
in 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
-
-