Github user sohami commented on a diff in the pull request:
https://github.com/apache/drill/pull/1217#discussion_r182302719
--- Diff:
exec/java-exec/src/main/java/org/apache/drill/exec/server/Drillbit.java ---
@@ -225,14 +225,18 @@ public synchronized void close() {
}
final Stopwatch w = Stopwatch.createStarted();
logger.debug("Shutdown begun.");
- registrationHandle = coord.update(registrationHandle, State.QUIESCENT);
+ if (registrationHandle != null) {
+ registrationHandle = coord.update(registrationHandle,
State.QUIESCENT);
+ }
--- End diff --
may be create a private method like `UpdateState(State newState)` and
encapsulate null check in that method
---