InputT - the type of the elements in the input PCollectionpublic static class SketchFrequencies.CountMinSketchFn<InputT> extends org.apache.beam.sdk.transforms.Combine.CombineFn<InputT,SketchFrequencies.Sketch<InputT>,SketchFrequencies.Sketch<InputT>>
Combine.CombineFn of SketchFrequencies transforms.| Modifier and Type | Method and Description |
|---|---|
SketchFrequencies.Sketch<InputT> |
addInput(SketchFrequencies.Sketch<InputT> accumulator,
InputT element) |
static <InputT> SketchFrequencies.CountMinSketchFn<InputT> |
create(org.apache.beam.sdk.coders.Coder<InputT> coder)
Returns a
SketchFrequencies.CountMinSketchFn combiner with the given input coder. |
SketchFrequencies.Sketch<InputT> |
createAccumulator() |
SketchFrequencies.Sketch<InputT> |
extractOutput(SketchFrequencies.Sketch<InputT> accumulator)
Output the whole structure so it can be queried, reused or stored easily.
|
org.apache.beam.sdk.coders.Coder<SketchFrequencies.Sketch<InputT>> |
getAccumulatorCoder(org.apache.beam.sdk.coders.CoderRegistry registry,
org.apache.beam.sdk.coders.Coder inputCoder) |
SketchFrequencies.Sketch<InputT> |
mergeAccumulators(java.lang.Iterable<SketchFrequencies.Sketch<InputT>> accumulators) |
void |
populateDisplayData(org.apache.beam.sdk.transforms.display.DisplayData.Builder builder) |
SketchFrequencies.CountMinSketchFn<InputT> |
withAccuracy(double epsilon,
double confidence)
Returns a new
SketchFrequencies.CountMinSketchFn combiner with new precision accuracy parameters epsilon and confidence. |
public static <InputT> SketchFrequencies.CountMinSketchFn<InputT> create(org.apache.beam.sdk.coders.Coder<InputT> coder)
SketchFrequencies.CountMinSketchFn combiner with the given input coder. coder - the coder that encodes the elements' typepublic SketchFrequencies.CountMinSketchFn<InputT> withAccuracy(double epsilon, double confidence)
SketchFrequencies.CountMinSketchFn combiner with new precision accuracy parameters epsilon and confidence.
Keep in mind that the lower the epsilon value, the greater the width, and the
greater the confidence, the greater the depth.
epsilon - the error relative to the total number of distinct elementsconfidence - the confidence in the result to not exceed the relative errorpublic SketchFrequencies.Sketch<InputT> createAccumulator()
createAccumulator in class org.apache.beam.sdk.transforms.Combine.CombineFn<InputT,SketchFrequencies.Sketch<InputT>,SketchFrequencies.Sketch<InputT>>public SketchFrequencies.Sketch<InputT> addInput(SketchFrequencies.Sketch<InputT> accumulator, InputT element)
addInput in class org.apache.beam.sdk.transforms.Combine.CombineFn<InputT,SketchFrequencies.Sketch<InputT>,SketchFrequencies.Sketch<InputT>>public SketchFrequencies.Sketch<InputT> mergeAccumulators(java.lang.Iterable<SketchFrequencies.Sketch<InputT>> accumulators)
mergeAccumulators in class org.apache.beam.sdk.transforms.Combine.CombineFn<InputT,SketchFrequencies.Sketch<InputT>,SketchFrequencies.Sketch<InputT>>public SketchFrequencies.Sketch<InputT> extractOutput(SketchFrequencies.Sketch<InputT> accumulator)
extractOutput in class org.apache.beam.sdk.transforms.Combine.CombineFn<InputT,SketchFrequencies.Sketch<InputT>,SketchFrequencies.Sketch<InputT>>public org.apache.beam.sdk.coders.Coder<SketchFrequencies.Sketch<InputT>> getAccumulatorCoder(org.apache.beam.sdk.coders.CoderRegistry registry, org.apache.beam.sdk.coders.Coder inputCoder)
getAccumulatorCoder in interface org.apache.beam.sdk.transforms.CombineFnBase.GlobalCombineFn<InputT,SketchFrequencies.Sketch<InputT>,SketchFrequencies.Sketch<InputT>>getAccumulatorCoder in class org.apache.beam.sdk.transforms.Combine.CombineFn<InputT,SketchFrequencies.Sketch<InputT>,SketchFrequencies.Sketch<InputT>>public void populateDisplayData(org.apache.beam.sdk.transforms.display.DisplayData.Builder builder)
populateDisplayData in interface org.apache.beam.sdk.transforms.display.HasDisplayDatapopulateDisplayData in class org.apache.beam.sdk.transforms.Combine.CombineFn<InputT,SketchFrequencies.Sketch<InputT>,SketchFrequencies.Sketch<InputT>>