Class RealtimeSegmentStatsHistory
- java.lang.Object
-
- org.apache.pinot.segment.local.realtime.impl.RealtimeSegmentStatsHistory
-
- All Implemented Interfaces:
Serializable
public class RealtimeSegmentStatsHistory extends Object implements Serializable
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classRealtimeSegmentStatsHistory.ColumnStatsstatic classRealtimeSegmentStatsHistory.SegmentStats
-
Field Summary
Fields Modifier and Type Field Description static org.slf4j.LoggerLOGGER
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddSegmentStats(RealtimeSegmentStatsHistory.SegmentStats segmentStats)static RealtimeSegmentStatsHistorydeserialzeFrom(File inFile)intgetArraySize()intgetCursor()static intgetDefaultEstAvgColSize()static intgetDefaultEstCardinality()intgetEstimatedAvgColSize(String columnName)Estimate the average size of a string column based on the past segments of the table.intgetEstimatedCardinality(String columnName)Estimate the cardinality of a column based on past segments of a table For now, we return the average value.intgetEstimatedRowsToIndex()longgetLatestSegmentMemoryConsumed()static intgetMaxNumEntries()RealtimeSegmentStatsHistory.SegmentStatsgetSegmentStatsAt(int index)booleanisEmpty()booleanisFull()static voidsetMaxNumEntries(int maxNumEntries)voidsetMinIntervalBetweenUpdatesMillis(long millis)StringtoString()
-
-
-
Method Detail
-
getMaxNumEntries
public static int getMaxNumEntries()
-
getDefaultEstAvgColSize
public static int getDefaultEstAvgColSize()
-
getDefaultEstCardinality
public static int getDefaultEstCardinality()
-
setMaxNumEntries
public static void setMaxNumEntries(int maxNumEntries)
-
getCursor
public int getCursor()
-
getArraySize
public int getArraySize()
-
isFull
public boolean isFull()
-
isEmpty
public boolean isEmpty()
-
setMinIntervalBetweenUpdatesMillis
public void setMinIntervalBetweenUpdatesMillis(long millis)
-
addSegmentStats
public void addSegmentStats(RealtimeSegmentStatsHistory.SegmentStats segmentStats)
-
getEstimatedCardinality
public int getEstimatedCardinality(@Nonnull String columnName)Estimate the cardinality of a column based on past segments of a table For now, we return the average value.- Parameters:
columnName-- Returns:
- estimated
-
getEstimatedAvgColSize
public int getEstimatedAvgColSize(@Nonnull String columnName)Estimate the average size of a string column based on the past segments of the table. For now, we return the average value.- Parameters:
columnName-- Returns:
- estimated average string size
-
getEstimatedRowsToIndex
public int getEstimatedRowsToIndex()
-
getLatestSegmentMemoryConsumed
public long getLatestSegmentMemoryConsumed()
-
getSegmentStatsAt
public RealtimeSegmentStatsHistory.SegmentStats getSegmentStatsAt(int index)
-
deserialzeFrom
public static RealtimeSegmentStatsHistory deserialzeFrom(File inFile) throws IOException, ClassNotFoundException
- Throws:
IOExceptionClassNotFoundException
-
-