odraese commented on a change in pull request #657: HIVE-21822: Expose 
LlapDaemon metrics through a new API method
URL: https://github.com/apache/hive/pull/657#discussion_r290429935
 
 

 ##########
 File path: 
llap-server/src/java/org/apache/hadoop/hive/llap/daemon/impl/LlapProtocolServerImpl.java
 ##########
 @@ -302,6 +306,18 @@ public GetTokenResponseProto 
getDelegationToken(RpcController controller,
     return responseProtoBuilder.build();
   }
 
+  @Override
+  public LlapDaemonProtocolProtos.GetLoadMetricsResponseProto 
getLoadMetrics(final RpcController controller,
+      final LlapDaemonProtocolProtos.GetLoadMetricsRequestProto request) 
throws ServiceException {
+    LlapDaemonProtocolProtos.GetLoadMetricsResponseProto.Builder 
responseProtoBuilder =
 
 Review comment:
   We already have a metrics provider (LlapDaemonExecutorMetrics) here. 
Shouldn't we just dump all defined counters (of this metrics) as key/value 
entries to a Map instead of "splitting out" two separate values? From an 
extensibility perspective, I would like to avoid that for each upcoming 
(required daemon) counter, we have to
   
   - add a new value to the proto message (and regenerate the protobuf impl)
   - add a new getter to the metrics
   - change the code to copy the value from the metric to the message
   
   We can't simply wrap the metrics instance into a proto response but it 
should be fairy easy ti generically convert it into a Map (every counter 
already has a string identifier) and return that map as part of the message.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to