Re: is upgradesstables required (or recommended) upon update column family ?

2012-07-28 Thread Radim Kolar


is upgradesstables required upon update column family with 
compression_options (or compaction_strategy) ?

for compaction strategy no, not use about other one.


Re: is upgradesstables required (or recommended) upon update column family ?

2012-07-28 Thread Sylvain Lebresne
On Thu, Jul 26, 2012 at 6:00 PM, Илья Шипицин chipits...@gmail.com wrote:
 is upgradesstables required upon update column family with
 compression_options (or compaction_strategy) ?

It is not required, no. If you change compression_options, the new
settings will only apply to newly created sstables. upgradesstables is
just a way to force recreating all sstables and so to force the new
compression settings for existing sstables. If you don't run it, you
will have to wait for your old sstables to get compacted to be
compressed (which might be perfectly fine for you).

As for changing compaction_strategy, upgradesstables has no impact
whatsoever on that, so there is no reason to run it in that case.

--
Sylvain


Re: Questions regarding DataStax AMI

2012-07-28 Thread Tamar Fraenkel
Thanks!
This worked fine!

*Tamar Fraenkel *
Senior Software Engineer, TOK Media

[image: Inline image 1]

ta...@tok-media.com
Tel:   +972 2 6409736
Mob:  +972 54 8356490
Fax:   +972 2 5612956





On Sat, Jul 28, 2012 at 7:10 AM, Joaquin Casares joaq...@datastax.comwrote:

 Oh you're right, sorry about that. The concept of keeping older packages
 was recently implemented and while using --version community, you would
 need --release 1.0 in order to get 1.0.10.

 If you are using --version enterprise, you can use --release 2.0 to get
 DataStax Enterprise 2.0 which comes bundled with 1.0.8. As long as you
 don't include --analyticsnodes or --searchnodes, you will get vanilla
 Cassandra.

 As of now, those are the only options available.

 Thanks for pointing that out and sorry about the confusion,

 Joaquin Casares
 DataStax
 Software Engineer/Support



 On Fri, Jul 27, 2012 at 3:50 AM, Tamar Fraenkel ta...@tok-media.comwrote:

 HI!
 I tried starting a cluster with
 Cluster started with these options:
 --clustername Name --totalnodes 3 --version community --release 1.0.8

 But Cassandra's version is 1.1.2
 Thanks

 *Tamar Fraenkel *
 Senior Software Engineer, TOK Media

 [image: Inline image 1]


 ta...@tok-media.com
 Tel:   +972 2 6409736
 Mob:  +972 54 8356490
 Fax:   +972 2 5612956





 On Thu, Jul 26, 2012 at 9:56 PM, Tamar Fraenkel ta...@tok-media.comwrote:

 What should be the value to create it with Cassandra 1.0.8
 Tamar

 Sent from my iPod

 On Jul 26, 2012, at 7:06 PM, Joaquin Casares joaq...@datastax.com
 wrote:

 Yes, you can easily do this by using the --release version switch as
 found here:
 http://www.datastax.com/docs/1.0/install/install_ami

 Thanks,

 Joaquin Casares
 DataStax
 Software Engineer/Support



 On Thu, Jul 26, 2012 at 12:44 AM, Tamar Fraenkel ta...@tok-media.comwrote:

 Hi!
 Is there a way to launch EC2 cluster from DataStax latest community AMI
 that will run Cassandra 1.0.8 and not 1.1.2?
 Thanks
  *Tamar Fraenkel *
 Senior Software Engineer, TOK Media

 tokLogo.png


 ta...@tok-media.com
 Tel:   +972 2 6409736
 Mob:  +972 54 8356490
 Fax:   +972 2 5612956








tokLogo.pngtokLogo.png

Re: Creating counter columns in cassandra

2012-07-28 Thread Amila Paranawithana
Thanks Tamar and all.. :)
Since I want to do queries like SELECT * FROM counters WHERE
CounterColumnName1; I want to index my counter columns, and I use the
following code. But I get the following error
Exception in thread main
me.prettyprint.hector.api.exceptions.HInvalidRequestException:
InvalidRequestException(why:No indexed columns present in by-columns clause
with equals operator)

void indexColumn(String idxColumnName,String CountercfName){

Cluster cluster = HFactory.getOrCreateCluster(
BasicConf.CASSANDRA_CLUSTER, BasicConf.CLUSTER_PORT);
KeyspaceDefinition keyspaceDefinition =
cluster.describeKeyspace(BasicConf.KEYSPACE);

ListColumnFamilyDefinition cdfs = keyspaceDefinition.getCfDefs();
ColumnFamilyDefinition cfd = null;
for(ColumnFamilyDefinition c:cdfs){
if(c.getName().toString().equals(CountercfName)) {
System.out.println(c.getName());
cfd=c;
break;
}
}

BasicColumnFamilyDefinition columnFamilyDefinition = new
BasicColumnFamilyDefinition(cfd);

BasicColumnDefinition bcdf = new BasicColumnDefinition();
bcdf.setName(StringSerializer.get().toByteBuffer(idxColumnName));
bcdf.setIndexName(idxColumnName+index);
bcdf.setIndexType(ColumnIndexType.KEYS);
bcdf.setValidationClass(ComparatorType.COUNTERTYPE.getClassName());

columnFamilyDefinition.addColumnDefinition(bcdf);
cluster.updateColumnFamily(new ThriftCfDef(columnFamilyDefinition));

}


On Thu, Jul 26, 2012 at 7:06 PM, Vivek Mishra mishra.v...@gmail.com wrote:

 Check out Kundera for Counter column support. Here is the link for Counter
 column tests:


 https://github.com/impetus-opensource/Kundera/tree/kundera-2.0.7/kundera-cassandra/src/test/java/com/impetus/client/crud/countercolumns


 -Vivek


 On Thu, Jul 26, 2012 at 12:27 PM, Abhijit Chanda 
 abhijit.chan...@gmail.com wrote:

 You can check Astyanax API

 https://github.com/Netflix/astyanax/blob/5c05d118e22eef541a7a201adf7c1c610da13f5b/src/test/java/com/netflix/astyanax/thrift/ThrifeKeyspaceImplTest.java
 There are some counter column example which will surely help you.





-- 
Amila Iroshani Paranawithana
CSE-University of Moratuwa.
B-http://amilaparanawithana.blogspot.com
T-https://twitter.com/#!/AmilaPara


Re: RF on per column family basis ?

2012-07-28 Thread Pierre-Yves Ritschard
On Sat, Jul 28, 2012 at 10:46 PM, Ertio Lew ertio...@gmail.com wrote:
 Is it possible to set Replication Factor on per column family basis so that
 I can avoid replicating large text data or other not-so-important data in
 CFs with low RF?

 I use hector API.

Replication factor is keyspace bound, not CF bound. You can have
several keyspaces on a single cluster though and distribute your CFs
accross these keyspaces.


Re: RF on per column family basis ?

2012-07-28 Thread Ertio Lew
I heard that it is* not highly recommended* to create more than a single
keyspace for an application or on a single cluster !?

Moreover I fail to understand that why Cassandra puts this limitation to
set RF on keyspace when, I guess, it makes more sense to do this on per CF
basis !?