Scylla JMX proxy
2c48bab91a
JmxMBeanServer is a concrete implementation of a MBeanServer. We want to use it directly because we need to bypass calls to JmxMBeanServer.registerMBean and JmxMBeanServer.unregisterMBean. They take ObjectName as parameter, copy it using ObjectName.getInstance(ObjectName) and pass it to registerMBean and unregisterMBean of JmxMBeanServer.getMBeanServerInterceptor(). We want to avoid this copy and pass the ObjectName argument directly to JmxMBeanServer.getMBeanServerInterceptor(). To do that this patch: 1. changes all MBeanServer variables to JmxMBeanServer 2. creates JmxMBeanServer in APIBuilder making sure accessing interceptors is allowed 3. makes sure that JmxMBeanServer.getMBeanServerInterceptor().registerMBean is called wherever JmxMBeanServer.registerMBean was called 4. makes sure that JmxMBeanServer.getMBeanServerInterceptor().unregisterMBean is called whenever JmxMBeanServer.unregisterMBean was called Next patch will use different ObjectName implementation that will use less memory and this patch is crucial because without it every ObjectName is transformed with ObjectName.getInstance which turns the object into a regular ObjectName. Signed-off-by: Piotr Jastrzebski <piotr@scylladb.com> |
||
---|---|---|
dist | ||
scripts | ||
src/main/java | ||
git-archive-all-license.txt | ||
LICENSE.AGPL | ||
NOTICE | ||
pom.xml | ||
README.md | ||
SCYLLA-VERSION-GEN |
Scylla JMX Server
Scylla JMX server implements the Apache Cassandra JMX interface for compatibility with tooling such as nodetool
. The JMX server uses Scylla's REST API to communicate with a Scylla server.
Compiling
To compile JMX server, run:
$ mvn package
Running
To start the JMX server, run:
$ ./scripts/scylla-jmx
To get help on supported options:
$ ./scripts/scylla-jmx --help