Deletion use more space.

2013-07-16 Thread 杨辉强
Hi, all:
  I use cassandra 1.2.4 and I have 4 nodes ring and use byte order partitioner.
  I had inserted about 200G data in the ring previous days.

  Today I write a program to scan the ring and then at the same time delete the 
items that are scanned.
  To my surprise, the cassandra cost more disk usage.

   Anybody can tell me why? Thanks.


cassandra GC cpu usage

2013-07-16 Thread Jure Koren
Hi C* user list,

I have a curious recurring problem with Cassandra 1.2 and what seems like a GC 
issue.

The cluster looks somewhat well balanced, all nodes are running HotSpot JVM 
1.6.0_31-b04 and cassandra 1.2.3.

Address RackStatus State   LoadOwns   
10.2.3.6RAC6Up Normal  15.13 GB12.71% 
10.2.3.5RAC5Up Normal  16.87 GB13.57% 
10.2.3.8RAC8Up Normal  13.27 GB13.71% 
10.2.3.1RAC1Up Normal  16.46 GB14.08% 
10.2.3.7RAC7Up Normal  11.59 GB14.34% 
10.2.3.2RAC2Up Normal  23.15 GB15.12% 
10.2.3.4RAC4Up Normal  16.52 GB16.47% 

Every now and then (roughly once a month, currently), two nodes (always the 
same two) need to be restarted after they start eating all available CPU 
cycles and read and write latencies increase dramatically. Restart fixes this 
every time.

The only metric that significantly deviates from the average for all nodes 
shows GC doing something: http://bou.si/rest/parnew.png

Is there a way to debug this? After searching online it appears as nobody has 
really solved this problem and I have no idea what could cause such behaviour 
in just two particular cluster nodes.

I'm now thinking of decomissioning the problematic nodes and bootstrapping 
them anew, but can't decide if this could possibly help.

Thanks in advance for any insight anyone might offer,

-- 
Jure Koren, DevOps
http://www.zemanta.com/


Re: Deletion use more space.

2013-07-16 Thread Michał Michalski
Deletion is not really "removing" data, but it's adding tombstones 
(markers) of deletion. They'll be later merged with existing data during 
compaction and - in the end (see: gc_grace_seconds) - removed, but by 
this time they'll take some space.


http://wiki.apache.org/cassandra/DistributedDeletes

M.

W dniu 16.07.2013 11:46, 杨辉强 pisze:

Hi, all:
   I use cassandra 1.2.4 and I have 4 nodes ring and use byte order partitioner.
   I had inserted about 200G data in the ring previous days.

   Today I write a program to scan the ring and then at the same time delete 
the items that are scanned.
   To my surprise, the cassandra cost more disk usage.

Anybody can tell me why? Thanks.





Re: Deletion use more space.

2013-07-16 Thread 杨辉强
Hi, 
  I use the follow cmd to update gc_grace_seconds. It reports error! Why?

[default@WebSearch] update column family ScheduleInfoCF with gc_grace_seconds = 
3600;
java.lang.IllegalArgumentException: No enum const class 
org.apache.cassandra.cli.CliClient$ColumnFamilyArgument.GC_GRACE_SECONDS


- 原始邮件 -
发件人: "Michał Michalski" 
收件人: user@cassandra.apache.org
发送时间: 星期二, 2013年 7 月 16日 下午 5:51:49
主题: Re: Deletion use more space.

Deletion is not really "removing" data, but it's adding tombstones 
(markers) of deletion. They'll be later merged with existing data during 
compaction and - in the end (see: gc_grace_seconds) - removed, but by 
this time they'll take some space.

http://wiki.apache.org/cassandra/DistributedDeletes

M.

W dniu 16.07.2013 11:46, 杨辉强 pisze:
> Hi, all:
>I use cassandra 1.2.4 and I have 4 nodes ring and use byte order 
> partitioner.
>I had inserted about 200G data in the ring previous days.
>
>Today I write a program to scan the ring and then at the same time delete 
> the items that are scanned.
>To my surprise, the cassandra cost more disk usage.
>
> Anybody can tell me why? Thanks.
>



Re: Deletion use more space.

2013-07-16 Thread 杨辉强
Thank you!
It should be "update column family ScheduleInfoCF with gc_grace = 3600;"
Faint.

- 原始邮件 -
发件人: "杨辉强" 
收件人: user@cassandra.apache.org
发送时间: 星期二, 2013年 7 月 16日 下午 6:15:12
主题: Re: Deletion use more space.

Hi, 
  I use the follow cmd to update gc_grace_seconds. It reports error! Why?

[default@WebSearch] update column family ScheduleInfoCF with gc_grace_seconds = 
3600;
java.lang.IllegalArgumentException: No enum const class 
org.apache.cassandra.cli.CliClient$ColumnFamilyArgument.GC_GRACE_SECONDS


