[
https://issues.apache.org/jira/browse/DRILL-6877?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16711315#comment-16711315
]
ASF GitHub Bot commented on DRILL-6877:
---------------------------------------
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. Or what will happen if
`DRILL_HOME` is incorrectly set?
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:
[email protected]
> NPE when starting Drill
> -----------------------
>
> Key: DRILL-6877
> URL: https://issues.apache.org/jira/browse/DRILL-6877
> Project: Apache Drill
> Issue Type: Bug
> Affects Versions: 1.15.0
> Reporter: Arina Ielchiieva
> Assignee: Venkata Jyothsna Donapati
> Priority: Blocker
> Fix For: 1.15.0
>
>
> Regression after DRILL-6039, Drill start with NPE:
> {noformat}
> >sqlline.bat -u "jdbc:drill:zk=local"
> DRILL_ARGS - " -u jdbc:drill:zk=local"
> Calculating HADOOP_CLASSPATH ...
> HBASE_HOME not detected...
> Calculating Drill classpath...
> Exception in thread "Thread-20" java.lang.NullPointerException
> at sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:98)
> at sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:77)
> at sun.nio.fs.WindowsPath.parse(WindowsPath.java:94)
> at sun.nio.fs.WindowsFileSystem.getPath(WindowsFileSystem.java:255)
> at
> org.apache.drill.exec.server.Drillbit$GracefulShutdownThread.pollShutdown(Drillbit.java:377)
> at
> org.apache.drill.exec.server.Drillbit$GracefulShutdownThread.run(Drillbit.java:368)
> Apache Drill 1.15.0-SNAPSHOT
> "JSON ain't no thang."
> {noformat}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)