[ 
https://issues.apache.org/jira/browse/DRILL-6039?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16695120#comment-16695120
 ] 

ASF GitHub Bot commented on DRILL-6039:
---------------------------------------

sohami commented on a change in pull request #1536: DRILL-6039: Fixed 
drillbit.sh script to do graceful shutdown
URL: https://github.com/apache/drill/pull/1536#discussion_r235490503
 
 

 ##########
 File path: 
exec/java-exec/src/main/java/org/apache/drill/exec/server/Drillbit.java
 ##########
 @@ -335,6 +351,50 @@ private void javaPropertiesToSystemOptions() {
     }
   }
 
+
+  // Polls for graceful file to check if graceful shutdown is triggered from 
the script.
+  private static class PollShutdownThread extends Thread {
+
+    private final Drillbit drillbit;
+    private final StackTrace stackTrace;
+
+    public PollShutdownThread(final Drillbit drillbit, final StackTrace 
stackTrace) {
+      this.drillbit = drillbit;
+      this.stackTrace = stackTrace;
+    }
+
+    @Override
+    public void run () {
+      try {
+        pollShutdown(drillbit);
+      } catch (Exception e) {
+        throw new RuntimeException("Caught exception while polling for 
shutdown\n" + stackTrace, e);
+      }
+    }
+
+    private void pollShutdown(Drillbit drillbit) throws IOException, 
InterruptedException {
 
 Review comment:
   please rename all the variables to be something else rather than using the 
type for name. Like 
   `path-->drillPidDirPath`
   `file-->gracefulFileName`

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


> drillbit.sh graceful_stop does not wait for fragments to complete before 
> stopping the drillbit
> ----------------------------------------------------------------------------------------------
>
>                 Key: DRILL-6039
>                 URL: https://issues.apache.org/jira/browse/DRILL-6039
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Execution - Flow
>    Affects Versions: 1.3.0
>            Reporter: Krystal
>            Assignee: Venkata Jyothsna Donapati
>            Priority: Major
>             Fix For: 1.15.0
>
>
> git.commit.id.abbrev=eb0c403
> I have 3-nodes cluster with drillbits running on each node.  I kicked off a 
> long running query.  In the middle of the query, I did a "./drillbit.sh 
> graceful_stop" on one of the non-foreman node.  The node was stopped within a 
> few seconds and the query failed with error:
> Error: SYSTEM ERROR: IOException: Filesystem closed
> Fragment 4:15



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to