line using bin/schematool. This manual operation can be performed only once. It will fail if you
try to load the schema again. If you are upgrading from 0.6, make sure you have already run
the storage-conf.xml to cassandra.yaml converter. One caveat of this process is that your
cluster must have enough live nodes greater than or equal to the maximum replication factor
of all your keyspaces.
Loading schema via JMX must be done on exactly one node in your cluster (preferably a
seed node). Changes will be promulgated from that node to the rest of the cluster. This
capability will be deprecated in the next version of Cassandra (0.7+1) and will be completely
removed in the version after that (0.7+2).
Further schema modifications
Once your schema is saved in the system table, any schema modifications will have to be
made via the Thrift. There are six methods that accomplish this:
system_add_column_family()
system_drop_column_family()
system_rename_column_family()
system_add_keyspace()
system_drop_keyspace()
system_rename_keyspace()
These methods do exactly what their names imply. Some things to note:
The drop and rename methods create a snapshot of your existing data before doing
their work.
The rename methods block while filenames are changed.
All methods go through a bit of validation to check for sanity.
2.8.5 Operations
2.8.5.1客户端操作
添加 column family or keyspace
删除 column family or keyspace
重命名 column family or keyspace