yuxiqian commented on code in PR #3823:
URL: https://github.com/apache/flink-cdc/pull/3823#discussion_r1904935262
##########
flink-cdc-cli/src/test/java/org/apache/flink/cdc/cli/CliFrontendTest.java:
##########
@@ -145,6 +147,86 @@ void testPipelineExecuting() throws Exception {
assertThat(executionInfo.getDescription()).isEqualTo("fake-description");
}
+ @Test
+ void testPipelineExecutingWithFlinkConfig() throws Exception {
+ // the command line arguments to submit job to exists remote host on
yarn session
+ CliExecutor executor =
+ createExecutor(
+ pipelineDef(),
+ "--flink-home",
+ flinkHome(),
+ "--global-config",
+ globalPipelineConfig(),
+ "-D",
+ "execution.target= yarn-session",
+ "-D",
+ "rest.bind-port =42689",
+ "-D",
+ "yarn.application.id=application_1714009558476_3563",
+ "-D",
+ "rest.bind-address=10.1.140.140");
+ Map<String, String> configMap = executor.getFlinkConfig().toMap();
+ assertThat(configMap)
+ .containsEntry("execution.target", "yarn-session")
+ .containsEntry("rest.bind-port", "42689")
+ .containsEntry("yarn.application.id",
"application_1714009558476_3563")
+ .containsEntry("rest.bind-address", "10.1.140.140");
+ }
+
+ @Test
+ void testPipelineExecutingWithUnValidFlinkConfig() throws Exception {
+ IllegalArgumentException exception =
+ Assert.assertThrows(
Review Comment:
It's not recommended to mix AssertJ and JUnit style Assert together. Prefer
using `Assertions.assertThatThrownBy`, `isExactlyInstanceof`, and `hasMessage`
##########
flink-cdc-cli/src/main/java/org/apache/flink/cdc/cli/CliFrontendOptions.java:
##########
@@ -94,6 +94,15 @@ public class CliFrontendOptions {
+ "program that was part of the program
when the savepoint was triggered.")
.build();
+ public static final Option FLINK_CONFIG =
+ Option.builder("D")
+ .longOpt("flink-config")
+ .hasArg()
+ .desc(
+ "<property=value>. Allows specifying multiple
flink generic configuration options. The available"
+ + "options can be found at
https://nightlies.apache.org/flink/flink-docs-stable/ops/config.html")
+ .build();
Review Comment:
Seems we can declare option like
[this](https://github.com/apache/flink/blob/f0c8f18ee09297c4c92b36d8ce7d0e0259f80178/flink-table/flink-sql-client/src/main/java/org/apache/flink/table/client/cli/CliOptionsParser.java#L73-L80)
to get rid of the hassle about splitting & parsing KvPairs.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]