Re:Re: can one keyspace has two groups of "initial_token"?

2011-12-18 Thread 魏金仙
Thank you very much!
Could you please tell why the developers choose the design that token is a 
cluster setting but not a column family one?



At 2011-12-18 01:44:23,"Edward Capriolo"  wrote:
No. Token and partitioner are cluster wide settings. You have to run multiple 
instances of Cassandra.


2011/12/17 魏金仙 

My question is whether two groups of "initial_token" can coexist since our goal 
is to partition data of each column family uniformly on 5 nodes.

 I deployed Cassandra 0.7.4 on a cluster of 5 nodes, using 
orderPreservingPartitioner. Two column families named CF1 and CF2 are created 
on one keyspace.  Keys of CF1 go as a0,a1,a2,a3... while those of CF2 are 
b0,b1,b2
Assume that the initial_tokens should be set as a0,a2,a4,a6,a8 if you want to 
achieve load balance of CF1 and as b0,b2,b4,b6,b8 for CF2.
Is it possible two set "initial_token" as: initial_token: a0,b0?

Thank you!







Re: Re: can one keyspace has two groups of "initial_token"?

2011-12-18 Thread Edward Capriolo
It has been mentioned before. In a nutshell the answer is "Do not use
ByteOrderPartitioner". It has the problem you mentioned multiple-column
families with different distributions as well as hot-spot problems.

Moving the token data to a column family level would be a large change. it
only helps the BOP/OOP, which along with supercolumns are highly NOT
suggested in all cases, but people still seem to gravitate to them.



2011/12/18 魏金仙 

> Thank you very much!
> Could you please tell why the developers choose the design that token is a
> cluster setting but not a column family one?
>
>
> At 2011-12-18 01:44:23,"Edward Capriolo"  wrote:
>
> No. Token and partitioner are cluster wide settings. You have to run
> multiple instances of Cassandra.
>
> 2011/12/17 魏金仙 
>
>> My question is whether two groups of "initial_token" can coexist since
>> our goal is to partition data of each column family uniformly on 5 nodes.
>>
>>  I deployed Cassandra 0.7.4 on a cluster of 5 nodes, using
>> orderPreservingPartitioner. Two column families named CF1 and CF2 are
>> created on one keyspace.  Keys of CF1 go as a0,a1,a2,a3... while those of
>> CF2 are b0,b1,b2
>> Assume that the initial_tokens should be set as a0,a2,a4,a6,a8 if you
>> want to achieve load balance of CF1 and as b0,b2,b4,b6,b8 for CF2.
>> Is it possible two set "initial_token" as: initial_token: a0,b0?
>>
>> Thank you!
>>
>>
>>
>
>
>


Re: memory estimate for each key in the key cache

2011-12-18 Thread Guy Incognito
to be blunt, this doesn't sound right to me, unless it's doing something 
rather more clever to manage the memory.


i mocked up a simple class containing a byte[], ByteBuffer and long, and 
the shallow size alone is 32 bytes.  deep size with a byte[16], 1-byte 
bytebuffer and long is 132.  this is a on a 64-bit jvm on win x64, but 
is consistent(ish) with what i've seen in the past on linux jvms.  the 
actual code has rather more objects than this (it's a map, it has a 
pair, decoratedKey) so would be quite a bit bigger per key.


On 17/12/2011 03:42, Brandon Williams wrote:

On Fri, Dec 16, 2011 at 9:31 PM, Dave Brosius  wrote:

Wow, Java is a lot better than I thought if it can perform that kind of
magic.  I'm guessing the wiki information is just old and out of date. It's
probably more like 60 + sizeof(key)

With jamm and MAT it's fairly easy to test.  The number is accurate
last I checked.

-Brandon




Re: CPU bound workload

2011-12-18 Thread Peter Schuller
>> I would first eliminate or confirm any GC hypothesis by running all
>> nodes with -XX:+PrintGC -XX:+PrintGCDetails -XX:+PrintGCTimeStamps
>> -XX:+PrintGCDateStamps.
>
> Is full GC not being logged through GCInspector with the defaults ?

The GC inspect tries its best, but it's polling. Unfortunately the JDK
provides no way to properly monitor for GC events within the Java
application. The GC inspector can miss a GC.

Also, the GC inspector only tells you time + type of GC; a GC log will
provide all sorts of details.


-- 
/ Peter Schuller (@scode, http://worldmodscode.wordpress.com)