- 原始邮件 -
发件人: "Michał Michalski" 
收件人: user@cassandra.apache.org
发送时间: 星期二, 2013年 7 月 16日 下午 5:51:49
主题: Re: Deletion use more space.

Deletion is not really "removing" data, but it's adding tombstones 
(markers) of deletion. They'll be later merged with existing data during 
compaction and - in the end (see: gc_grace_seconds) - removed, but by 
this time they'll take some space.

http://wiki.apache.org/cassandra/DistributedDeletes

M.

W dniu 16.07.2013 11:46, 杨辉强 pisze:
> Hi, all:
>I use cassandra 1.2.4 and I have 4 nodes ring and use byte order 
> partitioner.
>I had inserted about 200G data in the ring previous days.
>
>Today I write a program to scan the ring and then at the same time delete 
> the items that are scanned.
>To my surprise, the cassandra cost more disk usage.
>
> Anybody can tell me why? Thanks.
>


Pig load data with cassandrastorage and slice filter param

2013-07-16 Thread Miguel Angel Martin junquera
hi all

I trying to load data from cassandra with slice params option but ther are
 no much info about how to use i. I found  only a quick reference in
readme.txt in cassandra project  .../examples/pig

*...*
*Slices on columns can also be specified:*
*grunt> rows = LOAD
'cassandra://MyKeyspace/MyColumnFamily?slice_start=C2&slice_end=C4&limit=1&reversed=true'
USING CassandraStorage();*

*Binary values for slice_start and slice_end can be escaped such as '\u0255'
*
*...**
*



I want to filter the initial load data by day o range dates and I only
found this info about cassandra and pig


   - http://rubyscale.com/blog/2011/03/06/basic-time-series-with-cassandra/
   - http://www.datastax.com/dev/blog/advanced-time-series-with-cassandra



I,m going  to try to do a test with  dummy data with Composite column
Family like  anuniqueIDGenerate:timestamp for example or
 anuniqueIDGenerate:stringdate where date is a string with dornat YYY-MM-dd
for example

Another option is use Supercolumn family by day for example ad try to use
slice with this feature


Or another option is create a custom load cassandra but perhaps It´s more
complex and I could this features.

I will appreciate any help or example how I must define cassandra data and
 Pig example load with slice.

Thanks in advance and king regards


Huge query Cassandra limits

2013-07-16 Thread cesare cugnasco
Hi everybody,

We  are working on porting some life science applications to Cassandra, but
we have to deal with its limits managing huge queries. Our queries are
usually multiget_slice ones: many rows with many columns each.

We have seen system start to slower until the entry point node crashes when
increasing the amount of rows and columns required in a single query .

Where does this limit come from?

Giving a fast look to the code seems like the entry point is stressed
because it has to keep all the responses in memory. Only after it has
received all the responses, from the nodes, Then, it resolves the conflicts
between different versions and sends them to the client.

Would not be possible to start sending the response to the client before
receiving all them? For instance, it may speed up the  Consistency level
ONE queries.

Does anyone worked on it? Is it the real reason of the decreasing of
performances?


Thank you,

Cesare Cugnasco


Re: cassandra GC cpu usage

2013-07-16 Thread Mohit Anchlia
What's your replication factor? Can you check tp stats and net stats to see if 
you are getting more mutations on these nodes ?

Sent from my iPhone

On Jul 16, 2013, at 3:18 PM, Jure Koren  wrote:

> Hi C* user list,
> 
> I have a curious recurring problem with Cassandra 1.2 and what seems like a 
> GC issue.
> 
> The cluster looks somewhat well balanced, all nodes are running HotSpot JVM 
> 1.6.0_31-b04 and cassandra 1.2.3.
> 
> Address Rack Status State Load Owns
> 10.2.3.6 RAC6 Up Normal 15.13 GB 12.71%
> 10.2.3.5 RAC5 Up Normal 16.87 GB 13.57%
> 10.2.3.8 RAC8 Up Normal 13.27 GB 13.71%
> 10.2.3.1 RAC1 Up Normal 16.46 GB 14.08%
> 10.2.3.7 RAC7 Up Normal 11.59 GB 14.34%
> 10.2.3.2 RAC2 Up Normal 23.15 GB 15.12%
> 10.2.3.4 RAC4 Up Normal 16.52 GB 16.47%
> 
> Every now and then (roughly once a month, currently), two nodes (always the 
> same two) need to be restarted after they start eating all available CPU 
> cycles and read and write latencies increase dramatically. Restart fixes this 
> every time.
> 
> The only metric that significantly deviates from the average for all nodes 
> shows GC doing something: http://bou.si/rest/parnew.png
> 
> Is there a way to debug this? After searching online it appears as nobody has 
> really solved this problem and I have no idea what could cause such behaviour 
> in just two particular cluster nodes.
> 
> I'm now thinking of decomissioning the problematic nodes and bootstrapping 
> them anew, but can't decide if this could possibly help.
> 
> Thanks in advance for any insight anyone might offer,
> 
> --
> Jure Koren, DevOps
> http://www.zemanta.com/


