Google Cloud Dataflow SDK for Java, version 1.9.1
com.google.cloud.dataflow.sdk.transforms
Class ApproximateUnique.ApproximateUniqueCombineFn.LargestUnique
- java.lang.Object
-
- com.google.cloud.dataflow.sdk.transforms.ApproximateUnique.ApproximateUniqueCombineFn.LargestUnique
-
- All Implemented Interfaces:
- Serializable
- Enclosing class:
- ApproximateUnique.ApproximateUniqueCombineFn<T>
public static class ApproximateUnique.ApproximateUniqueCombineFn.LargestUnique extends Object implements Serializable
A heap utility class to efficiently track the largest added elements.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor and Description LargestUnique(long sampleSize)
Creates a heap to track the largestsampleSize
elements.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description boolean
add(Long value)
Adds a value to the heap, returning whether the value is (large enough to be) in the heap.List<Long>
extractOrderedList()
Returns the values in the heap, ordered largest to smallest.
-