Class SketchFrequencies.GlobalSketch<InputT>

  • Type Parameters:
    InputT - the type of the elements in the input PCollection
    All Implemented Interfaces:
    java.io.Serializable, org.apache.beam.sdk.transforms.display.HasDisplayData
    Enclosing class:
    SketchFrequencies

    public abstract static class SketchFrequencies.GlobalSketch<InputT>
    extends org.apache.beam.sdk.transforms.PTransform<org.apache.beam.sdk.values.PCollection<InputT>,​org.apache.beam.sdk.values.PCollection<SketchFrequencies.Sketch<InputT>>>
    Implementation of SketchFrequencies.globally().
    See Also:
    Serialized Form
    • Field Summary

      • Fields inherited from class org.apache.beam.sdk.transforms.PTransform

        annotations, displayData, name, resourceHints
    • Constructor Summary

      Constructors 
      Constructor Description
      GlobalSketch()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      org.apache.beam.sdk.values.PCollection<SketchFrequencies.Sketch<InputT>> expand​(org.apache.beam.sdk.values.PCollection<InputT> input)  
      SketchFrequencies.GlobalSketch<InputT> withConfidence​(double conf)
      Sets the confidence value, i.e.
      SketchFrequencies.GlobalSketch<InputT> withRelativeError​(double eps)
      Sets the relative error epsilon.
      • Methods inherited from class org.apache.beam.sdk.transforms.PTransform

        addAnnotation, compose, compose, getAdditionalInputs, getAnnotations, getDefaultOutputCoder, getDefaultOutputCoder, getDefaultOutputCoder, getKindString, getName, getResourceHints, populateDisplayData, setDisplayData, setResourceHints, toString, validate, validate
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • GlobalSketch

        public GlobalSketch()
    • Method Detail

      • withRelativeError

        public SketchFrequencies.GlobalSketch<InputT> withRelativeError​(double eps)
        Sets the relative error epsilon.

        Keep in mind that the lower the epsilon value, the greater the width.

        Parameters:
        eps - the error relative to the total number of distinct elements
      • withConfidence

        public SketchFrequencies.GlobalSketch<InputT> withConfidence​(double conf)
        Sets the confidence value, i.e. the probability that the relative error is lower or equal to epsilon.

        Keep in mind that the greater the confidence, the greater the depth.

        Parameters:
        conf - the confidence in the result to not exceed the relative error