Cassandra 0.6.3 ring not balance in terms of data size

2011-03-17 Thread Ali Ahsan

Hi All

We are running Cassandra 0.6.3,We have two node's with replication 
factor one and ordered partitioning.Problem we are facing at the moment 
all data is being send to one Cassandra node  and its filling up quite 
rapidly and we are short of disk space.Unfortunately we have hardware 
constrain and we cannot add more hard disks.my current ring situation is 
that one node contain 89 GB and other have only 500 MB we are not able 
to sort this out why this is happening.Please give suggestion how can we 
solve this issue asap.


--
S.Ali Ahsan

Senior System Engineer

e-Business (Pvt) Ltd

49-C Jail Road, Lahore, P.O. Box 676
Lahore 54000, Pakistan

Tel: +92 (0)42 3758 7140 Ext. 128

Mobile: +92 (0)345 831 8769

Fax: +92 (0)42 3758 0027

Email: ali.ah...@panasiangroup.com



www.ebusiness-pg.com

www.panasiangroup.com

Confidentiality: This e-mail and any attachments may be confidential
and/or privileged. If you are not a named recipient, please notify the
sender immediately and do not disclose the contents to another person
use it for any purpose or store or copy the information in any medium.
Internet communications cannot be guaranteed to be timely, secure, error
or virus-free. We do not accept liability for any errors or omissions.



Re: Cassandra 0.6.3 ring not balance in terms of data size

2011-03-17 Thread aaron morton
With the Order Preserving Partitioner you are responsible for balancing the 
rows around the cluster, 
http://wiki.apache.org/cassandra/Operations?highlight=%28partitioner%29#Token_selection
 

Was there a reason for using the ordered partitioner rather than the random 
one?  

What does the output from nodetool ring look like ? 

You can change the token for the small node so that it takes ownership of more 
of the data see http://wiki.apache.org/cassandra/Operations#Moving_nodes You 
will need to understand the row keys you are using and pick the token 
appropriately. 

Hope that helps. 
Aaron

On 17 Mar 2011, at 22:50, Ali Ahsan wrote:

 Hi All
 
 We are running Cassandra 0.6.3,We have two node's with replication factor one 
 and ordered partitioning.Problem we are facing at the moment all data is 
 being send to one Cassandra node  and its filling up quite rapidly and we are 
 short of disk space.Unfortunately we have hardware constrain and we cannot 
 add more hard disks.my current ring situation is that one node contain 89 GB 
 and other have only 500 MB we are not able to sort this out why this is 
 happening.Please give suggestion how can we solve this issue asap.
 
 -- 
 S.Ali Ahsan
 
 Senior System Engineer
 
 e-Business (Pvt) Ltd
 
 49-C Jail Road, Lahore, P.O. Box 676
 Lahore 54000, Pakistan
 
 Tel: +92 (0)42 3758 7140 Ext. 128
 
 Mobile: +92 (0)345 831 8769
 
 Fax: +92 (0)42 3758 0027
 
 Email: ali.ah...@panasiangroup.com
 
 
 
 www.ebusiness-pg.com
 
 www.panasiangroup.com
 
 Confidentiality: This e-mail and any attachments may be confidential
 and/or privileged. If you are not a named recipient, please notify the
 sender immediately and do not disclose the contents to another person
 use it for any purpose or store or copy the information in any medium.
 Internet communications cannot be guaranteed to be timely, secure, error
 or virus-free. We do not accept liability for any errors or omissions.
 



Re: Cassandra 0.6.3 ring not balance in terms of data size

2011-03-17 Thread Ali Ahsan

Below is the ouput of nodetool ring

Address   Status Load  
Range  Ring

   TuL8jLqs7uxLipP6
192.168.100.3 Up 89.91 GB  
JDtVOU0YVQ6MtBYA   |--|
192.168.100.4 Up 487.41 MB 
TuL8jLqs7uxLipP6   |--|


Reasons for using ordered partitioner because we wanted range slices and 
while keeping the order of the keys.




On 03/17/2011 03:40 PM, aaron morton wrote:
With the Order Preserving Partitioner you are responsible for 
balancing the rows around the cluster, 
http://wiki.apache.org/cassandra/Operations?highlight=%28partitioner%29#Token_selection 



