On Tue, May 15, 2012 at 5:41 PM, Dave Brosius <dbros...@mebigfatguy.com>wrote:

> The replication factor for a keyspace is stored in the
> system.schema_keyspaces column family.
>
> Since you can't view this with cli as the server won't start, the only way
> to look at it, that i know of is to use the
>
> sstable2json tool on the *.db file for that column family...
>
> So for instance on my machine i do
>
> ./sstable2json /var/lib/cassandra/data/**system/schema_keyspaces/**
> system-schema_keyspaces-ia-1-**Data.db
>
> and get
>
>
> {
> "7374726573735f6b73": [["durable_writes","true",**1968197311980145],
> ["name","stress_ks",**1968197311980145], ["strategy_class","org.apache.**
> cassandra.locator.**SimpleStrategy",**1968197311980145],
> ["strategy_options","{\"**replication_factor\":\"3\"}",**
> 1968197311980145]]
>
> It's likely you don't have a entry from replication_factor.
>
>
Yep, I checked the system.schema_keyspaces ColumnFamily, and there was no
replication_factor value, as you suspected.  But the dev cluster that
worked after upgrade did have that value, so it started up okay.
Apparently pre-1.1 was less picky about its presence.


> Theoretically i suppose you could embellish the output, and use
> json2sstable to fix it, but I have no experience here, and would get the
> blessings of datastax fellas, before proceeding.


Actually, I went ahead and took a chance because I had already completely
offline for several hours and wanted to get things back up.  I did what you
suggested and added the replication_factor value to the json returned from
sstable2json and imported it using json2sstable.  Fortunately I had the dev
cluster values to use as a basis.  I started things up, and it worked like
a champ.  Thanks!

Casey

Reply via email to