فهرست منبع

HUE-2883 [impala] Canceling a query shows an error message

With Impala, when we cancel a query and close it is is gone and users
sees a:
  Problem: Bad status for request TCancelOperationReq(operationHandle=TOperationHandle(hasResultSet=True, modifiedRowCount=None, operationType=0, operationId=THandleIdentifier(secret='\x089\x7f\xb1\x16\xaeK\xe1\x96\x99_t+\xc9\x93\x07', guid='\x089\x7f\xb1\x16\xaeK\xe1\x96\x99_t+\xc9\x93\x07'))): TCancelOperationResp(status=TStatus(errorCode=None, errorMessage='Invalid query handle', sqlState='HY000', infoMessages=None, statusCode=3))

as we fetch the status of the query. With HiveServer2 this does not error
and return a status of 'expired'.

As we don't save the new state of a canceled query, we can remove the
check for status.

We set the state to 'expired' when there was no problem during the canceling.
Romain Rigaux 10 سال پیش
والد
کامیت
cb92a35
1فایلهای تغییر یافته به همراه1 افزوده شده و 1 حذف شده
  1. 1 1
      apps/beeswax/src/beeswax/api.py

+ 1 - 1
apps/beeswax/src/beeswax/api.py

@@ -404,7 +404,7 @@ def cancel_query(request, query_history_id):
       query_history = authorized_get_query_history(request, query_history_id, must_exist=True)
       db = dbms.get(request.user, query_history.get_query_server_config())
       db.cancel_operation(query_history.get_handle())
-      _get_query_handle_and_state(query_history)
+      query_history.set_to_expired()
       response['status'] = 0
     except Exception, e:
       response['message'] = unicode(e)