dvjyothsna 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_r235181861
 
 

 ##########
 File path: 
exec/java-exec/src/main/java/org/apache/drill/exec/work/WorkManager.java
 ##########
 @@ -433,6 +442,22 @@ public void run() {
     public StatusThread() {
       // assume this thread is created by a non-daemon thread
       setName("WorkManager.StatusThread");
+  }
+  private void pollShutdown(Drillbit drillbit) throws IOException, 
InterruptedException {
+      final Path path = 
FileSystems.getDefault().getPath(System.getenv("DRILL_PID_DIR"));
+      try (final WatchService watchService = 
FileSystems.getDefault().newWatchService()) {
+        path.register(watchService, StandardWatchEventKinds.ENTRY_MODIFY, 
StandardWatchEventKinds.ENTRY_CREATE);
+        while (true) {
+          final WatchKey wk = watchService.take();
 
 Review comment:
   @sohami I have made the changes based on your comments. Please let me know 
if you have any comments.

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


With regards,
Apache Git Services

Reply via email to