xingbin
xingbin

Reputation: 28269

Two data streams in one flink job

I have two infinite kafka data streams in one flink job, like this:

StreamExecutionEnvironment environment = StreamExecutionEnvironment.getExecutionEnvironment();
DataStream kafka1 = ...
DataStream kafka2 = ...

kafka1.process();
kafka2.process();

environment.execute();

Does the process of the two streams are parallel or in sequence?

Upvotes: 1

Views: 200

Answers (1)

Antonio Miranda
Antonio Miranda

Reputation: 245

If only use one environment, the task will run in parallel.

Upvotes: 1

Related Questions