You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@impala.apache.org by mi...@apache.org on 2023/06/27 18:45:14 UTC
[impala] branch master updated (3e9408480 -> bf67c1e22)
This is an automated email from the ASF dual-hosted git repository.
michaelsmith pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/impala.git
from 3e9408480 IMPALA-12177: Add missing throw statement in unsetPartitionsColStats()
new e02ee9028 IMPALA-12245: Move test_display_src_socket_in_query_cause
new bf67c1e22 IMPALA-12244: Fix uninitialized test variable
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
be/src/util/cgroup-util.h | 6 +++---
be/src/util/proc-info-test.cc | 3 ++-
tests/webserver/test_web_pages.py | 36 ++++++++++++++++++++----------------
3 files changed, 25 insertions(+), 20 deletions(-)
[impala] 02/02: IMPALA-12244: Fix uninitialized test variable
Posted by mi...@apache.org.
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 bf67c1e22edf3e7d54d93a52aeacc2906e0e2d35
Author: Michael Smith <mi...@cloudera.com>
AuthorDate: Mon Jun 26 15:28:55 2023 -0700
IMPALA-12244: Fix uninitialized test variable
Addendum to IMPALA-12217: fixes isV2 being uninitialized when an error
value is returned. Clarifies the behavior of FindCGroupMounts.
Change-Id: I7aa8f1d9db33ffe9b4c889fb739fb0ac64af803b
Reviewed-on: http://gerrit.cloudera.org:8080/20122
Reviewed-by: Riza Suminto <ri...@cloudera.com>
Tested-by: Impala Public Jenkins <im...@cloudera.com>
---
be/src/util/cgroup-util.h | 6 +++---
be/src/util/proc-info-test.cc | 3 ++-
2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/be/src/util/cgroup-util.h b/be/src/util/cgroup-util.h
index 4540dccca..fb4f3fdee 100644
--- a/be/src/util/cgroup-util.h
+++ b/be/src/util/cgroup-util.h
@@ -48,9 +48,9 @@ class CGroupUtil {
/// the full path relative to the system-wide cgroups outside of the container.
/// E.g. /sys/fs/cgroup/memory/kubepods/burstable/pod-<long unique id> may be mounted at
/// /sys/fs/cgroup/memory inside the container. In that case this function would return
- /// ("/sys/fs/cgroup/memory", "/kubepods/burstable/pod-<long unique id>").
- /// CGroup v2 uses a unified hierarchy, so the result will be the same for any
- /// value of 'subsystem'. Returns whether the mount is for cgroup v1 or v2.
+ /// ("/sys/fs/cgroup/memory", "/kubepods/burstable/pod-<long unique id>"). CGroup v2
+ /// uses a unified hierarchy, so the result will be the same for any value of
+ /// 'subsystem'. If Status is Ok, returns whether the mount is for cgroup v1 or v2.
static Status FindCGroupMounts(const std::string& subsystem,
std::string* mount_path, std::string* system_path, bool* is_v2);
};
diff --git a/be/src/util/proc-info-test.cc b/be/src/util/proc-info-test.cc
index 4d4983085..d1e5cf2c6 100644
--- a/be/src/util/proc-info-test.cc
+++ b/be/src/util/proc-info-test.cc
@@ -42,7 +42,8 @@ TEST(CGroupInfo, Basic) {
// Test error handling when cgroup is not present.
TEST(CGroupInfo, ErrorHandling) {
string mp, sp;
- bool isV2;
+ // Initialize isV2 so we choose the else branch if an error is returned.
+ bool isV2 = false;
Status err = CGroupUtil::FindCGroupMounts("fake-cgroup", &mp, &sp, &isV2);
if (isV2) {
// Ignores subsystem, so should always succeed.
[impala] 01/02: IMPALA-12245: Move test_display_src_socket_in_query_cause
Posted by mi...@apache.org.
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 e02ee90287a96f94d78f812bc8f6d35f00836458
Author: Riza Suminto <ri...@cloudera.com>
AuthorDate: Mon Jun 26 16:59:53 2023 -0700
IMPALA-12245: Move test_display_src_socket_in_query_cause
test_display_src_socket_in_query_cause close the session by calling
coordinator WebUI directly. This can interfere with test_query_progress
that run sleep query for 100 ms. This patch move
test_display_src_socket_in_query_cause out of TestWebPage class into its
own test class so it does not interfere with other tests in TestWebPage.
Testing:
- Repeat scenario mentioned in IMPALA-12245 and confirm that
test_query_progress can pass.
Change-Id: If19f419b26a0456f48ebf6046b0e73ae376dfbeb
Reviewed-on: http://gerrit.cloudera.org:8080/20123
Reviewed-by: Impala Public Jenkins <im...@cloudera.com>
Tested-by: Impala Public Jenkins <im...@cloudera.com>
---
tests/webserver/test_web_pages.py | 36 ++++++++++++++++++++----------------
1 file changed, 20 insertions(+), 16 deletions(-)
diff --git a/tests/webserver/test_web_pages.py b/tests/webserver/test_web_pages.py
index 7cfeeab98..11ff2100a 100644
--- a/tests/webserver/test_web_pages.py
+++ b/tests/webserver/test_web_pages.py
@@ -882,6 +882,26 @@ class TestWebPage(ImpalaTestSuite):
"href='http://.*:%s/'" % self.IMPALAD_TEST_PORT[0], self.IMPALAD_TEST_PORT,
regex=True, headers={'X-Forwarded-Context': '/gateway'})
+ def test_catalog_operations_endpoint(self):
+ """Test to check that the /operations endpoint returns 200 OK."""
+ page = requests.get("http://localhost:25020/operations")
+ assert page.status_code == requests.codes.ok
+ page = requests.head("http://localhost:25020/operations")
+ assert page.status_code == requests.codes.ok
+
+ def test_query_progress(self):
+ """Tests that /queries page shows query progress."""
+ query = "select count(*) from functional_parquet.alltypes where bool_col = sleep(100)"
+ response_json = self.__run_query_and_get_debug_page(
+ query, self.QUERIES_URL, expected_state=self.client.QUERY_STATES["RUNNING"])
+ for json_part in response_json['in_flight_queries']:
+ if query in json_part['stmt']:
+ assert json_part["query_progress"] == "0 / 4 ( 0%)"
+
+
+class TestWebPageAndCloseSession(ImpalaTestSuite):
+ ROOT_URL = "http://localhost:{0}/"
+
@SkipIfDockerizedCluster.daemon_logs_not_exposed
def test_display_src_socket_in_query_cause(self):
# Execute a long running query then cancel it from the WebUI.
@@ -908,19 +928,3 @@ class TestWebPage(ImpalaTestSuite):
requests.get(close_session_url)
self.assert_impalad_log_contains("INFO", "Session closed from Impala\'s debug "
"web interface by user: 'anonymous' at", expected_count=-1)
-
- def test_catalog_operations_endpoint(self):
- """Test to check that the /operations endpoint returns 200 OK."""
- page = requests.get("http://localhost:25020/operations")
- assert page.status_code == requests.codes.ok
- page = requests.head("http://localhost:25020/operations")
- assert page.status_code == requests.codes.ok
-
- def test_query_progress(self):
- """Tests that /queries page shows query progress."""
- query = "select count(*) from functional_parquet.alltypes where bool_col = sleep(100)"
- response_json = self.__run_query_and_get_debug_page(
- query, self.QUERIES_URL, expected_state=self.client.QUERY_STATES["RUNNING"])
- for json_part in response_json['in_flight_queries']:
- if query in json_part['stmt']:
- assert json_part["query_progress"] == "0 / 4 ( 0%)"