[ 
https://issues.apache.org/jira/browse/BEAM-6181?focusedWorklogId=172494&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-172494
 ]

ASF GitHub Bot logged work on BEAM-6181:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 05/Dec/18 22:04
            Start Date: 05/Dec/18 22:04
    Worklog Time Spent: 10m 
      Work Description: ajamato commented on a change in pull request #7202: 
[BEAM-6181] Reporting user counters via MonitoringInfos in Portable Dataflow 
Runner.
URL: https://github.com/apache/beam/pull/7202#discussion_r239241898
 
 

 ##########
 File path: 
runners/google-cloud-dataflow-java/worker/src/main/java/org/apache/beam/runners/dataflow/worker/WorkItemStatusClient.java
 ##########
 @@ -263,20 +263,35 @@ private synchronized WorkItemStatus 
createStatusUpdate(boolean isFinal) {
     return status;
   }
 
+  // todo this method should return List<CounterUpdate> instead of setting it 
to WorkitemStatus
   @VisibleForTesting
   synchronized void populateCounterUpdates(WorkItemStatus status) {
     if (worker == null) {
       return;
     }
 
     boolean isFinalUpdate = Boolean.TRUE.equals(status.getCompleted());
-    ImmutableList.Builder<CounterUpdate> counterUpdatesBuilder = 
ImmutableList.builder();
-    counterUpdatesBuilder.addAll(extractCounters(worker.getOutputCounters()));
-    counterUpdatesBuilder.addAll(extractMetrics(isFinalUpdate));
-    counterUpdatesBuilder.addAll(extractMsecCounters(isFinalUpdate));
-    counterUpdatesBuilder.addAll(worker.extractMetricUpdates());
 
-    ImmutableList<CounterUpdate> counterUpdates = 
counterUpdatesBuilder.build();
+    ImmutableList.Builder<CounterUpdate> counterUpdatesListBuilder = 
ImmutableList.builder();
+    Iterable<CounterUpdate> newCounterUpdates;
+
+    // Output counters
+    newCounterUpdates = extractCounters(worker.getOutputCounters());
+    counterUpdatesListBuilder.addAll(newCounterUpdates);
+
+    // User metrics reported in Worker
+    newCounterUpdates = extractMetrics(isFinalUpdate);
 
 Review comment:
   Please revert to the previous style, there isn't much value to expanding 
these to two lines each.
   
   thanks for the code comments though

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 172494)
    Time Spent: 2h  (was: 1h 50m)

> Utilize MetricInfo for reporting user metrics in Portable Dataflow Java 
> Runner.
> -------------------------------------------------------------------------------
>
>                 Key: BEAM-6181
>                 URL: https://issues.apache.org/jira/browse/BEAM-6181
>             Project: Beam
>          Issue Type: Bug
>          Components: java-fn-execution
>            Reporter: Mikhail Gryzykhin
>            Assignee: Mikhail Gryzykhin
>            Priority: Major
>          Time Spent: 2h
>  Remaining Estimate: 0h
>
> New approach to report metrics in FnApi is to utilize MetricInfo structures.
> This approach is implemented in Python SDK and work is ongoing in Java SDK.
> This tasks includes plumbing User metrics reported via MetricInfos through 
> Dataflow Java Runner. 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to