/** Returns the tuple tag at the given index. */ public TupleTag<?> getTag(int index) { return tupleTagList.get(index); }
@ProcessElement public void processElement(@Element X input, MultiOutputReceiver r) { int partition = partitionFn.partitionFor(input, numPartitions); if (0 <= partition && partition < numPartitions) { @SuppressWarnings("unchecked") TupleTag<X> typedTag = (TupleTag<X>) outputTags.get(partition); r.get(typedTag).output(input); } else { throw new IndexOutOfBoundsException( "Partition function returned out of bounds index: " + partition + " not in [0.." + numPartitions + ")"); } }