Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

As a result, the mapping of a key to a KeyGroup could be established inside the Source Operator, but the problem is that we have to pass down the key group of a record to the downstream operators with the record itself together within the SourceTask. One solution is that we can create a new class called KeyedStreamRecord, which wrap the StreamRecord with a new field, KeyGroup.

Code Block
languagejava
titleKeyedStreamRecord
/**
 * A stream record containing the keyed information.
 *
 * @param <T> The type encapsulated with the stream record.
 */
@Internal
public class KeyedStreamRecord<T> extends StreamRecord<T> {
	private int keyGroup;
}

...