You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@gobblin.apache.org by GitBox <gi...@apache.org> on 2022/11/22 19:58:30 UTC

[GitHub] [gobblin] arjun4084346 opened a new pull request, #3606: Clean staging

arjun4084346 opened a new pull request, #3606:
URL: https://github.com/apache/gobblin/pull/3606

   Dear Gobblin maintainers,
   
   Please accept this PR. I understand that it will not be reviewed until I have checked off all the steps below!
   
   
   ### JIRA
   - [ ] My PR addresses the following [Gobblin JIRA](https://issues.apache.org/jira/browse/GOBBLIN/) issues and references them in the PR title. For example, "[GOBBLIN-XXX] My Gobblin PR"
       - https://issues.apache.org/jira/browse/GOBBLIN-XXX
   
   
   ### Description
   - [ ] Here are some details about my PR, including screenshots (if applicable):
   
   
   ### Tests
   - [ ] My PR adds the following unit tests __OR__ does not need testing for this extremely good reason:
   
   
   ### Commits
   - [ ] My commits all reference JIRA issues in their subject lines, and I have squashed multiple commits if they address the same issue. In addition, my commits follow the guidelines from "[How to write a good git commit message](http://chris.beams.io/posts/git-commit/)":
       1. Subject is separated from body by a blank line
       2. Subject is limited to 50 characters
       3. Subject does not end with a period
       4. Subject uses the imperative mood ("add", not "adding")
       5. Body wraps at 72 characters
       6. Body explains "what" and "why", not "how"
   
   


-- 
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: dev-unsubscribe@gobblin.apache.org

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


[GitHub] [gobblin] arjun4084346 closed pull request #3606: Clean staging

Posted by GitBox <gi...@apache.org>.
arjun4084346 closed pull request #3606: Clean staging
URL: https://github.com/apache/gobblin/pull/3606


-- 
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: dev-unsubscribe@gobblin.apache.org

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


[GitHub] [gobblin] arjun4084346 commented on a diff in pull request #3606: Clean staging

Posted by GitBox <gi...@apache.org>.
arjun4084346 commented on code in PR #3606:
URL: https://github.com/apache/gobblin/pull/3606#discussion_r1029874269


##########
gobblin-runtime/src/main/java/org/apache/gobblin/runtime/AbstractJobLauncher.java:
##########
@@ -679,6 +694,7 @@ public void apply(JobListener jobListener, JobContext jobContext)
             }
           }
         }
+        jobStoppedGracefully = true;

Review Comment:
   Yes, this means that the finally got to execute in a normal way, so shutdown hook should not double try to close again.
   Did that answer your 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.

To unsubscribe, e-mail: dev-unsubscribe@gobblin.apache.org

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


[GitHub] [gobblin] arjun4084346 commented on a diff in pull request #3606: Clean staging

Posted by GitBox <gi...@apache.org>.
arjun4084346 commented on code in PR #3606:
URL: https://github.com/apache/gobblin/pull/3606#discussion_r1029819199


##########
gobblin-runtime/src/main/java/org/apache/gobblin/runtime/AbstractJobLauncher.java:
##########
@@ -439,6 +450,7 @@ public void launchJob(JobListener jobListener)
       TimingEvent launchJobTimer = this.eventSubmitter.getTimingEvent(TimingEvent.LauncherTimings.FULL_JOB_EXECUTION);
 
       try (Closer closer = Closer.create()) {
+        addShutdownHook(closer);

Review Comment:
   the closer that is created in `try` is not closed when there is a kill. `finally` blocks does not run when the jvm is abruptly stopping. Adding a shutdown hook makes sure that close is called in those cases.



-- 
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: dev-unsubscribe@gobblin.apache.org

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


[GitHub] [gobblin] ZihanLi58 commented on a diff in pull request #3606: Clean staging

Posted by GitBox <gi...@apache.org>.
ZihanLi58 commented on code in PR #3606:
URL: https://github.com/apache/gobblin/pull/3606#discussion_r1029811661


##########
gobblin-runtime/src/main/java/org/apache/gobblin/runtime/AbstractJobLauncher.java:
##########
@@ -439,6 +450,7 @@ public void launchJob(JobListener jobListener)
       TimingEvent launchJobTimer = this.eventSubmitter.getTimingEvent(TimingEvent.LauncherTimings.FULL_JOB_EXECUTION);
 
       try (Closer closer = Closer.create()) {
+        addShutdownHook(closer);

Review Comment:
   what's the shutdown hook doing here? Seems like the closer is created in the try clause which should be automatically closed? Am I missing any thing here?



-- 
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: dev-unsubscribe@gobblin.apache.org

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


[GitHub] [gobblin] ZihanLi58 commented on a diff in pull request #3606: Clean staging

Posted by GitBox <gi...@apache.org>.
ZihanLi58 commented on code in PR #3606:
URL: https://github.com/apache/gobblin/pull/3606#discussion_r1029841357


##########
gobblin-runtime/src/main/java/org/apache/gobblin/runtime/AbstractJobLauncher.java:
##########
@@ -679,6 +694,7 @@ public void apply(JobListener jobListener, JobContext jobContext)
             }
           }
         }
+        jobStoppedGracefully = true;

Review Comment:
   We should set this in final block? 



-- 
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: dev-unsubscribe@gobblin.apache.org

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