Skip to content

Commit ca81bb3

Browse files
committed
optimized code
1 parent d9fb247 commit ca81bb3

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

flink-cdc-cli/src/main/java/org/apache/flink/cdc/cli/CliFrontend.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -134,11 +134,11 @@ private static org.apache.flink.configuration.Configuration loadAndMergeFlinkCon
134134
// --use-mini-cluster
135135
Properties commandLineProperties = commandLine.getOptionProperties(FLINK_CONFIG.getOpt());
136136
// Use "remote" as the default target
137-
flinkConfig.set(
138-
DeploymentOptions.TARGET, commandLine.getOptionValue(TARGET, RemoteExecutor.NAME));
139-
if (commandLine.hasOption(USE_MINI_CLUSTER)) {
140-
flinkConfig.set(DeploymentOptions.TARGET, LocalExecutor.NAME);
141-
}
137+
String target =
138+
commandLine.hasOption(USE_MINI_CLUSTER)
139+
? LocalExecutor.NAME
140+
: commandLine.getOptionValue(TARGET, RemoteExecutor.NAME);
141+
flinkConfig.set(DeploymentOptions.TARGET, target);
142142
LOG.info("Dynamic flink config items found from command-line: {}", commandLineProperties);
143143
commandLineProperties
144144
.stringPropertyNames()

0 commit comments

Comments
 (0)