[jira] [Commented] (CASSANDRA-3797) StorageProxy static initialization not triggered until thrift requests come in

2012-01-27 Thread Peter Schuller (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-3797?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13194531#comment-13194531
 ] 

Peter Schuller commented on CASSANDRA-3797:
---

Maybe a Class.forName() is cleaner (a Class klass = StorageProxy.class does not 
(necessarily) cause it to be loaded).


 StorageProxy static initialization not triggered until thrift requests come in
 --

 Key: CASSANDRA-3797
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3797
 Project: Cassandra
  Issue Type: Bug
Reporter: Peter Schuller
Assignee: Peter Schuller
Priority: Minor
 Attachments: CASSANDRA-3797-trunk-v1.txt


 While plugging in the metrics library for CASSANDRA-3671 I realized (because 
 the metrics library was trying to add a shutdown hook on metric creation) 
 that starting cassandra and simply shutting it down, causes StorageProxy to 
 not be initialized until the drain shutdown hook.
 Effects:
 * StorageProxy mbean missing in visualvm/jconsole after initial startup 
 (seriously, I thought I was going nuts ;))
 * And in general anything that makes assumptions about running early, or at 
 least not during JVM shutdown, such as the metrics library, will be 
 problematic

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (CASSANDRA-3671) provide JMX counters for unavailables/timeouts for reads and writes

2012-01-27 Thread Peter Schuller (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-3671?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13194535#comment-13194535
 ] 

Peter Schuller commented on CASSANDRA-3671:
---

We could also convert everything in StorageProxy to metrics and leave naming 
unaltered, assuming metrics can express everything we currently have in the 
MBean, which I'm skeptical of. Haven't checked, but other than data types like 
arrays, we provide methods for invocation which is not a metric at all.

 provide JMX counters for unavailables/timeouts for reads and writes
 ---

 Key: CASSANDRA-3671
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3671
 Project: Cassandra
  Issue Type: Improvement
Reporter: Peter Schuller
Assignee: Peter Schuller
Priority: Minor
 Attachments: CASSANDRA-3671-trunk-coda-metrics-v1.txt, 
 CASSANDRA-3671-trunk-v2.txt, CASSANDRA-3671-trunk.txt


 Attaching patch against trunk.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (CASSANDRA-3668) Performance of sstableloader is affected in 1.0.x

2012-01-27 Thread Sylvain Lebresne (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-3668?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13194543#comment-13194543
 ] 

Sylvain Lebresne commented on CASSANDRA-3668:
-

bq.  because I don't see where/how it was established that the original problem

To sum up, as as Yuki remarked above, the reason streaming is slower in 1.0 is 
likely due to 2 aspects (basically because that's the 2 things that changed):
# We switched from NIO transfer to standard read and send. Meaning we 
possibly adds copies here and there during transfer.
# We now build indexes (primary and secondary) and bloom filters sequentially 
with the streaming while it was previously done in parallel of the streaming.

I don't think we really have established what fraction of the slowdown each is 
responsible of. But the idea of adding concurrent streaming is to fix the 
second one.

Yuki, you said last patch improves throughput: but how do we stand with this 
patch compared to 0.8?

 Performance of sstableloader is affected in 1.0.x
 -

 Key: CASSANDRA-3668
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3668
 Project: Cassandra
  Issue Type: Bug
  Components: API
Affects Versions: 1.0.0
Reporter: Manish Zope
Assignee: Yuki Morishita
Priority: Minor
  Labels: streaming
 Fix For: 1.1

 Attachments: 0001-Allow-multiple-connection-in-StreamInSession.patch, 
 0002-Allow-concurrent-stream-in-StreamOutSession.patch, 
 0003-Add-threads-option-to-sstableloader.patch, 
 3688-reply_before_closing_writer.txt, sstable-loader performance.txt

   Original Estimate: 48h
  Remaining Estimate: 48h

 One of my colleague had reported the bug regarding the degraded performance 
 of the sstable generator and sstable loader.
 ISSUE :- https://issues.apache.org/jira/browse/CASSANDRA-3589 
 As stated in above issue generator performance is rectified but performance 
 of the sstableloader is still an issue.
 3589 is marked as duplicate of 3618.Both issues shows resolved status.But the 
 problem with sstableloader still exists.
 So opening other issue so that sstbleloader problem should not go unnoticed.
 FYI : We have tested the generator part with the patch given in 3589.Its 
 Working fine.
 Please let us know if you guys require further inputs from our side.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Issue Comment Edited] (CASSANDRA-3668) Performance of sstableloader is affected in 1.0.x

2012-01-27 Thread Sylvain Lebresne (Issue Comment Edited) (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-3668?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13194543#comment-13194543
 ] 

Sylvain Lebresne edited comment on CASSANDRA-3668 at 1/27/12 8:41 AM:
--

bq.  because I don't see where/how it was established that the original problem 
was due to a lack of concurrency

