Riza Suminto has uploaded this change for review. ( 
http://gerrit.cloudera.org:8080/22853


Change subject: IMPALA-14028: Refactor cancel_query_and_validate_state with 
Impyla
......................................................................

IMPALA-14028: Refactor cancel_query_and_validate_state with Impyla

cancel_query_and_validate_state is a helper method used to test query
cancellation with concurrent fetch. It is still use beeswax client by
default.

Ideally, we should change this test to use HS2 protocol by default. But
ImpylaHS2Connection, a wrapper of Impyla, is not thread safe. This patch
refactor cancel_query_and_validate_state in following ways:

1. Implement HS2_OPERATION_RETURN_IF_ERROR. Similar like
   HS2_RETURN_IF_ERROR, but additionally set operationState to
   TOperationState::ERROR_STATE.
2. Make client operation such as execute_async, fetch, cancel,
   get_runtime_profile mutually exclusive.
3. Do not attempt to fetch if there is a debug action set to prevent it
   (ie., wait GetNext indefinitely).
4. Do not attempt to fetch if query handle is error right after
   execute_async.

Testing:
Pass test_cancellation.py and TestResultSpoolingCancellation. Also fix
default_test_protocol to HS2 for these tests.

Change-Id: I626a1a06eb3d5dc9737c7d4289720e1f52d2a984
---
M be/src/service/impala-hs2-server.cc
M tests/common/impala_connection.py
M tests/query_test/test_cancellation.py
M tests/query_test/test_result_spooling.py
M tests/util/cancel_util.py
5 files changed, 190 insertions(+), 56 deletions(-)



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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I626a1a06eb3d5dc9737c7d4289720e1f52d2a984
Gerrit-Change-Number: 22853
Gerrit-PatchSet: 1
Gerrit-Owner: Riza Suminto <riza.sumi...@cloudera.com>

Reply via email to