This is an automated email from the ASF dual-hosted git repository.

michaelsmith pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/impala.git

commit 2ebdc05c1d8bcaaf12ff3418d0d6b7d1a5a7e2e9
Author: stiga-huang <[email protected]>
AuthorDate: Wed Dec 10 09:48:38 2025 +0800

    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 <[email protected]>
    Tested-by: Impala Public Jenkins <[email protected]>
---
 tests/common/environ.py                | 18 +++++++++++++++++-
 tests/custom_cluster/test_web_pages.py |  9 +++++++--
 2 files changed, 24 insertions(+), 3 deletions(-)

diff --git a/tests/common/environ.py b/tests/common/environ.py
index c96571b7c..54ae8f093 100644
--- a/tests/common/environ.py
+++ b/tests/common/environ.py
@@ -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):
diff --git a/tests/custom_cluster/test_web_pages.py 
b/tests/custom_cluster/test_web_pages.py
index b25b3c84c..67d702ff9 100644
--- a/tests/custom_cluster/test_web_pages.py
+++ b/tests/custom_cluster/test_web_pages.py
@@ -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")

Reply via email to