Will-Lo commented on code in PR #3786:
URL: https://github.com/apache/gobblin/pull/3786#discussion_r1333741471


##########
gobblin-cluster/src/main/java/org/apache/gobblin/cluster/GobblinHelixJobTask.java:
##########
@@ -219,7 +219,7 @@ public TaskResult run() {
 
   @Override
   public void cancel() {
-    log.info("Cancelling planning job {} | jobTaskMetrics: {}", 
this.planningJobId, this.jobTaskMetrics);
+    log.info("Cancelling planning job {} | jobTaskMetrics: {}", 
this.planningJobId, this.jobTaskMetrics.getMetrics());

Review Comment:
   I think this still has an issue:
   Going into the implementation of `StandardMetrics.getMetrics()` it returns a 
`Map<String, Metric>`. When this is printed it would still return the reference 
to the map instead of the contents. If you really want to print the metrics 
here, we will need a custom log function where you traverse the Map<String, 
Metric> and then print out the contexts as appropriate. But given that `Metric` 
is just an interface in `metrics-core-4.1.2`, I think this would be tricky as 
we would have to also implement a switch statement checking each type...
   
   Which metric are you interested in here? Would it be possible just to limit 
the scope to print only those metrics?



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to