You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zeppelin.apache.org by GitBox <gi...@apache.org> on 2021/05/17 14:07:32 UTC

[GitHub] [zeppelin] zjffdu opened a new pull request #4120: [ZEPPELIN-5374] Don't update paragraph config when latest checkpoint of flink is unchanged

zjffdu opened a new pull request #4120:
URL: https://github.com/apache/zeppelin/pull/4120


   ### What is this PR for?
   
   Simple PR to check whether the current latest checkpoint is changed, only update paragraph config when it is changed. 
   
   ### What type of PR is it?
   [Improvement ]
   
   ### Todos
   * [ ] - Task
   
   ### What is the Jira issue?
   * https://issues.apache.org/jira/browse/ZEPPELIN-5374
   
   ### How should this be tested?
   * CI pass
   
   ### Screenshots (if appropriate)
   
   ### Questions:
   * Does the licenses files need update? No
   * Is there breaking changes for older versions? No
   * Does this needs documentation? No
   


-- 
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.

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



[GitHub] [zeppelin] zjffdu closed pull request #4120: [ZEPPELIN-5374] Don't update paragraph config when latest checkpoint of flink is unchanged

Posted by GitBox <gi...@apache.org>.
zjffdu closed pull request #4120:
URL: https://github.com/apache/zeppelin/pull/4120


   


-- 
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.

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



[GitHub] [zeppelin] zjffdu commented on pull request #4120: [ZEPPELIN-5374] Don't update paragraph config when latest checkpoint of flink is unchanged

Posted by GitBox <gi...@apache.org>.
zjffdu commented on pull request #4120:
URL: https://github.com/apache/zeppelin/pull/4120#issuecomment-849326934


   Will merge if no more comment


-- 
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.

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



[GitHub] [zeppelin] zjffdu commented on a change in pull request #4120: [ZEPPELIN-5374] Don't update paragraph config when latest checkpoint of flink is unchanged

Posted by GitBox <gi...@apache.org>.
zjffdu commented on a change in pull request #4120:
URL: https://github.com/apache/zeppelin/pull/4120#discussion_r634877594



##########
File path: flink/interpreter/src/main/java/org/apache/zeppelin/flink/JobManager.java
##########
@@ -254,11 +255,12 @@ public void run() {
               if (completedObject.has("external_path")) {
                 String checkpointPath = completedObject.getString("external_path");
                 LOGGER.debug("Latest checkpoint path: {}", checkpointPath);
-                if (!StringUtils.isBlank(checkpointPath)) {
+                if (!StringUtils.isBlank(checkpointPath) && !checkpointPath.equals(latestCheckpointPath)) {

Review comment:
       Actually here 2 not is more readable. The if condition is when checkpoint is not null and it is not the same as latestCheckpointPath. 
   If I change it to 1 not, it is a little harder to understand what the if condition means 




-- 
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.

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



[GitHub] [zeppelin] cuspymd commented on a change in pull request #4120: [ZEPPELIN-5374] Don't update paragraph config when latest checkpoint of flink is unchanged

Posted by GitBox <gi...@apache.org>.
cuspymd commented on a change in pull request #4120:
URL: https://github.com/apache/zeppelin/pull/4120#discussion_r634442983



##########
File path: flink/interpreter/src/main/java/org/apache/zeppelin/flink/JobManager.java
##########
@@ -254,11 +255,12 @@ public void run() {
               if (completedObject.has("external_path")) {
                 String checkpointPath = completedObject.getString("external_path");
                 LOGGER.debug("Latest checkpoint path: {}", checkpointPath);
-                if (!StringUtils.isBlank(checkpointPath)) {
+                if (!StringUtils.isBlank(checkpointPath) && !checkpointPath.equals(latestCheckpointPath)) {

Review comment:
       It seems that using the operator "not (!)" only once is good for readability.
   ```suggestion
                   if (!(StringUtils.isBlank(checkpointPath) || checkpointPath.equals(latestCheckpointPath))) {
   ```




-- 
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.

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



[GitHub] [zeppelin] zjffdu closed pull request #4120: [ZEPPELIN-5374] Don't update paragraph config when latest checkpoint of flink is unchanged

Posted by GitBox <gi...@apache.org>.
zjffdu closed pull request #4120:
URL: https://github.com/apache/zeppelin/pull/4120


   


-- 
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.

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