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

Google Cloud Dataflow SDK for Java, version 1.9.1

Class ApproximateUnique.ApproximateUniqueCombineFn.LargestUnique

  • java.lang.Object
    • Constructor Detail

      • LargestUnique

        public LargestUnique(long sampleSize)
        Creates a heap to track the largest sampleSize elements.
        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.