Scylla JMX proxy
27313ee2c4
This patch adds the implementation for begin and finish local sampling of a column family. There is a difference in the implementation of Cassandra API and Scylla. In Cassandra and the JMX an external source start and stop the sampling. In Scylla, a single API call start the sampling and return with the result. In Scylla the API call always return sampling of the read and of the writes. To bridge the difference, the begin sampling command will use a Future when calling the API. The finish method will wait for the future to end. Because of the different implementation, it is possible that two consecutive calls will be made to start sampling one for the read and one for the write, similarly, two calls will be made to finish for read and write. The implementation would ignore the second call to start and will store the result, so the second call to finish will be served from the stored result. Note, that the use of future is only for safety, the way we expect it to work, the caller to the begin sampling will sleep anyhow while waiting for the result. To avoid breaking the MBean compatibility we piggyback the duration on top of the sampler string. If no duration is given, a default duration will be taken, this is also just as a precaution, we will modify the nodetool implementation to pass that information. There is a known issue with cardinality, that will need to be addressed. Also we return a value in the raw column to match what Cassandra JMX returns, but it's a duplication of the partition key. See scylladb/scylla#2811 Signed-off-by: Amnon Heiman <amnon@scylladb.com> Message-Id: <20190128143505.5241-1-amnon@scylladb.com> |
||
---|---|---|
dist | ||
reloc | ||
scripts | ||
src/main/java | ||
git-archive-all-license.txt | ||
install-dependencies.sh | ||
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