sv2000 commented on a change in pull request #2870: [GOBBLIN-1027] add metrics 
for users running gaas jobs
URL: https://github.com/apache/incubator-gobblin/pull/2870#discussion_r367112917
 
 

 ##########
 File path: 
gobblin-service/src/main/java/org/apache/gobblin/service/modules/orchestration/DagManager.java
 ##########
 @@ -788,6 +794,33 @@ private ContextAwareCounter 
getRunningJobsCounter(DagNode<JobExecutionPlan> dagN
               dagNode.getValue().getSpecExecutor().getUri().toString()));
     }
 
+    private List<ContextAwareCounter> 
getRunningJobsCounterForUser(DagNode<JobExecutionPlan> dagNode) {
+      Properties props = 
dagNode.getValue().getJobSpec().getConfigAsProperties();
+      String proxy = props.getProperty("user.to.proxy");
+      List<ContextAwareCounter> counters = new ArrayList<>();
+
+      if (proxy != null) {
+        counters.add(metricContext.contextAwareCounter(
+            MetricRegistry.name(
+                MetricReportUtils.GOBBLIN_SERVICE_METRICS_PREFIX,
+                ServiceMetricNames.SERVICE_USERS, proxy)));
+      }
+
+      try {
+        String serializedRequesters = 
props.getProperty("gobblin.service.requester.list");
 
 Review comment:
   Change to RequesterService.REQUESTER_LIST?

----------------------------------------------------------------
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

Reply via email to