Re: Node tokens / data move

2013-07-16 Thread Eric Stevens
>
> vnodes currently do not brings any noticeable benefits to outweight trouble


The main advantage of vnodes is that it lets you have flexibility with
respect to adding and removing nodes from your cluster without having to
rebalance your cluster (issuing a lot of moves).  A shuffle is a lot of
moves too, so the only reason to do this is if you've discovered that the
random allocation of vnodes has managed to leave an unbalanced cluster (one
node either has an unusually large load, or an unusually small one).

Shuffling isn't something you should be doing as a matter of course, and
with 256 vnodes per server and 3+ servers, the chances of a brokenly
unbalanced cluster is more likely the cause of bad data partitioning
(extremely unbalanced row sizes) than of vnode token placement.  With
unbalanced rows, nothing will solve balance problems except finding a
different way to partition your data across rows.



On Mon, Jul 15, 2013 at 7:10 AM, Radim Kolar  wrote:

>
>  My understanding is that it is not possible to change the number of
>> tokens after the node has been initialized.
>>
> that was my conclusion too. vnodes currently do not brings any noticeable
> benefits to outweight trouble. shuffle is very slow in large cluster.
> Recovery is faster with vnodes but i have very few node failures per year.
>


Re: Node tokens / data move

2013-07-16 Thread David McNelis
Eric,

Unfortunately if you've got a non-vnode cluster and are trying to convert,
you are likely going to at least want, if not have to, run shuffle.  It
isn't a pleasant situation when you run into that because in order for the
shuffle to execute safely and successfully you need to have essentially
2x's the disk space as the size of your data at a minimum because no nodes
are removed from the original node until a cleanup is called.

This also means that other cass operations that cause disk usage to ballon
are competing for space with the shuffle process and boom, like that, out
of disk space.

David


On Tue, Jul 16, 2013 at 8:35 AM, Eric Stevens  wrote:

> vnodes currently do not brings any noticeable benefits to outweight trouble
>
>
> The main advantage of vnodes is that it lets you have flexibility with
> respect to adding and removing nodes from your cluster without having to
> rebalance your cluster (issuing a lot of moves).  A shuffle is a lot of
> moves too, so the only reason to do this is if you've discovered that the
> random allocation of vnodes has managed to leave an unbalanced cluster (one
> node either has an unusually large load, or an unusually small one).
>
> Shuffling isn't something you should be doing as a matter of course, and
> with 256 vnodes per server and 3+ servers, the chances of a brokenly
> unbalanced cluster is more likely the cause of bad data partitioning
> (extremely unbalanced row sizes) than of vnode token placement.  With
> unbalanced rows, nothing will solve balance problems except finding a
> different way to partition your data across rows.
>
>
>
> On Mon, Jul 15, 2013 at 7:10 AM, Radim Kolar  wrote:
>
>>
>>  My understanding is that it is not possible to change the number of
>>> tokens after the node has been initialized.
>>>
>> that was my conclusion too. vnodes currently do not brings any noticeable
>> benefits to outweight trouble. shuffle is very slow in large cluster.
>> Recovery is faster with vnodes but i have very few node failures per year.
>>
>
>


Re: Deletion use more space.

2013-07-16 Thread Andrew Bialecki
I don't think setting gc_grace_seconds to an hour is going to do what you'd
expect. After gc_grace_seconds, if you haven't run a repair within that
hour, the data you deleted will seem to have been undeleted.

Someone correct me if I'm wrong, but in order to order to completely delete
data and regain the space it takes up, you need to "delete" it, which
creates tombstones, and then run a repair on that column family within
gc_grace_seconds. After that the data is actually gone and the space
reclaimed.


On Tue, Jul 16, 2013 at 6:20 AM, 杨辉强  wrote:

