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

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

                Author: ASF GitHub Bot
            Created on: 30/Apr/19 17:59
            Start Date: 30/Apr/19 17:59
    Worklog Time Spent: 10m 
      Work Description: ajamato commented on pull request #8280: [BEAM-6138] 
Update java SDK to report user distribution tuple metrics over the FN API
URL: https://github.com/apache/beam/pull/8280#discussion_r279854571
 
 

 ##########
 File path: 
runners/core-java/src/main/java/org/apache/beam/runners/core/metrics/SimpleMonitoringInfoBuilder.java
 ##########
 @@ -99,6 +100,29 @@ public SimpleMonitoringInfoBuilder setInt64Value(long 
value) {
     return this;
   }
 
+  /**
+   * Sets the IntDistributionData of the DistributionData in the 
MonitoringInfo, and the appropriate
+   * type URN.
+   */
+  public SimpleMonitoringInfoBuilder 
setInt64DistributionValue(DistributionData data) {
+    this.builder
+        .getMetricBuilder()
+        .getDistributionDataBuilder()
+        .getIntDistributionDataBuilder()
+        .setCount(data.count())
+        .setSum(data.sum())
+        .setMin(data.min())
+        .setMax(data.max());
+    this.setInt64DistributionTypeUrn();
+    return this;
+  }
+
+  /** Sets the the appropriate type URN for int64 distribution tuples. */
+  public SimpleMonitoringInfoBuilder setInt64DistributionTypeUrn() {
 
 Review comment:
   We call it in some test cases.
   Its nice to test those scenarios because its not obvious how maintainers 
will make changes. The test specifically makes sure that if the value is not 
set (even if the type is) then we won't validate the metrics. Its important to 
make sure the validators will still work properly in that scenario.
 
----------------------------------------------------------------
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]


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

    Worklog Id:     (was: 235443)
    Time Spent: 11h 10m  (was: 11h)

> Add User Metric Support to Java SDK
> -----------------------------------
>
>                 Key: BEAM-6138
>                 URL: https://issues.apache.org/jira/browse/BEAM-6138
>             Project: Beam
>          Issue Type: New Feature
>          Components: java-fn-execution
>            Reporter: Alex Amato
>            Assignee: Alex Amato
>            Priority: Major
>              Labels: triaged
>          Time Spent: 11h 10m
>  Remaining Estimate: 0h
>




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

Reply via email to