Re: Regarding SSTableSplit Utility

2015-02-06 Thread Robert Coli
On Fri, Feb 6, 2015 at 1:15 AM, Parth Setya setya.pa...@gmail.com wrote:

 SSTable split gives the following error


 *Exception in thread main java.lang.OutOfMemoryError: GC overhead limit
 exceede
 d *


How much heap is available to the JVM sstablesplit is running in? Increase
it.


 *Cassandra Version: 2.0.3*


This version has serious known bugs, update to the most recent 2.0.x
version ASAP.


 Also does sstablesplit internally invoke compaction?


The source code is available... :D

As a safety note, please be sure to run sstablesplit either outside of the
data directory or with the cassandra node stopped.

=Rob


Re: Mutable primary key in a table

2015-02-06 Thread Ajaya Agrawal
On Fri, Feb 6, 2015 at 7:43 PM, Adil adil.cha...@gmail.com wrote:

 Hi,
 it seems you are doing some thing wrong in your model, why can you go with
 updating columns of key1 instead of deleting/inserting row key?


You can't update a primary key column with update statements.


Regarding SSTableSplit Utility

2015-02-06 Thread Parth Setya
Hello people

SSTable split gives the following error































*Exception in thread main java.lang.OutOfMemoryError: GC overhead limit
exceede
d at
com.googlecode.concurrentlinkedhashmap.ConcurrentLinkedHashMap.drainB
uffers(ConcurrentLinkedHashMap.java:434) at
com.googlecode.concurrentlinkedhashmap.ConcurrentLinkedHashMap.tryToD
rainBuffers(ConcurrentLinkedHashMap.java:412) at
com.googlecode.concurrentlinkedhashmap.ConcurrentLinkedHashMap.afterC
ompletion(ConcurrentLinkedHashMap.java:344) at
com.googlecode.concurrentlinkedhashmap.ConcurrentLinkedHashMap.put(Co
ncurrentLinkedHashMap.java:771) at
com.googlecode.concurrentlinkedhashmap.ConcurrentLinkedHashMap.put(Co
ncurrentLinkedHashMap.java:743) at
org.apache.cassandra.cache.ConcurrentLinkedHashCache.put(ConcurrentLi
nkedHashCache.java:101) at
org.apache.cassandra.cache.ConcurrentLinkedHashCache.put(ConcurrentLi
nkedHashCache.java:27) at
org.apache.cassandra.cache.InstrumentingCache.put(InstrumentingCache.
java:44) at
org.apache.cassandra.cache.AutoSavingCache.loadSaved(AutoSavingCache.
java:130) at
org.apache.cassandra.db.ColumnFamilyStore.init(ColumnFamilyStore.ja
va:264) at
org.apache.cassandra.db.ColumnFamilyStore.createColumnFamilyStore(Col
umnFamilyStore.java:415) at
org.apache.cassandra.db.ColumnFamilyStore.createColumnFamilyStore(Col
umnFamilyStore.java:387) at
org.apache.cassandra.db.Keyspace.initCf(Keyspace.java:314) at
org.apache.cassandra.db.Keyspace.init(Keyspace.java:268) at
org.apache.cassandra.db.Keyspace.open(Keyspace.java:110) at
org.apache.cassandra.db.Keyspace.open(Keyspace.java:88) at
org.apache.cassandra.service.StorageService.getLoad(StorageService.ja
va:1899) at
org.apache.cassandra.db.compaction.CompactionInfo$Holder.init(Compa
ctionInfo.java:124) at
org.apache.cassandra.db.compaction.AbstractCompactionIterable.init(
AbstractCompactionIterable.java:40) at
org.apache.cassandra.db.compaction.CompactionIterable.init(Compacti
onIterable.java:42) at
org.apache.cassandra.db.compaction.CompactionTask.runWith(CompactionT
ask.java:126) at
org.apache.cassandra.io.util.DiskAwareRunnable.runMayThrow(DiskAwareR
unnable.java:48) at
org.apache.cassandra.utils.WrappedRunnable.run(WrappedRunnable.java:2
8) at
org.apache.cassandra.db.compaction.CompactionTask.executeInternal(Com
pactionTask.java:60) at
org.apache.cassandra.db.compaction.AbstractCompactionTask.execute(Abs
tractCompactionTask.java:59) at
org.apache.cassandra.db.compaction.SSTableSplitter.split(SSTableSplit
ter.java:38) at
org.apache.cassandra.tools.StandaloneSplitter.main(StandaloneSplitter
.java:150) *

*Cassandra Version: 2.0.3*

*Size of sstable : 2 GB*
*Note: I ran a major compaction before running this command.*


How can I fix this?

Also does sstablesplit internally invoke compaction?

Best
Parth


Re: Writing the same column frequently - anti pattern?

2015-02-06 Thread Jens Rantil
Hi,

If the writes are coming from the same machine, you could potentially
use request
collapsing
https://github.com/Netflix/Hystrix/wiki/How-To-Use#request-collapsing to
avoid the duplicate writes.

Just an idea,
Jens

On Fri, Feb 6, 2015 at 1:15 AM, Andreas Finke andreas.fi...@solvians.com
wrote:

  Hi,

  we are currently writing the same column within a row multiple times (up
 to 10 times a second). I am familiar with the concept of tombstones in
 SSTables. My question is: I assume that in our case in most cases when a
 column gets overwritten it still resides in the memtable. So I assume for
 that particular case no tombstone is set but the column is replaced in
 memory and then the 'newest' version is flushed to disk.

  Is this assumption correct? Or Is writing the same column an an
 anti-pattern?

  I am thankful for any input.

  Regards
 Andi




-- 
Jens Rantil
Backend engineer
Tink AB

Email: jens.ran...@tink.se
Phone: +46 708 84 18 32
Web: www.tink.se

Facebook https://www.facebook.com/#!/tink.se Linkedin
http://www.linkedin.com/company/2735919?trk=vsrp_companies_res_phototrkInfo=VSRPsearchId%3A1057023381369207406670%2CVSRPtargetId%3A2735919%2CVSRPcmpt%3Aprimary
 Twitter https://twitter.com/tink


how to batch the select query to reduce network communication

2015-02-06 Thread diwayou
create table t {
a int,
b int,
c int
}
if i want to execute 
select * from t where a = 1 and b = 2 limit 10;
select * from t where a = 1 and b = 3 limit 10;


how can i batch this, and only execute once to get the result

Mutable primary key in a table

2015-02-06 Thread Ajaya Agrawal
Hi guys,

I want to take a row with primary key K1, rewrite it with primary key K2,
and delete the original data with key K1, atomically.

It seems like the only solution which won't have race conditions is to use
batch statement to delete the old row and insert the new one. But the
documentation of batch operation makes me nervous. The specific parts in
docs are the ones which say that all nodes in your cluster become stressed
if you use logged batches(default one).

Is it a solved problem already?
Cheers,
Ajaya


Re: Mutable primary key in a table

2015-02-06 Thread Adil
Hi,
it seems you are doing some thing wrong in your model, why can you go with
updating columns of key1 instead of deleting/inserting row key?

2015-02-06 15:02 GMT+01:00 Ajaya Agrawal ajku@gmail.com:

 Hi guys,

 I want to take a row with primary key K1, rewrite it with primary key K2,
 and delete the original data with key K1, atomically.

 It seems like the only solution which won't have race conditions is to use
 batch statement to delete the old row and insert the new one. But the
 documentation of batch operation makes me nervous. The specific parts in
 docs are the ones which say that all nodes in your cluster become stressed
 if you use logged batches(default one).

 Is it a solved problem already?
 Cheers,
 Ajaya



Re: how to batch the select query to reduce network communication

2015-02-06 Thread Carlos Rolo
Hi,

You can't. Batches are only available for INSERT, UPDATE and DELETE
operations. Batches exist to give Cassandra some atomicity, as in, or all
operations succeed or all fail.

Regards,

Regards,

Carlos Juzarte Rolo
Cassandra Consultant

Pythian - Love your data

rolo@pythian | Twitter: cjrolo | Linkedin: *linkedin.com/in/carlosjuzarterolo
http://linkedin.com/in/carlosjuzarterolo*
Tel: 1649
www.pythian.com

On Fri, Feb 6, 2015 at 12:21 PM, diwayou diwa...@vip.qq.com wrote:

 create table t {
 a int,
 b int,
 c int
 }
 if i want to execute
 select * from t where a = 1 and b = 2 limit 10;
 select * from t where a = 1 and b = 3 limit 10;

 how can i batch this, and only execute once to get the result


-- 


--





Re: how to batch the select query to reduce network communication

2015-02-06 Thread Jens Rantil
As an alternative, you could always execute the async to Cassandra and then
iterate over the results as they come in.

Cheers,
Jens

On Fri, Feb 6, 2015 at 12:39 PM, Carlos Rolo r...@pythian.com wrote:

 Hi,

 You can't. Batches are only available for INSERT, UPDATE and DELETE
 operations. Batches exist to give Cassandra some atomicity, as in, or all
 operations succeed or all fail.

 Regards,

 Regards,

 Carlos Juzarte Rolo
 Cassandra Consultant

 Pythian - Love your data

 rolo@pythian | Twitter: cjrolo | Linkedin: *linkedin.com/in/carlosjuzarterolo
 http://linkedin.com/in/carlosjuzarterolo*
 Tel: 1649
 www.pythian.com

 On Fri, Feb 6, 2015 at 12:21 PM, diwayou diwa...@vip.qq.com wrote:

 create table t {
 a int,
 b int,
 c int
 }
 if i want to execute
 select * from t where a = 1 and b = 2 limit 10;
 select * from t where a = 1 and b = 3 limit 10;

 how can i batch this, and only execute once to get the result



 --






-- 
Jens Rantil
Backend engineer
Tink AB

Email: jens.ran...@tink.se
Phone: +46 708 84 18 32
Web: www.tink.se

Facebook https://www.facebook.com/#!/tink.se Linkedin
http://www.linkedin.com/company/2735919?trk=vsrp_companies_res_phototrkInfo=VSRPsearchId%3A1057023381369207406670%2CVSRPtargetId%3A2735919%2CVSRPcmpt%3Aprimary
 Twitter https://twitter.com/tink