use of com.ibm.streamsx.topology.internal.functional.window.KeyPartitioner in project streamsx.topology by IBMStreams.
the class FunctionWindow method initialize.
@Override
public void initialize(OperatorContext context) throws Exception {
super.initialize(context);
StreamWindow<Tuple> window = getInput(0).getStreamWindow();
createWindowListener(window);
if (window.isPartitioned()) {
if (getKeyGetter() == null)
throw new IllegalStateException("Missing keyGetter function");
SPLMapping<Object> input0Mapping = getInputMapping(this, 0);
Function<Object, Object> functionKeyGetter = getLogicObject(getKeyGetter());
window.registerPartitioner(new KeyPartitioner(input0Mapping, functionKeyGetter));
}
}
Aggregations