> Thank you!
> It should be "update column family ScheduleInfoCF with gc_grace = 3600;"
> Faint.
>
> - 原始邮件 -
> 发件人: "杨辉强" 
> 收件人: user@cassandra.apache.org
> 发送时间: 星期二, 2013年 7 月 16日 下午 6:15:12
> 主题: Re: Deletion use more space.
>
> Hi,
>   I use the follow cmd to update gc_grace_seconds. It reports error! Why?
>
> [default@WebSearch] update column family ScheduleInfoCF with
> gc_grace_seconds = 3600;
> java.lang.IllegalArgumentException: No enum const class
> org.apache.cassandra.cli.CliClient$ColumnFamilyArgument.GC_GRACE_SECONDS
>
>
> - 原始邮件 -
> 发件人: "Michał Michalski" 
> 收件人: user@cassandra.apache.org
> 发送时间: 星期二, 2013年 7 月 16日 下午 5:51:49
> 主题: Re: Deletion use more space.
>
> Deletion is not really "removing" data, but it's adding tombstones
> (markers) of deletion. They'll be later merged with existing data during
> compaction and - in the end (see: gc_grace_seconds) - removed, but by
> this time they'll take some space.
>
> http://wiki.apache.org/cassandra/DistributedDeletes
>
> M.
>
> W dniu 16.07.2013 11:46, 杨辉强 pisze:
> > Hi, all:
> >I use cassandra 1.2.4 and I have 4 nodes ring and use byte order
> partitioner.
> >I had inserted about 200G data in the ring previous days.
> >
> >Today I write a program to scan the ring and then at the same time
> delete the items that are scanned.
> >To my surprise, the cassandra cost more disk usage.
> >
> > Anybody can tell me why? Thanks.
> >
>


Re: Deletion use more space.

2013-07-16 Thread Michael Theroux
The only time information is removed from the filesystem is during compaction.  
Compaction can remove tombstones after gc_grace_seconds, which, could result in 
reanimation of deleted data if the tombstone was never properly replicated to 
other replicas.  Repair will make sure tombstones are consistent amongst 
replicas.  However, tombstones can not be removed if the data the tombstone is 
deleting is in another SSTable and has not yet been removed. 

Hope this helps,
-Mike

  
On Jul 16, 2013, at 10:04 AM, Andrew Bialecki wrote:

> I don't think setting gc_grace_seconds to an hour is going to do what you'd 
> expect. After gc_grace_seconds, if you haven't run a repair within that hour, 
> the data you deleted will seem to have been undeleted.
> 
> Someone correct me if I'm wrong, but in order to order to completely delete 
> data and regain the space it takes up, you need to "delete" it, which creates 
> tombstones, and then run a repair on that column family within 
> gc_grace_seconds. After that the data is actually gone and the space 
> reclaimed.
> 
> 
> On Tue, Jul 16, 2013 at 6:20 AM, 杨辉强  wrote:
> Thank you!
> It should be "update column family ScheduleInfoCF with gc_grace = 3600;"
> Faint.
> 
> - 原始邮件 -
> 发件人: "杨辉强" 
> 收件人: user@cassandra.apache.org
> 发送时间: 星期二, 2013年 7 月 16日 下午 6:15:12
> 主题: Re: Deletion use more space.
> 
> Hi,
>   I use the follow cmd to update gc_grace_seconds. It reports error! Why?
> 
> [default@WebSearch] update column family ScheduleInfoCF with gc_grace_seconds 
> = 3600;
> java.lang.IllegalArgumentException: No enum const class 
> org.apache.cassandra.cli.CliClient$ColumnFamilyArgument.GC_GRACE_SECONDS
> 
> 
> - 原始邮件 -
> 发件人: "Michał Michalski" 
> 收件人: user@cassandra.apache.org
> 发送时间: 星期二, 2013年 7 月 16日 下午 5:51:49
> 主题: Re: Deletion use more space.
> 
> Deletion is not really "removing" data, but it's adding tombstones
> (markers) of deletion. They'll be later merged with existing data during
> compaction and - in the end (see: gc_grace_seconds) - removed, but by
> this time they'll take some space.
> 
> http://wiki.apache.org/cassandra/DistributedDeletes
> 
> M.
> 
> W dniu 16.07.2013 11:46, 杨辉强 pisze:
> > Hi, all:
> >I use cassandra 1.2.4 and I have 4 nodes ring and use byte order 
> > partitioner.
> >I had inserted about 200G data in the ring previous days.
> >
> >Today I write a program to scan the ring and then at the same time 
> > delete the items that are scanned.
> >To my surprise, the cassandra cost more disk usage.
> >
> > Anybody can tell me why? Thanks.
> >
> 



Repair needed on all nodes if RF == number of nodes?

2013-07-16 Thread André Cruz
Hello.

I have a cluster with 3 nodes and RF is 3. I've noticed that when I run a 
repair on a node (I don't use -pr), all nodes are involved.

So, does this mean the other nodes are "repaired" as well? Do I still need to 
run repair on the other 2 nodes inside the gc_grace_period?

Thanks,
André

smime.p7s
Description: S/MIME cryptographic signature


Re: Node tokens / data move

2013-07-16 Thread Eric Stevens
>
> if you've got a non-vnode cluster and are trying to convert, you are
> likely going to at least want, if not have to, run shuffle


Fair enough.  Running shuffle after upgrading to using vnodes is nearly
mandatory or else you'll run into troubles when adding more nodes (see this
Jira 
ticket).
 This should be a one-time occurrence during the upgrade process, and
