Github user sohami commented on a diff in the pull request:
https://github.com/apache/drill/pull/1227#discussion_r183145171
--- Diff:
exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/join/HashJoinBatch.java
---
@@ -147,7 +150,19 @@
NUM_BUCKETS,
NUM_ENTRIES,
NUM_RESIZING,
- RESIZING_TIME_MS;
+ RESIZING_TIME_MS,
+ LEFT_INPUT_BATCH_COUNT,
+ LEFT_AVG_INPUT_BATCH_BYTES,
+ LEFT_AVG_INPUT_ROW_BYTES,
+ LEFT_INPUT_RECORD_COUNT,
+ RIGHT_INPUT_BATCH_COUNT,
+ RIGHT_AVG_INPUT_BATCH_BYTES,
+ RIGHT_AVG_INPUT_ROW_BYTES,
+ RIGHT_INPUT_RECORD_COUNT,
+ OUTPUT_BATCH_COUNT,
+ AVG_OUTPUT_BATCH_BYTES,
+ AVG_OUTPUT_ROW_BYTES,
+ OUTPUT_RECORD_COUNT;
--- End diff --
Putting these metrics inside operator Metric class will not work. For joins
these metrics were moved inside `JoinBatchMemoryManager.Metric` class since
they are memory manager metrics. So when you call
`updateBatchMemoryManagerStats()` it updates the operator stats but using
ordinals from `JoinBatchMemoryManager.Metric` class. So the ordinal for
LEFT_INPUT_BATCH_COUNT will be 0 not 4 (which is required).
I think we should improve our OperatorsMetricRegistry to register multiple
Metric classes for an operator.
---