Class RecordBatchStats
java.lang.Object
org.apache.drill.exec.util.record.RecordBatchStats
Utility class to capture key record batch statistics.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
Indicates whether a record batch is Input or Outputstatic final class
Helper class which loads contextual record batch logging options -
Field Summary
Modifier and TypeFieldDescriptionstatic final String
A prefix for all batch stats to simplify search -
Method Summary
Modifier and TypeMethodDescriptionstatic void
logRecordBatchStats
(String message, RecordBatchStats.RecordBatchStatsContext batchStatsContext) Logs a generic batch statistics messagestatic void
logRecordBatchStats
(RecordBatchStats.RecordBatchIOType ioType, String sourceId, RecordBatch recordBatch, RecordBatchStats.RecordBatchStatsContext batchStatsContext) static void
logRecordBatchStats
(RecordBatchStats.RecordBatchIOType ioType, String sourceId, RecordBatchSizer batchSizer, RecordBatchStats.RecordBatchStatsContext batchStatsContext) Logs record batch statistics for the input record batch (logging happens only when record statistics logging is enabled).static void
logRecordBatchStats
(RecordBatchStats.RecordBatchIOType ioType, RecordBatch recordBatch, RecordBatchStats.RecordBatchStatsContext batchStatsContext) static void
logRecordBatchStats
(RecordBatchStats.RecordBatchIOType ioType, RecordBatchSizer recordBatchSizer, RecordBatchStats.RecordBatchStatsContext batchStatsContext) static void
logRecordBatchStats
(RecordBatchStats.RecordBatchStatsContext batchStatsContext, String format, Object... args) Logs a generic batch statistics messagestatic String
printAllocatorStats
(BufferAllocator allocator) static void
printConfiguredBatchSize
(RecordBatchStats.RecordBatchStatsContext batchStatsContext, int batchSize) Prints the configured batch size
-
Field Details
-
BATCH_STATS_PREFIX
A prefix for all batch stats to simplify search- See Also:
-
-
Method Details
-
logRecordBatchStats
public static void logRecordBatchStats(RecordBatchStats.RecordBatchIOType ioType, String sourceId, RecordBatch recordBatch, RecordBatchStats.RecordBatchStatsContext batchStatsContext) -
logRecordBatchStats
public static void logRecordBatchStats(RecordBatchStats.RecordBatchIOType ioType, RecordBatch recordBatch, RecordBatchStats.RecordBatchStatsContext batchStatsContext) -
logRecordBatchStats
public static void logRecordBatchStats(RecordBatchStats.RecordBatchIOType ioType, RecordBatchSizer recordBatchSizer, RecordBatchStats.RecordBatchStatsContext batchStatsContext) -
logRecordBatchStats
public static void logRecordBatchStats(RecordBatchStats.RecordBatchIOType ioType, String sourceId, RecordBatchSizer batchSizer, RecordBatchStats.RecordBatchStatsContext batchStatsContext) Logs record batch statistics for the input record batch (logging happens only when record statistics logging is enabled).- Parameters:
ioType
- whether a record batch is an input or/and outputsourceId
- optional source identifier for scannersbatchSizer
- contains batch sizing informationbatchStatsContext
- batch stats context object
-
logRecordBatchStats
public static void logRecordBatchStats(String message, RecordBatchStats.RecordBatchStatsContext batchStatsContext) Logs a generic batch statistics message- Parameters:
message
- log messagebatchStatsContext
- batch stats context object
-
logRecordBatchStats
public static void logRecordBatchStats(RecordBatchStats.RecordBatchStatsContext batchStatsContext, String format, Object... args) Logs a generic batch statistics message- Parameters:
batchStatsContext
- batch stats context objectformat
- a string format as inString.format(java.lang.String, java.lang.Object...)
methodargs
- format's arguments
-
printAllocatorStats
- Parameters:
allocator
- dumps allocator statistics- Returns:
- string with allocator statistics
-
printConfiguredBatchSize
public static void printConfiguredBatchSize(RecordBatchStats.RecordBatchStatsContext batchStatsContext, int batchSize) Prints the configured batch size- Parameters:
batchStatsContext
- batch stats context objectbatchSize
- contains the configured batch size
-