gong commented on code in PR #3554:
URL: https://github.com/apache/incubator-inlong/pull/3554#discussion_r844620734
##########
inlong-manager/manager-plugins/src/main/java/org/apache/inlong/manager/plugin/flink/FlinkService.java:
##########
@@ -63,16 +70,41 @@
private final Integer parallelism;
private final String savepointDirectory;
- public FlinkService() throws IOException {
+ public FlinkService(String endpoint) throws IOException {
FlinkConfiguration flinkConfiguration = new FlinkConfiguration();
flinkConfig = flinkConfiguration.getFlinkConfig();
- address = flinkConfig.getAddress();
- port = flinkConfig.getPort();
jobManagerPort = flinkConfig.getJobManagerPort();
parallelism = flinkConfig.getParallelism();
savepointDirectory = flinkConfig.getSavepointDirectory();
+ if (endpoint.length() == 0) {
+ address = flinkConfig.getAddress();
+ port = flinkConfig.getPort();
+ } else {
+ address = translateFromEndpont(endpoint).get("address");
+ port = Integer.valueOf(translateFromEndpont(endpoint).get("port"));
Review Comment:
`port` use string data type directly. Not to transform int data type. It is
redundancy.
--
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]