hopefully you can do it off-hours.


On Tue, Jul 16, 2013 at 9:09 AM, David McNelis  wrote:

> Eric,
>
> Unfortunately if you've got a non-vnode cluster and are trying to convert,
> you are likely going to at least want, if not have to, run shuffle.  It
> isn't a pleasant situation when you run into that because in order for the
> shuffle to execute safely and successfully you need to have essentially
> 2x's the disk space as the size of your data at a minimum because no nodes
> are removed from the original node until a cleanup is called.
>
> This also means that other cass operations that cause disk usage to ballon
> are competing for space with the shuffle process and boom, like that, out
> of disk space.
>
> David
>
>
> On Tue, Jul 16, 2013 at 8:35 AM, Eric Stevens  wrote:
>
>> vnodes currently do not brings any noticeable benefits to outweight
>>> trouble
>>
>>
>> The main advantage of vnodes is that it lets you have flexibility with
>> respect to adding and removing nodes from your cluster without having to
>> rebalance your cluster (issuing a lot of moves).  A shuffle is a lot of
>> moves too, so the only reason to do this is if you've discovered that the
>> random allocation of vnodes has managed to leave an unbalanced cluster (one
>> node either has an unusually large load, or an unusually small one).
>>
>> Shuffling isn't something you should be doing as a matter of course, and
>> with 256 vnodes per server and 3+ servers, the chances of a brokenly
>> unbalanced cluster is more likely the cause of bad data partitioning
>> (extremely unbalanced row sizes) than of vnode token placement.  With
>> unbalanced rows, nothing will solve balance problems except finding a
>> different way to partition your data across rows.
>>
>>
>>
>> On Mon, Jul 15, 2013 at 7:10 AM, Radim Kolar  wrote:
>>
>>>
>>>  My understanding is that it is not possible to change the number of
 tokens after the node has been initialized.

>>> that was my conclusion too. vnodes currently do not brings any
>>> noticeable benefits to outweight trouble. shuffle is very slow in large
>>> cluster. Recovery is faster with vnodes but i have very few node failures
>>> per year.
>>>
>>
>>
>


Re: Recordset capabilities...

2013-07-16 Thread Tony Anecito
Thanks Sylvain for answering the question from a Cassandra perspective.

I will use Datastax forum where appropiate. I have gone live with Cassandra so 
I will not be bringing these things up anymore I hope.

Best Regards,
-Tony






 From: Sylvain Lebresne 
To: "user@cassandra.apache.org" ; Tony Anecito 
 
Sent: Tuesday, July 16, 2013 12:10 AM
Subject: Re: Recordset capabilities...
 


Yes, currently the resultSet will contain all the rows, there is no "fetch 
size" supported. This will change soon however since Cassandra 2.0 has some 
"paging" support at the protocol level and the driver will make use of that. 
But that won't be before 2.0.

As an aside, this kind of question about the Datastax Java driver belong in the 
driver mailing lists (java-driver-u...@lists.datastax.com, you can register 
directly at mailing.lists.datastax.com), not this list.

--
Sylvain



On Mon, Jul 15, 2013 at 10:18 PM, Tony Anecito  wrote:

Hi All,
>
>
>I am using the Datastax native client for Cassandra and have a question. Does 
>the resultset contain all the Rows? On a JDBC driver there is this concept of 
>fetch record size. I do not seem to think Datastax did that in their 
>implementation but that probably is not a requirement.
>But I bet the Architects and network engineers need to know about that.
>
>
>Regards,
>-Tony

Re: Huge query Cassandra limits

2013-07-16 Thread Robert Coli
On Tue, Jul 16, 2013 at 4:46 AM, cesare cugnasco
wrote:

> We  are working on porting some life science applications to Cassandra,
> but we have to deal with its limits managing huge queries. Our queries are
> usually multiget_slice ones: many rows with many columns each.
>

You are not getting much "win" by increasing request size in Cassandra, and
you expose yourself to "lose" such as you have experienced.

Is there some reason you cannot just issue multiple requests?

=Rob


Re: V2 Beta 1 bootstrap behaviour ?

2013-07-16 Thread Robert Coli
On Tue, Jul 16, 2013 at 1:16 AM, Andrew Cobley wrote:

>  I'm setting up a new test cluster using  2.0.0-beta1 and I noticed the
> following behaviour with vnodes turned on.  I bring up one node all well
> and good.  however if I bring up a second node, that can't contact the
> first (the first being the seed for the second) after a short period of
> time, the second goes ahead and assumes it's the only node and bootstraps
> with all tokens.  Is this correct behaviour? I'd have thought it would
> halt with a "Can't contact seed" message to avoid the  node starting in a
> possibly mis-confgured state ?
>

