[jira] [Updated] (CASSANDRA-7694) Expected Compaction Interruption is logged as ERROR

2014-08-07 Thread Marcus Eriksson (JIRA)

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

Marcus Eriksson updated CASSANDRA-7694:
---

Attachment: 0001-dont-call-super-in-afterExecute.patch

the exception gets logged as ERROR since we call super.afterExecute first in 
CE.afterExecute

attaching patch to remove the super call, looks like we cover all things done 
in DTPE.afterExecute in CE.afterExecute

 Expected Compaction Interruption is logged as ERROR
 ---

 Key: CASSANDRA-7694
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7694
 Project: Cassandra
  Issue Type: Bug
  Components: Core
 Environment: OSX and Ubuntu 14.04
Reporter: Philip Thompson
Assignee: Marcus Eriksson
Priority: Minor
 Fix For: 2.1.1

 Attachments: 0001-dont-call-super-in-afterExecute.patch, 
 compaction_error.log


 As seen in the attached log, occasionally a major compaction will interrupt 
 other running compactions. This is not an error and is expected behavior. 
 However this is logged at ERROR. 



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Commented] (CASSANDRA-7395) Support for pure user-defined functions (UDF)

2014-08-07 Thread Sylvain Lebresne (JIRA)

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

Sylvain Lebresne commented on CASSANDRA-7395:
-

bq. Go ahead and start native_protocol_v4.spec. Function stuff can be v4-only.

Actually, I'd rather left that to a separate ticket if you don't mind: starting 
a v4 protocol right now feels a tad premature, I'd rather stick to listing the 
reason to create such version first (so create a ticket a tag it 'protocolV4'). 
I'm fine with not handling any notification in this ticket.

 Support for pure user-defined functions (UDF)
 -

 Key: CASSANDRA-7395
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7395
 Project: Cassandra
  Issue Type: New Feature
  Components: API, Core
Reporter: Jonathan Ellis
Assignee: Robert Stupp
  Labels: cql
 Fix For: 3.0

 Attachments: 7395-dtest.txt, 7395-native-3-4.txt, 7395.txt, 
 udf-create-syntax.png, udf-drop-syntax.png


 We have some tickets for various aspects of UDF (CASSANDRA-4914, 
 CASSANDRA-5970, CASSANDRA-4998) but they all suffer from various degrees of 
 ocean-boiling.
 Let's start with something simple: allowing pure user-defined functions in 
 the SELECT clause of a CQL query.  That's it.
 By pure I mean, must depend only on the input parameters.  No side effects. 
  No exposure to C* internals.  Column values in, result out.  
 http://en.wikipedia.org/wiki/Pure_function



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Updated] (CASSANDRA-7694) Expected Compaction Interruption is logged as ERROR

2014-08-07 Thread Marcus Eriksson (JIRA)

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

Marcus Eriksson updated CASSANDRA-7694:
---

Attachment: (was: 0001-dont-call-super-in-afterExecute.patch)

 Expected Compaction Interruption is logged as ERROR
 ---

 Key: CASSANDRA-7694
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7694
 Project: Cassandra
  Issue Type: Bug
  Components: Core
 Environment: OSX and Ubuntu 14.04
Reporter: Philip Thompson
Assignee: Marcus Eriksson
Priority: Minor
 Fix For: 2.1.1

 Attachments: compaction_error.log


 As seen in the attached log, occasionally a major compaction will interrupt 
 other running compactions. This is not an error and is expected behavior. 
 However this is logged at ERROR. 



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Comment Edited] (CASSANDRA-7694) Expected Compaction Interruption is logged as ERROR

2014-08-07 Thread Marcus Eriksson (JIRA)

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

Marcus Eriksson edited comment on CASSANDRA-7694 at 8/7/14 8:10 AM:


the exception gets logged as ERROR since we call super.afterExecute first in 
CE.afterExecute

attaching patch to remove the super call


was (Author: krummas):
the exception gets logged as ERROR since we call super.afterExecute first in 
CE.afterExecute

attaching patch to remove the super call, looks like we cover all things done 
in DTPE.afterExecute in CE.afterExecute

 Expected Compaction Interruption is logged as ERROR
 ---

 Key: CASSANDRA-7694
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7694
 Project: Cassandra
  Issue Type: Bug
  Components: Core
 Environment: OSX and Ubuntu 14.04
Reporter: Philip Thompson
Assignee: Marcus Eriksson
Priority: Minor
 Fix For: 2.1.1

 Attachments: 0001-dont-call-super-in-afterExecute.patch, 
 compaction_error.log


 As seen in the attached log, occasionally a major compaction will interrupt 
 other running compactions. This is not an error and is expected behavior. 
 However this is logged at ERROR. 



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Updated] (CASSANDRA-7694) Expected Compaction Interruption is logged as ERROR

2014-08-07 Thread Marcus Eriksson (JIRA)

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

Marcus Eriksson updated CASSANDRA-7694:
---

Attachment: 0001-dont-call-super-in-afterExecute.patch

 Expected Compaction Interruption is logged as ERROR
 ---

 Key: CASSANDRA-7694
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7694
 Project: Cassandra
  Issue Type: Bug
  Components: Core
 Environment: OSX and Ubuntu 14.04
Reporter: Philip Thompson
Assignee: Marcus Eriksson
Priority: Minor
 Fix For: 2.1.1

 Attachments: 0001-dont-call-super-in-afterExecute.patch, 
 compaction_error.log


 As seen in the attached log, occasionally a major compaction will interrupt 
 other running compactions. This is not an error and is expected behavior. 
 However this is logged at ERROR. 



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Created] (CASSANDRA-7708) UDF schema change events/results

2014-08-07 Thread Robert Stupp (JIRA)
Robert Stupp created CASSANDRA-7708:
---

 Summary: UDF schema change events/results
 Key: CASSANDRA-7708
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7708
 Project: Cassandra
  Issue Type: Improvement
Reporter: Robert Stupp
Assignee: Robert Stupp


Schema change notifications for UDF might be interesting for client.
This covers both - the result of {{CREATE}} + {{DROP}} statements and events.

Just adding {{FUNCTION}} as a new target for these events breaks previous 
native protocol contract.

Proposal is to introduce a new target {{FUNCTION}} in native protocol v4.



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Commented] (CASSANDRA-7395) Support for pure user-defined functions (UDF)

2014-08-07 Thread Robert Stupp (JIRA)

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

Robert Stupp commented on CASSANDRA-7395:
-

OK - it's CASSANDRA-7708 - I can comment out the changes in 7395 and mark them 
with a {{// TODO CASSANDRA-7708 protocolV4}} if that's ok

 Support for pure user-defined functions (UDF)
 -

 Key: CASSANDRA-7395
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7395
 Project: Cassandra
  Issue Type: New Feature
  Components: API, Core
Reporter: Jonathan Ellis
Assignee: Robert Stupp
  Labels: cql
 Fix For: 3.0

 Attachments: 7395-dtest.txt, 7395-native-3-4.txt, 7395.txt, 
 udf-create-syntax.png, udf-drop-syntax.png


 We have some tickets for various aspects of UDF (CASSANDRA-4914, 
 CASSANDRA-5970, CASSANDRA-4998) but they all suffer from various degrees of 
 ocean-boiling.
 Let's start with something simple: allowing pure user-defined functions in 
 the SELECT clause of a CQL query.  That's it.
 By pure I mean, must depend only on the input parameters.  No side effects. 
  No exposure to C* internals.  Column values in, result out.  
 http://en.wikipedia.org/wiki/Pure_function



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Commented] (CASSANDRA-7395) Support for pure user-defined functions (UDF)

2014-08-07 Thread Sylvain Lebresne (JIRA)

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

Sylvain Lebresne commented on CASSANDRA-7395:
-

bq.  I can comment out the changes in 7395 and mark them with a // TODO 
CASSANDRA-7708 protocolV4 if that's ok

Can't you just remove them? The point of making a separate ticket is that we'll 
deal with that later. No point in having tons of comment that makes the patch 
bigger and may or may not be useful later.

As a side note, for reasonably large patch (and 100K is definitively large), 
it would be really nice to try to split work in digestible commits, and ideally 
to put them in some git branch somewhere. Makes reviewing (and iteration over 
the review) a lot easier.

 Support for pure user-defined functions (UDF)
 -

 Key: CASSANDRA-7395
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7395
 Project: Cassandra
  Issue Type: New Feature
  Components: API, Core
Reporter: Jonathan Ellis
Assignee: Robert Stupp
  Labels: cql
 Fix For: 3.0

 Attachments: 7395-dtest.txt, 7395-native-3-4.txt, 7395.txt, 
 udf-create-syntax.png, udf-drop-syntax.png


 We have some tickets for various aspects of UDF (CASSANDRA-4914, 
 CASSANDRA-5970, CASSANDRA-4998) but they all suffer from various degrees of 
 ocean-boiling.
 Let's start with something simple: allowing pure user-defined functions in 
 the SELECT clause of a CQL query.  That's it.
 By pure I mean, must depend only on the input parameters.  No side effects. 
  No exposure to C* internals.  Column values in, result out.  
 http://en.wikipedia.org/wiki/Pure_function



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Commented] (CASSANDRA-7282) Faster Memtable map

2014-08-07 Thread Benedict (JIRA)

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

Benedict commented on CASSANDRA-7282:
-

Just pushed a minor update removing an extraneous comment and making the resize 
threshold triggering uniform + clearer.

Agree it would be good to get some performance numbers on this, but I'm not 
sure which magical facilities you're referring to? New stress isn't likely to 
stress this bit out any more interestingly than old stress, and we don't yet 
have a working magical performance service I don't think...

 Faster Memtable map
 ---

 Key: CASSANDRA-7282
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7282
 Project: Cassandra
  Issue Type: Improvement
  Components: Core
Reporter: Benedict
Assignee: Benedict
  Labels: performance
 Fix For: 3.0


 Currently we maintain a ConcurrentSkipLastMap of DecoratedKey - Partition in 
 our memtables. Maintaining this is an O(lg(n)) operation; since the vast 
 majority of users use a hash partitioner, it occurs to me we could maintain a 
 hybrid ordered list / hash map. The list would impose the normal order on the 
 collection, but a hash index would live alongside as part of the same data 
 structure, simply mapping into the list and permitting O(1) lookups and 
 inserts.
 I've chosen to implement this initial version as a linked-list node per item, 
 but we can optimise this in future by storing fatter nodes that permit a 
 cache-line's worth of hashes to be checked at once,  further reducing the 
 constant factor costs for lookups.



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Created] (CASSANDRA-7709) sstable2json has resource leaks

2014-08-07 Thread Benjamin Lerer (JIRA)
Benjamin Lerer created CASSANDRA-7709:
-

 Summary: sstable2json has resource leaks
 Key: CASSANDRA-7709
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7709
 Project: Cassandra
  Issue Type: Bug
  Components: Tools
Reporter: Benjamin Lerer
Assignee: Benjamin Lerer
Priority: Minor
 Fix For: 2.0.10


Coverity found 3 resource leak within  SSTable2JsonExporter:
** CID 71971:  Resource leak  (RESOURCE_LEAK)
/src/java/org/apache/cassandra/tools/SSTableExport.java: 300 in
org.apache.cassandra.tools.SSTableExport.export(org.apache.cassandra.io.sstable.Descriptor,
java.io.PrintStream, java.util.Collection, java.lang.String[],
org.apache.cassandra.config.CFMetaData)()

** CID 71972:  Resource leak on an exceptional path  (RESOURCE_LEAK)
/src/java/org/apache/cassandra/tools/SSTableExport.java: 332 in
org.apache.cassandra.tools.SSTableExport.export(org.apache.cassandra.io.sstable.SSTableReader,
java.io.PrintStream, java.lang.String[],
org.apache.cassandra.config.CFMetaData)()

** CID 71975:  Resource leak on an exceptional path  (RESOURCE_LEAK)
/src/java/org/apache/cassandra/tools/SSTableExport.java: 236 in
org.apache.cassandra.tools.SSTableExport.enumeratekeys(org.apache.cassandra.io.sstable.Descriptor,
java.io.PrintStream, org.apache.cassandra.config.CFMetaData)()



*** CID 71971:  Resource leak  (RESOURCE_LEAK)
/src/java/org/apache/cassandra/tools/SSTableExport.java: 300 in
org.apache.cassandra.tools.SSTableExport.export(org.apache.cassandra.io.sstable.Descriptor,
java.io.PrintStream, java.util.Collection, java.lang.String[],
org.apache.cassandra.config.CFMetaData)()
294 i++;
295 serializeRow(deletionInfo, atomIterator,
sstable.metadata, decoratedKey, outs);
296 }
297
298 outs.println(\n]);
299 outs.flush();
 CID 71971:  Resource leak  (RESOURCE_LEAK)
 Variable dfile going out of scope leaks the resource it refers to.
300 }
301
302 // This is necessary to accommodate the test suite since
you cannot open a Reader more
303 // than once from within the same process.
304 static void export(SSTableReader reader, PrintStream outs,
String[] excludes, CFMetaData metadata) throws IOException
305 {


*** CID 71972:  Resource leak on an exceptional path  (RESOURCE_LEAK)
/src/java/org/apache/cassandra/tools/SSTableExport.java: 332 in
org.apache.cassandra.tools.SSTableExport.export(org.apache.cassandra.io.sstable.SSTableReader,
java.io.PrintStream, java.lang.String[],
org.apache.cassandra.config.CFMetaData)()
326 if (excludeSet.contains(currentKey))
327 continue;
328 else if (i != 0)
329 outs.println(,);
330
331 serializeRow(row, row.getKey(), outs);
 CID 71972:  Resource leak on an exceptional path  (RESOURCE_LEAK)
 Variable scanner going out of scope leaks the resource it refers to.
332 checkStream(outs);
333
334 i++;
335 }
336
337 outs.println(\n]);


*** CID 71975:  Resource leak on an exceptional path  (RESOURCE_LEAK)
/src/java/org/apache/cassandra/tools/SSTableExport.java: 236 in
org.apache.cassandra.tools.SSTableExport.enumeratekeys(org.apache.cassandra.io.sstable.Descriptor,
java.io.PrintStream, org.apache.cassandra.config.CFMetaData)()
230 while (iter.hasNext())
231 {
232 DecoratedKey key = iter.next();
233
234 // validate order of the keys in the sstable
235 if (lastKey != null  lastKey.compareTo(key)  0)
 CID 71975:  Resource leak on an exceptional path  (RESOURCE_LEAK)
 Variable iter going out of scope leaks the resource it refers to.
236 throw new IOException(Key out of order!  +
lastKey ++ key);
237 lastKey = key;
238
239
outs.println(metadata.getKeyValidator().getString(key.getKey()));
240 checkStream(outs); // flushes
241 }





--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Commented] (CASSANDRA-7282) Faster Memtable map

2014-08-07 Thread Aleksey Yeschenko (JIRA)

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

Aleksey Yeschenko commented on CASSANDRA-7282:
--

bq. I'm not sure which magical facilities you're referring to

Just Ryan's stress setup (:

 Faster Memtable map
 ---

 Key: CASSANDRA-7282
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7282
 Project: Cassandra
  Issue Type: Improvement
  Components: Core
Reporter: Benedict
Assignee: Benedict
  Labels: performance
 Fix For: 3.0


 Currently we maintain a ConcurrentSkipLastMap of DecoratedKey - Partition in 
 our memtables. Maintaining this is an O(lg(n)) operation; since the vast 
 majority of users use a hash partitioner, it occurs to me we could maintain a 
 hybrid ordered list / hash map. The list would impose the normal order on the 
 collection, but a hash index would live alongside as part of the same data 
 structure, simply mapping into the list and permitting O(1) lookups and 
 inserts.
 I've chosen to implement this initial version as a linked-list node per item, 
 but we can optimise this in future by storing fatter nodes that permit a 
 cache-line's worth of hashes to be checked at once,  further reducing the 
 constant factor costs for lookups.



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Created] (CASSANDRA-7710) nodetool ring throws exception if run on machine without Cassandra

2014-08-07 Thread JIRA
Jimmy Mårdell created CASSANDRA-7710:


 Summary: nodetool ring throws exception if run on machine without 
Cassandra
 Key: CASSANDRA-7710
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7710
 Project: Cassandra
  Issue Type: Bug
  Components: Tools
Reporter: Jimmy Mårdell
Priority: Minor


DatabaseDescriptor.getNumTokens() is invoked in the nodetool ring command which 
doesn't work so well when running on a machine where Cassandra doesnt' exist. 
And it has all kind of side effects as well.

This seems fixed in 2.1 but would be nice if it was fixed in 2.0 as well.



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Created] (CASSANDRA-7711) composite column not sliced when using IN clause on (other) composite columns

2014-08-07 Thread Frens Jan Rumph (JIRA)
Frens Jan Rumph created CASSANDRA-7711:
--

 Summary: composite column not sliced when using IN clause on 
(other) composite columns
 Key: CASSANDRA-7711
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7711
 Project: Cassandra
  Issue Type: Bug
  Components: Core
 Environment: cassandra 2.0.9
Reporter: Frens Jan Rumph


Hi,

I'm storing data points in cassandra keyed by a number of values and a 
timestamp. I'd want to use IN clauses to select points and sliced by time. The 
in clauses work, but I can't get it to work in combination with the slicing: 
all values are returned / the range in the where clause seems to be ignored.

A dumbed down abstract version of my layout and some sample data:

{code}
create table tbl (
  a text,
  b text,
  c int,
  d int,
  primary key ((a), b, c)
);

insert into tbl (a,b,c,d) values ('a1', 'b1', 1, 1);
insert into tbl (a,b,c,d) values ('a1', 'b1', 2, 2);
insert into tbl (a,b,c,d) values ('a1', 'b2', 1, 1);
insert into tbl (a,b,c,d) values ('a1', 'b2', 2, 2);
insert into tbl (a,b,c,d) values ('a2', 'b1', 1, 1);
insert into tbl (a,b,c,d) values ('a2', 'b1', 2, 2);
insert into tbl (a,b,c,d) values ('a3', 'b2', 1, 1);
insert into tbl (a,b,c,d) values ('a3', 'b2', 2, 2);
{code}

So the table contains:
{code}
 a  | b  | c | d
++---+---
 a1 | b1 | 1 | 1
 a1 | b1 | 2 | 2
 a1 | b2 | 1 | 1
 a1 | b2 | 2 | 2
 a2 | b1 | 1 | 1
 a2 | b1 | 2 | 2
 a3 | b2 | 1 | 1
 a3 | b2 | 2 | 2
{code}


When performing {{select * from tbl where a in ('a1', 'a2') and (b) in (('b1'), 
('b2')) and c  1;}} I get:
{code}
 a  | b  | c | d
++---+---
 a1 | b1 | 1 | 1
 a1 | b1 | 2 | 2
 a1 | b2 | 1 | 1
 a1 | b2 | 2 | 2
 a2 | b1 | 1 | 1
 a2 | b1 | 2 | 2
{code}

But I expected:
{code}
 a  | b  | c | d
++---+---
 a1 | b1 | 2 | 2
 a1 | b2 | 2 | 2
 a2 | b1 | 2 | 2
{code}


Am I doing something wrong? Or is {{c  1}} incorrectly ignored?


{{select * from tbl where a in ('a1', 'a2') and b='b1' and c  1;}} does 
correctly produce:
{code}
a  | b  | c | d
++---+---
 a1 | b1 | 2 | 2
 a2 | b1 | 2 | 2
{code}

So I expect this behaviour to relate to the interworking of the IN clause on 
the clustering column b and the  predicate on column c.

Cheers,
Frens Jan



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Commented] (CASSANDRA-7313) SecondaryIndex not deleting column definition

2014-08-07 Thread Sam Tunnicliffe (JIRA)

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

Sam Tunnicliffe commented on CASSANDRA-7313:


I don't see a problem with the {{remove()}} method of the iterator obtained 
from columnDefs.iterator, a quick test shows that it does in fact remove from 
the underlying Set when invoked. My theory would be that the issue is actually 
with the equality check between ByteBuffers. 
Adding a unit test would let us verify whether or not the patch actually has 
some effect (I suspect that it doesn't). If that isn't the case I would dig 
into the name comparison.

(n.b. I'm assuming the affects version should be 2.1 here as the patch doesn't 
apply to 2.0)

 SecondaryIndex not deleting column definition
 -

 Key: CASSANDRA-7313
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7313
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Reporter: Andrés de la Peña
Priority: Minor
  Labels: 2i, columnDefinition, secondaryIndex
 Attachments: dSecondaryIndex-removeColumnDef.diff.txt


 The method _SecondaryIndex#removeColumnDef_ does not delete the requested 
 column definition. I think this may be due to the iterator's remove method:
 {code:java}
 void removeColumnDef(ByteBuffer name)
 {
 IteratorColumnDefinition it = columnDefs.iterator();
 while (it.hasNext())
 {
 if (it.next().name.bytes.equals(name))
 it.remove();
 }
 }
 {code}
 For me it has been problematic when deleting a per row index in a column 
 family and then creating a new one.
 I attach a patch that may solve the problem.



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Updated] (CASSANDRA-7709) sstable2json has resource leaks

2014-08-07 Thread Benjamin Lerer (JIRA)

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

Benjamin Lerer updated CASSANDRA-7709:
--

Attachment: CASSANDRA-7709.txt

 sstable2json has resource leaks
 ---

 Key: CASSANDRA-7709
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7709
 Project: Cassandra
  Issue Type: Bug
  Components: Tools
Reporter: Benjamin Lerer
Assignee: Benjamin Lerer
Priority: Minor
 Fix For: 2.0.10

 Attachments: CASSANDRA-7709.txt


 Coverity found 3 resource leak within  SSTable2JsonExporter:
 ** CID 71971:  Resource leak  (RESOURCE_LEAK)
 /src/java/org/apache/cassandra/tools/SSTableExport.java: 300 in
 org.apache.cassandra.tools.SSTableExport.export(org.apache.cassandra.io.sstable.Descriptor,
 java.io.PrintStream, java.util.Collection, java.lang.String[],
 org.apache.cassandra.config.CFMetaData)()
 ** CID 71972:  Resource leak on an exceptional path  (RESOURCE_LEAK)
 /src/java/org/apache/cassandra/tools/SSTableExport.java: 332 in
 org.apache.cassandra.tools.SSTableExport.export(org.apache.cassandra.io.sstable.SSTableReader,
 java.io.PrintStream, java.lang.String[],
 org.apache.cassandra.config.CFMetaData)()
 ** CID 71975:  Resource leak on an exceptional path  (RESOURCE_LEAK)
 /src/java/org/apache/cassandra/tools/SSTableExport.java: 236 in
 org.apache.cassandra.tools.SSTableExport.enumeratekeys(org.apache.cassandra.io.sstable.Descriptor,
 java.io.PrintStream, org.apache.cassandra.config.CFMetaData)()
 
 *** CID 71971:  Resource leak  (RESOURCE_LEAK)
 /src/java/org/apache/cassandra/tools/SSTableExport.java: 300 in
 org.apache.cassandra.tools.SSTableExport.export(org.apache.cassandra.io.sstable.Descriptor,
 java.io.PrintStream, java.util.Collection, java.lang.String[],
 org.apache.cassandra.config.CFMetaData)()
 294 i++;
 295 serializeRow(deletionInfo, atomIterator,
 sstable.metadata, decoratedKey, outs);
 296 }
 297
 298 outs.println(\n]);
 299 outs.flush();
  CID 71971:  Resource leak  (RESOURCE_LEAK)
  Variable dfile going out of scope leaks the resource it refers to.
 300 }
 301
 302 // This is necessary to accommodate the test suite since
 you cannot open a Reader more
 303 // than once from within the same process.
 304 static void export(SSTableReader reader, PrintStream outs,
 String[] excludes, CFMetaData metadata) throws IOException
 305 {
 
 *** CID 71972:  Resource leak on an exceptional path  (RESOURCE_LEAK)
 /src/java/org/apache/cassandra/tools/SSTableExport.java: 332 in
 org.apache.cassandra.tools.SSTableExport.export(org.apache.cassandra.io.sstable.SSTableReader,
 java.io.PrintStream, java.lang.String[],
 org.apache.cassandra.config.CFMetaData)()
 326 if (excludeSet.contains(currentKey))
 327 continue;
 328 else if (i != 0)
 329 outs.println(,);
 330
 331 serializeRow(row, row.getKey(), outs);
  CID 71972:  Resource leak on an exceptional path  (RESOURCE_LEAK)
  Variable scanner going out of scope leaks the resource it refers to.
 332 checkStream(outs);
 333
 334 i++;
 335 }
 336
 337 outs.println(\n]);
 
 *** CID 71975:  Resource leak on an exceptional path  (RESOURCE_LEAK)
 /src/java/org/apache/cassandra/tools/SSTableExport.java: 236 in
 org.apache.cassandra.tools.SSTableExport.enumeratekeys(org.apache.cassandra.io.sstable.Descriptor,
 java.io.PrintStream, org.apache.cassandra.config.CFMetaData)()
 230 while (iter.hasNext())
 231 {
 232 DecoratedKey key = iter.next();
 233
 234 // validate order of the keys in the sstable
 235 if (lastKey != null  lastKey.compareTo(key)  0)
  CID 71975:  Resource leak on an exceptional path  (RESOURCE_LEAK)
  Variable iter going out of scope leaks the resource it refers to.
 236 throw new IOException(Key out of order!  +
 lastKey ++ key);
 237 lastKey = key;
 238
 239
 outs.println(metadata.getKeyValidator().getString(key.getKey()));
 240 checkStream(outs); // flushes
 241 }



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[Cassandra Wiki] Update of ContributorsGroup by DaveBrosius

2014-08-07 Thread Apache Wiki
Dear Wiki user,

You have subscribed to a wiki page or wiki category on Cassandra Wiki for 
change notification.

The ContributorsGroup page has been changed by DaveBrosius:
https://wiki.apache.org/cassandra/ContributorsGroup?action=diffrev1=34rev2=35

   * woolfel
   * MichaelShuler
   * BenedictElliottSmith
+  * RobertStupp
  


[jira] [Commented] (CASSANDRA-7384) Collect metrics on queries by consistency level

2014-08-07 Thread Or Sher (JIRA)

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

Or Sher commented on CASSANDRA-7384:


I would be happy to have such metrics, I would even sample count and latency 
per column family and per CL.
We have many applications using the same shared clusters.
Many developers from different teams are working with different APIs (Hector  
CQL3), and with different standards and wrappers.
As the DBA, I'm not able to verify that each project is using the CL it thinks 
or need to. That would really help me out and I'm sure it also help many other 
companies where the administration and development have different owners.
Comparing the read/write latency for different CL on run time in our production 
cluster would also be a great value.

 Collect metrics on queries by consistency level
 ---

 Key: CASSANDRA-7384
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7384
 Project: Cassandra
  Issue Type: Improvement
  Components: Core
Reporter: Vishy Kasar
Assignee: sankalp kohli
Priority: Minor
 Fix For: 2.0.10


 We had cases where cassandra client users thought that they were doing 
 queries at one consistency level but turned out to be not correct. It will be 
 good to collect metrics on number of queries done at various consistency 
 level on the server. See the equivalent JIRA on java driver: 
 https://datastax-oss.atlassian.net/browse/JAVA-354



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Updated] (CASSANDRA-7700) Unexpected exception in RangeTombstoneList.insertFrom during Python Driver Duration Test

2014-08-07 Thread Sylvain Lebresne (JIRA)

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

Sylvain Lebresne updated CASSANDRA-7700:


Attachment: 7700.txt

 Unexpected exception in RangeTombstoneList.insertFrom during Python Driver 
 Duration Test
 

 Key: CASSANDRA-7700
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7700
 Project: Cassandra
  Issue Type: Bug
 Environment: ubuntu via ctool. Linux ip-10-199-0-152 3.2.0-57-virtual 
 #87-Ubuntu SMP Tue Nov 12 21:53:49 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
Reporter: Rick Smith
Assignee: Sylvain Lebresne
 Fix For: 2.0.10

 Attachments: 7700.txt, Tombstone_Exception.txt


 Found the attached exception (duration test log and associated Cassandra log) 
 when running the Python driver duration tests against 
 CASSANDRA_VERSION=cassandra-2.1.0-rc5 and master branch of driver. Error 
 repeated in logs twice over 12 hours on master_gevent cluster, and once on 
 gevent cluster over the same time period. Cluster and associated cluster 
 setup via ctool.
 Log excerpt:
 INFO  [MemtableFlushWriter:184] 2014-08-05 05:45:39,161 Memtable.java:360 - 
 Completed flushing 
 /srv/performance/cass/data/duration_test/ints-133f8c901c2f11e491e66b1b73f81641/duration_test-ints-ka-173-Data.db
  (2131716 bytes) for commitlog position 
 ReplayPosition(segmentId=1407193910537, position=13460548)
 ERROR [SharedPool-Worker-7] 2014-08-05 05:45:45,160 ErrorMessage.java:218 - 
 Unexpected exception during request
 java.lang.AssertionError: null
   at 
 org.apache.cassandra.db.RangeTombstoneList.insertFrom(RangeTombstoneList.java:528)
  ~[main/:na]
   at 
 org.apache.cassandra.db.RangeTombstoneList.addAll(RangeTombstoneList.java:221)
  ~[main/:na]
 more details in attachment.



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Updated] (CASSANDRA-7700) Unexpected exception in RangeTombstoneList.insertFrom during Python Driver Duration Test

2014-08-07 Thread Sylvain Lebresne (JIRA)

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

Sylvain Lebresne updated CASSANDRA-7700:


Fix Version/s: (was: 2.1.0)

 Unexpected exception in RangeTombstoneList.insertFrom during Python Driver 
 Duration Test
 

 Key: CASSANDRA-7700
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7700
 Project: Cassandra
  Issue Type: Bug
 Environment: ubuntu via ctool. Linux ip-10-199-0-152 3.2.0-57-virtual 
 #87-Ubuntu SMP Tue Nov 12 21:53:49 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
Reporter: Rick Smith
Assignee: Sylvain Lebresne
 Fix For: 2.0.10

 Attachments: 7700.txt, Tombstone_Exception.txt


 Found the attached exception (duration test log and associated Cassandra log) 
 when running the Python driver duration tests against 
 CASSANDRA_VERSION=cassandra-2.1.0-rc5 and master branch of driver. Error 
 repeated in logs twice over 12 hours on master_gevent cluster, and once on 
 gevent cluster over the same time period. Cluster and associated cluster 
 setup via ctool.
 Log excerpt:
 INFO  [MemtableFlushWriter:184] 2014-08-05 05:45:39,161 Memtable.java:360 - 
 Completed flushing 
 /srv/performance/cass/data/duration_test/ints-133f8c901c2f11e491e66b1b73f81641/duration_test-ints-ka-173-Data.db
  (2131716 bytes) for commitlog position 
 ReplayPosition(segmentId=1407193910537, position=13460548)
 ERROR [SharedPool-Worker-7] 2014-08-05 05:45:45,160 ErrorMessage.java:218 - 
 Unexpected exception during request
 java.lang.AssertionError: null
   at 
 org.apache.cassandra.db.RangeTombstoneList.insertFrom(RangeTombstoneList.java:528)
  ~[main/:na]
   at 
 org.apache.cassandra.db.RangeTombstoneList.addAll(RangeTombstoneList.java:221)
  ~[main/:na]
 more details in attachment.



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Comment Edited] (CASSANDRA-7384) Collect metrics on queries by consistency level

