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:
[email protected]