It should do this, but currently does not. Obviously if you have defined a
seed and cannot contact it, the node should not start as a cluster of one.
I have a to-do list item to file a JIRA on the subject, but if you wanted
to file and link us, that'd be super. :)

=Rob


Re: Repair needed on all nodes if RF == number of nodes?

2013-07-16 Thread Robert Coli
On Tue, Jul 16, 2013 at 7:48 AM, André Cruz  wrote:

> I have a cluster with 3 nodes and RF is 3. I've noticed that when I run a
> repair on a node (I don't use -pr), all nodes are involved.
>
> So, does this mean the other nodes are "repaired" as well? Do I still need
> to run repair on the other 2 nodes inside the gc_grace_period?
>

Yes, no.

=Rob


Re: V2 Beta 1 bootstrap behaviour ?

2013-07-16 Thread Andrew Cobley
Righto !

Will do a JIRA report..

Many thanks

Andy

On 16 Jul 2013, at 18:50, Robert Coli 
mailto:rc...@eventbrite.com>>
 wrote:

On Tue, Jul 16, 2013 at 1:16 AM, Andrew Cobley 
mailto:a.e.cob...@dundee.ac.uk>> wrote:
I'm setting up a new test cluster using  2.0.0-beta1 and I noticed the 
following behaviour with vnodes turned on.  I bring up one node all well and 
good.  however if I bring up a second node, that can't contact the first (the 
first being the seed for the second) after a short period of time, the second 
goes ahead and assumes it's the only node and bootstraps with all tokens.  Is 
this correct behaviour? I'd have thought it would halt with a "Can't contact 
seed" message to avoid the  node starting in a possibly mis-confgured state ?

It should do this, but currently does not. Obviously if you have defined a seed 
and cannot contact it, the node should not start as a cluster of one. I have a 
to-do list item to file a JIRA on the subject, but if you wanted to file and 
link us, that'd be super. :)

=Rob



The University of Dundee is a registered Scottish Charity, No: SC015096


AbstractCassandraDaemon.java (line 134) Exception in thread

2013-07-16 Thread Julio Quierati
Hello,

At least 2 times a day I'm having hundreds of log entry related to
exception below, the network bottleneck seems, anyone know how to solve, or
encountered this problem

Using
  C* version 1.1.4
   and
Java version "1.7.0_21"
Java(TM) SE Runtime Environment (build 1.7.0_21-b11)
Java HotSpot(TM) 64-Bit Server VM (build 23.21-b01, mixed mode)
AWS m1.xlarge

ERROR [Thrift:967696] 2013-07-16 12:36:12,514 AbstractCassandraDaemon.java
(line 134) Exception in thread Thread[Thrift:967696,5,main]
java.lang.StackOverflowError
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(SocketInputStream.java:150)
 at java.net.SocketInputStream.read(SocketInputStream.java:121)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:235)
 at java.io.BufferedInputStream.read1(BufferedInputStream.java:275)
at java.io.BufferedInputStream.read(BufferedInputStream.java:334)
 at
org.apache.thrift.transport.TIOStreamTransport.read(TIOStreamTransport.java:127)
at org.apache.thrift.transport.TTransport.readAll(TTransport.java:84)
 at
org.apache.thrift.transport.TFramedTransport.readFrame(TFramedTransport.java:129)
at
org.apache.thrift.transport.TFramedTransport.read(TFramedTransport.java:101)
 at org.apache.thrift.transport.TTransport.readAll(TTransport.java:84)
at
org.apache.thrift.protocol.TBinaryProtocol.readAll(TBinaryProtocol.java:378)
 at
org.apache.thrift.protocol.TBinaryProtocol.readI32(TBinaryProtocol.java:297)
at
org.apache.thrift.protocol.TBinaryProtocol.readMessageBegin(TBinaryProtocol.java:204)
 at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:22)
at
org.apache.cassandra.thrift.CustomTThreadPoolServer$WorkerProcess.run(CustomTThreadPoolServer.java:186)
 at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
 at java.lang.Thread.run(Thread.java:722)
ERROR [Thrift:966717] 2013-07-16 12:36:17,152 AbstractCassandraDaemon.java
(line 134) Exception in thread Thread[Thrift:966717,5,main]
java.lang.StackOverflowError
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(SocketInputStream.java:150)
 at java.net.SocketInputStream.read(SocketInputStream.java:121)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:235)
 at java.io.BufferedInputStream.read1(BufferedInputStream.java:275)
at java.io.BufferedInputStream.read(BufferedInputStream.java:334)
 at
org.apache.thrift.transport.TIOStreamTransport.read(TIOStreamTransport.java:127)
at org.apache.thrift.transport.TTransport.readAll(TTransport.java:84)
 at
