HUE-9089 [editor] close_statement should close the statement.

Review Request #14569 — Created Dec. 4, 2019 and submitted

jgauthier
hue
master
HUE-9089
hue
jgauthier, johan, ranade, romain, weixia, yingc
commit 9790ceee786ee490df14039883e8bd8c02a0a0eb
Author: Jean-Francois Desjeans Gauthier <jf.desjeans.gauthier@gmail.com>
Date:   Wed Dec 4 11:04:04 2019 -0800

    HUE-9089 [editor] close_statement should close the statement.
    
    When CLOSE_QUERIES is true, Hue will close queries when the user leaves
    the page. However, when CLOSE_QUERIES is false, it also prevents a user
    from closing a query and this is incorrect.

:100644 100644 1b44435b91... db93a88e30... M	desktop/libs/notebook/src/notebook/connectors/hiveserver2.py


  • 0
  • 0
  • 0
  • 1
  • 1
Description From Last Updated
romain
  1. "close_statement should close the statement." --> "Allow manual close_statement even if CLOSE_QUERIES is false"?

    BTW: IIRC the default for Hive is false, does it needs to be true for LLAP or the results are persisted and they does not hold too much resources like Impala? (until we have the Task Server caching/export)

  2. If CLOSE_QUERIES is false, we are going to keep closing them though? (or do we skip sending the close statement call from the UI? if yes +1 ship it)
    (if not, this would be a problem for traditional Hive were queries should not be closed right away to not lose the results)

    1. When leaving the page, there is a check for CLOSE_QUERIES https://github.com/cloudera/hue/blob/36d69d250e6fff6d257b3167ede2dc749fd982c5/apps/beeswax/src/beeswax/templates/execute.mako#L2555 which will prevent sending close. That being said I didn't test manually.
      This change is to fix the case where after doing a query it should close the previous one. The frontend sends the request, but backend prevents it. LLAP keeps things in memory as well and we should not keep queries opened forever.

    2. So why not just set CLOSE_QUERIES to true for Hive?

  3. 
      
romain
  1. Ok I see, let's do like in the review and rely on the frontend line you put. Historically we are only seeing it now because LLAP behaves like Impala.

  2. 
      
jgauthier
Review request changed

Status: Closed (submitted)

Loading...