ApproximateUnique.ApproximateUniqueCombineFn.LargestUnique (Google Cloud Dataflow SDK 1.9.1 API)

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
    • Constructor Detail

      • LargestUnique

        public LargestUnique(long sampleSize)
        Creates a heap to track the largest sampleSize elements.
        Parameters:
        sampleSize - the size of the heap
    • Method Detail

      • add

        public boolean add(Long value)
        Adds a value to the heap, returning whether the value is (large enough to be) in the heap.
      • extractOrderedList

        public List<Long> extractOrderedList()
        Returns the values in the heap, ordered largest to smallest.


Was this page helpful? Let us know how we did:

Send feedback about...

Cloud Dataflow