Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Key mapping about Stateless Operator #61

Open
maxCodeVector opened this issue Nov 29, 2020 · 0 comments
Open

Key mapping about Stateless Operator #61

maxCodeVector opened this issue Nov 29, 2020 · 0 comments

Comments

@maxCodeVector
Copy link

Since we assume that each operator has its own key, so currently, we add "keyby" after each operator except for the sink.

It is a problem when rescaling such an operator. Because in our design, rescale a stateless operator does not need synchronization. However, that will cause the operator to receive a key that does not belong to it.

In flink, when processing data, it will extract key using the code below:

		@Override
		public void emitRecord(StreamRecord<IN> record) throws Exception {
			synchronized (lock) {
				numRecordsIn.inc();
				operator.setKeyContextElement1(record);
				operator.processElement(record);
			}
		}

When receiving other's keys, an exception will be thrown.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant