rohitsinha54 commented on code in PR #31789:
URL: https://github.com/apache/beam/pull/31789#discussion_r1667619737
##########
runners/core-java/src/main/java/org/apache/beam/runners/core/metrics/MonitoringInfoEncodings.java:
##########
@@ -98,6 +103,36 @@ public static GaugeData decodeInt64Gauge(ByteString
payload) {
}
}
+ /** Encodes to {@link MonitoringInfoConstants.TypeUrns#SET_STRING_TYPE}. */
+ public static ByteString encodeStringSet(StringSetData data) {
+ try (ByteStringOutputStream output = new ByteStringOutputStream()) {
+ // encode the length of set
+ STRING_CODER.encode(String.valueOf(data.stringSet().size()), output);
Review Comment:
This is nice!!! Thank you.
(I will work on this and other review comments tomorrow. Didn't realize the
difference between "Add single comment" and "start review" in previous comment)
--
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]