Repository: incubator-impala
Updated Branches:
  refs/heads/master 2c9b4a9ba -> 68e9eed81


IMPALA-1240: add back spilling sort now that sorter is not flaky

This test coverage was removed because of flakiness.
Instead of mem_limit, use max_block_mgr_memory, which is more
deterministic since it isn't affected by scanner memory usage.
Now that the sorter is more stable, this test should reliably
succeed.

Change-Id: I88056db2eac3fa91bef85284a516be303f25333d
Reviewed-on: http://gerrit.cloudera.org:8080/3795
Reviewed-by: Tim Armstrong <[email protected]>
Tested-by: Internal Jenkins


Project: http://git-wip-us.apache.org/repos/asf/incubator-impala/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-impala/commit/68e9eed8
Tree: http://git-wip-us.apache.org/repos/asf/incubator-impala/tree/68e9eed8
Diff: http://git-wip-us.apache.org/repos/asf/incubator-impala/diff/68e9eed8

Branch: refs/heads/master
Commit: 68e9eed814123d1ddd18da719916a8f549d1eefa
Parents: 2c9b4a9
Author: Tim Armstrong <[email protected]>
Authored: Thu Jun 9 15:43:51 2016 -0700
Committer: Internal Jenkins <[email protected]>
Committed: Thu Jul 28 21:10:19 2016 +0000

----------------------------------------------------------------------
 tests/query_test/test_cancellation.py | 35 +++++++++++++++++-------------
 1 file changed, 20 insertions(+), 15 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/68e9eed8/tests/query_test/test_cancellation.py
----------------------------------------------------------------------
diff --git a/tests/query_test/test_cancellation.py 
b/tests/query_test/test_cancellation.py
index 41013d2..9fbd952 100644
--- a/tests/query_test/test_cancellation.py
+++ b/tests/query_test/test_cancellation.py
@@ -33,6 +33,7 @@ DEBUG_ACTIONS = [None, 'WAIT']
 # Extra dimensions to test order by without limit
 SORT_QUERY = 'select * from lineitem order by l_orderkey'
 SORT_CANCEL_DELAY = range(6, 10)
+SORT_BLOCK_MGR_LIMIT = ['0', '300m'] # Test spilling and non-spilling sorts.
 
 class TestCancellation(ImpalaTestSuite):
   @classmethod
@@ -46,6 +47,7 @@ class TestCancellation(ImpalaTestSuite):
     cls.TestMatrix.add_dimension(TestDimension('query_type', *QUERY_TYPE))
     cls.TestMatrix.add_dimension(TestDimension('cancel_delay', 
*CANCEL_DELAY_IN_SECONDS))
     cls.TestMatrix.add_dimension(TestDimension('action', *DEBUG_ACTIONS))
+    cls.TestMatrix.add_dimension(TestDimension('max_block_mgr_memory', 0))
 
     cls.TestMatrix.add_constraint(lambda v: v.get_value('query_type') != 
'CTAS' or (\
         v.get_value('table_format').file_format in ['text', 'parquet'] and\
@@ -82,6 +84,8 @@ class TestCancellation(ImpalaTestSuite):
     debug_action = '0:GETNEXT:' + action if action != None else ''
     vector.get_value('exec_option')['debug_action'] = debug_action
 
+    vector.get_value('exec_option')['max_block_mgr_memory'] = 
vector.get_value('max_block_mgr_memory')
+
     # Execute the query multiple times, cancelling it each time.
     for i in xrange(NUM_CANCELATION_ITERATIONS):
       handle = self.execute_query_async(query, vector.get_value('exec_option'),
@@ -163,18 +167,19 @@ class TestCancellationSerial(TestCancellation):
     except AssertionError:
       pytest.xfail("IMPALA-551: File handle leak for INSERT")
 
-  class TestCancellationFullSort(TestCancellation):
-    @classmethod
-    def add_test_dimensions(cls):
-      super(TestCancellation, cls).add_test_dimensions()
-      # Override dimensions to only execute the order-by without limit query.
-      cls.TestMatrix.add_dimension(TestDimension('query', SORT_QUERY))
-      cls.TestMatrix.add_dimension(TestDimension('query_type', 'SELECT'))
-      cls.TestMatrix.add_dimension(TestDimension('cancel_delay', 
*SORT_CANCEL_DELAY))
-      cls.TestMatrix.add_dimension(TestDimension('action', None))
-      cls.TestMatrix.add_constraint(lambda v:\
-         v.get_value('table_format').file_format =='parquet' and\
-         v.get_value('table_format').compression_codec == 'none')
-
-    def test_cancel_sort(self, vector):
-      self.execute_cancel_test(vector)
+class TestCancellationFullSort(TestCancellation):
+  @classmethod
+  def add_test_dimensions(cls):
+    super(TestCancellation, cls).add_test_dimensions()
+    # Override dimensions to only execute the order-by without limit query.
+    cls.TestMatrix.add_dimension(TestDimension('query', SORT_QUERY))
+    cls.TestMatrix.add_dimension(TestDimension('query_type', 'SELECT'))
+    cls.TestMatrix.add_dimension(TestDimension('cancel_delay', 
*SORT_CANCEL_DELAY))
+    cls.TestMatrix.add_dimension(TestDimension('max_block_mgr_memory', 
*SORT_BLOCK_MGR_LIMIT))
+    cls.TestMatrix.add_dimension(TestDimension('action', None))
+    cls.TestMatrix.add_constraint(lambda v:\
+       v.get_value('table_format').file_format =='parquet' and\
+       v.get_value('table_format').compression_codec == 'none')
+
+  def test_cancel_sort(self, vector):
+    self.execute_cancel_test(vector)

Reply via email to