Java Code Examples for org.apache.beam.sdk.values.TypeDescriptors#bytes()
The following examples show how to use
org.apache.beam.sdk.values.TypeDescriptors#bytes() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ReduceWindow.java From beam with Apache License 2.0 | 6 votes |
private ReduceWindow( @Nullable String name, UnaryFunction<InputT, ValueT> valueExtractor, @Nullable TypeDescriptor<ValueT> valueType, ReduceFunctor<ValueT, OutputT> reducer, @Nullable BinaryFunction<ValueT, ValueT, Integer> valueComparator, @Nullable Window<InputT> window, TypeDescriptor<OutputT> outputType) { super(name, outputType, e -> B_ZERO, TypeDescriptors.bytes(), window); this.reducer = requireNonNull(reducer); this.valueExtractor = valueExtractor; this.valueType = valueType; this.valueComparator = valueComparator; this.accumulatorFactory = null; this.accumulate = null; this.mergeAccumulators = null; this.outputFn = null; this.accumulatorType = null; }
Example 2
Source File: ReduceWindow.java From beam with Apache License 2.0 | 6 votes |
private ReduceWindow( @Nullable String name, UnaryFunction<InputT, ValueT> valueExtractor, @Nullable TypeDescriptor<ValueT> valueType, VoidFunction<AccT> accumulatorFactory, BinaryFunction<AccT, ValueT, AccT> accumulate, CombinableBinaryFunction<AccT> mergeAccumulators, UnaryFunction<AccT, OutputT> outputFn, @Nullable TypeDescriptor<AccT> accumulatorType, @Nullable BinaryFunction<ValueT, ValueT, Integer> valueComparator, @Nullable Window<InputT> window, TypeDescriptor<OutputT> outputType) { super(name, outputType, e -> B_ZERO, TypeDescriptors.bytes(), window); this.accumulatorFactory = requireNonNull(accumulatorFactory); this.accumulate = requireNonNull(accumulate); this.mergeAccumulators = requireNonNull(mergeAccumulators); this.outputFn = requireNonNull(outputFn); this.accumulatorType = accumulatorType; this.valueExtractor = requireNonNull(valueExtractor); this.valueType = valueType; this.valueComparator = valueComparator; this.reducer = null; }