Package org.apache.beam.sdk.metrics
Interface BoundedTrie
- All Superinterfaces:
Metric
,Serializable
- All Known Implementing Classes:
BoundedTrieImpl
Internal: For internal use only and not for public consumption. This API is subject to
incompatible changes, or even removal, in a future release.
A metric that represents a bounded trie data structure. This interface extends the Metric
interface and provides methods for adding string sequences (paths) to the trie.
The trie is bounded in size (max=100), meaning it has a maximum capacity for storing paths. When the trie reaches its capacity, it truncates paths. This is useful for tracking and aggregating a large number of distinct paths while limiting memory usage. It is not necessary but recommended that parts of paths provided as strings are hierarchical in nature so the truncation reduces granularity rather than complete data loss.
-
Method Summary
-
Method Details
-
add
Adds a path to the trie. The path is represented as an iterable of string segments.- Parameters:
values
- The segments of the path to add.
-
add
Adds a path to the trie. The path is represented as a variable number of string arguments.- Parameters:
values
- The segments of the path to add.
-