Skip to content

Commit

Permalink
[BEAM-1095] Add support set config for reuse-object on flink
Browse files Browse the repository at this point in the history
fix codestyle
  • Loading branch information
xhumanoid committed Dec 6, 2016
1 parent 8ae2441 commit a000ed3
Showing 1 changed file with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -159,10 +159,11 @@ private ExecutionEnvironment createBatchExecutionEnvironment() {
// set parallelism in the options (required by some execution code)
options.setParallelism(flinkBatchEnv.getParallelism());

if (options.getReuseObject())
if (options.getReuseObject()) {
flinkBatchEnv.getConfig().enableObjectReuse();
else
} else {
flinkBatchEnv.getConfig().disableObjectReuse();
}

return flinkBatchEnv;
}
Expand Down Expand Up @@ -202,10 +203,11 @@ private StreamExecutionEnvironment createStreamExecutionEnvironment() {
// set parallelism in the options (required by some execution code)
options.setParallelism(flinkStreamEnv.getParallelism());

if (options.getReuseObject())
if (options.getReuseObject()) {
flinkStreamEnv.getConfig().enableObjectReuse();
else
} else {
flinkStreamEnv.getConfig().disableObjectReuse();
}

// default to event time
flinkStreamEnv.setStreamTimeCharacteristic(TimeCharacteristic.EventTime);
Expand Down

0 comments on commit a000ed3

Please sign in to comment.