2014-08-07 Thread Or Sher (JIRA)

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

Or Sher edited comment on CASSANDRA-7384 at 8/7/14 1:58 PM:


I would be happy to have such metrics, I would even sample count and latency 
per column family and per CL.
We have many applications using the same shared clusters.
Many developers from different teams are working with different APIs (Hector  
CQL3), and with different standards and wrappers.
As the DBA, I'm not able to verify that each project is using the CL it thinks 
or need to use. That would really help me out and I'm sure it also help many 
other companies where the administration and development have different owners.
Comparing the read/write latency for different CL on run time in our production 
cluster would also be a great value.


was (Author: or.sher1):
I would be happy to have such metrics, I would even sample count and latency 
per column family and per CL.
We have many applications using the same shared clusters.
Many developers from different teams are working with different APIs (Hector  
CQL3), and with different standards and wrappers.
As the DBA, I'm not able to verify that each project is using the CL it thinks 
or need to. That would really help me out and I'm sure it also help many other 
companies where the administration and development have different owners.
Comparing the read/write latency for different CL on run time in our production 
cluster would also be a great value.

 Collect metrics on queries by consistency level
 ---

 Key: CASSANDRA-7384
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7384
 Project: Cassandra
  Issue Type: Improvement
  Components: Core
Reporter: Vishy Kasar
Assignee: sankalp kohli
Priority: Minor
 Fix For: 2.0.10


 We had cases where cassandra client users thought that they were doing 
 queries at one consistency level but turned out to be not correct. It will be 
 good to collect metrics on number of queries done at various consistency 
 level on the server. See the equivalent JIRA on java driver: 
 https://datastax-oss.atlassian.net/browse/JAVA-354



--
This message was sent by Atlassian JIRA
(v6.2#6252)


git commit: CASSANDRA-7635, rebase for 2.1

2014-08-07 Thread slebresne
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-2.1.0 fd5cf2363 - e0c4c6e60


CASSANDRA-7635, rebase for 2.1


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

Branch: refs/heads/cassandra-2.1.0
Commit: e0c4c6e60b682630ecc1285d4def1a652d9203dc
Parents: fd5cf23
Author: Sylvain Lebresne sylv...@datastax.com
Authored: Thu Aug 7 16:06:39 2014 +0200
Committer: Sylvain Lebresne sylv...@datastax.com
Committed: Thu Aug 7 16:06:39 2014 +0200

--
 .../apache/cassandra/config/DatabaseDescriptor.java   |  5 +
 .../org/apache/cassandra/service/StorageService.java  |  6 ++
 .../apache/cassandra/service/StorageServiceMBean.java |  3 +++
 src/java/org/apache/cassandra/tools/NodeProbe.java|  4 
 src/java/org/apache/cassandra/tools/NodeTool.java | 14 ++
 5 files changed, 32 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/e0c4c6e6/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
--
diff --git a/src/java/org/apache/cassandra/config/DatabaseDescriptor.java 
b/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
index 4e67c44..d1511ba 100644
--- a/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
+++ b/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
@@ -1354,6 +1354,11 @@ public class DatabaseDescriptor
 return conf.batchlog_replay_throttle_in_kb;
 }
 
+public static void setHintedHandoffThrottleInKB(Integer throttleInKB)
+{
+conf.hinted_handoff_throttle_in_kb = throttleInKB;
+}
+
 public static int getMaxHintsThread()
 {
 return conf.max_hints_delivery_threads;

http://git-wip-us.apache.org/repos/asf/cassandra/blob/e0c4c6e6/src/java/org/apache/cassandra/service/StorageService.java
--
diff --git a/src/java/org/apache/cassandra/service/StorageService.java 
b/src/java/org/apache/cassandra/service/StorageService.java
index 46e6588..1e3f699 100644
--- a/src/java/org/apache/cassandra/service/StorageService.java
+++ b/src/java/org/apache/cassandra/service/StorageService.java
@@ -3957,4 +3957,10 @@ public class StorageService extends 
NotificationBroadcasterSupport implements IE
 {
 DatabaseDescriptor.setTombstoneFailureThreshold(threshold);
 }
+
+public void setHintedHandoffThrottleInKB(int throttleInKB)
+{
+DatabaseDescriptor.setHintedHandoffThrottleInKB(throttleInKB);
+logger.info(String.format(Updated hinted_handoff_throttle_in_kb to 
%d, throttleInKB));
+}
 }

http://git-wip-us.apache.org/repos/asf/cassandra/blob/e0c4c6e6/src/java/org/apache/cassandra/service/StorageServiceMBean.java
--
diff --git a/src/java/org/apache/cassandra/service/StorageServiceMBean.java 
b/src/java/org/apache/cassandra/service/StorageServiceMBean.java
index 320f7dc..b4cc45b 100644
--- a/src/java/org/apache/cassandra/service/StorageServiceMBean.java
+++ b/src/java/org/apache/cassandra/service/StorageServiceMBean.java
@@ -511,4 +511,7 @@ public interface StorageServiceMBean extends 
NotificationEmitter
 public int getTombstoneFailureThreshold();
 /** Sets the threshold for abandoning queries with many tombstones */
 public void setTombstoneFailureThreshold(int tombstoneDebugThreshold);
+
+/** Sets the hinted handoff throttle in kb per second, per delivery 
thread. */
+public void setHintedHandoffThrottleInKB(int throttleInKB);
 }

http://git-wip-us.apache.org/repos/asf/cassandra/blob/e0c4c6e6/src/java/org/apache/cassandra/tools/NodeProbe.java
--
diff --git a/src/java/org/apache/cassandra/tools/NodeProbe.java 
b/src/java/org/apache/cassandra/tools/NodeProbe.java
index f14de12..1a2364b 100644
--- a/src/java/org/apache/cassandra/tools/NodeProbe.java
+++ b/src/java/org/apache/cassandra/tools/NodeProbe.java
@@ -602,6 +602,10 @@ public class NodeProbe implements AutoCloseable
 }
 }
 
+public void setHintedHandoffThrottleInKB(int throttleInKB)
+{
+ssProxy.setHintedHandoffThrottleInKB(throttleInKB);
+}
 
 public ListInetAddress getEndpoints(String keyspace, String cf, String 
key)
 {

http://git-wip-us.apache.org/repos/asf/cassandra/blob/e0c4c6e6/src/java/org/apache/cassandra/tools/NodeTool.java
--
diff --git a/src/java/org/apache/cassandra/tools/NodeTool.java 
b/src/java/org/apache/cassandra/tools/NodeTool.java

[1/3] git commit: CASSANDRA-7635, rebase for 2.1

2014-08-07 Thread slebresne
Repository: cassandra
Updated Branches:
  refs/heads/trunk 59123b6f7 - 17055bfdb


CASSANDRA-7635, rebase for 2.1


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

Branch: refs/heads/trunk
Commit: e0c4c6e60b682630ecc1285d4def1a652d9203dc
Parents: fd5cf23
Author: Sylvain Lebresne sylv...@datastax.com
Authored: Thu Aug 7 16:06:39 2014 +0200
Committer: Sylvain Lebresne sylv...@datastax.com
Committed: Thu Aug 7 16:06:39 2014 +0200

--
 .../apache/cassandra/config/DatabaseDescriptor.java   |  5 +
 .../org/apache/cassandra/service/StorageService.java  |  6 ++
 .../apache/cassandra/service/StorageServiceMBean.java |  3 +++
 src/java/org/apache/cassandra/tools/NodeProbe.java|  4 
 src/java/org/apache/cassandra/tools/NodeTool.java | 14 ++
 5 files changed, 32 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/e0c4c6e6/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
--
diff --git a/src/java/org/apache/cassandra/config/DatabaseDescriptor.java 
b/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
index 4e67c44..d1511ba 100644
--- a/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
+++ b/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
@@ -1354,6 +1354,11 @@ public class DatabaseDescriptor
 return conf.batchlog_replay_throttle_in_kb;
 }
 
+public static void setHintedHandoffThrottleInKB(Integer throttleInKB)
+{
+conf.hinted_handoff_throttle_in_kb = throttleInKB;
+}
+
 public static int getMaxHintsThread()
 {
 return conf.max_hints_delivery_threads;

http://git-wip-us.apache.org/repos/asf/cassandra/blob/e0c4c6e6/src/java/org/apache/cassandra/service/StorageService.java
--
diff --git a/src/java/org/apache/cassandra/service/StorageService.java 
b/src/java/org/apache/cassandra/service/StorageService.java
index 46e6588..1e3f699 100644
--- a/src/java/org/apache/cassandra/service/StorageService.java
+++ b/src/java/org/apache/cassandra/service/StorageService.java
@@ -3957,4 +3957,10 @@ public class StorageService extends 
NotificationBroadcasterSupport implements IE
 {
 DatabaseDescriptor.setTombstoneFailureThreshold(threshold);
 }
+
+public void setHintedHandoffThrottleInKB(int throttleInKB)
+{
+DatabaseDescriptor.setHintedHandoffThrottleInKB(throttleInKB);
+logger.info(String.format(Updated hinted_handoff_throttle_in_kb to 
%d, throttleInKB));
+}
 }

http://git-wip-us.apache.org/repos/asf/cassandra/blob/e0c4c6e6/src/java/org/apache/cassandra/service/StorageServiceMBean.java
--
diff --git a/src/java/org/apache/cassandra/service/StorageServiceMBean.java 
b/src/java/org/apache/cassandra/service/StorageServiceMBean.java
index 320f7dc..b4cc45b 100644
--- a/src/java/org/apache/cassandra/service/StorageServiceMBean.java
+++ b/src/java/org/apache/cassandra/service/StorageServiceMBean.java
@@ -511,4 +511,7 @@ public interface StorageServiceMBean extends 
NotificationEmitter
 public int getTombstoneFailureThreshold();
 /** Sets the threshold for abandoning queries with many tombstones */
 public void setTombstoneFailureThreshold(int tombstoneDebugThreshold);
+
+/** Sets the hinted handoff throttle in kb per second, per delivery 
thread. */
+public void setHintedHandoffThrottleInKB(int throttleInKB);
 }

http://git-wip-us.apache.org/repos/asf/cassandra/blob/e0c4c6e6/src/java/org/apache/cassandra/tools/NodeProbe.java
--
diff --git a/src/java/org/apache/cassandra/tools/NodeProbe.java 
b/src/java/org/apache/cassandra/tools/NodeProbe.java
index f14de12..1a2364b 100644
--- a/src/java/org/apache/cassandra/tools/NodeProbe.java
+++ b/src/java/org/apache/cassandra/tools/NodeProbe.java
@@ -602,6 +602,10 @@ public class NodeProbe implements AutoCloseable
 }
 }
 
+public void setHintedHandoffThrottleInKB(int throttleInKB)
+{
+ssProxy.setHintedHandoffThrottleInKB(throttleInKB);
+}
 
 public ListInetAddress getEndpoints(String keyspace, String cf, String 
key)
 {

http://git-wip-us.apache.org/repos/asf/cassandra/blob/e0c4c6e6/src/java/org/apache/cassandra/tools/NodeTool.java
--
diff --git a/src/java/org/apache/cassandra/tools/NodeTool.java 
b/src/java/org/apache/cassandra/tools/NodeTool.java
index 

[1/2] git commit: CASSANDRA-7635, rebase for 2.1

2014-08-07 Thread slebresne
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-2.1 6beb13f19 - 78b734e2e


CASSANDRA-7635, rebase for 2.1


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

Branch: refs/heads/cassandra-2.1
Commit: e0c4c6e60b682630ecc1285d4def1a652d9203dc
Parents: fd5cf23
Author: Sylvain Lebresne sylv...@datastax.com
Authored: Thu Aug 7 16:06:39 2014 +0200
Committer: Sylvain Lebresne sylv...@datastax.com
Committed: Thu Aug 7 16:06:39 2014 +0200

--
 .../apache/cassandra/config/DatabaseDescriptor.java   |  5 +
 .../org/apache/cassandra/service/StorageService.java  |  6 ++
 .../apache/cassandra/service/StorageServiceMBean.java |  3 +++
 src/java/org/apache/cassandra/tools/NodeProbe.java|  4 
 src/java/org/apache/cassandra/tools/NodeTool.java | 14 ++
 5 files changed, 32 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/e0c4c6e6/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
--
diff --git a/src/java/org/apache/cassandra/config/DatabaseDescriptor.java 
b/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
index 4e67c44..d1511ba 100644
--- a/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
+++ b/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
@@ -1354,6 +1354,11 @@ public class DatabaseDescriptor
 return conf.batchlog_replay_throttle_in_kb;
 }
 
+public static void setHintedHandoffThrottleInKB(Integer throttleInKB)
+{
+conf.hinted_handoff_throttle_in_kb = throttleInKB;
+}
+
 public static int getMaxHintsThread()
 {
 return conf.max_hints_delivery_threads;

http://git-wip-us.apache.org/repos/asf/cassandra/blob/e0c4c6e6/src/java/org/apache/cassandra/service/StorageService.java
--
diff --git a/src/java/org/apache/cassandra/service/StorageService.java 
b/src/java/org/apache/cassandra/service/StorageService.java
index 46e6588..1e3f699 100644
--- a/src/java/org/apache/cassandra/service/StorageService.java
+++ b/src/java/org/apache/cassandra/service/StorageService.java
@@ -3957,4 +3957,10 @@ public class StorageService extends 
NotificationBroadcasterSupport implements IE
 {
 DatabaseDescriptor.setTombstoneFailureThreshold(threshold);
 }
+
+public void setHintedHandoffThrottleInKB(int throttleInKB)
+{
+DatabaseDescriptor.setHintedHandoffThrottleInKB(throttleInKB);
+logger.info(String.format(Updated hinted_handoff_throttle_in_kb to 
%d, throttleInKB));
+}
 }

http://git-wip-us.apache.org/repos/asf/cassandra/blob/e0c4c6e6/src/java/org/apache/cassandra/service/StorageServiceMBean.java
--
diff --git a/src/java/org/apache/cassandra/service/StorageServiceMBean.java 
b/src/java/org/apache/cassandra/service/StorageServiceMBean.java
index 320f7dc..b4cc45b 100644
--- a/src/java/org/apache/cassandra/service/StorageServiceMBean.java
+++ b/src/java/org/apache/cassandra/service/StorageServiceMBean.java
@@ -511,4 +511,7 @@ public interface StorageServiceMBean extends 
NotificationEmitter
 public int getTombstoneFailureThreshold();
 /** Sets the threshold for abandoning queries with many tombstones */
 public void setTombstoneFailureThreshold(int tombstoneDebugThreshold);
+
+/** Sets the hinted handoff throttle in kb per second, per delivery 
thread. */
+public void setHintedHandoffThrottleInKB(int throttleInKB);
 }

http://git-wip-us.apache.org/repos/asf/cassandra/blob/e0c4c6e6/src/java/org/apache/cassandra/tools/NodeProbe.java
--
diff --git a/src/java/org/apache/cassandra/tools/NodeProbe.java 
b/src/java/org/apache/cassandra/tools/NodeProbe.java
index f14de12..1a2364b 100644
--- a/src/java/org/apache/cassandra/tools/NodeProbe.java
+++ b/src/java/org/apache/cassandra/tools/NodeProbe.java
@@ -602,6 +602,10 @@ public class NodeProbe implements AutoCloseable
 }
 }
 
