Package org.apache.druid.frame.file
Class FrameFileFooter
- java.lang.Object
-
- org.apache.druid.frame.file.FrameFileFooter
-
public class FrameFileFooter extends Object
Encapsulation for ƒrame file footer related operations. The footer must be wrapped in a memory object (the memory can be physical or mmaped). Some verifications are also done on the footer to see if it is not corrupted. The schema for footer is as described byFrameFile
.
-
-
Constructor Summary
Constructors Constructor Description FrameFileFooter(org.apache.datasketches.memory.Memory footerMemory, long frameFileLength)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
getFrameEndPosition(int frameNumber)
Get the last byte for the frame specified.int
getNumFrames()
int
getNumPartitions()
int
getPartitionStartFrame(int partition)
First frame of a given partition.
-
-
-
Method Detail
-
getPartitionStartFrame
public int getPartitionStartFrame(int partition)
First frame of a given partition. Partitions beyondgetNumPartitions()
are treated as empty: if provided, this method returnsgetNumFrames()
.
-
getFrameEndPosition
public long getFrameEndPosition(int frameNumber)
Get the last byte for the frame specified. The byte number is offsetted from the frame file start and is exclusive.- Parameters:
frameNumber
- the id of the frame to get the end position for- Returns:
- a long exclusive index representing the frame end
-
getNumFrames
public int getNumFrames()
-
getNumPartitions
public int getNumPartitions()
-
-