Dippatel98 commented on code in PR #27021:
URL: https://github.com/apache/beam/pull/27021#discussion_r1226813677
##########
sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/spanner/SpannerWriteSchemaTransformProvider.java:
##########
@@ -69,6 +74,31 @@ static class SpannerSchemaTransformWrite implements
SchemaTransform, Serializabl
this.configuration = configuration;
}
+ // A generic counter for PCollection of Row. Will be initialized with the
given
+ // name argument. Performs element-wise counter of the input PCollection.
+ private static class ElementCounterFn extends DoFn<Row, Row> {
+
+ private Counter spannerGenericElementCounter;
+ private Long elementsInBundle = 0L;
+
+ ElementCounterFn(String name) {
+ this.spannerGenericElementCounter =
Review Comment:
The plan was to count the element level error metrics, to keep track of
records being routed to the DLQ. In the future, these metrics may be uploaded
to Cloud Monarch, for further uses.
--
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]