+public void setHintedHandoffThrottleInKB(int throttleInKB)
+{
+ssProxy.setHintedHandoffThrottleInKB(throttleInKB);
+}
 
 public ListInetAddress getEndpoints(String keyspace, String cf, String 
key)
 {

http://git-wip-us.apache.org/repos/asf/cassandra/blob/e0c4c6e6/src/java/org/apache/cassandra/tools/NodeTool.java
--
diff --git a/src/java/org/apache/cassandra/tools/NodeTool.java 
b/src/java/org/apache/cassandra/tools/NodeTool.java

[3/3] git commit: Merge branch 'cassandra-2.1' into trunk

2014-08-07 Thread slebresne
Merge branch 'cassandra-2.1' into trunk


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

Branch: refs/heads/trunk
Commit: 17055bfdb0eb4f0a3d43b7c920aff3d1fa2a6ce6
Parents: 59123b6 78b734e
Author: Sylvain Lebresne sylv...@datastax.com
Authored: Thu Aug 7 16:07:46 2014 +0200
Committer: Sylvain Lebresne sylv...@datastax.com
Committed: Thu Aug 7 16:07:46 2014 +0200

--
 .../apache/cassandra/config/DatabaseDescriptor.java   |  5 +
 .../org/apache/cassandra/service/StorageService.java  |  6 ++
 .../apache/cassandra/service/StorageServiceMBean.java |  3 +++
 src/java/org/apache/cassandra/tools/NodeProbe.java|  4 
 src/java/org/apache/cassandra/tools/NodeTool.java | 14 ++
 5 files changed, 32 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/17055bfd/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
--

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

http://git-wip-us.apache.org/repos/asf/cassandra/blob/17055bfd/src/java/org/apache/cassandra/tools/NodeProbe.java
--

http://git-wip-us.apache.org/repos/asf/cassandra/blob/17055bfd/src/java/org/apache/cassandra/tools/NodeTool.java
--



[2/3] git commit: Merge branch 'cassandra-2.1.0' into cassandra-2.1

2014-08-07 Thread slebresne
Merge branch 'cassandra-2.1.0' into cassandra-2.1


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

Branch: refs/heads/trunk
Commit: 78b734e2eb79e541088a4ac404b27be74410ba4a
Parents: 6beb13f e0c4c6e
Author: Sylvain Lebresne sylv...@datastax.com
Authored: Thu Aug 7 16:07:29 2014 +0200
Committer: Sylvain Lebresne sylv...@datastax.com
Committed: Thu Aug 7 16:07:29 2014 +0200

--
 .../apache/cassandra/config/DatabaseDescriptor.java   |  5 +
 .../org/apache/cassandra/service/StorageService.java  |  6 ++
 .../apache/cassandra/service/StorageServiceMBean.java |  3 +++
 src/java/org/apache/cassandra/tools/NodeProbe.java|  4 
 src/java/org/apache/cassandra/tools/NodeTool.java | 14 ++
 5 files changed, 32 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/78b734e2/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
--



[2/2] git commit: Merge branch 'cassandra-2.1.0' into cassandra-2.1

2014-08-07 Thread slebresne
Merge branch 'cassandra-2.1.0' into cassandra-2.1


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

Branch: refs/heads/cassandra-2.1
Commit: 78b734e2eb79e541088a4ac404b27be74410ba4a
Parents: 6beb13f e0c4c6e
Author: Sylvain Lebresne sylv...@datastax.com
Authored: Thu Aug 7 16:07:29 2014 +0200
Committer: Sylvain Lebresne sylv...@datastax.com
Committed: Thu Aug 7 16:07:29 2014 +0200

--
 .../apache/cassandra/config/DatabaseDescriptor.java   |  5 +
 .../org/apache/cassandra/service/StorageService.java  |  6 ++
 .../apache/cassandra/service/StorageServiceMBean.java |  3 +++
 src/java/org/apache/cassandra/tools/NodeProbe.java|  4 
 src/java/org/apache/cassandra/tools/NodeTool.java | 14 ++
 5 files changed, 32 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/78b734e2/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
--



git commit: Fix minor potential leak in sstable2json

2014-08-07 Thread slebresne
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-2.0 b6b8a285e - f3f69cb47


Fix minor potential leak in sstable2json

patch by blerer; reviewed by slebresne for CASSANDRA-7709


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

Branch: refs/heads/cassandra-2.0
Commit: f3f69cb47319bbc7d3c1e1aa1d48076e4a155e8c
Parents: b6b8a28
Author: Sylvain Lebresne sylv...@datastax.com
Authored: Thu Aug 7 16:11:38 2014 +0200
Committer: Sylvain Lebresne sylv...@datastax.com
Committed: Thu Aug 7 16:11:38 2014 +0200

--
 CHANGES.txt |   1 +
 .../apache/cassandra/tools/SSTableExport.java   | 139 +++
 2 files changed, 79 insertions(+), 61 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/f3f69cb4/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index fdff490..4392159 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.0.10
+ * Minor leak in sstable2jon (CASSANDRA-7709)
  * Add cassandra.auto_bootstrap system property (CASSANDRA-7650)
  * Remove CqlPagingRecordReader/CqlPagingInputFormat (CASSANDRA-7570)
  * Fix IncompatibleClassChangeError from hadoop2 (CASSANDRA-7229)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/f3f69cb4/src/java/org/apache/cassandra/tools/SSTableExport.java
--
diff --git a/src/java/org/apache/cassandra/tools/SSTableExport.java 
b/src/java/org/apache/cassandra/tools/SSTableExport.java
index 197585b..f8b85c3 100644
--- a/src/java/org/apache/cassandra/tools/SSTableExport.java
+++ b/src/java/org/apache/cassandra/tools/SSTableExport.java
@@ -252,20 +252,26 @@ public class SSTableExport
 throws IOException
 {
 KeyIterator iter = new KeyIterator(desc);
-DecoratedKey lastKey = null;
-while (iter.hasNext())
+try
 {
-DecoratedKey key = iter.next();
+DecoratedKey lastKey = null;
+while (iter.hasNext())
+{
+DecoratedKey key = iter.next();
 
-// validate order of the keys in the sstable
-if (lastKey != null  lastKey.compareTo(key)  0)
-throw new IOException(Key out of order!  + lastKey ++ 
key);
-lastKey = key;
+// validate order of the keys in the sstable
+if (lastKey != null  lastKey.compareTo(key)  0)
+throw new IOException(Key out of order!  + lastKey +   
 + key);
+lastKey = key;
 
-outs.println(bytesToHex(key.key));
-checkStream(outs); // flushes
+outs.println(bytesToHex(key.key));
+checkStream(outs); // flushes
+}
+}
+finally
+{
+iter.close();
 }
-iter.close();
 }
 
 /**
@@ -281,51 +287,59 @@ public class SSTableExport
 {
 SSTableReader sstable = SSTableReader.open(desc);
 RandomAccessReader dfile = sstable.openDataReader();
+try
+{
+IPartitioner? partitioner = sstable.partitioner;
 
-IPartitioner? partitioner = sstable.partitioner;
+if (excludes != null)
+toExport.removeAll(Arrays.asList(excludes));
 
-if (excludes != null)
-toExport.removeAll(Arrays.asList(excludes));
+outs.println([);
 
-outs.println([);
+int i = 0;
 
-int i = 0;
+// last key to compare order
+DecoratedKey lastKey = null;
 
-// last key to compare order
-DecoratedKey lastKey = null;
+for (String key : toExport)
+{
+DecoratedKey decoratedKey = 
partitioner.decorateKey(hexToBytes(key));
 
-for (String key : toExport)
-{
-DecoratedKey decoratedKey = 
partitioner.decorateKey(hexToBytes(key));
+if (lastKey != null  lastKey.compareTo(decoratedKey)  0)
+throw new IOException(Key out of order!  + lastKey +   
 + decoratedKey);
 
-if (lastKey != null  lastKey.compareTo(decoratedKey)  0)
-throw new IOException(Key out of order!  + lastKey ++ 
decoratedKey);
+lastKey = decoratedKey;
 
-lastKey = decoratedKey;
+RowIndexEntry entry = sstable.getPosition(decoratedKey, 
SSTableReader.Operator.EQ);
+if (entry == null)
+continue;
 
-RowIndexEntry entry = sstable.getPosition(decoratedKey, 

[jira] [Updated] (CASSANDRA-7695) Inserting the same row in parallel causes bad data to be returned to the client

2014-08-07 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis updated CASSANDRA-7695:
--

Reviewer: Benedict  (was: Aleksey Yeschenko)

[~benedict] to review

(nit: brace placement)

 Inserting the same row in parallel causes bad data to be returned to the 
 client
 ---

 Key: CASSANDRA-7695
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7695
 Project: Cassandra
  Issue Type: Bug
 Environment: Linux 3.12.21, JVM 1.7u60
 Cassandra server 2.1.0 RC 5
 Cassandra datastax client version 2.1.0RC1
Reporter: Johan Bjork
Assignee: T Jake Luciani
Priority: Blocker
 Fix For: 2.1.0

 Attachments: 7695-workaround.txt, PutFailureRepro.java, 
 bad-data-tid43-get, bad-data-tid43-put


 Running the attached test program against a cassandra 2.1 server results in 
 scrambled data returned by the SELECT statement. Running it against latest 
 stable works fine.
 Attached:
 * Program that reproduces the failure
 * Example output files from mentioned test-program with the scrambled output.
 Failure mode:
 The value returned by 'get' is scrambled, the size is correct but some bytes 
 have shifted locations in the returned buffer.
 Cluster info:
 For the test we set up a single cassandra node using the stock configuration 
 file.



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[1/3] git commit: Fix minor potential leak in sstable2json

2014-08-07 Thread slebresne
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-2.1 78b734e2e - ddda54145


Fix minor potential leak in sstable2json

patch by blerer; reviewed by slebresne for CASSANDRA-7709


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

Branch: refs/heads/cassandra-2.1
Commit: f3f69cb47319bbc7d3c1e1aa1d48076e4a155e8c
Parents: b6b8a28
Author: Sylvain Lebresne sylv...@datastax.com
Authored: Thu Aug 7 16:11:38 2014 +0200
Committer: Sylvain Lebresne sylv...@datastax.com
Committed: Thu Aug 7 16:11:38 2014 +0200

--
 CHANGES.txt |   1 +
 .../apache/cassandra/tools/SSTableExport.java   | 139 +++
 2 files changed, 79 insertions(+), 61 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/f3f69cb4/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index fdff490..4392159 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.0.10
+ * Minor leak in sstable2jon (CASSANDRA-7709)
  * Add cassandra.auto_bootstrap system property (CASSANDRA-7650)
  * Remove CqlPagingRecordReader/CqlPagingInputFormat (CASSANDRA-7570)
  * Fix IncompatibleClassChangeError from hadoop2 (CASSANDRA-7229)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/f3f69cb4/src/java/org/apache/cassandra/tools/SSTableExport.java
--
diff --git a/src/java/org/apache/cassandra/tools/SSTableExport.java 
b/src/java/org/apache/cassandra/tools/SSTableExport.java
index 197585b..f8b85c3 100644
--- a/src/java/org/apache/cassandra/tools/SSTableExport.java
+++ b/src/java/org/apache/cassandra/tools/SSTableExport.java
@@ -252,20 +252,26 @@ public class SSTableExport
 throws IOException
 {
 KeyIterator iter = new KeyIterator(desc);
-DecoratedKey lastKey = null;
-while (iter.hasNext())
+try
 {
-DecoratedKey key = iter.next();
+DecoratedKey lastKey = null;
+while (iter.hasNext())
+{
+DecoratedKey key = iter.next();
 
-// validate order of the keys in the sstable
-if (lastKey != null  lastKey.compareTo(key)  0)
-throw new IOException(Key out of order!  + lastKey ++ 
key);
-lastKey = key;
+// validate order of the keys in the sstable
+if (lastKey != null  lastKey.compareTo(key)  0)
+throw new IOException(Key out of order!  + lastKey +   
 + key);
+lastKey = key;
 
-outs.println(bytesToHex(key.key));
-checkStream(outs); // flushes
+outs.println(bytesToHex(key.key));
+checkStream(outs); // flushes
+}
+}
+finally
+{
+iter.close();
 }
-iter.close();
 }
 
 /**
@@ -281,51 +287,59 @@ public class SSTableExport
 {
 SSTableReader sstable = SSTableReader.open(desc);
 RandomAccessReader dfile = sstable.openDataReader();
+try
+{
+IPartitioner? partitioner = sstable.partitioner;
 
-IPartitioner? partitioner = sstable.partitioner;
+if (excludes != null)
+toExport.removeAll(Arrays.asList(excludes));
 
-if (excludes != null)
-toExport.removeAll(Arrays.asList(excludes));
+outs.println([);
 
-outs.println([);
+int i = 0;
 
-int i = 0;
+// last key to compare order
+DecoratedKey lastKey = null;
 
-// last key to compare order
-DecoratedKey lastKey = null;
+for (String key : toExport)
+{
+DecoratedKey decoratedKey = 
partitioner.decorateKey(hexToBytes(key));
 
-for (String key : toExport)
-{
-DecoratedKey decoratedKey = 
partitioner.decorateKey(hexToBytes(key));
+if (lastKey != null  lastKey.compareTo(decoratedKey)  0)
+throw new IOException(Key out of order!  + lastKey +   
 + decoratedKey);
 
-if (lastKey != null  lastKey.compareTo(decoratedKey)  0)
-throw new IOException(Key out of order!  + lastKey ++ 
decoratedKey);
+lastKey = decoratedKey;
 
-lastKey = decoratedKey;
+RowIndexEntry entry = sstable.getPosition(decoratedKey, 
SSTableReader.Operator.EQ);
+if (entry == null)
+continue;
 
-RowIndexEntry entry = sstable.getPosition(decoratedKey, 

[2/3] git commit: Merge branch 'cassandra-2.0' into cassandra-2.1.0

2014-08-07 Thread slebresne
Merge branch 'cassandra-2.0' into cassandra-2.1.0

Conflicts:
CHANGES.txt
src/java/org/apache/cassandra/tools/SSTableExport.java


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

Branch: refs/heads/cassandra-2.1
Commit: eea547c62097ef645a4683026169d770216019e5
Parents: e0c4c6e f3f69cb
Author: Sylvain Lebresne sylv...@datastax.com
Authored: Thu Aug 7 16:18:24 2014 +0200
Committer: Sylvain Lebresne sylv...@datastax.com
Committed: Thu Aug 7 16:18:24 2014 +0200

--
 CHANGES.txt |   1 +
 .../apache/cassandra/tools/SSTableExport.java   | 131 +++
 2 files changed, 74 insertions(+), 58 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/eea547c6/CHANGES.txt
--
diff --cc CHANGES.txt
index ecc4da2,4392159..1043016
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,70 -1,17 +1,71 @@@
 -2.0.10
 +2.1.0-final
 + * cqlsh DESC CLUSTER fails retrieving ring information (CASSANDRA-7687)
 + * Fix binding null values inside UDT (CASSANDRA-7685)
 + * Fix UDT field selection with empty fields (CASSANDRA-7670)
 + * Bogus deserialization of static cells from sstable (CASSANDRA-7684)
 +Merged from 2.0:
+  * Minor leak in sstable2jon (CASSANDRA-7709)
   * Add cassandra.auto_bootstrap system property (CASSANDRA-7650)
 - * Remove CqlPagingRecordReader/CqlPagingInputFormat (CASSANDRA-7570)
 - * Fix IncompatibleClassChangeError from hadoop2 (CASSANDRA-7229)
 - * Add 'nodetool sethintedhandoffthrottlekb' (CASSANDRA-7635)
   * Update java driver (for hadoop) (CASSANDRA-7618)
 - * Fix truncate to always flush (CASSANDRA-7511)
 + * Remove CqlPagingRecordReader/CqlPagingInputFormat (CASSANDRA-7570)
 + * Support connecting to ipv6 jmx with nodetool (CASSANDRA-7669)
 +
 +
 +2.1.0-rc5
 + * Reject counters inside user types (CASSANDRA-7672)
 + * Switch to notification-based GCInspector (CASSANDRA-7638)
 + * (cqlsh) Handle nulls in UDTs and tuples correctly (CASSANDRA-7656)
 + * Don't use strict consistency when replacing (CASSANDRA-7568)
 + * Fix min/max cell name collection on 2.0 SSTables with range
 +   tombstones (CASSANDRA-7593)
 + * Tolerate min/max cell names of different lengths (CASSANDRA-7651)
 + * Filter cached results correctly (CASSANDRA-7636)
 + * Fix tracing on the new SEPExecutor (CASSANDRA-7644)
   * Remove shuffle and taketoken (CASSANDRA-7601)
 - * Switch liveRatio-related log messages to DEBUG (CASSANDRA-7467)
 - * (cqlsh) Add tab-completion for CREATE/DROP USER IF [NOT] EXISTS 
(CASSANDRA-7611)
 - * Always merge ranges owned by a single node (CASSANDRA-6930)
 - * Pig support for hadoop CqlInputFormat (CASSANDRA-6454)
 + * Clean up Windows batch scripts (CASSANDRA-7619)
 + * Fix native protocol drop user type notification (CASSANDRA-7571)
 + * Give read access to system.schema_usertypes to all authenticated users
 +   (CASSANDRA-7578)
 + * (cqlsh) Fix cqlsh display when zero rows are returned (CASSANDRA-7580)
 + * Get java version correctly when JAVA_TOOL_OPTIONS is set (CASSANDRA-7572)
 + * Fix NPE when dropping index from non-existent keyspace, AssertionError when
 +   dropping non-existent index with IF EXISTS (CASSANDRA-7590)
 + * Fix sstablelevelresetter hang (CASSANDRA-7614)
 + * (cqlsh) Fix deserialization of blobs (CASSANDRA-7603)
 + * Use keyspace updated schema change message for UDT changes in v1 and
 +   v2 protocols (CASSANDRA-7617)
 + * Fix tracing of range slices and secondary index lookups that are local
 +   to the coordinator (CASSANDRA-7599)
 + * Set -Dcassandra.storagedir for all tool shell scripts (CASSANDRA-7587)
 + * Don't swap max/min col names when mutating sstable metadata 
(CASSANDRA-7596)
 + * (cqlsh) Correctly handle paged result sets (CASSANDRA-7625)
 + * (cqlsh) Improve waiting for a trace to complete (CASSANDRA-7626)
 + * Fix tracing of concurrent range slices and 2ary index queries 
(CASSANDRA-7626)
 + * Fix scrub against collection type (CASSANDRA-7665)
 +Merged from 2.0:
 + * Set gc_grace_seconds to seven days for system schema tables 
(CASSANDRA-7668)
 + * SimpleSeedProvider no longer caches seeds forever (CASSANDRA-7663)
 + * Always flush on truncate (CASSANDRA-7511)
   * Fix ReversedType(DateType) mapping to native protocol (CASSANDRA-7576)
 + * Always merge ranges owned by a single node (CASSANDRA-6930)
 + * Track max/min timestamps for range tombstones (CASSANDRA-7647)
 + * Fix NPE when listing saved caches dir (CASSANDRA-7632)
 +
 +
 +2.1.0-rc4
 + * Fix word count hadoop example (CASSANDRA-7200)
 + * Updated memtable_cleanup_threshold and memtable_flush_writers defaults 
 +   

[3/3] git commit: Merge branch 'cassandra-2.1.0' into cassandra-2.1

2014-08-07 Thread slebresne
Merge branch 'cassandra-2.1.0' into cassandra-2.1

Conflicts:
src/java/org/apache/cassandra/tools/SSTableExport.java


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

Branch: refs/heads/cassandra-2.1
Commit: ddda54145e1c8dc77a105c5ef5d87645ed321fb8
Parents: 78b734e eea547c
Author: Sylvain Lebresne sylv...@datastax.com
Authored: Thu Aug 7 16:22:36 2014 +0200
Committer: Sylvain Lebresne sylv...@datastax.com
Committed: Thu Aug 7 16:22:36 2014 +0200

--
 CHANGES.txt |   1 +
 .../apache/cassandra/tools/SSTableExport.java   | 132 ++-
 2 files changed, 74 insertions(+), 59 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/ddda5414/CHANGES.txt
--

http://git-wip-us.apache.org/repos/asf/cassandra/blob/ddda5414/src/java/org/apache/cassandra/tools/SSTableExport.java
--
diff --cc src/java/org/apache/cassandra/tools/SSTableExport.java
index c4d693c,3572296..fca1384
--- a/src/java/org/apache/cassandra/tools/SSTableExport.java
+++ b/src/java/org/apache/cassandra/tools/SSTableExport.java
@@@ -226,20 -228,26 +226,26 @@@ public class SSTableExpor
  throws IOException
  {
  KeyIterator iter = new KeyIterator(desc);
- DecoratedKey lastKey = null;
- while (iter.hasNext())
+ try
  {
- DecoratedKey key = iter.next();
- 
- // validate order of the keys in the sstable
- if (lastKey != null  lastKey.compareTo(key)  0)
- throw new IOException(Key out of order!  + lastKey +
+ key);
- lastKey = key;
- 
- outs.println(metadata.getKeyValidator().getString(key.getKey()));
- checkStream(outs); // flushes
+ DecoratedKey lastKey = null;
+ while (iter.hasNext())
+ {
+ DecoratedKey key = iter.next();
+ 
+ // validate order of the keys in the sstable
+ if (lastKey != null  lastKey.compareTo(key)  0)
+ throw new IOException(Key out of order!  + lastKey +  
  + key);
+ lastKey = key;
+ 
 -outs.println(bytesToHex(key.getKey()));
++
outs.println(metadata.getKeyValidator().getString(key.getKey()));
+ checkStream(outs); // flushes
+ }
+ }
+ finally
+ {
+ iter.close();
  }
- iter.close();
  }
  
  /**
@@@ -256,47 -263,53 +262,52 @@@
  {
  SSTableReader sstable = SSTableReader.open(desc);
  RandomAccessReader dfile = sstable.openDataReader();
+ try
+ {
+ IPartitioner? partitioner = sstable.partitioner;
  
- IPartitioner? partitioner = sstable.partitioner;
- 
- if (excludes != null)
- toExport.removeAll(Arrays.asList(excludes));
+ if (excludes != null)
+ toExport.removeAll(Arrays.asList(excludes));
  
- outs.println([);
+ outs.println([);
  
- int i = 0;
+ int i = 0;
  
- // last key to compare order
- DecoratedKey lastKey = null;
+ // last key to compare order
+ DecoratedKey lastKey = null;
  
- for (String key : toExport)
- {
- DecoratedKey decoratedKey = 
partitioner.decorateKey(metadata.getKeyValidator().fromString(key));
+ for (String key : toExport)
+ {
 -DecoratedKey decoratedKey = 
partitioner.decorateKey(hexToBytes(key));
 -
++DecoratedKey decoratedKey = 
partitioner.decorateKey(metadata.getKeyValidator().fromString(key));
+ if (lastKey != null  lastKey.compareTo(decoratedKey)  0)
+ throw new IOException(Key out of order!  + lastKey +  
  + decoratedKey);
  
- if (lastKey != null  lastKey.compareTo(decoratedKey)  0)
- throw new IOException(Key out of order!  + lastKey +
+ decoratedKey);
+ lastKey = decoratedKey;
  
- lastKey = decoratedKey;
+ RowIndexEntry entry = sstable.getPosition(decoratedKey, 
SSTableReader.Operator.EQ);
+ if (entry == null)
+ continue;
  
- RowIndexEntry entry = sstable.getPosition(decoratedKey, 
SSTableReader.Operator.EQ);
- if (entry == null)
- continue;
+ dfile.seek(entry.position);
+ 

[2/4] git commit: Merge branch 'cassandra-2.0' into cassandra-2.1.0

2014-08-07 Thread slebresne
Merge branch 'cassandra-2.0' into cassandra-2.1.0

Conflicts:
CHANGES.txt
src/java/org/apache/cassandra/tools/SSTableExport.java


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

Branch: refs/heads/trunk
Commit: eea547c62097ef645a4683026169d770216019e5
Parents: e0c4c6e f3f69cb
Author: Sylvain Lebresne sylv...@datastax.com
Authored: Thu Aug 7 16:18:24 2014 +0200
Committer: Sylvain Lebresne sylv...@datastax.com
Committed: Thu Aug 7 16:18:24 2014 +0200

--
 CHANGES.txt |   1 +
 .../apache/cassandra/tools/SSTableExport.java   | 131 +++
 2 files changed, 74 insertions(+), 58 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/eea547c6/CHANGES.txt
--
diff --cc CHANGES.txt
index ecc4da2,4392159..1043016
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,70 -1,17 +1,71 @@@
 -2.0.10
 +2.1.0-final
 + * cqlsh DESC CLUSTER fails retrieving ring information (CASSANDRA-7687)
 + * Fix binding null values inside UDT (CASSANDRA-7685)
 + * Fix UDT field selection with empty fields (CASSANDRA-7670)
 + * Bogus deserialization of static cells from sstable (CASSANDRA-7684)
 +Merged from 2.0:
+  * Minor leak in sstable2jon (CASSANDRA-7709)
   * Add cassandra.auto_bootstrap system property (CASSANDRA-7650)
 - * Remove CqlPagingRecordReader/CqlPagingInputFormat (CASSANDRA-7570)
 - * Fix IncompatibleClassChangeError from hadoop2 (CASSANDRA-7229)
 - * Add 'nodetool sethintedhandoffthrottlekb' (CASSANDRA-7635)
   * Update java driver (for hadoop) (CASSANDRA-7618)
 - * Fix truncate to always flush (CASSANDRA-7511)
 + * Remove CqlPagingRecordReader/CqlPagingInputFormat (CASSANDRA-7570)
 + * Support connecting to ipv6 jmx with nodetool (CASSANDRA-7669)
 +
 +
 +2.1.0-rc5
 + * Reject counters inside user types (CASSANDRA-7672)
 + * Switch to notification-based GCInspector (CASSANDRA-7638)
 + * (cqlsh) Handle nulls in UDTs and tuples correctly (CASSANDRA-7656)
 + * Don't use strict consistency when replacing (CASSANDRA-7568)
 + * Fix min/max cell name collection on 2.0 SSTables with range
 +   tombstones (CASSANDRA-7593)
 + * Tolerate min/max cell names of different lengths (CASSANDRA-7651)
 + * Filter cached results correctly (CASSANDRA-7636)
 + * Fix tracing on the new SEPExecutor (CASSANDRA-7644)
   * Remove shuffle and taketoken (CASSANDRA-7601)
 - * Switch liveRatio-related log messages to DEBUG (CASSANDRA-7467)
 - * (cqlsh) Add tab-completion for CREATE/DROP USER IF [NOT] EXISTS 
(CASSANDRA-7611)
 - * Always merge ranges owned by a single node (CASSANDRA-6930)
 - * Pig support for hadoop CqlInputFormat (CASSANDRA-6454)
 + * Clean up Windows batch scripts (CASSANDRA-7619)
 + * Fix native protocol drop user type notification (CASSANDRA-7571)
 + * Give read access to system.schema_usertypes to all authenticated users
 +   (CASSANDRA-7578)
 + * (cqlsh) Fix cqlsh display when zero rows are returned (CASSANDRA-7580)
 + * Get java version correctly when JAVA_TOOL_OPTIONS is set (CASSANDRA-7572)
 + * Fix NPE when dropping index from non-existent keyspace, AssertionError when
 +   dropping non-existent index with IF EXISTS (CASSANDRA-7590)
 + * Fix sstablelevelresetter hang (CASSANDRA-7614)
 + * (cqlsh) Fix deserialization of blobs (CASSANDRA-7603)
 + * Use keyspace updated schema change message for UDT changes in v1 and
 +   v2 protocols (CASSANDRA-7617)
 + * Fix tracing of range slices and secondary index lookups that are local
 +   to the coordinator (CASSANDRA-7599)
 + * Set -Dcassandra.storagedir for all tool shell scripts (CASSANDRA-7587)
 + * Don't swap max/min col names when mutating sstable metadata 
(CASSANDRA-7596)
 + * (cqlsh) Correctly handle paged result sets (CASSANDRA-7625)
 + * (cqlsh) Improve waiting for a trace to complete (CASSANDRA-7626)
 + * Fix tracing of concurrent range slices and 2ary index queries 
(CASSANDRA-7626)
 + * Fix scrub against collection type (CASSANDRA-7665)
 +Merged from 2.0:
 + * Set gc_grace_seconds to seven days for system schema tables 
(CASSANDRA-7668)
 + * SimpleSeedProvider no longer caches seeds forever (CASSANDRA-7663)
 + * Always flush on truncate (CASSANDRA-7511)
   * Fix ReversedType(DateType) mapping to native protocol (CASSANDRA-7576)
 + * Always merge ranges owned by a single node (CASSANDRA-6930)
 + * Track max/min timestamps for range tombstones (CASSANDRA-7647)
 + * Fix NPE when listing saved caches dir (CASSANDRA-7632)
 +
 +
 +2.1.0-rc4
 + * Fix word count hadoop example (CASSANDRA-7200)
 + * Updated memtable_cleanup_threshold and memtable_flush_writers defaults 
 +   

[4/4] git commit: Merge branch 'cassandra-2.1' into trunk

2014-08-07 Thread slebresne
Merge branch 'cassandra-2.1' into trunk


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

Branch: refs/heads/trunk
Commit: 46193d7548aefb2f7c7b33597b282c0361e204fc
Parents: 17055bf ddda541
Author: Sylvain Lebresne sylv...@datastax.com
Authored: Thu Aug 7 16:22:52 2014 +0200
Committer: Sylvain Lebresne sylv...@datastax.com
Committed: Thu Aug 7 16:22:52 2014 +0200

--
 CHANGES.txt |   1 +
 .../apache/cassandra/tools/SSTableExport.java   | 132 ++-
 2 files changed, 74 insertions(+), 59 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/46193d75/CHANGES.txt
--

http://git-wip-us.apache.org/repos/asf/cassandra/blob/46193d75/src/java/org/apache/cassandra/tools/SSTableExport.java
--



[1/4] git commit: Fix minor potential leak in sstable2json

2014-08-07 Thread slebresne
Repository: cassandra
Updated Branches:
  refs/heads/trunk 17055bfdb - 46193d754


Fix minor potential leak in sstable2json

patch by blerer; reviewed by slebresne for CASSANDRA-7709


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

Branch: refs/heads/trunk
Commit: f3f69cb47319bbc7d3c1e1aa1d48076e4a155e8c
Parents: b6b8a28
Author: Sylvain Lebresne sylv...@datastax.com
Authored: Thu Aug 7 16:11:38 2014 +0200
Committer: Sylvain Lebresne sylv...@datastax.com
Committed: Thu Aug 7 16:11:38 2014 +0200

--
 CHANGES.txt |   1 +
 .../apache/cassandra/tools/SSTableExport.java   | 139 +++
 2 files changed, 79 insertions(+), 61 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/f3f69cb4/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index fdff490..4392159 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.0.10
+ * Minor leak in sstable2jon (CASSANDRA-7709)
  * Add cassandra.auto_bootstrap system property (CASSANDRA-7650)
  * Remove CqlPagingRecordReader/CqlPagingInputFormat (CASSANDRA-7570)
  * Fix IncompatibleClassChangeError from hadoop2 (CASSANDRA-7229)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/f3f69cb4/src/java/org/apache/cassandra/tools/SSTableExport.java
--
diff --git a/src/java/org/apache/cassandra/tools/SSTableExport.java 
b/src/java/org/apache/cassandra/tools/SSTableExport.java
index 197585b..f8b85c3 100644
--- a/src/java/org/apache/cassandra/tools/SSTableExport.java
+++ b/src/java/org/apache/cassandra/tools/SSTableExport.java
@@ -252,20 +252,26 @@ public class SSTableExport
 throws IOException
 {
 KeyIterator iter = new KeyIterator(desc);
-DecoratedKey lastKey = null;
-while (iter.hasNext())
+try
 {
-DecoratedKey key = iter.next();
+DecoratedKey lastKey = null;
+while (iter.hasNext())
+{
+DecoratedKey key = iter.next();
 
-// validate order of the keys in the sstable
-if (lastKey != null  lastKey.compareTo(key)  0)
-throw new IOException(Key out of order!  + lastKey ++ 
key);
-lastKey = key;
+// validate order of the keys in the sstable
+if (lastKey != null  lastKey.compareTo(key)  0)
+throw new IOException(Key out of order!  + lastKey +   
 + key);
+lastKey = key;
 
-outs.println(bytesToHex(key.key));
-checkStream(outs); // flushes
+outs.println(bytesToHex(key.key));
+checkStream(outs); // flushes
+}
+}
+finally
+{
+iter.close();
 }
-iter.close();
 }
 
 /**
@@ -281,51 +287,59 @@ public class SSTableExport
 {
 SSTableReader sstable = SSTableReader.open(desc);
 RandomAccessReader dfile = sstable.openDataReader();
+try
+{
+IPartitioner? partitioner = sstable.partitioner;
 
-IPartitioner? partitioner = sstable.partitioner;
+if (excludes != null)
+toExport.removeAll(Arrays.asList(excludes));
 
-if (excludes != null)
-toExport.removeAll(Arrays.asList(excludes));
+outs.println([);
 
-outs.println([);
+int i = 0;
 
-int i = 0;
+// last key to compare order
+DecoratedKey lastKey = null;
 
-// last key to compare order
-DecoratedKey lastKey = null;
+for (String key : toExport)
+{
+DecoratedKey decoratedKey = 
partitioner.decorateKey(hexToBytes(key));
 
-for (String key : toExport)
-{
-DecoratedKey decoratedKey = 
partitioner.decorateKey(hexToBytes(key));
+if (lastKey != null  lastKey.compareTo(decoratedKey)  0)
+throw new IOException(Key out of order!  + lastKey +   
 + decoratedKey);
 
-if (lastKey != null  lastKey.compareTo(decoratedKey)  0)
-throw new IOException(Key out of order!  + lastKey ++ 
decoratedKey);
+lastKey = decoratedKey;
 
-lastKey = decoratedKey;
+RowIndexEntry entry = sstable.getPosition(decoratedKey, 
SSTableReader.Operator.EQ);
+if (entry == null)
+continue;
 
-RowIndexEntry entry = sstable.getPosition(decoratedKey, 
SSTableReader.Operator.EQ);

[3/4] git commit: Merge branch 'cassandra-2.1.0' into cassandra-2.1

2014-08-07 Thread slebresne
Merge branch 'cassandra-2.1.0' into cassandra-2.1

Conflicts:
src/java/org/apache/cassandra/tools/SSTableExport.java


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

Branch: refs/heads/trunk
Commit: ddda54145e1c8dc77a105c5ef5d87645ed321fb8
Parents: 78b734e eea547c
Author: Sylvain Lebresne sylv...@datastax.com
Authored: Thu Aug 7 16:22:36 2014 +0200
Committer: Sylvain Lebresne sylv...@datastax.com
Committed: Thu Aug 7 16:22:36 2014 +0200

--
 CHANGES.txt |   1 +
 .../apache/cassandra/tools/SSTableExport.java   | 132 ++-
 2 files changed, 74 insertions(+), 59 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/ddda5414/CHANGES.txt
--

http://git-wip-us.apache.org/repos/asf/cassandra/blob/ddda5414/src/java/org/apache/cassandra/tools/SSTableExport.java
--
diff --cc src/java/org/apache/cassandra/tools/SSTableExport.java
index c4d693c,3572296..fca1384
--- a/src/java/org/apache/cassandra/tools/SSTableExport.java
+++ b/src/java/org/apache/cassandra/tools/SSTableExport.java
@@@ -226,20 -228,26 +226,26 @@@ public class SSTableExpor
  throws IOException
  {
  KeyIterator iter = new KeyIterator(desc);
- DecoratedKey lastKey = null;
- while (iter.hasNext())
+ try
  {
- DecoratedKey key = iter.next();
- 
- // validate order of the keys in the sstable
- if (lastKey != null  lastKey.compareTo(key)  0)
- throw new IOException(Key out of order!  + lastKey +
+ key);
- lastKey = key;
- 
- outs.println(metadata.getKeyValidator().getString(key.getKey()));
- checkStream(outs); // flushes
+ DecoratedKey lastKey = null;
+ while (iter.hasNext())
+ {
+ DecoratedKey key = iter.next();
+ 
+ // validate order of the keys in the sstable
+ if (lastKey != null  lastKey.compareTo(key)  0)
+ throw new IOException(Key out of order!  + lastKey +  
  + key);
+ lastKey = key;
+ 
 -outs.println(bytesToHex(key.getKey()));
++
outs.println(metadata.getKeyValidator().getString(key.getKey()));
+ checkStream(outs); // flushes
+ }
+ }
+ finally
+ {
+ iter.close();
  }
- iter.close();
  }
  
  /**
@@@ -256,47 -263,53 +262,52 @@@
  {
  SSTableReader sstable = SSTableReader.open(desc);
  RandomAccessReader dfile = sstable.openDataReader();
+ try
+ {
+ IPartitioner? partitioner = sstable.partitioner;
  
- IPartitioner? partitioner = sstable.partitioner;
- 
- if (excludes != null)
- toExport.removeAll(Arrays.asList(excludes));
+ if (excludes != null)
+ toExport.removeAll(Arrays.asList(excludes));
  
- outs.println([);
+ outs.println([);
  
- int i = 0;
+ int i = 0;
  
- // last key to compare order
- DecoratedKey lastKey = null;
+ // last key to compare order
+ DecoratedKey lastKey = null;
  
- for (String key : toExport)
- {
- DecoratedKey decoratedKey = 
partitioner.decorateKey(metadata.getKeyValidator().fromString(key));
+ for (String key : toExport)
+ {
 -DecoratedKey decoratedKey = 
partitioner.decorateKey(hexToBytes(key));
 -
++DecoratedKey decoratedKey = 
partitioner.decorateKey(metadata.getKeyValidator().fromString(key));
+ if (lastKey != null  lastKey.compareTo(decoratedKey)  0)
+ throw new IOException(Key out of order!  + lastKey +  
  + decoratedKey);
  
- if (lastKey != null  lastKey.compareTo(decoratedKey)  0)
- throw new IOException(Key out of order!  + lastKey +
+ decoratedKey);
+ lastKey = decoratedKey;
  
- lastKey = decoratedKey;
+ RowIndexEntry entry = sstable.getPosition(decoratedKey, 
SSTableReader.Operator.EQ);
+ if (entry == null)
+ continue;
  
- RowIndexEntry entry = sstable.getPosition(decoratedKey, 
SSTableReader.Operator.EQ);
- if (entry == null)
- continue;
+ dfile.seek(entry.position);
+ 

[2/3] git commit: Avoid logging CompactionInterrupted at ERROR patch by marcuse; reviewed by jbellis for CASSANDRA-7694

2014-08-07 Thread jbellis
Avoid logging CompactionInterrupted at ERROR
patch by marcuse; reviewed by jbellis for CASSANDRA-7694


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

Branch: refs/heads/cassandra-2.1.0
Commit: 6e6a6c39794a06dfdaf7c5499e58b532188e7896
Parents: f3f69cb
Author: Jonathan Ellis jbel...@apache.org
Authored: Thu Aug 7 09:21:30 2014 -0500
Committer: Jonathan Ellis jbel...@apache.org
Committed: Thu Aug 7 09:21:30 2014 -0500

--
 CHANGES.txt  | 1 +
 .../cassandra/concurrent/DebuggableThreadPoolExecutor.java   | 8 ++--
 .../apache/cassandra/db/compaction/CompactionManager.java| 4 ++--
 3 files changed, 9 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/6e6a6c39/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 4392159..915aeea 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.0.10
+ * Avoid logging CompactionInterrupted at ERROR (CASSANDRA-7694)
  * Minor leak in sstable2jon (CASSANDRA-7709)
  * Add cassandra.auto_bootstrap system property (CASSANDRA-7650)
  * Remove CqlPagingRecordReader/CqlPagingInputFormat (CASSANDRA-7570)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/6e6a6c39/src/java/org/apache/cassandra/concurrent/DebuggableThreadPoolExecutor.java
--
diff --git 
a/src/java/org/apache/cassandra/concurrent/DebuggableThreadPoolExecutor.java 
b/src/java/org/apache/cassandra/concurrent/DebuggableThreadPoolExecutor.java
index 665f0b0..8e4dc7a 100644
--- a/src/java/org/apache/cassandra/concurrent/DebuggableThreadPoolExecutor.java
+++ b/src/java/org/apache/cassandra/concurrent/DebuggableThreadPoolExecutor.java
@@ -172,6 +172,12 @@ public class DebuggableThreadPoolExecutor extends 
ThreadPoolExecutor implements
 {
 super.afterExecute(r, t);
 
+maybeResetTraceSessionWrapper(r);
+logExceptionsAfterExecute(r, t);
+}
+
+protected static void maybeResetTraceSessionWrapper(Runnable r)
+{
 if (r instanceof TraceSessionWrapper)
 {
 TraceSessionWrapper tsw = (TraceSessionWrapper) r;
@@ -179,8 +185,6 @@ public class DebuggableThreadPoolExecutor extends 
ThreadPoolExecutor implements
 // and if left this thread might start tracing unrelated tasks
 tsw.reset();
 }
-
-logExceptionsAfterExecute(r, t);
 }
 
 @Override

http://git-wip-us.apache.org/repos/asf/cassandra/blob/6e6a6c39/src/java/org/apache/cassandra/db/compaction/CompactionManager.java
--
diff --git a/src/java/org/apache/cassandra/db/compaction/CompactionManager.java 
b/src/java/org/apache/cassandra/db/compaction/CompactionManager.java
index 2708e4c..e804f1d 100644
--- a/src/java/org/apache/cassandra/db/compaction/CompactionManager.java
+++ b/src/java/org/apache/cassandra/db/compaction/CompactionManager.java
@@ -956,8 +956,8 @@ public class CompactionManager implements 
CompactionManagerMBean
 @Override
 public void afterExecute(Runnable r, Throwable t)
 {
-super.afterExecute(r, t);
-
+DebuggableThreadPoolExecutor.maybeResetTraceSessionWrapper(r);
+
 if (t == null)
 t = DebuggableThreadPoolExecutor.extractThrowable(r);
 



[1/3] git commit: Avoid logging CompactionInterrupted at ERROR patch by marcuse; reviewed by jbellis for CASSANDRA-7694

2014-08-07 Thread jbellis
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-2.0 f3f69cb47 - 6e6a6c397
  refs/heads/cassandra-2.1.0 eea547c62 - 33de6dc11


Avoid logging CompactionInterrupted at ERROR
patch by marcuse; reviewed by jbellis for CASSANDRA-7694


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

Branch: refs/heads/cassandra-2.0
Commit: 6e6a6c39794a06dfdaf7c5499e58b532188e7896
Parents: f3f69cb
Author: Jonathan Ellis jbel...@apache.org
Authored: Thu Aug 7 09:21:30 2014 -0500
Committer: Jonathan Ellis jbel...@apache.org
Committed: Thu Aug 7 09:21:30 2014 -0500

--
 CHANGES.txt  | 1 +
 .../cassandra/concurrent/DebuggableThreadPoolExecutor.java   | 8 ++--
 .../apache/cassandra/db/compaction/CompactionManager.java| 4 ++--
 3 files changed, 9 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/6e6a6c39/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 4392159..915aeea 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.0.10
+ * Avoid logging CompactionInterrupted at ERROR (CASSANDRA-7694)
  * Minor leak in sstable2jon (CASSANDRA-7709)
  * Add cassandra.auto_bootstrap system property (CASSANDRA-7650)
  * Remove CqlPagingRecordReader/CqlPagingInputFormat (CASSANDRA-7570)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/6e6a6c39/src/java/org/apache/cassandra/concurrent/DebuggableThreadPoolExecutor.java
--
diff --git 
a/src/java/org/apache/cassandra/concurrent/DebuggableThreadPoolExecutor.java 
b/src/java/org/apache/cassandra/concurrent/DebuggableThreadPoolExecutor.java
index 665f0b0..8e4dc7a 100644
--- a/src/java/org/apache/cassandra/concurrent/DebuggableThreadPoolExecutor.java
+++ b/src/java/org/apache/cassandra/concurrent/DebuggableThreadPoolExecutor.java
@@ -172,6 +172,12 @@ public class DebuggableThreadPoolExecutor extends 
ThreadPoolExecutor implements
 {
 super.afterExecute(r, t);
 
+maybeResetTraceSessionWrapper(r);
+logExceptionsAfterExecute(r, t);
+}
+
+protected static void maybeResetTraceSessionWrapper(Runnable r)
+{
 if (r instanceof TraceSessionWrapper)
 {
 TraceSessionWrapper tsw = (TraceSessionWrapper) r;
@@ -179,8 +185,6 @@ public class DebuggableThreadPoolExecutor extends 
ThreadPoolExecutor implements
 // and if left this thread might start tracing unrelated tasks
 tsw.reset();
 }
-
-logExceptionsAfterExecute(r, t);
 }
 
 @Override

http://git-wip-us.apache.org/repos/asf/cassandra/blob/6e6a6c39/src/java/org/apache/cassandra/db/compaction/CompactionManager.java
--
diff --git a/src/java/org/apache/cassandra/db/compaction/CompactionManager.java 
b/src/java/org/apache/cassandra/db/compaction/CompactionManager.java
index 2708e4c..e804f1d 100644
--- a/src/java/org/apache/cassandra/db/compaction/CompactionManager.java
+++ b/src/java/org/apache/cassandra/db/compaction/CompactionManager.java
@@ -956,8 +956,8 @@ public class CompactionManager implements 
CompactionManagerMBean
 @Override
 public void afterExecute(Runnable r, Throwable t)
 {
-super.afterExecute(r, t);
-
+DebuggableThreadPoolExecutor.maybeResetTraceSessionWrapper(r);
+
 if (t == null)
 t = DebuggableThreadPoolExecutor.extractThrowable(r);
 



[3/3] git commit: merge from 2.0

2014-08-07 Thread jbellis
merge from 2.0


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

Branch: refs/heads/cassandra-2.1.0
Commit: 33de6dc112c7a1e7ebc84bf6079a7768d7d94492
Parents: eea547c 6e6a6c3
Author: Jonathan Ellis jbel...@apache.org
Authored: Thu Aug 7 09:21:59 2014 -0500
Committer: Jonathan Ellis jbel...@apache.org
Committed: Thu Aug 7 09:21:59 2014 -0500

--
 CHANGES.txt  | 1 +
 .../cassandra/concurrent/DebuggableThreadPoolExecutor.java   | 8 ++--
 .../apache/cassandra/db/compaction/CompactionManager.java| 4 ++--
 3 files changed, 9 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/33de6dc1/CHANGES.txt
--
diff --cc CHANGES.txt
index 1043016,915aeea..dfeca21
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,71 -1,18 +1,72 @@@
 -2.0.10
 +2.1.0-final
 + * cqlsh DESC CLUSTER fails retrieving ring information (CASSANDRA-7687)
 + * Fix binding null values inside UDT (CASSANDRA-7685)
 + * Fix UDT field selection with empty fields (CASSANDRA-7670)
 + * Bogus deserialization of static cells from sstable (CASSANDRA-7684)
 +Merged from 2.0:
+  * Avoid logging CompactionInterrupted at ERROR (CASSANDRA-7694)
   * Minor leak in sstable2jon (CASSANDRA-7709)
   * Add cassandra.auto_bootstrap system property (CASSANDRA-7650)
 - * Remove CqlPagingRecordReader/CqlPagingInputFormat (CASSANDRA-7570)
 - * Fix IncompatibleClassChangeError from hadoop2 (CASSANDRA-7229)
 - * Add 'nodetool sethintedhandoffthrottlekb' (CASSANDRA-7635)
   * Update java driver (for hadoop) (CASSANDRA-7618)
 - * Fix truncate to always flush (CASSANDRA-7511)
 + * Remove CqlPagingRecordReader/CqlPagingInputFormat (CASSANDRA-7570)
 + * Support connecting to ipv6 jmx with nodetool (CASSANDRA-7669)
 +
 +
 +2.1.0-rc5
 + * Reject counters inside user types (CASSANDRA-7672)
 + * Switch to notification-based GCInspector (CASSANDRA-7638)
 + * (cqlsh) Handle nulls in UDTs and tuples correctly (CASSANDRA-7656)
 + * Don't use strict consistency when replacing (CASSANDRA-7568)
 + * Fix min/max cell name collection on 2.0 SSTables with range
 +   tombstones (CASSANDRA-7593)
 + * Tolerate min/max cell names of different lengths (CASSANDRA-7651)
 + * Filter cached results correctly (CASSANDRA-7636)
 + * Fix tracing on the new SEPExecutor (CASSANDRA-7644)
   * Remove shuffle and taketoken (CASSANDRA-7601)
 - * Switch liveRatio-related log messages to DEBUG (CASSANDRA-7467)
 - * (cqlsh) Add tab-completion for CREATE/DROP USER IF [NOT] EXISTS 
(CASSANDRA-7611)
 - * Always merge ranges owned by a single node (CASSANDRA-6930)
 - * Pig support for hadoop CqlInputFormat (CASSANDRA-6454)
 + * Clean up Windows batch scripts (CASSANDRA-7619)
 + * Fix native protocol drop user type notification (CASSANDRA-7571)
 + * Give read access to system.schema_usertypes to all authenticated users
 +   (CASSANDRA-7578)
 + * (cqlsh) Fix cqlsh display when zero rows are returned (CASSANDRA-7580)
 + * Get java version correctly when JAVA_TOOL_OPTIONS is set (CASSANDRA-7572)
 + * Fix NPE when dropping index from non-existent keyspace, AssertionError when
 +   dropping non-existent index with IF EXISTS (CASSANDRA-7590)
 + * Fix sstablelevelresetter hang (CASSANDRA-7614)
 + * (cqlsh) Fix deserialization of blobs (CASSANDRA-7603)
 + * Use keyspace updated schema change message for UDT changes in v1 and
 +   v2 protocols (CASSANDRA-7617)
 + * Fix tracing of range slices and secondary index lookups that are local
 +   to the coordinator (CASSANDRA-7599)
 + * Set -Dcassandra.storagedir for all tool shell scripts (CASSANDRA-7587)
 + * Don't swap max/min col names when mutating sstable metadata 
(CASSANDRA-7596)
 + * (cqlsh) Correctly handle paged result sets (CASSANDRA-7625)
 + * (cqlsh) Improve waiting for a trace to complete (CASSANDRA-7626)
 + * Fix tracing of concurrent range slices and 2ary index queries 
(CASSANDRA-7626)
 + * Fix scrub against collection type (CASSANDRA-7665)
 +Merged from 2.0:
 + * Set gc_grace_seconds to seven days for system schema tables 
(CASSANDRA-7668)
 + * SimpleSeedProvider no longer caches seeds forever (CASSANDRA-7663)
 + * Always flush on truncate (CASSANDRA-7511)
   * Fix ReversedType(DateType) mapping to native protocol (CASSANDRA-7576)
 + * Always merge ranges owned by a single node (CASSANDRA-6930)
 + * Track max/min timestamps for range tombstones (CASSANDRA-7647)
 + * Fix NPE when listing saved caches dir (CASSANDRA-7632)
 +
 +
 +2.1.0-rc4
 + * Fix word count hadoop example (CASSANDRA-7200)
 + * Updated memtable_cleanup_threshold and memtable_flush_writers defaults 
 

[jira] [Commented] (CASSANDRA-7694) Expected Compaction Interruption is logged as ERROR

2014-08-07 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis commented on CASSANDRA-7694:
---

LGTM, committed

 Expected Compaction Interruption is logged as ERROR
 ---

 Key: CASSANDRA-7694
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7694
 Project: Cassandra
  Issue Type: Bug
  Components: Core
 Environment: OSX and Ubuntu 14.04
Reporter: Philip Thompson
Assignee: Marcus Eriksson
Priority: Minor
 Fix For: 2.0.10, 2.1.0

 Attachments: 0001-dont-call-super-in-afterExecute.patch, 
 compaction_error.log


 As seen in the attached log, occasionally a major compaction will interrupt 
 other running compactions. This is not an error and is expected behavior. 
 However this is logged at ERROR. 



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[1/2] git commit: Fix minor potential leak in sstable2json

2014-08-07 Thread slebresne
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-2.1.0 e0c4c6e60 - eea547c62


Fix minor potential leak in sstable2json

patch by blerer; reviewed by slebresne for CASSANDRA-7709


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

Branch: refs/heads/cassandra-2.1.0
Commit: f3f69cb47319bbc7d3c1e1aa1d48076e4a155e8c
Parents: b6b8a28
Author: Sylvain Lebresne sylv...@datastax.com
Authored: Thu Aug 7 16:11:38 2014 +0200
Committer: Sylvain Lebresne sylv...@datastax.com
Committed: Thu Aug 7 16:11:38 2014 +0200

--
 CHANGES.txt |   1 +
 .../apache/cassandra/tools/SSTableExport.java   | 139 +++
 2 files changed, 79 insertions(+), 61 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/f3f69cb4/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index fdff490..4392159 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.0.10
+ * Minor leak in sstable2jon (CASSANDRA-7709)
  * Add cassandra.auto_bootstrap system property (CASSANDRA-7650)
  * Remove CqlPagingRecordReader/CqlPagingInputFormat (CASSANDRA-7570)
  * Fix IncompatibleClassChangeError from hadoop2 (CASSANDRA-7229)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/f3f69cb4/src/java/org/apache/cassandra/tools/SSTableExport.java
--
diff --git a/src/java/org/apache/cassandra/tools/SSTableExport.java 
b/src/java/org/apache/cassandra/tools/SSTableExport.java
index 197585b..f8b85c3 100644
--- a/src/java/org/apache/cassandra/tools/SSTableExport.java
+++ b/src/java/org/apache/cassandra/tools/SSTableExport.java
@@ -252,20 +252,26 @@ public class SSTableExport
 throws IOException
 {
 KeyIterator iter = new KeyIterator(desc);
-DecoratedKey lastKey = null;
-while (iter.hasNext())
+try
 {
-DecoratedKey key = iter.next();
+DecoratedKey lastKey = null;
+while (iter.hasNext())
+{
+DecoratedKey key = iter.next();
 
-// validate order of the keys in the sstable
-if (lastKey != null  lastKey.compareTo(key)  0)
-throw new IOException(Key out of order!  + lastKey ++ 
key);
-lastKey = key;
+// validate order of the keys in the sstable
+if (lastKey != null  lastKey.compareTo(key)  0)
+throw new IOException(Key out of order!  + lastKey +   
 + key);
+lastKey = key;
 
-outs.println(bytesToHex(key.key));
-checkStream(outs); // flushes
+outs.println(bytesToHex(key.key));
+checkStream(outs); // flushes
+}
+}
+finally
+{
+iter.close();
 }
-iter.close();
 }
 
 /**
@@ -281,51 +287,59 @@ public class SSTableExport
 {
 SSTableReader sstable = SSTableReader.open(desc);
 RandomAccessReader dfile = sstable.openDataReader();
+try
+{
+IPartitioner? partitioner = sstable.partitioner;
 
-IPartitioner? partitioner = sstable.partitioner;
+if (excludes != null)
+toExport.removeAll(Arrays.asList(excludes));
 
-if (excludes != null)
-toExport.removeAll(Arrays.asList(excludes));
+outs.println([);
 
-outs.println([);
+int i = 0;
 
-int i = 0;
+// last key to compare order
+DecoratedKey lastKey = null;
 
-// last key to compare order
-DecoratedKey lastKey = null;
+for (String key : toExport)
+{
+DecoratedKey decoratedKey = 
partitioner.decorateKey(hexToBytes(key));
 
-for (String key : toExport)
-{
-DecoratedKey decoratedKey = 
partitioner.decorateKey(hexToBytes(key));
+if (lastKey != null  lastKey.compareTo(decoratedKey)  0)
+throw new IOException(Key out of order!  + lastKey +   
 + decoratedKey);
 
-if (lastKey != null  lastKey.compareTo(decoratedKey)  0)
-throw new IOException(Key out of order!  + lastKey ++ 
decoratedKey);
+lastKey = decoratedKey;
 
-lastKey = decoratedKey;
+RowIndexEntry entry = sstable.getPosition(decoratedKey, 
SSTableReader.Operator.EQ);
+if (entry == null)
+continue;
 
-RowIndexEntry entry = sstable.getPosition(decoratedKey, 

[7/9] git commit: Merge branch 'cassandra-2.1' into trunk

2014-08-07 Thread jbellis
Merge branch 'cassandra-2.1' into trunk


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

Branch: refs/heads/trunk
Commit: f95b40c1de385108b47e5aa32c0057c120e2ac03
Parents: 17055bf 24d8571
Author: Jonathan Ellis jbel...@apache.org
Authored: Thu Aug 7 09:25:25 2014 -0500
Committer: Jonathan Ellis jbel...@apache.org
Committed: Thu Aug 7 09:25:25 2014 -0500

--
 CHANGES.txt |   2 +
 .../DebuggableThreadPoolExecutor.java   |   8 +-
 .../db/compaction/CompactionManager.java|   4 +-
 .../apache/cassandra/tools/SSTableExport.java   | 131 +++
 4 files changed, 83 insertions(+), 62 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/f95b40c1/CHANGES.txt
--

http://git-wip-us.apache.org/repos/asf/cassandra/blob/f95b40c1/src/java/org/apache/cassandra/db/compaction/CompactionManager.java
--

http://git-wip-us.apache.org/repos/asf/cassandra/blob/f95b40c1/src/java/org/apache/cassandra/tools/SSTableExport.java
--



[4/9] git commit: merge from 2.0

2014-08-07 Thread jbellis
merge from 2.0


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

Branch: refs/heads/trunk
Commit: 33de6dc112c7a1e7ebc84bf6079a7768d7d94492
Parents: eea547c 6e6a6c3
Author: Jonathan Ellis jbel...@apache.org
Authored: Thu Aug 7 09:21:59 2014 -0500
Committer: Jonathan Ellis jbel...@apache.org
Committed: Thu Aug 7 09:21:59 2014 -0500

--
 CHANGES.txt  | 1 +
 .../cassandra/concurrent/DebuggableThreadPoolExecutor.java   | 8 ++--
 .../apache/cassandra/db/compaction/CompactionManager.java| 4 ++--
 3 files changed, 9 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/33de6dc1/CHANGES.txt
--
diff --cc CHANGES.txt
index 1043016,915aeea..dfeca21
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,71 -1,18 +1,72 @@@
 -2.0.10
 +2.1.0-final
 + * cqlsh DESC CLUSTER fails retrieving ring information (CASSANDRA-7687)
 + * Fix binding null values inside UDT (CASSANDRA-7685)
 + * Fix UDT field selection with empty fields (CASSANDRA-7670)
 + * Bogus deserialization of static cells from sstable (CASSANDRA-7684)
 +Merged from 2.0:
+  * Avoid logging CompactionInterrupted at ERROR (CASSANDRA-7694)
   * Minor leak in sstable2jon (CASSANDRA-7709)
   * Add cassandra.auto_bootstrap system property (CASSANDRA-7650)
 - * Remove CqlPagingRecordReader/CqlPagingInputFormat (CASSANDRA-7570)
 - * Fix IncompatibleClassChangeError from hadoop2 (CASSANDRA-7229)
 - * Add 'nodetool sethintedhandoffthrottlekb' (CASSANDRA-7635)
   * Update java driver (for hadoop) (CASSANDRA-7618)
 - * Fix truncate to always flush (CASSANDRA-7511)
 + * Remove CqlPagingRecordReader/CqlPagingInputFormat (CASSANDRA-7570)
 + * Support connecting to ipv6 jmx with nodetool (CASSANDRA-7669)
 +
 +
 +2.1.0-rc5
 + * Reject counters inside user types (CASSANDRA-7672)
 + * Switch to notification-based GCInspector (CASSANDRA-7638)
 + * (cqlsh) Handle nulls in UDTs and tuples correctly (CASSANDRA-7656)
 + * Don't use strict consistency when replacing (CASSANDRA-7568)
 + * Fix min/max cell name collection on 2.0 SSTables with range
 +   tombstones (CASSANDRA-7593)
 + * Tolerate min/max cell names of different lengths (CASSANDRA-7651)
 + * Filter cached results correctly (CASSANDRA-7636)
 + * Fix tracing on the new SEPExecutor (CASSANDRA-7644)
   * Remove shuffle and taketoken (CASSANDRA-7601)
 - * Switch liveRatio-related log messages to DEBUG (CASSANDRA-7467)
 - * (cqlsh) Add tab-completion for CREATE/DROP USER IF [NOT] EXISTS 
(CASSANDRA-7611)
 - * Always merge ranges owned by a single node (CASSANDRA-6930)
 - * Pig support for hadoop CqlInputFormat (CASSANDRA-6454)
 + * Clean up Windows batch scripts (CASSANDRA-7619)
 + * Fix native protocol drop user type notification (CASSANDRA-7571)
 + * Give read access to system.schema_usertypes to all authenticated users
 +   (CASSANDRA-7578)
 + * (cqlsh) Fix cqlsh display when zero rows are returned (CASSANDRA-7580)
 + * Get java version correctly when JAVA_TOOL_OPTIONS is set (CASSANDRA-7572)
 + * Fix NPE when dropping index from non-existent keyspace, AssertionError when
 +   dropping non-existent index with IF EXISTS (CASSANDRA-7590)
 + * Fix sstablelevelresetter hang (CASSANDRA-7614)
 + * (cqlsh) Fix deserialization of blobs (CASSANDRA-7603)
 + * Use keyspace updated schema change message for UDT changes in v1 and
 +   v2 protocols (CASSANDRA-7617)
 + * Fix tracing of range slices and secondary index lookups that are local
 +   to the coordinator (CASSANDRA-7599)
 + * Set -Dcassandra.storagedir for all tool shell scripts (CASSANDRA-7587)
 + * Don't swap max/min col names when mutating sstable metadata 
(CASSANDRA-7596)
 + * (cqlsh) Correctly handle paged result sets (CASSANDRA-7625)
 + * (cqlsh) Improve waiting for a trace to complete (CASSANDRA-7626)
 + * Fix tracing of concurrent range slices and 2ary index queries 
(CASSANDRA-7626)
 + * Fix scrub against collection type (CASSANDRA-7665)
 +Merged from 2.0:
 + * Set gc_grace_seconds to seven days for system schema tables 
(CASSANDRA-7668)
 + * SimpleSeedProvider no longer caches seeds forever (CASSANDRA-7663)
 + * Always flush on truncate (CASSANDRA-7511)
   * Fix ReversedType(DateType) mapping to native protocol (CASSANDRA-7576)
 + * Always merge ranges owned by a single node (CASSANDRA-6930)
 + * Track max/min timestamps for range tombstones (CASSANDRA-7647)
 + * Fix NPE when listing saved caches dir (CASSANDRA-7632)
 +
 +
 +2.1.0-rc4
 + * Fix word count hadoop example (CASSANDRA-7200)
 + * Updated memtable_cleanup_threshold and memtable_flush_writers defaults 
 +   

[1/9] git commit: Avoid logging CompactionInterrupted at ERROR patch by marcuse; reviewed by jbellis for CASSANDRA-7694

2014-08-07 Thread jbellis
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-2.1 ddda54145 - e682ffc47
  refs/heads/trunk 46193d754 - 56141aee8


Avoid logging CompactionInterrupted at ERROR
patch by marcuse; reviewed by jbellis for CASSANDRA-7694


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

Branch: refs/heads/cassandra-2.1
Commit: 6e6a6c39794a06dfdaf7c5499e58b532188e7896
Parents: f3f69cb
Author: Jonathan Ellis jbel...@apache.org
Authored: Thu Aug 7 09:21:30 2014 -0500
Committer: Jonathan Ellis jbel...@apache.org
Committed: Thu Aug 7 09:21:30 2014 -0500

--
 CHANGES.txt  | 1 +
 .../cassandra/concurrent/DebuggableThreadPoolExecutor.java   | 8 ++--
 .../apache/cassandra/db/compaction/CompactionManager.java| 4 ++--
 3 files changed, 9 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/6e6a6c39/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 4392159..915aeea 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.0.10
+ * Avoid logging CompactionInterrupted at ERROR (CASSANDRA-7694)
  * Minor leak in sstable2jon (CASSANDRA-7709)
  * Add cassandra.auto_bootstrap system property (CASSANDRA-7650)
  * Remove CqlPagingRecordReader/CqlPagingInputFormat (CASSANDRA-7570)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/6e6a6c39/src/java/org/apache/cassandra/concurrent/DebuggableThreadPoolExecutor.java
--
diff --git 
a/src/java/org/apache/cassandra/concurrent/DebuggableThreadPoolExecutor.java 
b/src/java/org/apache/cassandra/concurrent/DebuggableThreadPoolExecutor.java
index 665f0b0..8e4dc7a 100644
--- a/src/java/org/apache/cassandra/concurrent/DebuggableThreadPoolExecutor.java
+++ b/src/java/org/apache/cassandra/concurrent/DebuggableThreadPoolExecutor.java
@@ -172,6 +172,12 @@ public class DebuggableThreadPoolExecutor extends 
ThreadPoolExecutor implements
 {
 super.afterExecute(r, t);
 
+maybeResetTraceSessionWrapper(r);
+logExceptionsAfterExecute(r, t);
+}
+
+protected static void maybeResetTraceSessionWrapper(Runnable r)
+{
 if (r instanceof TraceSessionWrapper)
 {
 TraceSessionWrapper tsw = (TraceSessionWrapper) r;
@@ -179,8 +185,6 @@ public class DebuggableThreadPoolExecutor extends 
ThreadPoolExecutor implements
 // and if left this thread might start tracing unrelated tasks
 tsw.reset();
 }
-
-logExceptionsAfterExecute(r, t);
 }
 
 @Override

http://git-wip-us.apache.org/repos/asf/cassandra/blob/6e6a6c39/src/java/org/apache/cassandra/db/compaction/CompactionManager.java
--
diff --git a/src/java/org/apache/cassandra/db/compaction/CompactionManager.java 
b/src/java/org/apache/cassandra/db/compaction/CompactionManager.java
index 2708e4c..e804f1d 100644
--- a/src/java/org/apache/cassandra/db/compaction/CompactionManager.java
+++ b/src/java/org/apache/cassandra/db/compaction/CompactionManager.java
@@ -956,8 +956,8 @@ public class CompactionManager implements 
CompactionManagerMBean
 @Override
 public void afterExecute(Runnable r, Throwable t)
 {
-super.afterExecute(r, t);
-
+DebuggableThreadPoolExecutor.maybeResetTraceSessionWrapper(r);
+
 if (t == null)
 t = DebuggableThreadPoolExecutor.extractThrowable(r);
 



[8/9] git commit: merge

2014-08-07 Thread jbellis
merge


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

Branch: refs/heads/cassandra-2.1
Commit: e682ffc4700ddd57a1a961c8d7fbbb3a87d89ff9
Parents: 24d8571 ddda541
Author: Jonathan Ellis jbel...@apache.org
Authored: Thu Aug 7 09:27:14 2014 -0500
Committer: Jonathan Ellis jbel...@apache.org
Committed: Thu Aug 7 09:27:14 2014 -0500

--

--




[2/9] git commit: Avoid logging CompactionInterrupted at ERROR patch by marcuse; reviewed by jbellis for CASSANDRA-7694

2014-08-07 Thread jbellis
Avoid logging CompactionInterrupted at ERROR
patch by marcuse; reviewed by jbellis for CASSANDRA-7694


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

Branch: refs/heads/trunk
Commit: 6e6a6c39794a06dfdaf7c5499e58b532188e7896
Parents: f3f69cb
Author: Jonathan Ellis jbel...@apache.org
Authored: Thu Aug 7 09:21:30 2014 -0500
Committer: Jonathan Ellis jbel...@apache.org
Committed: Thu Aug 7 09:21:30 2014 -0500

--
 CHANGES.txt  | 1 +
 .../cassandra/concurrent/DebuggableThreadPoolExecutor.java   | 8 ++--
 .../apache/cassandra/db/compaction/CompactionManager.java| 4 ++--
 3 files changed, 9 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/6e6a6c39/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 4392159..915aeea 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.0.10
+ * Avoid logging CompactionInterrupted at ERROR (CASSANDRA-7694)
  * Minor leak in sstable2jon (CASSANDRA-7709)
  * Add cassandra.auto_bootstrap system property (CASSANDRA-7650)
  * Remove CqlPagingRecordReader/CqlPagingInputFormat (CASSANDRA-7570)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/6e6a6c39/src/java/org/apache/cassandra/concurrent/DebuggableThreadPoolExecutor.java
--
diff --git 
a/src/java/org/apache/cassandra/concurrent/DebuggableThreadPoolExecutor.java 
b/src/java/org/apache/cassandra/concurrent/DebuggableThreadPoolExecutor.java
index 665f0b0..8e4dc7a 100644
--- a/src/java/org/apache/cassandra/concurrent/DebuggableThreadPoolExecutor.java
+++ b/src/java/org/apache/cassandra/concurrent/DebuggableThreadPoolExecutor.java
@@ -172,6 +172,12 @@ public class DebuggableThreadPoolExecutor extends 
ThreadPoolExecutor implements
 {
 super.afterExecute(r, t);
 
+maybeResetTraceSessionWrapper(r);
+logExceptionsAfterExecute(r, t);
+}
+
+protected static void maybeResetTraceSessionWrapper(Runnable r)
+{
 if (r instanceof TraceSessionWrapper)
 {
 TraceSessionWrapper tsw = (TraceSessionWrapper) r;
@@ -179,8 +185,6 @@ public class DebuggableThreadPoolExecutor extends 
ThreadPoolExecutor implements
 // and if left this thread might start tracing unrelated tasks
 tsw.reset();
 }
-
-logExceptionsAfterExecute(r, t);
 }
 
 @Override

http://git-wip-us.apache.org/repos/asf/cassandra/blob/6e6a6c39/src/java/org/apache/cassandra/db/compaction/CompactionManager.java
--
diff --git a/src/java/org/apache/cassandra/db/compaction/CompactionManager.java 
b/src/java/org/apache/cassandra/db/compaction/CompactionManager.java
index 2708e4c..e804f1d 100644
--- a/src/java/org/apache/cassandra/db/compaction/CompactionManager.java
+++ b/src/java/org/apache/cassandra/db/compaction/CompactionManager.java
@@ -956,8 +956,8 @@ public class CompactionManager implements 
CompactionManagerMBean
 @Override
 public void afterExecute(Runnable r, Throwable t)
 {
-super.afterExecute(r, t);
-
+DebuggableThreadPoolExecutor.maybeResetTraceSessionWrapper(r);
+
 if (t == null)
 t = DebuggableThreadPoolExecutor.extractThrowable(r);
 



[5/9] git commit: merge from 2.1.0

2014-08-07 Thread jbellis
merge from 2.1.0


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

Branch: refs/heads/cassandra-2.1
Commit: 24d85715045fb32b4fb59341c3eec18502a7d979
Parents: 78b734e 33de6dc
Author: Jonathan Ellis jbel...@apache.org
Authored: Thu Aug 7 09:25:17 2014 -0500
Committer: Jonathan Ellis jbel...@apache.org
Committed: Thu Aug 7 09:25:17 2014 -0500

--
 CHANGES.txt |   2 +
 .../DebuggableThreadPoolExecutor.java   |   8 +-
 .../db/compaction/CompactionManager.java|   4 +-
 .../apache/cassandra/tools/SSTableExport.java   | 131 +++
 4 files changed, 83 insertions(+), 62 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/24d85715/CHANGES.txt
--

http://git-wip-us.apache.org/repos/asf/cassandra/blob/24d85715/src/java/org/apache/cassandra/db/compaction/CompactionManager.java
--

http://git-wip-us.apache.org/repos/asf/cassandra/blob/24d85715/src/java/org/apache/cassandra/tools/SSTableExport.java
--
diff --cc src/java/org/apache/cassandra/tools/SSTableExport.java
index c4d693c,3572296..cc725a4
--- a/src/java/org/apache/cassandra/tools/SSTableExport.java
+++ b/src/java/org/apache/cassandra/tools/SSTableExport.java
@@@ -226,20 -228,26 +226,26 @@@ public class SSTableExpor
  throws IOException
  {
  KeyIterator iter = new KeyIterator(desc);
- DecoratedKey lastKey = null;
- while (iter.hasNext())
+ try
  {
- DecoratedKey key = iter.next();
- 
- // validate order of the keys in the sstable
- if (lastKey != null  lastKey.compareTo(key)  0)
- throw new IOException(Key out of order!  + lastKey +
+ key);
- lastKey = key;
- 
- outs.println(metadata.getKeyValidator().getString(key.getKey()));
- checkStream(outs); // flushes
+ DecoratedKey lastKey = null;
+ while (iter.hasNext())
+ {
+ DecoratedKey key = iter.next();
+ 
+ // validate order of the keys in the sstable
+ if (lastKey != null  lastKey.compareTo(key)  0)
+ throw new IOException(Key out of order!  + lastKey +  
  + key);
+ lastKey = key;
+ 
 -outs.println(bytesToHex(key.getKey()));
++
outs.println(metadata.getKeyValidator().getString(key.getKey()));
+ checkStream(outs); // flushes
+ }
+ }
+ finally
+ {
+ iter.close();
  }
- iter.close();
  }
  
  /**
@@@ -256,47 -263,53 +262,53 @@@
  {
  SSTableReader sstable = SSTableReader.open(desc);
  RandomAccessReader dfile = sstable.openDataReader();
+ try
+ {
+ IPartitioner? partitioner = sstable.partitioner;
  
- IPartitioner? partitioner = sstable.partitioner;
+ if (excludes != null)
+ toExport.removeAll(Arrays.asList(excludes));
  
- if (excludes != null)
- toExport.removeAll(Arrays.asList(excludes));
+ outs.println([);
  
- outs.println([);
+ int i = 0;
  
- int i = 0;
+ // last key to compare order
+ DecoratedKey lastKey = null;
  
- // last key to compare order
- DecoratedKey lastKey = null;
+ for (String key : toExport)
+ {
 -DecoratedKey decoratedKey = 
partitioner.decorateKey(hexToBytes(key));
++DecoratedKey decoratedKey = 
partitioner.decorateKey(metadata.getKeyValidator().fromString(key));
  
- for (String key : toExport)
- {
- DecoratedKey decoratedKey = 
partitioner.decorateKey(metadata.getKeyValidator().fromString(key));
+ if (lastKey != null  lastKey.compareTo(decoratedKey)  0)
+ throw new IOException(Key out of order!  + lastKey +  
  + decoratedKey);
  
- if (lastKey != null  lastKey.compareTo(decoratedKey)  0)
- throw new IOException(Key out of order!  + lastKey +
+ decoratedKey);
+ lastKey = decoratedKey;
  
- lastKey = decoratedKey;
+ RowIndexEntry entry = sstable.getPosition(decoratedKey, 
SSTableReader.Operator.EQ);
+ if (entry == null)
+ continue;
  
- RowIndexEntry entry = 

[6/9] git commit: merge from 2.1.0

2014-08-07 Thread jbellis
merge from 2.1.0


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

Branch: refs/heads/trunk
Commit: 24d85715045fb32b4fb59341c3eec18502a7d979
Parents: 78b734e 33de6dc
Author: Jonathan Ellis jbel...@apache.org
Authored: Thu Aug 7 09:25:17 2014 -0500
Committer: Jonathan Ellis jbel...@apache.org
Committed: Thu Aug 7 09:25:17 2014 -0500

--
 CHANGES.txt |   2 +
 .../DebuggableThreadPoolExecutor.java   |   8 +-
 .../db/compaction/CompactionManager.java|   4 +-
 .../apache/cassandra/tools/SSTableExport.java   | 131 +++
 4 files changed, 83 insertions(+), 62 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/24d85715/CHANGES.txt
--

http://git-wip-us.apache.org/repos/asf/cassandra/blob/24d85715/src/java/org/apache/cassandra/db/compaction/CompactionManager.java
--

http://git-wip-us.apache.org/repos/asf/cassandra/blob/24d85715/src/java/org/apache/cassandra/tools/SSTableExport.java
--
diff --cc src/java/org/apache/cassandra/tools/SSTableExport.java
index c4d693c,3572296..cc725a4
--- a/src/java/org/apache/cassandra/tools/SSTableExport.java
+++ b/src/java/org/apache/cassandra/tools/SSTableExport.java
@@@ -226,20 -228,26 +226,26 @@@ public class SSTableExpor
  throws IOException
  {
  KeyIterator iter = new KeyIterator(desc);
- DecoratedKey lastKey = null;
- while (iter.hasNext())
+ try
  {
- DecoratedKey key = iter.next();
- 
- // validate order of the keys in the sstable
- if (lastKey != null  lastKey.compareTo(key)  0)
- throw new IOException(Key out of order!  + lastKey +
+ key);
- lastKey = key;
- 
- outs.println(metadata.getKeyValidator().getString(key.getKey()));
- checkStream(outs); // flushes
+ DecoratedKey lastKey = null;
+ while (iter.hasNext())
+ {
+ DecoratedKey key = iter.next();
+ 
+ // validate order of the keys in the sstable
+ if (lastKey != null  lastKey.compareTo(key)  0)
+ throw new IOException(Key out of order!  + lastKey +  
  + key);
+ lastKey = key;
+ 
 -outs.println(bytesToHex(key.getKey()));
++
outs.println(metadata.getKeyValidator().getString(key.getKey()));
+ checkStream(outs); // flushes
+ }
+ }
+ finally
+ {
+ iter.close();
  }
- iter.close();
  }
  
  /**
@@@ -256,47 -263,53 +262,53 @@@
  {
  SSTableReader sstable = SSTableReader.open(desc);
  RandomAccessReader dfile = sstable.openDataReader();
+ try
+ {
+ IPartitioner? partitioner = sstable.partitioner;
  
- IPartitioner? partitioner = sstable.partitioner;
+ if (excludes != null)
+ toExport.removeAll(Arrays.asList(excludes));
  
- if (excludes != null)
- toExport.removeAll(Arrays.asList(excludes));
+ outs.println([);
  
- outs.println([);
+ int i = 0;
  
- int i = 0;
+ // last key to compare order
+ DecoratedKey lastKey = null;
  
- // last key to compare order
- DecoratedKey lastKey = null;
+ for (String key : toExport)
+ {
 -DecoratedKey decoratedKey = 
partitioner.decorateKey(hexToBytes(key));
++DecoratedKey decoratedKey = 
partitioner.decorateKey(metadata.getKeyValidator().fromString(key));
  
- for (String key : toExport)
- {
- DecoratedKey decoratedKey = 
partitioner.decorateKey(metadata.getKeyValidator().fromString(key));
+ if (lastKey != null  lastKey.compareTo(decoratedKey)  0)
+ throw new IOException(Key out of order!  + lastKey +  
  + decoratedKey);
  
- if (lastKey != null  lastKey.compareTo(decoratedKey)  0)
- throw new IOException(Key out of order!  + lastKey +
+ decoratedKey);
+ lastKey = decoratedKey;
  
- lastKey = decoratedKey;
+ RowIndexEntry entry = sstable.getPosition(decoratedKey, 
SSTableReader.Operator.EQ);
+ if (entry == null)
+ continue;
  
- RowIndexEntry entry = 

[2/2] git commit: Merge branch 'cassandra-2.0' into cassandra-2.1.0

2014-08-07 Thread slebresne
Merge branch 'cassandra-2.0' into cassandra-2.1.0

Conflicts:
CHANGES.txt
src/java/org/apache/cassandra/tools/SSTableExport.java


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

Branch: refs/heads/cassandra-2.1.0
Commit: eea547c62097ef645a4683026169d770216019e5
Parents: e0c4c6e f3f69cb
Author: Sylvain Lebresne sylv...@datastax.com
Authored: Thu Aug 7 16:18:24 2014 +0200
Committer: Sylvain Lebresne sylv...@datastax.com
Committed: Thu Aug 7 16:18:24 2014 +0200

--
 CHANGES.txt |   1 +
 .../apache/cassandra/tools/SSTableExport.java   | 131 +++
 2 files changed, 74 insertions(+), 58 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/eea547c6/CHANGES.txt
--
diff --cc CHANGES.txt
index ecc4da2,4392159..1043016
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,70 -1,17 +1,71 @@@
 -2.0.10
 +2.1.0-final
 + * cqlsh DESC CLUSTER fails retrieving ring information (CASSANDRA-7687)
 + * Fix binding null values inside UDT (CASSANDRA-7685)
 + * Fix UDT field selection with empty fields (CASSANDRA-7670)
 + * Bogus deserialization of static cells from sstable (CASSANDRA-7684)
 +Merged from 2.0:
+  * Minor leak in sstable2jon (CASSANDRA-7709)
   * Add cassandra.auto_bootstrap system property (CASSANDRA-7650)
 - * Remove CqlPagingRecordReader/CqlPagingInputFormat (CASSANDRA-7570)
 - * Fix IncompatibleClassChangeError from hadoop2 (CASSANDRA-7229)
 - * Add 'nodetool sethintedhandoffthrottlekb' (CASSANDRA-7635)
   * Update java driver (for hadoop) (CASSANDRA-7618)
 - * Fix truncate to always flush (CASSANDRA-7511)
 + * Remove CqlPagingRecordReader/CqlPagingInputFormat (CASSANDRA-7570)
 + * Support connecting to ipv6 jmx with nodetool (CASSANDRA-7669)
 +
 +
 +2.1.0-rc5
 + * Reject counters inside user types (CASSANDRA-7672)
 + * Switch to notification-based GCInspector (CASSANDRA-7638)
 + * (cqlsh) Handle nulls in UDTs and tuples correctly (CASSANDRA-7656)
 + * Don't use strict consistency when replacing (CASSANDRA-7568)
 + * Fix min/max cell name collection on 2.0 SSTables with range
 +   tombstones (CASSANDRA-7593)
 + * Tolerate min/max cell names of different lengths (CASSANDRA-7651)
 + * Filter cached results correctly (CASSANDRA-7636)
 + * Fix tracing on the new SEPExecutor (CASSANDRA-7644)
   * Remove shuffle and taketoken (CASSANDRA-7601)
 - * Switch liveRatio-related log messages to DEBUG (CASSANDRA-7467)
 - * (cqlsh) Add tab-completion for CREATE/DROP USER IF [NOT] EXISTS 
(CASSANDRA-7611)
 - * Always merge ranges owned by a single node (CASSANDRA-6930)
 - * Pig support for hadoop CqlInputFormat (CASSANDRA-6454)
 + * Clean up Windows batch scripts (CASSANDRA-7619)
 + * Fix native protocol drop user type notification (CASSANDRA-7571)
 + * Give read access to system.schema_usertypes to all authenticated users
 +   (CASSANDRA-7578)
 + * (cqlsh) Fix cqlsh display when zero rows are returned (CASSANDRA-7580)
 + * Get java version correctly when JAVA_TOOL_OPTIONS is set (CASSANDRA-7572)
 + * Fix NPE when dropping index from non-existent keyspace, AssertionError when
 +   dropping non-existent index with IF EXISTS (CASSANDRA-7590)
 + * Fix sstablelevelresetter hang (CASSANDRA-7614)
 + * (cqlsh) Fix deserialization of blobs (CASSANDRA-7603)
 + * Use keyspace updated schema change message for UDT changes in v1 and
 +   v2 protocols (CASSANDRA-7617)
 + * Fix tracing of range slices and secondary index lookups that are local
 +   to the coordinator (CASSANDRA-7599)
 + * Set -Dcassandra.storagedir for all tool shell scripts (CASSANDRA-7587)
 + * Don't swap max/min col names when mutating sstable metadata 
(CASSANDRA-7596)
 + * (cqlsh) Correctly handle paged result sets (CASSANDRA-7625)
 + * (cqlsh) Improve waiting for a trace to complete (CASSANDRA-7626)
 + * Fix tracing of concurrent range slices and 2ary index queries 
(CASSANDRA-7626)
 + * Fix scrub against collection type (CASSANDRA-7665)
 +Merged from 2.0:
 + * Set gc_grace_seconds to seven days for system schema tables 
(CASSANDRA-7668)
 + * SimpleSeedProvider no longer caches seeds forever (CASSANDRA-7663)
 + * Always flush on truncate (CASSANDRA-7511)
   * Fix ReversedType(DateType) mapping to native protocol (CASSANDRA-7576)
 + * Always merge ranges owned by a single node (CASSANDRA-6930)
 + * Track max/min timestamps for range tombstones (CASSANDRA-7647)
 + * Fix NPE when listing saved caches dir (CASSANDRA-7632)
 +
 +
 +2.1.0-rc4
 + * Fix word count hadoop example (CASSANDRA-7200)
 + * Updated memtable_cleanup_threshold and memtable_flush_writers defaults 
 +   

[3/9] git commit: merge from 2.0

2014-08-07 Thread jbellis
merge from 2.0


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

Branch: refs/heads/cassandra-2.1
Commit: 33de6dc112c7a1e7ebc84bf6079a7768d7d94492
Parents: eea547c 6e6a6c3
Author: Jonathan Ellis jbel...@apache.org
Authored: Thu Aug 7 09:21:59 2014 -0500
Committer: Jonathan Ellis jbel...@apache.org
Committed: Thu Aug 7 09:21:59 2014 -0500

--
 CHANGES.txt  | 1 +
 .../cassandra/concurrent/DebuggableThreadPoolExecutor.java   | 8 ++--
 .../apache/cassandra/db/compaction/CompactionManager.java| 4 ++--
 3 files changed, 9 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/33de6dc1/CHANGES.txt
--
diff --cc CHANGES.txt
index 1043016,915aeea..dfeca21
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,71 -1,18 +1,72 @@@
 -2.0.10
 +2.1.0-final
 + * cqlsh DESC CLUSTER fails retrieving ring information (CASSANDRA-7687)
 + * Fix binding null values inside UDT (CASSANDRA-7685)
 + * Fix UDT field selection with empty fields (CASSANDRA-7670)
 + * Bogus deserialization of static cells from sstable (CASSANDRA-7684)
 +Merged from 2.0:
+  * Avoid logging CompactionInterrupted at ERROR (CASSANDRA-7694)
   * Minor leak in sstable2jon (CASSANDRA-7709)
   * Add cassandra.auto_bootstrap system property (CASSANDRA-7650)
 - * Remove CqlPagingRecordReader/CqlPagingInputFormat (CASSANDRA-7570)
 - * Fix IncompatibleClassChangeError from hadoop2 (CASSANDRA-7229)
 - * Add 'nodetool sethintedhandoffthrottlekb' (CASSANDRA-7635)
   * Update java driver (for hadoop) (CASSANDRA-7618)
 - * Fix truncate to always flush (CASSANDRA-7511)
 + * Remove CqlPagingRecordReader/CqlPagingInputFormat (CASSANDRA-7570)
 + * Support connecting to ipv6 jmx with nodetool (CASSANDRA-7669)
 +
 +
 +2.1.0-rc5
 + * Reject counters inside user types (CASSANDRA-7672)
 + * Switch to notification-based GCInspector (CASSANDRA-7638)
 + * (cqlsh) Handle nulls in UDTs and tuples correctly (CASSANDRA-7656)
 + * Don't use strict consistency when replacing (CASSANDRA-7568)
 + * Fix min/max cell name collection on 2.0 SSTables with range
 +   tombstones (CASSANDRA-7593)
 + * Tolerate min/max cell names of different lengths (CASSANDRA-7651)
 + * Filter cached results correctly (CASSANDRA-7636)
 + * Fix tracing on the new SEPExecutor (CASSANDRA-7644)
   * Remove shuffle and taketoken (CASSANDRA-7601)
 - * Switch liveRatio-related log messages to DEBUG (CASSANDRA-7467)
 - * (cqlsh) Add tab-completion for CREATE/DROP USER IF [NOT] EXISTS 
(CASSANDRA-7611)
 - * Always merge ranges owned by a single node (CASSANDRA-6930)
 - * Pig support for hadoop CqlInputFormat (CASSANDRA-6454)
 + * Clean up Windows batch scripts (CASSANDRA-7619)
 + * Fix native protocol drop user type notification (CASSANDRA-7571)
 + * Give read access to system.schema_usertypes to all authenticated users
 +   (CASSANDRA-7578)
 + * (cqlsh) Fix cqlsh display when zero rows are returned (CASSANDRA-7580)
 + * Get java version correctly when JAVA_TOOL_OPTIONS is set (CASSANDRA-7572)
 + * Fix NPE when dropping index from non-existent keyspace, AssertionError when
 +   dropping non-existent index with IF EXISTS (CASSANDRA-7590)
 + * Fix sstablelevelresetter hang (CASSANDRA-7614)
 + * (cqlsh) Fix deserialization of blobs (CASSANDRA-7603)
 + * Use keyspace updated schema change message for UDT changes in v1 and
 +   v2 protocols (CASSANDRA-7617)
 + * Fix tracing of range slices and secondary index lookups that are local
 +   to the coordinator (CASSANDRA-7599)
 + * Set -Dcassandra.storagedir for all tool shell scripts (CASSANDRA-7587)
 + * Don't swap max/min col names when mutating sstable metadata 
(CASSANDRA-7596)
 + * (cqlsh) Correctly handle paged result sets (CASSANDRA-7625)
 + * (cqlsh) Improve waiting for a trace to complete (CASSANDRA-7626)
 + * Fix tracing of concurrent range slices and 2ary index queries 
(CASSANDRA-7626)
 + * Fix scrub against collection type (CASSANDRA-7665)
 +Merged from 2.0:
 + * Set gc_grace_seconds to seven days for system schema tables 
(CASSANDRA-7668)
 + * SimpleSeedProvider no longer caches seeds forever (CASSANDRA-7663)
 + * Always flush on truncate (CASSANDRA-7511)
   * Fix ReversedType(DateType) mapping to native protocol (CASSANDRA-7576)
 + * Always merge ranges owned by a single node (CASSANDRA-6930)
 + * Track max/min timestamps for range tombstones (CASSANDRA-7647)
 + * Fix NPE when listing saved caches dir (CASSANDRA-7632)
 +
 +
 +2.1.0-rc4
 + * Fix word count hadoop example (CASSANDRA-7200)
 + * Updated memtable_cleanup_threshold and memtable_flush_writers defaults 
 + 

[9/9] git commit: merge

2014-08-07 Thread jbellis
merge


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

Branch: refs/heads/trunk
Commit: 56141aee857eb81109531b92029bd827e6976d76
Parents: f95b40c 46193d7
Author: Jonathan Ellis jbel...@apache.org
Authored: Thu Aug 7 09:27:54 2014 -0500
Committer: Jonathan Ellis jbel...@apache.org
Committed: Thu Aug 7 09:27:54 2014 -0500

--

--




[jira] [Created] (CASSANDRA-7712) temporary files need to be cleaned by unit tests

2014-08-07 Thread Michael Shuler (JIRA)
Michael Shuler created CASSANDRA-7712:
-

 Summary: temporary files need to be cleaned by unit tests
 Key: CASSANDRA-7712
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7712
 Project: Cassandra
  Issue Type: Test
  Components: Tests
Reporter: Michael Shuler
Priority: Minor
 Fix For: 2.0.10, 2.1.1


There are many unit test temporary files left behind after test runs. In the 
case of CI servers, I have seen 70,000 files accumulate in /tmp over a period 
of time. Each unit test should make an effort to remove its temporary files 
when the test is completed.

My current unit test cleanup block:
{noformat}
# clean up after unit tests..
rm -rf  /tmp/140*-0 /tmp/CFWith* /tmp/Counter1* /tmp/DescriptorTest* 
/tmp/Keyspace1* \
/tmp/KeyStreamingTransferTestSpace* /tmp/SSTableExportTest* 
/tmp/SSTableImportTest* \
/tmp/Standard1* /tmp/Statistics.db* /tmp/StreamingTransferTest* 
/tmp/ValuesWithQuotes* \
/tmp/cassandra* /tmp/jna-* /tmp/ks-cf-ib-1-* /tmp/lengthtest* 
/tmp/liblz4-java*.so /tmp/readtest* \
/tmp/set_length_during_read_mode* /tmp/set_negative_length* 
/tmp/snappy-*.so
{noformat}



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Created] (CASSANDRA-7713) CommitLogTest failure causes cascading unit test failures

2014-08-07 Thread Michael Shuler (JIRA)
Michael Shuler created CASSANDRA-7713:
-

 Summary: CommitLogTest failure causes cascading unit test failures
 Key: CASSANDRA-7713
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7713
 Project: Cassandra
  Issue Type: Test
Reporter: Michael Shuler
 Fix For: 2.0.10, 2.1.1


When CommitLogTest.testCommitFailurePolicy_stop fails or times out, 
{{commitDir.setWritable(true)}} is never reached, so the 
build/test/cassandra/commitlog directory is left without write permissions, 
causing cascading failure of all subsequent tests.





--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Commented] (CASSANDRA-7695) Inserting the same row in parallel causes bad data to be returned to the client

2014-08-07 Thread Benedict (JIRA)

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

Benedict commented on CASSANDRA-7695:
-

LGTM.

Would prefer we call the test NativeTransportBufferRecycleTest, and comment it 
to explain. Also remove the LOCAL_QUORUM, since it's meaningless here and don't 
want to confuse future readers. It's also not clear why we're bothering to 
'dump keys', but this is a test so I'm not going to vet it too hard.

 Inserting the same row in parallel causes bad data to be returned to the 
 client
 ---

 Key: CASSANDRA-7695
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7695
 Project: Cassandra
  Issue Type: Bug
 Environment: Linux 3.12.21, JVM 1.7u60
 Cassandra server 2.1.0 RC 5
 Cassandra datastax client version 2.1.0RC1
Reporter: Johan Bjork
Assignee: T Jake Luciani
Priority: Blocker
 Fix For: 2.1.0

 Attachments: 7695-workaround.txt, PutFailureRepro.java, 
 bad-data-tid43-get, bad-data-tid43-put


 Running the attached test program against a cassandra 2.1 server results in 
 scrambled data returned by the SELECT statement. Running it against latest 
 stable works fine.
 Attached:
 * Program that reproduces the failure
 * Example output files from mentioned test-program with the scrambled output.
 Failure mode:
 The value returned by 'get' is scrambled, the size is correct but some bytes 
 have shifted locations in the returned buffer.
 Cluster info:
 For the test we set up a single cassandra node using the stock configuration 
 file.



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Commented] (CASSANDRA-7710) nodetool ring throws exception if run on machine without Cassandra

2014-08-07 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis commented on CASSANDRA-7710:
---

[~mshuler] can you figure out where we fixed this in 2.1?

 nodetool ring throws exception if run on machine without Cassandra
 --

 Key: CASSANDRA-7710
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7710
 Project: Cassandra
  Issue Type: Bug
  Components: Tools
Reporter: Jimmy Mårdell
Priority: Minor

 DatabaseDescriptor.getNumTokens() is invoked in the nodetool ring command 
 which doesn't work so well when running on a machine where Cassandra doesnt' 
 exist. And it has all kind of side effects as well.
 This seems fixed in 2.1 but would be nice if it was fixed in 2.0 as well.



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Created] (CASSANDRA-7714) Add new CMS GC flags to Windows startup scripts for JVM later than 1.7.0_60

2014-08-07 Thread Joshua McKenzie (JIRA)
Joshua McKenzie created CASSANDRA-7714:
--

 Summary: Add new CMS GC flags to Windows startup scripts for JVM 
later than 1.7.0_60
 Key: CASSANDRA-7714
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7714
 Project: Cassandra
  Issue Type: Improvement
  Components: Packaging
Reporter: Joshua McKenzie
Assignee: Joshua McKenzie
 Fix For: 2.0.10, 2.1.1


Replicate changes from CASSANDRA-7432.

Relevant patch contents:
{noformat}
 # note: bash evals '1.7.x' as  '1.7' so this is really a = 1.7 jvm check
+if { [ $JVM_VERSION \ 1.7 ]  [ $JVM_VERSION \ 1.8.0 ]  [ 
$JVM_PATCH_VERSION -ge 60 ]; } || [ $JVM_VERSION \ 1.8 ] ; then
+JVM_OPTS=$JVM_OPTS -XX:+CMSParallelInitialMarkEnabled 
-XX:+CMSEdenChunksRecordAlways
+fi
{noformat}



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Commented] (CASSANDRA-7432) Add new CMS GC flags to cassandra_env.sh for JVM later than 1.7.0_60

2014-08-07 Thread Joshua McKenzie (JIRA)

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

Joshua McKenzie commented on CASSANDRA-7432:


Created CASSANDRA-7714 to track the Windows side.

 Add new CMS GC flags to cassandra_env.sh for JVM later than 1.7.0_60
 

 Key: CASSANDRA-7432
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7432
 Project: Cassandra
  Issue Type: Improvement
  Components: Packaging
Reporter: graham sanderson
Assignee: Brandon Williams
 Fix For: 2.0.10, 2.1.1

 Attachments: 7432.txt


 The new flags in question are as follows:
 {code}
 -XX:+CMSParallelInitialMarkEnabled
 -XX:+CMSEdenChunksRecordAlways
 {code}
 Given we already have
 {code}
 JVM_OPTS=$JVM_OPTS -XX:+UseParNewGC 
 JVM_OPTS=$JVM_OPTS -XX:+UseConcMarkSweepGC 
 JVM_OPTS=$JVM_OPTS -XX:+CMSParallelRemarkEnabled 
 JVM_OPTS=$JVM_OPTS -XX:+UseTLAB
 if [ $JVM_ARCH = 64-Bit ] ; then
 JVM_OPTS=$JVM_OPTS -XX:+UseCondCardMark
 fi
 {code}
 The assumption would be that people are at least running on large number CPU 
 cores/threads
 I would therefore recommend defaulting these flags if available - the only 
 two possible downsides for {{+CMSEdenChunksRecordAlways}}:
 1) There is a new very short (probably un-contended) lock in the slow (non 
 TLAB) eden allocation path with {{+CMSEdenChunksRecordAlways}}. I haven't 
 detected this timing wise - this is the slow path after all
 2) If you are running with {{-XX:-UseCMSCompactAtFullCollection}} (not the 
 default) *and* you call {{System.gc()}} then  {{+CMSEdenChunksRecordAlways}} 
 will expose you to a possible seg fault: (see
 [http://bugs.java.com/bugdatabase/view_bug.do?bug_id=8021809])



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Updated] (CASSANDRA-7585) cassandra sstableloader connection refused with inter_node_encryption

2014-08-07 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis updated CASSANDRA-7585:
--

Reviewer: Marcus Eriksson

[~krummas] to review (when he's back from vacation), unless someone else wants 
to tackle it first

 cassandra sstableloader connection refused with inter_node_encryption
 -

 Key: CASSANDRA-7585
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7585
 Project: Cassandra
  Issue Type: Bug
  Components: Core, Tools
Reporter: Samphel Norden
Assignee: Yuki Morishita
 Fix For: 2.0.10, 2.1.1

 Attachments: 7585-2.0.txt


 cassandra sstableloader connection refused with inter_node_encryption
 When using sstableloader to import tables  (cassandra 2.0.5) with inter-node 
 encryption and client encryption enabled, I get a connection refused error
 I am using
 sstableloader -d $myhost -p 9160 -u cassandra -pw cassandra -ciphers 
 TLS_RSA_WITH_AES_128_CBC_SHA,TLS_DHE_RSA_WITH_AES_128_CBC_SHA,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
  -st JKS  -tf org.apache.cassandra.thrift.SSLTransportFactory -ts 
 /path/to/truststore  -tspw passwd $fullpath/$table
 Errors out with
 Streaming session ID: 1bc395c0-fbb2-11e3-9812-73da15121373
  WARN 17:13:34,147 Failed attempt 1 to connect to
 Similar problem reported in cassandra 2.0.8 by another user
 http://stackoverflow.com/questions/24390604/cassandra-sstableloader-connection-refused-with-inter-node-encryption
 ==
 Relevant cassandra.yaml snippet (with obfuscation)
 server_encryption_options:
   
 internode_encryption: all 
  
 keystore:/path/to/keystore

 keystore_password: passwd   
  
 truststore:/path/to/truststore
  
 truststore_password:passwd  

 # More advanced defaults below:   
   
 protocol: TLS 
   
 algorithm: SunX509
   
 store_type: JKS   
   
 cipher_suites: 
 [TLS_RSA_WITH_AES_128_CBC_SHA,TLS_DHE_RSA_WITH_AES_128_CBC_SHA,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA]

 require_client_auth: true 
   
   
   
 # enable or disable client/server encryption. 
   
 client_encryption_options:
   
 enabled: true 
   
 keystore: /path/to/keystore   
  
 keystore_password: truststorepasswd 

 #require_client_auth: true
   
 # Set trustore and truststore_password if require_client_auth is true 
   
 truststore:/path/to/truststore
 
 truststore_password: truststorepasswd   

 # More advanced defaults below:   
   
 protocol: TLS 
   
 algorithm: SunX509
   
 store_type: JKS   
   
 cipher_suites: 
 

[jira] [Commented] (CASSANDRA-7585) cassandra sstableloader connection refused with inter_node_encryption

2014-08-07 Thread Samphel Norden (JIRA)

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

Samphel Norden commented on CASSANDRA-7585:
---

Thanks for the patch. Any chance this can be back ported to 2.0.5 since we are 
not using custom builds in our deployment.

 cassandra sstableloader connection refused with inter_node_encryption
 -

 Key: CASSANDRA-7585
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7585
 Project: Cassandra
  Issue Type: Bug
  Components: Core, Tools
Reporter: Samphel Norden
Assignee: Yuki Morishita
 Fix For: 2.0.10, 2.1.1

 Attachments: 7585-2.0.txt


 cassandra sstableloader connection refused with inter_node_encryption
 When using sstableloader to import tables  (cassandra 2.0.5) with inter-node 
 encryption and client encryption enabled, I get a connection refused error
 I am using
 sstableloader -d $myhost -p 9160 -u cassandra -pw cassandra -ciphers 
 TLS_RSA_WITH_AES_128_CBC_SHA,TLS_DHE_RSA_WITH_AES_128_CBC_SHA,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
  -st JKS  -tf org.apache.cassandra.thrift.SSLTransportFactory -ts 
 /path/to/truststore  -tspw passwd $fullpath/$table
 Errors out with
 Streaming session ID: 1bc395c0-fbb2-11e3-9812-73da15121373
  WARN 17:13:34,147 Failed attempt 1 to connect to
 Similar problem reported in cassandra 2.0.8 by another user
 http://stackoverflow.com/questions/24390604/cassandra-sstableloader-connection-refused-with-inter-node-encryption
 ==
 Relevant cassandra.yaml snippet (with obfuscation)
 server_encryption_options:
   
 internode_encryption: all 
  
 keystore:/path/to/keystore

 keystore_password: passwd   
  
 truststore:/path/to/truststore
  
 truststore_password:passwd  

 # More advanced defaults below:   
   
 protocol: TLS 
   
 algorithm: SunX509
   
 store_type: JKS   
   
 cipher_suites: 
 [TLS_RSA_WITH_AES_128_CBC_SHA,TLS_DHE_RSA_WITH_AES_128_CBC_SHA,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA]

 require_client_auth: true 
   
   
   
 # enable or disable client/server encryption. 
   
 client_encryption_options:
   
 enabled: true 
   
 keystore: /path/to/keystore   
  
 keystore_password: truststorepasswd 

 #require_client_auth: true
   
 # Set trustore and truststore_password if require_client_auth is true 
   
 truststore:/path/to/truststore
 
 truststore_password: truststorepasswd   

 # More advanced defaults below:   
   
 protocol: TLS 
   
 algorithm: SunX509
   
 store_type: JKS   
   
 cipher_suites: 
 

[jira] [Comment Edited] (CASSANDRA-7585) cassandra sstableloader connection refused with inter_node_encryption

2014-08-07 Thread Samphel Norden (JIRA)

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

Samphel Norden edited comment on CASSANDRA-7585 at 8/7/14 3:08 PM:
---

Thanks for the patch.  After its been reviewed/verified of course...any chance 
this can be back ported to 2.0.5 since we are not using custom builds in our 
deployment. i.e.


was (Author: samnor):
Thanks for the patch. Any chance this can be back ported to 2.0.5 since we are 
not using custom builds in our deployment. i.e. after its been 
reviewed/verified of course...

 cassandra sstableloader connection refused with inter_node_encryption
 -

 Key: CASSANDRA-7585
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7585
 Project: Cassandra
  Issue Type: Bug
  Components: Core, Tools
Reporter: Samphel Norden
Assignee: Yuki Morishita
 Fix For: 2.0.10, 2.1.1

 Attachments: 7585-2.0.txt


 cassandra sstableloader connection refused with inter_node_encryption
 When using sstableloader to import tables  (cassandra 2.0.5) with inter-node 
 encryption and client encryption enabled, I get a connection refused error
 I am using
 sstableloader -d $myhost -p 9160 -u cassandra -pw cassandra -ciphers 
 TLS_RSA_WITH_AES_128_CBC_SHA,TLS_DHE_RSA_WITH_AES_128_CBC_SHA,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
  -st JKS  -tf org.apache.cassandra.thrift.SSLTransportFactory -ts 
 /path/to/truststore  -tspw passwd $fullpath/$table
 Errors out with
 Streaming session ID: 1bc395c0-fbb2-11e3-9812-73da15121373
  WARN 17:13:34,147 Failed attempt 1 to connect to
 Similar problem reported in cassandra 2.0.8 by another user
 http://stackoverflow.com/questions/24390604/cassandra-sstableloader-connection-refused-with-inter-node-encryption
 ==
 Relevant cassandra.yaml snippet (with obfuscation)
 server_encryption_options:
   
 internode_encryption: all 
  
 keystore:/path/to/keystore

 keystore_password: passwd   
  
 truststore:/path/to/truststore
  
 truststore_password:passwd  

 # More advanced defaults below:   
   
 protocol: TLS 
   
 algorithm: SunX509
   
 store_type: JKS   
   
 cipher_suites: 
 [TLS_RSA_WITH_AES_128_CBC_SHA,TLS_DHE_RSA_WITH_AES_128_CBC_SHA,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA]

 require_client_auth: true 
   
   
   
 # enable or disable client/server encryption. 
   
 client_encryption_options:
   
 enabled: true 
   
 keystore: /path/to/keystore   
  
 keystore_password: truststorepasswd 

 #require_client_auth: true
   
 # Set trustore and truststore_password if require_client_auth is true 
   
 truststore:/path/to/truststore
 
 truststore_password: truststorepasswd   

 # More advanced defaults below:   
   
 protocol: TLS 

[jira] [Comment Edited] (CASSANDRA-7585) cassandra sstableloader connection refused with inter_node_encryption

2014-08-07 Thread Samphel Norden (JIRA)

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

Samphel Norden edited comment on CASSANDRA-7585 at 8/7/14 3:08 PM:
---

Thanks for the patch. Any chance this can be back ported to 2.0.5 since we are 
not using custom builds in our deployment. i.e. after its been 
reviewed/verified of course...


was (Author: samnor):
Thanks for the patch. Any chance this can be back ported to 2.0.5 since we are 
not using custom builds in our deployment.

 cassandra sstableloader connection refused with inter_node_encryption
 -

 Key: CASSANDRA-7585
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7585
 Project: Cassandra
  Issue Type: Bug
  Components: Core, Tools
Reporter: Samphel Norden
Assignee: Yuki Morishita
 Fix For: 2.0.10, 2.1.1

 Attachments: 7585-2.0.txt


 cassandra sstableloader connection refused with inter_node_encryption
 When using sstableloader to import tables  (cassandra 2.0.5) with inter-node 
 encryption and client encryption enabled, I get a connection refused error
 I am using
 sstableloader -d $myhost -p 9160 -u cassandra -pw cassandra -ciphers 
 TLS_RSA_WITH_AES_128_CBC_SHA,TLS_DHE_RSA_WITH_AES_128_CBC_SHA,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
  -st JKS  -tf org.apache.cassandra.thrift.SSLTransportFactory -ts 
 /path/to/truststore  -tspw passwd $fullpath/$table
 Errors out with
 Streaming session ID: 1bc395c0-fbb2-11e3-9812-73da15121373
  WARN 17:13:34,147 Failed attempt 1 to connect to
 Similar problem reported in cassandra 2.0.8 by another user
 http://stackoverflow.com/questions/24390604/cassandra-sstableloader-connection-refused-with-inter-node-encryption
 ==
 Relevant cassandra.yaml snippet (with obfuscation)
 server_encryption_options:
   
 internode_encryption: all 
  
 keystore:/path/to/keystore

 keystore_password: passwd   
  
 truststore:/path/to/truststore
  
 truststore_password:passwd  

 # More advanced defaults below:   
   
 protocol: TLS 
   
 algorithm: SunX509
   
 store_type: JKS   
   
 cipher_suites: 
 [TLS_RSA_WITH_AES_128_CBC_SHA,TLS_DHE_RSA_WITH_AES_128_CBC_SHA,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA]

 require_client_auth: true 
   
   
   
 # enable or disable client/server encryption. 
   
 client_encryption_options:
   
 enabled: true 
   
 keystore: /path/to/keystore   
  
 keystore_password: truststorepasswd 

 #require_client_auth: true
   
 # Set trustore and truststore_password if require_client_auth is true 
   
 truststore:/path/to/truststore
 
 truststore_password: truststorepasswd   

 # More advanced defaults below:   
   
 protocol: TLS 
   
 algorithm: SunX509 

[jira] [Commented] (CASSANDRA-6612) Query failing due to AssertionError

2014-08-07 Thread Sam Tunnicliffe (JIRA)

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

Sam Tunnicliffe commented on CASSANDRA-6612:


I agree that SIM is in dire need of an overhaul and because of that this is a 
slightly hackish solution. That aside, the patch looks good to me. Just one 
thing to note,  the bogus logic in SIM.hasIndexFor is already fixed in 2.1 by 
CASSANDRA-7525

 Query failing due to AssertionError
 ---

 Key: CASSANDRA-6612
 URL: https://issues.apache.org/jira/browse/CASSANDRA-6612
 Project: Cassandra
  Issue Type: Bug
 Environment: Cassandra-2.0.4, CQL3, datastax driver 2.0.0-rc2
Reporter: A Verma
Assignee: Sylvain Lebresne
 Fix For: 2.0.10

 Attachments: 6612.txt


 I am trying out Cassandra for the first time and running it locally for 
 simple session management db. [Cassandra-2.0.4, CQL3, datastax driver 
 2.0.0-rc2]
 The following count query works fine when there is no data in the table:
 {code}
 select count(*) from session_data where app_name=? and account=? and 
 last_access  ?
 {code}
 But after even a single row is inserted into the table, the query fails with 
 the following error:
 {code}
 java.lang.AssertionError
   at 
 org.apache.cassandra.db.filter.ExtendedFilter$WithClauses.getExtraFilter(ExtendedFilter.java:258)
   at 
 org.apache.cassandra.db.ColumnFamilyStore.filter(ColumnFamilyStore.java:1719)
   at 
 org.apache.cassandra.db.ColumnFamilyStore.getRangeSlice(ColumnFamilyStore.java:1674)
   at 
 org.apache.cassandra.db.PagedRangeCommand.executeLocally(PagedRangeCommand.java:111)
   at 
 org.apache.cassandra.service.StorageProxy$LocalRangeSliceRunnable.runMayThrow(StorageProxy.java:1418)
   at 
 org.apache.cassandra.service.StorageProxy$DroppableRunnable.run(StorageProxy.java:1931)
   at 
 java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
   at 
 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
   at java.lang.Thread.run(Thread.java:744)
 {code}
 Here is the schema I am using:
 {code}
 CREATE KEYSPACE session WITH replication= {'class': 'SimpleStrategy', 
 'replication_factor': 1};
 CREATE TABLE session_data (
 username text,
 session_id text,
 app_name text,
 account text,
 last_access timestamp,
 created_on timestamp,
 PRIMARY KEY (username, session_id, app_name, account)
 );
 create index sessionIndex ON session_data (session_id);
 create index sessionAppName ON session_data (app_name);
 create index lastAccessIndex ON session_data (last_access);
 {code}



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Updated] (CASSANDRA-7713) CommitLogTest failure causes cascading unit test failures

2014-08-07 Thread Michael Shuler (JIRA)

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

Michael Shuler updated CASSANDRA-7713:
--

Attachment: CommitLogTest.system.log.txt

[junit]  
jar:file:/usr/share/ant/lib/ant.jar!/org/apache/tools/ant/Project.class
[junit]  and 
jar:file:/home/mshuler/git/cassandra/build/lib/jars/ant-1.6.5.jar!/org/apache/tools/ant/Project.class
[junit] Testsuite: org.apache.cassandra.db.CommitLogTest
[junit] Testsuite: org.apache.cassandra.db.CommitLogTest
[junit] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0 
sec
[junit] 
[junit] Testcase: 
org.apache.cassandra.db.CommitLogTest:testCommitFailurePolicy_stop:   
Caused an ERROR
[junit] Timeout occurred. Please note the time in the report does not 
reflect the time until the timeout.
[junit] junit.framework.AssertionFailedError: Timeout occurred. Please note 
the time in the report does not reflect the time until the timeout.
[junit] 
[junit] 
[junit] Test org.apache.cassandra.db.CommitLogTest FAILED (timeout)
{noformat}
{noformat}
$ ls -la build/test/cassandra/commitlog/
total 3544
dr-xr-xr-x 2 mshuler mshuler4096 Aug  7 10:20 .
drwxr-xr-x 5 mshuler mshuler4096 Aug  7 10:20 ..
-rw-r--r-- 1 mshuler mshuler 1048576 Aug  7 10:20 CommitLog-3-1407424853372.log
-rw-r--r-- 1 mshuler mshuler 1048576 Aug  7 10:20 CommitLog-3-1407424853373.log
-rw-r--r-- 1 mshuler mshuler 1048576 Aug  7 10:20 CommitLog-3-1407424853374.log
-rw-r--r-- 1 mshuler mshuler 1048576 Aug  7 10:20 CommitLog-3-1407424853375.log
-rw-r--r-- 1 mshuler mshuler 1048576 Aug  7 10:20 CommitLog-3-1407424853376.log
-rw-r--r-- 1 mshuler mshuler 1048576 Aug  7 10:20 CommitLog-3-1407424853379.log
-rw-r--r-- 1 mshuler mshuler 1048576 Aug  7 10:20 CommitLog-3-1407424853380.log
-rw-r--r-- 1 mshuler mshuler 1048576 Aug  7 10:20 CommitLog-3-1407424853381.log
{noformat}

cassandra-2.0 CommitLogTest timeout system.log attached. (Total logged time is 
6 seconds, so test is not hitting 60 sec timeout due to actual runtime)

 CommitLogTest failure causes cascading unit test failures
 -

 Key: CASSANDRA-7713
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7713
 Project: Cassandra
  Issue Type: Test
Reporter: Michael Shuler
 Fix For: 2.0.10, 2.1.1

 Attachments: CommitLogTest.system.log.txt


 When CommitLogTest.testCommitFailurePolicy_stop fails or times out, 
 {{commitDir.setWritable(true)}} is never reached, so the 
 build/test/cassandra/commitlog directory is left without write permissions, 
 causing cascading failure of all subsequent tests.



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Comment Edited] (CASSANDRA-7713) CommitLogTest failure causes cascading unit test failures

2014-08-07 Thread Michael Shuler (JIRA)

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

Michael Shuler edited comment on CASSANDRA-7713 at 8/7/14 3:33 PM:
---

Example CommitLogTest run that timed out on me, similar to what's happening in 
CI:
{noformat}
test:
 [echo] running unit tests
[mkdir] Created dir: /home/mshuler/git/cassandra/build/test/cassandra
[mkdir] Created dir: /home/mshuler/git/cassandra/build/test/output
[junit] WARNING: multiple versions of ant detected in path for junit 
[junit]  
jar:file:/usr/share/ant/lib/ant.jar!/org/apache/tools/ant/Project.class
[junit]  and 
jar:file:/home/mshuler/git/cassandra/build/lib/jars/ant-1.6.5.jar!/org/apache/tools/ant/Project.class
[junit] Testsuite: org.apache.cassandra.db.CommitLogTest
[junit] Testsuite: org.apache.cassandra.db.CommitLogTest
[junit] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0 
sec
[junit] 
[junit] Testcase: 
org.apache.cassandra.db.CommitLogTest:testCommitFailurePolicy_stop:   
Caused an ERROR
[junit] Timeout occurred. Please note the time in the report does not 
reflect the time until the timeout.
[junit] junit.framework.AssertionFailedError: Timeout occurred. Please note 
the time in the report does not reflect the time until the timeout.
[junit] 
[junit] 
[junit] Test org.apache.cassandra.db.CommitLogTest FAILED (timeout)

BUILD FAILED
{noformat}
{noformat}
$ ls -la build/test/cassandra/commitlog/
total 3544
dr-xr-xr-x 2 mshuler mshuler4096 Aug  7 10:20 .
drwxr-xr-x 5 mshuler mshuler4096 Aug  7 10:20 ..
-rw-r--r-- 1 mshuler mshuler 1048576 Aug  7 10:20 CommitLog-3-1407424853372.log
-rw-r--r-- 1 mshuler mshuler 1048576 Aug  7 10:20 CommitLog-3-1407424853373.log
-rw-r--r-- 1 mshuler mshuler 1048576 Aug  7 10:20 CommitLog-3-1407424853374.log
-rw-r--r-- 1 mshuler mshuler 1048576 Aug  7 10:20 CommitLog-3-1407424853375.log
-rw-r--r-- 1 mshuler mshuler 1048576 Aug  7 10:20 CommitLog-3-1407424853376.log
-rw-r--r-- 1 mshuler mshuler 1048576 Aug  7 10:20 CommitLog-3-1407424853379.log
-rw-r--r-- 1 mshuler mshuler 1048576 Aug  7 10:20 CommitLog-3-1407424853380.log
-rw-r--r-- 1 mshuler mshuler 1048576 Aug  7 10:20 CommitLog-3-1407424853381.log
{noformat}

cassandra-2.0 CommitLogTest timeout system.log attached. (Total logged time is 
6 seconds, so test is not hitting 60 sec timeout due to actual runtime)


was (Author: mshuler):
[junit]  
jar:file:/usr/share/ant/lib/ant.jar!/org/apache/tools/ant/Project.class
[junit]  and 
jar:file:/home/mshuler/git/cassandra/build/lib/jars/ant-1.6.5.jar!/org/apache/tools/ant/Project.class
[junit] Testsuite: org.apache.cassandra.db.CommitLogTest
[junit] Testsuite: org.apache.cassandra.db.CommitLogTest
[junit] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0 
sec
[junit] 
[junit] Testcase: 
org.apache.cassandra.db.CommitLogTest:testCommitFailurePolicy_stop:   
Caused an ERROR
[junit] Timeout occurred. Please note the time in the report does not 
reflect the time until the timeout.
[junit] junit.framework.AssertionFailedError: Timeout occurred. Please note 
the time in the report does not reflect the time until the timeout.
[junit] 
[junit] 
[junit] Test org.apache.cassandra.db.CommitLogTest FAILED (timeout)
{noformat}
{noformat}
$ ls -la build/test/cassandra/commitlog/
total 3544
dr-xr-xr-x 2 mshuler mshuler4096 Aug  7 10:20 .
drwxr-xr-x 5 mshuler mshuler4096 Aug  7 10:20 ..
-rw-r--r-- 1 mshuler mshuler 1048576 Aug  7 10:20 CommitLog-3-1407424853372.log
-rw-r--r-- 1 mshuler mshuler 1048576 Aug  7 10:20 CommitLog-3-1407424853373.log
-rw-r--r-- 1 mshuler mshuler 1048576 Aug  7 10:20 CommitLog-3-1407424853374.log
-rw-r--r-- 1 mshuler mshuler 1048576 Aug  7 10:20 CommitLog-3-1407424853375.log
-rw-r--r-- 1 mshuler mshuler 1048576 Aug  7 10:20 CommitLog-3-1407424853376.log
-rw-r--r-- 1 mshuler mshuler 1048576 Aug  7 10:20 CommitLog-3-1407424853379.log
-rw-r--r-- 1 mshuler mshuler 1048576 Aug  7 10:20 CommitLog-3-1407424853380.log
-rw-r--r-- 1 mshuler mshuler 1048576 Aug  7 10:20 CommitLog-3-1407424853381.log
{noformat}

cassandra-2.0 CommitLogTest timeout system.log attached. (Total logged time is 
6 seconds, so test is not hitting 60 sec timeout due to actual runtime)

 CommitLogTest failure causes cascading unit test failures
 -

 Key: CASSANDRA-7713
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7713
 Project: Cassandra
  Issue Type: Test
Reporter: Michael Shuler
 Fix For: 2.0.10, 2.1.1

 Attachments: CommitLogTest.system.log.txt


 When CommitLogTest.testCommitFailurePolicy_stop fails or times out, 
 

[jira] [Commented] (CASSANDRA-7585) cassandra sstableloader connection refused with inter_node_encryption

2014-08-07 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis commented on CASSANDRA-7585:
---

2.0.5 + 7585 would *be* a custom build.  You should plan on running the stable 
release that this is committed to.

 cassandra sstableloader connection refused with inter_node_encryption
 -

 Key: CASSANDRA-7585
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7585
 Project: Cassandra
  Issue Type: Bug
  Components: Core, Tools
Reporter: Samphel Norden
Assignee: Yuki Morishita
 Fix For: 2.0.10, 2.1.1

 Attachments: 7585-2.0.txt


 cassandra sstableloader connection refused with inter_node_encryption
 When using sstableloader to import tables  (cassandra 2.0.5) with inter-node 
 encryption and client encryption enabled, I get a connection refused error
 I am using
 sstableloader -d $myhost -p 9160 -u cassandra -pw cassandra -ciphers 
 TLS_RSA_WITH_AES_128_CBC_SHA,TLS_DHE_RSA_WITH_AES_128_CBC_SHA,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
  -st JKS  -tf org.apache.cassandra.thrift.SSLTransportFactory -ts 
 /path/to/truststore  -tspw passwd $fullpath/$table
 Errors out with
 Streaming session ID: 1bc395c0-fbb2-11e3-9812-73da15121373
  WARN 17:13:34,147 Failed attempt 1 to connect to
 Similar problem reported in cassandra 2.0.8 by another user
 http://stackoverflow.com/questions/24390604/cassandra-sstableloader-connection-refused-with-inter-node-encryption
 ==
 Relevant cassandra.yaml snippet (with obfuscation)
 server_encryption_options:
   
 internode_encryption: all 
  
 keystore:/path/to/keystore

 keystore_password: passwd   
  
 truststore:/path/to/truststore
  
 truststore_password:passwd  

 # More advanced defaults below:   
   
 protocol: TLS 
   
 algorithm: SunX509
   
 store_type: JKS   
   
 cipher_suites: 
 [TLS_RSA_WITH_AES_128_CBC_SHA,TLS_DHE_RSA_WITH_AES_128_CBC_SHA,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA]

 require_client_auth: true 
   
   
   
 # enable or disable client/server encryption. 
   
 client_encryption_options:
   
 enabled: true 
   
 keystore: /path/to/keystore   
  
 keystore_password: truststorepasswd 

 #require_client_auth: true
   
 # Set trustore and truststore_password if require_client_auth is true 
   
 truststore:/path/to/truststore
 
 truststore_password: truststorepasswd   

 # More advanced defaults below:   
   
 protocol: TLS 
   
 algorithm: SunX509
   
 store_type: JKS   
   
 cipher_suites: 
 

[jira] [Commented] (CASSANDRA-7585) cassandra sstableloader connection refused with inter_node_encryption

2014-08-07 Thread Yuki Morishita (JIRA)

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

Yuki Morishita commented on CASSANDRA-7585:
---

I haven't tried yet, but streaming protocol haven't changed in 2.0.5 to 
2.0-head, so in theory, you can use latest (or patched) version of 
sstableloader to your 2.0.5 cassandra cluster.

 cassandra sstableloader connection refused with inter_node_encryption
 -

 Key: CASSANDRA-7585
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7585
 Project: Cassandra
  Issue Type: Bug
  Components: Core, Tools
Reporter: Samphel Norden
Assignee: Yuki Morishita
 Fix For: 2.0.10, 2.1.1

 Attachments: 7585-2.0.txt


 cassandra sstableloader connection refused with inter_node_encryption
 When using sstableloader to import tables  (cassandra 2.0.5) with inter-node 
 encryption and client encryption enabled, I get a connection refused error
 I am using
 sstableloader -d $myhost -p 9160 -u cassandra -pw cassandra -ciphers 
 TLS_RSA_WITH_AES_128_CBC_SHA,TLS_DHE_RSA_WITH_AES_128_CBC_SHA,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
  -st JKS  -tf org.apache.cassandra.thrift.SSLTransportFactory -ts 
 /path/to/truststore  -tspw passwd $fullpath/$table
 Errors out with
 Streaming session ID: 1bc395c0-fbb2-11e3-9812-73da15121373
  WARN 17:13:34,147 Failed attempt 1 to connect to
 Similar problem reported in cassandra 2.0.8 by another user
 http://stackoverflow.com/questions/24390604/cassandra-sstableloader-connection-refused-with-inter-node-encryption
 ==
 Relevant cassandra.yaml snippet (with obfuscation)
 server_encryption_options:
   
 internode_encryption: all 
  
 keystore:/path/to/keystore

 keystore_password: passwd   
  
 truststore:/path/to/truststore
  
 truststore_password:passwd  

 # More advanced defaults below:   
   
 protocol: TLS 
   
 algorithm: SunX509
   
 store_type: JKS   
   
 cipher_suites: 
 [TLS_RSA_WITH_AES_128_CBC_SHA,TLS_DHE_RSA_WITH_AES_128_CBC_SHA,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA]

 require_client_auth: true 
   
   
   
 # enable or disable client/server encryption. 
   
 client_encryption_options:
   
 enabled: true 
   
 keystore: /path/to/keystore   
  
 keystore_password: truststorepasswd 

 #require_client_auth: true
   
 # Set trustore and truststore_password if require_client_auth is true 
   
 truststore:/path/to/truststore
 
 truststore_password: truststorepasswd   

 # More advanced defaults below:   
   
 protocol: TLS 
   
 algorithm: SunX509
   
 store_type: JKS   
 

[jira] [Commented] (CASSANDRA-7585) cassandra sstableloader connection refused with inter_node_encryption

2014-08-07 Thread Samphel Norden (JIRA)

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

Samphel Norden commented on CASSANDRA-7585:
---

Great. Looking forward to the patch getting into stable release...

 cassandra sstableloader connection refused with inter_node_encryption
 -

 Key: CASSANDRA-7585
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7585
 Project: Cassandra
  Issue Type: Bug
  Components: Core, Tools
Reporter: Samphel Norden
Assignee: Yuki Morishita
 Fix For: 2.0.10, 2.1.1

 Attachments: 7585-2.0.txt


 cassandra sstableloader connection refused with inter_node_encryption
 When using sstableloader to import tables  (cassandra 2.0.5) with inter-node 
 encryption and client encryption enabled, I get a connection refused error
 I am using
 sstableloader -d $myhost -p 9160 -u cassandra -pw cassandra -ciphers 
 TLS_RSA_WITH_AES_128_CBC_SHA,TLS_DHE_RSA_WITH_AES_128_CBC_SHA,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
  -st JKS  -tf org.apache.cassandra.thrift.SSLTransportFactory -ts 
 /path/to/truststore  -tspw passwd $fullpath/$table
 Errors out with
 Streaming session ID: 1bc395c0-fbb2-11e3-9812-73da15121373
  WARN 17:13:34,147 Failed attempt 1 to connect to
 Similar problem reported in cassandra 2.0.8 by another user
 http://stackoverflow.com/questions/24390604/cassandra-sstableloader-connection-refused-with-inter-node-encryption
 ==
 Relevant cassandra.yaml snippet (with obfuscation)
 server_encryption_options:
   
 internode_encryption: all 
  
 keystore:/path/to/keystore

 keystore_password: passwd   
  
 truststore:/path/to/truststore
  
 truststore_password:passwd  

 # More advanced defaults below:   
   
 protocol: TLS 
   
 algorithm: SunX509
   
 store_type: JKS   
   
 cipher_suites: 
 [TLS_RSA_WITH_AES_128_CBC_SHA,TLS_DHE_RSA_WITH_AES_128_CBC_SHA,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA]

 require_client_auth: true 
   
   
   
 # enable or disable client/server encryption. 
   
 client_encryption_options:
   
 enabled: true 
   
 keystore: /path/to/keystore   
  
 keystore_password: truststorepasswd 

 #require_client_auth: true
   
 # Set trustore and truststore_password if require_client_auth is true 
   
 truststore:/path/to/truststore
 
 truststore_password: truststorepasswd   

 # More advanced defaults below:   
   
 protocol: TLS 
   
 algorithm: SunX509
   
 store_type: JKS   
   
 cipher_suites: 
 

git commit: Fix potential AssertionError with 2ndary indexes

2014-08-07 Thread slebresne
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-2.0 6e6a6c397 - 3970c650d


Fix potential AssertionError with 2ndary indexes

patch by slebresne; reviewed by beobal for CASSANDRA-6612


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

Branch: refs/heads/cassandra-2.0
Commit: 3970c650d43f8b8bb9aa1c153055fd838a9b4bb6
Parents: 6e6a6c3
Author: Sylvain Lebresne sylv...@datastax.com
Authored: Thu Aug 7 18:09:57 2014 +0200
Committer: Sylvain Lebresne sylv...@datastax.com
Committed: Thu Aug 7 18:23:52 2014 +0200

--
 CHANGES.txt |  1 +
 .../db/index/AbstractSimplePerColumnSecondaryIndex.java |  6 ++
 .../org/apache/cassandra/db/index/SecondaryIndex.java   | 10 ++
 .../cassandra/db/index/SecondaryIndexManager.java   | 12 +---
 4 files changed, 22 insertions(+), 7 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/3970c650/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 915aeea..df40933 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.0.10
+ * Fix potential AssertionError with 2ndary indexes (CASSANDRA-6612)
  * Avoid logging CompactionInterrupted at ERROR (CASSANDRA-7694)
  * Minor leak in sstable2jon (CASSANDRA-7709)
  * Add cassandra.auto_bootstrap system property (CASSANDRA-7650)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/3970c650/src/java/org/apache/cassandra/db/index/AbstractSimplePerColumnSecondaryIndex.java
--
diff --git 
a/src/java/org/apache/cassandra/db/index/AbstractSimplePerColumnSecondaryIndex.java
 
b/src/java/org/apache/cassandra/db/index/AbstractSimplePerColumnSecondaryIndex.java
index 8b12575..87e87cb 100644
--- 
a/src/java/org/apache/cassandra/db/index/AbstractSimplePerColumnSecondaryIndex.java
+++ 
b/src/java/org/apache/cassandra/db/index/AbstractSimplePerColumnSecondaryIndex.java
@@ -55,6 +55,12 @@ public abstract class AbstractSimplePerColumnSecondaryIndex 
extends PerColumnSec
  
indexedCfMetadata);
 }
 
+@Override
+String indexTypeForGrouping()
+{
+return _internal_;
+}
+
 protected abstract ByteBuffer makeIndexColumnName(ByteBuffer rowKey, 
Column column);
 
 protected abstract ByteBuffer getIndexedValue(ByteBuffer rowKey, Column 
column);

http://git-wip-us.apache.org/repos/asf/cassandra/blob/3970c650/src/java/org/apache/cassandra/db/index/SecondaryIndex.java
--
diff --git a/src/java/org/apache/cassandra/db/index/SecondaryIndex.java 
b/src/java/org/apache/cassandra/db/index/SecondaryIndex.java
index fda28f0..64266c4 100644
--- a/src/java/org/apache/cassandra/db/index/SecondaryIndex.java
+++ b/src/java/org/apache/cassandra/db/index/SecondaryIndex.java
@@ -94,6 +94,16 @@ public abstract class SecondaryIndex
  */
 abstract public String getIndexName();
 
+/**
+ * All internal 2ndary indexes will return _internal_ for this. Custom
+ * 2ndary indexes will return their class name. This only matter for
+ * SecondaryIndexManager.groupByIndexType.
+ */
+String indexTypeForGrouping()
+{
+// Our internal indexes overwrite this
+return getClass().getCanonicalName();
+}
 
 /**
  * Return the unique name for this index and column

http://git-wip-us.apache.org/repos/asf/cassandra/blob/3970c650/src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java
--
diff --git a/src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java 
b/src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java
index 2c0d611..a15464a 100644
--- a/src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java
+++ b/src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java
@@ -198,17 +198,15 @@ public class SecondaryIndexManager
 if (clause == null || clause.isEmpty())
 return false;
 
-// It doesn't seem a clause can have multiple searchers, but since
-// getIndexSearchersForQuery returns a list ...
 ListSecondaryIndexSearcher searchers = 
getIndexSearchersForQuery(clause);
 if (searchers.isEmpty())
 return false;
 
 for (SecondaryIndexSearcher searcher : searchers)
-if (!searcher.isIndexing(clause))
-return false;
+if (searcher.isIndexing(clause))
+return 

[2/2] git commit: Merge branch 'cassandra-2.0' into cassandra-2.1.0

2014-08-07 Thread slebresne
Merge branch 'cassandra-2.0' into cassandra-2.1.0

Conflicts:
CHANGES.txt

src/java/org/apache/cassandra/db/index/AbstractSimplePerColumnSecondaryIndex.java
src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java


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

Branch: refs/heads/cassandra-2.1.0
Commit: d8eff03df0bbfa9066855bc49e18d76f609508a0
Parents: 33de6dc 3970c65
Author: Sylvain Lebresne sylv...@datastax.com
Authored: Thu Aug 7 18:32:36 2014 +0200
Committer: Sylvain Lebresne sylv...@datastax.com
Committed: Thu Aug 7 18:32:36 2014 +0200

--
 CHANGES.txt   |  1 +
 .../db/index/AbstractSimplePerColumnSecondaryIndex.java   |  6 ++
 .../org/apache/cassandra/db/index/SecondaryIndex.java | 10 ++
 .../apache/cassandra/db/index/SecondaryIndexManager.java  |  4 ++--
 4 files changed, 19 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/d8eff03d/CHANGES.txt
--
diff --cc CHANGES.txt
index dfeca21,df40933..26b39e0
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,9 -1,5 +1,10 @@@
 -2.0.10
 +2.1.0-final
 + * cqlsh DESC CLUSTER fails retrieving ring information (CASSANDRA-7687)
 + * Fix binding null values inside UDT (CASSANDRA-7685)
 + * Fix UDT field selection with empty fields (CASSANDRA-7670)
 + * Bogus deserialization of static cells from sstable (CASSANDRA-7684)
 +Merged from 2.0:
+  * Fix potential AssertionError with 2ndary indexes (CASSANDRA-6612)
   * Avoid logging CompactionInterrupted at ERROR (CASSANDRA-7694)
   * Minor leak in sstable2jon (CASSANDRA-7709)
   * Add cassandra.auto_bootstrap system property (CASSANDRA-7650)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/d8eff03d/src/java/org/apache/cassandra/db/index/AbstractSimplePerColumnSecondaryIndex.java
--
diff --cc 
src/java/org/apache/cassandra/db/index/AbstractSimplePerColumnSecondaryIndex.java
index a2011b6,87e87cb..d8c03fb
--- 
a/src/java/org/apache/cassandra/db/index/AbstractSimplePerColumnSecondaryIndex.java
+++ 
b/src/java/org/apache/cassandra/db/index/AbstractSimplePerColumnSecondaryIndex.java
@@@ -60,20 -55,15 +60,26 @@@ public abstract class AbstractSimplePer
   
indexedCfMetadata);
  }
  
 +protected AbstractType? getIndexKeyComparator()
 +{
 +return columnDef.type;
 +}
 +
 +@Override
 +public DecoratedKey getIndexKeyFor(ByteBuffer value)
 +{
 +return new BufferDecoratedKey(new LocalToken(getIndexKeyComparator(), 
value), value);
 +}
 +
+ @Override
+ String indexTypeForGrouping()
+ {
+ return _internal_;
+ }
+ 
 -protected abstract ByteBuffer makeIndexColumnName(ByteBuffer rowKey, 
Column column);
 +protected abstract CellName makeIndexColumnName(ByteBuffer rowKey, Cell 
cell);
  
 -protected abstract ByteBuffer getIndexedValue(ByteBuffer rowKey, Column 
column);
 +protected abstract ByteBuffer getIndexedValue(ByteBuffer rowKey, Cell 
cell);
  
  protected abstract AbstractType getExpressionComparator();
  

http://git-wip-us.apache.org/repos/asf/cassandra/blob/d8eff03d/src/java/org/apache/cassandra/db/index/SecondaryIndex.java
--

http://git-wip-us.apache.org/repos/asf/cassandra/blob/d8eff03d/src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java
--
diff --cc src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java
index edb9126,a15464a..339af8f
--- a/src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java
+++ b/src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java
@@@ -547,10 -518,10 +547,10 @@@ public class SecondaryIndexManage
  if (columns == null)
  {
  columns = new HashSet();
- groupByIndexType.put(index.getClass().getCanonicalName(), 
columns);
+ groupByIndexType.put(index.indexTypeForGrouping(), columns);
  }
  
 -columns.add(ix.column_name);
 +columns.add(ix.column);
  }
  
  ListSecondaryIndexSearcher indexSearchers = new 
ArrayList(groupByIndexType.size());



[1/2] git commit: Fix potential AssertionError with 2ndary indexes

2014-08-07 Thread slebresne
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-2.1.0 33de6dc11 - d8eff03df


Fix potential AssertionError with 2ndary indexes

patch by slebresne; reviewed by beobal for CASSANDRA-6612


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

Branch: refs/heads/cassandra-2.1.0
Commit: 3970c650d43f8b8bb9aa1c153055fd838a9b4bb6
Parents: 6e6a6c3
Author: Sylvain Lebresne sylv...@datastax.com
Authored: Thu Aug 7 18:09:57 2014 +0200
Committer: Sylvain Lebresne sylv...@datastax.com
Committed: Thu Aug 7 18:23:52 2014 +0200

--
 CHANGES.txt |  1 +
 .../db/index/AbstractSimplePerColumnSecondaryIndex.java |  6 ++
 .../org/apache/cassandra/db/index/SecondaryIndex.java   | 10 ++
 .../cassandra/db/index/SecondaryIndexManager.java   | 12 +---
 4 files changed, 22 insertions(+), 7 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/3970c650/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 915aeea..df40933 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.0.10
+ * Fix potential AssertionError with 2ndary indexes (CASSANDRA-6612)
  * Avoid logging CompactionInterrupted at ERROR (CASSANDRA-7694)
  * Minor leak in sstable2jon (CASSANDRA-7709)
  * Add cassandra.auto_bootstrap system property (CASSANDRA-7650)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/3970c650/src/java/org/apache/cassandra/db/index/AbstractSimplePerColumnSecondaryIndex.java
--
diff --git 
a/src/java/org/apache/cassandra/db/index/AbstractSimplePerColumnSecondaryIndex.java
 
b/src/java/org/apache/cassandra/db/index/AbstractSimplePerColumnSecondaryIndex.java
index 8b12575..87e87cb 100644
--- 
a/src/java/org/apache/cassandra/db/index/AbstractSimplePerColumnSecondaryIndex.java
+++ 
b/src/java/org/apache/cassandra/db/index/AbstractSimplePerColumnSecondaryIndex.java
@@ -55,6 +55,12 @@ public abstract class AbstractSimplePerColumnSecondaryIndex 
extends PerColumnSec
  
indexedCfMetadata);
 }
 
+@Override
+String indexTypeForGrouping()
+{
+return _internal_;
+}
+
 protected abstract ByteBuffer makeIndexColumnName(ByteBuffer rowKey, 
Column column);
 
 protected abstract ByteBuffer getIndexedValue(ByteBuffer rowKey, Column 
column);

http://git-wip-us.apache.org/repos/asf/cassandra/blob/3970c650/src/java/org/apache/cassandra/db/index/SecondaryIndex.java
--
diff --git a/src/java/org/apache/cassandra/db/index/SecondaryIndex.java 
b/src/java/org/apache/cassandra/db/index/SecondaryIndex.java
index fda28f0..64266c4 100644
--- a/src/java/org/apache/cassandra/db/index/SecondaryIndex.java
+++ b/src/java/org/apache/cassandra/db/index/SecondaryIndex.java
@@ -94,6 +94,16 @@ public abstract class SecondaryIndex
  */
 abstract public String getIndexName();
 
+/**
+ * All internal 2ndary indexes will return _internal_ for this. Custom
+ * 2ndary indexes will return their class name. This only matter for
+ * SecondaryIndexManager.groupByIndexType.
+ */
+String indexTypeForGrouping()
+{
+// Our internal indexes overwrite this
+return getClass().getCanonicalName();
+}
 
 /**
  * Return the unique name for this index and column

http://git-wip-us.apache.org/repos/asf/cassandra/blob/3970c650/src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java
--
diff --git a/src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java 
b/src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java
index 2c0d611..a15464a 100644
--- a/src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java
+++ b/src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java
@@ -198,17 +198,15 @@ public class SecondaryIndexManager
 if (clause == null || clause.isEmpty())
 return false;
 
-// It doesn't seem a clause can have multiple searchers, but since
-// getIndexSearchersForQuery returns a list ...
 ListSecondaryIndexSearcher searchers = 
getIndexSearchersForQuery(clause);
 if (searchers.isEmpty())
 return false;
 
 for (SecondaryIndexSearcher searcher : searchers)
-if (!searcher.isIndexing(clause))
-return false;
+if (searcher.isIndexing(clause))
+

[jira] [Updated] (CASSANDRA-7570) CqlPagingRecordReader is broken

2014-08-07 Thread Alex Liu (JIRA)

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

Alex Liu updated CASSANDRA-7570:


Attachment: 7570-2.0-branch.txt

7570-2.0-branch.txt fixes the broken pig tests

 CqlPagingRecordReader is broken
 ---

 Key: CASSANDRA-7570
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7570
 Project: Cassandra
  Issue Type: Bug
  Components: Hadoop
Reporter: Brandon Williams
Assignee: Alex Liu
 Fix For: 2.0.10, 2.1.1

 Attachments: 7570-2.0-branch.txt


 As mentioned on CASSANDRA-7059, it broke CPRR.  It's not quite as simple as 
 changing the greater than to a greater than equal, either, since that makes 
 the task run forever.



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[2/3] git commit: Merge branch 'cassandra-2.0' into cassandra-2.1.0

2014-08-07 Thread slebresne
Merge branch 'cassandra-2.0' into cassandra-2.1.0

Conflicts:
CHANGES.txt

src/java/org/apache/cassandra/db/index/AbstractSimplePerColumnSecondaryIndex.java
src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java


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

Branch: refs/heads/cassandra-2.1
Commit: d8eff03df0bbfa9066855bc49e18d76f609508a0
Parents: 33de6dc 3970c65
Author: Sylvain Lebresne sylv...@datastax.com
Authored: Thu Aug 7 18:32:36 2014 +0200
Committer: Sylvain Lebresne sylv...@datastax.com
Committed: Thu Aug 7 18:32:36 2014 +0200

--
 CHANGES.txt   |  1 +
 .../db/index/AbstractSimplePerColumnSecondaryIndex.java   |  6 ++
 .../org/apache/cassandra/db/index/SecondaryIndex.java | 10 ++
 .../apache/cassandra/db/index/SecondaryIndexManager.java  |  4 ++--
 4 files changed, 19 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/d8eff03d/CHANGES.txt
--
diff --cc CHANGES.txt
index dfeca21,df40933..26b39e0
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,9 -1,5 +1,10 @@@
 -2.0.10
 +2.1.0-final
 + * cqlsh DESC CLUSTER fails retrieving ring information (CASSANDRA-7687)
 + * Fix binding null values inside UDT (CASSANDRA-7685)
 + * Fix UDT field selection with empty fields (CASSANDRA-7670)
 + * Bogus deserialization of static cells from sstable (CASSANDRA-7684)
 +Merged from 2.0:
+  * Fix potential AssertionError with 2ndary indexes (CASSANDRA-6612)
   * Avoid logging CompactionInterrupted at ERROR (CASSANDRA-7694)
   * Minor leak in sstable2jon (CASSANDRA-7709)
   * Add cassandra.auto_bootstrap system property (CASSANDRA-7650)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/d8eff03d/src/java/org/apache/cassandra/db/index/AbstractSimplePerColumnSecondaryIndex.java
--
diff --cc 
src/java/org/apache/cassandra/db/index/AbstractSimplePerColumnSecondaryIndex.java
index a2011b6,87e87cb..d8c03fb
--- 
a/src/java/org/apache/cassandra/db/index/AbstractSimplePerColumnSecondaryIndex.java
+++ 
b/src/java/org/apache/cassandra/db/index/AbstractSimplePerColumnSecondaryIndex.java
@@@ -60,20 -55,15 +60,26 @@@ public abstract class AbstractSimplePer
   
indexedCfMetadata);
  }
  
 +protected AbstractType? getIndexKeyComparator()
 +{
 +return columnDef.type;
 +}
 +
 +@Override
 +public DecoratedKey getIndexKeyFor(ByteBuffer value)
 +{
 +return new BufferDecoratedKey(new LocalToken(getIndexKeyComparator(), 
value), value);
 +}
 +
+ @Override
+ String indexTypeForGrouping()
+ {
+ return _internal_;
+ }
+ 
 -protected abstract ByteBuffer makeIndexColumnName(ByteBuffer rowKey, 
Column column);
 +protected abstract CellName makeIndexColumnName(ByteBuffer rowKey, Cell 
cell);
  
 -protected abstract ByteBuffer getIndexedValue(ByteBuffer rowKey, Column 
column);
 +protected abstract ByteBuffer getIndexedValue(ByteBuffer rowKey, Cell 
cell);
  
  protected abstract AbstractType getExpressionComparator();
  

http://git-wip-us.apache.org/repos/asf/cassandra/blob/d8eff03d/src/java/org/apache/cassandra/db/index/SecondaryIndex.java
--

http://git-wip-us.apache.org/repos/asf/cassandra/blob/d8eff03d/src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java
--
diff --cc src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java
index edb9126,a15464a..339af8f
--- a/src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java
+++ b/src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java
@@@ -547,10 -518,10 +547,10 @@@ public class SecondaryIndexManage
  if (columns == null)
  {
  columns = new HashSet();
- groupByIndexType.put(index.getClass().getCanonicalName(), 
columns);
+ groupByIndexType.put(index.indexTypeForGrouping(), columns);
  }
  
 -columns.add(ix.column_name);
 +columns.add(ix.column);
  }
  
  ListSecondaryIndexSearcher indexSearchers = new 
ArrayList(groupByIndexType.size());



[jira] [Commented] (CASSANDRA-7523) add date and time types

2014-08-07 Thread Joshua McKenzie (JIRA)

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

Joshua McKenzie commented on CASSANDRA-7523:


Thanks for the feedback [~thobbs] - wanted to confirm there wasn't anything 
major I'd overlooked when it came to adding new types into the system.

In the context of minimal impact addition to 2.0.X, I think keeping Time 
resolution at ms makes sense though I agree with the point about halving 
storage size on Date w/wider reach rather than using sql.Date.

That being said, while this ticket in its current incarnation is *relatively* 
simple it also lies at the bottom of the stack in the type system.  Given how 
late we are in the 2.0.X life cycle, the python driver modifications, and the 
pending high resolution type ticket my preference is to push this to 2.1+.  We 
can implement the Time type here as nanos since midnight since it only costs us 
an extra byte over usec and the extra parsing adds nominal complexity, and 
finally close CASSANDRA-7536 as duplicate.

I'd prefer not to add a ms resolution Time and clutter the type system with a 
high resolution type later or deal with the complexity of data conversion - 
better to get it right the first time.  Along with that, going w/2.1+ prevents 
duplicate work modifying multiple python drivers to support the new types.

 add date and time types
 ---

 Key: CASSANDRA-7523
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7523
 Project: Cassandra
  Issue Type: Bug
  Components: API
Reporter: Jonathan Ellis
Assignee: Joshua McKenzie
Priority: Minor
 Fix For: 2.0.10


 http://www.postgresql.org/docs/9.1/static/datatype-datetime.html
 (we already have timestamp; interval is out of scope for now, and see 
 CASSANDRA-6350 for discussion on timestamp-with-time-zone.  but date/time 
 should be pretty easy to add.)



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[2/5] git commit: Fix potential AssertionError with 2ndary indexes

2014-08-07 Thread slebresne
Fix potential AssertionError with 2ndary indexes

patch by slebresne; reviewed by beobal for CASSANDRA-6612


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

Branch: refs/heads/trunk
Commit: 3970c650d43f8b8bb9aa1c153055fd838a9b4bb6
Parents: 6e6a6c3
Author: Sylvain Lebresne sylv...@datastax.com
Authored: Thu Aug 7 18:09:57 2014 +0200
Committer: Sylvain Lebresne sylv...@datastax.com
Committed: Thu Aug 7 18:23:52 2014 +0200

--
 CHANGES.txt |  1 +
 .../db/index/AbstractSimplePerColumnSecondaryIndex.java |  6 ++
 .../org/apache/cassandra/db/index/SecondaryIndex.java   | 10 ++
 .../cassandra/db/index/SecondaryIndexManager.java   | 12 +---
 4 files changed, 22 insertions(+), 7 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/3970c650/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 915aeea..df40933 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.0.10
+ * Fix potential AssertionError with 2ndary indexes (CASSANDRA-6612)
  * Avoid logging CompactionInterrupted at ERROR (CASSANDRA-7694)
  * Minor leak in sstable2jon (CASSANDRA-7709)
  * Add cassandra.auto_bootstrap system property (CASSANDRA-7650)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/3970c650/src/java/org/apache/cassandra/db/index/AbstractSimplePerColumnSecondaryIndex.java
--
diff --git 
a/src/java/org/apache/cassandra/db/index/AbstractSimplePerColumnSecondaryIndex.java
 
b/src/java/org/apache/cassandra/db/index/AbstractSimplePerColumnSecondaryIndex.java
index 8b12575..87e87cb 100644
--- 
a/src/java/org/apache/cassandra/db/index/AbstractSimplePerColumnSecondaryIndex.java
+++ 
b/src/java/org/apache/cassandra/db/index/AbstractSimplePerColumnSecondaryIndex.java
@@ -55,6 +55,12 @@ public abstract class AbstractSimplePerColumnSecondaryIndex 
extends PerColumnSec
  
indexedCfMetadata);
 }
 
+@Override
+String indexTypeForGrouping()
+{
+return _internal_;
+}
+
 protected abstract ByteBuffer makeIndexColumnName(ByteBuffer rowKey, 
Column column);
 
 protected abstract ByteBuffer getIndexedValue(ByteBuffer rowKey, Column 
column);

http://git-wip-us.apache.org/repos/asf/cassandra/blob/3970c650/src/java/org/apache/cassandra/db/index/SecondaryIndex.java
--
diff --git a/src/java/org/apache/cassandra/db/index/SecondaryIndex.java 
b/src/java/org/apache/cassandra/db/index/SecondaryIndex.java
index fda28f0..64266c4 100644
--- a/src/java/org/apache/cassandra/db/index/SecondaryIndex.java
+++ b/src/java/org/apache/cassandra/db/index/SecondaryIndex.java
@@ -94,6 +94,16 @@ public abstract class SecondaryIndex
  */
 abstract public String getIndexName();
 
+/**
+ * All internal 2ndary indexes will return _internal_ for this. Custom
+ * 2ndary indexes will return their class name. This only matter for
+ * SecondaryIndexManager.groupByIndexType.
+ */
+String indexTypeForGrouping()
+{
+// Our internal indexes overwrite this
+return getClass().getCanonicalName();
+}
 
 /**
  * Return the unique name for this index and column

http://git-wip-us.apache.org/repos/asf/cassandra/blob/3970c650/src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java
--
diff --git a/src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java 
b/src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java
index 2c0d611..a15464a 100644
--- a/src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java
+++ b/src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java
@@ -198,17 +198,15 @@ public class SecondaryIndexManager
 if (clause == null || clause.isEmpty())
 return false;
 
-// It doesn't seem a clause can have multiple searchers, but since
-// getIndexSearchersForQuery returns a list ...
 ListSecondaryIndexSearcher searchers = 
getIndexSearchersForQuery(clause);
 if (searchers.isEmpty())
 return false;
 
 for (SecondaryIndexSearcher searcher : searchers)
-if (!searcher.isIndexing(clause))
-return false;
+if (searcher.isIndexing(clause))
+return true;
 
-return true;
+return false;
 }
 
 /**
@@ -515,12 +513,12 @@ public 

[3/3] git commit: Merge branch 'cassandra-2.1.0' into cassandra-2.1

2014-08-07 Thread slebresne
Merge branch 'cassandra-2.1.0' into cassandra-2.1


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

Branch: refs/heads/cassandra-2.1
Commit: 0c2bbefae3186f600cef49e1859c9e56751f3ab5
Parents: e682ffc d8eff03
Author: Sylvain Lebresne sylv...@datastax.com
Authored: Thu Aug 7 18:36:13 2014 +0200
Committer: Sylvain Lebresne sylv...@datastax.com
Committed: Thu Aug 7 18:36:13 2014 +0200

--
 CHANGES.txt   |  1 +
 .../db/index/AbstractSimplePerColumnSecondaryIndex.java   |  6 ++
 .../org/apache/cassandra/db/index/SecondaryIndex.java | 10 ++
 .../apache/cassandra/db/index/SecondaryIndexManager.java  |  4 ++--
 4 files changed, 19 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/0c2bbefa/CHANGES.txt
--

http://git-wip-us.apache.org/repos/asf/cassandra/blob/0c2bbefa/src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java
--



[4/5] git commit: Merge branch 'cassandra-2.1.0' into cassandra-2.1

2014-08-07 Thread slebresne
Merge branch 'cassandra-2.1.0' into cassandra-2.1


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

Branch: refs/heads/trunk
Commit: 0c2bbefae3186f600cef49e1859c9e56751f3ab5
Parents: e682ffc d8eff03
Author: Sylvain Lebresne sylv...@datastax.com
Authored: Thu Aug 7 18:36:13 2014 +0200
Committer: Sylvain Lebresne sylv...@datastax.com
Committed: Thu Aug 7 18:36:13 2014 +0200

--
 CHANGES.txt   |  1 +
 .../db/index/AbstractSimplePerColumnSecondaryIndex.java   |  6 ++
 .../org/apache/cassandra/db/index/SecondaryIndex.java | 10 ++
 .../apache/cassandra/db/index/SecondaryIndexManager.java  |  4 ++--
 4 files changed, 19 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/0c2bbefa/CHANGES.txt
--

http://git-wip-us.apache.org/repos/asf/cassandra/blob/0c2bbefa/src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java
--



[1/3] git commit: Fix potential AssertionError with 2ndary indexes

2014-08-07 Thread slebresne
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-2.1 e682ffc47 - 0c2bbefae


Fix potential AssertionError with 2ndary indexes

patch by slebresne; reviewed by beobal for CASSANDRA-6612


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

Branch: refs/heads/cassandra-2.1
Commit: 3970c650d43f8b8bb9aa1c153055fd838a9b4bb6
Parents: 6e6a6c3
Author: Sylvain Lebresne sylv...@datastax.com
Authored: Thu Aug 7 18:09:57 2014 +0200
Committer: Sylvain Lebresne sylv...@datastax.com
Committed: Thu Aug 7 18:23:52 2014 +0200

--
 CHANGES.txt |  1 +
 .../db/index/AbstractSimplePerColumnSecondaryIndex.java |  6 ++
 .../org/apache/cassandra/db/index/SecondaryIndex.java   | 10 ++
 .../cassandra/db/index/SecondaryIndexManager.java   | 12 +---
 4 files changed, 22 insertions(+), 7 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/3970c650/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 915aeea..df40933 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.0.10
+ * Fix potential AssertionError with 2ndary indexes (CASSANDRA-6612)
  * Avoid logging CompactionInterrupted at ERROR (CASSANDRA-7694)
  * Minor leak in sstable2jon (CASSANDRA-7709)
  * Add cassandra.auto_bootstrap system property (CASSANDRA-7650)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/3970c650/src/java/org/apache/cassandra/db/index/AbstractSimplePerColumnSecondaryIndex.java
--
diff --git 
a/src/java/org/apache/cassandra/db/index/AbstractSimplePerColumnSecondaryIndex.java
 
b/src/java/org/apache/cassandra/db/index/AbstractSimplePerColumnSecondaryIndex.java
index 8b12575..87e87cb 100644
--- 
a/src/java/org/apache/cassandra/db/index/AbstractSimplePerColumnSecondaryIndex.java
+++ 
b/src/java/org/apache/cassandra/db/index/AbstractSimplePerColumnSecondaryIndex.java
@@ -55,6 +55,12 @@ public abstract class AbstractSimplePerColumnSecondaryIndex 
extends PerColumnSec
  
indexedCfMetadata);
 }
 
+@Override
+String indexTypeForGrouping()
+{
+return _internal_;
+}
+
 protected abstract ByteBuffer makeIndexColumnName(ByteBuffer rowKey, 
Column column);
 
 protected abstract ByteBuffer getIndexedValue(ByteBuffer rowKey, Column 
column);

http://git-wip-us.apache.org/repos/asf/cassandra/blob/3970c650/src/java/org/apache/cassandra/db/index/SecondaryIndex.java
--
diff --git a/src/java/org/apache/cassandra/db/index/SecondaryIndex.java 
b/src/java/org/apache/cassandra/db/index/SecondaryIndex.java
index fda28f0..64266c4 100644
--- a/src/java/org/apache/cassandra/db/index/SecondaryIndex.java
+++ b/src/java/org/apache/cassandra/db/index/SecondaryIndex.java
@@ -94,6 +94,16 @@ public abstract class SecondaryIndex
  */
 abstract public String getIndexName();
 
+/**
+ * All internal 2ndary indexes will return _internal_ for this. Custom
+ * 2ndary indexes will return their class name. This only matter for
+ * SecondaryIndexManager.groupByIndexType.
+ */
+String indexTypeForGrouping()
+{
+// Our internal indexes overwrite this
+return getClass().getCanonicalName();
+}
 
 /**
  * Return the unique name for this index and column

http://git-wip-us.apache.org/repos/asf/cassandra/blob/3970c650/src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java
--
diff --git a/src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java 
b/src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java
index 2c0d611..a15464a 100644
--- a/src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java
+++ b/src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java
@@ -198,17 +198,15 @@ public class SecondaryIndexManager
 if (clause == null || clause.isEmpty())
 return false;
 
-// It doesn't seem a clause can have multiple searchers, but since
-// getIndexSearchersForQuery returns a list ...
 ListSecondaryIndexSearcher searchers = 
getIndexSearchersForQuery(clause);
 if (searchers.isEmpty())
 return false;
 
 for (SecondaryIndexSearcher searcher : searchers)
-if (!searcher.isIndexing(clause))
-return false;
+if (searcher.isIndexing(clause))
+return 

[jira] [Updated] (CASSANDRA-7570) CqlPagingRecordReader is broken

2014-08-07 Thread Alex Liu (JIRA)

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

Alex Liu updated CASSANDRA-7570:


Attachment: (was: 7570_2.0_branch.txt)

 CqlPagingRecordReader is broken
 ---

 Key: CASSANDRA-7570
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7570
 Project: Cassandra
  Issue Type: Bug
  Components: Hadoop
Reporter: Brandon Williams
Assignee: Alex Liu
 Fix For: 2.0.10, 2.1.1

 Attachments: 7570-2.0-branch.txt


 As mentioned on CASSANDRA-7059, it broke CPRR.  It's not quite as simple as 
 changing the greater than to a greater than equal, either, since that makes 
 the task run forever.



--
This message was sent by Atlassian JIRA
(v6.2#6252)


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

2014-08-07 Thread slebresne
Merge branch 'cassandra-2.1' into trunk


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

Branch: refs/heads/trunk
Commit: d1e41c01eeebe9c8cf034e42d41e94dcc2265d49
Parents: 56141ae 0c2bbef
Author: Sylvain Lebresne sylv...@datastax.com
Authored: Thu Aug 7 18:36:33 2014 +0200
Committer: Sylvain Lebresne sylv...@datastax.com
Committed: Thu Aug 7 18:36:33 2014 +0200

--
 CHANGES.txt   |  1 +
 .../db/index/AbstractSimplePerColumnSecondaryIndex.java   |  6 ++
 .../org/apache/cassandra/db/index/SecondaryIndex.java | 10 ++
 .../apache/cassandra/db/index/SecondaryIndexManager.java  |  4 ++--
 4 files changed, 19 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/d1e41c01/CHANGES.txt
--

http://git-wip-us.apache.org/repos/asf/cassandra/blob/d1e41c01/src/java/org/apache/cassandra/db/index/SecondaryIndex.java
--



[1/5] git commit: merge

2014-08-07 Thread slebresne
Repository: cassandra
Updated Branches:
  refs/heads/trunk 56141aee8 - d1e41c01e


merge


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

Branch: refs/heads/trunk
Commit: e682ffc4700ddd57a1a961c8d7fbbb3a87d89ff9
Parents: 24d8571 ddda541
Author: Jonathan Ellis jbel...@apache.org
Authored: Thu Aug 7 09:27:14 2014 -0500
Committer: Jonathan Ellis jbel...@apache.org
Committed: Thu Aug 7 09:27:14 2014 -0500

--

--




[3/5] git commit: Merge branch 'cassandra-2.0' into cassandra-2.1.0

2014-08-07 Thread slebresne
Merge branch 'cassandra-2.0' into cassandra-2.1.0

Conflicts:
CHANGES.txt

src/java/org/apache/cassandra/db/index/AbstractSimplePerColumnSecondaryIndex.java
src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java


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

Branch: refs/heads/trunk
Commit: d8eff03df0bbfa9066855bc49e18d76f609508a0
Parents: 33de6dc 3970c65
Author: Sylvain Lebresne sylv...@datastax.com
Authored: Thu Aug 7 18:32:36 2014 +0200
Committer: Sylvain Lebresne sylv...@datastax.com
Committed: Thu Aug 7 18:32:36 2014 +0200

--
 CHANGES.txt   |  1 +
 .../db/index/AbstractSimplePerColumnSecondaryIndex.java   |  6 ++
 .../org/apache/cassandra/db/index/SecondaryIndex.java | 10 ++
 .../apache/cassandra/db/index/SecondaryIndexManager.java  |  4 ++--
 4 files changed, 19 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/d8eff03d/CHANGES.txt
--
diff --cc CHANGES.txt
index dfeca21,df40933..26b39e0
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,9 -1,5 +1,10 @@@
 -2.0.10
 +2.1.0-final
 + * cqlsh DESC CLUSTER fails retrieving ring information (CASSANDRA-7687)
 + * Fix binding null values inside UDT (CASSANDRA-7685)
 + * Fix UDT field selection with empty fields (CASSANDRA-7670)
 + * Bogus deserialization of static cells from sstable (CASSANDRA-7684)
 +Merged from 2.0:
+  * Fix potential AssertionError with 2ndary indexes (CASSANDRA-6612)
   * Avoid logging CompactionInterrupted at ERROR (CASSANDRA-7694)
   * Minor leak in sstable2jon (CASSANDRA-7709)
   * Add cassandra.auto_bootstrap system property (CASSANDRA-7650)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/d8eff03d/src/java/org/apache/cassandra/db/index/AbstractSimplePerColumnSecondaryIndex.java
--
diff --cc 
src/java/org/apache/cassandra/db/index/AbstractSimplePerColumnSecondaryIndex.java
index a2011b6,87e87cb..d8c03fb
--- 
a/src/java/org/apache/cassandra/db/index/AbstractSimplePerColumnSecondaryIndex.java
+++ 
b/src/java/org/apache/cassandra/db/index/AbstractSimplePerColumnSecondaryIndex.java
@@@ -60,20 -55,15 +60,26 @@@ public abstract class AbstractSimplePer
   
indexedCfMetadata);
  }
  
 +protected AbstractType? getIndexKeyComparator()
 +{
 +return columnDef.type;
 +}
 +
 +@Override
 +public DecoratedKey getIndexKeyFor(ByteBuffer value)
 +{
 +return new BufferDecoratedKey(new LocalToken(getIndexKeyComparator(), 
value), value);
 +}
 +
+ @Override
+ String indexTypeForGrouping()
+ {
+ return _internal_;
+ }
+ 
 -protected abstract ByteBuffer makeIndexColumnName(ByteBuffer rowKey, 
Column column);
 +protected abstract CellName makeIndexColumnName(ByteBuffer rowKey, Cell 
cell);
  
 -protected abstract ByteBuffer getIndexedValue(ByteBuffer rowKey, Column 
column);
 +protected abstract ByteBuffer getIndexedValue(ByteBuffer rowKey, Cell 
cell);
  
  protected abstract AbstractType getExpressionComparator();
  

http://git-wip-us.apache.org/repos/asf/cassandra/blob/d8eff03d/src/java/org/apache/cassandra/db/index/SecondaryIndex.java
--

http://git-wip-us.apache.org/repos/asf/cassandra/blob/d8eff03d/src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java
--
diff --cc src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java
index edb9126,a15464a..339af8f
--- a/src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java
+++ b/src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java
@@@ -547,10 -518,10 +547,10 @@@ public class SecondaryIndexManage
  if (columns == null)
  {
  columns = new HashSet();
- groupByIndexType.put(index.getClass().getCanonicalName(), 
columns);
+ groupByIndexType.put(index.indexTypeForGrouping(), columns);
  }
  
 -columns.add(ix.column_name);
 +columns.add(ix.column);
  }
  
  ListSecondaryIndexSearcher indexSearchers = new 
ArrayList(groupByIndexType.size());



[5/6] git commit: Merge branch 'cassandra-2.0' into cassandra-2.1

2014-08-07 Thread brandonwilliams
Merge branch 'cassandra-2.0' into cassandra-2.1


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

Branch: refs/heads/cassandra-2.1
Commit: 319eeabb4c69dff22df9280a78e49e526a540d39
Parents: 0c2bbef 6fdcd3b
Author: Brandon Williams brandonwilli...@apache.org
Authored: Thu Aug 7 11:56:57 2014 -0500
Committer: Brandon Williams brandonwilli...@apache.org
Committed: Thu Aug 7 11:56:57 2014 -0500

--
 .../cassandra/pig/CqlTableDataTypeTest.java | 39 ++---
 .../org/apache/cassandra/pig/CqlTableTest.java  | 61 
 .../cassandra/pig/ThriftColumnFamilyTest.java   | 14 -
 3 files changed, 28 insertions(+), 86 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/319eeabb/test/pig/org/apache/cassandra/pig/ThriftColumnFamilyTest.java
--



[3/6] git commit: Fix pig tests.

2014-08-07 Thread brandonwilliams
Fix pig tests.

Patch by Alex Liu, reviewed by brandonwilliams for CASSANDRA-7570


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

Branch: refs/heads/trunk
Commit: 6fdcd3b616b262c0a5c266e765046a57602be1b8
Parents: 3970c65
Author: Brandon Williams brandonwilli...@apache.org
Authored: Thu Aug 7 11:54:34 2014 -0500
Committer: Brandon Williams brandonwilli...@apache.org
Committed: Thu Aug 7 11:54:34 2014 -0500

--
 .../cassandra/pig/CqlTableDataTypeTest.java | 39 ++---
 .../org/apache/cassandra/pig/CqlTableTest.java  | 61 
 .../cassandra/pig/ThriftColumnFamilyTest.java   | 14 -
 3 files changed, 28 insertions(+), 86 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/6fdcd3b6/test/pig/org/apache/cassandra/pig/CqlTableDataTypeTest.java
--
diff --git a/test/pig/org/apache/cassandra/pig/CqlTableDataTypeTest.java 
b/test/pig/org/apache/cassandra/pig/CqlTableDataTypeTest.java
index 1819c61..bbd5a87 100644
--- a/test/pig/org/apache/cassandra/pig/CqlTableDataTypeTest.java
+++ b/test/pig/org/apache/cassandra/pig/CqlTableDataTypeTest.java
@@ -217,22 +217,14 @@ public class CqlTableDataTypeTest extends PigTestBase
 }
 
 @Test
-public void testCqlStorageRegularType()
-throws AuthenticationException, AuthorizationException, 
InvalidRequestException, UnavailableException, TimedOutException, TException, 
NotFoundException, SchemaDisagreementException, IOException
-{
-cqlTableTest(rows = LOAD 'cql://cql3ks/cqltable? + defaultParameters 
+ ' USING CqlStorage(););
-counterTableTest(cc_rows = LOAD 'cql://cql3ks/countertable? + 
defaultParameters + ' USING CqlStorage(););
-}
-
-@Test
 public void testCqlNativeStorageRegularType()
 throws AuthenticationException, AuthorizationException, 
InvalidRequestException, UnavailableException, TimedOutException, TException, 
NotFoundException, SchemaDisagreementException, IOException
 {
 //input_cql=select * from cqltable where token(key)  ? and token(key) 
= ?
-cqlTableTest(rows = LOAD 'cql://cql3ks/cqltable? + defaultParameters 
+ nativeParameters + 
input_cql=select%20*%20from%20cqltable%20where%20token(key)%20%3E%20%3F%20and%20token(key)%20%3C%3D%20%3F'
 USING CqlStorage(););
+cqlTableTest(rows = LOAD 'cql://cql3ks/cqltable? + defaultParameters 
+ nativeParameters + 
input_cql=select%20*%20from%20cqltable%20where%20token(key)%20%3E%20%3F%20and%20token(key)%20%3C%3D%20%3F'
 USING CqlNativeStorage(););
 
 //input_cql=select * from countertable where token(key)  ? and 
token(key) = ?
-counterTableTest(cc_rows = LOAD 'cql://cql3ks/countertable? + 
defaultParameters + nativeParameters + 
input_cql=select%20*%20from%20countertable%20where%20token(key)%20%3E%20%3F%20and%20token(key)%20%3C%3D%20%3F'
 USING CqlStorage(););
+counterTableTest(cc_rows = LOAD 'cql://cql3ks/countertable? + 
defaultParameters + nativeParameters + 
input_cql=select%20*%20from%20countertable%20where%20token(key)%20%3E%20%3F%20and%20token(key)%20%3C%3D%20%3F'
 USING CqlNativeStorage(););
 }
 
 private void cqlTableTest(String initialQuery) throws IOException
@@ -296,18 +288,11 @@ public class CqlTableDataTypeTest extends PigTestBase
 }
 
 @Test
-public void testCqlStorageSetType()
-throws AuthenticationException, AuthorizationException, 
InvalidRequestException, UnavailableException, TimedOutException, TException, 
NotFoundException, SchemaDisagreementException, IOException
-{
-settableTest(set_rows = LOAD 'cql://cql3ks/settable? + 
defaultParameters + ' USING CqlStorage(););
-}
-
-@Test
 public void testCqlNativeStorageSetType()
 throws AuthenticationException, AuthorizationException, 
InvalidRequestException, UnavailableException, TimedOutException, TException, 
NotFoundException, SchemaDisagreementException, IOException
 {
 //input_cql=select * from settable where token(key)  ? and token(key) 
= ?
-settableTest(set_rows = LOAD 'cql://cql3ks/settable? + 
defaultParameters + nativeParameters + 
input_cql=select%20*%20from%20settable%20where%20token(key)%20%3E%20%3F%20and%20token(key)%20%3C%3D%20%3F'
 USING CqlStorage(););
+settableTest(set_rows = LOAD 'cql://cql3ks/settable? + 
defaultParameters + nativeParameters + 
input_cql=select%20*%20from%20settable%20where%20token(key)%20%3E%20%3F%20and%20token(key)%20%3C%3D%20%3F'
 USING CqlNativeStorage(););
 }
 
 private void settableTest(String initialQuery) throws IOException
@@ -370,18 +355,11 @@ public 

[6/6] git commit: Merge branch 'cassandra-2.1' into trunk

2014-08-07 Thread brandonwilliams
Merge branch 'cassandra-2.1' into trunk


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

Branch: refs/heads/trunk
Commit: f92ae20a84cc22d303234a9c8847ba1e8fa0b6d7
Parents: d1e41c0 319eeab
Author: Brandon Williams brandonwilli...@apache.org
Authored: Thu Aug 7 11:57:22 2014 -0500
Committer: Brandon Williams brandonwilli...@apache.org
Committed: Thu Aug 7 11:57:22 2014 -0500

--
 .../cassandra/pig/CqlTableDataTypeTest.java | 39 ++---
 .../org/apache/cassandra/pig/CqlTableTest.java  | 61 
 .../cassandra/pig/ThriftColumnFamilyTest.java   | 14 -
 3 files changed, 28 insertions(+), 86 deletions(-)
--




[1/6] git commit: Fix pig tests.

2014-08-07 Thread brandonwilliams
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-2.0 3970c650d - 6fdcd3b61
  refs/heads/cassandra-2.1 0c2bbefae - 319eeabb4
  refs/heads/trunk d1e41c01e - f92ae20a8


Fix pig tests.

Patch by Alex Liu, reviewed by brandonwilliams for CASSANDRA-7570


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

Branch: refs/heads/cassandra-2.0
Commit: 6fdcd3b616b262c0a5c266e765046a57602be1b8
Parents: 3970c65
Author: Brandon Williams brandonwilli...@apache.org
Authored: Thu Aug 7 11:54:34 2014 -0500
Committer: Brandon Williams brandonwilli...@apache.org
Committed: Thu Aug 7 11:54:34 2014 -0500

--
 .../cassandra/pig/CqlTableDataTypeTest.java | 39 ++---
 .../org/apache/cassandra/pig/CqlTableTest.java  | 61 
 .../cassandra/pig/ThriftColumnFamilyTest.java   | 14 -
 3 files changed, 28 insertions(+), 86 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/6fdcd3b6/test/pig/org/apache/cassandra/pig/CqlTableDataTypeTest.java
--
diff --git a/test/pig/org/apache/cassandra/pig/CqlTableDataTypeTest.java 
b/test/pig/org/apache/cassandra/pig/CqlTableDataTypeTest.java
index 1819c61..bbd5a87 100644
--- a/test/pig/org/apache/cassandra/pig/CqlTableDataTypeTest.java
+++ b/test/pig/org/apache/cassandra/pig/CqlTableDataTypeTest.java
@@ -217,22 +217,14 @@ public class CqlTableDataTypeTest extends PigTestBase
 }
 
 @Test
-public void testCqlStorageRegularType()
-throws AuthenticationException, AuthorizationException, 
InvalidRequestException, UnavailableException, TimedOutException, TException, 
NotFoundException, SchemaDisagreementException, IOException
-{
-cqlTableTest(rows = LOAD 'cql://cql3ks/cqltable? + defaultParameters 
+ ' USING CqlStorage(););
-counterTableTest(cc_rows = LOAD 'cql://cql3ks/countertable? + 
defaultParameters + ' USING CqlStorage(););
-}
-
-@Test
 public void testCqlNativeStorageRegularType()
 throws AuthenticationException, AuthorizationException, 
InvalidRequestException, UnavailableException, TimedOutException, TException, 
NotFoundException, SchemaDisagreementException, IOException
 {
 //input_cql=select * from cqltable where token(key)  ? and token(key) 
= ?
-cqlTableTest(rows = LOAD 'cql://cql3ks/cqltable? + defaultParameters 
+ nativeParameters + 
input_cql=select%20*%20from%20cqltable%20where%20token(key)%20%3E%20%3F%20and%20token(key)%20%3C%3D%20%3F'
 USING CqlStorage(););
+cqlTableTest(rows = LOAD 'cql://cql3ks/cqltable? + defaultParameters 
+ nativeParameters + 
input_cql=select%20*%20from%20cqltable%20where%20token(key)%20%3E%20%3F%20and%20token(key)%20%3C%3D%20%3F'
 USING CqlNativeStorage(););
 
 //input_cql=select * from countertable where token(key)  ? and 
token(key) = ?
-counterTableTest(cc_rows = LOAD 'cql://cql3ks/countertable? + 
defaultParameters + nativeParameters + 
input_cql=select%20*%20from%20countertable%20where%20token(key)%20%3E%20%3F%20and%20token(key)%20%3C%3D%20%3F'
 USING CqlStorage(););
+counterTableTest(cc_rows = LOAD 'cql://cql3ks/countertable? + 
defaultParameters + nativeParameters + 
input_cql=select%20*%20from%20countertable%20where%20token(key)%20%3E%20%3F%20and%20token(key)%20%3C%3D%20%3F'
 USING CqlNativeStorage(););
 }
 
 private void cqlTableTest(String initialQuery) throws IOException
@@ -296,18 +288,11 @@ public class CqlTableDataTypeTest extends PigTestBase
 }
 
 @Test
-public void testCqlStorageSetType()
-throws AuthenticationException, AuthorizationException, 
InvalidRequestException, UnavailableException, TimedOutException, TException, 
NotFoundException, SchemaDisagreementException, IOException
-{
-settableTest(set_rows = LOAD 'cql://cql3ks/settable? + 
defaultParameters + ' USING CqlStorage(););
-}
-
-@Test
 public void testCqlNativeStorageSetType()
 throws AuthenticationException, AuthorizationException, 
InvalidRequestException, UnavailableException, TimedOutException, TException, 
NotFoundException, SchemaDisagreementException, IOException
 {
 //input_cql=select * from settable where token(key)  ? and token(key) 
= ?
-settableTest(set_rows = LOAD 'cql://cql3ks/settable? + 
defaultParameters + nativeParameters + 
input_cql=select%20*%20from%20settable%20where%20token(key)%20%3E%20%3F%20and%20token(key)%20%3C%3D%20%3F'
 USING CqlStorage(););
+settableTest(set_rows = LOAD 'cql://cql3ks/settable? + 
defaultParameters + nativeParameters + 

[4/6] git commit: Merge branch 'cassandra-2.0' into cassandra-2.1

2014-08-07 Thread brandonwilliams
Merge branch 'cassandra-2.0' into cassandra-2.1


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

Branch: refs/heads/trunk
Commit: 319eeabb4c69dff22df9280a78e49e526a540d39
Parents: 0c2bbef 6fdcd3b
Author: Brandon Williams brandonwilli...@apache.org
Authored: Thu Aug 7 11:56:57 2014 -0500
Committer: Brandon Williams brandonwilli...@apache.org
Committed: Thu Aug 7 11:56:57 2014 -0500

--
 .../cassandra/pig/CqlTableDataTypeTest.java | 39 ++---
 .../org/apache/cassandra/pig/CqlTableTest.java  | 61 
 .../cassandra/pig/ThriftColumnFamilyTest.java   | 14 -
 3 files changed, 28 insertions(+), 86 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/319eeabb/test/pig/org/apache/cassandra/pig/ThriftColumnFamilyTest.java
--



[2/6] git commit: Fix pig tests.

2014-08-07 Thread brandonwilliams
Fix pig tests.

Patch by Alex Liu, reviewed by brandonwilliams for CASSANDRA-7570


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

Branch: refs/heads/cassandra-2.1
Commit: 6fdcd3b616b262c0a5c266e765046a57602be1b8
Parents: 3970c65
Author: Brandon Williams brandonwilli...@apache.org
Authored: Thu Aug 7 11:54:34 2014 -0500
Committer: Brandon Williams brandonwilli...@apache.org
Committed: Thu Aug 7 11:54:34 2014 -0500

--
 .../cassandra/pig/CqlTableDataTypeTest.java | 39 ++---
 .../org/apache/cassandra/pig/CqlTableTest.java  | 61 
 .../cassandra/pig/ThriftColumnFamilyTest.java   | 14 -
 3 files changed, 28 insertions(+), 86 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/6fdcd3b6/test/pig/org/apache/cassandra/pig/CqlTableDataTypeTest.java
--
diff --git a/test/pig/org/apache/cassandra/pig/CqlTableDataTypeTest.java 
b/test/pig/org/apache/cassandra/pig/CqlTableDataTypeTest.java
index 1819c61..bbd5a87 100644
--- a/test/pig/org/apache/cassandra/pig/CqlTableDataTypeTest.java
+++ b/test/pig/org/apache/cassandra/pig/CqlTableDataTypeTest.java
@@ -217,22 +217,14 @@ public class CqlTableDataTypeTest extends PigTestBase
 }
 
 @Test
-public void testCqlStorageRegularType()
-throws AuthenticationException, AuthorizationException, 
InvalidRequestException, UnavailableException, TimedOutException, TException, 
NotFoundException, SchemaDisagreementException, IOException
-{
-cqlTableTest(rows = LOAD 'cql://cql3ks/cqltable? + defaultParameters 
+ ' USING CqlStorage(););
-counterTableTest(cc_rows = LOAD 'cql://cql3ks/countertable? + 
defaultParameters + ' USING CqlStorage(););
-}
-
-@Test
 public void testCqlNativeStorageRegularType()
 throws AuthenticationException, AuthorizationException, 
InvalidRequestException, UnavailableException, TimedOutException, TException, 
NotFoundException, SchemaDisagreementException, IOException
 {
 //input_cql=select * from cqltable where token(key)  ? and token(key) 
= ?
-cqlTableTest(rows = LOAD 'cql://cql3ks/cqltable? + defaultParameters 
+ nativeParameters + 
input_cql=select%20*%20from%20cqltable%20where%20token(key)%20%3E%20%3F%20and%20token(key)%20%3C%3D%20%3F'
 USING CqlStorage(););
+cqlTableTest(rows = LOAD 'cql://cql3ks/cqltable? + defaultParameters 
+ nativeParameters + 
input_cql=select%20*%20from%20cqltable%20where%20token(key)%20%3E%20%3F%20and%20token(key)%20%3C%3D%20%3F'
 USING CqlNativeStorage(););
 
 //input_cql=select * from countertable where token(key)  ? and 
token(key) = ?
-counterTableTest(cc_rows = LOAD 'cql://cql3ks/countertable? + 
defaultParameters + nativeParameters + 
input_cql=select%20*%20from%20countertable%20where%20token(key)%20%3E%20%3F%20and%20token(key)%20%3C%3D%20%3F'
 USING CqlStorage(););
+counterTableTest(cc_rows = LOAD 'cql://cql3ks/countertable? + 
defaultParameters + nativeParameters + 
input_cql=select%20*%20from%20countertable%20where%20token(key)%20%3E%20%3F%20and%20token(key)%20%3C%3D%20%3F'
 USING CqlNativeStorage(););
 }
 
 private void cqlTableTest(String initialQuery) throws IOException
@@ -296,18 +288,11 @@ public class CqlTableDataTypeTest extends PigTestBase
 }
 
 @Test
-public void testCqlStorageSetType()
-throws AuthenticationException, AuthorizationException, 
InvalidRequestException, UnavailableException, TimedOutException, TException, 
NotFoundException, SchemaDisagreementException, IOException
-{
-settableTest(set_rows = LOAD 'cql://cql3ks/settable? + 
defaultParameters + ' USING CqlStorage(););
-}
-
-@Test
 public void testCqlNativeStorageSetType()
 throws AuthenticationException, AuthorizationException, 
InvalidRequestException, UnavailableException, TimedOutException, TException, 
NotFoundException, SchemaDisagreementException, IOException
 {
 //input_cql=select * from settable where token(key)  ? and token(key) 
= ?
-settableTest(set_rows = LOAD 'cql://cql3ks/settable? + 
defaultParameters + nativeParameters + 
input_cql=select%20*%20from%20settable%20where%20token(key)%20%3E%20%3F%20and%20token(key)%20%3C%3D%20%3F'
 USING CqlStorage(););
+settableTest(set_rows = LOAD 'cql://cql3ks/settable? + 
defaultParameters + nativeParameters + 
input_cql=select%20*%20from%20settable%20where%20token(key)%20%3E%20%3F%20and%20token(key)%20%3C%3D%20%3F'
 USING CqlNativeStorage(););
 }
 
 private void settableTest(String initialQuery) throws IOException
@@ -370,18 +355,11 @@ 

[jira] [Resolved] (CASSANDRA-7570) CqlPagingRecordReader is broken

2014-08-07 Thread Brandon Williams (JIRA)

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

Brandon Williams resolved CASSANDRA-7570.
-

Resolution: Fixed

Committed.

 CqlPagingRecordReader is broken
 ---

 Key: CASSANDRA-7570
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7570
 Project: Cassandra
  Issue Type: Bug
  Components: Hadoop
Reporter: Brandon Williams
Assignee: Alex Liu
 Fix For: 2.0.10, 2.1.1

 Attachments: 7570-2.0-branch.txt


 As mentioned on CASSANDRA-7059, it broke CPRR.  It's not quite as simple as 
 changing the greater than to a greater than equal, either, since that makes 
 the task run forever.



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[1/2] git commit: Better messaging on URI failure on cassandra.config Patch by Josh McKenzie; review by Lyuben Todorov for CASSANDRA-7398

2014-08-07 Thread jmckenzie
Repository: cassandra
Updated Branches:
  refs/heads/trunk f92ae20a8 - 32358d646


Better messaging on URI failure on cassandra.config
Patch by Josh McKenzie; review by Lyuben Todorov for CASSANDRA-7398


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

Branch: refs/heads/trunk
Commit: 756c85e86fc9e2de492c23c3e6c10e4b4511293a
Parents: 319eeab
Author: Joshua McKenzie josh.mcken...@datastax.com
Authored: Thu Aug 7 12:05:40 2014 -0500
Committer: Joshua McKenzie josh.mcken...@datastax.com
Committed: Thu Aug 7 12:05:40 2014 -0500

--
 .../apache/cassandra/config/YamlConfigurationLoader.java| 9 -
 1 file changed, 8 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/756c85e8/src/java/org/apache/cassandra/config/YamlConfigurationLoader.java
--
diff --git a/src/java/org/apache/cassandra/config/YamlConfigurationLoader.java 
b/src/java/org/apache/cassandra/config/YamlConfigurationLoader.java
index 4a1280c..78621f2 100644
--- a/src/java/org/apache/cassandra/config/YamlConfigurationLoader.java
+++ b/src/java/org/apache/cassandra/config/YamlConfigurationLoader.java
@@ -19,6 +19,7 @@ package org.apache.cassandra.config;
 
 import java.beans.IntrospectionException;
 import java.io.ByteArrayInputStream;
+import java.io.File;
 import java.io.InputStream;
 import java.io.IOException;
 import java.net.URL;
@@ -66,7 +67,13 @@ public class YamlConfigurationLoader implements 
ConfigurationLoader
 ClassLoader loader = DatabaseDescriptor.class.getClassLoader();
 url = loader.getResource(configUrl);
 if (url == null)
-throw new ConfigurationException(Cannot locate  + configUrl);
+{
+String required = file: + File.separator + File.separator;
+if (!configUrl.startsWith(required))
+throw new ConfigurationException(Expecting URI in 
variable: [cassandra.config].  Please prefix the file with  + required + 
File.separator +
+ for local files or  + required + server + 
File.separator +  for remote files.  Aborting.);
+throw new ConfigurationException(Cannot locate  + configUrl 
+ .  If this is a local file, please confirm you've provided  + required + 
File.separator +  as a URI prefix.);
+}
 }
 
 return url;



[2/2] git commit: Merge branch 'cassandra-2.1' into trunk

2014-08-07 Thread jmckenzie
Merge branch 'cassandra-2.1' into trunk


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

Branch: refs/heads/trunk
Commit: 32358d646d7fc214a1bc16d58ca5e5d5b025bda6
Parents: f92ae20 756c85e
Author: Joshua McKenzie josh.mcken...@datastax.com
Authored: Thu Aug 7 12:06:52 2014 -0500
Committer: Joshua McKenzie josh.mcken...@datastax.com
Committed: Thu Aug 7 12:06:52 2014 -0500

--
 .../apache/cassandra/config/YamlConfigurationLoader.java| 9 -
 1 file changed, 8 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/32358d64/src/java/org/apache/cassandra/config/YamlConfigurationLoader.java
--



git commit: Better messaging on URI failure on cassandra.config Patch by Josh McKenzie; review by Lyuben Todorov for CASSANDRA-7398

2014-08-07 Thread jmckenzie
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-2.1 319eeabb4 - 756c85e86


Better messaging on URI failure on cassandra.config
Patch by Josh McKenzie; review by Lyuben Todorov for CASSANDRA-7398


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

Branch: refs/heads/cassandra-2.1
Commit: 756c85e86fc9e2de492c23c3e6c10e4b4511293a
Parents: 319eeab
Author: Joshua McKenzie josh.mcken...@datastax.com
Authored: Thu Aug 7 12:05:40 2014 -0500
Committer: Joshua McKenzie josh.mcken...@datastax.com
Committed: Thu Aug 7 12:05:40 2014 -0500

--
 .../apache/cassandra/config/YamlConfigurationLoader.java| 9 -
 1 file changed, 8 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/756c85e8/src/java/org/apache/cassandra/config/YamlConfigurationLoader.java
--
diff --git a/src/java/org/apache/cassandra/config/YamlConfigurationLoader.java 
b/src/java/org/apache/cassandra/config/YamlConfigurationLoader.java
index 4a1280c..78621f2 100644
--- a/src/java/org/apache/cassandra/config/YamlConfigurationLoader.java
+++ b/src/java/org/apache/cassandra/config/YamlConfigurationLoader.java
@@ -19,6 +19,7 @@ package org.apache.cassandra.config;
 
 import java.beans.IntrospectionException;
 import java.io.ByteArrayInputStream;
+import java.io.File;
 import java.io.InputStream;
 import java.io.IOException;
 import java.net.URL;
@@ -66,7 +67,13 @@ public class YamlConfigurationLoader implements 
ConfigurationLoader
 ClassLoader loader = DatabaseDescriptor.class.getClassLoader();
 url = loader.getResource(configUrl);
 if (url == null)
-throw new ConfigurationException(Cannot locate  + configUrl);
+{
+String required = file: + File.separator + File.separator;
+if (!configUrl.startsWith(required))
+throw new ConfigurationException(Expecting URI in 
variable: [cassandra.config].  Please prefix the file with  + required + 
File.separator +
+ for local files or  + required + server + 
File.separator +  for remote files.  Aborting.);
+throw new ConfigurationException(Cannot locate  + configUrl 
+ .  If this is a local file, please confirm you've provided  + required + 
File.separator +  as a URI prefix.);
+}
 }
 
 return url;



[jira] [Updated] (CASSANDRA-7707) blobAs() function results not validated

2014-08-07 Thread Sylvain Lebresne (JIRA)

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

Sylvain Lebresne updated CASSANDRA-7707:


Attachment: 7707.txt

 blobAs() function results not validated
 ---

 Key: CASSANDRA-7707
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7707
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Reporter: Tyler Hobbs
Assignee: Tyler Hobbs
Priority: Critical
 Fix For: 2.0.10, 2.1.1

 Attachments: 7707.txt


 The results of the {{blobAs*()}} functions are not validated.
 Here are some examples:
 Non-type1 UUID inserted into timeuuid column:
 {noformat}
 create table foo (k int primary key, v timeuuid);
 insert into foo (0, blobAsTimeuuid(0x));
 {noformat}
 Blob with length  4 inserted into an int column:
 {noformat}
 create table bar (k int primary key, v int);
 insert into bar (k, v) VALUES (0, blobAsInt(0x00));
 {noformat}
 Non-ascii characters inserted into an ascii column:
 {noformat}
 create table baz (k int primary key, v ascii);
 insert into baz (k, v) VALUES (0, blobAsAscii(0x));
 {noformat}
 Some of these (like the int column) could cause issues that look like 
 corruption.



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Commented] (CASSANDRA-7398) Missing flexibility to have file://server/etc vs. file:/// when loading config file cassandra.yaml

2014-08-07 Thread Joshua McKenzie (JIRA)

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

Joshua McKenzie commented on CASSANDRA-7398:


committed v9.

 Missing flexibility to have file://server/etc vs. file:/// when loading 
 config file cassandra.yaml
 --

 Key: CASSANDRA-7398
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7398
 Project: Cassandra
  Issue Type: Bug
  Components: Core
 Environment:  Cassandra 2.1.0-rc1-SNAPSHOT, Win 7
Reporter: Marco Tulio Avila Cerón
Assignee: Marco Tulio Avila Cerón
Priority: Minor
  Labels: lhf, patch
 Fix For: 2.1.1

 Attachments: 7398_v9.txt, CASSANDRA-7398_prefix_v2.patch, 
 CASSANDRA-7398_prefix_v3.patch, CASSANDRA-7398_prefix_v4.patch, 
 trunk-7398_v5.txt, trunk-7398_v6.txt, trunk-7398_v7.txt, trunk-7398_v8.txt, 
 trunk-7398_v8_impl.txt, trunk-7398_v8_test.txt

   Original Estimate: 2h
  Remaining Estimate: 2h

 The parameter in the VM options -Dcassandra.config= needs file:///
 Allow the user to have optional file:/// when loading the config file from 
 the filesystem



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Created] (CASSANDRA-7715) Add a credentials cache to the PasswordAuthenticator

2014-08-07 Thread Mike Adamson (JIRA)
Mike Adamson created CASSANDRA-7715:
---

 Summary: Add a credentials cache to the PasswordAuthenticator
 Key: CASSANDRA-7715
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7715
 Project: Cassandra
  Issue Type: New Feature
  Components: Core
Reporter: Mike Adamson
Priority: Minor
 Fix For: 3.0


If the PasswordAuthenticator cached credentials for a short it would reduce the 
overhead of user journeys when they need to do multiple authentications in 
quick succession.

This cache should work in the same way as the cache in CassandraAuthorizer in 
that if it's TTL is set to 0 the cache will be disabled.



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Created] (CASSANDRA-7716) cassandra-stress: provide better error messages

2014-08-07 Thread Robert Stupp (JIRA)
Robert Stupp created CASSANDRA-7716:
---

 Summary: cassandra-stress: provide better error messages
 Key: CASSANDRA-7716
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7716
 Project: Cassandra
  Issue Type: Improvement
Reporter: Robert Stupp
Assignee: T Jake Luciani


Just tried new stress tool.

It would be great if the stress tool gives better error messages by telling the 
user what option or config parameter/value caused an error.

YAML parse errors are meaningful (gives code snippets etc).

Examples are:

{noformat}
WARN  16:59:39 Setting caching options with deprecated syntax.
Exception in thread main java.lang.NullPointerException
at java.util.regex.Matcher.getTextLength(Matcher.java:1234)
at java.util.regex.Matcher.reset(Matcher.java:308)
at java.util.regex.Matcher.init(Matcher.java:228)
at java.util.regex.Pattern.matcher(Pattern.java:1088)
at 
org.apache.cassandra.stress.settings.OptionDistribution.get(OptionDistribution.java:67)
at 
org.apache.cassandra.stress.StressProfile.init(StressProfile.java:151)
at 
org.apache.cassandra.stress.StressProfile.load(StressProfile.java:482)
at 
org.apache.cassandra.stress.settings.SettingsCommandUser.init(SettingsCommandUser.java:53)
at 
org.apache.cassandra.stress.settings.SettingsCommandUser.build(SettingsCommandUser.java:114)
at 
org.apache.cassandra.stress.settings.SettingsCommand.get(SettingsCommand.java:134)
at 
org.apache.cassandra.stress.settings.StressSettings.get(StressSettings.java:218)
at 
org.apache.cassandra.stress.settings.StressSettings.parse(StressSettings.java:206)
at org.apache.cassandra.stress.Stress.main(Stress.java:58)
{noformat}

When table-definition is wrong:
{noformat}
Exception in thread main java.lang.RuntimeException: 
org.apache.cassandra.exceptions.SyntaxException: line 6:14 mismatched input '(' 
expecting ')'
at org.apache.cassandra.config.CFMetaData.compile(CFMetaData.java:550)
at 
org.apache.cassandra.stress.StressProfile.init(StressProfile.java:134)
at 
org.apache.cassandra.stress.StressProfile.load(StressProfile.java:482)
at 
org.apache.cassandra.stress.settings.SettingsCommandUser.init(SettingsCommandUser.java:53)
at 
org.apache.cassandra.stress.settings.SettingsCommandUser.build(SettingsCommandUser.java:114)
at 
org.apache.cassandra.stress.settings.SettingsCommand.get(SettingsCommand.java:134)
at 
org.apache.cassandra.stress.settings.StressSettings.get(StressSettings.java:218)
at 
org.apache.cassandra.stress.settings.StressSettings.parse(StressSettings.java:206)
at org.apache.cassandra.stress.Stress.main(Stress.java:58)
Caused by: org.apache.cassandra.exceptions.SyntaxException: line 6:14 
mismatched input '(' expecting ')'
at 
org.apache.cassandra.cql3.CqlParser.throwLastRecognitionError(CqlParser.java:273)
at 
org.apache.cassandra.cql3.QueryProcessor.parseStatement(QueryProcessor.java:456)
at org.apache.cassandra.config.CFMetaData.compile(CFMetaData.java:541)
... 8 more
{noformat}




--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Created] (CASSANDRA-7717) cassandra-stress: add sample yamls to distro

2014-08-07 Thread Robert Stupp (JIRA)
Robert Stupp created CASSANDRA-7717:
---

 Summary: cassandra-stress: add sample yamls to distro
 Key: CASSANDRA-7717
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7717
 Project: Cassandra
  Issue Type: Improvement
Reporter: Robert Stupp
Assignee: T Jake Luciani
 Fix For: 2.1.0


C* stress is missing sample yaml files in distro. They are in git - but not in 
the downloadable tgz .



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Assigned] (CASSANDRA-7717) cassandra-stress: add sample yamls to distro

2014-08-07 Thread Brandon Williams (JIRA)

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

Brandon Williams reassigned CASSANDRA-7717:
---

Assignee: Michael Shuler  (was: T Jake Luciani)

 cassandra-stress: add sample yamls to distro
 

 Key: CASSANDRA-7717
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7717
 Project: Cassandra
  Issue Type: Improvement
Reporter: Robert Stupp
Assignee: Michael Shuler
 Fix For: 2.1.0


 C* stress is missing sample yaml files in distro. They are in git - but not 
 in the downloadable tgz .



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Assigned] (CASSANDRA-7717) cassandra-stress: add sample yamls to distro

2014-08-07 Thread Brandon Williams (JIRA)

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

Brandon Williams reassigned CASSANDRA-7717:
---

Assignee: T Jake Luciani  (was: Michael Shuler)

 cassandra-stress: add sample yamls to distro
 

 Key: CASSANDRA-7717
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7717
 Project: Cassandra
  Issue Type: Improvement
Reporter: Robert Stupp
Assignee: T Jake Luciani
 Fix For: 2.1.0


 C* stress is missing sample yaml files in distro. They are in git - but not 
 in the downloadable tgz .



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Updated] (CASSANDRA-7695) Inserting the same row in parallel causes bad data to be returned to the client

2014-08-07 Thread Ryan McGuire (JIRA)

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

Ryan McGuire updated CASSANDRA-7695:


Tester: Ryan McGuire

 Inserting the same row in parallel causes bad data to be returned to the 
 client
 ---

 Key: CASSANDRA-7695
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7695
 Project: Cassandra
  Issue Type: Bug
 Environment: Linux 3.12.21, JVM 1.7u60
 Cassandra server 2.1.0 RC 5
 Cassandra datastax client version 2.1.0RC1
Reporter: Johan Bjork
Assignee: T Jake Luciani
Priority: Blocker
 Fix For: 2.1.0

 Attachments: 7695-workaround.txt, PutFailureRepro.java, 
 bad-data-tid43-get, bad-data-tid43-put


 Running the attached test program against a cassandra 2.1 server results in 
 scrambled data returned by the SELECT statement. Running it against latest 
 stable works fine.
 Attached:
 * Program that reproduces the failure
 * Example output files from mentioned test-program with the scrambled output.
 Failure mode:
 The value returned by 'get' is scrambled, the size is correct but some bytes 
 have shifted locations in the returned buffer.
 Cluster info:
 For the test we set up a single cassandra node using the stock configuration 
 file.



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[Cassandra Wiki] Update of ContributorsGroup by BrandonWilliams

2014-08-07 Thread Apache Wiki
Dear Wiki user,

You have subscribed to a wiki page or wiki category on Cassandra Wiki for 
change notification.

The ContributorsGroup page has been changed by BrandonWilliams:
https://wiki.apache.org/cassandra/ContributorsGroup?action=diffrev1=35rev2=36

   * MichaelShuler
   * BenedictElliottSmith
   * RobertStupp
+  * JoshuaMcKenzie
  


[jira] [Updated] (CASSANDRA-7316) Windows feature parity - lock JVM in memory to prevent swapping

2014-08-07 Thread Joshua McKenzie (JIRA)

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

Joshua McKenzie updated CASSANDRA-7316:
---

Reviewer:   (was: Joshua McKenzie)

 Windows feature parity - lock JVM in memory to prevent swapping
 ---

 Key: CASSANDRA-7316
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7316
 Project: Cassandra
  Issue Type: Improvement
Reporter: Joshua McKenzie
Assignee: Joshua McKenzie
Priority: Minor
  Labels: Windows, perfomance
 Fix For: 3.0


 Similar to mlockall() in CLibrary.java for linux, it would be nice to lock 
 the virtual address space on Windows to prevent page faults.
 One option: Reference API:  
 http://msdn.microsoft.com/en-us/library/windows/desktop/aa366895(v=vs.85).aspx



--
This message was sent by Atlassian JIRA
(v6.2#6252)


  1   2   >