Class NormalizedDateSegmentNameGenerator
- java.lang.Object
-
- org.apache.pinot.segment.spi.creator.name.NormalizedDateSegmentNameGenerator
-
- All Implemented Interfaces:
Serializable,SegmentNameGenerator
public class NormalizedDateSegmentNameGenerator extends Object implements SegmentNameGenerator
Segment name generator that normalizes the date to human readable format.- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from interface org.apache.pinot.segment.spi.creator.name.SegmentNameGenerator
JOINER
-
-
Constructor Summary
Constructors Constructor Description NormalizedDateSegmentNameGenerator(String tableName, String segmentNamePrefix, boolean excludeSequenceId, String pushType, String pushFrequency, DateTimeFormatSpec dateTimeFormatSpec, String segmentNamePostfix)NormalizedDateSegmentNameGenerator(String tableName, String segmentNamePrefix, boolean excludeSequenceId, String pushType, String pushFrequency, DateTimeFormatSpec dateTimeFormatSpec, String segmentNamePostfix, boolean appendUUIDToSegmentName)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgenerateSegmentName(int sequenceId, Object minTimeValue, Object maxTimeValue)Generates the segment name.StringgetNormalizedDate(Object timeValue)Converts the time value into human readable date format.StringtoString()
-
-
-
Constructor Detail
-
NormalizedDateSegmentNameGenerator
public NormalizedDateSegmentNameGenerator(String tableName, @Nullable String segmentNamePrefix, boolean excludeSequenceId, @Nullable String pushType, @Nullable String pushFrequency, @Nullable DateTimeFormatSpec dateTimeFormatSpec, @Nullable String segmentNamePostfix)
-
NormalizedDateSegmentNameGenerator
public NormalizedDateSegmentNameGenerator(String tableName, @Nullable String segmentNamePrefix, boolean excludeSequenceId, @Nullable String pushType, @Nullable String pushFrequency, @Nullable DateTimeFormatSpec dateTimeFormatSpec, @Nullable String segmentNamePostfix, boolean appendUUIDToSegmentName)
-
-
Method Detail
-
generateSegmentName
public String generateSegmentName(int sequenceId, @Nullable Object minTimeValue, @Nullable Object maxTimeValue)
Description copied from interface:SegmentNameGeneratorGenerates the segment name.- Specified by:
generateSegmentNamein interfaceSegmentNameGenerator- Parameters:
sequenceId- Segment sequence id (negative value means INVALID)minTimeValue- Minimum time valuemaxTimeValue- Maximum time value- Returns:
- Segment name generated
-
getNormalizedDate
public String getNormalizedDate(Object timeValue)
Converts the time value into human readable date format.- Parameters:
timeValue- Time value- Returns:
- Normalized date string
-
-