You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by GitBox <gi...@apache.org> on 2020/05/18 22:29:18 UTC

[GitHub] [beam] nielm commented on a change in pull request #11528: [BEAM-9821] Populate all SpannerIO batching parameters in display data.

nielm commented on a change in pull request #11528:
URL: https://github.com/apache/beam/pull/11528#discussion_r426926639



##########
File path: sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/spanner/SpannerIO.java
##########
@@ -991,6 +1001,24 @@ public WriteGrouped(Write spec) {
       this.spec = spec;
     }
 
+    @Override
+    public void populateDisplayData(DisplayData.Builder builder) {
+      super.populateDisplayData(builder);
+      spec.getSpannerConfig().populateDisplayData(builder);
+      builder.add(
+          DisplayData.item("batchSizeBytes", spec.getBatchSizeBytes())
+              .withLabel("Max batch size in sytes"));
+      builder.add(
+          DisplayData.item("maxNumMutations", spec.getMaxNumMutations())
+              .withLabel("Max number of mutated cells in each batch"));
+      builder.add(
+          DisplayData.item("maxNumRows", spec.getMaxNumRows())
+              .withLabel("Max number of rows in each batch"));
+      builder.add(
+          DisplayData.item("groupingFactor", spec.getGroupingFactor())
+              .withLabel("Number of batches to sort over"));
+    }
+

Review comment:
       LGTM. 
   I extracted a single method in Write to populate the displayData with parameters to avoid repeating code.




----------------------------------------------------------------
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:
users@infra.apache.org