Database Reference
In-Depth Information
level you want to set it to. Enter org.apache.cassandra.service.LoadDisseminator and
INFO , and click the button labeled setLog4jLevel. You should see the following output in your
logs (assuming your level was already debug):
DEBUG 17:17:30,515 Disseminating load info ...
INFO 17:17:42,001 set log level to INFO for classes under
'org.apache.cassandra.service.LoadDisseminator'
(if the level doesn't look like 'INFO' then log4j couldn't parse 'INFO')
As you can see from this output, Cassandra was logging a load info statement because the logger
was set to debug. After invoking the setLog4jLevel operation, we get the INFO output and no
more debug level statements.
To get an understanding of each node's load, you can use the getLoadMap() method, which will
return to you a Java Map with keys of IP addresses with values of their corresponding loads.
If you're looking for a certain key, you can use the getNaturalEndpoints(String table,
byte[] key) operation. Pass it the table name and the key for which you want to find the end-
point value, and it will return a list of IP addresses that are responsible for storing this key.
You can also use the getRangeToEndpointMap operation to get a map of range to end points
describing your ring topology.
If you wish to decommission a server, you can also do that with this MBean. Invoke the decom-
mission() operation, and the current node's data will automatically transfer to another machine
and take this node out of service.
If you're feeling brave, you can invoke the truncate operation for a given column family in a given
keyspace. If all of the nodes are available, this operation will delete all data from the column
family but leave its definition intact.
A good idea for general maintenance is to use the loadBalance() operation if you discover
through other MBeans that your nodes have become very unbalanced. This can happen from
time to time, where some nodes have an inordinate share of the data. This operation will cause
the current node to unload its data onto one of its neighboring nodes, and then it will bootstrap
to receive the data of the node in the ring burdened with the most data.
StreamingService
The org.cassandra.streaming.StreamingServiceMBean defines the following interface:
public interface StreamingServiceMBean
{
public Set<InetAddress> getStreamDestinations();
public List<String> getOutgoingFiles(String host) throws IOException;
Search WWH ::




Custom Search