gortiz commented on code in PR #12704:
URL: https://github.com/apache/pinot/pull/12704#discussion_r1565303435


##########
pinot-common/src/main/java/org/apache/pinot/common/datatable/DataTable.java:
##########
@@ -100,7 +110,7 @@ enum MetadataValueType {
    *  - NEVER decrease MAX_ID
    *  Otherwise, backward compatibility will be broken.
    */
-  enum MetadataKey {
+  enum MetadataKey implements StatMap.Key {

Review Comment:
   These are not he stats reported by Leaf operator. This operator uses its own 
`LeafStageTransferableBlockOperator.StatKey` class. But it is useful to 
implement `StatMap.Key` in `MetadataKey` in order to be able to store them in a 
new `StatMap`. Do we use that in V1? No, but in V2 we use it in order to:
   
   * In the leaf operator, but only as an input. Leaf operator has its own stat 
class, but it receives MetadataKey stats fromt he V1 engine in a `Map<String, 
String>` and has to transform them into its own stats. See 
`LeafStageTransferableBlockOperator.mergeExecutionStats`.
   * In brokers,  when the response is being reduced. I've changed that code to 
reduce it using StatMap instead of a `HashMap<String, String>`. Specifically, 
I've removed a lot of attributes from `BrokerResponseNative` and transform them 
into a `StatMap<DataTable.MetadataKey> _serverStats`. This makes it easier to 
merge V2 stats into this object.
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org
For additional commands, e-mail: commits-h...@pinot.apache.org

Reply via email to