HUE-1845 [impala] Automatic query closing

Review Request #3982 — Created Jan. 6, 2014 and submitted

enricoberti, romain
commit ecf59f642dfb37365dc5cdc1c1d5ba84a7cdbcd4
Author: Abraham Elmahrek <>
Date:   Mon Jan 6 13:50:28 2014 -0800

    HUE-1845 [impala] Automatic query closing

:100644 100644 c6fa108... 153e7a6... M	apps/beeswax/src/beeswax/
:100644 100644 b2e6716... 92bf5c3... M	apps/beeswax/src/beeswax/templates/execute.mako
:100644 100644 3470a77... dbf291b... M	apps/beeswax/src/beeswax/templates/watch_wait.mako
:100644 100644 ca9aec2... cdbe6f8... M	apps/beeswax/src/beeswax/
:100644 100644 8b55a2e... 60bd558... M	apps/beeswax/static/js/beeswax.vm.js
manually verified that queries are being closed.
Noticing an error that i think may have been in previous version of Hue as well: 
Bad status for request TGetOperationStatusReq(operationHandle=TOperationHandle(hasResultSet=True, modifiedRowCount=None, operationType=0, operationId=THandleIdentifier(secret='\\xbd<\\xcd\\xf7\\xaa\\x8dF\\xf2\\xb99\\xbc.\\xaeE\\x06v', guid='\\xbd<\\xcd\\xf7\\xaa\\x8dF\\xf2\\xb99\\xbc.\\xaeE\\x06v'))):\nTGetOperationStatusResp(status=TStatus(errorCode=None, errorMessage='Invalid query handle', sqlState='HY000', infoMessages=None, statusCode=3), operationState=None, errorMessage=None, sqlState=None, errorCode=None)
  • 0
  • 0
  • 3
  • 3
  • 6
Description From Last Updated
  1. Nice stuff!!
  2. apps/beeswax/src/beeswax/ (Diff revision 1)
    many tests are assuming 'id', so they need to be updated with 'query_id'.
    search for content['id'] for example.
    The current status of the tests is
    FAILED (SKIP=38, errors=10, failures=6)
    so check that it does not break even more 
    1. I'm just going to revert this.
  3. apps/beeswax/src/beeswax/ (Diff revision 1)
    the error is because of this. 
    The idea is to update the status of the query in the Hue DB.
    The call to impala will be invalid as the query is closed (and so the handle gone).
    We should probably add a:
      def set_to_expired(self):
        self.last_state = QueryHistory.STATE.expired.index
    in QueryHistory, then replace this line by set_to_expired() + save()
  4. apps/beeswax/src/beeswax/ (Diff revision 1)
    response['status'] = 0
  5. apps/beeswax/src/beeswax/templates/execute.mako (Diff revision 1)
    It should be only in the impala app
    1. This section of code is impala only
  6. apps/beeswax/src/beeswax/templates/execute.mako (Diff revision 1)
    it closes the previous query when we execute a new query (just to be sure :)
    1. Yep. Execute query will trigger this event.
  7. apps/beeswax/static/js/beeswax.vm.js (Diff revision 1)
    all of this is silent? (we should probably not show anything to the user in both cases)
  1. Ship It!
Review request changed

Status: Closed (submitted)