Was there a reason for using the ordered partitioner rather than the 
random one?


What does the output from nodetool ring look like ?

You can change the token for the small node so that it takes ownership 
of more of the data see 
http://wiki.apache.org/cassandra/Operations#Moving_nodes 
http://wiki.apache.org/cassandra/Operations?highlight=%28partitioner%29#Moving_nodes You 
will need to understand the row keys you are using and pick the token 
appropriately.


Hope that helps.
Aaron

On 17 Mar 2011, at 22:50, Ali Ahsan wrote:


Hi All

We are running Cassandra 0.6.3,We have two node's with replication 
factor one and ordered partitioning.Problem we are facing at the 
moment all data is being send to one Cassandra node  and its filling 
up quite rapidly and we are short of disk space.Unfortunately we have 
hardware constrain and we cannot add more hard disks.my current ring 
situation is that one node contain 89 GB and other have only 500 MB 
we are not able to sort this out why this is happening.Please give 
suggestion how can we solve this issue asap.


--
S.Ali Ahsan

Senior System Engineer

e-Business (Pvt) Ltd

49-C Jail Road, Lahore, P.O. Box 676
Lahore 54000, Pakistan

Tel: +92 (0)42 3758 7140 Ext. 128

Mobile: +92 (0)345 831 8769

Fax: +92 (0)42 3758 0027

Email: ali.ah...@panasiangroup.com mailto:ali.ah...@panasiangroup.com



www.ebusiness-pg.com http://www.ebusiness-pg.com

www.panasiangroup.com

Confidentiality: This e-mail and any attachments may be confidential
and/or privileged. If you are not a named recipient, please notify the
sender immediately and do not disclose the contents to another person
use it for any purpose or store or copy the information in any medium.
Internet communications cannot be guaranteed to be timely, secure, error
or virus-free. We do not accept liability for any errors or omissions.






--
S.Ali Ahsan

Senior System Engineer

e-Business (Pvt) Ltd

49-C Jail Road, Lahore, P.O. Box 676
Lahore 54000, Pakistan

Tel: +92 (0)42 3758 7140 Ext. 128

Mobile: +92 (0)345 831 8769

Fax: +92 (0)42 3758 0027

Email: ali.ah...@panasiangroup.com



www.ebusiness-pg.com

www.panasiangroup.com

Confidentiality: This e-mail and any attachments may be confidential
and/or privileged. If you are not a named recipient, please notify the
sender immediately and do not disclose the contents to another person
use it for any purpose or store or copy the information in any medium.
Internet communications cannot be guaranteed to be timely, secure, error
or virus-free. We do not accept liability for any errors or omissions.



Re: Cassandra 0.6.3 ring not balance in terms of data size

2011-03-17 Thread Ali Ahsan

Dear Aaron,

We are little confused about OPP token.How to calculate OPP Token? Few 
of our column families have UUID as key and other's  have  integer as key.



On 03/17/2011 04:22 PM, Ali Ahsan wrote:

Below is the ouput of nodetool ring

Address   Status Load  
Range  Ring

   TuL8jLqs7uxLipP6
192.168.100.3 Up 89.91 GB  
JDtVOU0YVQ6MtBYA   |--|
192.168.100.4 Up 487.41 MB 
TuL8jLqs7uxLipP6   |--|


Reasons for using ordered partitioner because we wanted range slices 
and while keeping the order of the keys.




On 03/17/2011 03:40 PM, aaron morton wrote:
With the Order Preserving Partitioner you are responsible for 
balancing the rows around the cluster, 
http://wiki.apache.org/cassandra/Operations?highlight=%28partitioner%29#Token_selection 



Was there a reason for using the ordered partitioner rather than the 
random one?


What does the output from nodetool ring look like ?

You can change the token for the small node so that it takes 
ownership of more of the data see 
http://wiki.apache.org/cassandra/Operations#Moving_nodes 
http://wiki.apache.org/cassandra/Operations?highlight=%28partitioner%29#Moving_nodes You 
will need to understand the row keys you are using and pick the token 
appropriately.


Hope that helps.
Aaron

On 17 Mar 2011, at 22:50, Ali Ahsan wrote:


Hi All

