Package org.apache.pinot.common.tier
Class TimeBasedTierSegmentSelector
- java.lang.Object
-
- org.apache.pinot.common.tier.TimeBasedTierSegmentSelector
-
- All Implemented Interfaces:
TierSegmentSelector
public class TimeBasedTierSegmentSelector extends Object implements TierSegmentSelector
ATierSegmentSelectorstrategy which selects segments for a tier based on the age of the segment
-
-
Constructor Summary
Constructors Constructor Description TimeBasedTierSegmentSelector(org.apache.helix.HelixManager helixManager, String segmentAge)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longgetSegmentAgeMillis()Gets the age cutoff for segments accepted by this strategyStringgetType()The type of the segment selector (e.g.booleanselectSegment(String tableNameWithType, String segmentName)Checks if a segment is eligible for the tier based on the segment age i.e.StringtoString()
-
-
-
Constructor Detail
-
TimeBasedTierSegmentSelector
public TimeBasedTierSegmentSelector(org.apache.helix.HelixManager helixManager, String segmentAge)
-
-
Method Detail
-
getType
public String getType()
Description copied from interface:TierSegmentSelectorThe type of the segment selector (e.g. TIME)- Specified by:
getTypein interfaceTierSegmentSelector
-
selectSegment
public boolean selectSegment(String tableNameWithType, String segmentName)
Checks if a segment is eligible for the tier based on the segment age i.e. the end time of the segment from zk metadata- Specified by:
selectSegmentin interfaceTierSegmentSelector- Parameters:
tableNameWithType- Name of the tablesegmentName- Name of the segment- Returns:
- true if eligible
-
getSegmentAgeMillis
public long getSegmentAgeMillis()
Gets the age cutoff for segments accepted by this strategy
-
-