public class ReconcilePartitionOperator extends Object
Constructor and Description |
---|
ReconcilePartitionOperator(org.apache.kafka.common.TopicPartition topicPartition,
String stateFileName,
long fromTimestamp) |
Modifier and Type | Method and Description |
---|---|
FtpsSegmentView |
getOperatorContext() |
Map<UUID,String> |
reconcile(Map<UUID,SegmentState> segmentMap)
To make sure there is no holes in the segment chain, the logic to reconcile are:
- Find the segment with largest tierEpoch + endOffset (call it max segment) from the input segments,
- then flip all the segments before the max segment's state to SEGMENT_FENCED
By marking the segment's state into SEGMENT_FENCED, Kafka will take care of the garbage collecting task
for the segments after FTPS file injection.
|
public ReconcilePartitionOperator(org.apache.kafka.common.TopicPartition topicPartition, String stateFileName, long fromTimestamp) throws IOException
IOException
public Map<UUID,String> reconcile(Map<UUID,SegmentState> segmentMap) throws Exception
segmentMap
- input segments to reconcileException
- there is no need to retry when exception happenspublic FtpsSegmentView getOperatorContext()