HUE-4051 Have lighter Impala and Hive check configs call than list DBs

Review Request #7781 - Created June 14, 2016 and submitted

weixia xu
hue
first-fix
HUE-4051
8e1be51...
hue
enricoberti, jennykim, johan, krish, romain

commit 3fcdc1bc533f1272ce8e6a03f5a535cb0f56b152
Author: Weixia Xu <weixia@cloudera.com>
Date: Tue Jun 14 22:59:27 2016 -0700

[HTML_REMOVED] HUE-4051 Have lighter Impala and Hive check configs call than list DBs

:100644 100644 be891ce... cf3f7a3... M apps/beeswax/src/beeswax/conf.py
:100644 100644 750b82b... f2ddd0f... M apps/impala/src/impala/conf.py

Manually tested 20 times with the Open_Session() and get_databases()

API Resp time(ms) | Average of 20 tries(server log)
Impala OpenSession | 14.4 (after change)
beesWax GetSchema(w filter) | 13.9 (after change)
Impala GetSchema(w/o name filter) | 30.35 (before change)
beesWax GetSchema(w/o name filter) | 14.8 (before change)
beesWax OpenSession | 27.65

API Resp time(ms) | Average of 20 tries(local time)
Impala get_databases(name) | 67.35
Impala open_session() | 9.88
Hive get_databases(name) | 33.7
Hive open_session() | 53.05

Based on the test result and suggestions from Romain and Jenny, make changes for impala to user open_session() and getdatabases() with name filter for Hive.

Thanks,

Weixia

  • 0
  • 0
  • 1
  • 0
  • 1
Description From Last Updated
  1. 
      
  2. apps/impala/src/impala/conf.py (Diff revision 1)
     
     

    Problem with this one, is that the current user will lose its active session and all his running queries, I rather just go ahead and do like Hive for now

    1. We could check if the user's session exists (like we do everywhere else we open a session), but there's no point in doing the filter for Impala b/c we ignore it: https://github.com/cloudera/hue/blob/master/apps/beeswax/src/beeswax/server/hive_server2_lib.py#L657-L658

    2. One final idea is that we could just execute SELECT 'Hello World!';

    3. +1 SELECT actually (might fail if all perms restricted byt this is fine and the same as now anyway)

    4. i.e. - server.execute_statement("SELECT 'Hello World!';")

  3. 
      
  1. Ship It!

  2. 
      
  1. Nice one!

  2. 
      
Review request changed

Status: Closed (submitted)

Loading...