IMPALA-14491: Fix run-workload.py's handling of HS2's exec summary

Recently, we switched bin/run-workload.py to use HS2. It turns
out that the HS2 client code is not producing the same data
structure for the exec summary. report_benchmark_results.py
relies on that data structure and fails for HS2.

This changes the HS2 client code to use the same representation
as the beeswax. There is already a function that does this
conversion (build_summary_table_from_thrift) for our regular
tests, so this reuses that function.

Testing:
 - Ran bin/run-workload.py twice to produce json files and
   processed them with report_benchmark_results.py. This
   failed before the change and passed afterward.

Change-Id: I0a041bdebe748b6b3a05b552584e0ca2327cff67
Reviewed-on: http://gerrit.cloudera.org:8080/23597
Reviewed-by: Riza Suminto <riza.suminto@cloudera.com>
Reviewed-by: Michael Smith <michael.smith@cloudera.com>
Tested-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com>
This commit is contained in:
Joe McDonnell
2025-10-24 14:25:33 -07:00
parent 541fb3f405
commit 3398f20afe

View File

@@ -22,6 +22,7 @@ import re
from datetime import datetime
from impala.dbapi import connect
from tests.beeswax.impala_beeswax import ImpalaBeeswaxClient
from tests.common.impala_connection import build_summary_table_from_thrift
from sys import maxsize
from tests.performance.query import HiveQueryResult, ImpalaQueryResult
from tests.util.shell_util import exec_process
@@ -134,7 +135,7 @@ def execute_using_impala_hs2(query, query_config):
exec_result.data = cursor.fetchall()
exec_result.time_taken = time() - start
exec_result.runtime_profile = cursor.get_profile()
exec_result.exec_summary = str(cursor.get_summary())
exec_result.exec_summary = build_summary_table_from_thrift(cursor.get_summary())
exec_result.success = True
except Exception as e:
LOG.error(str(e))