Class FreshnessBasedConsumptionStatusChecker
- java.lang.Object
-
- org.apache.pinot.server.starter.helix.IngestionBasedConsumptionStatusChecker
-
- org.apache.pinot.server.starter.helix.FreshnessBasedConsumptionStatusChecker
-
public class FreshnessBasedConsumptionStatusChecker extends IngestionBasedConsumptionStatusChecker
This class is used at startup time to have a more accurate estimate of the catchup period in which no query execution happens and consumers try to catch up to the latest messages available in streams. To achieve this, every time status check is called -IngestionBasedConsumptionStatusChecker.getNumConsumingSegmentsNotReachedIngestionCriteria()- for each consuming segment, we check if either: - the segment's latest ingested offset has reached the current stream offset that's - the last ingested message is within_minFreshnessMsof the current system time
-
-
Field Summary
-
Fields inherited from class org.apache.pinot.server.starter.helix.IngestionBasedConsumptionStatusChecker
_consumingSegments, _instanceDataManager, _logger
-
-
Constructor Summary
Constructors Constructor Description FreshnessBasedConsumptionStatusChecker(InstanceDataManager instanceDataManager, Set<String> consumingSegments, long minFreshnessMs)
-
Method Summary
Modifier and Type Method Description protected booleanisSegmentCaughtUp(String segmentName, LLRealtimeSegmentDataManager rtSegmentDataManager)protected longnow()-
Methods inherited from class org.apache.pinot.server.starter.helix.IngestionBasedConsumptionStatusChecker
getNumConsumingSegmentsNotReachedIngestionCriteria
-
-
-
-
Constructor Detail
-
FreshnessBasedConsumptionStatusChecker
public FreshnessBasedConsumptionStatusChecker(InstanceDataManager instanceDataManager, Set<String> consumingSegments, long minFreshnessMs)
-
-
Method Detail
-
now
protected long now()
-
isSegmentCaughtUp
protected boolean isSegmentCaughtUp(String segmentName, LLRealtimeSegmentDataManager rtSegmentDataManager)
- Specified by:
isSegmentCaughtUpin classIngestionBasedConsumptionStatusChecker
-
-