Cassandra backup queston regarding commitlogs

2012-04-28 Thread Roshan
Hi

Currently I am taking daily snapshot on my keyspace in production and
already enable the incremental backups as well.

According to the documentation, the incremental backup option will create an
hard-link to the backup folder when new sstable is flushed. Snapshot will
copy all the data/index/etc. files to a new folder.

*Question:*
What will happen (with enabling the incremental backup) when crash (due to
any reason) the Cassandra before flushing the data as a SSTable (inserted
data still in commitlog). In this case how can I backup/restore data?

Do I need to backup the commitlogs as well and and replay during the server
start to restore the data in commitlog files?

Thanks.



--
View this message in context: 
http://cassandra-user-incubator-apache-org.3065146.n2.nabble.com/Cassandra-backup-queston-regarding-commitlogs-tp7508823.html
Sent from the cassandra-u...@incubator.apache.org mailing list archive at 
Nabble.com.


nodetool repair cassandra 0.8.4 HELP!!!

2012-04-28 Thread Raj N
I have a 6 node cassandra cluster DC1=3, DC2=3 with 60 GB data on each
node. I was bulk loading data over the weekend. But we forgot to turn off
the weekly nodetool repair job. As a result, repair was interfering when we
were bulk loading data. I canceled repair by restarting the nodes. But
unfortunately after the restart it looks like I dont have any data on those
nodes when I use list on cassandra-cli. I ran repair on one of the effected
nodes, but repair seems to be taking forever. Disk space has almost
tripled. I stopped the repair again in fear of running out of disk space.
After restart, the disk space is at 50% where as the good nodes are at 25%.
How should I proceed from here.  When I run list on cassandra-cli I do see
data on the effected node. But how can I be sure I have all the
data. Should I run repair again. Should I cleanup the disk by clearing
snapshots. Or should I just drop column families and bulk load the data
again?

Thanks
-Raj


Re: Can column type be changed dynamically?

2012-04-28 Thread Paolo Bernardi
Apparently IntegerType is based on Java's BigInteger.

http://git-wip-us.apache.org/repos/asf?p=cassandra.git;a=blob_plain;f=src/java/org/apache/cassandra/db/marshal/IntegerType.java;hb=HEAD

Given the message, I suspect that you got some values between -2^15 and
2^15-1 (the range of a short int) that have been serialized with two bytes.
Any confirmation on this?

If this is true, changing the type like you tried to do might not be so
straightforward.

Paolo
On Apr 27, 2012 6:55 PM, 马超 hossc...@gmail.com wrote:

 After I update the column type:

 *update column family User with column_metadata = [{column_name : 77,
 validation_class : Int32Type}];*

 I can't list the data in User column family:

 *list User;*
 *
 *
 *RowKey: 1234*
 *A int is exactly 4 bytes: 2*

 Any ideas for this?

 Thanks,

 2012/4/27 马超 hossc...@gmail.com

 Thanks a lot!
 I will go ahead~


 2012/4/27 Sylvain Lebresne sylv...@datastax.com

 On Fri, Apr 27, 2012 at 5:26 PM, 马超 hossc...@gmail.com wrote:
  Hi all,
 
  I want to change one of my column type from IntegerType to Int32Type
  dynamically. I'm sure all datas in that column are int32 type indeed.
 So I
  want changing the column type by:
 
  update column family XXX with column_metadata = [{column_name : 'xxx',
  validation_class : Int32Type}];
 
  Is there any harm to do this?

 There isn't (as long as you're right to be sure of course).

 --
 Sylvain