Database Reference
In-Depth Information
Starting with version 0.7, the user keyspaces defined in cassandra.yamlare not loaded by default
when the server starts. So you might see a message like this as your Cassandra server starts up
for the first time:
INFO config.DatabaseDescriptor: Found table data in data directories.
Consider using JMX to call org.apache.cassandra.service.StorageService.
loadSchemaFromYaml().
In order to load them, you need to invoke the loadSchemaFromYaml JMX operation. But in or-
der to invoke this command, you need to do a couple of things. First, get mx4j-tools.jarfrom
Sourceforge.net. Download and extract the ZIP file into any directory. Then, copy the JAR
named mx4j-tools.jarin its libdirectory into Cassandra's libdirectory. This will allow you to
make JMX connections to interact with Cassandra in really rich ways. We'll see more about us-
ing JMX with Cassandra later, but for now we just want to get a keyspace up for testing. Restart
Cassandra after adding the JAR.
Next, open a new terminal and issue the command jconsole. A GUI will start and load the JCon-
sole tool that ships with Java. This tool can introspect the Java Virtual Machine and allow you to
view runtime data and invoke operations that are exposed via JMX.
To load the keyspaces defined in cassandra.yaml, click the MBeans tab in the JConsole GUI.
Expand the org.apache.cassandra.service bean, then StorageService , then Operations.
Click the loadSchemaFromYAML operation and click the button. This will execute the command
on the Cassandra service and load your schemas in the cassandra.yamlile.
To perform the once-only operation to import a 0.6 configuration into 0.7, use the loadSchem-
aFromYaml operation on the StorageService MBean. This is shown in Figure 6-4 .
Search WWH ::




Custom Search