Package org.apache.pinot.segment.spi
Interface SegmentMetadata
-
- All Known Implementing Classes:
SegmentMetadataImpl
@Private public interface SegmentMetadata
TheSegmentMetadataclass holds the segment level management information and data statistics.
-
-
Method Summary
Modifier and Type Method Description default Set<String>getAllColumns()default ColumnMetadatagetColumnMetadataFor(String column)Map<String,ColumnMetadata>getColumnMetadataMap()StringgetCrc()StringgetCreatorName()Map<String,String>getCustomMap()StringgetEndOffset()longgetEndTime()longgetIndexCreationTime()FilegetIndexDir()longgetLastIndexedTimestamp()Return the last time a record was indexed in this segment.longgetLatestIngestionTimestamp()Return the latest ingestion timestamp associated with the records indexed in this segment.StringgetName()SchemagetSchema()StringgetStartOffset()List<StarTreeV2Metadata>getStarTreeV2MetadataList()longgetStartTime()StringgetTableName()Deprecated.StringgetTimeColumn()org.joda.time.DurationgetTimeGranularity()org.joda.time.IntervalgetTimeInterval()TimeUnitgetTimeUnit()intgetTotalDocs()SegmentVersiongetVersion()default booleanisMutableSegment()voidremoveColumn(String column)Removes a column from the segment metadata.com.fasterxml.jackson.databind.JsonNodetoJson(Set<String> columnFilter)Converts segment metadata to json.
-
-
-
Method Detail
-
getTableName
@Deprecated String getTableName()
Deprecated.Returns the raw table name (without the type suffix).
-
getName
String getName()
-
getTimeColumn
String getTimeColumn()
-
getStartTime
long getStartTime()
-
getEndTime
long getEndTime()
-
getTimeUnit
TimeUnit getTimeUnit()
-
getTimeGranularity
org.joda.time.Duration getTimeGranularity()
-
getTimeInterval
org.joda.time.Interval getTimeInterval()
-
getCrc
String getCrc()
-
getVersion
SegmentVersion getVersion()
-
getSchema
Schema getSchema()
-
getTotalDocs
int getTotalDocs()
-
getIndexDir
File getIndexDir()
-
getCreatorName
@Nullable String getCreatorName()
-
getIndexCreationTime
long getIndexCreationTime()
-
getLastIndexedTimestamp
long getLastIndexedTimestamp()
Return the last time a record was indexed in this segment. Applicable for MutableSegments.- Returns:
- time when the last record was indexed
-
getLatestIngestionTimestamp
long getLatestIngestionTimestamp()
Return the latest ingestion timestamp associated with the records indexed in this segment. Applicable for MutableSegments.- Returns:
- latest timestamp associated with indexed records
Long.MIN_VALUEif the stream doesn't provide a timestamp
-
getStarTreeV2MetadataList
List<StarTreeV2Metadata> getStarTreeV2MetadataList()
-
getStartOffset
String getStartOffset()
-
getEndOffset
String getEndOffset()
-
getColumnMetadataMap
Map<String,ColumnMetadata> getColumnMetadataMap()
-
getColumnMetadataFor
default ColumnMetadata getColumnMetadataFor(String column)
-
removeColumn
void removeColumn(String column)
Removes a column from the segment metadata.
-
toJson
com.fasterxml.jackson.databind.JsonNode toJson(@Nullable Set<String> columnFilter)Converts segment metadata to json.- Parameters:
columnFilter- list only the columns in the set. Lists all the columns if the parameter value is null.- Returns:
- json representation of segment metadata.
-
isMutableSegment
default boolean isMutableSegment()
-
-