kgyrtkirk commented on a change in pull request #784: HIVE-22235 CommandProcessorResponse should not be an exception URL: https://github.com/apache/hive/pull/784#discussion_r332935605
########## File path: ql/src/java/org/apache/hadoop/hive/ql/DriverState.java ########## @@ -86,16 +86,35 @@ public void compiling() { driverState = State.COMPILING; } + public void compilingWithLocking() { + lock(); + try { + driverState = State.COMPILING; + } finally { + unlock(); + } + } + public boolean isCompiling() { return driverState == State.COMPILING; } - public void compilationInterrupted(boolean deferClose) { - driverState = deferClose ? State.EXECUTING : State.ERROR; + public void compilationInterruptedWithLocking(boolean deferClose) { Review comment: I don't really see these methods really usefull how about a single method named "transition(newState)" then the control logic: "wasError" / "deferClose" can be left outside ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org For additional commands, e-mail: gitbox-h...@hive.apache.org