You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by ti...@apache.org on 2025/03/11 11:23:46 UTC
(ignite) branch master updated: IGNITE-24725 [ducktests] Add ability to run operations via JMX (#11937)
This is an automated email from the ASF dual-hosted git repository.
timoninmaxim pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ignite.git
The following commit(s) were added to refs/heads/master by this push:
new 025c3b94a06 IGNITE-24725 [ducktests] Add ability to run operations via JMX (#11937)
025c3b94a06 is described below
commit 025c3b94a066fc4bf24f9d4eb04eb0e24af3b1f5
Author: Sergey Korotkov <se...@gmail.com>
AuthorDate: Tue Mar 11 18:23:40 2025 +0700
IGNITE-24725 [ducktests] Add ability to run operations via JMX (#11937)
---
.../tests/ignitetest/services/utils/jmx_utils.py | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
diff --git a/modules/ducktests/tests/ignitetest/services/utils/jmx_utils.py b/modules/ducktests/tests/ignitetest/services/utils/jmx_utils.py
index 462e7864e16..48cfe00003f 100644
--- a/modules/ducktests/tests/ignitetest/services/utils/jmx_utils.py
+++ b/modules/ducktests/tests/ignitetest/services/utils/jmx_utils.py
@@ -53,6 +53,15 @@ class JmxMBean:
"""
return self.client.mbean_attribute(self.name, attr)
+ def run(self, operation, params):
+ """"
+ Runs through JMX client MBean operation.
+ :param operation: Operation name.
+ :param params: List of parameters.
+ :return: Result of operation as string.
+ """
+ return self.client.mbean_run(self.name, operation, params)
+
class JmxClient:
"""JMX client, invokes jmxterm on node locally.
@@ -103,6 +112,19 @@ class JmxClient:
return iter(s.strip() for s in self.__run_cmd(cmd))
+ def mbean_run(self, mbean, operation, params):
+ """
+ Run MBean operation.
+ :param mbean: MBean name
+ :param operation: Operation name
+ :param params: List of parameters
+ :return: Result of operation as string
+ """
+ cmd = "echo $'open %s\\n run -b %s %s %s\\n close' | %s" \
+ % (self.pid, mbean.replace(' ', '\\ '), operation, ' '.join(str(p) for p in params), self.jmx_util_cmd)
+
+ return iter(s.strip() for s in self.__run_cmd(cmd))
+
def __run_cmd(self, cmd):
return self.node.account.ssh_capture(cmd, allow_fail=False, callback=str, combine_stderr=False)