org.apache.thrift.transport.TFramedTransport.readFrame(TFramedTransport.java:129)
at
org.apache.thrift.transport.TFramedTransport.read(TFramedTransport.java:101)
 at org.apache.thrift.transport.TTransport.readAll(TTransport.java:84)
at
org.apache.thrift.protocol.TBinaryProtocol.readAll(TBinaryProtocol.java:378)
 at
org.apache.thrift.protocol.TBinaryProtocol.readI32(TBinaryProtocol.java:297)
at
org.apache.thrift.protocol.TBinaryProtocol.readMessageBegin(TBinaryProtocol.java:204)
 at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:22)
at
org.apache.cassandra.thrift.CustomTThreadPoolServer$WorkerProcess.run(CustomTThreadPoolServer.java:186)
 at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
 at java.lang.Thread.run(Thread.java:722)
 INFO [OptionalTasks:1] 2013-07-16 12:38:07,847 MeteredFlusher.java (line
62) flushing high-traffic column family CFS(Keyspace='zm',
ColumnFamily='deviceConnectionLog') (estimated 200441950 bytes)
 INFO [OptionalTasks:1] 2013-07-16 12:38:07,848 ColumnFamilyStore.java
(line 659) Enqueuing flush of
Memtable-deviceConnectionLog@64568169(20293642/200441950
serialized/live bytes, 114490 ops)
 INFO [FlushWriter:4306] 2013-07-16 12:38:07,848 Memtable.java (line 264)
Writing Memtable-deviceConnectionLog@64568169(20293642/200441950
serialized/live bytes, 114490 ops)
 INFO [FlushWriter:4306] 2013-07-16 12:38:09,154 Memtable.java (line 305)
Completed flushing
/mnt/cassandra/data/zm/deviceConnectionLog/zm-deviceConnectionLog-he-5083-Data.db
(5747695 bytes) for commitlog position
ReplayPosition(segmentId=1282719983369784, position=28288612)
 INFO [OptionalTasks:1] 2013-07-16 12:40:35,610 ColumnFamilyStore.java
(line 659) Enqueuing flush of
Memtable-userNotificationsHistory@1933122113(554/13847
serialized/live bytes, 10 ops)
 INFO [FlushWriter:4307] 2013-07-16 12:40:35,611 Memtable.java (line 264)
Writing Memtable-userNotificationsHistory@1933122113(554/13847
serialized/live bytes, 10 ops)
 INFO [OptionalTasks:1] 2013-07-16 12:40:35,611 ColumnFamilyStore.java
(line 659) Enqueuing flush of
Memtable-userPendingNotifications@1553457921(647/8729
serialized/live bytes, 10 ops)
 INFO [FlushWriter:4307] 2013-07-16 12:40:35,717 Memtable.java (line 305)
Completed flushing
/mnt/cassa

Re: Alternate "major compaction"

2013-07-16 Thread Robert Coli
On Fri, Jul 12, 2013 at 2:28 AM, Radim Kolar  wrote:

> with some very little work (less then 10 KB of code) is possible to have
> online sstable splitter and exported this functionality over JMX.
>

Are you volunteering? If so, I'd totally dig using the patch! :D

=Rob


Re: Deletion use more space.

2013-07-16 Thread 杨辉强
Thanks, But Michael's answer confuse me more. 

I use list cf; in cassandra-cli. It seems lots of rows have been deleted, but 
keys exist.

After the deletion, why the key still exists? It seems useless.

RowKey: 3030303031306365633862356437636365303861303433343137656531306435
---
RowKey: 3030303031316333616336366531613636373735396363323037396331613230
---
RowKey: 3030303031316333616336366531613637303964616364363630663865313433
---
RowKey: 303030303132393461363730323932356363313330323862633064626335
---
RowKey: 3030303031323934613637303239323566303733303638373138366334323436
---
RowKey: 3030303031333838333139303930633664643364613331316664363134656639
---
RowKey: 303030303133626534363930363061393837666230363439316336333230
---
RowKey: 303030303133636565373537646561633463393263363832653130363733
---
RowKey: 303030303134363234326136396637646465623537323761633233353065


- 原始邮件 -
发件人: "Michael Theroux" 
收件人: user@cassandra.apache.org
发送时间: 星期二, 2013年 7 月 16日 下午 10:23:32
主题: Re: Deletion use more space.

The only time information is removed from the filesystem is during compaction.  
Compaction can remove tombstones after gc_grace_seconds, which, could result in 
reanimation of deleted data if the tombstone was never properly replicated to 
other replicas.  Repair will make sure tombstones are consistent amongst 
replicas.  However, tombstones can not be removed if the data the tombstone is 
deleting is in another SSTable and has not yet been removed. 

