drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] arina-ielchiieva commented on a change in pull request #1560: DRILL-6877: NPE when starting Drill on Windows
Date Thu, 06 Dec 2018 07:59:30 GMT
arina-ielchiieva commented on a change in pull request #1560: DRILL-6877: NPE when starting
Drill on Windows
URL: https://github.com/apache/drill/pull/1560#discussion_r239355853
 
 

 ##########
 File path: exec/java-exec/src/main/java/org/apache/drill/exec/server/Drillbit.java
 ##########
 @@ -374,17 +374,22 @@ public void run () {
     }
 
     private void pollShutdown(Drillbit drillbit) throws IOException, InterruptedException
{
-      final Path drillPidDirPath = FileSystems.getDefault().getPath(System.getenv("DRILL_PID_DIR"));
-      final String gracefulFileName = System.getenv("GRACEFUL_SIGFILE");
+      final String drillHome = System.getenv("DRILL_HOME");
+      final String gracefulFile = System.getenv("GRACEFUL_SIGFILE");
+      if (drillHome == null || gracefulFile == null) {
+        logger.warn("Cannot access graceful file. Graceful shutdown from command line will
not be supported.");
+        return;
+      }
+      final Path drillHomePath = Paths.get(drillHome);
 
 Review comment:
   1. We might check if `drillHomePath` actually exists and reachable and issue a warning
rather than fail if something is going wrong.
   2. Please update PR and commit error description, it turned out NPE exists on other systems
as well (just remove `on Windows part`).

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message