damccorm commented on code in PR #34738:
URL: https://github.com/apache/beam/pull/34738#discussion_r2136353909
##########
runners/google-cloud-dataflow-java/src/main/java/org/apache/beam/runners/dataflow/DataflowMetrics.java:
##########
@@ -206,12 +210,21 @@ private StringSetResult getStringSetValue(MetricUpdate
metricUpdate) {
}
private BoundedTrieResult getBoundedTrieValue(MetricUpdate metricUpdate) {
- if (metricUpdate.getTrie() == null) {
+ BoundedTrieData trieData = null;
+ Object trieFromResponse = metricUpdate.getBoundedTrie();
+ // Fail-safely cast Trie returned by dataflow API to BoundedTrieResult
+ if (trieFromResponse instanceof BoundedTrie) {
+ BoundedTrie bTrie = (BoundedTrie) metricUpdate.getBoundedTrie();
+ trieData = BoundedTrieData.fromProto(bTrie);
Review Comment:
Could this just be `trieData = BoundedTrieData.fromProto((BoundedTrie)
trieFromResponse);`
--
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]