Explorar o código

HUE-2257 [hive] Add a workaround for missing hasMoreRows in the API

Romain Rigaux %!s(int64=10) %!d(string=hai) anos
pai
achega
2f06c75

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

@@ -269,9 +269,8 @@ def execute(request, design_id=None):
   design = safe_get_design(request, query_type, design_id)
 
   try:
-    print 'aaa'
     query_form = get_query_form(request)
-    print 'bb'
+
     if query_form.is_valid():
       query_str = query_form.query.cleaned_data["query"]
       explain = request.GET.get('explain', 'false').lower() == 'true'

+ 1 - 1
apps/beeswax/src/beeswax/server/hive_server2_lib.py

@@ -170,7 +170,7 @@ class HiveServerTRowSet2:
     self.startRowOffset = row_set.startRowOffset
 
   def is_empty(self):
-    return len(self.rows) == 0
+    return len(self.row_set.columns) == 0
 
   def cols(self, col_names):
     cols_rows = []

+ 2 - 2
desktop/conf.dist/hue.ini

@@ -792,8 +792,8 @@
   # This will free all the query resources in HiveServer2, but also make its results inaccessible.
   ## close_queries=false
 
-  # Thrift version to use when communicating with HiveServer2. Version 7 is a faster prototype.
-  ## thrift_version=5
+  # Thrift version to use when communicating with HiveServer2.
+  ## thrift_version=7
 
   [[ssl]]
     # SSL communication enabled for this server.

+ 2 - 2
desktop/conf/pseudo-distributed.ini.tmpl

@@ -798,8 +798,8 @@
   # This will free all the query resources in HiveServer2, but also make its results inaccessible.
   ## close_queries=false
 
-  # Thrift version to use when communicating with HiveServer2. Version 7 is a faster prototype.
-  ## thrift_version=5
+  # Thrift version to use when communicating with HiveServer2.
+  ## thrift_version=7
 
   [[ssl]]
     # SSL communication enabled for this server.