svetakvsundhar commented on code in PR #28137:
URL: https://github.com/apache/beam/pull/28137#discussion_r1314330007


##########
sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/healthcare/DicomIO.java:
##########
@@ -196,4 +281,138 @@ public ReadStudyMetadata.Result 
expand(PCollection<String> input) {
                       TupleTagList.of(ReadStudyMetadata.ERROR_MESSAGE))));
     }
   }
+
+  /**
+   * Increments success and failure counters for an LRO. To be used after the 
LRO has completed.
+   * This function leverages the fact that the LRO metadata is always of the 
format: "counter": {
+   * "success": "1", "failure": "1" }
+   *
+   * @param operation LRO operation object.
+   * @param operationSuccessCounter the success counter for the operation.
+   * @param operationFailureCounter the failure counter for the operation.
+   * @param resourceSuccessCounter the success counter for individual 
resources in the operation.
+   * @param resourceFailureCounter the failure counter for individual 
resources in the operation.
+   */
+  private static void incrementLroCounters(
+      Operation operation,
+      Counter operationSuccessCounter,
+      Counter operationFailureCounter,
+      Counter resourceSuccessCounter,
+      Counter resourceFailureCounter) {

Review Comment:
   Sure. Created #28293 to take this one step further. We can get that merged 
once this PR is in



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