IMPALA-14615: Skip checking current event in test_event_processor_error_message

When hierarchical event processing is enabled, there is no info about
the current event batch shown in the /events page. Note that event
batches are dispatched and processed later in parallel. The current
event batch info is actually showing the current batch that is being
dispatched which won't take long.

This patch skips checking the current event batch info when hierarchical
event processing is enabled. A new method,
is_hierarchical_event_processing_enabled(), is added in
ImpalaTestClusterProperties for the check. Also fixes
is_event_polling_enabled() to accept float values of
hms_event_polling_interval_s and adds the missing raise statement when
it fails to parse the flags.

Tests
 - Ran the test locally.

Change-Id: Iffb84304a4096885492002b781199051aaa4fbb0
Reviewed-on: http://gerrit.cloudera.org:8080/23766
Reviewed-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com>
Tested-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com>
This commit is contained in:
stiga-huang
2025-12-10 09:48:38 +08:00
committed by Impala Public Jenkins
parent 65639f16b9
commit 2ebdc05c1d
2 changed files with 24 additions and 3 deletions

View File

@@ -413,7 +413,7 @@ class ImpalaTestClusterProperties(object):
Checks if --hms_event_polling_interval_s is set to non-zero value"""
try:
key = "hms_event_polling_interval_s"
return key in self.catalogd_runtime_flags and int(
return key in self.catalogd_runtime_flags and float(
self._catalogd_runtime_flags[key]["current"]) > 0
except Exception:
if self.is_remote_cluster():
@@ -421,6 +421,22 @@ class ImpalaTestClusterProperties(object):
LOG.exception(
"Failed to get flags from web UI, assuming event polling is disabled")
return False
raise
def is_hierarchical_event_processing_enabled(self):
"""Whether hierarchical event processing is enabled"""
try:
key = "enable_hierarchical_event_processing"
return self.is_event_polling_enabled() and key in self.catalogd_runtime_flags \
and self.runtime_flags[key]["current"] == "true"
except Exception:
if self.is_remote_cluster():
# IMPALA-8553: be more tolerant of failures on remote cluster builds.
LOG.exception(
"Failed to get flags from web UI, assuming hierarchical event processing is "
"disabled")
return False
raise
def build_flavor_timeout(default_timeout, slow_build_timeout=None,
asan_build_timeout=None, code_coverage_build_timeout=None):

View File

@@ -27,12 +27,14 @@ import time
from tests.common.custom_cluster_test_suite import (
DEFAULT_CLUSTER_SIZE,
CustomClusterTestSuite)
from tests.common.environ import ImpalaTestClusterProperties
from tests.common.impala_connection import IMPALA_CONNECTION_EXCEPTION
from tests.common.skip import SkipIfFS, SkipIfDockerizedCluster
from tests.shell.util import run_impala_shell_cmd
SMALL_QUERY_LOG_SIZE_IN_BYTES = 40 * 1024
CATALOG_URL = "http://localhost:25020/catalog"
IMPALA_TEST_CLUSTER_PROPERTIES = ImpalaTestClusterProperties.get_instance()
class TestWebPage(CustomClusterTestSuite):
@@ -495,8 +497,11 @@ class TestWebPage(CustomClusterTestSuite):
json_res = json.loads(requests.get("http://localhost:25020/events?json").text)
new_latest_event_id = json_res["progress-info"]["latest_event_id"]
assert new_latest_event_id > old_latest_event_id
# Current event (the failed one) should not be cleared
assert "current_event" in json_res["progress-info"]
# Current event batch info is not shown when hierarchical event processing is
# enabled since events are dispatched and then processed in parallel.
if not IMPALA_TEST_CLUSTER_PROPERTIES.is_hierarchical_event_processing_enabled():
# Current event (the failed one) should not be cleared
assert "current_event" in json_res["progress-info"]
# Verify the error message disappears after a global INVALIDATE METADATA
self.execute_query("invalidate metadata")