public class CombineGroupedValuesTranslatorBatch<K,InT,AccT,OutT> extends TransformTranslator<PCollection<? extends KV<K,? extends java.lang.Iterable<InT>>>,PCollection<KV<K,OutT>>,Combine.GroupedValues<K,InT,OutT>>
Combine.GroupedValues
if the Combine.CombineFn
doesn't require context /
side-inputs.
This doesn't require a Spark Aggregator
. Instead it can directly use the respective
Combine.CombineFn
to reduce each iterable of values into an aggregated output value.
TransformTranslator.Context
Constructor and Description |
---|
CombineGroupedValuesTranslatorBatch() |
Modifier and Type | Method and Description |
---|---|
boolean |
canTranslate(Combine.GroupedValues<K,InT,OutT> transform)
Checks if a composite / primitive transform can be translated.
|
protected void |
translate(Combine.GroupedValues<K,InT,OutT> transform,
TransformTranslator.Context cxt) |
windowCoder
protected void translate(Combine.GroupedValues<K,InT,OutT> transform, TransformTranslator.Context cxt) throws java.io.IOException
translate
in class TransformTranslator<PCollection<? extends KV<K,? extends java.lang.Iterable<InT>>>,PCollection<KV<K,OutT>>,Combine.GroupedValues<K,InT,OutT>>
java.io.IOException
public boolean canTranslate(Combine.GroupedValues<K,InT,OutT> transform)
TransformTranslator
This should be overridden where necessary. If a transform is know to be unsupported, this should throw a runtime exception to give early feedback before any part of the pipeline is run.
canTranslate
in class TransformTranslator<PCollection<? extends KV<K,? extends java.lang.Iterable<InT>>>,PCollection<KV<K,OutT>>,Combine.GroupedValues<K,InT,OutT>>