The nodetool looks for column family with by their name. When using
JConsole, it search for all MBeans.
This patch adds a check for column family and stream with null query
(wild card).
This way the column family will appear in the JConsole.
Fixes#35
Signed-off-by: Amnon Heiman <amnon@scylladb.com>
Message-Id: <1479227289-15031-1-git-send-email-amnon@scylladb.com>
"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."
This series fill some missing functionality by using already existing
API.
The idea is to use existing code in places that it was not used.
Also, in places were a stub value is in place, the methods returns a
stab value.
Message-Id: <1478619479-10023-1-git-send-email-amnon@scylladb.com>
Implement some deprecated metrics in CommitLog and CompactionManager,
that can easily just be a wrapper to the non-deprecated metrics API.
Message-Id: <1478591291-30344-1-git-send-email-penberg@scylladb.com>
Note: c3 adds configurable size threshold counting of messages sent,
dividing info "large"/"small" partitions (+gossiper). Message bulk
queries in v3 mbean reflects this.
Scylla does not (yet?) have such a threshold divider, so this is
highly incomplete and just delegates to old apis that "sort-of" fit.
Currently, we have a scary looking dtest failure when attempting to force flush a
Nodetool command '/data/jenkins/workspace/scylla-1.3-dtest/label/monster/mode/release/smp/1/scylla/resources/cassandra/bin/nodetool -h localhost -p 7100 flush' failed; exit status: 2; stderr: Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF8
error: javax.ws.rs.ProcessingException (no security manager: RMI class loader disabled)
-- StackTrace --
java.lang.ClassNotFoundException: javax.ws.rs.ProcessingException (no security manager: RMI class loader disabled)
at sun.rmi.server.LoaderHandler.loadClass(LoaderHandler.java:396)
at sun.rmi.server.LoaderHandler.loadClass(LoaderHandler.java:186)
at java.rmi.server.RMIClassLoader$2.loadClass(RMIClassLoader.java:637)
at java.rmi.server.RMIClassLoader.loadClass(RMIClassLoader.java:264)
at sun.rmi.server.MarshalInputStream.resolveClass(MarshalInputStream.java:219)
at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1620)
at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1521)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1781)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1353)
at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:2018)
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1942)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1808)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1353)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:373)
at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:245)
at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:162)
at com.sun.jmx.remote.internal.PRef.invoke(Unknown Source)
at javax.management.remote.rmi.RMIConnectionImpl_Stub.invoke(Unknown Source)
at javax.management.remote.rmi.RMIConnector$RemoteMBeanServerConnection.invoke(RMIConnector.java:1020)
at javax.management.MBeanServerInvocationHandler.invoke(MBeanServerInvocationHandler.java:298)
at com.sun.proxy.$Proxy7.forceKeyspaceFlush(Unknown Source)
at org.apache.cassandra.tools.NodeProbe.forceKeyspaceFlush(NodeProbe.java:290)
at org.apache.cassandra.tools.NodeTool$Flush.execute(NodeTool.java:1227)
at org.apache.cassandra.tools.NodeTool$NodeToolCmd.run(NodeTool.java:288)
at org.apache.cassandra.tools.NodeTool.main(NodeTool.java:202)
The problem is rather innocent: the API call fails and we leak
javax.ws.rs.ProcessingException, which is not available in nodetool's
classpath. In fact, we already fixed the problem for GETs in commit
02e0598 ("APIClient: Fix error handling if connection to API server
fails") so do the same thing for POSTs.
Message-Id: <1471589525-26435-1-git-send-email-penberg@scylladb.com>
Ran into this while trying to use ccm with not up-to-date scylla-jmx.
Symptoms:
$ ccm start
Error starting node node1
and empty ~/.ccm/scylla-3/node1/logs/system.log.jmx
Message-Id: <1468399926-3565-1-git-send-email-tgrabiec@scylladb.com>
The correct dependency between the jmx and the scylla-server is:
The scylla-jmx should not run if the scylla-server is not running, it
should shutdown when the scylla-server shuts down.
Starting the scylla-jmx should not start the scylla-server, instead, if
the scylla-server is not running it should fail to start.
This patch changes the setup to do so.
Signed-off-by: Amnon Heiman <amnon@scylladb.com>
Message-Id: <1467184319-3395-1-git-send-email-amnon@scylladb.com>
The batch mode produces much more readable logs because it's designed
for non-interactive builds and doesn't have the fancy download progress
meters.
Message-Id: <1464770158-32482-1-git-send-email-penberg@scylladb.com>
Commit 12daaf5 ("dist/redhat: fix rpm build error") did not fix the
error, at least not on our Jenkins build machines.
Looking at the RPM build logs, we create the build directory:
+ cd /builddir/build/BUILD
+ mkdir build
but then change directory to "scylla-jmx-1.2.rc1":
+ cd /builddir/build/BUILD
+ cd scylla-jmx-1.2.rc1
+ mvn install
and therefore fail the copy:
+ cp dist/common/systemd/scylla-jmx.service.in build/scylla-jmx.service
cp: cannot create regular file 'build/scylla-jmx.service': No such
file or directory
I don't know why Takuya put the "mkdir" in the "prep" section but
something like this should unblock the build.
When removing the pull based timers in the API the sum method in the
APITimer was left stubed by mistake.
This patch take the sum from the histogram as it should be.
Another missed changes are the units, in the yammer library the Timer
does unit conversion before returning the values.
This patch takes the unit conversion from the yammer library to be
compatible.
Signed-off-by: Amnon Heiman <amnon@scylladb.com>
Message-Id: <1464173726-7482-1-git-send-email-amnon@scylladb.com>