Hope this helps,
-Mike

  
On Jul 16, 2013, at 10:04 AM, Andrew Bialecki wrote:

> I don't think setting gc_grace_seconds to an hour is going to do what you'd 
> expect. After gc_grace_seconds, if you haven't run a repair within that hour, 
> the data you deleted will seem to have been undeleted.
> 
> Someone correct me if I'm wrong, but in order to order to completely delete 
> data and regain the space it takes up, you need to "delete" it, which creates 
> tombstones, and then run a repair on that column family within 
> gc_grace_seconds. After that the data is actually gone and the space 
> reclaimed.
> 
> 
> On Tue, Jul 16, 2013 at 6:20 AM, 杨辉强  wrote:
> Thank you!
> It should be "update column family ScheduleInfoCF with gc_grace = 3600;"
> Faint.
> 
> - 原始邮件 -
> 发件人: "杨辉强" 
> 收件人: user@cassandra.apache.org
> 发送时间: 星期二, 2013年 7 月 16日 下午 6:15:12
> 主题: Re: Deletion use more space.
> 
> Hi,
>   I use the follow cmd to update gc_grace_seconds. It reports error! Why?
> 
> [default@WebSearch] update column family ScheduleInfoCF with gc_grace_seconds 
> = 3600;
> java.lang.IllegalArgumentException: No enum const class 
> org.apache.cassandra.cli.CliClient$ColumnFamilyArgument.GC_GRACE_SECONDS
> 
> 
> - 原始邮件 -
> 发件人: "Michał Michalski" 
> 收件人: user@cassandra.apache.org
> 发送时间: 星期二, 2013年 7 月 16日 下午 5:51:49
> 主题: Re: Deletion use more space.
> 
> Deletion is not really "removing" data, but it's adding tombstones
> (markers) of deletion. They'll be later merged with existing data during
> compaction and - in the end (see: gc_grace_seconds) - removed, but by
> this time they'll take some space.
> 
> http://wiki.apache.org/cassandra/DistributedDeletes
> 
> M.
> 
> W dniu 16.07.2013 11:46, 杨辉强 pisze:
> > Hi, all:
> >I use cassandra 1.2.4 and I have 4 nodes ring and use byte order 
> > partitioner.
> >I had inserted about 200G data in the ring previous days.
> >
> >Today I write a program to scan the ring and then at the same time 
> > delete the items that are scanned.
> >To my surprise, the cassandra cost more disk usage.
> >
> > Anybody can tell me why? Thanks.
> >
> 


Intresting issue with getting Order By to work...

2013-07-16 Thread Tony Anecito
Hi All,

Well I got most everything working I wanted using Cassandra then discovered I 
needed to use an Order By. I am using Cassandra 1.2.5.
The use of Order By requires Primary Key which appears to be only supported by 
by using CQL and not Cassandra-cli. So I dropped my table created uisng CLI and 
used CQL and was able to create a "Table". But when I went to insert data that 
worked fine on the cli created table I now get an exception:
Error while inserting 
com.datastax.driver.core.exceptions.InvalidQueryException: Unknown identifier 
type.

I read that thrift clients will not work with CQL created tables due to extra 
things created by the CQL. If so how can I create Primary Keys and be supported 
by thrift based clients??

I will post to Datastax the same question but trying to understand how to 
resolve cli vs CQL issue like this. Seems like Cassandra-cli should support 
creation of compound primary keys or CQL should create tables readable by 
thrift based clients. Is there some meta column info people should add?
Also CQL tables are not visible via cli.so I can not see details on what was 
created by CQL and the cqlsh script has errors according to the latest Python 
windows program I tried.

Thanks,
-Tony

Main method not found in class org.apache.cassandra.service.CassandraDaemon

2013-07-16 Thread Vivek Mishra
Error: Main method not found in class
org.apache.cassandra.service.CassandraDaemon, please define the main method
as:
   public static void main(String[] args)


Hi,
I am getting this error. Earlier it was working fine for me, when i simply
downloaded the tarball installation and ran cassandra server. Recently i
did rpm package installation of Cassandra and which is working fine. But
somehow when i try to run it via originally extracted tar package. i am
getting:

*
xss =  -ea
-javaagent:/home/impadmin/software/apache-cassandra-1.2.4//lib/jamm-0.2.5.jar
-XX:+UseThreadPriorities -XX:ThreadPriorityPolicy=42 -Xms1024M -Xmx1024M
-Xmn256M -XX:+HeapDumpOnOutOfMemoryError -Xss180k
Error: Main method not found in class
org.apache.cassandra.service.CassandraDaemon, please define the main method
as:
   public static void main(String[] args)
*

I tried setting CASSANDRA_HOME directory, but no luck.

Error is bit confusing, Any suggestions???

-Vivek