We are running Cassandra 0.6.3,We have two node's with replication 
factor one and ordered partitioning.Problem we are facing at the 
moment all data is being send to one Cassandra node  and its filling 
up quite rapidly and we are short of disk space.Unfortunately we 
have hardware constrain and we cannot add more hard disks.my current 
ring situation is that one node contain 89 GB and other have only 
500 MB we are not able to sort this out why this is happening.Please 
give suggestion how can we solve this issue asap.


--
S.Ali Ahsan

Senior System Engineer

e-Business (Pvt) Ltd

49-C Jail Road, Lahore, P.O. Box 676
Lahore 54000, Pakistan

Tel: +92 (0)42 3758 7140 Ext. 128

Mobile: +92 (0)345 831 8769

Fax: +92 (0)42 3758 0027

Email: ali.ah...@panasiangroup.com mailto:ali.ah...@panasiangroup.com



www.ebusiness-pg.com http://www.ebusiness-pg.com

www.panasiangroup.com

Confidentiality: This e-mail and any attachments may be confidential
and/or privileged. If you are not a named recipient, please notify the
sender immediately and do not disclose the contents to another person
use it for any purpose or store or copy the information in any medium.
Internet communications cannot be guaranteed to be timely, secure, error
or virus-free. We do not accept liability for any errors or omissions.






--
S.Ali Ahsan

Senior System Engineer

e-Business (Pvt) Ltd

49-C Jail Road, Lahore, P.O. Box 676
Lahore 54000, Pakistan

Tel: +92 (0)42 3758 7140 Ext. 128

Mobile: +92 (0)345 831 8769

Fax: +92 (0)42 3758 0027

Email:ali.ah...@panasiangroup.com



www.ebusiness-pg.com

www.panasiangroup.com

Confidentiality: This e-mail and any attachments may be confidential
and/or privileged. If you are not a named recipient, please notify the
sender immediately and do not disclose the contents to another person
use it for any purpose or store or copy the information in any medium.
Internet communications cannot be guaranteed to be timely, secure, error
or virus-free. We do not accept liability for any errors or omissions.



--
S.Ali Ahsan

Senior System Engineer

e-Business (Pvt) Ltd

49-C Jail Road, Lahore, P.O. Box 676
Lahore 54000, Pakistan

Tel: +92 (0)42 3758 7140 Ext. 128

Mobile: +92 (0)345 831 8769

Fax: +92 (0)42 3758 0027

Email: ali.ah...@panasiangroup.com



www.ebusiness-pg.com

www.panasiangroup.com

Confidentiality: This e-mail and any attachments may be confidential
and/or privileged. If you are not a named recipient, please notify the
sender immediately and do not disclose the contents to another person
use it for any purpose or store or copy the information in any medium.
Internet communications cannot be guaranteed to be timely, secure, error
or virus-free. We do not accept liability for any errors or omissions.



Re: Cassandra 0.6.3 ring not balance in terms of data size

2011-03-17 Thread Ali Ahsan

Please can any one give their comment on this

On 03/17/2011 07:02 PM, Ali Ahsan wrote:

Dear Aaron,

We are little confused about OPP token.How to calculate OPP Token? Few 
of our column families have UUID as key and other's  have  integer as key.






Re: Cassandra 0.6.3 ring not balance in terms of data size

2011-03-17 Thread Ching-Cheng Chen
From OrderPreservingPartition.java

public StringToken getToken(ByteBuffer key)
{
String skey;
try
{
skey = ByteBufferUtil.string(key, Charsets.UTF_8);
}
catch (CharacterCodingException e)
{
throw new RuntimeException(The provided key was not UTF8
encoded., e);
}
return new StringToken(skey);
}

Regards,

Chen

Senior Developer, EvidentSoftware(Leaders in Monitoring of NoSQL  JAVA )

http://www.evidentsoftware.com



On Thu, Mar 17, 2011 at 2:06 PM, Ali Ahsan ali.ah...@panasiangroup.comwrote:

  Please can any one give their comment on this

 On 03/17/2011 07:02 PM, Ali Ahsan wrote:

 Dear Aaron,

 We are little confused about OPP token.How to calculate OPP Token? Few of
 our column families have UUID as key and other's  have  integer as key.