Sahil Takiar has uploaded this change for review. ( 
http://gerrit.cloudera.org:8080/14744


Change subject: IMPALA-6894: Use an internal representation of query states in 
ClientRequestState
......................................................................

IMPALA-6894: Use an internal representation of query states in 
ClientRequestState

Re-factors the state machine of ClientRequestState so that it uses an
internal state represetation rather than using the one defined by
TOperationState. The possible states are defined in
ClientRequestState::ExecState and the possible state transitions are
outlined in client-request-state.h and enforced in
ClientRequestState::UpdateNonErrorExecState. The states defined in
ClientRequestState::ExecState are the same states currently used in
TOperationState. This patch simply makes it easy to define new states
in the future.

The value of ClientRequestState::ExecState is exposed to clients via the
entry "Impala Query State" in the runtime profile. It is meant to be the
Impala specific version of "Query State" (which is the Beeswax state).
This allows Impala to expose its internal state without breaking existing
clients that might rely on the value of "Query State".

Additional Bug Fixes:
* Fixed a possible race condition where a query could transition from
RUNNING to PENDING
* The ClientRequestState state is now tracked using an AtomicEnum, which
fixes a few possible race conditions where the state was being read
without holding the ClientRequestState::lock_

Testing:
* Ran core tests
* Added test to make sure "Impala Query State" is populated

Change-Id: I1ce70bd2e964b309ebfc9d6ff6d900485db4d630
---
M be/src/service/client-request-state.cc
M be/src/service/client-request-state.h
M be/src/service/impala-beeswax-server.cc
M be/src/service/impala-hs2-server.cc
M be/src/service/impala-http-handler.cc
M be/src/service/impala-server.cc
M tests/query_test/test_observability.py
7 files changed, 123 insertions(+), 71 deletions(-)



  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/44/14744/1
--
To view, visit http://gerrit.cloudera.org:8080/14744
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I1ce70bd2e964b309ebfc9d6ff6d900485db4d630
Gerrit-Change-Number: 14744
Gerrit-PatchSet: 1
Gerrit-Owner: Sahil Takiar <stak...@cloudera.com>

Reply via email to