To sum up, as as Yuki remarked above, the reason streaming is slower in 1.0 is 
likely due to 2 aspects (basically because that's the 2 things that changed):
# We switched from NIO transfer to standard read and send. Meaning we 
possibly adds copies here and there during transfer.
# We now build indexes (primary and secondary) and bloom filters sequentially 
with the streaming while it was previously done in parallel of the streaming.

I don't think we really have established what fraction of the slowdown each is 
responsible of. But the idea of adding concurrent streaming is to fix the 
second one.

Yuki, you said last patch improves throughput: but how do we stand with this 
patch compared to 0.8?

  was (Author: slebresne):
bq.  because I don't see where/how it was established that the original 
problem

To sum up, as as Yuki remarked above, the reason streaming is slower in 1.0 is 
likely due to 2 aspects (basically because that's the 2 things that changed):
# We switched from NIO transfer to standard read and send. Meaning we 
possibly adds copies here and there during transfer.
# We now build indexes (primary and secondary) and bloom filters sequentially 
with the streaming while it was previously done in parallel of the streaming.

I don't think we really have established what fraction of the slowdown each is 
responsible of. But the idea of adding concurrent streaming is to fix the 
second one.

Yuki, you said last patch improves throughput: but how do we stand with this 
patch compared to 0.8?
  
 Performance of sstableloader is affected in 1.0.x
 -

 Key: CASSANDRA-3668
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3668
 Project: Cassandra
  Issue Type: Bug
  Components: API
Affects Versions: 1.0.0
Reporter: Manish Zope
Assignee: Yuki Morishita
Priority: Minor
  Labels: streaming
 Fix For: 1.1

 Attachments: 0001-Allow-multiple-connection-in-StreamInSession.patch, 
 0002-Allow-concurrent-stream-in-StreamOutSession.patch, 
 0003-Add-threads-option-to-sstableloader.patch, 
 3688-reply_before_closing_writer.txt, sstable-loader performance.txt

   Original Estimate: 48h
  Remaining Estimate: 48h

 One of my colleague had reported the bug regarding the degraded performance 
 of the sstable generator and sstable loader.
 ISSUE :- https://issues.apache.org/jira/browse/CASSANDRA-3589 
 As stated in above issue generator performance is rectified but performance 
 of the sstableloader is still an issue.
 3589 is marked as duplicate of 3618.Both issues shows resolved status.But the 
 problem with sstableloader still exists.
 So opening other issue so that sstbleloader problem should not go unnoticed.
 FYI : We have tested the generator part with the patch given in 3589.Its 
 Working fine.
 Please let us know if you guys require further inputs from our side.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (CASSANDRA-3794) Change ColumnFamily identifiers to be UUIDs instead of sequential Integers.

2012-01-27 Thread Marcus Eriksson (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-3794?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13194545#comment-13194545
 ] 

Marcus Eriksson commented on CASSANDRA-3794:


duplicate of CASSANDRA-1983 right?

 Change ColumnFamily identifiers to be UUIDs instead of sequential Integers.
 ---

 Key: CASSANDRA-3794
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3794
 Project: Cassandra
  Issue Type: Improvement
  Components: Core
Reporter: Pavel Yaskevich
Assignee: Pavel Yaskevich
Priority: Minor
 Fix For: 1.2


 Change ColumnFamily identifiers to be UUIDs instead of sequential Integers. 
 Would be useful in the situation when nodes simultaneously trying to create 
 ColumnFamilies.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Resolved] (CASSANDRA-3795) Unable to join the mailing list

2012-01-27 Thread Sylvain Lebresne (Resolved) (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-3795?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sylvain Lebresne resolved CASSANDRA-3795.
-

Resolution: Not A Problem

 Unable to join the mailing list
 ---

 Key: CASSANDRA-3795
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3795
 Project: Cassandra
  Issue Type: Bug
Reporter: Krassimir Kostov

 Hi!
 Since Jan 25, I have been trying several times to join the mailing list at 
 cassandra-u...@incubator.apache.org, but each time I tried, I got the 
 following email.  Please help resolving the issue.  Thanks!
  Date: Fri, 27 Jan 2012 04:30:59 +
  From: mailer-dae...@apache.org
  To: x...@yyy.zzz
  Subject: failure notice
  
  Hi. This is the qmail-send program at apache.org.
  I'm afraid I wasn't able to deliver your message to the following addresses.
  This is a permanent error; I've given up. Sorry it didn't work out.
  
  cassandra-user-allow-subscribe-XXX=yyy@incubator.apache.org:
  This mailing list has moved to user at cassandra.apache.org.
  
  --- Below this line is a copy of the message.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (CASSANDRA-3794) Change ColumnFamily identifiers to be UUIDs instead of sequential Integers.

2012-01-27 Thread Pavel Yaskevich (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-3794?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13194549#comment-13194549
 ] 

Pavel Yaskevich commented on CASSANDRA-3794:


Seems like it but description of that one is ambiguous so we can equally change 
the description there and close this one or close CASSANDRA-1983 and work on 
this.

 Change ColumnFamily identifiers to be UUIDs instead of sequential Integers.
 ---

 Key: CASSANDRA-3794
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3794
 Project: Cassandra
  Issue Type: Improvement
  Components: Core
Reporter: Pavel Yaskevich
Assignee: Pavel Yaskevich
Priority: Minor
 Fix For: 1.2


 Change ColumnFamily identifiers to be UUIDs instead of sequential Integers. 
 Would be useful in the situation when nodes simultaneously trying to create 
 ColumnFamilies.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (CASSANDRA-3795) Unable to join the mailing list

2012-01-27 Thread Sylvain Lebresne (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-3795?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13194550#comment-13194550
 ] 

Sylvain Lebresne commented on CASSANDRA-3795:
-

@Krassimir You should send your email to user-subscr...@cassandra.apache.org, 
*not* cassandra-u...@incubator.apache.org (note that there is not 'incubator' 
anymore). I'm not sure where you got this incubator address actually: Cassandra 
is not part of the Apache incubator anymore since almost 2 years, and I just 
check that the http://cassandra.apache.org/ web page does refer the correct 
address.

 Unable to join the mailing list
 ---

 Key: CASSANDRA-3795
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3795
 Project: Cassandra
  Issue Type: Bug
Reporter: Krassimir Kostov

 Hi!
 Since Jan 25, I have been trying several times to join the mailing list at 
 cassandra-u...@incubator.apache.org, but each time I tried, I got the 
 following email.  Please help resolving the issue.  Thanks!
  Date: Fri, 27 Jan 2012 04:30:59 +
  From: mailer-dae...@apache.org
  To: x...@yyy.zzz
  Subject: failure notice
  
  Hi. This is the qmail-send program at apache.org.
  I'm afraid I wasn't able to deliver your message to the following addresses.
  This is a permanent error; I've given up. Sorry it didn't work out.
  
  cassandra-user-allow-subscribe-XXX=yyy@incubator.apache.org:
  This mailing list has moved to user at cassandra.apache.org.
  
  --- Below this line is a copy of the message.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Updated] (CASSANDRA-3794) Change ColumnFamily identifiers to be UUIDs instead of sequential Integers.

2012-01-27 Thread Pavel Yaskevich (Updated) (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-3794?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Pavel Yaskevich updated CASSANDRA-3794:
---

Comment: was deleted

(was: Seems like it but description of that one is ambiguous so we can equally 
change the description there and close this one or close CASSANDRA-1983 and 
work on this.)

 Change ColumnFamily identifiers to be UUIDs instead of sequential Integers.
 ---

 Key: CASSANDRA-3794
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3794
 Project: Cassandra
  Issue Type: Improvement
  Components: Core
Reporter: Pavel Yaskevich
Assignee: Pavel Yaskevich
Priority: Minor
 Fix For: 1.2


 Change ColumnFamily identifiers to be UUIDs instead of sequential Integers. 
 Would be useful in the situation when nodes simultaneously trying to create 
 ColumnFamilies.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (CASSANDRA-3794) Change ColumnFamily identifiers to be UUIDs instead of sequential Integers.

2012-01-27 Thread Pavel Yaskevich (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-3794?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13194553#comment-13194553
 ] 

Pavel Yaskevich commented on CASSANDRA-3794:


I don't think so because CASSANDRA-1983 proposes to change the way we identify 
SSTables and this one proposes to change the way we identify ColumnFamilies.

 Change ColumnFamily identifiers to be UUIDs instead of sequential Integers.
 ---

 Key: CASSANDRA-3794
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3794
 Project: Cassandra
  Issue Type: Improvement
  Components: Core
Reporter: Pavel Yaskevich
Assignee: Pavel Yaskevich
Priority: Minor
 Fix For: 1.2


 Change ColumnFamily identifiers to be UUIDs instead of sequential Integers. 
 Would be useful in the situation when nodes simultaneously trying to create 
 ColumnFamilies.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (CASSANDRA-3668) Performance of sstableloader is affected in 1.0.x

2012-01-27 Thread Peter Schuller (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-3668?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13194562#comment-13194562
 ] 

Peter Schuller commented on CASSANDRA-3668:
---

Ok. Definitely interesting to look into then, because just the fact that we're 
copying some arrays around is not adequate explanation for how we would 
bottleneck to the point of only reaching 7 MB/second (that's *nothing*). The 
indexes/bloom filters sound more plausible, but my understanding was that 
Manish never observed CPU saturation.

Anyways, I was asking since I was assigned to review the patch. I'll try to do 
a comparison of my own and see what I can find out.

*Possibly* relatedly I have observed cases where there is clearly something 
wrong with the way we do I/O. Index sampling on start-up have been observed at 
20% CPU utilization with plenty of I/O capacity to spare (this is on 0.8 
though). In this case something is clearly outright wrong, and is not about 
performance bottlenecks as such. It's possible something similar is going on 
here, which would be very interesting to confirm/deny.

 Performance of sstableloader is affected in 1.0.x
 -

 Key: CASSANDRA-3668
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3668
 Project: Cassandra
  Issue Type: Bug
  Components: API
Affects Versions: 1.0.0
Reporter: Manish Zope
Assignee: Yuki Morishita
Priority: Minor
  Labels: streaming
 Fix For: 1.1

 Attachments: 0001-Allow-multiple-connection-in-StreamInSession.patch, 
 0002-Allow-concurrent-stream-in-StreamOutSession.patch, 
 0003-Add-threads-option-to-sstableloader.patch, 
 3688-reply_before_closing_writer.txt, sstable-loader performance.txt

   Original Estimate: 48h
  Remaining Estimate: 48h

 One of my colleague had reported the bug regarding the degraded performance 
 of the sstable generator and sstable loader.
 ISSUE :- https://issues.apache.org/jira/browse/CASSANDRA-3589 
 As stated in above issue generator performance is rectified but performance 
 of the sstableloader is still an issue.
 3589 is marked as duplicate of 3618.Both issues shows resolved status.But the 
 problem with sstableloader still exists.
 So opening other issue so that sstbleloader problem should not go unnoticed.
 FYI : We have tested the generator part with the patch given in 3589.Its 
 Working fine.
 Please let us know if you guys require further inputs from our side.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (CASSANDRA-3794) Change ColumnFamily identifiers to be UUIDs instead of sequential Integers.

2012-01-27 Thread Peter Schuller (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-3794?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13194567#comment-13194567
 ] 

Peter Schuller commented on CASSANDRA-3794:
---

Which I interpret as the cf id:s that are embedded in e.g. row mutations 
(remember all those invalid cfId... cases upon schema changes). In general, 
UUID:s should minimize the chances of accidentally applying something to the 
wrong CF (which I suppose is a generalization of the simultaneous creation case 
mentioned in the ticket description).


 Change ColumnFamily identifiers to be UUIDs instead of sequential Integers.
 ---

 Key: CASSANDRA-3794
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3794
 Project: Cassandra
  Issue Type: Improvement
  Components: Core
Reporter: Pavel Yaskevich
Assignee: Pavel Yaskevich
Priority: Minor
 Fix For: 1.2


 Change ColumnFamily identifiers to be UUIDs instead of sequential Integers. 
 Would be useful in the situation when nodes simultaneously trying to create 
 ColumnFamilies.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (CASSANDRA-3795) Unable to join the mailing list

2012-01-27 Thread Krassimir Kostov (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-3795?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13194580#comment-13194580
 ] 

Krassimir Kostov commented on CASSANDRA-3795:
-

Thanks, Sylvain!

I did that and it worked.  BTW, I got the address from this site, on which I 
thought the mailing list was hosted:

http://cassandra-user-incubator-apache-org.3065146.n2.nabble.com/

 Unable to join the mailing list
 ---

 Key: CASSANDRA-3795
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3795
 Project: Cassandra
  Issue Type: Bug
Reporter: Krassimir Kostov

 Hi!
 Since Jan 25, I have been trying several times to join the mailing list at 
 cassandra-u...@incubator.apache.org, but each time I tried, I got the 
 following email.  Please help resolving the issue.  Thanks!
  Date: Fri, 27 Jan 2012 04:30:59 +
  From: mailer-dae...@apache.org
  To: x...@yyy.zzz
  Subject: failure notice
  
  Hi. This is the qmail-send program at apache.org.
  I'm afraid I wasn't able to deliver your message to the following addresses.
  This is a permanent error; I've given up. Sorry it didn't work out.
  
  cassandra-user-allow-subscribe-XXX=yyy@incubator.apache.org:
  This mailing list has moved to user at cassandra.apache.org.
  
  --- Below this line is a copy of the message.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (CASSANDRA-3796) post-2392 trunk does not build with java 7

2012-01-27 Thread Sylvain Lebresne (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-3796?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13194586#comment-13194586
 ] 

Sylvain Lebresne commented on CASSANDRA-3796:
-

This is just a generics problem (for some reason Java 7 became more picky about 
this, one could almost call it a bug but anyway) so I'd prefer not adding real 
code to fix (though I don't think there was anything wrong with the patch per 
se). Committed 
http://git-wip-us.apache.org/repos/asf?p=cassandra.git;a=commit;h=00613729 that 
adds enough generic info for the compiler to stop complaining. I'll let you 
check this fixes it for you too.

As a side note, the generics missing info was for DecoratedKey. DK has been 
generic for as long as I can remember but I don't really think this is of any 
use in that case, so it could be worth removing the type parameter from DK 
altogether, which would avoid adding a ? every time. This would affect a high 
number of lines though (all those where we have DK?) so I've sticked to just 
adding the generic info for now.

 post-2392 trunk does not build with java 7
 --

 Key: CASSANDRA-3796
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3796
 Project: Cassandra
  Issue Type: Bug
Reporter: Peter Schuller
Assignee: Peter Schuller
Priority: Minor
 Attachments: CASSANDRA-3796-trunk-v1.txt


 See below, on a fresh clone. Builds w/ java 6.
 {code}
 [javac] 
 /tmp/c2/cassandra/src/java/org/apache/cassandra/io/sstable/SSTableReader.java:419:
  error: no suitable method found for 
 binarySearch(ListDecoratedKey,RowPosition)
 [javac] int index = 
 Collections.binarySearch(indexSummary.getKeys(), key);
 [javac]^
 [javac] method Collections.T#1binarySearch(List? extends 
 T#1,T#1,Comparator? super T#1) is not applicable
 [javac]   (cannot instantiate from arguments because actual and 
 formal argument lists differ in length)
 [javac] method Collections.T#2binarySearch(List? extends 
 Comparable? super T#2,T#2) is not applicable
 [javac]   (no instance(s) of type variable(s) T#2 exist so that 
 argument type ListDecoratedKey conforms to formal parameter type List? 
 extends Comparable? super T#2)
 [javac]   where T#1,T#2 are type-variables:
 [javac] T#1 extends Object declared in method 
 T#1binarySearch(List? extends T#1,T#1,Comparator? super T#1)
 [javac] T#2 extends Object declared in method 
 T#2binarySearch(List? extends Comparable? super T#2,T#2)
 [javac] 
 /tmp/c2/cassandra/src/java/org/apache/cassandra/io/sstable/SSTableReader.java:509:
  error: no suitable method found for 
 binarySearch(ListDecoratedKey,RowPosition)
 [javac] int left = Collections.binarySearch(samples, 
 leftPosition);
 [javac]   ^
 [javac] method Collections.T#1binarySearch(List? extends 
 T#1,T#1,Comparator? super T#1) is not applicable
 [javac]   (cannot instantiate from arguments because actual and 
 formal argument lists differ in length)
 [javac] method Collections.T#2binarySearch(List? extends 
 Comparable? super T#2,T#2) is not applicable
 [javac]   (no instance(s) of type variable(s) T#2 exist so that 
 argument type ListDecoratedKey conforms to formal parameter type List? 
 extends Comparable? super T#2)
 [javac]   where T#1,T#2 are type-variables:
 [javac] T#1 extends Object declared in method 
 T#1binarySearch(List? extends T#1,T#1,Comparator? super T#1)
 [javac] T#2 extends Object declared in method 
 T#2binarySearch(List? extends Comparable? super T#2,T#2)
 [javac] 
 /tmp/c2/cassandra/src/java/org/apache/cassandra/io/sstable/SSTableReader.java:521:
  error: no suitable method found for 
 binarySearch(ListDecoratedKey,RowPosition)
 [javac]   : Collections.binarySearch(samples, 
 rightPosition);
 [javac]^
 [javac] method Collections.T#1binarySearch(List? extends 
 T#1,T#1,Comparator? super T#1) is not applicable
 [javac]   (cannot instantiate from arguments because actual and 
 formal argument lists differ in length)
 [javac] method Collections.T#2binarySearch(List? extends 
 Comparable? super T#2,T#2) is not applicable
 [javac]   (no instance(s) of type variable(s) T#2 exist so that 
 argument type ListDecoratedKey conforms to formal parameter type List? 
 extends Comparable? super T#2)
 [javac]   where T#1,T#2 are type-variables:
 [javac] T#1 extends Object declared in method 
 T#1binarySearch(List? extends T#1,T#1,Comparator? super T#1)
 [javac] T#2 extends Object declared in method 
 T#2binarySearch(List? extends Comparable? super T#2,T#2)
 

[jira] [Commented] (CASSANDRA-3778) KEY IN (...) queries do not work

2012-01-27 Thread Sylvain Lebresne (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-3778?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13194604#comment-13194604
 ] 

Sylvain Lebresne commented on CASSANDRA-3778:
-

bq. I am unable to reproduce with dtest because of a change to the Python 
driver that I am guessing hasn't been propagated.

I've created 
http://code.google.com/a/apache-extras.org/p/cassandra-dbapi2/issues/detail?id=14
 but it wasn't reviewed yet by any of the driver committers (hint, hint :D).

bq. To reproduce this with scqeal

You're right, this is a bug. As it happens, the refactor done in CASSANDRA-3791 
fixes that bug (among other benefits), so let's maybe just deal with that patch.

 KEY IN (...) queries do not work
 

 Key: CASSANDRA-3778
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3778
 Project: Cassandra
  Issue Type: Sub-task
  Components: API
Affects Versions: 1.1
Reporter: Eric Evans
Assignee: Sylvain Lebresne
  Labels: cql
 Fix For: 1.1


 {{...KEY IN (...)}} queries fail due to faulty validation.  A pull request 
 for cassandra-dtest was opened that demonstrates this: 
 https://github.com/riptano/cassandra-dtest/pull/2

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (CASSANDRA-3730) If some streaming sessions fail on decommission, decommission hangs

2012-01-27 Thread Vitalii Tymchyshyn (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-3730?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13194630#comment-13194630
 ] 

Vitalii Tymchyshyn commented on CASSANDRA-3730:
---

I've introduced simplistic handling that should at least abort decommission or 
move command with problematic streaming sessions: 
https://github.com/apache/cassandra/pull/6

 If some streaming sessions fail on decommission, decommission hangs
 ---

 Key: CASSANDRA-3730
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3730
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Affects Versions: 1.1
 Environment: FreeBSD
Reporter: Vitalii Tymchyshyn

 Currently cassandra do not handle StreamOutSession fails, e.g.:
 // Instead of just not calling the callback on failure, we could have
 // allow to register a specific callback for failures, but we leave
 // that to a future ticket (likely CASSANDRA-3112)
 if (callback != null  success)
 callback.run();
 This means that if during decommission a node that receives decommission data 
 fails or (my case) the node that tries to decommission becomes overloaded, 
 the streaming session fails and decommission don't know anything about this. 
 This makes it hard to decommission overloaded nodes because I need to restart 
 the node to restart decommission.
 Also I can see next errors because of streaming files try to get streaming 
 session that is closed by gossip:
 ERROR [Streaming to /10.112.0.216:1] 2012-01-11 15:57:28,882 
 AbstractCassandraDaemon.java (line 138) Fatal exception in thread 
 Thread[Streaming to /10.112.0.216:1,5,main]
 java.lang.NullPointerException
 at 
 org.apache.cassandra.streaming.FileStreamTask.runMayThrow(FileStreamTask.java:97)
 at 
 org.apache.cassandra.utils.WrappedRunnable.run(WrappedRunnable.java:30)
 at 
 java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
 at 
 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
 at java.lang.Thread.run(Thread.java:679)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (CASSANDRA-2864) Alternative Row Cache Implementation

2012-01-27 Thread Daniel Doubleday (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-2864?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13194635#comment-13194635
 ] 

Daniel Doubleday commented on CASSANDRA-2864:
-

Well last couple of months we had to few problems with cassandra (thanks) to 
move on with this but we actually just started to upgrade to 1.0 using this 
cache implementation. We hope to deploy within 3-4 weeks. We can then compare 
the different approaches.

I'm pretty confident that this makes sense for our upcoming use case: an 
average of 5k small columns per row. Many updates, random access queries. We 
basically get the footprint of the serializing cache but with update support 
and no need to deserialize the entire row. But we'll see.

If successful we would make this a global cache as well.

Not sure what you mean by 'read-time row defragmentation'. Sounds like 
superseding but I thought that would be 1.1. as well?

I guess this one could be closed as 'wont fix'? 

 Alternative Row Cache Implementation
 

 Key: CASSANDRA-2864
 URL: https://issues.apache.org/jira/browse/CASSANDRA-2864
 Project: Cassandra
  Issue Type: Improvement
  Components: Core
Reporter: Daniel Doubleday
Assignee: Daniel Doubleday
Priority: Minor
 Attachments: rowcache.patch


 we have been working on an alternative implementation to the existing row 
 cache(s)
 We have 2 main goals:
 - Decrease memory - get more rows in the cache without suffering a huge 
 performance penalty
 - Reduce gc pressure
 This sounds a lot like we should be using the new serializing cache in 0.8. 
 Unfortunately our workload consists of loads of updates which would 
 invalidate the cache all the time.
 The second unfortunate thing is that the idea we came up with doesn't fit the 
 new cache provider api...
 It looks like this:
 Like the serializing cache we basically only cache the serialized byte 
 buffer. we don't serialize the bloom filter and try to do some other minor 
 compression tricks (var ints etc not done yet). The main difference is that 
 we don't deserialize but use the normal sstable iterators and filters as in 
 the regular uncached case.
 So the read path looks like this:
 return filter.collectCollatedColumns(memtable iter, cached row iter)
 The write path is not affected. It does not update the cache
 During flush we merge all memtable updates with the cached rows.
 The attached patch is based on 0.8 branch r1143352
 It does not replace the existing row cache but sits aside it. Theres 
 environment switch to choose the implementation. This way it is easy to 
 benchmark performance differences.
 -DuseSSTableCache=true enables the alternative cache. It shares its 
 configuration with the standard row cache. So the cache capacity is shared. 
 We have duplicated a fair amount of code. First we actually refactored the 
 existing sstable filter / reader but than decided to minimize dependencies. 
 Also this way it is easy to customize serialization for in memory sstable 
 rows. 
 We have also experimented a little with compression but since this task at 
 this stage is mainly to kick off discussion we wanted to keep things simple. 
 But there is certainly room for optimizations.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (CASSANDRA-3748) Range ghosts don't disappear as expected and accumulate

2012-01-27 Thread Dominic Williams (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-3748?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13194704#comment-13194704
 ] 

Dominic Williams commented on CASSANDRA-3748:
-

Just an update - the range ghosts are still accumulating. It would appear these 
deleted rows are never being compacted away. Potentially a very serious bug (or 
system is only still running because of the caching layer)

 Range ghosts don't disappear as expected and accumulate
 ---

 Key: CASSANDRA-3748
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3748
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Affects Versions: 1.0.3
 Environment: Cassandra on Debian 
Reporter: Dominic Williams
  Labels: compaction, ghost-row, range, remove
 Fix For: 1.0.8

   Original Estimate: 6h
  Remaining Estimate: 6h

 I have a problem where range ghosts are accumulating and cannot be removed by 
 reducing GCSeconds and compacting.
 In our system, we have some cfs that represent markets where each row 
 represents an item. Once an item is sold, it is removed from the market by 
 passing its key to remove().
 The problem, which was hidden for some time by caching, is appearing on read. 
 Every few seconds our system collates a random sample from each cf/market by 
 choosing a random starting point:
 String startKey = RNG.nextUUID())
 and then loading a page range of rows, specifying the key range as:
 KeyRange keyRange = new KeyRange(pageSize);
 keyRange.setStart_key(startKey);
 keyRange.setEnd_key(maxKey);
 The returned rows are iterated over, and ghosts ignored. If insufficient rows 
 are obtained, the process is repeated using the key of the last row as the 
 starting key (or wrapping if necessary etc).
 When performance was lagging, we did a test and found that constructing a 
 random sample of 40 items (rows) involved iterating over hundreds of 
 thousands of ghost rows. 
 Our first attempt to deal with this was to halve our GCGraceSeconds and then 
 perform major compactions. However, this had no effect on the number of ghost 
 rows being returned. Furthermore, on examination it seems clear that the 
 number of ghost rows being created within GCSeconds window must be smaller 
 than the number being returned. Thus looks like a bug.
 We are using Cassandra 1.0.3 with Sylain's patch from CASSANDRA-3510

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Issue Comment Edited] (CASSANDRA-3748) Range ghosts don't disappear as expected and accumulate

2012-01-27 Thread Dominic Williams (Issue Comment Edited) (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-3748?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13194704#comment-13194704
 ] 

Dominic Williams edited comment on CASSANDRA-3748 at 1/27/12 1:39 PM:
--

Just an update - the range ghosts are still accumulating. It would appear these 
deleted rows are never being compacted away. Potentially a very serious bug 
(our system is only still running because of the caching layer, but we are 
seeing some serious CPU cycles being generated by the generation of that info 
we cache now)

  was (Author: dccwilliams):
Just an update - the range ghosts are still accumulating. It would appear 
these deleted rows are never being compacted away. Potentially a very serious 
bug (or system is only still running because of the caching layer)
  
 Range ghosts don't disappear as expected and accumulate
 ---

 Key: CASSANDRA-3748
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3748
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Affects Versions: 1.0.3
 Environment: Cassandra on Debian 
Reporter: Dominic Williams
  Labels: compaction, ghost-row, range, remove
 Fix For: 1.0.8

   Original Estimate: 6h
  Remaining Estimate: 6h

 I have a problem where range ghosts are accumulating and cannot be removed by 
 reducing GCSeconds and compacting.
 In our system, we have some cfs that represent markets where each row 
 represents an item. Once an item is sold, it is removed from the market by 
 passing its key to remove().
 The problem, which was hidden for some time by caching, is appearing on read. 
 Every few seconds our system collates a random sample from each cf/market by 
 choosing a random starting point:
 String startKey = RNG.nextUUID())
 and then loading a page range of rows, specifying the key range as:
 KeyRange keyRange = new KeyRange(pageSize);
 keyRange.setStart_key(startKey);
 keyRange.setEnd_key(maxKey);
 The returned rows are iterated over, and ghosts ignored. If insufficient rows 
 are obtained, the process is repeated using the key of the last row as the 
 starting key (or wrapping if necessary etc).
 When performance was lagging, we did a test and found that constructing a 
 random sample of 40 items (rows) involved iterating over hundreds of 
 thousands of ghost rows. 
 Our first attempt to deal with this was to halve our GCGraceSeconds and then 
 perform major compactions. However, this had no effect on the number of ghost 
 rows being returned. Furthermore, on examination it seems clear that the 
 number of ghost rows being created within GCSeconds window must be smaller 
 than the number being returned. Thus looks like a bug.
 We are using Cassandra 1.0.3 with Sylain's patch from CASSANDRA-3510

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (CASSANDRA-2893) Add row-level isolation

2012-01-27 Thread Sylvain Lebresne (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-2893?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13194786#comment-13194786
 ] 

Sylvain Lebresne commented on CASSANDRA-2893:
-

The problem you're seeing is due to the call to get_count and more precisely to 
the paging we do server side since CASSANDRA-2894. As a result, get_count is 
not atomic. I'm not sure we have a better solution for that than documenting 
it's a limitation. But we'd have to keep that in mind if we introduce paging 
for CQL.

Note that not only does that explain why you're seeing delete mismatches on 
trunk, but also why you don't see mismatches on insert on 1.0 (insertion is 
done in the same order than the pages are done, so I suspect the insertions 
were just faster than the paging; and somehow the timing changed things for 
deletes).

Anyway, I've tested with get_count paging disabled (which require hacking the 
server), and the result are the one expected.
* on 1.0, there is mismatches for insertions
* on trunk, no mismatches are found

For your tests, you'll want to use a get_slice call instead of get_count since 
we don't page those.


 Add row-level isolation
 ---

 Key: CASSANDRA-2893
 URL: https://issues.apache.org/jira/browse/CASSANDRA-2893
 Project: Cassandra
  Issue Type: Improvement
Reporter: Jonathan Ellis
Assignee: Sylvain Lebresne
Priority: Minor
 Fix For: 1.1

 Attachments: 0001-Move-deletion-infos-into-ISortedColumns-v2.patch, 
 0001-Move-deletion-infos-into-ISortedColumns.patch, 
 0002-Make-memtable-use-CF.addAll-v2.patch, 
 0002-Make-memtable-use-CF.addAll.patch, 
 0003-Add-AtomicSortedColumn-and-snapTree-v2.patch, 
 0003-Add-AtomicSortedColumn-and-snapTree.patch, latency-plain.svg, 
 latency.svg, row_isolation_test.py, snaptree-0.1-SNAPSHOT.jar


 This could be done using an the atomic ConcurrentMap operations from the 
 Memtable and something like http://code.google.com/p/pcollections/ to replace 
 the ConcurrentSkipListMap in ThreadSafeSortedColumns.  The trick is that 
 pcollections does not provide a SortedMap, so we probably need to write our 
 own.
 Googling [persistent sortedmap] I found 
 http://code.google.com/p/actord/source/browse/trunk/actord/src/main/scala/ff/collection
  (in scala) and http://clojure.org/data_structures#Data Structures-Maps.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Created] (CASSANDRA-3798) get_count paging often asks for a page uselessly

2012-01-27 Thread Sylvain Lebresne (Created) (JIRA)
get_count paging often asks for a page uselessly


 Key: CASSANDRA-3798
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3798
 Project: Cassandra
  Issue Type: Improvement
Affects Versions: 1.0.0
Reporter: Sylvain Lebresne
Assignee: Sylvain Lebresne
Priority: Minor
 Fix For: 1.1


Current get_count paging stopping condition is:
{noformat}
if ((requestedCount == 0) || ((columns.size() == 1)  
(lastName.equals(predicate.slice_range.start
{
break;
}
{noformat}
On a count how many columns this row has query (arguably the main reason why 
you'd use get_count), requestedCount will never be 0, and so we'll stop 
whenever a page has only returned the last column of the preceding page. While 
this isn't wrong, we could stop as soon as a page returns less element than 
requested and avoid querying that last 1 column page.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Updated] (CASSANDRA-2893) Add row-level isolation

2012-01-27 Thread Jonathan Ellis (Updated) (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-2893?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jonathan Ellis updated CASSANDRA-2893:
--

Attachment: 2893-pauses.txt

I can also reproduce the apparently atomic insert behavior in 1.0.  I'm not 
sure what quirk of Java optimization is causing it, to be honest.  But I'm not 
worried about it because when I forced pauses between the columns being added 
(pauses patch attached) then I did see the counts change.  (Specifically, I 
initialized the row first with stress -t 1 -n 1 -c 1 -K 1, then sent 1 
columns with stress -t 1 -n 1 -c 1 -K 1.)  

So whatever is making the updates highly likely to be isolated does not 
*guarantee* it, so I'm comfortable that our mental model of the 1.0 Memtable is 
valid.


 Add row-level isolation
 ---

 Key: CASSANDRA-2893
 URL: https://issues.apache.org/jira/browse/CASSANDRA-2893
 Project: Cassandra
  Issue Type: Improvement
Reporter: Jonathan Ellis
Assignee: Sylvain Lebresne
Priority: Minor
 Fix For: 1.1

 Attachments: 0001-Move-deletion-infos-into-ISortedColumns-v2.patch, 
 0001-Move-deletion-infos-into-ISortedColumns.patch, 
 0002-Make-memtable-use-CF.addAll-v2.patch, 
 0002-Make-memtable-use-CF.addAll.patch, 
 0003-Add-AtomicSortedColumn-and-snapTree-v2.patch, 
 0003-Add-AtomicSortedColumn-and-snapTree.patch, 2893-pauses.txt, 
 latency-plain.svg, latency.svg, row_isolation_test.py, 
 snaptree-0.1-SNAPSHOT.jar


 This could be done using an the atomic ConcurrentMap operations from the 
 Memtable and something like http://code.google.com/p/pcollections/ to replace 
 the ConcurrentSkipListMap in ThreadSafeSortedColumns.  The trick is that 
 pcollections does not provide a SortedMap, so we probably need to write our 
 own.
 Googling [persistent sortedmap] I found 
 http://code.google.com/p/actord/source/browse/trunk/actord/src/main/scala/ff/collection
  (in scala) and http://clojure.org/data_structures#Data Structures-Maps.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Updated] (CASSANDRA-3798) get_count paging often asks for a page uselessly

2012-01-27 Thread Sylvain Lebresne (Updated) (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-3798?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sylvain Lebresne updated CASSANDRA-3798:


Attachment: 3798.patch

Patch attached against 1.1 (I don't really see a reason to risk back-porting to 
1.0).

 get_count paging often asks for a page uselessly
 

 Key: CASSANDRA-3798
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3798
 Project: Cassandra
  Issue Type: Improvement
Affects Versions: 1.0.0
Reporter: Sylvain Lebresne
Assignee: Sylvain Lebresne
Priority: Minor
 Fix For: 1.1

 Attachments: 3798.patch


 Current get_count paging stopping condition is:
 {noformat}
 if ((requestedCount == 0) || ((columns.size() == 1)  
 (lastName.equals(predicate.slice_range.start
 {
 break;
 }
 {noformat}
 On a count how many columns this row has query (arguably the main reason 
 why you'd use get_count), requestedCount will never be 0, and so we'll stop 
 whenever a page has only returned the last column of the preceding page. 
 While this isn't wrong, we could stop as soon as a page returns less element 
 than requested and avoid querying that last 1 column page.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (CASSANDRA-2864) Alternative Row Cache Implementation

2012-01-27 Thread Jonathan Ellis (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-2864?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13194797#comment-13194797
 ] 

Jonathan Ellis commented on CASSANDRA-2864:
---

bq. Not sure what you mean by 'read-time row defragmentation'. Sounds like 
superseding but I thought that would be 1.1. as well?

You're right (CASSANDRA-2503).  It was long enough ago that I thought it made 
it into 1.0, but it did not.

bq. I guess this one could be closed as 'wont fix'?

I'm fine with leaving it as In Progress if you're testing it soon.

 Alternative Row Cache Implementation
 

 Key: CASSANDRA-2864
 URL: https://issues.apache.org/jira/browse/CASSANDRA-2864
 Project: Cassandra
  Issue Type: Improvement
  Components: Core
Reporter: Daniel Doubleday
Assignee: Daniel Doubleday
Priority: Minor
 Attachments: rowcache.patch


 we have been working on an alternative implementation to the existing row 
 cache(s)
 We have 2 main goals:
 - Decrease memory - get more rows in the cache without suffering a huge 
 performance penalty
 - Reduce gc pressure
 This sounds a lot like we should be using the new serializing cache in 0.8. 
 Unfortunately our workload consists of loads of updates which would 
 invalidate the cache all the time.
 The second unfortunate thing is that the idea we came up with doesn't fit the 
 new cache provider api...
 It looks like this:
 Like the serializing cache we basically only cache the serialized byte 
 buffer. we don't serialize the bloom filter and try to do some other minor 
 compression tricks (var ints etc not done yet). The main difference is that 
 we don't deserialize but use the normal sstable iterators and filters as in 
 the regular uncached case.
 So the read path looks like this:
 return filter.collectCollatedColumns(memtable iter, cached row iter)
 The write path is not affected. It does not update the cache
 During flush we merge all memtable updates with the cached rows.
 The attached patch is based on 0.8 branch r1143352
 It does not replace the existing row cache but sits aside it. Theres 
 environment switch to choose the implementation. This way it is easy to 
 benchmark performance differences.
 -DuseSSTableCache=true enables the alternative cache. It shares its 
 configuration with the standard row cache. So the cache capacity is shared. 
 We have duplicated a fair amount of code. First we actually refactored the 
 existing sstable filter / reader but than decided to minimize dependencies. 
 Also this way it is easy to customize serialization for in memory sstable 
 rows. 
 We have also experimented a little with compression but since this task at 
 this stage is mainly to kick off discussion we wanted to keep things simple. 
 But there is certainly room for optimizations.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Updated] (CASSANDRA-3671) provide JMX counters for unavailables/timeouts for reads and writes

2012-01-27 Thread Jonathan Ellis (Updated) (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-3671?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jonathan Ellis updated CASSANDRA-3671:
--

 Reviewer: brandon.williams
  Component/s: Tools
Fix Version/s: 1.2

 provide JMX counters for unavailables/timeouts for reads and writes
 ---

 Key: CASSANDRA-3671
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3671
 Project: Cassandra
  Issue Type: Improvement
  Components: Tools
Reporter: Peter Schuller
Assignee: Peter Schuller
Priority: Minor
 Fix For: 1.2

 Attachments: CASSANDRA-3671-trunk-coda-metrics-v1.txt, 
 CASSANDRA-3671-trunk-v2.txt, CASSANDRA-3671-trunk.txt


 Attaching patch against trunk.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (CASSANDRA-3785) Support slice with exclusive start and stop

2012-01-27 Thread Jonathan Ellis (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-3785?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13194803#comment-13194803
 ] 

Jonathan Ellis commented on CASSANDRA-3785:
---

Why does composite-ness matter here?  Isn't it decomposing into the same slice 
calls either way?

 Support slice with exclusive start and stop
 ---

 Key: CASSANDRA-3785
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3785
 Project: Cassandra
  Issue Type: Improvement
  Components: Core
Reporter: Sylvain Lebresne
Assignee: Sylvain Lebresne
  Labels: cql3
 Fix For: 1.1

 Attachments: 3785.patch


 Currently, slices are always start and end inclusive. However, for CQL 3.0, 
 we already differenciate between inclusivity/exclusivity for the row key and 
 for the component of composite columns. It would be nice to always support 
 that distinction.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (CASSANDRA-3785) Support slice with exclusive start and stop

2012-01-27 Thread Sylvain Lebresne (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-3785?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13194811#comment-13194811
 ] 

Sylvain Lebresne commented on CASSANDRA-3785:
-

Because composites have a end-of-component byte with each component that allow 
to respect inclusiveness/exclusiveness at query time so they don't need that 
trick.

 Support slice with exclusive start and stop
 ---

 Key: CASSANDRA-3785
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3785
 Project: Cassandra
  Issue Type: Improvement
  Components: Core
Reporter: Sylvain Lebresne
Assignee: Sylvain Lebresne
  Labels: cql3
 Fix For: 1.1

 Attachments: 3785.patch


 Currently, slices are always start and end inclusive. However, for CQL 3.0, 
 we already differenciate between inclusivity/exclusivity for the row key and 
 for the component of composite columns. It would be nice to always support 
 that distinction.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (CASSANDRA-3798) get_count paging often asks for a page uselessly

2012-01-27 Thread Jonathan Ellis (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-3798?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13194818#comment-13194818
 ] 

Jonathan Ellis commented on CASSANDRA-3798:
---

+1

 get_count paging often asks for a page uselessly
 

 Key: CASSANDRA-3798
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3798
 Project: Cassandra
  Issue Type: Improvement
Affects Versions: 1.0.0
Reporter: Sylvain Lebresne
Assignee: Sylvain Lebresne
Priority: Minor
 Fix For: 1.1

 Attachments: 3798.patch


 Current get_count paging stopping condition is:
 {noformat}
 if ((requestedCount == 0) || ((columns.size() == 1)  
 (lastName.equals(predicate.slice_range.start
 {
 break;
 }
 {noformat}
 On a count how many columns this row has query (arguably the main reason 
 why you'd use get_count), requestedCount will never be 0, and so we'll stop 
 whenever a page has only returned the last column of the preceding page. 
 While this isn't wrong, we could stop as soon as a page returns less element 
 than requested and avoid querying that last 1 column page.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




git commit: Avoids over-paging during get_count

2012-01-27 Thread slebresne
Updated Branches:
  refs/heads/trunk 006137294 - a5b3abb66


Avoids over-paging during get_count

patch by slebresne; reviewed by jbellis for CASSANDRA-3798


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/a5b3abb6
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/a5b3abb6
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/a5b3abb6

Branch: refs/heads/trunk
Commit: a5b3abb667928e231b9dc9cfcb9184024f23f8d5
Parents: 0061372
Author: Sylvain Lebresne sylv...@datastax.com
Authored: Fri Jan 27 16:02:43 2012 +0100
Committer: Sylvain Lebresne sylv...@datastax.com
Committed: Fri Jan 27 16:02:43 2012 +0100

--
 CHANGES.txt|1 +
 .../apache/cassandra/thrift/CassandraServer.java   |   37 ---
 2 files changed, 21 insertions(+), 17 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/a5b3abb6/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index b1f3061..8f62ab3 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -59,6 +59,7 @@
  * Add initial code for CQL 3.0-beta (CASSANDRA-3781, 3753)
  * Add wide row support for ColumnFamilyInputFormat (CASSANDRA-3264)
  * Allow extending CompositeType comparator (CASSANDRA-3657)
+ * Avoids over-paging during get_count (CASSANDRA-3798)
 
 
 1.0.8

http://git-wip-us.apache.org/repos/asf/cassandra/blob/a5b3abb6/src/java/org/apache/cassandra/thrift/CassandraServer.java
--
diff --git a/src/java/org/apache/cassandra/thrift/CassandraServer.java 
b/src/java/org/apache/cassandra/thrift/CassandraServer.java
index 8aacea1..03e6728 100644
--- a/src/java/org/apache/cassandra/thrift/CassandraServer.java
+++ b/src/java/org/apache/cassandra/thrift/CassandraServer.java
@@ -434,8 +434,9 @@ public class CassandraServer implements Cassandra.Iface
false,
Integer.MAX_VALUE);
 }
-
+
 int requestedCount = predicate.slice_range.count;
+int pages = 0;
 while (true)
 {
 predicate.slice_range.count = Math.min(pageSize, requestedCount);
@@ -443,29 +444,31 @@ public class CassandraServer implements Cassandra.Iface
 if (columns.isEmpty())
 break;
 
-totalCount += columns.size();
-requestedCount -= columns.size();
-ColumnOrSuperColumn lastColumn = columns.get(columns.size() - 1);
-ByteBuffer lastName =
-lastColumn.isSetSuper_column() ? 
lastColumn.super_column.name :
-(lastColumn.isSetColumn() ? lastColumn.column.name :
-(lastColumn.isSetCounter_column() ? 
lastColumn.counter_column.name : lastColumn.counter_super_column.name));
-if ((requestedCount == 0) || ((columns.size() == 1)  
(lastName.equals(predicate.slice_range.start
-{
+ColumnOrSuperColumn firstColumn = columns.get(columns.size() - 1);
+ByteBuffer firstName = getName(columns.get(0));
+int newColumns = pages == 0 || 
!firstName.equals(predicate.slice_range.start) ? columns.size() : 
columns.size() - 1;
+totalCount += newColumns;
+requestedCount -= newColumns;
+pages++;
+// We're done if either:
+//   - We've querying the number of columns requested by the user
+//   - The last page wasn't full
+if (requestedCount == 0 || columns.size()  
predicate.slice_range.count)
 break;
-}
 else
-{
-predicate.slice_range.start = lastName;
-// remove the count for the column that starts the next slice
-totalCount--;
-requestedCount++;
-}
+predicate.slice_range.start = 
getName(columns.get(columns.size() - 1));
 }
 
 return totalCount;
 }
 
+private static ByteBuffer getName(ColumnOrSuperColumn cosc)
+{
+return cosc.isSetSuper_column() ? cosc.super_column.name :
+   (cosc.isSetColumn() ? cosc.column.name :
+   (cosc.isSetCounter_column() ? cosc.counter_column.name 
: cosc.counter_super_column.name));
+}
+
 public MapByteBuffer, Integer multiget_count(ListByteBuffer keys, 
ColumnParent column_parent, SlicePredicate predicate, ConsistencyLevel 
consistency_level)
 throws InvalidRequestException, UnavailableException, TimedOutException
 {



[1/5] git commit: Merge branch 'cassandra-1.0' into trunk

2012-01-27 Thread jbellis
Updated Branches:
  refs/heads/cassandra-1.0 68d4e28d9 - 2a1ec27e2
  refs/heads/trunk a5b3abb66 - 73f7104cd


Merge branch 'cassandra-1.0' into trunk


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/73f7104c
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/73f7104c
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/73f7104c

Branch: refs/heads/trunk
Commit: 73f7104cd356485332298f0a2fdddf9aecfbbca6
Parents: a5b3abb 2a1ec27
Author: Jonathan Ellis jbel...@apache.org
Authored: Fri Jan 27 09:29:35 2012 -0600
Committer: Jonathan Ellis jbel...@apache.org
Committed: Fri Jan 27 09:29:35 2012 -0600

--
 bin/cassandra-cli.bat |2 +-
 bin/cassandra.bat |2 +-
 bin/json2sstable.bat  |8 
 bin/nodetool.bat  |5 ++---
 bin/sstable2json.bat  |8 
 bin/sstablekeys.bat   |8 
 6 files changed, 16 insertions(+), 17 deletions(-)
--




[3/5] git commit: s/goto err/goto :err/

2012-01-27 Thread jbellis
s/goto err/goto :err/


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/2a1ec27e
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/2a1ec27e
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/2a1ec27e

Branch: refs/heads/trunk
Commit: 2a1ec27e2621709bf3f85a71ef2061d3f48b7598
Parents: 90e3ec4
Author: Jonathan Ellis jbel...@apache.org
Authored: Fri Jan 27 15:03:02 2012 +
Committer: Jonathan Ellis jbel...@apache.org
Committed: Fri Jan 27 09:29:21 2012 -0600

--
 bin/cassandra-cli.bat |2 +-
 bin/cassandra.bat |2 +-
 bin/json2sstable.bat  |2 +-
 bin/nodetool.bat  |2 +-
 bin/sstable2json.bat  |2 +-
 bin/sstablekeys.bat   |2 +-
 6 files changed, 6 insertions(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/2a1ec27e/bin/cassandra-cli.bat
--
diff --git a/bin/cassandra-cli.bat b/bin/cassandra-cli.bat
index a4d0102..0d52bdf 100644
--- a/bin/cassandra-cli.bat
+++ b/bin/cassandra-cli.bat
@@ -19,7 +19,7 @@
 if %OS% == Windows_NT setlocal
 
 if NOT DEFINED CASSANDRA_HOME set CASSANDRA_HOME=%~dp0..
-if NOT DEFINED JAVA_HOME goto err
+if NOT DEFINED JAVA_HOME goto :err
 
 REM Ensure that any user defined CLASSPATH variables are not used on startup
 set CLASSPATH=

http://git-wip-us.apache.org/repos/asf/cassandra/blob/2a1ec27e/bin/cassandra.bat
--
diff --git a/bin/cassandra.bat b/bin/cassandra.bat
index 58e9611..283abe9 100644
--- a/bin/cassandra.bat
+++ b/bin/cassandra.bat
@@ -26,7 +26,7 @@ if NOT DEFINED CASSANDRA_HOME set CASSANDRA_HOME=%CD%
 popd
 
 if NOT DEFINED CASSANDRA_MAIN set 
CASSANDRA_MAIN=org.apache.cassandra.thrift.CassandraDaemon
-if NOT DEFINED JAVA_HOME goto err
+if NOT DEFINED JAVA_HOME goto :err
 
 REM * JAVA options *
 set JAVA_OPTS=-ea^

http://git-wip-us.apache.org/repos/asf/cassandra/blob/2a1ec27e/bin/json2sstable.bat
--
diff --git a/bin/json2sstable.bat b/bin/json2sstable.bat
index b42c34e..dc1e8f6 100644
--- a/bin/json2sstable.bat
+++ b/bin/json2sstable.bat
@@ -20,7 +20,7 @@ if %OS% == Windows_NT setlocal
 if NOT DEFINED CASSANDRA_HOME set CASSANDRA_HOME=%~dp0..
 if NOT DEFINED CASSANDRA_CONF set CASSANDRA_CONF=%CASSANDRA_HOME%\conf
 if NOT DEFINED CASSANDRA_MAIN set 
CASSANDRA_MAIN=org.apache.cassandra.tools.SSTableImport
-if NOT DEFINED JAVA_HOME goto err
+if NOT DEFINED JAVA_HOME goto :err
 
 REM * JAVA options *
 set JAVA_OPTS=^

http://git-wip-us.apache.org/repos/asf/cassandra/blob/2a1ec27e/bin/nodetool.bat
--
diff --git a/bin/nodetool.bat b/bin/nodetool.bat
index 200fb4a..2f74687 100644
--- a/bin/nodetool.bat
+++ b/bin/nodetool.bat
@@ -18,7 +18,7 @@
 if %OS% == Windows_NT setlocal
 
 if NOT DEFINED CASSANDRA_HOME set CASSANDRA_HOME=%~dp0..
-if NOT DEFINED JAVA_HOME goto err
+if NOT DEFINED JAVA_HOME goto :err
 
 REM Ensure that any user defined CLASSPATH variables are not used on startup
 set CLASSPATH=%CASSANDRA_HOME%\conf

http://git-wip-us.apache.org/repos/asf/cassandra/blob/2a1ec27e/bin/sstable2json.bat
--
diff --git a/bin/sstable2json.bat b/bin/sstable2json.bat
index 45dcd50..9544e0c 100644
--- a/bin/sstable2json.bat
+++ b/bin/sstable2json.bat
@@ -20,7 +20,7 @@ if %OS% == Windows_NT setlocal
 if NOT DEFINED CASSANDRA_HOME set CASSANDRA_HOME=%~dp0..
 if NOT DEFINED CASSANDRA_CONF set CASSANDRA_CONF=%CASSANDRA_HOME%\conf
 if NOT DEFINED CASSANDRA_MAIN set 
CASSANDRA_MAIN=org.apache.cassandra.tools.SSTableExport
-if NOT DEFINED JAVA_HOME goto err
+if NOT DEFINED JAVA_HOME goto :err
 
 REM * JAVA options *
 set JAVA_OPTS=^

http://git-wip-us.apache.org/repos/asf/cassandra/blob/2a1ec27e/bin/sstablekeys.bat
--
diff --git a/bin/sstablekeys.bat b/bin/sstablekeys.bat
index 88b33bc..6a483ba 100644
--- a/bin/sstablekeys.bat
+++ b/bin/sstablekeys.bat
@@ -20,7 +20,7 @@ if %OS% == Windows_NT setlocal
 if NOT DEFINED CASSANDRA_HOME set CASSANDRA_HOME=%~dp0..
 if NOT DEFINED CASSANDRA_CONF set CASSANDRA_CONF=%CASSANDRA_HOME%\conf
 if NOT DEFINED CASSANDRA_MAIN set 
CASSANDRA_MAIN=org.apache.cassandra.tools.SSTableExport
-if NOT DEFINED JAVA_HOME goto err
+if NOT DEFINED JAVA_HOME goto :err
 
 REM * JAVA options *
 set JAVA_OPTS=^



[2/5] git commit: s/goto err/goto :err/

2012-01-27 Thread jbellis
s/goto err/goto :err/


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/2a1ec27e
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/2a1ec27e
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/2a1ec27e

Branch: refs/heads/cassandra-1.0
Commit: 2a1ec27e2621709bf3f85a71ef2061d3f48b7598
Parents: 90e3ec4
Author: Jonathan Ellis jbel...@apache.org
Authored: Fri Jan 27 15:03:02 2012 +
Committer: Jonathan Ellis jbel...@apache.org
Committed: Fri Jan 27 09:29:21 2012 -0600

--
 bin/cassandra-cli.bat |2 +-
 bin/cassandra.bat |2 +-
 bin/json2sstable.bat  |2 +-
 bin/nodetool.bat  |2 +-
 bin/sstable2json.bat  |2 +-
 bin/sstablekeys.bat   |2 +-
 6 files changed, 6 insertions(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/2a1ec27e/bin/cassandra-cli.bat
--
diff --git a/bin/cassandra-cli.bat b/bin/cassandra-cli.bat
index a4d0102..0d52bdf 100644
--- a/bin/cassandra-cli.bat
+++ b/bin/cassandra-cli.bat
@@ -19,7 +19,7 @@
 if %OS% == Windows_NT setlocal
 
 if NOT DEFINED CASSANDRA_HOME set CASSANDRA_HOME=%~dp0..
-if NOT DEFINED JAVA_HOME goto err
+if NOT DEFINED JAVA_HOME goto :err
 
 REM Ensure that any user defined CLASSPATH variables are not used on startup
 set CLASSPATH=

http://git-wip-us.apache.org/repos/asf/cassandra/blob/2a1ec27e/bin/cassandra.bat
--
diff --git a/bin/cassandra.bat b/bin/cassandra.bat
index 58e9611..283abe9 100644
--- a/bin/cassandra.bat
+++ b/bin/cassandra.bat
@@ -26,7 +26,7 @@ if NOT DEFINED CASSANDRA_HOME set CASSANDRA_HOME=%CD%
 popd
 
 if NOT DEFINED CASSANDRA_MAIN set 
CASSANDRA_MAIN=org.apache.cassandra.thrift.CassandraDaemon
-if NOT DEFINED JAVA_HOME goto err
+if NOT DEFINED JAVA_HOME goto :err
 
 REM * JAVA options *
 set JAVA_OPTS=-ea^

http://git-wip-us.apache.org/repos/asf/cassandra/blob/2a1ec27e/bin/json2sstable.bat
--
diff --git a/bin/json2sstable.bat b/bin/json2sstable.bat
index b42c34e..dc1e8f6 100644
--- a/bin/json2sstable.bat
+++ b/bin/json2sstable.bat
@@ -20,7 +20,7 @@ if %OS% == Windows_NT setlocal
 if NOT DEFINED CASSANDRA_HOME set CASSANDRA_HOME=%~dp0..
 if NOT DEFINED CASSANDRA_CONF set CASSANDRA_CONF=%CASSANDRA_HOME%\conf
 if NOT DEFINED CASSANDRA_MAIN set 
CASSANDRA_MAIN=org.apache.cassandra.tools.SSTableImport
-if NOT DEFINED JAVA_HOME goto err
+if NOT DEFINED JAVA_HOME goto :err
 
 REM * JAVA options *
 set JAVA_OPTS=^

http://git-wip-us.apache.org/repos/asf/cassandra/blob/2a1ec27e/bin/nodetool.bat
--
diff --git a/bin/nodetool.bat b/bin/nodetool.bat
index 200fb4a..2f74687 100644
--- a/bin/nodetool.bat
+++ b/bin/nodetool.bat
@@ -18,7 +18,7 @@
 if %OS% == Windows_NT setlocal
 
 if NOT DEFINED CASSANDRA_HOME set CASSANDRA_HOME=%~dp0..
-if NOT DEFINED JAVA_HOME goto err
+if NOT DEFINED JAVA_HOME goto :err
 
 REM Ensure that any user defined CLASSPATH variables are not used on startup
 set CLASSPATH=%CASSANDRA_HOME%\conf

http://git-wip-us.apache.org/repos/asf/cassandra/blob/2a1ec27e/bin/sstable2json.bat
--
diff --git a/bin/sstable2json.bat b/bin/sstable2json.bat
index 45dcd50..9544e0c 100644
--- a/bin/sstable2json.bat
+++ b/bin/sstable2json.bat
@@ -20,7 +20,7 @@ if %OS% == Windows_NT setlocal
 if NOT DEFINED CASSANDRA_HOME set CASSANDRA_HOME=%~dp0..
 if NOT DEFINED CASSANDRA_CONF set CASSANDRA_CONF=%CASSANDRA_HOME%\conf
 if NOT DEFINED CASSANDRA_MAIN set 
CASSANDRA_MAIN=org.apache.cassandra.tools.SSTableExport
-if NOT DEFINED JAVA_HOME goto err
+if NOT DEFINED JAVA_HOME goto :err
 
 REM * JAVA options *
 set JAVA_OPTS=^

http://git-wip-us.apache.org/repos/asf/cassandra/blob/2a1ec27e/bin/sstablekeys.bat
--
diff --git a/bin/sstablekeys.bat b/bin/sstablekeys.bat
index 88b33bc..6a483ba 100644
--- a/bin/sstablekeys.bat
+++ b/bin/sstablekeys.bat
@@ -20,7 +20,7 @@ if %OS% == Windows_NT setlocal
 if NOT DEFINED CASSANDRA_HOME set CASSANDRA_HOME=%~dp0..
 if NOT DEFINED CASSANDRA_CONF set CASSANDRA_CONF=%CASSANDRA_HOME%\conf
 if NOT DEFINED CASSANDRA_MAIN set 
CASSANDRA_MAIN=org.apache.cassandra.tools.SSTableExport
-if NOT DEFINED JAVA_HOME goto err
+if NOT DEFINED JAVA_HOME goto :err
 
 REM * JAVA options *
 set JAVA_OPTS=^



[5/5] git commit: fix classpath quoting patch by Nick Bailey and jbellis for CASSANDRA-3744

2012-01-27 Thread jbellis
fix classpath quoting
patch by Nick Bailey and jbellis for CASSANDRA-3744


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/90e3ec44
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/90e3ec44
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/90e3ec44

Branch: refs/heads/cassandra-1.0
Commit: 90e3ec44030b31f853dfd02d6cd3a4a74d990b94
Parents: 68d4e28
Author: Jonathan Ellis jbel...@apache.org
Authored: Fri Jan 27 14:55:18 2012 +
Committer: Jonathan Ellis jbel...@apache.org
Committed: Fri Jan 27 09:29:19 2012 -0600

--
 bin/json2sstable.bat |6 +++---
 bin/nodetool.bat |3 +--
 bin/sstable2json.bat |6 +++---
 bin/sstablekeys.bat  |6 +++---
 4 files changed, 10 insertions(+), 11 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/90e3ec44/bin/json2sstable.bat
--
diff --git a/bin/json2sstable.bat b/bin/json2sstable.bat
index ceb7987..b42c34e 100644
--- a/bin/json2sstable.bat
+++ b/bin/json2sstable.bat
@@ -32,11 +32,11 @@ REM Ensure that any user defined CLASSPATH variables are 
not used on startup
 set CLASSPATH=%CASSANDRA_HOME%\conf
 
 REM For each jar in the CASSANDRA_HOME lib directory call append to build the 
CLASSPATH variable.
-for %%i in (%CASSANDRA_HOME%\lib\*.jar) do call :append %%~fi
+for %%i in (%CASSANDRA_HOME%\lib\*.jar) do call :append %%i
 goto okClasspath
 
 :append
-set CLASSPATH=%CLASSPATH%;%1%2
+set CLASSPATH=%CLASSPATH%;%1
 goto :eof
 
 :okClasspath
@@ -55,7 +55,7 @@ set TOOLS_PARAMS=%TOOLS_PARAMS% %1
 goto :eof
 
 :runTool
-%JAVA_HOME%\bin\java %JAVA_OPTS% %CASSANDRA_PARAMS% -cp 
%CASSANDRA_CLASSPATH% %CASSANDRA_MAIN% %TOOLS_PARAMS%
+%JAVA_HOME%\bin\java %JAVA_OPTS% %CASSANDRA_PARAMS% -cp 
%CASSANDRA_CLASSPATH% %CASSANDRA_MAIN% %TOOLS_PARAMS%
 goto finally
 
 :err

http://git-wip-us.apache.org/repos/asf/cassandra/blob/90e3ec44/bin/nodetool.bat
--
diff --git a/bin/nodetool.bat b/bin/nodetool.bat
index a78c1c9..200fb4a 100644
--- a/bin/nodetool.bat
+++ b/bin/nodetool.bat
@@ -24,7 +24,6 @@ REM Ensure that any user defined CLASSPATH variables are not 
used on startup
 set CLASSPATH=%CASSANDRA_HOME%\conf
 
 REM For each jar in the CASSANDRA_HOME lib directory call append to build the 
CLASSPATH variable.
-rem for %%i in (%CASSANDRA_HOME%\lib*.jar) do call :append %%~fi
 for %%i in (%CASSANDRA_HOME%\lib\*.jar) do call :append %%i
 goto okClasspath
 
@@ -39,7 +38,7 @@ goto runNodeTool
 
 :runNodeTool
 echo Starting NodeTool
-%JAVA_HOME%\bin\java -cp %CASSANDRA_CLASSPATH% 
-Dlog4j.configuration=log4j-tools.properties org.apache.cassandra.tools.NodeCmd 
%*
+%JAVA_HOME%\bin\java -cp %CASSANDRA_CLASSPATH% 
-Dlog4j.configuration=log4j-tools.properties org.apache.cassandra.tools.NodeCmd 
%*
 goto finally
 
 :err

http://git-wip-us.apache.org/repos/asf/cassandra/blob/90e3ec44/bin/sstable2json.bat
--
diff --git a/bin/sstable2json.bat b/bin/sstable2json.bat
index cc4cbce..45dcd50 100644
--- a/bin/sstable2json.bat
+++ b/bin/sstable2json.bat
@@ -32,11 +32,11 @@ REM Ensure that any user defined CLASSPATH variables are 
not used on startup
 set CLASSPATH=%CASSANDRA_HOME%\conf
 
 REM For each jar in the CASSANDRA_HOME lib directory call append to build the 
CLASSPATH variable.
-for %%i in (%CASSANDRA_HOME%\lib\*.jar) do call :append %%~fi
+for %%i in (%CASSANDRA_HOME%\lib\*.jar) do call :append %%i
 goto okClasspath
 
 :append
-set CLASSPATH=%CLASSPATH%;%1%2
+set CLASSPATH=%CLASSPATH%;%1
 goto :eof
 
 :okClasspath
@@ -55,7 +55,7 @@ set TOOLS_PARAMS=%TOOLS_PARAMS% %1
 goto :eof
 
 :runTool
-%JAVA_HOME%\bin\java %JAVA_OPTS% %CASSANDRA_PARAMS% -cp 
%CASSANDRA_CLASSPATH% %CASSANDRA_MAIN% %TOOLS_PARAMS%
+%JAVA_HOME%\bin\java %JAVA_OPTS% %CASSANDRA_PARAMS% -cp 
%CASSANDRA_CLASSPATH% %CASSANDRA_MAIN% %TOOLS_PARAMS%
 goto finally
 
 :err

http://git-wip-us.apache.org/repos/asf/cassandra/blob/90e3ec44/bin/sstablekeys.bat
--
diff --git a/bin/sstablekeys.bat b/bin/sstablekeys.bat
index 7d6446a..88b33bc 100644
--- a/bin/sstablekeys.bat
+++ b/bin/sstablekeys.bat
@@ -32,11 +32,11 @@ REM Ensure that any user defined CLASSPATH variables are 
not used on startup
 set CLASSPATH=%CASSANDRA_HOME%\conf
 
 REM For each jar in the CASSANDRA_HOME lib directory call append to build the 
CLASSPATH variable.
-for %%i in (%CASSANDRA_HOME%\lib\*.jar) do call :append %%~fi
+for %%i in (%CASSANDRA_HOME%\lib\*.jar) do call :append %%i
 goto okClasspath
 
 :append
-set CLASSPATH=%CLASSPATH%;%1%2
+set CLASSPATH=%CLASSPATH%;%1
 goto :eof
 
 :okClasspath
@@ -49,7 +49,7 @@ set TOOLS_PARAMS=
 goto runTool
 
 

[4/5] git commit: fix classpath quoting patch by Nick Bailey and jbellis for CASSANDRA-3744

2012-01-27 Thread jbellis
fix classpath quoting
patch by Nick Bailey and jbellis for CASSANDRA-3744


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/90e3ec44
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/90e3ec44
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/90e3ec44

Branch: refs/heads/trunk
Commit: 90e3ec44030b31f853dfd02d6cd3a4a74d990b94
Parents: 68d4e28
Author: Jonathan Ellis jbel...@apache.org
Authored: Fri Jan 27 14:55:18 2012 +
Committer: Jonathan Ellis jbel...@apache.org
Committed: Fri Jan 27 09:29:19 2012 -0600

--
 bin/json2sstable.bat |6 +++---
 bin/nodetool.bat |3 +--
 bin/sstable2json.bat |6 +++---
 bin/sstablekeys.bat  |6 +++---
 4 files changed, 10 insertions(+), 11 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/90e3ec44/bin/json2sstable.bat
--
diff --git a/bin/json2sstable.bat b/bin/json2sstable.bat
index ceb7987..b42c34e 100644
--- a/bin/json2sstable.bat
+++ b/bin/json2sstable.bat
@@ -32,11 +32,11 @@ REM Ensure that any user defined CLASSPATH variables are 
not used on startup
 set CLASSPATH=%CASSANDRA_HOME%\conf
 
 REM For each jar in the CASSANDRA_HOME lib directory call append to build the 
CLASSPATH variable.
-for %%i in (%CASSANDRA_HOME%\lib\*.jar) do call :append %%~fi
+for %%i in (%CASSANDRA_HOME%\lib\*.jar) do call :append %%i
 goto okClasspath
 
 :append
-set CLASSPATH=%CLASSPATH%;%1%2
+set CLASSPATH=%CLASSPATH%;%1
 goto :eof
 
 :okClasspath
@@ -55,7 +55,7 @@ set TOOLS_PARAMS=%TOOLS_PARAMS% %1
 goto :eof
 
 :runTool
-%JAVA_HOME%\bin\java %JAVA_OPTS% %CASSANDRA_PARAMS% -cp 
%CASSANDRA_CLASSPATH% %CASSANDRA_MAIN% %TOOLS_PARAMS%
+%JAVA_HOME%\bin\java %JAVA_OPTS% %CASSANDRA_PARAMS% -cp 
%CASSANDRA_CLASSPATH% %CASSANDRA_MAIN% %TOOLS_PARAMS%
 goto finally
 
 :err

http://git-wip-us.apache.org/repos/asf/cassandra/blob/90e3ec44/bin/nodetool.bat
--
diff --git a/bin/nodetool.bat b/bin/nodetool.bat
index a78c1c9..200fb4a 100644
--- a/bin/nodetool.bat
+++ b/bin/nodetool.bat
@@ -24,7 +24,6 @@ REM Ensure that any user defined CLASSPATH variables are not 
used on startup
 set CLASSPATH=%CASSANDRA_HOME%\conf
 
 REM For each jar in the CASSANDRA_HOME lib directory call append to build the 
CLASSPATH variable.
-rem for %%i in (%CASSANDRA_HOME%\lib*.jar) do call :append %%~fi
 for %%i in (%CASSANDRA_HOME%\lib\*.jar) do call :append %%i
 goto okClasspath
 
@@ -39,7 +38,7 @@ goto runNodeTool
 
 :runNodeTool
 echo Starting NodeTool
-%JAVA_HOME%\bin\java -cp %CASSANDRA_CLASSPATH% 
-Dlog4j.configuration=log4j-tools.properties org.apache.cassandra.tools.NodeCmd 
%*
+%JAVA_HOME%\bin\java -cp %CASSANDRA_CLASSPATH% 
-Dlog4j.configuration=log4j-tools.properties org.apache.cassandra.tools.NodeCmd 
%*
 goto finally
 
 :err

http://git-wip-us.apache.org/repos/asf/cassandra/blob/90e3ec44/bin/sstable2json.bat
--
diff --git a/bin/sstable2json.bat b/bin/sstable2json.bat
index cc4cbce..45dcd50 100644
--- a/bin/sstable2json.bat
+++ b/bin/sstable2json.bat
@@ -32,11 +32,11 @@ REM Ensure that any user defined CLASSPATH variables are 
not used on startup
 set CLASSPATH=%CASSANDRA_HOME%\conf
 
 REM For each jar in the CASSANDRA_HOME lib directory call append to build the 
CLASSPATH variable.
-for %%i in (%CASSANDRA_HOME%\lib\*.jar) do call :append %%~fi
+for %%i in (%CASSANDRA_HOME%\lib\*.jar) do call :append %%i
 goto okClasspath
 
 :append
-set CLASSPATH=%CLASSPATH%;%1%2
+set CLASSPATH=%CLASSPATH%;%1
 goto :eof
 
 :okClasspath
@@ -55,7 +55,7 @@ set TOOLS_PARAMS=%TOOLS_PARAMS% %1
 goto :eof
 
 :runTool
-%JAVA_HOME%\bin\java %JAVA_OPTS% %CASSANDRA_PARAMS% -cp 
%CASSANDRA_CLASSPATH% %CASSANDRA_MAIN% %TOOLS_PARAMS%
+%JAVA_HOME%\bin\java %JAVA_OPTS% %CASSANDRA_PARAMS% -cp 
%CASSANDRA_CLASSPATH% %CASSANDRA_MAIN% %TOOLS_PARAMS%
 goto finally
 
 :err

http://git-wip-us.apache.org/repos/asf/cassandra/blob/90e3ec44/bin/sstablekeys.bat
--
diff --git a/bin/sstablekeys.bat b/bin/sstablekeys.bat
index 7d6446a..88b33bc 100644
--- a/bin/sstablekeys.bat
+++ b/bin/sstablekeys.bat
@@ -32,11 +32,11 @@ REM Ensure that any user defined CLASSPATH variables are 
not used on startup
 set CLASSPATH=%CASSANDRA_HOME%\conf
 
 REM For each jar in the CASSANDRA_HOME lib directory call append to build the 
CLASSPATH variable.
-for %%i in (%CASSANDRA_HOME%\lib\*.jar) do call :append %%~fi
+for %%i in (%CASSANDRA_HOME%\lib\*.jar) do call :append %%i
 goto okClasspath
 
 :append
-set CLASSPATH=%CLASSPATH%;%1%2
+set CLASSPATH=%CLASSPATH%;%1
 goto :eof
 
 :okClasspath
@@ -49,7 +49,7 @@ set TOOLS_PARAMS=
 goto runTool
 
 

[jira] [Updated] (CASSANDRA-3797) StorageProxy static initialization not triggered until thrift requests come in

2012-01-27 Thread Jonathan Ellis (Updated) (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-3797?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jonathan Ellis updated CASSANDRA-3797:
--

Attachment: 3797-forname.txt

Hmm.  Neither this nor the forName approach (attached) is sufficient to 
o.a.c.service.StorageProxy show up in jconsole for me.

 StorageProxy static initialization not triggered until thrift requests come in
 --

 Key: CASSANDRA-3797
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3797
 Project: Cassandra
  Issue Type: Bug
Reporter: Peter Schuller
Assignee: Peter Schuller
Priority: Minor
 Fix For: 1.1

 Attachments: 3797-forname.txt, CASSANDRA-3797-trunk-v1.txt


 While plugging in the metrics library for CASSANDRA-3671 I realized (because 
 the metrics library was trying to add a shutdown hook on metric creation) 
 that starting cassandra and simply shutting it down, causes StorageProxy to 
 not be initialized until the drain shutdown hook.
 Effects:
 * StorageProxy mbean missing in visualvm/jconsole after initial startup 
 (seriously, I thought I was going nuts ;))
 * And in general anything that makes assumptions about running early, or at 
 least not during JVM shutdown, such as the metrics library, will be 
 problematic

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (CASSANDRA-1956) Convert row cache to row+filter cache

2012-01-27 Thread Vijay (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-1956?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13194981#comment-13194981
 ] 

Vijay commented on CASSANDRA-1956:
--

So for this ticket:

1) Expose rowCache API's so we can extend easier.
2) Reduce the Query cache memory foot print.
3) reject rows  x (Configurable)
4) Writes should not invalidates the cache (Configurable but if not invalidate 
take some hit on the write performance).

Reasonable? Anything missing?

 Convert row cache to row+filter cache
 -

 Key: CASSANDRA-1956
 URL: https://issues.apache.org/jira/browse/CASSANDRA-1956
 Project: Cassandra
  Issue Type: Improvement
  Components: Core
Reporter: Stu Hood
Assignee: Vijay
Priority: Minor
 Fix For: 1.2

 Attachments: 0001-1956-cache-updates-v0.patch, 
 0001-re-factor-row-cache.patch, 0001-row-cache-filter.patch, 
 0002-1956-updates-to-thrift-and-avro-v0.patch, 0002-add-query-cache.patch


 Changing the row cache to a row+filter cache would make it much more useful. 
 We currently have to warn against using the row cache with wide rows, where 
 the read pattern is typically a peek at the head, but this usecase would be 
 perfect supported by a cache that stored only columns matching the filter.
 Possible implementations:
 * (copout) Cache a single filter per row, and leave the cache key as is
 * Cache a list of filters per row, leaving the cache key as is: this is 
 likely to have some gotchas for weird usage patterns, and it requires the 
 list overheard
 * Change the cache key to rowkey+filterid: basically ideal, but you need a 
 secondary index to lookup cache entries by rowkey so that you can keep them 
 in sync with the memtable
 * others?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (CASSANDRA-1956) Convert row cache to row+filter cache

2012-01-27 Thread Vijay (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-1956?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13194980#comment-13194980
 ] 

Vijay commented on CASSANDRA-1956:
--

So for this ticket:

1) Expose rowCache API's so we can extend easier.
2) Reduce the Query cache memory foot print.
3) reject rows  x (Configurable)
4) Writes should not invalidates the cache (Configurable but if not invalidate 
take some hit on the write performance).

Reasonable? Anything missing?

 Convert row cache to row+filter cache
 -

 Key: CASSANDRA-1956
 URL: https://issues.apache.org/jira/browse/CASSANDRA-1956
 Project: Cassandra
  Issue Type: Improvement
  Components: Core
Reporter: Stu Hood
Assignee: Vijay
Priority: Minor
 Fix For: 1.2

 Attachments: 0001-1956-cache-updates-v0.patch, 
 0001-re-factor-row-cache.patch, 0001-row-cache-filter.patch, 
 0002-1956-updates-to-thrift-and-avro-v0.patch, 0002-add-query-cache.patch


 Changing the row cache to a row+filter cache would make it much more useful. 
 We currently have to warn against using the row cache with wide rows, where 
 the read pattern is typically a peek at the head, but this usecase would be 
 perfect supported by a cache that stored only columns matching the filter.
 Possible implementations:
 * (copout) Cache a single filter per row, and leave the cache key as is
 * Cache a list of filters per row, leaving the cache key as is: this is 
 likely to have some gotchas for weird usage patterns, and it requires the 
 list overheard
 * Change the cache key to rowkey+filterid: basically ideal, but you need a 
 secondary index to lookup cache entries by rowkey so that you can keep them 
 in sync with the memtable
 * others?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Updated] (CASSANDRA-1956) Convert row cache to row+filter cache

2012-01-27 Thread Vijay (Updated) (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-1956?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Vijay updated CASSANDRA-1956:
-

Comment: was deleted

(was: So for this ticket:

1) Expose rowCache API's so we can extend easier.
2) Reduce the Query cache memory foot print.
3) reject rows  x (Configurable)
4) Writes should not invalidates the cache (Configurable but if not invalidate 
take some hit on the write performance).

Reasonable? Anything missing?)

 Convert row cache to row+filter cache
 -

 Key: CASSANDRA-1956
 URL: https://issues.apache.org/jira/browse/CASSANDRA-1956
 Project: Cassandra
  Issue Type: Improvement
  Components: Core
Reporter: Stu Hood
Assignee: Vijay
Priority: Minor
 Fix For: 1.2

 Attachments: 0001-1956-cache-updates-v0.patch, 
 0001-re-factor-row-cache.patch, 0001-row-cache-filter.patch, 
 0002-1956-updates-to-thrift-and-avro-v0.patch, 0002-add-query-cache.patch


 Changing the row cache to a row+filter cache would make it much more useful. 
 We currently have to warn against using the row cache with wide rows, where 
 the read pattern is typically a peek at the head, but this usecase would be 
 perfect supported by a cache that stored only columns matching the filter.
 Possible implementations:
 * (copout) Cache a single filter per row, and leave the cache key as is
 * Cache a list of filters per row, leaving the cache key as is: this is 
 likely to have some gotchas for weird usage patterns, and it requires the 
 list overheard
 * Change the cache key to rowkey+filterid: basically ideal, but you need a 
 secondary index to lookup cache entries by rowkey so that you can keep them 
 in sync with the memtable
 * others?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (CASSANDRA-3797) StorageProxy static initialization not triggered until thrift requests come in

2012-01-27 Thread Peter Schuller (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-3797?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13195011#comment-13195011
 ] 

Peter Schuller commented on CASSANDRA-3797:
---

Really? That's strange. I just re-tried again to double-check (ant clean and 
everything) and the patch seems to make a difference here.

In the case of Class.forName() I cannot believe that is not supposed to be 
guaranteed. Are you *sure* it's not working? I would have to assume static 
initialization must by definition happen for Class.forName() to fullfil its 
contract (even if I could possibly buy slightly more easily that the 
staticallyInitialize() NOOP didn't, but even that seems like a stretch).

I am just building and {{./bin/cassandra -f}} and immediately attaching with 
visualvm.

 StorageProxy static initialization not triggered until thrift requests come in
 --

 Key: CASSANDRA-3797
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3797
 Project: Cassandra
  Issue Type: Bug
Reporter: Peter Schuller
Assignee: Peter Schuller
Priority: Minor
 Fix For: 1.1

 Attachments: 3797-forname.txt, CASSANDRA-3797-trunk-v1.txt


 While plugging in the metrics library for CASSANDRA-3671 I realized (because 
 the metrics library was trying to add a shutdown hook on metric creation) 
 that starting cassandra and simply shutting it down, causes StorageProxy to 
 not be initialized until the drain shutdown hook.
 Effects:
 * StorageProxy mbean missing in visualvm/jconsole after initial startup 
 (seriously, I thought I was going nuts ;))
 * And in general anything that makes assumptions about running early, or at 
 least not during JVM shutdown, such as the metrics library, will be 
 problematic

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (CASSANDRA-3417) InvocationTargetException ConcurrentModificationException at startup

2012-01-27 Thread Peter Schuller (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-3417?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13195035#comment-13195035
 ] 

Peter Schuller commented on CASSANDRA-3417:
---

How is this a correct fix?

http://google-collections.googlecode.com/svn/trunk/javadoc/com/google/common/collect/Maps.html#synchronizedBiMap(com.google.common.collect.BiMap

In order for concurrent iteration to be safe it's not enough to make individual 
atomic operations thread-safe. I didn't dig deep but the docs claims HashBiMap 
is just backed by two hash maps, and also specifically there is mention of 
needing to synchronize iterations. Which makes sense; imagine trying to 
implement locking across an iteration and the issues that involves.

Did anyone see the problem actually go away with this patch under circumstances 
where it was previously reliably re-producible?


 InvocationTargetException ConcurrentModificationException at startup
 

 Key: CASSANDRA-3417
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3417
 Project: Cassandra
  Issue Type: Bug
Affects Versions: 1.0.0
Reporter: Joaquin Casares
Assignee: Jonathan Ellis
 Fix For: 1.0.2

 Attachments: 3417.txt


 I was starting up the new DataStax AMI where the seed starts first and 34 
 nodes would latch on together. So far things have been working decently for 
 launching, but right now I just got this during startup.
 {CODE}
 ubuntu@ip-10-40-190-143:~$ sudo cat /var/log/cassandra/output.log 
  INFO 09:24:38,453 JVM vendor/version: Java HotSpot(TM) 64-Bit Server 
 VM/1.6.0_26
  INFO 09:24:38,456 Heap size: 1936719872/1937768448
  INFO 09:24:38,457 Classpath: 
 /usr/share/cassandra/lib/antlr-3.2.jar:/usr/share/cassandra/lib/avro-1.4.0-fixes.jar:/usr/share/cassandra/lib/avro-1.4.0-sources-fixes.jar:/usr/share/cassandra/lib/commons-cli-1.1.jar:/usr/share/cassandra/lib/commons-codec-1.2.jar:/usr/share/cassandra/lib/commons-lang-2.4.jar:/usr/share/cassandra/lib/compress-lzf-0.8.4.jar:/usr/share/cassandra/lib/concurrentlinkedhashmap-lru-1.2.jar:/usr/share/cassandra/lib/guava-r08.jar:/usr/share/cassandra/lib/high-scale-lib-1.1.2.jar:/usr/share/cassandra/lib/jackson-core-asl-1.4.0.jar:/usr/share/cassandra/lib/jackson-mapper-asl-1.4.0.jar:/usr/share/cassandra/lib/jamm-0.2.5.jar:/usr/share/cassandra/lib/jline-0.9.94.jar:/usr/share/cassandra/lib/joda-time-1.6.2.jar:/usr/share/cassandra/lib/json-simple-1.1.jar:/usr/share/cassandra/lib/libthrift-0.6.jar:/usr/share/cassandra/lib/log4j-1.2.16.jar:/usr/share/cassandra/lib/servlet-api-2.5-20081211.jar:/usr/share/cassandra/lib/slf4j-api-1.6.1.jar:/usr/share/cassandra/lib/slf4j-log4j12-1.6.1.jar:/usr/share/cassandra/lib/snakeyaml-1.6.jar:/usr/share/cassandra/lib/snappy-java-1.0.3.jar:/usr/share/cassandra/apache-cassandra-1.0.0.jar:/usr/share/cassandra/apache-cassandra-thrift-1.0.0.jar:/usr/share/cassandra/apache-cassandra.jar:/usr/share/java/jna.jar:/etc/cassandra:/usr/share/java/commons-daemon.jar:/usr/share/cassandra/lib/jamm-0.2.5.jar
  INFO 09:24:39,891 JNA mlockall successful
  INFO 09:24:39,901 Loading settings from file:/etc/cassandra/cassandra.yaml
  INFO 09:24:40,057 DiskAccessMode 'auto' determined to be mmap, 
 indexAccessMode is mmap
  INFO 09:24:40,069 Global memtable threshold is enabled at 616MB
  INFO 09:24:40,159 EC2Snitch using region: us-east, zone: 1d.
  INFO 09:24:40,475 Creating new commitlog segment 
 /raid0/cassandra/commitlog/CommitLog-1319793880475.log
  INFO 09:24:40,486 Couldn't detect any schema definitions in local storage.
  INFO 09:24:40,486 Found table data in data directories. Consider using the 
 CLI to define your schema.
  INFO 09:24:40,497 No commitlog files found; skipping replay
  INFO 09:24:40,501 Cassandra version: 1.0.0
  INFO 09:24:40,502 Thrift API version: 19.18.0
  INFO 09:24:40,502 Loading persisted ring state
  INFO 09:24:40,506 Starting up server gossip
  INFO 09:24:40,529 Enqueuing flush of 
 Memtable-LocationInfo@1388314661(190/237 serialized/live bytes, 4 ops)
  INFO 09:24:40,530 Writing Memtable-LocationInfo@1388314661(190/237 
 serialized/live bytes, 4 ops)
  INFO 09:24:40,600 Completed flushing 
 /raid0/cassandra/data/system/LocationInfo-h-1-Data.db (298 bytes)
  INFO 09:24:40,613 Ec2Snitch adding ApplicationState ec2region=us-east 
 ec2zone=1d
  INFO 09:24:40,621 Starting Messaging Service on /10.40.190.143:7000
  INFO 09:24:40,628 Joining: waiting for ring and schema information
  INFO 09:24:43,389 InetAddress /10.194.29.156 is now dead.
  INFO 09:24:43,391 InetAddress /10.85.11.38 is now dead.
  INFO 09:24:43,392 InetAddress /10.34.42.28 is now dead.
  INFO 09:24:43,393 InetAddress /10.77.63.49 is now dead.
  INFO 09:24:43,394 InetAddress /10.194.22.191 is now dead.
  INFO 09:24:43,395 InetAddress 

[1/2] git commit: eliminate dependency on FBUtilities

2012-01-27 Thread eevans
Updated Branches:
  refs/heads/cassandra-1.0 2a1ec27e2 - 89ed0b6ec


eliminate dependency on FBUtilities

Patch by eevans; reviewed by Dave Brosius for CASSANDRA-3665


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/89ed0b6e
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/89ed0b6e
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/89ed0b6e

Branch: refs/heads/cassandra-1.0
Commit: 89ed0b6ecdde8a7fd64f2139c02223ae4c040e8c
Parents: 32075c4
Author: Eric Evans eev...@apache.org
Authored: Thu Jan 26 16:04:11 2012 -0600
Committer: Eric Evans eev...@apache.org
Committed: Fri Jan 27 13:53:07 2012 -0600

--
 src/java/org/apache/cassandra/utils/UUIDGen.java |   39 -
 1 files changed, 37 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/89ed0b6e/src/java/org/apache/cassandra/utils/UUIDGen.java
--
diff --git a/src/java/org/apache/cassandra/utils/UUIDGen.java 
b/src/java/org/apache/cassandra/utils/UUIDGen.java
index f1969fe..75828f0 100644
--- a/src/java/org/apache/cassandra/utils/UUIDGen.java
+++ b/src/java/org/apache/cassandra/utils/UUIDGen.java
@@ -23,6 +23,8 @@ package org.apache.cassandra.utils;
 import java.io.*;
 import java.net.InetAddress;
 import java.nio.ByteBuffer;
+import java.security.MessageDigest;
+import java.security.NoSuchAlgorithmException;
 import java.util.HashMap;
 import java.util.Map;
 import java.util.Random;
@@ -42,7 +44,31 @@ public class UUIDGen
 
 private long lastNanos;
 private final MapInetAddress, Long nodeCache = new HashMapInetAddress, 
Long();
-
+
+private static final ThreadLocalMessageDigest localMD5Digest = new 
ThreadLocalMessageDigest()
+{
+@Override
+protected MessageDigest initialValue()
+{
+try
+{
+return MessageDigest.getInstance(MD5);
+}
+catch (NoSuchAlgorithmException nsae)
+{
+throw new RuntimeException(MD5 digest algorithm is not 
available, nsae);
+}
+}
+
+@Override
+public MessageDigest get()
+{
+MessageDigest digest = super.get();
+digest.reset();
+return digest;
+}
+};
+
 private UUIDGen()
 {
 // make sure someone didn't whack the clock by changing the order of 
instantiation.
@@ -195,7 +221,7 @@ public class UUIDGen
 return nodeCache.get(addr);
 
 // ideally, we'd use the MAC address, but java doesn't expose that.
-byte[] hash = 
FBUtilities.hash(ByteBuffer.wrap(addr.toString().getBytes()));
+byte[] hash = hash(addr.toString());
 long node = 0;
 for (int i = 0; i  Math.min(6, hash.length); i++)
 node |= (0x00ff  (long)hash[i])  (5-i)*8;
@@ -205,6 +231,15 @@ public class UUIDGen
 
 return node;
 }
+
+private static byte[] hash(String... data)
+{
+MessageDigest messageDigest = localMD5Digest.get();
+for(String block : data)
+messageDigest.update(block.getBytes());
+
+return messageDigest.digest();
+}
 }
 
 // for the curious, here is how I generated START_EPOCH



[2/2] git commit: test to expose missing dependencies

2012-01-27 Thread eevans
test to expose missing dependencies

Patch by eevans; reviewed by Dave Brosius for CASSANDRA-3665


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/32075c4a
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/32075c4a
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/32075c4a

Branch: refs/heads/cassandra-1.0
Commit: 32075c4aecf06bf28cc415ea5ae3fa3cbc805983
Parents: 2a1ec27
Author: Eric Evans eev...@apache.org
Authored: Thu Jan 26 16:02:34 2012 -0600
Committer: Eric Evans eev...@apache.org
Committed: Fri Jan 27 13:52:33 2012 -0600

--
 build.xml  |   25 
 .../apache/cassandra/cql/jdbc/ClientUtilsTest.java |   48 +++
 2 files changed, 73 insertions(+), 0 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/32075c4a/build.xml
--
diff --git a/build.xml b/build.xml
index 7169ff0..07a8af6 100644
--- a/build.xml
+++ b/build.xml
@@ -1038,6 +1038,31 @@ url=${svn.entry.url}?pathrev=${svn.entry.commit.revision}
 /sequential
   /macrodef
 
+  !--
+This test target is a bit different.  It's purpose is to exercise the
+clientutil jar in order to expose any new dependencies.  For that
+reason we use the classes from the jar, and a carefully constructed
+classpath which only contains what we expect users to need.
+  --
+  target name=test-clientutil-jar depends=build-test,jar 
description=Test clientutil jar
+junit
+  test name=org.apache.cassandra.cql.jdbc.ClientUtilsTest /
+  formatter type=brief usefile=false /
+  classpath
+pathelement location=${test.classes} /
+pathelement 
location=${build.dir}/${ant.project.name}-clientutil-${version}.jar /
+
+fileset dir=${build.dir.lib}
+  include name=**/junit*.jar /
+/fileset
+fileset dir=${build.lib}
+  include name=**/guava*.jar /
+  include name=**/commons-lang*.jar /
+/fileset
+  /classpath
+/junit
+  /target
+
   target name=test depends=build-test description=Execute unit tests
 testmacro suitename=unit inputdir=${test.unit.src} timeout=6
   jvmarg value=-Dlegacy-sstable-root=${test.data}/legacy-sstables/

http://git-wip-us.apache.org/repos/asf/cassandra/blob/32075c4a/test/unit/org/apache/cassandra/cql/jdbc/ClientUtilsTest.java
--
diff --git a/test/unit/org/apache/cassandra/cql/jdbc/ClientUtilsTest.java 
b/test/unit/org/apache/cassandra/cql/jdbc/ClientUtilsTest.java
new file mode 100644
index 000..c98b1d9
--- /dev/null
+++ b/test/unit/org/apache/cassandra/cql/jdbc/ClientUtilsTest.java
@@ -0,0 +1,48 @@
+package org.apache.cassandra.cql.jdbc;
+
+import java.math.BigDecimal;
+import java.math.BigInteger;
+import java.net.InetAddress;
+import java.net.UnknownHostException;
+import java.nio.ByteBuffer;
+import java.sql.Date;
+import java.util.UUID;
+
+import org.apache.cassandra.utils.UUIDGen;
+import org.junit.Test;
+
+public class ClientUtilsTest
+{
+/** Exercises the classes in the clientutil jar to expose missing 
dependencies. */
+@Test
+public void test() throws UnknownHostException
+{
+JdbcAscii.instance.compose(JdbcAscii.instance.decompose(string));
+JdbcBoolean.instance.compose(JdbcBoolean.instance.decompose(true));
+
JdbcBytes.instance.compose(JdbcBytes.instance.decompose(ByteBuffer.wrap(string.getBytes(;
+JdbcDate.instance.compose(JdbcDate.instance.decompose(new 
Date(System.currentTimeMillis(;
+JdbcDecimal.instance.compose(JdbcDecimal.instance.decompose(new 
BigDecimal(1)));
+JdbcDouble.instance.compose(JdbcDouble.instance.decompose(new 
Double(1.0d)));
+JdbcFloat.instance.compose(JdbcFloat.instance.decompose(new 
Float(1.0f)));
+JdbcInt32.instance.compose(JdbcInt32.instance.decompose(1));
+JdbcInteger.instance.compose(JdbcInteger.instance.decompose(new 
BigInteger(1)));
+JdbcLong.instance.compose(JdbcLong.instance.decompose(1L));
+JdbcUTF8.instance.compose(JdbcUTF8.instance.decompose(string));
+
+// UUIDGen
+UUID uuid = UUIDGen.makeType1UUIDFromHost(InetAddress.getLocalHost());
+JdbcTimeUUID.instance.compose(JdbcTimeUUID.instance.decompose(uuid));
+JdbcUUID.instance.compose(JdbcUUID.instance.decompose(uuid));
+
JdbcLexicalUUID.instance.compose(JdbcLexicalUUID.instance.decompose(uuid));
+
+// Raise a MarshalException
+try
+{
+
JdbcLexicalUUID.instance.getString(ByteBuffer.wrap(notauuid.getBytes()));
+}
+catch (MarshalException me)
+{
+// Success
+}
+}
+}



[jira] [Commented] (CASSANDRA-2930) corrupt commitlog

2012-01-27 Thread Rick Branson (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-2930?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13195049#comment-13195049
 ] 

Rick Branson commented on CASSANDRA-2930:
-

After analyzing the corrupt commit log posted, the issue is that the 
serialization code actually wrote out an incorrect supercolumn. The commit log 
code faithfully checksum'd and wrote the data out as if it was valid. It 
appears that the subcolumn count exceeded the actual subcolumn data written out 
when serialized by 1, so the deserialization code is expecting another 
subcolumn and runs out of buffer, bailing with EOFException.

I was unable to repro with Cathy's script after running it about a half dozen 
times.

 corrupt commitlog
 -

 Key: CASSANDRA-2930
 URL: https://issues.apache.org/jira/browse/CASSANDRA-2930
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Affects Versions: 0.8.1
 Environment: Linux, amd64.
 Java(TM) SE Runtime Environment (build 1.6.0_26-b03)
Reporter: ivan
Assignee: Rick Branson
 Attachments: CommitLog-1310637513214.log


 We get Exception encountered during startup error while Cassandra starts.
 Error messages:
  INFO 13:56:28,736 Finished reading 
 /var/lib/cassandra/commitlog/CommitLog-1310637513214.log
 ERROR 13:56:28,736 Exception encountered during startup.
 java.io.IOError: java.io.EOFException
 at 
 org.apache.cassandra.io.util.ColumnIterator.deserializeNext(ColumnSortedMap.java:265)
 at 
 org.apache.cassandra.io.util.ColumnIterator.next(ColumnSortedMap.java:281)
 at 
 org.apache.cassandra.io.util.ColumnIterator.next(ColumnSortedMap.java:236)
 at 
 java.util.concurrent.ConcurrentSkipListMap.buildFromSorted(ConcurrentSkipListMap.java:1493)
 at 
 java.util.concurrent.ConcurrentSkipListMap.init(ConcurrentSkipListMap.java:1443)
 at 
 org.apache.cassandra.db.SuperColumnSerializer.deserialize(SuperColumn.java:419)
 at 
 org.apache.cassandra.db.ColumnFamilySerializer.deserializeColumns(ColumnFamilySerializer.java:139)
 at 
 org.apache.cassandra.db.ColumnFamilySerializer.deserialize(ColumnFamilySerializer.java:127)
 at 
 org.apache.cassandra.db.RowMutation$RowMutationSerializer.deserialize(RowMutation.java:382)
 at 
 org.apache.cassandra.db.commitlog.CommitLog.recover(CommitLog.java:278)
 at 
 org.apache.cassandra.db.commitlog.CommitLog.recover(CommitLog.java:158)
 at 
 org.apache.cassandra.service.AbstractCassandraDaemon.setup(AbstractCassandraDaemon.java:175)
 at 
 org.apache.cassandra.service.AbstractCassandraDaemon.activate(AbstractCassandraDaemon.java:368)
 at 
 org.apache.cassandra.thrift.CassandraDaemon.main(CassandraDaemon.java:80)
 Caused by: java.io.EOFException
 at java.io.DataInputStream.readFully(DataInputStream.java:180)
 at java.io.DataInputStream.readFully(DataInputStream.java:152)
 at 
 org.apache.cassandra.utils.ByteBufferUtil.read(ByteBufferUtil.java:394)
 at 
 org.apache.cassandra.utils.ByteBufferUtil.readWithShortLength(ByteBufferUtil.java:368)
 at 
 org.apache.cassandra.db.ColumnSerializer.deserialize(ColumnSerializer.java:87)
 at 
 org.apache.cassandra.io.util.ColumnIterator.deserializeNext(ColumnSortedMap.java:261)
 ... 13 more
 Exception encountered during startup.
 java.io.IOError: java.io.EOFException
 at 
 org.apache.cassandra.io.util.ColumnIterator.deserializeNext(ColumnSortedMap.java:265)
 at 
 org.apache.cassandra.io.util.ColumnIterator.next(ColumnSortedMap.java:281)
 at 
 org.apache.cassandra.io.util.ColumnIterator.next(ColumnSortedMap.java:236)
 at 
 java.util.concurrent.ConcurrentSkipListMap.buildFromSorted(ConcurrentSkipListMap.java:1493)
 at 
 java.util.concurrent.ConcurrentSkipListMap.init(ConcurrentSkipListMap.java:1443)
 at 
 org.apache.cassandra.db.SuperColumnSerializer.deserialize(SuperColumn.java:419)
 at 
 org.apache.cassandra.db.ColumnFamilySerializer.deserializeColumns(ColumnFamilySerializer.java:139)
 at 
 org.apache.cassandra.db.ColumnFamilySerializer.deserialize(ColumnFamilySerializer.java:127)
 at 
 org.apache.cassandra.db.RowMutation$RowMutationSerializer.deserialize(RowMutation.java:382)
 at 
 org.apache.cassandra.db.commitlog.CommitLog.recover(CommitLog.java:278)
 at 
 org.apache.cassandra.db.commitlog.CommitLog.recover(CommitLog.java:158)
 at 
 org.apache.cassandra.service.AbstractCassandraDaemon.setup(AbstractCassandraDaemon.java:175)
 at 
 org.apache.cassandra.service.AbstractCassandraDaemon.activate(AbstractCassandraDaemon.java:368)
 at 
 org.apache.cassandra.thrift.CassandraDaemon.main(CassandraDaemon.java:80)
 Caused by: java.io.EOFException
  

[jira] [Reopened] (CASSANDRA-3417) InvocationTargetException ConcurrentModificationException at startup

2012-01-27 Thread Jonathan Ellis (Reopened) (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-3417?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jonathan Ellis reopened CASSANDRA-3417:
---


You're right, it looks like you need to manually synchronize for iteration.

 InvocationTargetException ConcurrentModificationException at startup
 

 Key: CASSANDRA-3417
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3417
 Project: Cassandra
  Issue Type: Bug
Affects Versions: 1.0.0
Reporter: Joaquin Casares
Assignee: Jonathan Ellis
 Fix For: 1.0.2

 Attachments: 3417.txt


 I was starting up the new DataStax AMI where the seed starts first and 34 
 nodes would latch on together. So far things have been working decently for 
 launching, but right now I just got this during startup.
 {CODE}
 ubuntu@ip-10-40-190-143:~$ sudo cat /var/log/cassandra/output.log 
  INFO 09:24:38,453 JVM vendor/version: Java HotSpot(TM) 64-Bit Server 
 VM/1.6.0_26
  INFO 09:24:38,456 Heap size: 1936719872/1937768448
  INFO 09:24:38,457 Classpath: 
 /usr/share/cassandra/lib/antlr-3.2.jar:/usr/share/cassandra/lib/avro-1.4.0-fixes.jar:/usr/share/cassandra/lib/avro-1.4.0-sources-fixes.jar:/usr/share/cassandra/lib/commons-cli-1.1.jar:/usr/share/cassandra/lib/commons-codec-1.2.jar:/usr/share/cassandra/lib/commons-lang-2.4.jar:/usr/share/cassandra/lib/compress-lzf-0.8.4.jar:/usr/share/cassandra/lib/concurrentlinkedhashmap-lru-1.2.jar:/usr/share/cassandra/lib/guava-r08.jar:/usr/share/cassandra/lib/high-scale-lib-1.1.2.jar:/usr/share/cassandra/lib/jackson-core-asl-1.4.0.jar:/usr/share/cassandra/lib/jackson-mapper-asl-1.4.0.jar:/usr/share/cassandra/lib/jamm-0.2.5.jar:/usr/share/cassandra/lib/jline-0.9.94.jar:/usr/share/cassandra/lib/joda-time-1.6.2.jar:/usr/share/cassandra/lib/json-simple-1.1.jar:/usr/share/cassandra/lib/libthrift-0.6.jar:/usr/share/cassandra/lib/log4j-1.2.16.jar:/usr/share/cassandra/lib/servlet-api-2.5-20081211.jar:/usr/share/cassandra/lib/slf4j-api-1.6.1.jar:/usr/share/cassandra/lib/slf4j-log4j12-1.6.1.jar:/usr/share/cassandra/lib/snakeyaml-1.6.jar:/usr/share/cassandra/lib/snappy-java-1.0.3.jar:/usr/share/cassandra/apache-cassandra-1.0.0.jar:/usr/share/cassandra/apache-cassandra-thrift-1.0.0.jar:/usr/share/cassandra/apache-cassandra.jar:/usr/share/java/jna.jar:/etc/cassandra:/usr/share/java/commons-daemon.jar:/usr/share/cassandra/lib/jamm-0.2.5.jar
  INFO 09:24:39,891 JNA mlockall successful
  INFO 09:24:39,901 Loading settings from file:/etc/cassandra/cassandra.yaml
  INFO 09:24:40,057 DiskAccessMode 'auto' determined to be mmap, 
 indexAccessMode is mmap
  INFO 09:24:40,069 Global memtable threshold is enabled at 616MB
  INFO 09:24:40,159 EC2Snitch using region: us-east, zone: 1d.
  INFO 09:24:40,475 Creating new commitlog segment 
 /raid0/cassandra/commitlog/CommitLog-1319793880475.log
  INFO 09:24:40,486 Couldn't detect any schema definitions in local storage.
  INFO 09:24:40,486 Found table data in data directories. Consider using the 
 CLI to define your schema.
  INFO 09:24:40,497 No commitlog files found; skipping replay
  INFO 09:24:40,501 Cassandra version: 1.0.0
  INFO 09:24:40,502 Thrift API version: 19.18.0
  INFO 09:24:40,502 Loading persisted ring state
  INFO 09:24:40,506 Starting up server gossip
  INFO 09:24:40,529 Enqueuing flush of 
 Memtable-LocationInfo@1388314661(190/237 serialized/live bytes, 4 ops)
  INFO 09:24:40,530 Writing Memtable-LocationInfo@1388314661(190/237 
 serialized/live bytes, 4 ops)
  INFO 09:24:40,600 Completed flushing 
 /raid0/cassandra/data/system/LocationInfo-h-1-Data.db (298 bytes)
  INFO 09:24:40,613 Ec2Snitch adding ApplicationState ec2region=us-east 
 ec2zone=1d
  INFO 09:24:40,621 Starting Messaging Service on /10.40.190.143:7000
  INFO 09:24:40,628 Joining: waiting for ring and schema information
  INFO 09:24:43,389 InetAddress /10.194.29.156 is now dead.
  INFO 09:24:43,391 InetAddress /10.85.11.38 is now dead.
  INFO 09:24:43,392 InetAddress /10.34.42.28 is now dead.
  INFO 09:24:43,393 InetAddress /10.77.63.49 is now dead.
  INFO 09:24:43,394 InetAddress /10.194.22.191 is now dead.
  INFO 09:24:43,395 InetAddress /10.34.74.58 is now dead.
  INFO 09:24:43,395 Node /10.34.33.16 is now part of the cluster
  INFO 09:24:43,396 InetAddress /10.34.33.16 is now UP
  INFO 09:24:43,397 Enqueuing flush of Memtable-LocationInfo@1629818866(20/25 
 serialized/live bytes, 1 ops)
  INFO 09:24:43,398 Writing Memtable-LocationInfo@1629818866(20/25 
 serialized/live bytes, 1 ops)
  INFO 09:24:43,417 Completed flushing 
 /raid0/cassandra/data/system/LocationInfo-h-2-Data.db (74 bytes)
  INFO 09:24:43,418 InetAddress /10.202.67.43 is now dead.
  INFO 09:24:43,419 InetAddress /10.116.215.81 is now dead.
  INFO 09:24:43,420 InetAddress /10.99.39.242 is now dead.
  INFO 09:24:43,421 

[jira] [Commented] (CASSANDRA-2930) corrupt commitlog

2012-01-27 Thread Jonathan Ellis (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-2930?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13195069#comment-13195069
 ] 

Jonathan Ellis commented on CASSANDRA-2930:
---

bq. the issue is that the serialization code actually wrote out an incorrect 
supercolumn

We've had supercolumn races in the past (CASSANDRA-2675) and it's possible we 
have more.  It's fairly hairy.  IMO the right fix is to simplify them 
internally to composites (CASSANDRA-3237).

 corrupt commitlog
 -

 Key: CASSANDRA-2930
 URL: https://issues.apache.org/jira/browse/CASSANDRA-2930
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Affects Versions: 0.8.1
 Environment: Linux, amd64.
 Java(TM) SE Runtime Environment (build 1.6.0_26-b03)
Reporter: ivan
Assignee: Rick Branson
 Attachments: CommitLog-1310637513214.log


 We get Exception encountered during startup error while Cassandra starts.
 Error messages:
  INFO 13:56:28,736 Finished reading 
 /var/lib/cassandra/commitlog/CommitLog-1310637513214.log
 ERROR 13:56:28,736 Exception encountered during startup.
 java.io.IOError: java.io.EOFException
 at 
 org.apache.cassandra.io.util.ColumnIterator.deserializeNext(ColumnSortedMap.java:265)
 at 
 org.apache.cassandra.io.util.ColumnIterator.next(ColumnSortedMap.java:281)
 at 
 org.apache.cassandra.io.util.ColumnIterator.next(ColumnSortedMap.java:236)
 at 
 java.util.concurrent.ConcurrentSkipListMap.buildFromSorted(ConcurrentSkipListMap.java:1493)
 at 
 java.util.concurrent.ConcurrentSkipListMap.init(ConcurrentSkipListMap.java:1443)
 at 
 org.apache.cassandra.db.SuperColumnSerializer.deserialize(SuperColumn.java:419)
 at 
 org.apache.cassandra.db.ColumnFamilySerializer.deserializeColumns(ColumnFamilySerializer.java:139)
 at 
 org.apache.cassandra.db.ColumnFamilySerializer.deserialize(ColumnFamilySerializer.java:127)
 at 
 org.apache.cassandra.db.RowMutation$RowMutationSerializer.deserialize(RowMutation.java:382)
 at 
 org.apache.cassandra.db.commitlog.CommitLog.recover(CommitLog.java:278)
 at 
 org.apache.cassandra.db.commitlog.CommitLog.recover(CommitLog.java:158)
 at 
 org.apache.cassandra.service.AbstractCassandraDaemon.setup(AbstractCassandraDaemon.java:175)
 at 
 org.apache.cassandra.service.AbstractCassandraDaemon.activate(AbstractCassandraDaemon.java:368)
 at 
 org.apache.cassandra.thrift.CassandraDaemon.main(CassandraDaemon.java:80)
 Caused by: java.io.EOFException
 at java.io.DataInputStream.readFully(DataInputStream.java:180)
 at java.io.DataInputStream.readFully(DataInputStream.java:152)
 at 
 org.apache.cassandra.utils.ByteBufferUtil.read(ByteBufferUtil.java:394)
 at 
 org.apache.cassandra.utils.ByteBufferUtil.readWithShortLength(ByteBufferUtil.java:368)
 at 
 org.apache.cassandra.db.ColumnSerializer.deserialize(ColumnSerializer.java:87)
 at 
 org.apache.cassandra.io.util.ColumnIterator.deserializeNext(ColumnSortedMap.java:261)
 ... 13 more
 Exception encountered during startup.
 java.io.IOError: java.io.EOFException
 at 
 org.apache.cassandra.io.util.ColumnIterator.deserializeNext(ColumnSortedMap.java:265)
 at 
 org.apache.cassandra.io.util.ColumnIterator.next(ColumnSortedMap.java:281)
 at 
 org.apache.cassandra.io.util.ColumnIterator.next(ColumnSortedMap.java:236)
 at 
 java.util.concurrent.ConcurrentSkipListMap.buildFromSorted(ConcurrentSkipListMap.java:1493)
 at 
 java.util.concurrent.ConcurrentSkipListMap.init(ConcurrentSkipListMap.java:1443)
 at 
 org.apache.cassandra.db.SuperColumnSerializer.deserialize(SuperColumn.java:419)
 at 
 org.apache.cassandra.db.ColumnFamilySerializer.deserializeColumns(ColumnFamilySerializer.java:139)
 at 
 org.apache.cassandra.db.ColumnFamilySerializer.deserialize(ColumnFamilySerializer.java:127)
 at 
 org.apache.cassandra.db.RowMutation$RowMutationSerializer.deserialize(RowMutation.java:382)
 at 
 org.apache.cassandra.db.commitlog.CommitLog.recover(CommitLog.java:278)
 at 
 org.apache.cassandra.db.commitlog.CommitLog.recover(CommitLog.java:158)
 at 
 org.apache.cassandra.service.AbstractCassandraDaemon.setup(AbstractCassandraDaemon.java:175)
 at 
 org.apache.cassandra.service.AbstractCassandraDaemon.activate(AbstractCassandraDaemon.java:368)
 at 
 org.apache.cassandra.thrift.CassandraDaemon.main(CassandraDaemon.java:80)
 Caused by: java.io.EOFException
 at java.io.DataInputStream.readFully(DataInputStream.java:180)
 at java.io.DataInputStream.readFully(DataInputStream.java:152)
 at 
 org.apache.cassandra.utils.ByteBufferUtil.read(ByteBufferUtil.java:394)
 

[jira] [Reopened] (CASSANDRA-3374) CQL can't create column with compression or that use leveled compaction

2012-01-27 Thread paul cannon (Reopened) (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-3374?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

paul cannon reopened CASSANDRA-3374:



Was this meant to expose 'compaction_strategy_class' to CQL, as well as 
compaction_strategy_options? It's added here as a valid option, but it doesn't 
actually do anything, and it appears there is no other possible way to set 
CFMetaData.compactionStrategyClass from CQL.

 CQL can't create column with compression or that use leveled compaction
 ---

 Key: CASSANDRA-3374
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3374
 Project: Cassandra
  Issue Type: Bug
  Components: API
Affects Versions: 1.0.0
Reporter: Sylvain Lebresne
Assignee: Pavel Yaskevich
Priority: Minor
  Labels: cql
 Fix For: 1.0.7

 Attachments: CASSANDRA-3374.patch


 Looking at CreateColumnFamilyStatement.java, it doesn't seem CQL can create 
 compressed column families, nor define a compaction strategy.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Updated] (CASSANDRA-3417) InvocationTargetException ConcurrentModificationException at startup

2012-01-27 Thread Jonathan Ellis (Updated) (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-3417?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jonathan Ellis updated CASSANDRA-3417:
--

Attachment: 3417-2.txt

patch to add synchronization blocks around bootstraptokens iteration

 InvocationTargetException ConcurrentModificationException at startup
 

 Key: CASSANDRA-3417
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3417
 Project: Cassandra
  Issue Type: Bug
Affects Versions: 1.0.0
Reporter: Joaquin Casares
Assignee: Jonathan Ellis
Priority: Minor
 Fix For: 1.0.8

 Attachments: 3417-2.txt, 3417.txt


 I was starting up the new DataStax AMI where the seed starts first and 34 
 nodes would latch on together. So far things have been working decently for 
 launching, but right now I just got this during startup.
 {CODE}
 ubuntu@ip-10-40-190-143:~$ sudo cat /var/log/cassandra/output.log 
  INFO 09:24:38,453 JVM vendor/version: Java HotSpot(TM) 64-Bit Server 
 VM/1.6.0_26
  INFO 09:24:38,456 Heap size: 1936719872/1937768448
  INFO 09:24:38,457 Classpath: 
 /usr/share/cassandra/lib/antlr-3.2.jar:/usr/share/cassandra/lib/avro-1.4.0-fixes.jar:/usr/share/cassandra/lib/avro-1.4.0-sources-fixes.jar:/usr/share/cassandra/lib/commons-cli-1.1.jar:/usr/share/cassandra/lib/commons-codec-1.2.jar:/usr/share/cassandra/lib/commons-lang-2.4.jar:/usr/share/cassandra/lib/compress-lzf-0.8.4.jar:/usr/share/cassandra/lib/concurrentlinkedhashmap-lru-1.2.jar:/usr/share/cassandra/lib/guava-r08.jar:/usr/share/cassandra/lib/high-scale-lib-1.1.2.jar:/usr/share/cassandra/lib/jackson-core-asl-1.4.0.jar:/usr/share/cassandra/lib/jackson-mapper-asl-1.4.0.jar:/usr/share/cassandra/lib/jamm-0.2.5.jar:/usr/share/cassandra/lib/jline-0.9.94.jar:/usr/share/cassandra/lib/joda-time-1.6.2.jar:/usr/share/cassandra/lib/json-simple-1.1.jar:/usr/share/cassandra/lib/libthrift-0.6.jar:/usr/share/cassandra/lib/log4j-1.2.16.jar:/usr/share/cassandra/lib/servlet-api-2.5-20081211.jar:/usr/share/cassandra/lib/slf4j-api-1.6.1.jar:/usr/share/cassandra/lib/slf4j-log4j12-1.6.1.jar:/usr/share/cassandra/lib/snakeyaml-1.6.jar:/usr/share/cassandra/lib/snappy-java-1.0.3.jar:/usr/share/cassandra/apache-cassandra-1.0.0.jar:/usr/share/cassandra/apache-cassandra-thrift-1.0.0.jar:/usr/share/cassandra/apache-cassandra.jar:/usr/share/java/jna.jar:/etc/cassandra:/usr/share/java/commons-daemon.jar:/usr/share/cassandra/lib/jamm-0.2.5.jar
  INFO 09:24:39,891 JNA mlockall successful
  INFO 09:24:39,901 Loading settings from file:/etc/cassandra/cassandra.yaml
  INFO 09:24:40,057 DiskAccessMode 'auto' determined to be mmap, 
 indexAccessMode is mmap
  INFO 09:24:40,069 Global memtable threshold is enabled at 616MB
  INFO 09:24:40,159 EC2Snitch using region: us-east, zone: 1d.
  INFO 09:24:40,475 Creating new commitlog segment 
 /raid0/cassandra/commitlog/CommitLog-1319793880475.log
  INFO 09:24:40,486 Couldn't detect any schema definitions in local storage.
  INFO 09:24:40,486 Found table data in data directories. Consider using the 
 CLI to define your schema.
  INFO 09:24:40,497 No commitlog files found; skipping replay
  INFO 09:24:40,501 Cassandra version: 1.0.0
  INFO 09:24:40,502 Thrift API version: 19.18.0
  INFO 09:24:40,502 Loading persisted ring state
  INFO 09:24:40,506 Starting up server gossip
  INFO 09:24:40,529 Enqueuing flush of 
 Memtable-LocationInfo@1388314661(190/237 serialized/live bytes, 4 ops)
  INFO 09:24:40,530 Writing Memtable-LocationInfo@1388314661(190/237 
 serialized/live bytes, 4 ops)
  INFO 09:24:40,600 Completed flushing 
 /raid0/cassandra/data/system/LocationInfo-h-1-Data.db (298 bytes)
  INFO 09:24:40,613 Ec2Snitch adding ApplicationState ec2region=us-east 
 ec2zone=1d
  INFO 09:24:40,621 Starting Messaging Service on /10.40.190.143:7000
  INFO 09:24:40,628 Joining: waiting for ring and schema information
  INFO 09:24:43,389 InetAddress /10.194.29.156 is now dead.
  INFO 09:24:43,391 InetAddress /10.85.11.38 is now dead.
  INFO 09:24:43,392 InetAddress /10.34.42.28 is now dead.
  INFO 09:24:43,393 InetAddress /10.77.63.49 is now dead.
  INFO 09:24:43,394 InetAddress /10.194.22.191 is now dead.
  INFO 09:24:43,395 InetAddress /10.34.74.58 is now dead.
  INFO 09:24:43,395 Node /10.34.33.16 is now part of the cluster
  INFO 09:24:43,396 InetAddress /10.34.33.16 is now UP
  INFO 09:24:43,397 Enqueuing flush of Memtable-LocationInfo@1629818866(20/25 
 serialized/live bytes, 1 ops)
  INFO 09:24:43,398 Writing Memtable-LocationInfo@1629818866(20/25 
 serialized/live bytes, 1 ops)
  INFO 09:24:43,417 Completed flushing 
 /raid0/cassandra/data/system/LocationInfo-h-2-Data.db (74 bytes)
  INFO 09:24:43,418 InetAddress /10.202.67.43 is now dead.
  INFO 09:24:43,419 InetAddress /10.116.215.81 is now dead.
  INFO 09:24:43,420 InetAddress 

[jira] [Commented] (CASSANDRA-3374) CQL can't create column with compression or that use leveled compaction

2012-01-27 Thread Jonathan Ellis (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-3374?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13195084#comment-13195084
 ] 

Jonathan Ellis commented on CASSANDRA-3374:
---

bq. Was this meant to expose 'compaction_strategy_class' to CQL

Yes

 CQL can't create column with compression or that use leveled compaction
 ---

 Key: CASSANDRA-3374
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3374
 Project: Cassandra
  Issue Type: Bug
  Components: API
Affects Versions: 1.0.0
Reporter: Sylvain Lebresne
Assignee: Pavel Yaskevich
Priority: Minor
  Labels: cql
 Fix For: 1.0.7

 Attachments: CASSANDRA-3374.patch


 Looking at CreateColumnFamilyStatement.java, it doesn't seem CQL can create 
 compressed column families, nor define a compaction strategy.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Updated] (CASSANDRA-3374) CQL can't create column with compression or that use leveled compaction

2012-01-27 Thread Jonathan Ellis (Updated) (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-3374?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jonathan Ellis updated CASSANDRA-3374:
--

Fix Version/s: (was: 1.0.7)
   1.0.8

 CQL can't create column with compression or that use leveled compaction
 ---

 Key: CASSANDRA-3374
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3374
 Project: Cassandra
  Issue Type: Bug
  Components: API
Affects Versions: 1.0.0
Reporter: Sylvain Lebresne
Assignee: Pavel Yaskevich
Priority: Minor
  Labels: cql
 Fix For: 1.0.8

 Attachments: CASSANDRA-3374.patch


 Looking at CreateColumnFamilyStatement.java, it doesn't seem CQL can create 
 compressed column families, nor define a compaction strategy.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Updated] (CASSANDRA-3374) CQL can't create column with compression or that use leveled compaction

2012-01-27 Thread Pavel Yaskevich (Updated) (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-3374?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Pavel Yaskevich updated CASSANDRA-3374:
---

Attachment: CASSANDRA-3374-compaction_strategy_class.patch

it had that option but never actually bothered to set it :)

 CQL can't create column with compression or that use leveled compaction
 ---

 Key: CASSANDRA-3374
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3374
 Project: Cassandra
  Issue Type: Bug
  Components: API
Affects Versions: 1.0.0
Reporter: Sylvain Lebresne
Assignee: Pavel Yaskevich
Priority: Minor
  Labels: cql
 Fix For: 1.0.8

 Attachments: CASSANDRA-3374-compaction_strategy_class.patch, 
 CASSANDRA-3374.patch


 Looking at CreateColumnFamilyStatement.java, it doesn't seem CQL can create 
 compressed column families, nor define a compaction strategy.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Created] (CASSANDRA-3799) cqlsh: ASSUME should also change how values are sent to cassandra

2012-01-27 Thread paul cannon (Created) (JIRA)
cqlsh: ASSUME should also change how values are sent to cassandra
-

 Key: CASSANDRA-3799
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3799
 Project: Cassandra
  Issue Type: New Feature
  Components: Tools
Affects Versions: 1.0.3
Reporter: paul cannon
Assignee: paul cannon
Priority: Minor


cqlsh's ASSUME command currently only changes how query *return* values are 
deserialized, and never transforms user CQL text before sending to Cassandra.

Apparently cassandra-cli also changes how values are interpreted and marshaled 
for Cassandra, so user expectation is that cqlsh should also do this.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Created] (CASSANDRA-3800) cqlsh: ASSUME should also change how values are sent to cassandra

2012-01-27 Thread paul cannon (Created) (JIRA)
cqlsh: ASSUME should also change how values are sent to cassandra
-

 Key: CASSANDRA-3800
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3800
 Project: Cassandra
  Issue Type: New Feature
  Components: Tools
Affects Versions: 1.0.3
Reporter: paul cannon
Assignee: paul cannon
Priority: Minor


cqlsh's ASSUME command currently only changes how query *return* values are 
deserialized, and never transforms user CQL text before sending to Cassandra.

Apparently cassandra-cli also changes how values are interpreted and marshaled 
for Cassandra, so user expectation is that cqlsh should also do this.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Created] (CASSANDRA-3801) cqlsh: ASSUME should also change how values are sent to cassandra

2012-01-27 Thread paul cannon (Created) (JIRA)
cqlsh: ASSUME should also change how values are sent to cassandra
-

 Key: CASSANDRA-3801
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3801
 Project: Cassandra
  Issue Type: New Feature
  Components: Tests
Affects Versions: 1.0.3
Reporter: paul cannon
Assignee: paul cannon
Priority: Minor


cqlsh's ASSUME command currently only changes how query *return* values are 
deserialized, and never transforms user CQL text before sending to Cassandra.

Apparently cassandra-cli also changes how values are interpreted and marshaled 
for Cassandra, so user expectation is that cqlsh should also do this.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Resolved] (CASSANDRA-3800) cqlsh: ASSUME should also change how values are sent to cassandra

2012-01-27 Thread paul cannon (Resolved) (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-3800?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

paul cannon resolved CASSANDRA-3800.


Resolution: Duplicate

FOAD, Apache Jira.

 cqlsh: ASSUME should also change how values are sent to cassandra
 -

 Key: CASSANDRA-3800
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3800
 Project: Cassandra
  Issue Type: New Feature
  Components: Tools
Affects Versions: 1.0.3
Reporter: paul cannon
Assignee: paul cannon
Priority: Minor
  Labels: cqlsh

 cqlsh's ASSUME command currently only changes how query *return* values are 
 deserialized, and never transforms user CQL text before sending to Cassandra.
 Apparently cassandra-cli also changes how values are interpreted and 
 marshaled for Cassandra, so user expectation is that cqlsh should also do 
 this.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Resolved] (CASSANDRA-3801) cqlsh: ASSUME should also change how values are sent to cassandra

2012-01-27 Thread paul cannon (Resolved) (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-3801?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

paul cannon resolved CASSANDRA-3801.


Resolution: Duplicate

FOAD again, Apache Jira.

 cqlsh: ASSUME should also change how values are sent to cassandra
 -

 Key: CASSANDRA-3801
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3801
 Project: Cassandra
  Issue Type: New Feature
  Components: Tests
Affects Versions: 1.0.3
Reporter: paul cannon
Assignee: paul cannon
Priority: Minor
  Labels: cqlsh

 cqlsh's ASSUME command currently only changes how query *return* values are 
 deserialized, and never transforms user CQL text before sending to Cassandra.
 Apparently cassandra-cli also changes how values are interpreted and 
 marshaled for Cassandra, so user expectation is that cqlsh should also do 
 this.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Created] (CASSANDRA-3802) Cli returns UE on truncate when command is successful

2012-01-27 Thread Joaquin Casares (Created) (JIRA)
Cli returns UE on truncate when command is successful
-

 Key: CASSANDRA-3802
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3802
 Project: Cassandra
  Issue Type: Bug
Reporter: Joaquin Casares


Much like: https://issues.apache.org/jira/browse/CASSANDRA-3651

The UE is returned instead of a timeout error, but in this case, the timeout 
error is returned even though the command executes successfully. Could we have 
a tunable parameter to increase the timeout period?

Example stacktrace:

{noformat}
[default@cfs] truncate cleanup; 
null 
UnavailableException() 
at 
org.apache.cassandra.thrift.Cassandra$truncate_result.read(Cassandra.java:20210)
 
at 
org.apache.cassandra.thrift.Cassandra$Client.recv_truncate(Cassandra.java:1077) 
at org.apache.cassandra.thrift.Cassandra$Client.truncate(Cassandra.java:1052) 
at org.apache.cassandra.cli.CliClient.executeTruncate(CliClient.java:1498) 
at org.apache.cassandra.cli.CliClient.executeCLIStatement(CliClient.java:270) 
at 
org.apache.cassandra.cli.CliMain.processStatementInteractive(CliMain.java:220) 
at org.apache.cassandra.cli.CliMain.main(CliMain.java:346)
{noformat}

JNA confirmed on all machines via jinfo. Flush and snapshot confirmed to be 
successful individually.

A truncate was tried again and the view from cfstats changed:

{noformat}
Column Family: sblocks 
SSTable count: 3 
Space used (live): 22200 
Space used (total): 22200 
Number of Keys (estimate): 384 
Memtable Columns Count: 0 
Memtable Data Size: 0 
Memtable Switch Count: 0 
Read Count: 0 
Read Latency: NaN ms. 
Write Count: 0 
Write Latency: NaN ms. 
Pending Tasks: 0 
Bloom Filter False Postives: 0 
Bloom Filter False Ratio: 0.0 
Bloom Filter Space Used: 56 
Key cache capacity: 100 
Key cache size: 0 
Key cache hit rate: NaN 
Row cache: disabled 
Compacted row minimum size: 73 
Compacted row maximum size: 4768 
Compacted row mean size: 1379

to

Column Family: sblocks 
SSTable count: 0 
Space used (live): 0 
Space used (total): 0 
Number of Keys (estimate): 0 
Memtable Columns Count: 0 
Memtable Data Size: 0 
Memtable Switch Count: 0 
Read Count: 0 
Read Latency: NaN ms. 
Write Count: 0 
Write Latency: NaN ms. 
Pending Tasks: 0 
Bloom Filter False Postives: 0 
Bloom Filter False Ratio: 0.0 
Bloom Filter Space Used: 0 
Key cache capacity: 100 
Key cache size: 0 
Key cache hit rate: NaN 
Row cache: disabled 
Compacted row minimum size: 0 
Compacted row maximum size: 0 
Compacted row mean size: 0
{noformat}

even though the UE was still thrown (as a possible TE).

After trying to truncate different cfs back-to-back, one completed successfully 
and the rest all followed with successful completions.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Created] (CASSANDRA-3803) snapshot-before-compaction snapshots entire keyspace

2012-01-27 Thread Jonathan Ellis (Created) (JIRA)
snapshot-before-compaction snapshots entire keyspace


 Key: CASSANDRA-3803
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3803
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Reporter: Jonathan Ellis
Assignee: Jonathan Ellis
Priority: Minor
 Fix For: 1.1


Should only snapshot the CF being compacted

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Updated] (CASSANDRA-3803) snapshot-before-compaction snapshots entire keyspace

2012-01-27 Thread Jonathan Ellis (Updated) (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-3803?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jonathan Ellis updated CASSANDRA-3803:
--

Attachment: 3803.txt

I can't think of a good reason to snapshot the entire keyspace, and doing so 
can dramatically increase the space needed to enable snapshot_before_compaction.

 snapshot-before-compaction snapshots entire keyspace
 

 Key: CASSANDRA-3803
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3803
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Reporter: Jonathan Ellis
Assignee: Jonathan Ellis
Priority: Minor
  Labels: compaction
 Fix For: 1.1

 Attachments: 3803.txt


 Should only snapshot the CF being compacted

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Resolved] (CASSANDRA-3802) Cli returns UE on truncate when command is successful

2012-01-27 Thread Brandon Williams (Resolved) (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-3802?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Brandon Williams resolved CASSANDRA-3802.
-

Resolution: Not A Problem

UE will be thrown on timeout until 1.1.  Increasing rpc_timeout will increase 
the time until the exception is thrown (but truncate may work despite the 
exception, TOE always means you don't know what happened)

 Cli returns UE on truncate when command is successful
 -

 Key: CASSANDRA-3802
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3802
 Project: Cassandra
  Issue Type: Bug
Reporter: Joaquin Casares

 Much like: https://issues.apache.org/jira/browse/CASSANDRA-3651
 The UE is returned instead of a timeout error, but in this case, the timeout 
 error is returned even though the command executes successfully. Could we 
 have a tunable parameter to increase the timeout period?
 Example stacktrace:
 {noformat}
 [default@cfs] truncate cleanup; 
 null 
 UnavailableException() 
 at 
 org.apache.cassandra.thrift.Cassandra$truncate_result.read(Cassandra.java:20210)
  
 at 
 org.apache.cassandra.thrift.Cassandra$Client.recv_truncate(Cassandra.java:1077)
  
 at org.apache.cassandra.thrift.Cassandra$Client.truncate(Cassandra.java:1052) 
 at org.apache.cassandra.cli.CliClient.executeTruncate(CliClient.java:1498) 
 at org.apache.cassandra.cli.CliClient.executeCLIStatement(CliClient.java:270) 
 at 
 org.apache.cassandra.cli.CliMain.processStatementInteractive(CliMain.java:220)
  
 at org.apache.cassandra.cli.CliMain.main(CliMain.java:346)
 {noformat}
 JNA confirmed on all machines via jinfo. Flush and snapshot confirmed to be 
 successful individually.
 A truncate was tried again and the view from cfstats changed:
 {noformat}
 Column Family: sblocks 
 SSTable count: 3 
 Space used (live): 22200 
 Space used (total): 22200 
 Number of Keys (estimate): 384 
 Memtable Columns Count: 0 
 Memtable Data Size: 0 
 Memtable Switch Count: 0 
 Read Count: 0 
 Read Latency: NaN ms. 
 Write Count: 0 
 Write Latency: NaN ms. 
 Pending Tasks: 0 
 Bloom Filter False Postives: 0 
 Bloom Filter False Ratio: 0.0 
 Bloom Filter Space Used: 56 
 Key cache capacity: 100 
 Key cache size: 0 
 Key cache hit rate: NaN 
 Row cache: disabled 
 Compacted row minimum size: 73 
 Compacted row maximum size: 4768 
 Compacted row mean size: 1379
 to
 Column Family: sblocks 
 SSTable count: 0 
 Space used (live): 0 
 Space used (total): 0 
 Number of Keys (estimate): 0 
 Memtable Columns Count: 0 
 Memtable Data Size: 0 
 Memtable Switch Count: 0 
 Read Count: 0 
 Read Latency: NaN ms. 
 Write Count: 0 
 Write Latency: NaN ms. 
 Pending Tasks: 0 
 Bloom Filter False Postives: 0 
 Bloom Filter False Ratio: 0.0 
 Bloom Filter Space Used: 0 
 Key cache capacity: 100 
 Key cache size: 0 
 Key cache hit rate: NaN 
 Row cache: disabled 
 Compacted row minimum size: 0 
 Compacted row maximum size: 0 
 Compacted row mean size: 0
 {noformat}
 even though the UE was still thrown (as a possible TE).
 After trying to truncate different cfs back-to-back, one completed 
 successfully and the rest all followed with successful completions.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Issue Comment Edited] (CASSANDRA-3670) provide red flags JMX instrumentation

2012-01-27 Thread Peter Schuller (Issue Comment Edited) (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-3670?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13195216#comment-13195216
 ] 

Peter Schuller edited comment on CASSANDRA-3670 at 1/27/12 11:13 PM:
-

CodaHale Metrics being evaluated in CASSANDRA-3671. If there's a +1 there, will 
go for same here.

  was (Author: scode):
CodaHale Metrics being evaluated in CASSANDRA-3671. If there's a +1 here, 
will go for same here.
  
 provide red flags JMX instrumentation
 ---

 Key: CASSANDRA-3670
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3670
 Project: Cassandra
  Issue Type: Improvement
Reporter: Peter Schuller
Assignee: Peter Schuller
Priority: Minor

 As discussed in CASSANDRA-3641, it would be nice to expose through JMX 
 certain information which is almost without exception indicative of something 
 being wrong with the node or cluster.
 In the CASSANDRA-3641 case, it was the detection of corrupt counter shards. 
 Other examples include:
 * Number of times the selection of files to compact was adjusted due to disk 
 space heuristics
 * Number of times compaction has failed
 * Any I/O error reading from or writing to disk (the work here is collecting, 
 not exposing, so maybe not in an initial version)
 * Any data skipped due to checksum mismatches (when checksumming is being 
 used); e.g., number of skips.
 * Any arbitrary exception at least in certain code paths (compaction, scrub, 
 cleanup for starters)
 Probably other things.
 The motivation is that if we have clear and obvious indications that 
 something truly is wrong, it seems suboptimal to just leave that information 
 in the log somewhere, for someone to discover later when something else broke 
 as a result and a human investigates. You might argue that one should use 
 non-trivial log analysis to detect these things, but I highly doubt a lot of 
 people do this and it seems very wasteful to require that in comparison to 
 just providing the MBean.
 It is important to note that the *lack* of a certain problem being advertised 
 in this MBean is not supposed to be indicative of a *lack* of a problem. 
 Rather, the point is that to the extent we can easily do so, it is nice to 
 have a clear method of communicating to monitoring systems where there *is* a 
 clear indication of something being wrong.
 The main part of this ticket is not to cover everything under the sun, but 
 rather to reach agreement on adding an MBean where these types of indicators 
 can be collected. Individual counters can then be added over time as one 
 thinks of them.
 I propose:
 * Create an org.apache.cassandra.db.RedFlags MBean
 * Populate with a few things to begin with.
 I'll submit the patch if there is agreement.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (CASSANDRA-3670) provide red flags JMX instrumentation

2012-01-27 Thread Peter Schuller (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-3670?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13195216#comment-13195216
 ] 

Peter Schuller commented on CASSANDRA-3670:
---

CodaHale Metrics being evaluated in CASSANDRA-3671. If there's a +1 here, will 
go for same here.

 provide red flags JMX instrumentation
 ---

 Key: CASSANDRA-3670
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3670
 Project: Cassandra
  Issue Type: Improvement
Reporter: Peter Schuller
Assignee: Peter Schuller
Priority: Minor

 As discussed in CASSANDRA-3641, it would be nice to expose through JMX 
 certain information which is almost without exception indicative of something 
 being wrong with the node or cluster.
 In the CASSANDRA-3641 case, it was the detection of corrupt counter shards. 
 Other examples include:
 * Number of times the selection of files to compact was adjusted due to disk 
 space heuristics
 * Number of times compaction has failed
 * Any I/O error reading from or writing to disk (the work here is collecting, 
 not exposing, so maybe not in an initial version)
 * Any data skipped due to checksum mismatches (when checksumming is being 
 used); e.g., number of skips.
 * Any arbitrary exception at least in certain code paths (compaction, scrub, 
 cleanup for starters)
 Probably other things.
 The motivation is that if we have clear and obvious indications that 
 something truly is wrong, it seems suboptimal to just leave that information 
 in the log somewhere, for someone to discover later when something else broke 
 as a result and a human investigates. You might argue that one should use 
 non-trivial log analysis to detect these things, but I highly doubt a lot of 
 people do this and it seems very wasteful to require that in comparison to 
 just providing the MBean.
 It is important to note that the *lack* of a certain problem being advertised 
 in this MBean is not supposed to be indicative of a *lack* of a problem. 
 Rather, the point is that to the extent we can easily do so, it is nice to 
 have a clear method of communicating to monitoring systems where there *is* a 
 clear indication of something being wrong.
 The main part of this ticket is not to cover everything under the sun, but 
 rather to reach agreement on adding an MBean where these types of indicators 
 can be collected. Individual counters can then be added over time as one 
 thinks of them.
 I propose:
 * Create an org.apache.cassandra.db.RedFlags MBean
 * Populate with a few things to begin with.
 I'll submit the patch if there is agreement.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (CASSANDRA-3782) Secondary indexes support for wide rows in CQL 3.0

2012-01-27 Thread Jonathan Ellis (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-3782?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13195224#comment-13195224
 ] 

Jonathan Ellis commented on CASSANDRA-3782:
---

I'm confused by this example.  First, because in this case time is a simple 
column name so it's part of the row's column index.  I don't see what 
additional indexes would buy us.  While I could see creating indexes on 
subordinate parts of a composite column name, I imagine that's what 
CASSANDRA-3680 has in mind.  So in my mind the index wide rows part that's 
distinct from index composite columns is, index the values part of wide row 
columns, i.e., event in this example.

The other reason I'm confused is because the general case is people want to 
index everything in a column; while partial indexes 
(http://www.postgresql.org/docs/9.1/static/indexes-partial.html) can certainly 
be useful, it's more of an advanced feature (MySQL doesn't support it at all).

 Secondary indexes support for wide rows in CQL 3.0
 --

 Key: CASSANDRA-3782
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3782
 Project: Cassandra
  Issue Type: Sub-task
  Components: API
Reporter: Sylvain Lebresne
Assignee: Sylvain Lebresne
 Fix For: 1.1


 Currently, CQL 3.0 doesn't allow creating an index on a dynamic CF (with 
 COMPACT STORAGE). The goal of this ticket is *not* to support the composite 
 case however (CASSANDRA-3680 will tackle this).
 I think changes needed to support this are only in the CQL side and covert 
 two area:
 * Finding a syntax for it
 * Currently, the CQL 3 code consider that a CF with any column_metadata 
 defined is a non-compact cf. Basically the problem is that we currently use 
 column_metadata both for defining a name for a column in the static case, and 
 store indexing information. Ideally, we would separate those informations, 
 i.e. we could add a new map valueAliases (ByteBuffer - AbstractType) to 
 CFMetadata (only used by static CF) and we would keep column_metadata for 
 indexing purpose only. However that may be problematic for backward 
 compatibility (with thrift in particular), so probably instead we can just 
 add a new boolean isStaticColumnName to ColumnDefinition.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (CASSANDRA-3623) use MMapedBuffer in CompressedSegmentedFile.getSegment

2012-01-27 Thread Yuki Morishita (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-3623?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13195229#comment-13195229
 ] 

Yuki Morishita commented on CASSANDRA-3623:
---

Vijay, Pavel,

I did the test similar to Pavel's on physical machine (4core 2.6GHz Xeon/16GB 
RAM/Linux(debian)) with trunk + 3623(v3) + 3610(v3).
Cassandra is run on following jvm.

{code}
$ java -version
java version 1.6.0_26
Java(TM) SE Runtime Environment (build 1.6.0_26-b03)
Java HotSpot(TM) 64-Bit Server VM (build 20.1-b02, mixed mode)
{code}

with jvm args:

{code}
-ea
-javaagent:bin/../lib/jamm-0.2.5.jar
-XX:+UseThreadPriorities -XX:ThreadPriorityPolicy=42
-Xms6G -Xmx6G -Xmn2G -Xss128k
-XX:+HeapDumpOnOutOfMemoryError
-XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:+CMSParallelRemarkEnabled 
-XX:SurvivorRatio=8
-XX:MaxTenuringThreshold=1 -XX:CMSInitiatingOccupancyFraction=75 
-XX:+UseCMSInitiatingOccupancyOnly
-Djava.net.preferIPv4Stack=true -Dcom.sun.management.jmxremote.port=7199
-Dcom.sun.management.jmxremote.ssl=false 
-Dcom.sun.management.jmxremote.authenticate=false
-Dlog4j.configuration=log4j-server.properties -Dlog4j.defaultInitOverride=true
{code}

Populate enough data with stress tool, set crc_check_chance to 0.0, flush and 
compact.
Befor each test run, clean page cache. Stress tool is run from another machine.

* data_access_mode: mmap

{code}
$ tools/stress/bin/stress -n 50 -S 1024 -I SnappyCompressor -o read -d node0
total,interval_op_rate,interval_key_rate,avg_latency,elapsed_time
27487,2748,2748,0.01813206242951213,10
65226,3773,3773,0.013355361827287422,20
103145,3791,3791,0.01334416372171528,30
141092,3794,3794,0.013307842310530199,40
178981,3788,3788,0.013323840692549289,50
217062,3808,3808,0.013260129723484152,60
255020,3795,3795,0.01330330892038569,70
293075,3805,3805,0.013265825778478518,80
331046,3797,3797,0.013295910036606884,91
369059,3801,3801,0.01328353458027517,101
i407030,3797,3797,0.01329540965473651,111
444920,3789,3789,0.013323251517550806,121
482894,3797,3797,0.013299231052825617,131
50,1710,1710,0.010978779375657664,136
END
{code}

* data_access_mode: standard

{code}
$ tools/stress/bin/stress -n 50 -S 1024 -I SnappyCompressor -o read -d node0
total,interval_op_rate,interval_key_rate,avg_latency,elapsed_time
25474,2547,2547,0.019527989322446416,10
117046,9157,9157,0.005506617743415018,20
211863,9481,9481,0.005313298248204436,30
306773,9491,9491,0.005311305447265831,40
401107,9433,9433,0.005341160133143935,50
496051,9494,9494,0.005200739383215369,60
50,394,394,0.0019680931881488986,61
END
{code}

I ran the above several times (making sure each test is isolated), for each 
iteration I observe about the same result.

Things I noticed when digging with VisualVM

- Snappy uncompression with direct bytebuffers seems slightly faster, but its 
impact to overall read performace is negligible.
- I observed that CompressedMappedFileDataInput.reBuffer is called many times 
especially from the path CMFDI.reset - CMFDI.seek - CMFDI.reBuffer.
- When using CMFDI, I observe higher cpu usage than CRAR over all.

Right now I cannot find the reason to use mmapped bytebuffers for compressed 
files.


 use MMapedBuffer in CompressedSegmentedFile.getSegment
 --

 Key: CASSANDRA-3623
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3623
 Project: Cassandra
  Issue Type: Improvement
  Components: Core
Affects Versions: 1.1
Reporter: Vijay
Assignee: Vijay
  Labels: compression
 Fix For: 1.1

 Attachments: 0001-MMaped-Compression-segmented-file-v2.patch, 
 0001-MMaped-Compression-segmented-file-v3.patch, 
 0001-MMaped-Compression-segmented-file.patch, 
 0002-tests-for-MMaped-Compression-segmented-file-v2.patch, 
 0002-tests-for-MMaped-Compression-segmented-file-v3.patch, CRC+MMapIO.xlsx, 
 MMappedIO-Performance.docx


 CompressedSegmentedFile.getSegment seem to open a new file and doesnt seem to 
 use the MMap and hence a higher CPU on the nodes and higher latencies on 
 reads. 
 This ticket is to implement the TODO mentioned in CompressedRandomAccessReader
 // TODO refactor this to separate concept of buffer to avoid lots of read() 
 syscalls and compression buffer
 but i think a separate class for the Buffer will be better.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Updated] (CASSANDRA-3751) Possible livelock during commit log playback

2012-01-27 Thread Jonathan Ellis (Updated) (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-3751?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jonathan Ellis updated CASSANDRA-3751:
--

Attachment: 3751.txt

You're absolutely right, tablesRecovered is not threadsafe but it's mutated by 
up to concurrent_writes threads during log replay.  Patch attached to switch to 
NBHS.

 Possible livelock during commit log playback
 

 Key: CASSANDRA-3751
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3751
 Project: Cassandra
  Issue Type: Bug
  Components: Core
 Environment: Linux (CentOS 5.7)
Reporter: John Chakerian
  Labels: commitlog
 Fix For: 0.8.10, 1.0.8

 Attachments: 3751.txt


 In CommitLog.recover, there seems to be the possibility of concurrent inserts 
 to tablesRecovered (a HashSet) in the Runnables instantiated a bit below 
 (line 323 in 1.0.7). This apparently happened during a commit log playback 
 during startup of a node that had not shut down cleanly (the cluster was 
 under heavy load previously and there were several gigabytes of commit logs), 
 resulting in two threads running in perpetuity (2 cores were at 100% from 
 running these threads), preventing the node from coming up. The relevant 
 portion of the stack trace is:
 {noformat}
 INFO   | jvm 1| 2012/01/16 16:54:42 | MutationStage:25 prio=10 
 tid=0x2aaad01e0800 nid=0x6f62 runnable [0x44d54000]
 INFO   | jvm 1| 2012/01/16 16:54:42 |java.lang.Thread.State: RUNNABLE
 INFO   | jvm 1| 2012/01/16 16:54:42 | at 
 java.util.HashMap.put(HashMap.java:374)
 INFO   | jvm 1| 2012/01/16 16:54:42 | at 
 java.util.HashSet.add(HashSet.java:200)
 INFO   | jvm 1| 2012/01/16 16:54:42 | at 
 org.apache.cassandra.db.commitlog.CommitLog$2.runMayThrow(CommitLog.java:338)
 INFO   | jvm 1| 2012/01/16 16:54:42 | at 
 org.apache.cassandra.utils.WrappedRunnable.run(WrappedRunnable.java:30)
 INFO   | jvm 1| 2012/01/16 16:54:42 | at 
 java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
 INFO   | jvm 1| 2012/01/16 16:54:42 | at 
 java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
 INFO   | jvm 1| 2012/01/16 16:54:42 | at 
 java.util.concurrent.FutureTask.run(FutureTask.java:138)
 INFO   | jvm 1| 2012/01/16 16:54:42 | at 
 java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
 INFO   | jvm 1| 2012/01/16 16:54:42 | at 
 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
 INFO   | jvm 1| 2012/01/16 16:54:42 | at 
 java.lang.Thread.run(Thread.java:662)
 INFO   | jvm 1| 2012/01/16 16:54:42 | 
 INFO   | jvm 1| 2012/01/16 16:54:42 | MutationStage:21 prio=10 
 tid=0x2aaad00a2800 nid=0x6f5e runnable [0x4495]
 INFO   | jvm 1| 2012/01/16 16:54:42 |java.lang.Thread.State: RUNNABLE
 INFO   | jvm 1| 2012/01/16 16:54:42 | at 
 java.util.HashMap.put(HashMap.java:374)
 INFO   | jvm 1| 2012/01/16 16:54:42 | at 
 java.util.HashSet.add(HashSet.java:200)
 INFO   | jvm 1| 2012/01/16 16:54:42 | at 
 org.apache.cassandra.db.commitlog.CommitLog$2.runMayThrow(CommitLog.java:338)
 INFO   | jvm 1| 2012/01/16 16:54:42 | at 
 org.apache.cassandra.utils.WrappedRunnable.run(WrappedRunnable.java:30)
 INFO   | jvm 1| 2012/01/16 16:54:42 | at 
 java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
 INFO   | jvm 1| 2012/01/16 16:54:42 | at 
 java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
 INFO   | jvm 1| 2012/01/16 16:54:42 | at 
 java.util.concurrent.FutureTask.run(FutureTask.java:138)
 INFO   | jvm 1| 2012/01/16 16:54:42 | at 
 java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
 INFO   | jvm 1| 2012/01/16 16:54:42 | at 
 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
 INFO   | jvm 1| 2012/01/16 16:54:42 | at 
 java.lang.Thread.run(Thread.java:662)
 {noformat}
 The most recently modified file in the commit log directory was this entry:
 {noformat}
 -rw-r- 1 redacted redacted0 Jan 16 16:03 
 CommitLog-1326758622599.log
 {noformat}
 though I'm not sure if this was related or not. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (CASSANDRA-3468) SStable data corruption in 1.0.x

2012-01-27 Thread Jonathan Ellis (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-3468?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13195346#comment-13195346
 ] 

Jonathan Ellis commented on CASSANDRA-3468:
---

We narrowed it down to the SerializingCache:

{quote}
1) Row cache enabled, no jna - the problem did not occur, 
2) Row cache enabled, jna enabled, with SerializingCacheProvider - problem 
reproduced, 
3) Row cache enabled, jna enabled, with ConcurrentLinkedHashCacheProvider - 
problem did not occur.
{quote}

Then we enabled snapshot_before_compaction, reproduced a corruption, and 
backtracked through the snapshots to see where the corruption was introduced 
(during flush in a new sstable, or during compaction).  Compaction was the 
culprit.

That seems to point to this piece of code in the ReducingIterator:

{code}
.   // First check if this row is in the rowCache. If it is we can 
skip the rest
ColumnFamily cached = cfs.getRawCachedRow(key);
if (cached != null)
{
QueryFilter keyFilter = new QueryFilter(key, filter.path, 
filter.filter);
returnCF = cfs.filterColumnFamily(cached, keyFilter, 
gcBefore);
}
{code}


 SStable data corruption in 1.0.x
 

 Key: CASSANDRA-3468
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3468
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Affects Versions: 1.0.0
 Environment: RHEL 6 running Cassandra 1.0.x.
Reporter: Terry Cumaranatunge
  Labels: patch
 Attachments: 3468-assert.txt


 We have noticed several instances of sstable corruptions in 1.0.x. This has 
 occurred in 1.0.0-rcx and 1.0.0 and 1.0.1. It has happened on multiple nodes 
 and multiple hosts with different disks, so this is the reason the software 
 is suspected at this time. The file system used is XFS, but no resets or any 
 type of failure scenarios have been run to create the problem. We were 
 basically running under load and every so often, we see that the sstable gets 
 corrupted and compaction stops on that node.
 I will attach the relevant sstable files if it lets me do that when I create 
 this ticket.
 ERROR [CompactionExecutor:23] 2011-10-27 11:14:09,309 PrecompactedRow.java 
 (line 119) Skipping row DecoratedKey(128013852116656632841539411062933532114, 
 37303730303138313533) in 
 /var/lib/cassandra/data/MSA/participants-h-8688-Data.db
 java.io.EOFException
 at java.io.RandomAccessFile.readFully(RandomAccessFile.java:399)
 at java.io.RandomAccessFile.readFully(RandomAccessFile.java:377)
 at 
 org.apache.cassandra.utils.BytesReadTracker.readFully(BytesReadTracker.java:95)
 at 
 org.apache.cassandra.utils.ByteBufferUtil.read(ByteBufferUtil.java:388)
 at 
 org.apache.cassandra.utils.ByteBufferUtil.readWithLength(ByteBufferUtil.java:350)
 at 
 org.apache.cassandra.db.ColumnSerializer.deserialize(ColumnSerializer.java:96)
 at 
 org.apache.cassandra.db.ColumnSerializer.deserialize(ColumnSerializer.java:36)
 at 
 org.apache.cassandra.db.ColumnFamilySerializer.deserializeColumns(ColumnFamilySerializer.java:143)
 at 
 org.apache.cassandra.io.sstable.SSTableIdentityIterator.getColumnFamilyWithColumns(SSTableIdentityIterator.java:231)
 at 
 org.apache.cassandra.db.compaction.PrecompactedRow.merge(PrecompactedRow.java:115)
 at 
 org.apache.cassandra.db.compaction.PrecompactedRow.init(PrecompactedRow.java:102)
 at 
 org.apache.cassandra.db.compaction.CompactionController.getCompactedRow(CompactionController.java:127)
 at 
 org.apache.cassandra.db.compaction.CompactionIterable$Reducer.getReduced(CompactionIterable.java:102)
 at 
 org.apache.cassandra.db.compaction.CompactionIterable$Reducer.getReduced(CompactionIterable.java:87)
 at 
 org.apache.cassandra.utils.MergeIterator$ManyToOne.consume(MergeIterator.java:116)
 at 
 org.apache.cassandra.utils.MergeIterator$ManyToOne.computeNext(MergeIterator.java:99)
 at 
 com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:140)
 at 
 com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:135)
 at 
 com.google.common.collect.Iterators$7.computeNext(Iterators.java:614)
 at 
 com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:140)
 at 
 com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:135)
 at 
 org.apache.cassandra.db.compaction.CompactionTask.execute(CompactionTask.java:179)
 at 
 org.apache.cassandra.db.compaction.LeveledCompactionTask.execute(LeveledCompactionTask.java:47)
 at 
 

[jira] [Updated] (CASSANDRA-3417) InvocationTargetException ConcurrentModificationException at startup

2012-01-27 Thread Peter Schuller (Updated) (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-3417?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Peter Schuller updated CASSANDRA-3417:
--

Attachment: 3417-3.txt

Attaching v3 which also adds synchronization in 
TokenMap.getTokenToEndpointMap() - both for bootstrapTokens and 
tokenToEndpointMap.

(x.putAll(y) is not an atomic observation from the perspective of y, even if it 
is from the perspective of x)

 InvocationTargetException ConcurrentModificationException at startup
 

 Key: CASSANDRA-3417
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3417
 Project: Cassandra
  Issue Type: Bug
Affects Versions: 1.0.0
Reporter: Joaquin Casares
Assignee: Jonathan Ellis
Priority: Minor
 Fix For: 1.0.8

 Attachments: 3417-2.txt, 3417-3.txt, 3417.txt


 I was starting up the new DataStax AMI where the seed starts first and 34 
 nodes would latch on together. So far things have been working decently for 
 launching, but right now I just got this during startup.
 {CODE}
 ubuntu@ip-10-40-190-143:~$ sudo cat /var/log/cassandra/output.log 
  INFO 09:24:38,453 JVM vendor/version: Java HotSpot(TM) 64-Bit Server 
 VM/1.6.0_26
  INFO 09:24:38,456 Heap size: 1936719872/1937768448
  INFO 09:24:38,457 Classpath: 
 /usr/share/cassandra/lib/antlr-3.2.jar:/usr/share/cassandra/lib/avro-1.4.0-fixes.jar:/usr/share/cassandra/lib/avro-1.4.0-sources-fixes.jar:/usr/share/cassandra/lib/commons-cli-1.1.jar:/usr/share/cassandra/lib/commons-codec-1.2.jar:/usr/share/cassandra/lib/commons-lang-2.4.jar:/usr/share/cassandra/lib/compress-lzf-0.8.4.jar:/usr/share/cassandra/lib/concurrentlinkedhashmap-lru-1.2.jar:/usr/share/cassandra/lib/guava-r08.jar:/usr/share/cassandra/lib/high-scale-lib-1.1.2.jar:/usr/share/cassandra/lib/jackson-core-asl-1.4.0.jar:/usr/share/cassandra/lib/jackson-mapper-asl-1.4.0.jar:/usr/share/cassandra/lib/jamm-0.2.5.jar:/usr/share/cassandra/lib/jline-0.9.94.jar:/usr/share/cassandra/lib/joda-time-1.6.2.jar:/usr/share/cassandra/lib/json-simple-1.1.jar:/usr/share/cassandra/lib/libthrift-0.6.jar:/usr/share/cassandra/lib/log4j-1.2.16.jar:/usr/share/cassandra/lib/servlet-api-2.5-20081211.jar:/usr/share/cassandra/lib/slf4j-api-1.6.1.jar:/usr/share/cassandra/lib/slf4j-log4j12-1.6.1.jar:/usr/share/cassandra/lib/snakeyaml-1.6.jar:/usr/share/cassandra/lib/snappy-java-1.0.3.jar:/usr/share/cassandra/apache-cassandra-1.0.0.jar:/usr/share/cassandra/apache-cassandra-thrift-1.0.0.jar:/usr/share/cassandra/apache-cassandra.jar:/usr/share/java/jna.jar:/etc/cassandra:/usr/share/java/commons-daemon.jar:/usr/share/cassandra/lib/jamm-0.2.5.jar
  INFO 09:24:39,891 JNA mlockall successful
  INFO 09:24:39,901 Loading settings from file:/etc/cassandra/cassandra.yaml
  INFO 09:24:40,057 DiskAccessMode 'auto' determined to be mmap, 
 indexAccessMode is mmap
  INFO 09:24:40,069 Global memtable threshold is enabled at 616MB
  INFO 09:24:40,159 EC2Snitch using region: us-east, zone: 1d.
  INFO 09:24:40,475 Creating new commitlog segment 
 /raid0/cassandra/commitlog/CommitLog-1319793880475.log
  INFO 09:24:40,486 Couldn't detect any schema definitions in local storage.
  INFO 09:24:40,486 Found table data in data directories. Consider using the 
 CLI to define your schema.
  INFO 09:24:40,497 No commitlog files found; skipping replay
  INFO 09:24:40,501 Cassandra version: 1.0.0
  INFO 09:24:40,502 Thrift API version: 19.18.0
  INFO 09:24:40,502 Loading persisted ring state
  INFO 09:24:40,506 Starting up server gossip
  INFO 09:24:40,529 Enqueuing flush of 
 Memtable-LocationInfo@1388314661(190/237 serialized/live bytes, 4 ops)
  INFO 09:24:40,530 Writing Memtable-LocationInfo@1388314661(190/237 
 serialized/live bytes, 4 ops)
  INFO 09:24:40,600 Completed flushing 
 /raid0/cassandra/data/system/LocationInfo-h-1-Data.db (298 bytes)
  INFO 09:24:40,613 Ec2Snitch adding ApplicationState ec2region=us-east 
 ec2zone=1d
  INFO 09:24:40,621 Starting Messaging Service on /10.40.190.143:7000
  INFO 09:24:40,628 Joining: waiting for ring and schema information
  INFO 09:24:43,389 InetAddress /10.194.29.156 is now dead.
  INFO 09:24:43,391 InetAddress /10.85.11.38 is now dead.
  INFO 09:24:43,392 InetAddress /10.34.42.28 is now dead.
  INFO 09:24:43,393 InetAddress /10.77.63.49 is now dead.
  INFO 09:24:43,394 InetAddress /10.194.22.191 is now dead.
  INFO 09:24:43,395 InetAddress /10.34.74.58 is now dead.
  INFO 09:24:43,395 Node /10.34.33.16 is now part of the cluster
  INFO 09:24:43,396 InetAddress /10.34.33.16 is now UP
  INFO 09:24:43,397 Enqueuing flush of Memtable-LocationInfo@1629818866(20/25 
 serialized/live bytes, 1 ops)
  INFO 09:24:43,398 Writing Memtable-LocationInfo@1629818866(20/25 
 serialized/live bytes, 1 ops)
  INFO 09:24:43,417 Completed flushing 
 

[jira] [Commented] (CASSANDRA-2930) corrupt commitlog

2012-01-27 Thread Rick Branson (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-2930?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13195361#comment-13195361
 ] 

Rick Branson commented on CASSANDRA-2930:
-

+1 on CASSANDRA-3237. Polishing the supercolumn turd is futile. The heisenbug 
that's generating this one is so rare that few have even seen it, let alone 
found a way to reproduce it reliably.

 corrupt commitlog
 -

 Key: CASSANDRA-2930
 URL: https://issues.apache.org/jira/browse/CASSANDRA-2930
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Affects Versions: 0.8.1
 Environment: Linux, amd64.
 Java(TM) SE Runtime Environment (build 1.6.0_26-b03)
Reporter: ivan
Assignee: Rick Branson
 Attachments: CommitLog-1310637513214.log


 We get Exception encountered during startup error while Cassandra starts.
 Error messages:
  INFO 13:56:28,736 Finished reading 
 /var/lib/cassandra/commitlog/CommitLog-1310637513214.log
 ERROR 13:56:28,736 Exception encountered during startup.
 java.io.IOError: java.io.EOFException
 at 
 org.apache.cassandra.io.util.ColumnIterator.deserializeNext(ColumnSortedMap.java:265)
 at 
 org.apache.cassandra.io.util.ColumnIterator.next(ColumnSortedMap.java:281)
 at 
 org.apache.cassandra.io.util.ColumnIterator.next(ColumnSortedMap.java:236)
 at 
 java.util.concurrent.ConcurrentSkipListMap.buildFromSorted(ConcurrentSkipListMap.java:1493)
 at 
 java.util.concurrent.ConcurrentSkipListMap.init(ConcurrentSkipListMap.java:1443)
 at 
 org.apache.cassandra.db.SuperColumnSerializer.deserialize(SuperColumn.java:419)
 at 
 org.apache.cassandra.db.ColumnFamilySerializer.deserializeColumns(ColumnFamilySerializer.java:139)
 at 
 org.apache.cassandra.db.ColumnFamilySerializer.deserialize(ColumnFamilySerializer.java:127)
 at 
 org.apache.cassandra.db.RowMutation$RowMutationSerializer.deserialize(RowMutation.java:382)
 at 
 org.apache.cassandra.db.commitlog.CommitLog.recover(CommitLog.java:278)
 at 
 org.apache.cassandra.db.commitlog.CommitLog.recover(CommitLog.java:158)
 at 
 org.apache.cassandra.service.AbstractCassandraDaemon.setup(AbstractCassandraDaemon.java:175)
 at 
 org.apache.cassandra.service.AbstractCassandraDaemon.activate(AbstractCassandraDaemon.java:368)
 at 
 org.apache.cassandra.thrift.CassandraDaemon.main(CassandraDaemon.java:80)
 Caused by: java.io.EOFException
 at java.io.DataInputStream.readFully(DataInputStream.java:180)
 at java.io.DataInputStream.readFully(DataInputStream.java:152)
 at 
 org.apache.cassandra.utils.ByteBufferUtil.read(ByteBufferUtil.java:394)
 at 
 org.apache.cassandra.utils.ByteBufferUtil.readWithShortLength(ByteBufferUtil.java:368)
 at 
 org.apache.cassandra.db.ColumnSerializer.deserialize(ColumnSerializer.java:87)
 at 
 org.apache.cassandra.io.util.ColumnIterator.deserializeNext(ColumnSortedMap.java:261)
 ... 13 more
 Exception encountered during startup.
 java.io.IOError: java.io.EOFException
 at 
 org.apache.cassandra.io.util.ColumnIterator.deserializeNext(ColumnSortedMap.java:265)
 at 
 org.apache.cassandra.io.util.ColumnIterator.next(ColumnSortedMap.java:281)
 at 
 org.apache.cassandra.io.util.ColumnIterator.next(ColumnSortedMap.java:236)
 at 
 java.util.concurrent.ConcurrentSkipListMap.buildFromSorted(ConcurrentSkipListMap.java:1493)
 at 
 java.util.concurrent.ConcurrentSkipListMap.init(ConcurrentSkipListMap.java:1443)
 at 
 org.apache.cassandra.db.SuperColumnSerializer.deserialize(SuperColumn.java:419)
 at 
 org.apache.cassandra.db.ColumnFamilySerializer.deserializeColumns(ColumnFamilySerializer.java:139)
 at 
 org.apache.cassandra.db.ColumnFamilySerializer.deserialize(ColumnFamilySerializer.java:127)
 at 
 org.apache.cassandra.db.RowMutation$RowMutationSerializer.deserialize(RowMutation.java:382)
 at 
 org.apache.cassandra.db.commitlog.CommitLog.recover(CommitLog.java:278)
 at 
 org.apache.cassandra.db.commitlog.CommitLog.recover(CommitLog.java:158)
 at 
 org.apache.cassandra.service.AbstractCassandraDaemon.setup(AbstractCassandraDaemon.java:175)
 at 
 org.apache.cassandra.service.AbstractCassandraDaemon.activate(AbstractCassandraDaemon.java:368)
 at 
 org.apache.cassandra.thrift.CassandraDaemon.main(CassandraDaemon.java:80)
 Caused by: java.io.EOFException
 at java.io.DataInputStream.readFully(DataInputStream.java:180)
 at java.io.DataInputStream.readFully(DataInputStream.java:152)
 at 
 org.apache.cassandra.utils.ByteBufferUtil.read(ByteBufferUtil.java:394)
 at 
 org.apache.cassandra.utils.ByteBufferUtil.readWithShortLength(ByteBufferUtil.java:368)
  

[jira] [Commented] (CASSANDRA-3778) KEY IN (...) queries do not work

2012-01-27 Thread Eric Evans (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-3778?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13195384#comment-13195384
 ] 

Eric Evans commented on CASSANDRA-3778:
---

bq. I've created 
http://code.google.com/a/apache-extras.org/p/cassandra-dbapi2/issues/detail?id=14
 but it wasn't reviewed yet by any of the driver committers (hint, hint ).

committed.

bq. You're right, this is a bug. As it happens, the refactor done in 
CASSANDRA-3791 fixes that bug (among other benefits), so let's maybe just deal 
with that patch.

OK, I'll add that to my list to have a look at (if no one beats me to it).

 KEY IN (...) queries do not work
 

 Key: CASSANDRA-3778
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3778
 Project: Cassandra
  Issue Type: Sub-task
  Components: API
Affects Versions: 1.1
Reporter: Eric Evans
Assignee: Sylvain Lebresne
  Labels: cql
 Fix For: 1.1


 {{...KEY IN (...)}} queries fail due to faulty validation.  A pull request 
 for cassandra-dtest was opened that demonstrates this: 
 https://github.com/riptano/cassandra-dtest/pull/2

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Resolved] (CASSANDRA-3787) [patch] fix bad comparison of column name against * or 1

2012-01-27 Thread Dave Brosius (Resolved) (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-3787?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Dave Brosius resolved CASSANDRA-3787.
-

Resolution: Fixed

 [patch] fix bad comparison of column name against * or 1
 

 Key: CASSANDRA-3787
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3787
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Affects Versions: 1.1
Reporter: Dave Brosius
Assignee: Dave Brosius
Priority: Trivial
  Labels: cql
 Fix For: 1.1

 Attachments: bad_column_compare.diff


 code does 
 (!selectClause.get(0).equals(*)  !selectClause.get(0).equals(1)))
 which is a ColumnDefinition against a string 
 changed to
 String columnName = selectClause.get(0).toString();
 if (!columnName.equals(*)  !columnName.equals(1))

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Updated] (CASSANDRA-3804) Counter-add operation fails for cluster upgraded from 1.0 to trunk

2012-01-27 Thread Tyler Patterson (Updated) (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-3804?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Tyler Patterson updated CASSANDRA-3804:
---

Description: 
A 3-node cluster is on version 0.8.9, 1.0.6, or 1.0.7 and then one and only one 
node is taken down, upgraded to trunk, and started again. An rpc timeout 
exception happens if counter-add operations are done. It usually takes between 
1 and 500 add operations before the failure occurs. The failure seems to happen 
sooner if the coordinator node is NOT the one that was upgraded. Here is the 
error: 

{code}

==
ERROR: counter_upgrade_test.TestCounterUpgrade.counter_upgrade_test
--
Traceback (most recent call last):
  File /usr/lib/pymodules/python2.7/nose/case.py, line 187, in runTest
self.test(*self.arg)
  File /home/tahooie/cassandra-dtest/counter_upgrade_test.py, line 50, in 
counter_upgrade_test
cursor.execute(UPDATE counters SET row = row+1 where key='a')
  File /usr/local/lib/python2.7/dist-packages/cql/cursor.py, line 96, in 
execute
raise cql.OperationalError(Request did not complete within rpc_timeout.)
OperationalError: Request did not complete within rpc_timeout.

{code}

A script has been added to cassandra-dtest (counter_upgrade_test.py) to 
demonstrate the failure. The newest version of CCM is required to run the test. 
It is available here if it hasn't yet been pulled: 
g...@github.com:tpatterson/ccm.git

  was:
A 3-node cluster is on version 0.8.9, 1.0.6, or 1.0.7 and then one and only one 
node is taken down, upgraded to trunk, and started again. An rpc timeout 
exception happens if counter-add operations are done. It usually takes between 
1 and 10 add operations before the failure occurs. The failure seems to happen 
sooner if the coordinator node is NOT the one that was upgraded. Here is the 
error: 

{code}

==
ERROR: counter_upgrade_test.TestCounterUpgrade.counter_upgrade_test
--
Traceback (most recent call last):
  File /usr/lib/pymodules/python2.7/nose/case.py, line 187, in runTest
self.test(*self.arg)
  File /home/tahooie/cassandra-dtest/counter_upgrade_test.py, line 50, in 
counter_upgrade_test
cursor.execute(UPDATE counters SET row = row+1 where key='a')
  File /usr/local/lib/python2.7/dist-packages/cql/cursor.py, line 96, in 
execute
raise cql.OperationalError(Request did not complete within rpc_timeout.)
OperationalError: Request did not complete within rpc_timeout.

{code}

A script has been added to cassandra-dtest (counter_upgrade_test.py) to 
demonstrate the failure. The newest version of CCM is required to run the test. 
It is available here if it hasn't yet been pulled: 
g...@github.com:tpatterson/ccm.git


 Counter-add operation fails for cluster upgraded from 1.0 to trunk
 --

 Key: CASSANDRA-3804
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3804
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Affects Versions: 1.1
 Environment: ubuntu, cluster set up with ccm.
Reporter: Tyler Patterson

 A 3-node cluster is on version 0.8.9, 1.0.6, or 1.0.7 and then one and only 
 one node is taken down, upgraded to trunk, and started again. An rpc timeout 
 exception happens if counter-add operations are done. It usually takes 
 between 1 and 500 add operations before the failure occurs. The failure seems 
 to happen sooner if the coordinator node is NOT the one that was upgraded. 
 Here is the error: 
 {code}
 ==
 ERROR: counter_upgrade_test.TestCounterUpgrade.counter_upgrade_test
 --
 Traceback (most recent call last):
   File /usr/lib/pymodules/python2.7/nose/case.py, line 187, in runTest
 self.test(*self.arg)
   File /home/tahooie/cassandra-dtest/counter_upgrade_test.py, line 50, in 
 counter_upgrade_test
 cursor.execute(UPDATE counters SET row = row+1 where key='a')
   File /usr/local/lib/python2.7/dist-packages/cql/cursor.py, line 96, in 
 execute
 raise cql.OperationalError(Request did not complete within rpc_timeout.)
 OperationalError: Request did not complete within rpc_timeout.
 {code}
 A script has been added to cassandra-dtest (counter_upgrade_test.py) to 
 demonstrate the failure. The newest version of CCM is required to run the 
 test. It is available here if it hasn't yet been pulled: 
 g...@github.com:tpatterson/ccm.git

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA 

[jira] [Created] (CASSANDRA-3804) Counter-add operation fails for cluster upgraded from 1.0 to trunk

2012-01-27 Thread Tyler Patterson (Created) (JIRA)
Counter-add operation fails for cluster upgraded from 1.0 to trunk
--

 Key: CASSANDRA-3804
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3804
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Affects Versions: 1.1
 Environment: ubuntu, cluster set up with ccm.
Reporter: Tyler Patterson


A 3-node cluster is on version 0.8.9, 1.0.6, or 1.0.7 and then one and only one 
node is taken down, upgraded to trunk, and started again. An rpc timeout 
exception happens if counter-add operations are done. It usually takes between 
1 and 10 add operations before the failure occurs. The failure seems to happen 
sooner if the coordinator node is NOT the one that was upgraded. Here is the 
error: 

{code}

==
ERROR: counter_upgrade_test.TestCounterUpgrade.counter_upgrade_test
--
Traceback (most recent call last):
  File /usr/lib/pymodules/python2.7/nose/case.py, line 187, in runTest
self.test(*self.arg)
  File /home/tahooie/cassandra-dtest/counter_upgrade_test.py, line 50, in 
counter_upgrade_test
cursor.execute(UPDATE counters SET row = row+1 where key='a')
  File /usr/local/lib/python2.7/dist-packages/cql/cursor.py, line 96, in 
execute
raise cql.OperationalError(Request did not complete within rpc_timeout.)
OperationalError: Request did not complete within rpc_timeout.

{code}

A script has been added to cassandra-dtest (counter_upgrade_test.py) to 
demonstrate the failure. The newest version of CCM is required to run the test. 
It is available here if it hasn't yet been pulled: 
g...@github.com:tpatterson/ccm.git

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[4/5] git commit: eliminate dependency on FBUtilities

2012-01-27 Thread jbellis
eliminate dependency on FBUtilities

Patch by eevans; reviewed by Dave Brosius for CASSANDRA-3665


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/89ed0b6e
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/89ed0b6e
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/89ed0b6e

Branch: refs/heads/trunk
Commit: 89ed0b6ecdde8a7fd64f2139c02223ae4c040e8c
Parents: 32075c4
Author: Eric Evans eev...@apache.org
Authored: Thu Jan 26 16:04:11 2012 -0600
Committer: Eric Evans eev...@apache.org
Committed: Fri Jan 27 13:53:07 2012 -0600

--
 src/java/org/apache/cassandra/utils/UUIDGen.java |   39 -
 1 files changed, 37 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/89ed0b6e/src/java/org/apache/cassandra/utils/UUIDGen.java
--
diff --git a/src/java/org/apache/cassandra/utils/UUIDGen.java 
b/src/java/org/apache/cassandra/utils/UUIDGen.java
index f1969fe..75828f0 100644
--- a/src/java/org/apache/cassandra/utils/UUIDGen.java
+++ b/src/java/org/apache/cassandra/utils/UUIDGen.java
@@ -23,6 +23,8 @@ package org.apache.cassandra.utils;
 import java.io.*;
 import java.net.InetAddress;
 import java.nio.ByteBuffer;
+import java.security.MessageDigest;
+import java.security.NoSuchAlgorithmException;
 import java.util.HashMap;
 import java.util.Map;
 import java.util.Random;
@@ -42,7 +44,31 @@ public class UUIDGen
 
 private long lastNanos;
 private final MapInetAddress, Long nodeCache = new HashMapInetAddress, 
Long();
-
+
+private static final ThreadLocalMessageDigest localMD5Digest = new 
ThreadLocalMessageDigest()
+{
+@Override
+protected MessageDigest initialValue()
+{
+try
+{
+return MessageDigest.getInstance(MD5);
+}
+catch (NoSuchAlgorithmException nsae)
+{
+throw new RuntimeException(MD5 digest algorithm is not 
available, nsae);
+}
+}
+
+@Override
+public MessageDigest get()
+{
+MessageDigest digest = super.get();
+digest.reset();
+return digest;
+}
+};
+
 private UUIDGen()
 {
 // make sure someone didn't whack the clock by changing the order of 
instantiation.
@@ -195,7 +221,7 @@ public class UUIDGen
 return nodeCache.get(addr);
 
 // ideally, we'd use the MAC address, but java doesn't expose that.
-byte[] hash = 
FBUtilities.hash(ByteBuffer.wrap(addr.toString().getBytes()));
+byte[] hash = hash(addr.toString());
 long node = 0;
 for (int i = 0; i  Math.min(6, hash.length); i++)
 node |= (0x00ff  (long)hash[i])  (5-i)*8;
@@ -205,6 +231,15 @@ public class UUIDGen
 
 return node;
 }
+
+private static byte[] hash(String... data)
+{
+MessageDigest messageDigest = localMD5Digest.get();
+for(String block : data)
+messageDigest.update(block.getBytes());
+
+return messageDigest.digest();
+}
 }
 
 // for the curious, here is how I generated START_EPOCH



[5/5] git commit: test to expose missing dependencies

2012-01-27 Thread jbellis
test to expose missing dependencies

Patch by eevans; reviewed by Dave Brosius for CASSANDRA-3665


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/32075c4a
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/32075c4a
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/32075c4a

Branch: refs/heads/trunk
Commit: 32075c4aecf06bf28cc415ea5ae3fa3cbc805983
Parents: 2a1ec27
Author: Eric Evans eev...@apache.org
Authored: Thu Jan 26 16:02:34 2012 -0600
Committer: Eric Evans eev...@apache.org
Committed: Fri Jan 27 13:52:33 2012 -0600

--
 build.xml  |   25 
 .../apache/cassandra/cql/jdbc/ClientUtilsTest.java |   48 +++
 2 files changed, 73 insertions(+), 0 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/32075c4a/build.xml
--
diff --git a/build.xml b/build.xml
index 7169ff0..07a8af6 100644
--- a/build.xml
+++ b/build.xml
@@ -1038,6 +1038,31 @@ url=${svn.entry.url}?pathrev=${svn.entry.commit.revision}
 /sequential
   /macrodef
 
+  !--
+This test target is a bit different.  It's purpose is to exercise the
+clientutil jar in order to expose any new dependencies.  For that
+reason we use the classes from the jar, and a carefully constructed
+classpath which only contains what we expect users to need.
+  --
+  target name=test-clientutil-jar depends=build-test,jar 
description=Test clientutil jar
+junit
+  test name=org.apache.cassandra.cql.jdbc.ClientUtilsTest /
+  formatter type=brief usefile=false /
+  classpath
+pathelement location=${test.classes} /
+pathelement 
location=${build.dir}/${ant.project.name}-clientutil-${version}.jar /
+
+fileset dir=${build.dir.lib}
+  include name=**/junit*.jar /
+/fileset
+fileset dir=${build.lib}
+  include name=**/guava*.jar /
+  include name=**/commons-lang*.jar /
+/fileset
+  /classpath
+/junit
+  /target
+
   target name=test depends=build-test description=Execute unit tests
 testmacro suitename=unit inputdir=${test.unit.src} timeout=6
   jvmarg value=-Dlegacy-sstable-root=${test.data}/legacy-sstables/

http://git-wip-us.apache.org/repos/asf/cassandra/blob/32075c4a/test/unit/org/apache/cassandra/cql/jdbc/ClientUtilsTest.java
--
diff --git a/test/unit/org/apache/cassandra/cql/jdbc/ClientUtilsTest.java 
b/test/unit/org/apache/cassandra/cql/jdbc/ClientUtilsTest.java
new file mode 100644
index 000..c98b1d9
--- /dev/null
+++ b/test/unit/org/apache/cassandra/cql/jdbc/ClientUtilsTest.java
@@ -0,0 +1,48 @@
+package org.apache.cassandra.cql.jdbc;
+
+import java.math.BigDecimal;
+import java.math.BigInteger;
+import java.net.InetAddress;
+import java.net.UnknownHostException;
+import java.nio.ByteBuffer;
+import java.sql.Date;
+import java.util.UUID;
+
+import org.apache.cassandra.utils.UUIDGen;
+import org.junit.Test;
+
+public class ClientUtilsTest
+{
+/** Exercises the classes in the clientutil jar to expose missing 
dependencies. */
+@Test
+public void test() throws UnknownHostException
+{
+JdbcAscii.instance.compose(JdbcAscii.instance.decompose(string));
+JdbcBoolean.instance.compose(JdbcBoolean.instance.decompose(true));
+
JdbcBytes.instance.compose(JdbcBytes.instance.decompose(ByteBuffer.wrap(string.getBytes(;
+JdbcDate.instance.compose(JdbcDate.instance.decompose(new 
Date(System.currentTimeMillis(;
+JdbcDecimal.instance.compose(JdbcDecimal.instance.decompose(new 
BigDecimal(1)));
+JdbcDouble.instance.compose(JdbcDouble.instance.decompose(new 
Double(1.0d)));
+JdbcFloat.instance.compose(JdbcFloat.instance.decompose(new 
Float(1.0f)));
+JdbcInt32.instance.compose(JdbcInt32.instance.decompose(1));
+JdbcInteger.instance.compose(JdbcInteger.instance.decompose(new 
BigInteger(1)));
+JdbcLong.instance.compose(JdbcLong.instance.decompose(1L));
+JdbcUTF8.instance.compose(JdbcUTF8.instance.decompose(string));
+
+// UUIDGen
+UUID uuid = UUIDGen.makeType1UUIDFromHost(InetAddress.getLocalHost());
+JdbcTimeUUID.instance.compose(JdbcTimeUUID.instance.decompose(uuid));
+JdbcUUID.instance.compose(JdbcUUID.instance.decompose(uuid));
+
JdbcLexicalUUID.instance.compose(JdbcLexicalUUID.instance.decompose(uuid));
+
+// Raise a MarshalException
+try
+{
+
JdbcLexicalUUID.instance.getString(ByteBuffer.wrap(notauuid.getBytes()));
+}
+catch (MarshalException me)
+{
+// Success
+}
+}
+}



[2/5] git commit: synchronize BiMap of bootstrapping tokens patch by Peter Schuller and jbellis for CASSANDRA-3417

2012-01-27 Thread jbellis
synchronize BiMap of bootstrapping tokens
patch by Peter Schuller and jbellis for CASSANDRA-3417


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/b10d5bd7
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/b10d5bd7
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/b10d5bd7

Branch: refs/heads/cassandra-1.0
Commit: b10d5bd705fbbf07c567f61b2d6f68a4c8d22b0b
Parents: 89ed0b6
Author: Jonathan Ellis jbel...@apache.org
Authored: Fri Jan 27 22:21:57 2012 -0600
Committer: Jonathan Ellis jbel...@apache.org
Committed: Fri Jan 27 22:21:57 2012 -0600

--
 CHANGES.txt|2 +-
 .../apache/cassandra/locator/TokenMetadata.java|   41 ++
 .../apache/cassandra/service/StorageService.java   |   15 +++--
 3 files changed, 39 insertions(+), 19 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/b10d5bd7/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 7faf97f..db24da4 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -8,6 +8,7 @@
  * (cqlsh) add DESCRIBE COLUMNFAMILIES (CASSANDRA-3586)
  * (cqlsh) format blobs correctly and use colors to improve output
readability (CASSANDRA-3726)
+ * synchronize BiMap of bootstrapping tokens (CASSANDRA-3417)
 
 
 1.0.7
@@ -156,7 +157,6 @@ Merged from 0.8:
  * cleanup usage of StorageService.setMode() (CASANDRA-3388)
  * Add timing information to cassandra-cli GET/SET/LIST queries 
(CASSANDRA-3326)
  * Only create one CompressionMetadata object per sstable (CASSANDRA-3427)
- * synchronize BiMap of bootstrapping tokens (CASSANDRA-3417)
  * Avoid large array allocation for compressed chunk offsets (CASSANDRA-3432)
  * fix DecimalType bytebuffer marshalling (CASSANDRA-3421)
  * fix bug that caused first column in per row indexes to be ignored 

http://git-wip-us.apache.org/repos/asf/cassandra/blob/b10d5bd7/src/java/org/apache/cassandra/locator/TokenMetadata.java
--
diff --git a/src/java/org/apache/cassandra/locator/TokenMetadata.java 
b/src/java/org/apache/cassandra/locator/TokenMetadata.java
index b648656..ebb094b 100644
--- a/src/java/org/apache/cassandra/locator/TokenMetadata.java
+++ b/src/java/org/apache/cassandra/locator/TokenMetadata.java
@@ -109,9 +109,12 @@ public class TokenMetadata
 {
 int n = 0;
 Range sourceRange = getPrimaryRangeFor(getToken(source));
-for (Token token : bootstrapTokens.keySet())
-if (sourceRange.contains(token))
-n++;
+synchronized (bootstrapTokens)
+{
+for (Token token : bootstrapTokens.keySet())
+if (sourceRange.contains(token))
+n++;
+}
 return n;
 }
 
@@ -606,14 +609,17 @@ public class TokenMetadata
 }
 }
 
-if (!bootstrapTokens.isEmpty())
+synchronized (bootstrapTokens)
 {
-sb.append(Bootstrapping Tokens: );
-sb.append(System.getProperty(line.separator));
-for (Map.EntryToken, InetAddress entry : 
bootstrapTokens.entrySet())
+if (!bootstrapTokens.isEmpty())
 {
-sb.append(entry.getValue() + : + entry.getKey());
+sb.append(Bootstrapping Tokens: );
 sb.append(System.getProperty(line.separator));
+for (Map.EntryToken, InetAddress entry : 
bootstrapTokens.entrySet())
+{
+sb.append(entry.getValue() + : + entry.getKey());
+sb.append(System.getProperty(line.separator));
+}
 }
 }
 
@@ -711,9 +717,20 @@ public class TokenMetadata
  */
 public MapToken, InetAddress getTokenToEndpointMap()
 {
-MapToken, InetAddress map = new HashMapToken, 
InetAddress(tokenToEndpointMap.size() + bootstrapTokens.size());
-map.putAll(tokenToEndpointMap);
-map.putAll(bootstrapTokens);
-return map;
+lock.readLock().lock();
+try
+{
+MapToken, InetAddress map = new HashMapToken, 
InetAddress(tokenToEndpointMap.size() + bootstrapTokens.size());
+map.putAll(tokenToEndpointMap);
+synchronized (bootstrapTokens)
+{
+map.putAll(bootstrapTokens);
+}
+return map;
+}
+finally
+{
+lock.readLock().unlock();
+}
 }
 }

http://git-wip-us.apache.org/repos/asf/cassandra/blob/b10d5bd7/src/java/org/apache/cassandra/service/StorageService.java

[3/5] git commit: synchronize BiMap of bootstrapping tokens patch by Peter Schuller and jbellis for CASSANDRA-3417

2012-01-27 Thread jbellis
synchronize BiMap of bootstrapping tokens
patch by Peter Schuller and jbellis for CASSANDRA-3417


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/b10d5bd7
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/b10d5bd7
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/b10d5bd7

Branch: refs/heads/trunk
Commit: b10d5bd705fbbf07c567f61b2d6f68a4c8d22b0b
Parents: 89ed0b6
Author: Jonathan Ellis jbel...@apache.org
Authored: Fri Jan 27 22:21:57 2012 -0600
Committer: Jonathan Ellis jbel...@apache.org
Committed: Fri Jan 27 22:21:57 2012 -0600

--
 CHANGES.txt|2 +-
 .../apache/cassandra/locator/TokenMetadata.java|   41 ++
 .../apache/cassandra/service/StorageService.java   |   15 +++--
 3 files changed, 39 insertions(+), 19 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/b10d5bd7/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 7faf97f..db24da4 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -8,6 +8,7 @@
  * (cqlsh) add DESCRIBE COLUMNFAMILIES (CASSANDRA-3586)
  * (cqlsh) format blobs correctly and use colors to improve output
readability (CASSANDRA-3726)
+ * synchronize BiMap of bootstrapping tokens (CASSANDRA-3417)
 
 
 1.0.7
@@ -156,7 +157,6 @@ Merged from 0.8:
  * cleanup usage of StorageService.setMode() (CASANDRA-3388)
  * Add timing information to cassandra-cli GET/SET/LIST queries 
(CASSANDRA-3326)
  * Only create one CompressionMetadata object per sstable (CASSANDRA-3427)
- * synchronize BiMap of bootstrapping tokens (CASSANDRA-3417)
  * Avoid large array allocation for compressed chunk offsets (CASSANDRA-3432)
  * fix DecimalType bytebuffer marshalling (CASSANDRA-3421)
  * fix bug that caused first column in per row indexes to be ignored 

http://git-wip-us.apache.org/repos/asf/cassandra/blob/b10d5bd7/src/java/org/apache/cassandra/locator/TokenMetadata.java
--
diff --git a/src/java/org/apache/cassandra/locator/TokenMetadata.java 
b/src/java/org/apache/cassandra/locator/TokenMetadata.java
index b648656..ebb094b 100644
--- a/src/java/org/apache/cassandra/locator/TokenMetadata.java
+++ b/src/java/org/apache/cassandra/locator/TokenMetadata.java
@@ -109,9 +109,12 @@ public class TokenMetadata
 {
 int n = 0;
 Range sourceRange = getPrimaryRangeFor(getToken(source));
-for (Token token : bootstrapTokens.keySet())
-if (sourceRange.contains(token))
-n++;
+synchronized (bootstrapTokens)
+{
+for (Token token : bootstrapTokens.keySet())
+if (sourceRange.contains(token))
+n++;
+}
 return n;
 }
 
@@ -606,14 +609,17 @@ public class TokenMetadata
 }
 }
 
-if (!bootstrapTokens.isEmpty())
+synchronized (bootstrapTokens)
 {
-sb.append(Bootstrapping Tokens: );
-sb.append(System.getProperty(line.separator));
-for (Map.EntryToken, InetAddress entry : 
bootstrapTokens.entrySet())
+if (!bootstrapTokens.isEmpty())
 {
-sb.append(entry.getValue() + : + entry.getKey());
+sb.append(Bootstrapping Tokens: );
 sb.append(System.getProperty(line.separator));
+for (Map.EntryToken, InetAddress entry : 
bootstrapTokens.entrySet())
+{
+sb.append(entry.getValue() + : + entry.getKey());
+sb.append(System.getProperty(line.separator));
+}
 }
 }
 
@@ -711,9 +717,20 @@ public class TokenMetadata
  */
 public MapToken, InetAddress getTokenToEndpointMap()
 {
-MapToken, InetAddress map = new HashMapToken, 
InetAddress(tokenToEndpointMap.size() + bootstrapTokens.size());
-map.putAll(tokenToEndpointMap);
-map.putAll(bootstrapTokens);
-return map;
+lock.readLock().lock();
+try
+{
+MapToken, InetAddress map = new HashMapToken, 
InetAddress(tokenToEndpointMap.size() + bootstrapTokens.size());
+map.putAll(tokenToEndpointMap);
+synchronized (bootstrapTokens)
+{
+map.putAll(bootstrapTokens);
+}
+return map;
+}
+finally
+{
+lock.readLock().unlock();
+}
 }
 }

http://git-wip-us.apache.org/repos/asf/cassandra/blob/b10d5bd7/src/java/org/apache/cassandra/service/StorageService.java

[1/5] git commit: merge from 1.0

2012-01-27 Thread jbellis
Updated Branches:
  refs/heads/cassandra-1.0 89ed0b6ec - b10d5bd70
  refs/heads/trunk 73f7104cd - aa20c7206


merge from 1.0


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/aa20c720
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/aa20c720
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/aa20c720

Branch: refs/heads/trunk
Commit: aa20c7206cdc1efc1983466de05c224eccac1084
Parents: 73f7104 b10d5bd
Author: Jonathan Ellis jbel...@apache.org
Authored: Fri Jan 27 22:27:49 2012 -0600
Committer: Jonathan Ellis jbel...@apache.org
Committed: Fri Jan 27 22:27:49 2012 -0600

--
 CHANGES.txt|2 +-
 build.xml  |   25 
 .../apache/cassandra/locator/TokenMetadata.java|   41 +
 .../apache/cassandra/service/StorageService.java   |   14 +++--
 src/java/org/apache/cassandra/utils/UUIDGen.java   |   39 +++-
 .../apache/cassandra/cql/jdbc/ClientUtilsTest.java |   48 +++
 6 files changed, 148 insertions(+), 21 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/aa20c720/CHANGES.txt
--
diff --cc CHANGES.txt
index 8f62ab3,db24da4..df4b030
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -217,10 -154,9 +218,9 @@@ Merged from 0.8
  
  1.0.2
   * defragment rows for name-based queries under STCS (CASSANDRA-2503)
 - * cleanup usage of StorageService.setMode() (CASANDRA-3388)
   * Add timing information to cassandra-cli GET/SET/LIST queries 
(CASSANDRA-3326)
   * Only create one CompressionMetadata object per sstable (CASSANDRA-3427)
 + * cleanup usage of StorageService.setMode() (CASANDRA-3388)
-  * synchronize BiMap of bootstrapping tokens (CASSANDRA-3417)
   * Avoid large array allocation for compressed chunk offsets (CASSANDRA-3432)
   * fix DecimalType bytebuffer marshalling (CASSANDRA-3421)
   * fix bug that caused first column in per row indexes to be ignored 

http://git-wip-us.apache.org/repos/asf/cassandra/blob/aa20c720/build.xml
--

http://git-wip-us.apache.org/repos/asf/cassandra/blob/aa20c720/src/java/org/apache/cassandra/locator/TokenMetadata.java
--
diff --cc src/java/org/apache/cassandra/locator/TokenMetadata.java
index 6d6f009,ebb094b..bf8e190
--- a/src/java/org/apache/cassandra/locator/TokenMetadata.java
+++ b/src/java/org/apache/cassandra/locator/TokenMetadata.java
@@@ -108,10 -108,13 +108,13 @@@ public class TokenMetadat
  public int pendingRangeChanges(InetAddress source)
  {
  int n = 0;
 -Range sourceRange = getPrimaryRangeFor(getToken(source));
 +RangeToken sourceRange = getPrimaryRangeFor(getToken(source));
- for (Token token : bootstrapTokens.keySet())
- if (sourceRange.contains(token))
- n++;
+ synchronized (bootstrapTokens)
+ {
+ for (Token token : bootstrapTokens.keySet())
+ if (sourceRange.contains(token))
+ n++;
+ }
  return n;
  }
  

http://git-wip-us.apache.org/repos/asf/cassandra/blob/aa20c720/src/java/org/apache/cassandra/service/StorageService.java
--
diff --cc src/java/org/apache/cassandra/service/StorageService.java
index 975b729,9f60e58..4cf17c2
--- a/src/java/org/apache/cassandra/service/StorageService.java
+++ b/src/java/org/apache/cassandra/service/StorageService.java
@@@ -1295,14 -1252,17 +1295,16 @@@ public class StorageService implements 
  
  // For each of the bootstrapping nodes, simply add and remove them 
one by one to
  // allLeftMetadata and check in between what their ranges would be.
- for (Map.EntryToken, InetAddress entry : bootstrapTokens.entrySet())
+ synchronized (bootstrapTokens)
  {
- InetAddress endpoint = entry.getValue();
+ for (Map.EntryToken, InetAddress entry : 
bootstrapTokens.entrySet())
+ {
+ InetAddress endpoint = entry.getValue();
  
- allLeftMetadata.updateNormalToken(entry.getKey(), endpoint);
- for (RangeToken range : 
strategy.getAddressRanges(allLeftMetadata).get(endpoint))
- pendingRanges.put(range, endpoint);
- allLeftMetadata.removeEndpoint(endpoint);
+ allLeftMetadata.updateNormalToken(entry.getKey(), endpoint);
 -for (Range range : 
strategy.getAddressRanges(allLeftMetadata).get(endpoint))
++for (RangeToken range : 
strategy.getAddressRanges(allLeftMetadata).get(endpoint))
+   

[jira] [Updated] (CASSANDRA-3804) Counter-add operation fails for cluster upgraded from 1.0 to trunk

2012-01-27 Thread Jonathan Ellis (Updated) (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-3804?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jonathan Ellis updated CASSANDRA-3804:
--

Fix Version/s: 1.1
 Assignee: Sylvain Lebresne

 Counter-add operation fails for cluster upgraded from 1.0 to trunk
 --

 Key: CASSANDRA-3804
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3804
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Affects Versions: 1.1
 Environment: ubuntu, cluster set up with ccm.
Reporter: Tyler Patterson
Assignee: Sylvain Lebresne
 Fix For: 1.1


 A 3-node cluster is on version 0.8.9, 1.0.6, or 1.0.7 and then one and only 
 one node is taken down, upgraded to trunk, and started again. An rpc timeout 
 exception happens if counter-add operations are done. It usually takes 
 between 1 and 500 add operations before the failure occurs. The failure seems 
 to happen sooner if the coordinator node is NOT the one that was upgraded. 
 Here is the error: 
 {code}
 ==
 ERROR: counter_upgrade_test.TestCounterUpgrade.counter_upgrade_test
 --
 Traceback (most recent call last):
   File /usr/lib/pymodules/python2.7/nose/case.py, line 187, in runTest
 self.test(*self.arg)
   File /home/tahooie/cassandra-dtest/counter_upgrade_test.py, line 50, in 
 counter_upgrade_test
 cursor.execute(UPDATE counters SET row = row+1 where key='a')
   File /usr/local/lib/python2.7/dist-packages/cql/cursor.py, line 96, in 
 execute
 raise cql.OperationalError(Request did not complete within rpc_timeout.)
 OperationalError: Request did not complete within rpc_timeout.
 {code}
 A script has been added to cassandra-dtest (counter_upgrade_test.py) to 
 demonstrate the failure. The newest version of CCM is required to run the 
 test. It is available here if it hasn't yet been pulled: 
 g...@github.com:tpatterson/ccm.git

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Updated] (CASSANDRA-3805) [patch] use collection interfaces in method signatures where possible

2012-01-27 Thread Dave Brosius (Updated) (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-3805?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Dave Brosius updated CASSANDRA-3805:


Attachment: use_interfaces.diff

 [patch] use collection interfaces in method signatures where possible
 -

 Key: CASSANDRA-3805
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3805
 Project: Cassandra
  Issue Type: Improvement
  Components: Core
Reporter: Dave Brosius
Priority: Trivial
 Attachments: use_interfaces.diff


 Some methods are declared to return or take concrete collection classes when 
 they don't need that specificity. Converted to collection interfaces, to 
 reduce cohesion.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Created] (CASSANDRA-3805) [patch] use collection interfaces in method signatures where possible

2012-01-27 Thread Dave Brosius (Created) (JIRA)
[patch] use collection interfaces in method signatures where possible
-

 Key: CASSANDRA-3805
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3805
 Project: Cassandra
  Issue Type: Improvement
  Components: Core
Reporter: Dave Brosius
Priority: Trivial
 Attachments: use_interfaces.diff

Some methods are declared to return or take concrete collection classes when 
they don't need that specificity. Converted to collection interfaces, to reduce 
cohesion.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (CASSANDRA-3805) [patch] use collection interfaces in method signatures where possible

2012-01-27 Thread Jonathan Ellis (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-3805?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13195423#comment-13195423
 ] 

Jonathan Ellis commented on CASSANDRA-3805:
---

A couple thoughts after glancing at it:

- careful with the import reordering -- 
http://wiki.apache.org/cassandra/CodeStyle
- In some places we want to be clear we're using an ArrayList to be clear that 
get(int) is efficient
- May be similar reasoning for HashMap (which requires only hashCode 
definition; other Maps require Comparable)
- If we're cleaning up Y x = new Y() declarations, should we modernize to 
guava's Maps.newHashMap et al?

 [patch] use collection interfaces in method signatures where possible
 -

 Key: CASSANDRA-3805
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3805
 Project: Cassandra
  Issue Type: Improvement
  Components: Core
Reporter: Dave Brosius
Priority: Trivial
 Attachments: use_interfaces.diff


 Some methods are declared to return or take concrete collection classes when 
 they don't need that specificity. Converted to collection interfaces, to 
 reduce cohesion.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Updated] (CASSANDRA-3483) Support bringing up a new datacenter to existing cluster without repair

2012-01-27 Thread Peter Schuller (Updated) (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-3483?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Peter Schuller updated CASSANDRA-3483:
--

Attachment: CASSANDRA-3483-trunk-rebase2.txt

I do. I'm sorry for the delay, this has been nagging me for quite some time. 
It's not forgotten, I have just been inundated with urgent stuff to do.

I'm attaching a fresh rebase against current trunk and I hope to submit an 
improved version later tonight (keyword being hope).

 Support bringing up a new datacenter to existing cluster without repair
 ---

 Key: CASSANDRA-3483
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3483
 Project: Cassandra
  Issue Type: Bug
Affects Versions: 1.0.2
Reporter: Chris Goffinet
Assignee: Peter Schuller
 Attachments: CASSANDRA-3483-0.8-prelim.txt, CASSANDRA-3483-1.0.txt, 
 CASSANDRA-3483-trunk-noredesign.txt, CASSANDRA-3483-trunk-rebase2.txt


 Was talking to Brandon in irc, and we ran into a case where we want to bring 
 up a new DC to an existing cluster. He suggested from jbellis the way to do 
 it currently was set strategy options of dc2:0, then add the nodes. After the 
 nodes are up, change the RF of dc2, and run repair. 
 I'd like to avoid a repair as it runs AES and is a bit more intense than how 
 bootstrap works currently by just streaming ranges from the SSTables. Would 
 it be possible to improve this functionality (adding a new DC to existing 
 cluster) than the proposed method? We'd be happy to do a patch if we got some 
 input on the best way to go about it.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Created] (CASSANDRA-3806) merge from 1.0 (aa20c7206cdc1efc1983466de05c224eccac1084) breaks build

2012-01-27 Thread Peter Schuller (Created) (JIRA)
merge from 1.0 (aa20c7206cdc1efc1983466de05c224eccac1084) breaks build
--

 Key: CASSANDRA-3806
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3806
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Reporter: Peter Schuller
Assignee: Peter Schuller


{code}
build-project:
 [echo] apache-cassandra: /tmp/cas/cassandra/build.xml
[javac] Compiling 40 source files to /tmp/cas/cassandra/build/classes/thrift
[javac] Note: Some input files use unchecked or unsafe operations.
[javac] Note: Recompile with -Xlint:unchecked for details.
[javac] Compiling 296 source files to /tmp/cas/cassandra/build/classes/main
[javac] StorageService.java:1343: illegal start of expression
[javac] private MultimapInetAddress, RangeToken 
getNewSourceRanges(String table, SetRangeToken ranges)
[javac] ^
[javac] StorageService.java:1343: ';' expected
[javac] private MultimapInetAddress, RangeToken 
getNewSourceRanges(String table, SetRangeToken ranges)
[javac]   ^
[javac] StorageService.java:1343: ';' expected
[javac] private MultimapInetAddress, RangeToken 
getNewSourceRanges(String table, SetRangeToken ranges)
[javac] 
^
[javac] StorageService.java:1343: illegal start of expression
[javac] private MultimapInetAddress, RangeToken 
getNewSourceRanges(String table, SetRangeToken ranges)
[javac] 
   ^
[javac] StorageService.java:1343: illegal start of expression
[javac] private MultimapInetAddress, RangeToken 
getNewSourceRanges(String table, SetRangeToken ranges)
[javac] 
 ^
[javac] StorageService.java:1343: ';' expected
[javac] private MultimapInetAddress, RangeToken 
getNewSourceRanges(String table, SetRangeToken ranges)
[javac] 
  ^
[javac] 6 errors
{code}


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Updated] (CASSANDRA-3806) merge from 1.0 (aa20c7206cdc1efc1983466de05c224eccac1084) breaks build

2012-01-27 Thread Peter Schuller (Updated) (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-3806?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Peter Schuller updated CASSANDRA-3806:
--

Attachment: CASSANDRA-3806.txt

Trivial patch attached.

 merge from 1.0 (aa20c7206cdc1efc1983466de05c224eccac1084) breaks build
 --

 Key: CASSANDRA-3806
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3806
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Reporter: Peter Schuller
Assignee: Peter Schuller
 Attachments: CASSANDRA-3806.txt


 {code}
 build-project:
  [echo] apache-cassandra: /tmp/cas/cassandra/build.xml
 [javac] Compiling 40 source files to 
 /tmp/cas/cassandra/build/classes/thrift
 [javac] Note: Some input files use unchecked or unsafe operations.
 [javac] Note: Recompile with -Xlint:unchecked for details.
 [javac] Compiling 296 source files to 
 /tmp/cas/cassandra/build/classes/main
 [javac] StorageService.java:1343: illegal start of expression
 [javac] private MultimapInetAddress, RangeToken 
 getNewSourceRanges(String table, SetRangeToken ranges)
 [javac] ^
 [javac] StorageService.java:1343: ';' expected
 [javac] private MultimapInetAddress, RangeToken 
 getNewSourceRanges(String table, SetRangeToken ranges)
 [javac]   
 ^
 [javac] StorageService.java:1343: ';' expected
 [javac] private MultimapInetAddress, RangeToken 
 getNewSourceRanges(String table, SetRangeToken ranges)
 [javac]   
   ^
 [javac] StorageService.java:1343: illegal start of expression
 [javac] private MultimapInetAddress, RangeToken 
 getNewSourceRanges(String table, SetRangeToken ranges)
 [javac]   
  ^
 [javac] StorageService.java:1343: illegal start of expression
 [javac] private MultimapInetAddress, RangeToken 
 getNewSourceRanges(String table, SetRangeToken ranges)
 [javac]   
^
 [javac] StorageService.java:1343: ';' expected
 [javac] private MultimapInetAddress, RangeToken 
 getNewSourceRanges(String table, SetRangeToken ranges)
 [javac]   
 ^
 [javac] 6 errors
 {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (CASSANDRA-3483) Support bringing up a new datacenter to existing cluster without repair

2012-01-27 Thread Peter Schuller (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-3483?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13195448#comment-13195448
 ] 

Peter Schuller commented on CASSANDRA-3483:
---

(It also contains the addition of a brace from CASSANDRA-3806; this is 
intentional to avoid pain.) 

 Support bringing up a new datacenter to existing cluster without repair
 ---

 Key: CASSANDRA-3483
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3483
 Project: Cassandra
  Issue Type: Bug
Affects Versions: 1.0.2
Reporter: Chris Goffinet
Assignee: Peter Schuller
 Attachments: CASSANDRA-3483-0.8-prelim.txt, CASSANDRA-3483-1.0.txt, 
 CASSANDRA-3483-trunk-noredesign.txt, CASSANDRA-3483-trunk-rebase2.txt, 
 CASSANDRA-3483-trunk-refactored-v1.txt


 Was talking to Brandon in irc, and we ran into a case where we want to bring 
 up a new DC to an existing cluster. He suggested from jbellis the way to do 
 it currently was set strategy options of dc2:0, then add the nodes. After the 
 nodes are up, change the RF of dc2, and run repair. 
 I'd like to avoid a repair as it runs AES and is a bit more intense than how 
 bootstrap works currently by just streaming ranges from the SSTables. Would 
 it be possible to improve this functionality (adding a new DC to existing 
 cluster) than the proposed method? We'd be happy to do a patch if we got some 
 input on the best way to go about it.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Updated] (CASSANDRA-3483) Support bringing up a new datacenter to existing cluster without repair

2012-01-27 Thread Peter Schuller (Updated) (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-3483?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Peter Schuller updated CASSANDRA-3483:
--

Attachment: CASSANDRA-3483-trunk-refactored-v1.txt

{{CASSANDRA\-3483\-trunk\-refactored\-v1.txt}} addresses the duplication 
between BootStrapper and RangeStreamer.

Next patch will address rebuild/getworkmap duplication.


 Support bringing up a new datacenter to existing cluster without repair
 ---

 Key: CASSANDRA-3483
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3483
 Project: Cassandra
  Issue Type: Bug
Affects Versions: 1.0.2
Reporter: Chris Goffinet
Assignee: Peter Schuller
 Attachments: CASSANDRA-3483-0.8-prelim.txt, CASSANDRA-3483-1.0.txt, 
 CASSANDRA-3483-trunk-noredesign.txt, CASSANDRA-3483-trunk-rebase2.txt, 
 CASSANDRA-3483-trunk-refactored-v1.txt


 Was talking to Brandon in irc, and we ran into a case where we want to bring 
 up a new DC to an existing cluster. He suggested from jbellis the way to do 
 it currently was set strategy options of dc2:0, then add the nodes. After the 
 nodes are up, change the RF of dc2, and run repair. 
 I'd like to avoid a repair as it runs AES and is a bit more intense than how 
 bootstrap works currently by just streaming ranges from the SSTables. Would 
 it be possible to improve this functionality (adding a new DC to existing 
 cluster) than the proposed method? We'd be happy to do a patch if we got some 
 input on the best way to go about it.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (CASSANDRA-3483) Support bringing up a new datacenter to existing cluster without repair

2012-01-27 Thread Peter Schuller (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-3483?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13195449#comment-13195449
 ] 

Peter Schuller commented on CASSANDRA-3483:
---

I borked the unit test, will address that too.

 Support bringing up a new datacenter to existing cluster without repair
 ---

 Key: CASSANDRA-3483
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3483
 Project: Cassandra
  Issue Type: Bug
Affects Versions: 1.0.2
Reporter: Chris Goffinet
Assignee: Peter Schuller
 Attachments: CASSANDRA-3483-0.8-prelim.txt, CASSANDRA-3483-1.0.txt, 
 CASSANDRA-3483-trunk-noredesign.txt, CASSANDRA-3483-trunk-rebase2.txt, 
 CASSANDRA-3483-trunk-refactored-v1.txt


 Was talking to Brandon in irc, and we ran into a case where we want to bring 
 up a new DC to an existing cluster. He suggested from jbellis the way to do 
 it currently was set strategy options of dc2:0, then add the nodes. After the 
 nodes are up, change the RF of dc2, and run repair. 
 I'd like to avoid a repair as it runs AES and is a bit more intense than how 
 bootstrap works currently by just streaming ranges from the SSTables. Would 
 it be possible to improve this functionality (adding a new DC to existing 
 cluster) than the proposed method? We'd be happy to do a patch if we got some 
 input on the best way to go about it.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (CASSANDRA-3807) bootstrap can silently fail if sources are down for one or more ranges

2012-01-27 Thread Peter Schuller (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-3807?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13195450#comment-13195450
 ] 

Peter Schuller commented on CASSANDRA-3807:
---

Correction, I'll just build it into the 3483 patch.

 bootstrap can silently fail if sources are down for one or more ranges
 --

 Key: CASSANDRA-3807
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3807
 Project: Cassandra
  Issue Type: Bug
Reporter: Peter Schuller
Assignee: Peter Schuller
Priority: Critical

 Assigning to me, will submit patch after CASSANDRA-3483.
 The silent failure is not new; been like that since forever (well, at least 
 0.8). The result is that the node goes up in the ring and starts serving 
 inconsistent reads.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira