cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Cassandra Wiki] Update of "LiveSchemaUpdates" by EricEvans
Date Fri, 13 Aug 2010 00:50:15 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Cassandra Wiki" for change notification.

The "LiveSchemaUpdates" page has been changed by EricEvans.
http://wiki.apache.org/cassandra/LiveSchemaUpdates?action=diff&rev1=8&rev2=9

--------------------------------------------------

  
  Alternatively, you could then shut down the first node and manually copy its `SCHEMA_CF`
and `MIGRATIONS_CF` to each new node in the cluster.
  
+ The simplest method of applying these schema changes is with `bin/cassandra-cli`. You can
either do this interactively, or place the commands in a file and apply them in batch mode
(type `help` and `help <command>` to see the available commands). For example:
+ 
+ {{{
+ $ cat schema.txt
+ /* Create a new keyspace */
+ create keyspace Keyspace1 with replication_factor = 3 and placement_strategy = 'org.apache.cassandra.locator.RackUnawareStrategy'
+ 
+ /* Switch to the new keyspace */
+ use Keyspace1
+ 
+ /* Create new column families */
+ create column family Standard1 with column_type = 'Standard' and comparator = 'BytesType'
+ create column family Standard2 with column_type = 'Standard' and comparator = 'UTF8Type'
and rows_cached = 10000
+ $ bin/cassandra-cli --host localhost --batch < schema.txt
+ }}}
+ 
  === Existing Cluster (Upgrade from 0.6) ===
  To provide some backwards compatibility, we've provided a JMX method in the `StorageServiceMBean`
that can be used to manually load schema definitions from storage-conf.xml.  This is a one-shot
operation though, and will only work on a system that contains no existing migrations.  If
you are upgrading a cluster, you will probably only have to do this for one node (a seed).
 Gossip will take care of promulgating the changes to the rest of the nodes as they come online.
  

Mime
View raw message