THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
public interface CommittableAggregator<CommT> {
/**
* Computes a key for a committable to determine the distribution from sink writers across downstream aggregators.
*
* @return the key derived from the committable
*/
default <KEY> Optional<KeySelector<CommT, KEY>> getPreAggregateSelector() {
return Optional.empty();
}
/**
* Computes a key for a committable to determine the distribution across downstream committers.
*
* @return the key derived from the committable
*/
default <KEY> Optional<KeySelector<CommT, KEY>> getPostAggregateSelector() {
return Optional.empty();
}
/**
* Sets the parallelism of the committable aggregator.
*
* @return empty defaults to the overall job parallelism or the parallelism to use
*/
default OptionalInt getParallelism() {
return OptionalInt.empty();
}
/**
* Aggregates the committables emitted by the {@link SinkWriter}s and emits a new set of
* committables to the downstream committers.
*
* @param committables committables sent by the {@link SinkWriter}s.
* @return committables forwarded to the committers
*/
List<CommT> aggregate(List<CommT> committables);
} |
...