Database Reference
In-Depth Information
cqlsh <hostname> <port> -k <keyspace>
tools/bin/json2sstable and tools/bin/sstable2json : As the
name suggests, they represent the yin and yang of serializing and deserializing the
data in SSTable. They can be vaguely assumed to be similar to the mysqldump
--xml <database> command, except that it works in the JSON format. The
sstable2json too provides SSTable as JSON and json2sstable takes
JSON to materialize a functional SSTable. The sstable2json tool may have
the following three options:
-k : The keys to be dumped
-x : The keys to be excluded
-e : The option making sstable2json to dump just keys, not column
family data
One can use the -k or -x switches up to 500 times. A general
sstable2json executable looks like this:
sstable2json -k <key1> -k <key2><sstable_path>
The sstable_path must be the full path to SSTable such as
/cassandra-data/data/mykeyspace/mykeyspace-
hc-1.data . Also, the key variable must be a hex string.
bin/sstablekeys : This is essentially sstable2json with a -e switch.
bin/sstableloader : This is used to bulk load to Cassandra. One can simply
copy SSTable data files and load them on to another Cassandra setup without
much hassle. Essentially, sstableloader reads the data files and streams to
the current Cassandra setup as specified by Cassandra's YAML file. We will see
this tool in more detail in the Using Cassandra bulk loader to restore the data
section in Chapter 6 , Managing a Cluster - Scaling, Node Repair, and Backup .
Configuration files
Cassandra has a central configuration file named cassandra.yaml . It contains cluster
settings, node-to-node communication specifications, performance-related settings, au-
thentication, security, and backup settings.
Apart from this, there are the logback.xml and cassandra-topo-
logy.properties files. The log4j-server.properties file is used to tweak
Search WWH ::




Custom Search