DRILL-7056: Drill fails with NPE when starting in distributed mode & …#1656
DRILL-7056: Drill fails with NPE when starting in distributed mode & …#1656kkhatua wants to merge 6 commits intoapache:masterfrom
Conversation
…31010 port is used This occurs because during the WebServer.close() , one of the tasks for clean up is to delete the temp directory which never existed. This PR's fix does a check for that.
|
@kkhatua, please add the unit test (you may use Also, in If And finally please order the methods in |
1. Reorganized WebServer code, with Drillbit context check 2. Renamed to getOrCreateTmJavaScriptDir() method 3. Added Unit test a. Checks for creation of Temp Dir for running Drillbit b. Checks for non-creation of failed Drillbit c. Check for deletion of temp directory after shutdown of Drillbit
|
@vvysotskyi |
exec/java-exec/src/main/java/org/apache/drill/exec/server/Drillbit.java
Outdated
Show resolved
Hide resolved
exec/java-exec/src/main/java/org/apache/drill/exec/server/rest/WebServer.java
Outdated
Show resolved
Hide resolved
exec/java-exec/src/main/java/org/apache/drill/exec/server/rest/WebServer.java
Outdated
Show resolved
Hide resolved
exec/java-exec/src/test/java/org/apache/drill/test/TestWebServerTempDir.java
Outdated
Show resolved
Hide resolved
* Unit Test merged into TestGracefulShutdown class * Leveraged reflections to get handle on WebServer's temp directory * Removed unnecessary File delete calls
|
@vvysotskyi please review the changes. I've merged the test into Graceful Shutdown tests as that class was the closest in terms of what we are testing. |
exec/java-exec/src/test/java/org/apache/drill/test/TestGracefulShutdown.java
Outdated
Show resolved
Hide resolved
exec/java-exec/src/test/java/org/apache/drill/test/TestGracefulShutdown.java
Outdated
Show resolved
Hide resolved
exec/java-exec/src/test/java/org/apache/drill/test/TestGracefulShutdown.java
Outdated
Show resolved
Hide resolved
|
@vvysotskyi Done |
exec/java-exec/src/test/java/org/apache/drill/test/TestGracefulShutdown.java
Outdated
Show resolved
Hide resolved
|
Updated the PR. |
3520461 to
064cb60
Compare
vvysotskyi
left a comment
There was a problem hiding this comment.
Thanks for making changes, +1
…31010 port is used closes apache#1656
…31010 port is used closes apache#1656
…31010 port is used
This occurs because during the WebServer.close() , one of the tasks for clean up is to delete the temp directory which never existed. This PR's fix does a check for that.