Scylla JMX proxy
12ba9915a2
"This is a pretty hefty change set. Base goal is to update JMX impl to Cassandra 3.x compatibility. While the base MBeans are easy enough, the metrics parts of the stew are trickier, since Cassandra 3 changed a number of things around. To that end, and to clean up this code somewhat, this basically changes all about metrics management in scylla-jmx. Some background: Cassandra uses codehaul metrics for actual measurement. Now, obviously, in this proxy project we need not measure anything, since actual happenings are in the Scylla process. Previous version of the code however still utilized a (not-so-pretty reflection-hacked-into) version of codehaul metrics because they also provided the system for exposing the data through JMX. I.e. we added a bunch of stuff we really did not need, to avoid dealing with some of that we did. In Cassandra 3, v3 of codehaul is used, which the Cassandra devs apparently did not like the JMX integration of. Thus they decided to deal with JMX exposure themselves. which makes sense, because they want to control the syntax/structure. But given this, we no longer have any reason to utilize codehaul, since it does nothing for us. These change sets instead adapts the cassandra JMX bindings somewhat, and adds a wholly own structure of metric point binding, using java.util.function interfaces to provide flexible and late-ish binding to actual data query objects. End result is a much slimmer set of objects/functions to bind metrics (which of course are just queries to Scylla API). Also, MX4J has been dropped, since it is at best broken. Instead, we use simple wrapping of the system management server object to deal with dynamically populating transients objects like column families. Removed most statefulness (beyond binding) in MBean impls, all "bookeeping" of sub-objects and bind status now uses the actual mbean server. I.e. remove race conditions + lighter bookkeep. Since this is Java, and everything is tied together in a ball of yarn, most of the changes here are not self-contained. I.e. some of these will, applied individually, break the build. They are still kept as individual patches though, mainly for readability." |
||
---|---|---|
dist | ||
scripts | ||
src/main/java | ||
git-archive-all-license.txt | ||
LICENSE.AGPL | ||
NOTICE | ||
pom.xml | ||
README.md | ||
SCYLLA-VERSION-GEN |
Urchin JMX Interface
This is the JMX interface for Scylla
Compile
To compile do:
mvn install
Run
The maven will create an uber-jar with all dependency under the target directory. You should run it with the remote jmx enable so the nodetool will be able to connect to it.
java -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=7199 -Dcom.sun.management.jmxremote.local.only=false -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -jar target/scylla-jmx-1.0.jar
Setting IP and Port
By default the the JMX would connect to a node on the localhost on port 10000.
The jmx API uses the system properties to set the IP address and Port. To change the ip address use the apiaddress property (e.g. -Dapiaddress=1.1.1.1) To change the port use the apiport (e.g. -Dapiport=10001)