GROUP_KEY
- Type of group keyGROUP_VALUE
- Type of values to groupOUT
- Type of output object@Beta public interface Aggregator<GROUP_KEY,GROUP_VALUE,OUT>
Modifier and Type | Method and Description |
---|---|
void |
aggregate(GROUP_KEY groupKey,
Iterator<GROUP_VALUE> groupValues,
Emitter<OUT> emitter)
Aggregate all objects in the same group into zero or more output objects.
|
void |
groupBy(GROUP_VALUE groupValue,
Emitter<GROUP_KEY> emitter)
Emit the group key(s) for a given input value.
|
void groupBy(GROUP_VALUE groupValue, Emitter<GROUP_KEY> emitter) throws Exception
groupValue
- the value to groupemitter
- the emitter to emit zero or more group keys for the inputException
- if there is some error getting the groupvoid aggregate(GROUP_KEY groupKey, Iterator<GROUP_VALUE> groupValues, Emitter<OUT> emitter) throws Exception
groupKey
- the key for the groupgroupValues
- an iterator over all input objects that have the same group keyemitter
- the emitter to emit aggregate values for the groupException
- if there is some error aggregatingCopyright © 2023 Cask Data, Inc. Licensed under the Apache License, Version 2.0.