You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@inlong.apache.org by GitBox <gi...@apache.org> on 2022/04/06 11:54:27 UTC

[GitHub] [incubator-inlong] LvJiancheng opened a new pull request, #3554: [INLONG-3538] [manager-plugins]adjust mode of getting sort URL

LvJiancheng opened a new pull request, #3554:
URL: https://github.com/apache/incubator-inlong/pull/3554

   ### Title Name: [INLONG-3538] [manager-plugins]adjust mode of getting sort URL
   
   where *XYZ* should be replaced by the actual issue number.
   
   Fixes #3538
   
   ### Motivation
   
   *Explain here the context, and why you're making that change. What is the problem you're trying to solve.*
   
   ### Modifications
   
   *Describe the modifications you've done.*
   
   ### Verifying this change
   
   - [ ] Make sure that the change passes the CI checks.
   
   *(Please pick either of the following options)*
   
   This change is a trivial rework / code cleanup without any test coverage.
   
   *(or)*
   
   This change is already covered by existing tests, such as *(please describe tests)*.
   
   *(or)*
   
   This change added tests and can be verified as follows:
   
   *(example:)*
     - *Added integration tests for end-to-end deployment with large payloads (10MB)*
     - *Extended integration test for recovery after broker failure*
   
   ### Documentation
   
     - Does this pull request introduce a new feature? (yes / no)
     - If yes, how is the feature documented? (not applicable / docs / JavaDocs / not documented)
     - If a feature is not applicable for documentation, explain why?
     - If a feature is not documented yet in this PR, please create a followup issue for adding the documentation
   


-- 
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: commits-unsubscribe@inlong.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-inlong] LvJiancheng commented on a diff in pull request #3554: [INLONG-3538][Manager] Adjust mode of getting sort URL

Posted by GitBox <gi...@apache.org>.
LvJiancheng commented on code in PR #3554:
URL: https://github.com/apache/incubator-inlong/pull/3554#discussion_r844750462


##########
inlong-manager/manager-plugins/src/main/java/org/apache/inlong/manager/plugin/util/FlinkUtils.java:
##########
@@ -106,6 +105,16 @@ public static String findFiles(String baseDirName,String pattern) {
         return null;
     }
 
+    /**
+     * get value
+     * @param key
+     * @param defaultValue
+     * @return
+     */
+    public static String getValue(String key, String defaultValue) {

Review Comment:
   done



-- 
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: commits-unsubscribe@inlong.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-inlong] gong commented on a diff in pull request #3554: [INLONG-3538][Manager] Adjust mode of getting sort URL

Posted by GitBox <gi...@apache.org>.
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: commits-unsubscribe@inlong.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-inlong] LvJiancheng commented on a diff in pull request #3554: [INLONG-3538][Manager] Adjust mode of getting sort URL

Posted by GitBox <gi...@apache.org>.
LvJiancheng commented on code in PR #3554:
URL: https://github.com/apache/incubator-inlong/pull/3554#discussion_r844575907


##########
inlong-manager/manager-plugins/src/main/java/org/apache/inlong/manager/plugin/flink/IntergrationTaskRunner.java:
##########
@@ -172,6 +172,12 @@ public void run() {
                         flinkInfo.setSavepointPath(savepointPath);
                         log.info("the jobId :{} status: {} ", flinkInfo.getJobId(),status);
                     }
+                    JobStatus jobStatus = flinkService.getJobStatus(flinkInfo.getJobId());
+                    if (jobStatus.isTerminalState()) {
+                        log.info("stop  job : {} status : {} ,success in backend", flinkInfo.getJobId(),jobStatus);

Review Comment:
   done



-- 
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: commits-unsubscribe@inlong.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-inlong] gong commented on a diff in pull request #3554: [INLONG-3538][Manager] Adjust mode of getting sort URL

Posted by GitBox <gi...@apache.org>.
gong commented on code in PR #3554:
URL: https://github.com/apache/incubator-inlong/pull/3554#discussion_r844621578


##########
inlong-manager/manager-plugins/src/main/java/org/apache/inlong/manager/plugin/util/FlinkUtils.java:
##########
@@ -106,6 +105,16 @@ public static String findFiles(String baseDirName,String pattern) {
         return null;
     }
 
+    /**
+     * get value
+     * @param key
+     * @param defaultValue
+     * @return
+     */
+    public static String getValue(String key, String defaultValue) {

Review Comment:
   set default `""` is redundancy. Because `FlinkService` will use value of config file to fill value by judging `endpoint` is empty.



-- 
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: commits-unsubscribe@inlong.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-inlong] healchow commented on a diff in pull request #3554: [INLONG-3538][Manager] Adjust mode of getting sort URL

Posted by GitBox <gi...@apache.org>.
healchow commented on code in PR #3554:
URL: https://github.com/apache/incubator-inlong/pull/3554#discussion_r844570744


##########
inlong-manager/manager-plugins/src/main/java/org/apache/inlong/manager/plugin/flink/IntergrationTaskRunner.java:
##########
@@ -172,6 +172,12 @@ public void run() {
                         flinkInfo.setSavepointPath(savepointPath);
                         log.info("the jobId :{} status: {} ", flinkInfo.getJobId(),status);
                     }
+                    JobStatus jobStatus = flinkService.getJobStatus(flinkInfo.getJobId());
+                    if (jobStatus.isTerminalState()) {
+                        log.info("stop  job : {} status : {} ,success in backend", flinkInfo.getJobId(),jobStatus);

Review Comment:
   Change the log info to `log.info("stop job {}, status: {}, success in backend", flinkInfo.getJobId(), jobStatus);`



##########
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) {

Review Comment:
   Use `StringUtils.isEmpty()` to check the string variable.



-- 
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: commits-unsubscribe@inlong.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-inlong] LvJiancheng commented on a diff in pull request #3554: [INLONG-3538][Manager] Adjust mode of getting sort URL

Posted by GitBox <gi...@apache.org>.
LvJiancheng commented on code in PR #3554:
URL: https://github.com/apache/incubator-inlong/pull/3554#discussion_r844572931


##########
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) {

Review Comment:
   done



-- 
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: commits-unsubscribe@inlong.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-inlong] healchow merged pull request #3554: [INLONG-3538][Manager] Adjust mode of getting sort URL

Posted by GitBox <gi...@apache.org>.
healchow merged PR #3554:
URL: https://github.com/apache/incubator-inlong/pull/3554


-- 
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: commits-unsubscribe@inlong.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org