You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by "svetakvsundhar (via GitHub)" <gi...@apache.org> on 2023/09/03 23:01:51 UTC

[GitHub] [beam] svetakvsundhar commented on a diff in pull request #28137: [WIP] Add a De-ID transform for Dicom IO

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



-- 
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: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org