Github user paul-rogers commented on a diff in the pull request:
https://github.com/apache/drill/pull/1181#discussion_r178445224
--- Diff:
exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/flatten/FlattenRecordBatch.java
---
@@ -463,4 +489,21 @@ protected boolean setupNewSchema() throws
SchemaChangeException {
}
return exprs;
}
+
+ private void updateStats() {
+ stats.setLongStat(Metric.INPUT_BATCH_COUNT,
flattenMemoryManager.getNumIncomingBatches());
+ stats.setLongStat(Metric.AVG_INPUT_BATCH_BYTES,
flattenMemoryManager.getAvgInputBatchSize());
+ stats.setLongStat(Metric.AVG_INPUT_ROW_BYTES,
flattenMemoryManager.getAvgInputRowWidth());
+ stats.setLongStat(Metric.TOTAL_INPUT_RECORDS,
flattenMemoryManager.getTotalInputRecords());
+ stats.setLongStat(Metric.OUTPUT_BATCH_COUNT,
flattenMemoryManager.getNumOutgoingBatches());
+ stats.setLongStat(Metric.AVG_OUTPUT_BATCH_BYTES,
flattenMemoryManager.getAvgOutputBatchSize());
+ stats.setLongStat(Metric.AVG_OUTPUT_ROW_BYTES,
flattenMemoryManager.getAvgOutputRowWidth());
+ stats.setLongStat(Metric.TOTAL_OUTPUT_RECORDS,
flattenMemoryManager.getTotalOutputRecords());
--- End diff --
Not critical, but I found it super helpful to dump this information into
the log as well as as metrics. That way, when some issue arises, all the
information is in the logs, I didn't need to track down both the logs and the
query profile.
---