You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@impala.apache.org by dh...@apache.org on 2018/05/18 05:11:29 UTC
[07/11] impala git commit: IMPALA-7023: Wait for fragments to finish
for test_insert.py
IMPALA-7023: Wait for fragments to finish for test_insert.py
The arrangement of tests in test_insert.py changed with
IMPALA-7010, splitting out the memory limit tests into
test_insert_mem_limit(). On exhaustive, the combination
of test dimensions means test_insert_mem_limit() executes
11 different combinations. Each of these statements can
use a large amount of memory and this is not cleaned
up immediately. This has been causing
test_insert_overwrite(), which immediately follows
test_insert_mem_limit(), to hit the process memory limit.
This changes test_insert_mem_limit() to make it wait
for its fragments to finish.
Change-Id: I5642e9cb32dd02afd74dde7e0d3b31bddbee3ccd
Reviewed-on: http://gerrit.cloudera.org:8080/10426
Reviewed-by: Philip Zeyliger <ph...@cloudera.com>
Tested-by: Impala Public Jenkins <im...@cloudera.com>
Project: http://git-wip-us.apache.org/repos/asf/impala/repo
Commit: http://git-wip-us.apache.org/repos/asf/impala/commit/0297d76a
Tree: http://git-wip-us.apache.org/repos/asf/impala/tree/0297d76a
Diff: http://git-wip-us.apache.org/repos/asf/impala/diff/0297d76a
Branch: refs/heads/2.x
Commit: 0297d76a54c79edcdcabcf9cfb570f21850e99d3
Parents: 88facf3
Author: Joe McDonnell <jo...@cloudera.com>
Authored: Mon May 14 22:31:21 2018 -0700
Committer: Impala Public Jenkins <im...@gerrit.cloudera.org>
Committed: Thu May 17 22:03:02 2018 +0000
----------------------------------------------------------------------
tests/query_test/test_insert.py | 8 ++++++++
1 file changed, 8 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/impala/blob/0297d76a/tests/query_test/test_insert.py
----------------------------------------------------------------------
diff --git a/tests/query_test/test_insert.py b/tests/query_test/test_insert.py
index 2307b76..88aafb2 100644
--- a/tests/query_test/test_insert.py
+++ b/tests/query_test/test_insert.py
@@ -20,6 +20,7 @@
import pytest
from testdata.common import widetable
+from tests.common.impala_cluster import ImpalaCluster
from tests.common.impala_test_suite import ImpalaTestSuite
from tests.common.skip import SkipIfLocal, SkipIfNotHdfsMinicluster
from tests.common.test_dimensions import (
@@ -31,6 +32,7 @@ from tests.common.test_result_verifier import (
QueryTestResult,
parse_result_rows)
from tests.common.test_vector import ImpalaTestDimension
+from tests.verifiers.metric_verifier import MetricVerifier
PARQUET_CODECS = ['none', 'snappy', 'gzip']
@@ -125,6 +127,12 @@ class TestInsertQueries(ImpalaTestSuite):
vector.get_value('compression_codec')
self.run_test_case('QueryTest/insert-mem-limit', vector,
multiple_impalad=vector.get_value('exec_option')['sync_ddl'] == 1)
+ # IMPALA-7023: These queries can linger and use up memory, causing subsequent
+ # tests to hit memory limits. Wait for some time to allow the query to
+ # be reclaimed.
+ verifiers = [ MetricVerifier(i.service) for i in ImpalaCluster().impalads ]
+ for v in verifiers:
+ v.wait_for_metric("impala-server.num-fragments-in-flight", 0, timeout=60)
@pytest.mark.execute_serially
def test_insert_overwrite(self, vector):