This is an automated email from the ASF dual-hosted git repository. bharathv pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/impala.git
commit f0a47ab2ca6e5c19f74c55af67927f446785f23c Author: Thomas Tauber-Marshall <[email protected]> AuthorDate: Tue Feb 12 21:15:09 2019 -0800 IMPALA-8199: Fix stress test: 'No module named RuntimeProfile.ttypes' A recent commit (IMPALA-6964) broke the stress test because it added an import of a generated thrift value to a python file that is included by the stress test. The stress test is intended to be able to be run without doing a full build of Impala, but in this case the generated thrift isn't available, leading to an import error. The solution is to only import the thrift value in the function where it is used, which is not called by the stress test. Testing: - Ran the stress test manually without doing a full build and confirmed that it works now. Change-Id: I7a3bd26d743ef6603fabf92f904feb4677001da5 Reviewed-on: http://gerrit.cloudera.org:8080/12472 Reviewed-by: Thomas Marshall <[email protected]> Tested-by: Impala Public Jenkins <[email protected]> --- tests/util/parse_util.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/util/parse_util.py b/tests/util/parse_util.py index 5dbaff0..031cbdb 100644 --- a/tests/util/parse_util.py +++ b/tests/util/parse_util.py @@ -17,7 +17,6 @@ import re from datetime import datetime -from RuntimeProfile.ttypes import TSummaryStatsCounter # IMPALA-6715: Every so often the stress test or the TPC workload directories get # changed, and the stress test loses the ability to run the full set of queries. Set @@ -148,6 +147,9 @@ def get_bytes_summary_stats_counter(counter_name, runtime_profile): summary_stats[0].max_value == 8192 and \ summary_stats[0].total_num_values == 1 """ + # This requires the Thrift definitions to be generated. We limit the scope of the import + # to allow tools like the stress test to import this file without building Impala. + from RuntimeProfile.ttypes import TSummaryStatsCounter regex_summary_stat = re.compile(r"""\( Avg:[^\(]*\((?P<avg>[0-9]+)\)\s;\s # Matches Avg: [?].[?] [?]B (?)
