[jira] [Created] (CASSANDRA-10768) Optimize the way we check if a token is repaired in anticompaction

2015-11-25 Thread Marcus Eriksson (JIRA)
Marcus Eriksson created CASSANDRA-10768:
---

 Summary: Optimize the way we check if a token is repaired in 
anticompaction
 Key: CASSANDRA-10768
 URL: https://issues.apache.org/jira/browse/CASSANDRA-10768
 Project: Cassandra
  Issue Type: Bug
Reporter: Marcus Eriksson
Assignee: Marcus Eriksson
 Fix For: 2.1.x, 2.2.x, 3.0.x, 3.x


When we anticompact we check each token if it is within a repaired range, this 
is very inefficient with many tokens as we do a linear search instead of 
sorting the ranges and doing a binary search (or even just keeping track of the 
next right-boundary and checking against that to avoid 2 comparisons)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Created] (CASSANDRA-10769) "received out of order wrt DecoratedKey" after scrub

2015-11-25 Thread mlowicki (JIRA)
mlowicki created CASSANDRA-10769:


 Summary: "received out of order wrt DecoratedKey" after scrub
 Key: CASSANDRA-10769
 URL: https://issues.apache.org/jira/browse/CASSANDRA-10769
 Project: Cassandra
  Issue Type: Bug
 Environment: C* 2.1.11, Debian Wheezy
Reporter: mlowicki


After running scrub and cleanup on all nodes in single data center I'm getting:
{code}
ERROR [ValidationExecutor:103] 2015-11-25 06:28:21,530 Validator.java:245 - 
Failed creating a merkle tree for [repair #89fa2b70-933d-11e5-b036-75bb514ae072 
on sync/entity_by_id2, (-5867793819051725444,-5865919628027816979]], 
/10.210.3.221 (see log for details)
ERROR [ValidationExecutor:103] 2015-11-25 06:28:21,531 CassandraDaemon.java:227 
- Exception in thread Thread[ValidationExecutor:103,1,main]
java.lang.AssertionError: row DecoratedKey(-5867787467868737053, 
000932373633313036313204808800) received out of order wrt 
DecoratedKey(-5865937851627253360, 000933313230313737333204c3c700)
at org.apache.cassandra.repair.Validator.add(Validator.java:127) 
~[apache-cassandra-2.1.11.jar:2.1.11]
at 
org.apache.cassandra.db.compaction.CompactionManager.doValidationCompaction(CompactionManager.java:1010)
 ~[apache-cassandra-2.1.11.jar:2.1.11]
at 
org.apache.cassandra.db.compaction.CompactionManager.access$600(CompactionManager.java:94)
 ~[apache-cassandra-2.1.11.jar:2.1.11]
at 
org.apache.cassandra.db.compaction.CompactionManager$9.call(CompactionManager.java:622)
 ~[apache-cassandra-2.1.11.jar:2.1.11]
at java.util.concurrent.FutureTask.run(FutureTask.java:262) 
~[na:1.7.0_80]
at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) 
~[na:1.7.0_80]
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) 
[na:1.7.0_80]
at java.lang.Thread.run(Thread.java:745) [na:1.7.0_80]
{code}

What I did is to run repair on other node:
{code}
time nodetool repair --in-local-dc
{code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CASSANDRA-10769) "received out of order wrt DecoratedKey" after scrub

2015-11-25 Thread mlowicki (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-10769?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15026472#comment-15026472
 ] 

mlowicki commented on CASSANDRA-10769:
--

Found this error on other node as well:
{code}
ERROR [ValidationExecutor:78] 2015-11-24 22:35:52,652 Validator.java:245 - 
Failed creating a merkle tree for [repair #93837260-92fb-11e5-b036-75bb514ae072 
on sync/entity2, (-6012485790753833422,-6009995015166063234]], /10.210.3.221 
(see log for details)
ERROR [ValidationExecutor:78] 2015-11-24 22:35:52,652 CassandraDaemon.java:227 
- Exception in thread Thread[ValidationExecutor:78,1,main]
java.lang.AssertionError: row DecoratedKey(-6012437544863914154, 
000932373632373537303204c3c700) received out of order wrt 
DecoratedKey(-6009997709246787268, 000932373538333034303204c3c700)
at org.apache.cassandra.repair.Validator.add(Validator.java:127) 
~[apache-cassandra-2.1.11.jar:2.1.11]
at 
org.apache.cassandra.db.compaction.CompactionManager.doValidationCompaction(CompactionManager.java:1010)
 ~[apache-cassandra-2.1.11.jar:2.1.11]
at 
org.apache.cassandra.db.compaction.CompactionManager.access$600(CompactionManager.java:94)
 ~[apache-cassandra-2.1.11.jar:2.1.11]
at 
org.apache.cassandra.db.compaction.CompactionManager$9.call(CompactionManager.java:622)
 ~[apache-cassandra-2.1.11.jar:2.1.11]
at java.util.concurrent.FutureTask.run(FutureTask.java:262) 
~[na:1.7.0_80]
at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) 
~[na:1.7.0_80]
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) 
[na:1.7.0_80]
at java.lang.Thread.run(Thread.java:745) [na:1.7.0_80]
{code}

> "received out of order wrt DecoratedKey" after scrub
> 
>
> Key: CASSANDRA-10769
> URL: https://issues.apache.org/jira/browse/CASSANDRA-10769
> Project: Cassandra
>  Issue Type: Bug
> Environment: C* 2.1.11, Debian Wheezy
>Reporter: mlowicki
>
> After running scrub and cleanup on all nodes in single data center I'm 
> getting:
> {code}
> ERROR [ValidationExecutor:103] 2015-11-25 06:28:21,530 Validator.java:245 - 
> Failed creating a merkle tree for [repair 
> #89fa2b70-933d-11e5-b036-75bb514ae072 on sync/entity_by_id2, 
> (-5867793819051725444,-5865919628027816979]], /10.210.3.221 (see log for 
> details)
> ERROR [ValidationExecutor:103] 2015-11-25 06:28:21,531 
> CassandraDaemon.java:227 - Exception in thread 
> Thread[ValidationExecutor:103,1,main]
> java.lang.AssertionError: row DecoratedKey(-5867787467868737053, 
> 000932373633313036313204808800) received out of order wrt 
> DecoratedKey(-5865937851627253360, 000933313230313737333204c3c700)
> at org.apache.cassandra.repair.Validator.add(Validator.java:127) 
> ~[apache-cassandra-2.1.11.jar:2.1.11]
> at 
> org.apache.cassandra.db.compaction.CompactionManager.doValidationCompaction(CompactionManager.java:1010)
>  ~[apache-cassandra-2.1.11.jar:2.1.11]
> at 
> org.apache.cassandra.db.compaction.CompactionManager.access$600(CompactionManager.java:94)
>  ~[apache-cassandra-2.1.11.jar:2.1.11]
> at 
> org.apache.cassandra.db.compaction.CompactionManager$9.call(CompactionManager.java:622)
>  ~[apache-cassandra-2.1.11.jar:2.1.11]
> at java.util.concurrent.FutureTask.run(FutureTask.java:262) 
> ~[na:1.7.0_80]
> at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
>  ~[na:1.7.0_80]
> at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
>  [na:1.7.0_80]
> at java.lang.Thread.run(Thread.java:745) [na:1.7.0_80]
> {code}
> What I did is to run repair on other node:
> {code}
> time nodetool repair --in-local-dc
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (CASSANDRA-10769) "received out of order wrt DecoratedKey" after scrub

2015-11-25 Thread mlowicki (JIRA)

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

mlowicki updated CASSANDRA-10769:
-
Description: 
After running scrub and cleanup on all nodes in single data center I'm getting:
{code}
ERROR [ValidationExecutor:103] 2015-11-25 06:28:21,530 Validator.java:245 - 
Failed creating a merkle tree for [repair #89fa2b70-933d-11e5-b036-75bb514ae072 
on sync/entity_by_id2, (-5867793819051725444,-5865919628027816979]], 
/10.210.3.221 (see log for details)
ERROR [ValidationExecutor:103] 2015-11-25 06:28:21,531 CassandraDaemon.java:227 
- Exception in thread Thread[ValidationExecutor:103,1,main]
java.lang.AssertionError: row DecoratedKey(-5867787467868737053, 
000932373633313036313204808800) received out of order wrt 
DecoratedKey(-5865937851627253360, 000933313230313737333204c3c700)
at org.apache.cassandra.repair.Validator.add(Validator.java:127) 
~[apache-cassandra-2.1.11.jar:2.1.11]
at 
org.apache.cassandra.db.compaction.CompactionManager.doValidationCompaction(CompactionManager.java:1010)
 ~[apache-cassandra-2.1.11.jar:2.1.11]
at 
org.apache.cassandra.db.compaction.CompactionManager.access$600(CompactionManager.java:94)
 ~[apache-cassandra-2.1.11.jar:2.1.11]
at 
org.apache.cassandra.db.compaction.CompactionManager$9.call(CompactionManager.java:622)
 ~[apache-cassandra-2.1.11.jar:2.1.11]
at java.util.concurrent.FutureTask.run(FutureTask.java:262) 
~[na:1.7.0_80]
at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) 
~[na:1.7.0_80]
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) 
[na:1.7.0_80]
at java.lang.Thread.run(Thread.java:745) [na:1.7.0_80]
{code}

What I did is to run repair on other node:
{code}
time nodetool repair --in-local-dc
{code}

Corresponding log on the node where repair has been started:
{code}
ERROR [AntiEntropySessions:414] 2015-11-25 06:28:21,533 RepairSession.java:303 
- [repair #89fa2b70-933d-11e5-b036-75bb514ae072] session completed with the 
following error
org.apache.cassandra.exceptions.RepairException: [repair 
#89fa2b70-933d-11e5-b036-75bb514ae072 on sync/entity_by_id2, 
(-5867793819051725444,-5865919628027816979]] Validation failed in /10.210.3.117
at 
org.apache.cassandra.repair.RepairSession.validationComplete(RepairSession.java:166)
 ~[apache-cassandra-2.1.11.jar:2.1.11]
at 
org.apache.cassandra.service.ActiveRepairService.handleMessage(ActiveRepairService.java:406)
 ~[apache-cassandra-2.1.11.jar:2.1.11]
at 
org.apache.cassandra.repair.RepairMessageVerbHandler.doVerb(RepairMessageVerbHandler.java:134)
 ~[apache-cassandra-2.1.11.jar:2.1.11]
at 
org.apache.cassandra.net.MessageDeliveryTask.run(MessageDeliveryTask.java:64) 
~[apache-cassandra-2.1.11.jar:2.1.11]
at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) 
[na:1.7.0_80]
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) 
[na:1.7.0_80]
at java.lang.Thread.run(Thread.java:745) [na:1.7.0_80]
INFO  [AntiEntropySessions:415] 2015-11-25 06:28:21,533 RepairSession.java:260 
- [repair #b9458fa0-933d-11e5-b036-75bb514ae072] new session: will sync 
/10.210.3.221, /10.210.3.118, /10.210.3.117 on range 
(7119703141488009983,7129744584776466802] for sync.[device_token, entity2, 
user_stats, user_device, user_quota, user_store, user_device_progress, 
entity_by_id2]
ERROR [AntiEntropySessions:414] 2015-11-25 06:28:21,533 
CassandraDaemon.java:227 - Exception in thread 
Thread[AntiEntropySessions:414,5,RMI Runtime]
java.lang.RuntimeException: org.apache.cassandra.exceptions.RepairException: 
[repair #89fa2b70-933d-11e5-b036-75bb514ae072 on sync/entity_by_id2, 
(-5867793819051725444,-5865919628027816979]] Validation failed in /10.210.3.117
at com.google.common.base.Throwables.propagate(Throwables.java:160) 
~[guava-16.0.jar:na]
at 
org.apache.cassandra.utils.WrappedRunnable.run(WrappedRunnable.java:32) 
~[apache-cassandra-2.1.11.jar:2.1.11]
at 
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) 
~[na:1.7.0_80]
at java.util.concurrent.FutureTask.run(FutureTask.java:262) 
~[na:1.7.0_80]
at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) 
~[na:1.7.0_80]
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) 
[na:1.7.0_80]
at java.lang.Thread.run(Thread.java:745) [na:1.7.0_80]
Caused by: org.apache.cassandra.exceptions.RepairException: [repair 
#89fa2b70-933d-11e5-b036-75bb514ae072 on sync/entity_by_id2, 
(-5867793819051725444,-5865919628027816979]] Validation failed in /10.210.3.117
at 
org.apache.cassandra.repair.RepairSession.validationComplete(RepairSession.java:166)
 ~[apache-cassandra-2.1.11.jar:2.1.11]
at 
org.

[jira] [Commented] (CASSANDRA-10760) Counters are erroneously allowed as map key type

2015-11-25 Thread Michael Edge (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-10760?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15026524#comment-15026524
 ] 

Michael Edge commented on CASSANDRA-10760:
--

[~iamaleksey], if this is what you're expecting I'll create patches for v2.1 
and v2.2.

{noformat}
cqlsh> create keyspace test with replication = {'class': 'SimpleStrategy', 
'replication_factor': 1};
cqlsh> create table test.test (id int primary key, amap map);
InvalidRequest: code=2200 [Invalid query] message="Counters are not allowed as 
keys inside collections: map"
cqlsh> create table test.test (id int primary key, amap map);
InvalidRequest: code=2200 [Invalid query] message="Counters are not allowed as 
values inside collections: map"
{noformat}

> Counters are erroneously allowed as map key type
> 
>
> Key: CASSANDRA-10760
> URL: https://issues.apache.org/jira/browse/CASSANDRA-10760
> Project: Cassandra
>  Issue Type: Bug
>  Components: CQL
>Reporter: Aleksey Yeschenko
>Priority: Minor
> Fix For: 2.1.x, 2.2.x, 3.0.x
>
>
> We do validate collection value types, but not collection key types, which 
> allows counters to be used as map keys:
> {noformat}
> cqlsh> create keyspace test with replication = {'class': 'SimpleStrategy', 
> 'replication_factor': 1};
> cqlsh> use test;
> cqlsh:test> create table test.test (id int primary key, amap map text>);
> cqlsh:test> insert into test.test (id, amap) values (0, {1: '2'});
> cqlsh:test> select * from test.test;
>  id | amap
> +--
>   0 | {1: '2'}
> (1 rows)
> {noformat}
> This should obviously not be allowed and must be rejected.
> /cc [~slebresne]



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Comment Edited] (CASSANDRA-10760) Counters are erroneously allowed as map key type

2015-11-25 Thread Michael Edge (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-10760?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15026524#comment-15026524
 ] 

Michael Edge edited comment on CASSANDRA-10760 at 11/25/15 10:02 AM:
-

[~iamaleksey], if this is what you're expecting I'll create patches for v2.1 
and v2.2.

{noformat}
cqlsh> create keyspace test with replication = {'class': 'SimpleStrategy', 
'replication_factor': 1};
cqlsh> create table test.test (id int primary key, amap map);
InvalidRequest: code=2200 [Invalid query] message="Counters are not allowed as 
keys inside collections: map"
cqlsh> create table test.test (id int primary key, amap map);
InvalidRequest: code=2200 [Invalid query] message="Counters are not allowed as 
values inside collections: map"
{noformat}

One thing I'm not 100% sure of is whether we allow counters as map keys for 
supercolumns. Seems we do allow counters as map values for supercolumns. If we 
do not allow them as map keys then the {{isInternal}} check in the patch can be 
removed.

{code}
+if (keys.isCounter() && !isInternal)
+throw new InvalidRequestException("Counters are not 
allowed as keys inside collections: " + this);
{code}



was (Author: michaeledge):
[~iamaleksey], if this is what you're expecting I'll create patches for v2.1 
and v2.2.

{noformat}
cqlsh> create keyspace test with replication = {'class': 'SimpleStrategy', 
'replication_factor': 1};
cqlsh> create table test.test (id int primary key, amap map);
InvalidRequest: code=2200 [Invalid query] message="Counters are not allowed as 
keys inside collections: map"
cqlsh> create table test.test (id int primary key, amap map);
InvalidRequest: code=2200 [Invalid query] message="Counters are not allowed as 
values inside collections: map"
{noformat}

> Counters are erroneously allowed as map key type
> 
>
> Key: CASSANDRA-10760
> URL: https://issues.apache.org/jira/browse/CASSANDRA-10760
> Project: Cassandra
>  Issue Type: Bug
>  Components: CQL
>Reporter: Aleksey Yeschenko
>Priority: Minor
> Fix For: 2.1.x, 2.2.x, 3.0.x
>
>
> We do validate collection value types, but not collection key types, which 
> allows counters to be used as map keys:
> {noformat}
> cqlsh> create keyspace test with replication = {'class': 'SimpleStrategy', 
> 'replication_factor': 1};
> cqlsh> use test;
> cqlsh:test> create table test.test (id int primary key, amap map text>);
> cqlsh:test> insert into test.test (id, amap) values (0, {1: '2'});
> cqlsh:test> select * from test.test;
>  id | amap
> +--
>   0 | {1: '2'}
> (1 rows)
> {noformat}
> This should obviously not be allowed and must be rejected.
> /cc [~slebresne]



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Comment Edited] (CASSANDRA-10760) Counters are erroneously allowed as map key type

2015-11-25 Thread Michael Edge (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-10760?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15026524#comment-15026524
 ] 

Michael Edge edited comment on CASSANDRA-10760 at 11/25/15 10:03 AM:
-

[~iamaleksey], if this is what you're expecting I'll create patches for v2.1 
and v2.2.

{noformat}
cqlsh> create keyspace test with replication = {'class': 'SimpleStrategy', 
'replication_factor': 1};
cqlsh> create table test.test (id int primary key, amap map);
InvalidRequest: code=2200 [Invalid query] message="Counters are not allowed as 
keys inside collections: map"
cqlsh> create table test.test (id int primary key, amap map);
InvalidRequest: code=2200 [Invalid query] message="Counters are not allowed as 
values inside collections: map"
{noformat}

One thing I'm not 100% sure of is whether we allow counters as map keys for 
supercolumns. Seems we do allow counters as map values for supercolumns. If we 
do not allow them as map keys then the {{isInternal}} check in 
{{org/apache/cassandra/cql3/CQL3Type.java}} can be removed (see patch).

{code}
+if (keys.isCounter() && !isInternal)
+throw new InvalidRequestException("Counters are not 
allowed as keys inside collections: " + this);
{code}



was (Author: michaeledge):
[~iamaleksey], if this is what you're expecting I'll create patches for v2.1 
and v2.2.

{noformat}
cqlsh> create keyspace test with replication = {'class': 'SimpleStrategy', 
'replication_factor': 1};
cqlsh> create table test.test (id int primary key, amap map);
InvalidRequest: code=2200 [Invalid query] message="Counters are not allowed as 
keys inside collections: map"
cqlsh> create table test.test (id int primary key, amap map);
InvalidRequest: code=2200 [Invalid query] message="Counters are not allowed as 
values inside collections: map"
{noformat}

One thing I'm not 100% sure of is whether we allow counters as map keys for 
supercolumns. Seems we do allow counters as map values for supercolumns. If we 
do not allow them as map keys then the {{isInternal}} check in the patch can be 
removed.

{code}
+if (keys.isCounter() && !isInternal)
+throw new InvalidRequestException("Counters are not 
allowed as keys inside collections: " + this);
{code}


> Counters are erroneously allowed as map key type
> 
>
> Key: CASSANDRA-10760
> URL: https://issues.apache.org/jira/browse/CASSANDRA-10760
> Project: Cassandra
>  Issue Type: Bug
>  Components: CQL
>Reporter: Aleksey Yeschenko
>Priority: Minor
> Fix For: 2.1.x, 2.2.x, 3.0.x
>
>
> We do validate collection value types, but not collection key types, which 
> allows counters to be used as map keys:
> {noformat}
> cqlsh> create keyspace test with replication = {'class': 'SimpleStrategy', 
> 'replication_factor': 1};
> cqlsh> use test;
> cqlsh:test> create table test.test (id int primary key, amap map text>);
> cqlsh:test> insert into test.test (id, amap) values (0, {1: '2'});
> cqlsh:test> select * from test.test;
>  id | amap
> +--
>   0 | {1: '2'}
> (1 rows)
> {noformat}
> This should obviously not be allowed and must be rejected.
> /cc [~slebresne]



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Created] (CASSANDRA-10770) Warning TIOStreamTransport.java:112 - Error closing output stream.

2015-11-25 Thread jean carlo rivera ura (JIRA)
jean carlo rivera ura created CASSANDRA-10770:
-

 Summary: Warning TIOStreamTransport.java:112 - Error closing 
output stream.
 Key: CASSANDRA-10770
 URL: https://issues.apache.org/jira/browse/CASSANDRA-10770
 Project: Cassandra
  Issue Type: Bug
 Environment: Cassandra 2.1.11, ubuntu 12.04
Reporter: jean carlo rivera ura
Priority: Minor
 Attachments: warning-thrift.txt

Hi,  In our cluster cassandra of 6 nodes we are having many times the next 
warning

WARN  [Thrift:2477] 2015-11-25 10:06:33,795 TIOStreamTransport.java:112 - Error 
closing output stream.
java.net.SocketException: Socket closed
at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:116) 
~[na:1.8.0_60]
at java.net.SocketOutputStream.write(SocketOutputStream.java:153) 
~[na:1.8.0_60]
at 
java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:82) 
~[na:1.8.0_60]
at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:140) 
~[na:1.8.0_60]
at java.io.FilterOutputStream.close(FilterOutputStream.java:158) 
~[na:1.8.0_60]
at 
org.apache.thrift.transport.TIOStreamTransport.close(TIOStreamTransport.java:110)
 ~[libthrift-0.9.2.jar:0.9.2]
at 
org.apache.cassandra.thrift.TCustomSocket.close(TCustomSocket.java:197) 
[apache-cassandra-2.1.11.jar:2.1.11]
at 
org.apache.thrift.transport.TFramedTransport.close(TFramedTransport.java:89) 
[libthrift-0.9.2.jar:0.9.2]
at 
org.apache.cassandra.thrift.CustomTThreadPoolServer$WorkerProcess.run(CustomTThreadPoolServer.java:231)
 [apache-cassandra-2.1.11.jar:2.1.11]
at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) 
[na:1.8.0_60]
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) 
[na:1.8.0_60]
at java.lang.Thread.run(Thread.java:745) [na:1.8.0_60]

We are not able to know why cassandra is closing a socket that was close 
before. This is hapening mostly when cassandra is having high load of writes.

Is it that a bug?




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (CASSANDRA-10760) Counters are erroneously allowed as map key type

2015-11-25 Thread Michael Edge (JIRA)

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

Michael Edge updated CASSANDRA-10760:
-
Attachment: CASSANDRA-3.0-10760-Counters-in-Maps.patch

Patch for v3.0

> Counters are erroneously allowed as map key type
> 
>
> Key: CASSANDRA-10760
> URL: https://issues.apache.org/jira/browse/CASSANDRA-10760
> Project: Cassandra
>  Issue Type: Bug
>  Components: CQL
>Reporter: Aleksey Yeschenko
>Priority: Minor
> Fix For: 2.1.x, 2.2.x, 3.0.x
>
> Attachments: CASSANDRA-3.0-10760-Counters-in-Maps.patch
>
>
> We do validate collection value types, but not collection key types, which 
> allows counters to be used as map keys:
> {noformat}
> cqlsh> create keyspace test with replication = {'class': 'SimpleStrategy', 
> 'replication_factor': 1};
> cqlsh> use test;
> cqlsh:test> create table test.test (id int primary key, amap map text>);
> cqlsh:test> insert into test.test (id, amap) values (0, {1: '2'});
> cqlsh:test> select * from test.test;
>  id | amap
> +--
>   0 | {1: '2'}
> (1 rows)
> {noformat}
> This should obviously not be allowed and must be rejected.
> /cc [~slebresne]



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (CASSANDRA-10760) Counters are erroneously allowed as map key type

2015-11-25 Thread Michael Edge (JIRA)

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

Michael Edge updated CASSANDRA-10760:
-
Labels: cql cqlsh  (was: )

> Counters are erroneously allowed as map key type
> 
>
> Key: CASSANDRA-10760
> URL: https://issues.apache.org/jira/browse/CASSANDRA-10760
> Project: Cassandra
>  Issue Type: Bug
>  Components: CQL
>Reporter: Aleksey Yeschenko
>Assignee: Michael Edge
>Priority: Minor
>  Labels: cql, cqlsh
> Fix For: 2.1.x, 2.2.x, 3.0.x
>
> Attachments: CASSANDRA-3.0-10760-Counters-in-Maps.patch
>
>
> We do validate collection value types, but not collection key types, which 
> allows counters to be used as map keys:
> {noformat}
> cqlsh> create keyspace test with replication = {'class': 'SimpleStrategy', 
> 'replication_factor': 1};
> cqlsh> use test;
> cqlsh:test> create table test.test (id int primary key, amap map text>);
> cqlsh:test> insert into test.test (id, amap) values (0, {1: '2'});
> cqlsh:test> select * from test.test;
>  id | amap
> +--
>   0 | {1: '2'}
> (1 rows)
> {noformat}
> This should obviously not be allowed and must be rejected.
> /cc [~slebresne]



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (CASSANDRA-10740) Incorrect condition causes cleanup of SSTables which might not need it

2015-11-25 Thread Jakub Janecek (JIRA)

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

Jakub Janecek updated CASSANDRA-10740:
--
Attachment: trunk-test-10740.txt

> Incorrect condition causes cleanup of SSTables which might not need it
> --
>
> Key: CASSANDRA-10740
> URL: https://issues.apache.org/jira/browse/CASSANDRA-10740
> Project: Cassandra
>  Issue Type: Bug
>Reporter: Jakub Janecek
> Fix For: 2.1.x
>
> Attachments: trunk-10740.txt, trunk-test-10740.txt
>
>
> We needed to perform cleanup of SSTables in our production cluster but found 
> out that it would take several months. Together with my colleague 
> [~JiriHorky] we have pinpointed the issue to method 
> CompactionManager.needsCleanup which incorrectly marks almost all SSTables as 
> the ones needing the cleanup even though that might not be true. I am 
> attaching a patch which should be applicable from version 2.x forward (this 
> is the version we would need it in).
> To explain the problem, the last condition in the cycle that checks whether 
> the next key in the SSTable after the current checked range is NOT contained 
> in the next range falsely marks SSTable as necessary to have cleanup even 
> though it might be contained in some other range. The correct condition 
> (which is actully described in the comment) is to check whether the next key 
> in the SSTable after the current range is less than or equal to the "left" 
> key of the next range (assuming that the left key is exclusive which is 
> described in another comment of the same method).
> Is our patch and reasoning correct?



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[14/15] cassandra git commit: Merge branch 'cassandra-3.0' into cassandra-3.1

2015-11-25 Thread samt
Merge branch 'cassandra-3.0' into cassandra-3.1


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

Branch: refs/heads/trunk
Commit: 8e1b6ea70b16a39c729700ecfc2fb7e406545e5a
Parents: 8feb66e 602f736
Author: Sam Tunnicliffe 
Authored: Wed Nov 25 10:09:23 2015 +
Committer: Sam Tunnicliffe 
Committed: Wed Nov 25 10:09:23 2015 +

--

--




[03/15] cassandra git commit: Make internal paging logic consistent between searcher impls

2015-11-25 Thread samt
Make internal paging logic consistent between searcher impls

Patch by Sam Tunnicliffe; reviewed by Carl Yeksigian for CASSANDRA-10683


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

Branch: refs/heads/trunk
Commit: f5a09c125cce2078832c20f35eba3ab43eb5c36b
Parents: f319f0a
Author: Sam Tunnicliffe 
Authored: Tue Nov 10 18:18:45 2015 +
Committer: Sam Tunnicliffe 
Committed: Wed Nov 25 09:29:52 2015 +

--
 CHANGES.txt   | 1 +
 src/java/org/apache/cassandra/db/index/keys/KeysSearcher.java | 3 +--
 2 files changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/f5a09c12/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index c4dd54e..91f4577 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.1.12
+ * Make paging logic consistent between searcher impls (CASSANDRA-10683)
  * Fix CompressedInputStream for proper cleanup (CASSANDRA-10012)
  * (cqlsh) Support counters in COPY commands (CASSANDRA-9043)
  * Try next replica if not possible to connect to primary replica on

http://git-wip-us.apache.org/repos/asf/cassandra/blob/f5a09c12/src/java/org/apache/cassandra/db/index/keys/KeysSearcher.java
--
diff --git a/src/java/org/apache/cassandra/db/index/keys/KeysSearcher.java 
b/src/java/org/apache/cassandra/db/index/keys/KeysSearcher.java
index 634bb0c..4ba636d 100644
--- a/src/java/org/apache/cassandra/db/index/keys/KeysSearcher.java
+++ b/src/java/org/apache/cassandra/db/index/keys/KeysSearcher.java
@@ -98,9 +98,8 @@ public class KeysSearcher extends SecondaryIndexSearcher
 
 protected Row computeNext()
 {
-int meanColumns = 
Math.max(index.getIndexCfs().getMeanColumns(), 1);
 // We shouldn't fetch only 1 row as this provides buggy paging 
in case the first row doesn't satisfy all clauses
-int rowsPerQuery = Math.max(Math.min(filter.maxRows(), 
filter.maxColumns() / meanColumns), 2);
+int rowsPerQuery = Math.max(Math.min(filter.maxRows(), 
filter.maxColumns()), 2);
 while (true)
 {
 if (indexColumns == null || !indexColumns.hasNext())



[15/15] cassandra git commit: Merge branch 'cassandra-3.1' into trunk

2015-11-25 Thread samt
Merge branch 'cassandra-3.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/ea9b3601
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/ea9b3601
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/ea9b3601

Branch: refs/heads/trunk
Commit: ea9b36011ed4dded3490a2b7b9c669b4e524d55d
Parents: 8bf3002 8e1b6ea
Author: Sam Tunnicliffe 
Authored: Wed Nov 25 10:15:34 2015 +
Committer: Sam Tunnicliffe 
Committed: Wed Nov 25 10:15:34 2015 +

--

--




[06/15] cassandra git commit: Merge branch 'cassandra-2.1' into cassandra-2.2

2015-11-25 Thread samt
Merge branch 'cassandra-2.1' into cassandra-2.2


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

Branch: refs/heads/trunk
Commit: a9075339227fc689a04977f0b9fa714cbc958f15
Parents: 1142183 f5a09c1
Author: Sam Tunnicliffe 
Authored: Wed Nov 25 10:01:12 2015 +
Committer: Sam Tunnicliffe 
Committed: Wed Nov 25 10:01:12 2015 +

--
 CHANGES.txt   | 1 +
 src/java/org/apache/cassandra/db/index/keys/KeysSearcher.java | 3 +--
 2 files changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/a9075339/CHANGES.txt
--
diff --cc CHANGES.txt
index d11be26,91f4577..a274ea9
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,17 -1,5 +1,18 @@@
 -2.1.12
 +2.2.4
 + * Don't do anticompaction after subrange repair (CASSANDRA-10422)
 + * Fix SimpleDateType type compatibility (CASSANDRA-10027)
 + * (Hadoop) fix splits calculation (CASSANDRA-10640)
 + * (Hadoop) ensure that Cluster instances are always closed (CASSANDRA-10058)
 + * (cqlsh) show partial trace if incomplete after max_trace_wait 
(CASSANDRA-7645)
 + * Use most up-to-date version of schema for system tables (CASSANDRA-10652)
 + * Deprecate memory_allocator in cassandra.yaml (CASSANDRA-10581,10628)
 + * Expose phi values from failure detector via JMX and tweak debug
 +   and trace logging (CASSANDRA-9526)
 + * Fix RangeNamesQueryPager (CASSANDRA-10509)
 + * Deprecate Pig support (CASSANDRA-10542)
 + * Reduce contention getting instances of CompositeType (CASSANDRA-10433)
 +Merged from 2.1:
+  * Make paging logic consistent between searcher impls (CASSANDRA-10683)
   * Fix CompressedInputStream for proper cleanup (CASSANDRA-10012)
   * (cqlsh) Support counters in COPY commands (CASSANDRA-9043)
   * Try next replica if not possible to connect to primary replica on

http://git-wip-us.apache.org/repos/asf/cassandra/blob/a9075339/src/java/org/apache/cassandra/db/index/keys/KeysSearcher.java
--



[05/15] cassandra git commit: Make internal paging logic consistent between searcher impls

2015-11-25 Thread samt
Make internal paging logic consistent between searcher impls

Patch by Sam Tunnicliffe; reviewed by Carl Yeksigian for CASSANDRA-10683


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

Branch: refs/heads/cassandra-3.1
Commit: f5a09c125cce2078832c20f35eba3ab43eb5c36b
Parents: f319f0a
Author: Sam Tunnicliffe 
Authored: Tue Nov 10 18:18:45 2015 +
Committer: Sam Tunnicliffe 
Committed: Wed Nov 25 09:29:52 2015 +

--
 CHANGES.txt   | 1 +
 src/java/org/apache/cassandra/db/index/keys/KeysSearcher.java | 3 +--
 2 files changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/f5a09c12/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index c4dd54e..91f4577 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.1.12
+ * Make paging logic consistent between searcher impls (CASSANDRA-10683)
  * Fix CompressedInputStream for proper cleanup (CASSANDRA-10012)
  * (cqlsh) Support counters in COPY commands (CASSANDRA-9043)
  * Try next replica if not possible to connect to primary replica on

http://git-wip-us.apache.org/repos/asf/cassandra/blob/f5a09c12/src/java/org/apache/cassandra/db/index/keys/KeysSearcher.java
--
diff --git a/src/java/org/apache/cassandra/db/index/keys/KeysSearcher.java 
b/src/java/org/apache/cassandra/db/index/keys/KeysSearcher.java
index 634bb0c..4ba636d 100644
--- a/src/java/org/apache/cassandra/db/index/keys/KeysSearcher.java
+++ b/src/java/org/apache/cassandra/db/index/keys/KeysSearcher.java
@@ -98,9 +98,8 @@ public class KeysSearcher extends SecondaryIndexSearcher
 
 protected Row computeNext()
 {
-int meanColumns = 
Math.max(index.getIndexCfs().getMeanColumns(), 1);
 // We shouldn't fetch only 1 row as this provides buggy paging 
in case the first row doesn't satisfy all clauses
-int rowsPerQuery = Math.max(Math.min(filter.maxRows(), 
filter.maxColumns() / meanColumns), 2);
+int rowsPerQuery = Math.max(Math.min(filter.maxRows(), 
filter.maxColumns()), 2);
 while (true)
 {
 if (indexColumns == null || !indexColumns.hasNext())



[09/15] cassandra git commit: Merge branch 'cassandra-2.1' into cassandra-2.2

2015-11-25 Thread samt
Merge branch 'cassandra-2.1' into cassandra-2.2


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

Branch: refs/heads/cassandra-3.1
Commit: a9075339227fc689a04977f0b9fa714cbc958f15
Parents: 1142183 f5a09c1
Author: Sam Tunnicliffe 
Authored: Wed Nov 25 10:01:12 2015 +
Committer: Sam Tunnicliffe 
Committed: Wed Nov 25 10:01:12 2015 +

--
 CHANGES.txt   | 1 +
 src/java/org/apache/cassandra/db/index/keys/KeysSearcher.java | 3 +--
 2 files changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/a9075339/CHANGES.txt
--
diff --cc CHANGES.txt
index d11be26,91f4577..a274ea9
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,17 -1,5 +1,18 @@@
 -2.1.12
 +2.2.4
 + * Don't do anticompaction after subrange repair (CASSANDRA-10422)
 + * Fix SimpleDateType type compatibility (CASSANDRA-10027)
 + * (Hadoop) fix splits calculation (CASSANDRA-10640)
 + * (Hadoop) ensure that Cluster instances are always closed (CASSANDRA-10058)
 + * (cqlsh) show partial trace if incomplete after max_trace_wait 
(CASSANDRA-7645)
 + * Use most up-to-date version of schema for system tables (CASSANDRA-10652)
 + * Deprecate memory_allocator in cassandra.yaml (CASSANDRA-10581,10628)
 + * Expose phi values from failure detector via JMX and tweak debug
 +   and trace logging (CASSANDRA-9526)
 + * Fix RangeNamesQueryPager (CASSANDRA-10509)
 + * Deprecate Pig support (CASSANDRA-10542)
 + * Reduce contention getting instances of CompositeType (CASSANDRA-10433)
 +Merged from 2.1:
+  * Make paging logic consistent between searcher impls (CASSANDRA-10683)
   * Fix CompressedInputStream for proper cleanup (CASSANDRA-10012)
   * (cqlsh) Support counters in COPY commands (CASSANDRA-9043)
   * Try next replica if not possible to connect to primary replica on

http://git-wip-us.apache.org/repos/asf/cassandra/blob/a9075339/src/java/org/apache/cassandra/db/index/keys/KeysSearcher.java
--



[07/15] cassandra git commit: Merge branch 'cassandra-2.1' into cassandra-2.2

2015-11-25 Thread samt
Merge branch 'cassandra-2.1' into cassandra-2.2


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

Branch: refs/heads/cassandra-2.2
Commit: a9075339227fc689a04977f0b9fa714cbc958f15
Parents: 1142183 f5a09c1
Author: Sam Tunnicliffe 
Authored: Wed Nov 25 10:01:12 2015 +
Committer: Sam Tunnicliffe 
Committed: Wed Nov 25 10:01:12 2015 +

--
 CHANGES.txt   | 1 +
 src/java/org/apache/cassandra/db/index/keys/KeysSearcher.java | 3 +--
 2 files changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/a9075339/CHANGES.txt
--
diff --cc CHANGES.txt
index d11be26,91f4577..a274ea9
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,17 -1,5 +1,18 @@@
 -2.1.12
 +2.2.4
 + * Don't do anticompaction after subrange repair (CASSANDRA-10422)
 + * Fix SimpleDateType type compatibility (CASSANDRA-10027)
 + * (Hadoop) fix splits calculation (CASSANDRA-10640)
 + * (Hadoop) ensure that Cluster instances are always closed (CASSANDRA-10058)
 + * (cqlsh) show partial trace if incomplete after max_trace_wait 
(CASSANDRA-7645)
 + * Use most up-to-date version of schema for system tables (CASSANDRA-10652)
 + * Deprecate memory_allocator in cassandra.yaml (CASSANDRA-10581,10628)
 + * Expose phi values from failure detector via JMX and tweak debug
 +   and trace logging (CASSANDRA-9526)
 + * Fix RangeNamesQueryPager (CASSANDRA-10509)
 + * Deprecate Pig support (CASSANDRA-10542)
 + * Reduce contention getting instances of CompositeType (CASSANDRA-10433)
 +Merged from 2.1:
+  * Make paging logic consistent between searcher impls (CASSANDRA-10683)
   * Fix CompressedInputStream for proper cleanup (CASSANDRA-10012)
   * (cqlsh) Support counters in COPY commands (CASSANDRA-9043)
   * Try next replica if not possible to connect to primary replica on

http://git-wip-us.apache.org/repos/asf/cassandra/blob/a9075339/src/java/org/apache/cassandra/db/index/keys/KeysSearcher.java
--



[01/15] cassandra git commit: Make internal paging logic consistent between searcher impls

2015-11-25 Thread samt
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-2.1 f319f0a23 -> f5a09c125
  refs/heads/cassandra-2.2 1142183f5 -> a90753392
  refs/heads/cassandra-3.0 ae315b5ec -> 602f736e2
  refs/heads/cassandra-3.1 8feb66e6f -> 8e1b6ea70
  refs/heads/trunk 8bf3002dd -> ea9b36011


Make internal paging logic consistent between searcher impls

Patch by Sam Tunnicliffe; reviewed by Carl Yeksigian for CASSANDRA-10683


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

Branch: refs/heads/cassandra-2.1
Commit: f5a09c125cce2078832c20f35eba3ab43eb5c36b
Parents: f319f0a
Author: Sam Tunnicliffe 
Authored: Tue Nov 10 18:18:45 2015 +
Committer: Sam Tunnicliffe 
Committed: Wed Nov 25 09:29:52 2015 +

--
 CHANGES.txt   | 1 +
 src/java/org/apache/cassandra/db/index/keys/KeysSearcher.java | 3 +--
 2 files changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/f5a09c12/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index c4dd54e..91f4577 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.1.12
+ * Make paging logic consistent between searcher impls (CASSANDRA-10683)
  * Fix CompressedInputStream for proper cleanup (CASSANDRA-10012)
  * (cqlsh) Support counters in COPY commands (CASSANDRA-9043)
  * Try next replica if not possible to connect to primary replica on

http://git-wip-us.apache.org/repos/asf/cassandra/blob/f5a09c12/src/java/org/apache/cassandra/db/index/keys/KeysSearcher.java
--
diff --git a/src/java/org/apache/cassandra/db/index/keys/KeysSearcher.java 
b/src/java/org/apache/cassandra/db/index/keys/KeysSearcher.java
index 634bb0c..4ba636d 100644
--- a/src/java/org/apache/cassandra/db/index/keys/KeysSearcher.java
+++ b/src/java/org/apache/cassandra/db/index/keys/KeysSearcher.java
@@ -98,9 +98,8 @@ public class KeysSearcher extends SecondaryIndexSearcher
 
 protected Row computeNext()
 {
-int meanColumns = 
Math.max(index.getIndexCfs().getMeanColumns(), 1);
 // We shouldn't fetch only 1 row as this provides buggy paging 
in case the first row doesn't satisfy all clauses
-int rowsPerQuery = Math.max(Math.min(filter.maxRows(), 
filter.maxColumns() / meanColumns), 2);
+int rowsPerQuery = Math.max(Math.min(filter.maxRows(), 
filter.maxColumns()), 2);
 while (true)
 {
 if (indexColumns == null || !indexColumns.hasNext())



[jira] [Commented] (CASSANDRA-10740) Incorrect condition causes cleanup of SSTables which might not need it

2015-11-25 Thread Jakub Janecek (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-10740?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15026562#comment-15026562
 ] 

Jakub Janecek commented on CASSANDRA-10740:
---

[~krummas] I have added a patch with the test. The last test case shows that 
the change actually has some effect. The old implementation would return that 
the SSTable needs a cleanup but my implementation correctly returns false.

> Incorrect condition causes cleanup of SSTables which might not need it
> --
>
> Key: CASSANDRA-10740
> URL: https://issues.apache.org/jira/browse/CASSANDRA-10740
> Project: Cassandra
>  Issue Type: Bug
>Reporter: Jakub Janecek
> Fix For: 2.1.x
>
> Attachments: trunk-10740.txt, trunk-test-10740.txt
>
>
> We needed to perform cleanup of SSTables in our production cluster but found 
> out that it would take several months. Together with my colleague 
> [~JiriHorky] we have pinpointed the issue to method 
> CompactionManager.needsCleanup which incorrectly marks almost all SSTables as 
> the ones needing the cleanup even though that might not be true. I am 
> attaching a patch which should be applicable from version 2.x forward (this 
> is the version we would need it in).
> To explain the problem, the last condition in the cycle that checks whether 
> the next key in the SSTable after the current checked range is NOT contained 
> in the next range falsely marks SSTable as necessary to have cleanup even 
> though it might be contained in some other range. The correct condition 
> (which is actully described in the comment) is to check whether the next key 
> in the SSTable after the current range is less than or equal to the "left" 
> key of the next range (assuming that the left key is exclusive which is 
> described in another comment of the same method).
> Is our patch and reasoning correct?



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[11/15] cassandra git commit: Merge branch 'cassandra-2.2' into cassandra-3.0

2015-11-25 Thread samt
Merge branch 'cassandra-2.2' into cassandra-3.0


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

Branch: refs/heads/cassandra-3.1
Commit: 602f736e2b1585c2bc223ef524fbc7c415b3c6e4
Parents: ae315b5 a907533
Author: Sam Tunnicliffe 
Authored: Wed Nov 25 10:05:02 2015 +
Committer: Sam Tunnicliffe 
Committed: Wed Nov 25 10:05:02 2015 +

--

--




[02/15] cassandra git commit: Make internal paging logic consistent between searcher impls

2015-11-25 Thread samt
Make internal paging logic consistent between searcher impls

Patch by Sam Tunnicliffe; reviewed by Carl Yeksigian for CASSANDRA-10683


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

Branch: refs/heads/cassandra-2.2
Commit: f5a09c125cce2078832c20f35eba3ab43eb5c36b
Parents: f319f0a
Author: Sam Tunnicliffe 
Authored: Tue Nov 10 18:18:45 2015 +
Committer: Sam Tunnicliffe 
Committed: Wed Nov 25 09:29:52 2015 +

--
 CHANGES.txt   | 1 +
 src/java/org/apache/cassandra/db/index/keys/KeysSearcher.java | 3 +--
 2 files changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/f5a09c12/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index c4dd54e..91f4577 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.1.12
+ * Make paging logic consistent between searcher impls (CASSANDRA-10683)
  * Fix CompressedInputStream for proper cleanup (CASSANDRA-10012)
  * (cqlsh) Support counters in COPY commands (CASSANDRA-9043)
  * Try next replica if not possible to connect to primary replica on

http://git-wip-us.apache.org/repos/asf/cassandra/blob/f5a09c12/src/java/org/apache/cassandra/db/index/keys/KeysSearcher.java
--
diff --git a/src/java/org/apache/cassandra/db/index/keys/KeysSearcher.java 
b/src/java/org/apache/cassandra/db/index/keys/KeysSearcher.java
index 634bb0c..4ba636d 100644
--- a/src/java/org/apache/cassandra/db/index/keys/KeysSearcher.java
+++ b/src/java/org/apache/cassandra/db/index/keys/KeysSearcher.java
@@ -98,9 +98,8 @@ public class KeysSearcher extends SecondaryIndexSearcher
 
 protected Row computeNext()
 {
-int meanColumns = 
Math.max(index.getIndexCfs().getMeanColumns(), 1);
 // We shouldn't fetch only 1 row as this provides buggy paging 
in case the first row doesn't satisfy all clauses
-int rowsPerQuery = Math.max(Math.min(filter.maxRows(), 
filter.maxColumns() / meanColumns), 2);
+int rowsPerQuery = Math.max(Math.min(filter.maxRows(), 
filter.maxColumns()), 2);
 while (true)
 {
 if (indexColumns == null || !indexColumns.hasNext())



[12/15] cassandra git commit: Merge branch 'cassandra-2.2' into cassandra-3.0

2015-11-25 Thread samt
Merge branch 'cassandra-2.2' into cassandra-3.0


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

Branch: refs/heads/cassandra-3.0
Commit: 602f736e2b1585c2bc223ef524fbc7c415b3c6e4
Parents: ae315b5 a907533
Author: Sam Tunnicliffe 
Authored: Wed Nov 25 10:05:02 2015 +
Committer: Sam Tunnicliffe 
Committed: Wed Nov 25 10:05:02 2015 +

--

--




[04/15] cassandra git commit: Make internal paging logic consistent between searcher impls

2015-11-25 Thread samt
Make internal paging logic consistent between searcher impls

Patch by Sam Tunnicliffe; reviewed by Carl Yeksigian for CASSANDRA-10683


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

Branch: refs/heads/cassandra-3.0
Commit: f5a09c125cce2078832c20f35eba3ab43eb5c36b
Parents: f319f0a
Author: Sam Tunnicliffe 
Authored: Tue Nov 10 18:18:45 2015 +
Committer: Sam Tunnicliffe 
Committed: Wed Nov 25 09:29:52 2015 +

--
 CHANGES.txt   | 1 +
 src/java/org/apache/cassandra/db/index/keys/KeysSearcher.java | 3 +--
 2 files changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/f5a09c12/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index c4dd54e..91f4577 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.1.12
+ * Make paging logic consistent between searcher impls (CASSANDRA-10683)
  * Fix CompressedInputStream for proper cleanup (CASSANDRA-10012)
  * (cqlsh) Support counters in COPY commands (CASSANDRA-9043)
  * Try next replica if not possible to connect to primary replica on

http://git-wip-us.apache.org/repos/asf/cassandra/blob/f5a09c12/src/java/org/apache/cassandra/db/index/keys/KeysSearcher.java
--
diff --git a/src/java/org/apache/cassandra/db/index/keys/KeysSearcher.java 
b/src/java/org/apache/cassandra/db/index/keys/KeysSearcher.java
index 634bb0c..4ba636d 100644
--- a/src/java/org/apache/cassandra/db/index/keys/KeysSearcher.java
+++ b/src/java/org/apache/cassandra/db/index/keys/KeysSearcher.java
@@ -98,9 +98,8 @@ public class KeysSearcher extends SecondaryIndexSearcher
 
 protected Row computeNext()
 {
-int meanColumns = 
Math.max(index.getIndexCfs().getMeanColumns(), 1);
 // We shouldn't fetch only 1 row as this provides buggy paging 
in case the first row doesn't satisfy all clauses
-int rowsPerQuery = Math.max(Math.min(filter.maxRows(), 
filter.maxColumns() / meanColumns), 2);
+int rowsPerQuery = Math.max(Math.min(filter.maxRows(), 
filter.maxColumns()), 2);
 while (true)
 {
 if (indexColumns == null || !indexColumns.hasNext())



[08/15] cassandra git commit: Merge branch 'cassandra-2.1' into cassandra-2.2

2015-11-25 Thread samt
Merge branch 'cassandra-2.1' into cassandra-2.2


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

Branch: refs/heads/cassandra-3.0
Commit: a9075339227fc689a04977f0b9fa714cbc958f15
Parents: 1142183 f5a09c1
Author: Sam Tunnicliffe 
Authored: Wed Nov 25 10:01:12 2015 +
Committer: Sam Tunnicliffe 
Committed: Wed Nov 25 10:01:12 2015 +

--
 CHANGES.txt   | 1 +
 src/java/org/apache/cassandra/db/index/keys/KeysSearcher.java | 3 +--
 2 files changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/a9075339/CHANGES.txt
--
diff --cc CHANGES.txt
index d11be26,91f4577..a274ea9
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,17 -1,5 +1,18 @@@
 -2.1.12
 +2.2.4
 + * Don't do anticompaction after subrange repair (CASSANDRA-10422)
 + * Fix SimpleDateType type compatibility (CASSANDRA-10027)
 + * (Hadoop) fix splits calculation (CASSANDRA-10640)
 + * (Hadoop) ensure that Cluster instances are always closed (CASSANDRA-10058)
 + * (cqlsh) show partial trace if incomplete after max_trace_wait 
(CASSANDRA-7645)
 + * Use most up-to-date version of schema for system tables (CASSANDRA-10652)
 + * Deprecate memory_allocator in cassandra.yaml (CASSANDRA-10581,10628)
 + * Expose phi values from failure detector via JMX and tweak debug
 +   and trace logging (CASSANDRA-9526)
 + * Fix RangeNamesQueryPager (CASSANDRA-10509)
 + * Deprecate Pig support (CASSANDRA-10542)
 + * Reduce contention getting instances of CompositeType (CASSANDRA-10433)
 +Merged from 2.1:
+  * Make paging logic consistent between searcher impls (CASSANDRA-10683)
   * Fix CompressedInputStream for proper cleanup (CASSANDRA-10012)
   * (cqlsh) Support counters in COPY commands (CASSANDRA-9043)
   * Try next replica if not possible to connect to primary replica on

http://git-wip-us.apache.org/repos/asf/cassandra/blob/a9075339/src/java/org/apache/cassandra/db/index/keys/KeysSearcher.java
--



[10/15] cassandra git commit: Merge branch 'cassandra-2.2' into cassandra-3.0

2015-11-25 Thread samt
Merge branch 'cassandra-2.2' into cassandra-3.0


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

Branch: refs/heads/trunk
Commit: 602f736e2b1585c2bc223ef524fbc7c415b3c6e4
Parents: ae315b5 a907533
Author: Sam Tunnicliffe 
Authored: Wed Nov 25 10:05:02 2015 +
Committer: Sam Tunnicliffe 
Committed: Wed Nov 25 10:05:02 2015 +

--

--




[13/15] cassandra git commit: Merge branch 'cassandra-3.0' into cassandra-3.1

2015-11-25 Thread samt
Merge branch 'cassandra-3.0' into cassandra-3.1


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

Branch: refs/heads/cassandra-3.1
Commit: 8e1b6ea70b16a39c729700ecfc2fb7e406545e5a
Parents: 8feb66e 602f736
Author: Sam Tunnicliffe 
Authored: Wed Nov 25 10:09:23 2015 +
Committer: Sam Tunnicliffe 
Committed: Wed Nov 25 10:09:23 2015 +

--

--




[jira] [Commented] (CASSANDRA-10769) "received out of order wrt DecoratedKey" after scrub

2015-11-25 Thread Mark Curtis (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-10769?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15026585#comment-15026585
 ] 

Mark Curtis commented on CASSANDRA-10769:
-

I've been searching for this error too and I noticed that this pops up in 
CASSANDRA-9133 which is marked as a duplicate of CASSANDRA-9126. However the 
fix is marked as 2.1.x so not 100% sure it would be the same issue, but thought 
it might be worth mentioning

> "received out of order wrt DecoratedKey" after scrub
> 
>
> Key: CASSANDRA-10769
> URL: https://issues.apache.org/jira/browse/CASSANDRA-10769
> Project: Cassandra
>  Issue Type: Bug
> Environment: C* 2.1.11, Debian Wheezy
>Reporter: mlowicki
>
> After running scrub and cleanup on all nodes in single data center I'm 
> getting:
> {code}
> ERROR [ValidationExecutor:103] 2015-11-25 06:28:21,530 Validator.java:245 - 
> Failed creating a merkle tree for [repair 
> #89fa2b70-933d-11e5-b036-75bb514ae072 on sync/entity_by_id2, 
> (-5867793819051725444,-5865919628027816979]], /10.210.3.221 (see log for 
> details)
> ERROR [ValidationExecutor:103] 2015-11-25 06:28:21,531 
> CassandraDaemon.java:227 - Exception in thread 
> Thread[ValidationExecutor:103,1,main]
> java.lang.AssertionError: row DecoratedKey(-5867787467868737053, 
> 000932373633313036313204808800) received out of order wrt 
> DecoratedKey(-5865937851627253360, 000933313230313737333204c3c700)
> at org.apache.cassandra.repair.Validator.add(Validator.java:127) 
> ~[apache-cassandra-2.1.11.jar:2.1.11]
> at 
> org.apache.cassandra.db.compaction.CompactionManager.doValidationCompaction(CompactionManager.java:1010)
>  ~[apache-cassandra-2.1.11.jar:2.1.11]
> at 
> org.apache.cassandra.db.compaction.CompactionManager.access$600(CompactionManager.java:94)
>  ~[apache-cassandra-2.1.11.jar:2.1.11]
> at 
> org.apache.cassandra.db.compaction.CompactionManager$9.call(CompactionManager.java:622)
>  ~[apache-cassandra-2.1.11.jar:2.1.11]
> at java.util.concurrent.FutureTask.run(FutureTask.java:262) 
> ~[na:1.7.0_80]
> at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
>  ~[na:1.7.0_80]
> at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
>  [na:1.7.0_80]
> at java.lang.Thread.run(Thread.java:745) [na:1.7.0_80]
> {code}
> What I did is to run repair on other node:
> {code}
> time nodetool repair --in-local-dc
> {code}
> Corresponding log on the node where repair has been started:
> {code}
> ERROR [AntiEntropySessions:414] 2015-11-25 06:28:21,533 
> RepairSession.java:303 - [repair #89fa2b70-933d-11e5-b036-75bb514ae072] 
> session completed with the following error
> org.apache.cassandra.exceptions.RepairException: [repair 
> #89fa2b70-933d-11e5-b036-75bb514ae072 on sync/entity_by_id2, 
> (-5867793819051725444,-5865919628027816979]] Validation failed in 
> /10.210.3.117
> at 
> org.apache.cassandra.repair.RepairSession.validationComplete(RepairSession.java:166)
>  ~[apache-cassandra-2.1.11.jar:2.1.11]
> at 
> org.apache.cassandra.service.ActiveRepairService.handleMessage(ActiveRepairService.java:406)
>  ~[apache-cassandra-2.1.11.jar:2.1.11]
> at 
> org.apache.cassandra.repair.RepairMessageVerbHandler.doVerb(RepairMessageVerbHandler.java:134)
>  ~[apache-cassandra-2.1.11.jar:2.1.11]
> at 
> org.apache.cassandra.net.MessageDeliveryTask.run(MessageDeliveryTask.java:64) 
> ~[apache-cassandra-2.1.11.jar:2.1.11]
> at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
>  [na:1.7.0_80]
> at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
>  [na:1.7.0_80]
> at java.lang.Thread.run(Thread.java:745) [na:1.7.0_80]
> INFO  [AntiEntropySessions:415] 2015-11-25 06:28:21,533 
> RepairSession.java:260 - [repair #b9458fa0-933d-11e5-b036-75bb514ae072] new 
> session: will sync /10.210.3.221, /10.210.3.118, /10.210.3.117 on range 
> (7119703141488009983,7129744584776466802] for sync.[device_token, entity2, 
> user_stats, user_device, user_quota, user_store, user_device_progress, 
> entity_by_id2]
> ERROR [AntiEntropySessions:414] 2015-11-25 06:28:21,533 
> CassandraDaemon.java:227 - Exception in thread 
> Thread[AntiEntropySessions:414,5,RMI Runtime]
> java.lang.RuntimeException: org.apache.cassandra.exceptions.RepairException: 
> [repair #89fa2b70-933d-11e5-b036-75bb514ae072 on sync/entity_by_id2, 
> (-5867793819051725444,-5865919628027816979]] Validation failed in 
> /10.210.3.117
> at com.google.common.base.Throwables.propagate(Throwables.java:160) 
> ~[guava-16.0.jar:na]
> at 
> org.apache.cassandra.utils.WrappedRunnable.run(WrappedRunnable.java:32) 
> ~[apache-c

[jira] [Updated] (CASSANDRA-10770) Warning TIOStreamTransport.java:112 - Error closing output stream.

2015-11-25 Thread jean carlo rivera ura (JIRA)

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

jean carlo rivera ura updated CASSANDRA-10770:
--
Labels: Thrifth  (was: )

> Warning TIOStreamTransport.java:112 - Error closing output stream.
> --
>
> Key: CASSANDRA-10770
> URL: https://issues.apache.org/jira/browse/CASSANDRA-10770
> Project: Cassandra
>  Issue Type: Bug
> Environment: Cassandra 2.1.11, ubuntu 12.04
>Reporter: jean carlo rivera ura
>Priority: Minor
>  Labels: Thrifth
> Attachments: warning-thrift.txt
>
>
> Hi,  In our cluster cassandra of 6 nodes we are having many times the next 
> warning
> WARN  [Thrift:2477] 2015-11-25 10:06:33,795 TIOStreamTransport.java:112 - 
> Error closing output stream.
> java.net.SocketException: Socket closed
>   at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:116) 
> ~[na:1.8.0_60]
>   at java.net.SocketOutputStream.write(SocketOutputStream.java:153) 
> ~[na:1.8.0_60]
>   at 
> java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:82) 
> ~[na:1.8.0_60]
>   at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:140) 
> ~[na:1.8.0_60]
>   at java.io.FilterOutputStream.close(FilterOutputStream.java:158) 
> ~[na:1.8.0_60]
>   at 
> org.apache.thrift.transport.TIOStreamTransport.close(TIOStreamTransport.java:110)
>  ~[libthrift-0.9.2.jar:0.9.2]
>   at 
> org.apache.cassandra.thrift.TCustomSocket.close(TCustomSocket.java:197) 
> [apache-cassandra-2.1.11.jar:2.1.11]
>   at 
> org.apache.thrift.transport.TFramedTransport.close(TFramedTransport.java:89) 
> [libthrift-0.9.2.jar:0.9.2]
>   at 
> org.apache.cassandra.thrift.CustomTThreadPoolServer$WorkerProcess.run(CustomTThreadPoolServer.java:231)
>  [apache-cassandra-2.1.11.jar:2.1.11]
>   at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
>  [na:1.8.0_60]
>   at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
>  [na:1.8.0_60]
>   at java.lang.Thread.run(Thread.java:745) [na:1.8.0_60]
> We are not able to know why cassandra is closing a socket that was close 
> before. This is hapening mostly when cassandra is having high load of writes.
> Is it that a bug?



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Comment Edited] (CASSANDRA-10760) Counters are erroneously allowed as map key type

2015-11-25 Thread Michael Edge (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-10760?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15026524#comment-15026524
 ] 

Michael Edge edited comment on CASSANDRA-10760 at 11/25/15 10:44 AM:
-

[~iamaleksey], if this is what you're expecting I'll create patches for v2.1 
and v2.2.

{noformat}
cqlsh> create keyspace test with replication = {'class': 'SimpleStrategy', 
'replication_factor': 1};
cqlsh> create table test.test (id int primary key, amap map);
InvalidRequest: code=2200 [Invalid query] message="Counters are not allowed as 
keys inside collections: map"
cqlsh> create table test.test (id int primary key, amap map);
InvalidRequest: code=2200 [Invalid query] message="Counters are not allowed as 
values inside collections: map"

cqlsh:test> create table test.test (id int primary key, alist list);
InvalidRequest: code=2200 [Invalid query] message="Counters are not allowed as 
values inside collections: list"
{noformat}

Note the error message for LIST is the same as for MAP (both refer to 'values 
inside collections'). If this is confusing I'll just remove the 'as values'.

One thing I'm not 100% sure of is whether we allow counters as map keys for 
supercolumns. Seems we do allow counters as map values for supercolumns. If we 
do not allow them as map keys then the {{isInternal}} check in 
{{org/apache/cassandra/cql3/CQL3Type.java}} can be removed (see patch).

{code}
+if (keys.isCounter() && !isInternal)
+throw new InvalidRequestException("Counters are not 
allowed as keys inside collections: " + this);
{code}



was (Author: michaeledge):
[~iamaleksey], if this is what you're expecting I'll create patches for v2.1 
and v2.2.

{noformat}
cqlsh> create keyspace test with replication = {'class': 'SimpleStrategy', 
'replication_factor': 1};
cqlsh> create table test.test (id int primary key, amap map);
InvalidRequest: code=2200 [Invalid query] message="Counters are not allowed as 
keys inside collections: map"
cqlsh> create table test.test (id int primary key, amap map);
InvalidRequest: code=2200 [Invalid query] message="Counters are not allowed as 
values inside collections: map"
{noformat}

One thing I'm not 100% sure of is whether we allow counters as map keys for 
supercolumns. Seems we do allow counters as map values for supercolumns. If we 
do not allow them as map keys then the {{isInternal}} check in 
{{org/apache/cassandra/cql3/CQL3Type.java}} can be removed (see patch).

{code}
+if (keys.isCounter() && !isInternal)
+throw new InvalidRequestException("Counters are not 
allowed as keys inside collections: " + this);
{code}


> Counters are erroneously allowed as map key type
> 
>
> Key: CASSANDRA-10760
> URL: https://issues.apache.org/jira/browse/CASSANDRA-10760
> Project: Cassandra
>  Issue Type: Bug
>  Components: CQL
>Reporter: Aleksey Yeschenko
>Assignee: Michael Edge
>Priority: Minor
>  Labels: cql, cqlsh
> Fix For: 2.1.x, 2.2.x, 3.0.x
>
> Attachments: CASSANDRA-3.0-10760-Counters-in-Maps.patch
>
>
> We do validate collection value types, but not collection key types, which 
> allows counters to be used as map keys:
> {noformat}
> cqlsh> create keyspace test with replication = {'class': 'SimpleStrategy', 
> 'replication_factor': 1};
> cqlsh> use test;
> cqlsh:test> create table test.test (id int primary key, amap map text>);
> cqlsh:test> insert into test.test (id, amap) values (0, {1: '2'});
> cqlsh:test> select * from test.test;
>  id | amap
> +--
>   0 | {1: '2'}
> (1 rows)
> {noformat}
> This should obviously not be allowed and must be rejected.
> /cc [~slebresne]



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CASSANDRA-8505) Invalid results are returned while secondary index are being build

2015-11-25 Thread Benjamin Lerer (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-8505?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15026596#comment-15026596
 ] 

Benjamin Lerer commented on CASSANDRA-8505:
---

{quote}Do you have any thoughts on that?{quote}
It makes sense to me.

I have pushed the fixes for the 2 comments 
[here|https://github.com/apache/cassandra/compare/trunk...blerer:8505-2.2] and 
[here|https://github.com/apache/cassandra/compare/trunk...blerer:8505-3.0].

I fixed the DTest for 
{{secondary_indexes_test.TestSecondaryIndexesOnCollections.test_map_indexes}} 
[here|https://github.com/riptano/cassandra-dtest/pull/685/files]

[~philipthompson], [~mambocab] The changes of this ticket might cause some 
dtests to fail randomly (if a lot of data were inserted before the index was 
created). I had a look at the DTests but I might have missed some. If some 
tests using secondary index start failing once this ticket is committed do not 
hesitate to assign them to me.

> Invalid results are returned while secondary index are being build
> --
>
> Key: CASSANDRA-8505
> URL: https://issues.apache.org/jira/browse/CASSANDRA-8505
> Project: Cassandra
>  Issue Type: Bug
>  Components: Coordination
>Reporter: Benjamin Lerer
>Assignee: Benjamin Lerer
> Fix For: 2.2.x, 3.0.x
>
>
> If you request an index creation and then execute a query that use the index 
> the results returned might be invalid until the index is fully build. This is 
> caused by the fact that the table column will be marked as indexed before the 
> index is ready.
> The following unit tests can be use to reproduce the problem:
> {code}
> @Test
> public void testIndexCreatedAfterInsert() throws Throwable
> {
> createTable("CREATE TABLE %s (a int, b int, c int, primary key((a, 
> b)))");
> execute("INSERT INTO %s (a, b, c) VALUES (0, 0, 0);");
> execute("INSERT INTO %s (a, b, c) VALUES (0, 1, 1);");
> execute("INSERT INTO %s (a, b, c) VALUES (0, 2, 2);");
> execute("INSERT INTO %s (a, b, c) VALUES (1, 0, 3);");
> execute("INSERT INTO %s (a, b, c) VALUES (1, 1, 4);");
> 
> createIndex("CREATE INDEX ON %s(b)");
> 
> assertRows(execute("SELECT * FROM %s WHERE b = ?;", 1),
>row(0, 1, 1),
>row(1, 1, 4));
> }
> 
> @Test
> public void testIndexCreatedBeforeInsert() throws Throwable
> {
> createTable("CREATE TABLE %s (a int, b int, c int, primary key((a, 
> b)))");
> createIndex("CREATE INDEX ON %s(b)");
> 
> execute("INSERT INTO %s (a, b, c) VALUES (0, 0, 0);");
> execute("INSERT INTO %s (a, b, c) VALUES (0, 1, 1);");
> execute("INSERT INTO %s (a, b, c) VALUES (0, 2, 2);");
> execute("INSERT INTO %s (a, b, c) VALUES (1, 0, 3);");
> execute("INSERT INTO %s (a, b, c) VALUES (1, 1, 4);");
> assertRows(execute("SELECT * FROM %s WHERE b = ?;", 1),
>row(0, 1, 1),
>row(1, 1, 4));
> }
> {code}
> The first test will fail while the second will work. 
> In my opinion the first test should reject the request as invalid (as if the 
> index was not existing) until the index is fully build.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CASSANDRA-10769) "received out of order wrt DecoratedKey" after scrub

2015-11-25 Thread mlowicki (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-10769?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15026601#comment-15026601
 ] 

mlowicki commented on CASSANDRA-10769:
--

Yeah, found CASSANDRA-9126 as well but decided to file a separate ticket as 
scrub didn't helped in my case.

> "received out of order wrt DecoratedKey" after scrub
> 
>
> Key: CASSANDRA-10769
> URL: https://issues.apache.org/jira/browse/CASSANDRA-10769
> Project: Cassandra
>  Issue Type: Bug
> Environment: C* 2.1.11, Debian Wheezy
>Reporter: mlowicki
>
> After running scrub and cleanup on all nodes in single data center I'm 
> getting:
> {code}
> ERROR [ValidationExecutor:103] 2015-11-25 06:28:21,530 Validator.java:245 - 
> Failed creating a merkle tree for [repair 
> #89fa2b70-933d-11e5-b036-75bb514ae072 on sync/entity_by_id2, 
> (-5867793819051725444,-5865919628027816979]], /10.210.3.221 (see log for 
> details)
> ERROR [ValidationExecutor:103] 2015-11-25 06:28:21,531 
> CassandraDaemon.java:227 - Exception in thread 
> Thread[ValidationExecutor:103,1,main]
> java.lang.AssertionError: row DecoratedKey(-5867787467868737053, 
> 000932373633313036313204808800) received out of order wrt 
> DecoratedKey(-5865937851627253360, 000933313230313737333204c3c700)
> at org.apache.cassandra.repair.Validator.add(Validator.java:127) 
> ~[apache-cassandra-2.1.11.jar:2.1.11]
> at 
> org.apache.cassandra.db.compaction.CompactionManager.doValidationCompaction(CompactionManager.java:1010)
>  ~[apache-cassandra-2.1.11.jar:2.1.11]
> at 
> org.apache.cassandra.db.compaction.CompactionManager.access$600(CompactionManager.java:94)
>  ~[apache-cassandra-2.1.11.jar:2.1.11]
> at 
> org.apache.cassandra.db.compaction.CompactionManager$9.call(CompactionManager.java:622)
>  ~[apache-cassandra-2.1.11.jar:2.1.11]
> at java.util.concurrent.FutureTask.run(FutureTask.java:262) 
> ~[na:1.7.0_80]
> at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
>  ~[na:1.7.0_80]
> at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
>  [na:1.7.0_80]
> at java.lang.Thread.run(Thread.java:745) [na:1.7.0_80]
> {code}
> What I did is to run repair on other node:
> {code}
> time nodetool repair --in-local-dc
> {code}
> Corresponding log on the node where repair has been started:
> {code}
> ERROR [AntiEntropySessions:414] 2015-11-25 06:28:21,533 
> RepairSession.java:303 - [repair #89fa2b70-933d-11e5-b036-75bb514ae072] 
> session completed with the following error
> org.apache.cassandra.exceptions.RepairException: [repair 
> #89fa2b70-933d-11e5-b036-75bb514ae072 on sync/entity_by_id2, 
> (-5867793819051725444,-5865919628027816979]] Validation failed in 
> /10.210.3.117
> at 
> org.apache.cassandra.repair.RepairSession.validationComplete(RepairSession.java:166)
>  ~[apache-cassandra-2.1.11.jar:2.1.11]
> at 
> org.apache.cassandra.service.ActiveRepairService.handleMessage(ActiveRepairService.java:406)
>  ~[apache-cassandra-2.1.11.jar:2.1.11]
> at 
> org.apache.cassandra.repair.RepairMessageVerbHandler.doVerb(RepairMessageVerbHandler.java:134)
>  ~[apache-cassandra-2.1.11.jar:2.1.11]
> at 
> org.apache.cassandra.net.MessageDeliveryTask.run(MessageDeliveryTask.java:64) 
> ~[apache-cassandra-2.1.11.jar:2.1.11]
> at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
>  [na:1.7.0_80]
> at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
>  [na:1.7.0_80]
> at java.lang.Thread.run(Thread.java:745) [na:1.7.0_80]
> INFO  [AntiEntropySessions:415] 2015-11-25 06:28:21,533 
> RepairSession.java:260 - [repair #b9458fa0-933d-11e5-b036-75bb514ae072] new 
> session: will sync /10.210.3.221, /10.210.3.118, /10.210.3.117 on range 
> (7119703141488009983,7129744584776466802] for sync.[device_token, entity2, 
> user_stats, user_device, user_quota, user_store, user_device_progress, 
> entity_by_id2]
> ERROR [AntiEntropySessions:414] 2015-11-25 06:28:21,533 
> CassandraDaemon.java:227 - Exception in thread 
> Thread[AntiEntropySessions:414,5,RMI Runtime]
> java.lang.RuntimeException: org.apache.cassandra.exceptions.RepairException: 
> [repair #89fa2b70-933d-11e5-b036-75bb514ae072 on sync/entity_by_id2, 
> (-5867793819051725444,-5865919628027816979]] Validation failed in 
> /10.210.3.117
> at com.google.common.base.Throwables.propagate(Throwables.java:160) 
> ~[guava-16.0.jar:na]
> at 
> org.apache.cassandra.utils.WrappedRunnable.run(WrappedRunnable.java:32) 
> ~[apache-cassandra-2.1.11.jar:2.1.11]
> at 
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) 
> ~[na:1.7.0_80]
> at java.util.con

[jira] [Updated] (CASSANDRA-10769) "received out of order wrt DecoratedKey" after scrub

2015-11-25 Thread mlowicki (JIRA)

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

mlowicki updated CASSANDRA-10769:
-
Reproduced In: 2.1.11

> "received out of order wrt DecoratedKey" after scrub
> 
>
> Key: CASSANDRA-10769
> URL: https://issues.apache.org/jira/browse/CASSANDRA-10769
> Project: Cassandra
>  Issue Type: Bug
> Environment: C* 2.1.11, Debian Wheezy
>Reporter: mlowicki
>
> After running scrub and cleanup on all nodes in single data center I'm 
> getting:
> {code}
> ERROR [ValidationExecutor:103] 2015-11-25 06:28:21,530 Validator.java:245 - 
> Failed creating a merkle tree for [repair 
> #89fa2b70-933d-11e5-b036-75bb514ae072 on sync/entity_by_id2, 
> (-5867793819051725444,-5865919628027816979]], /10.210.3.221 (see log for 
> details)
> ERROR [ValidationExecutor:103] 2015-11-25 06:28:21,531 
> CassandraDaemon.java:227 - Exception in thread 
> Thread[ValidationExecutor:103,1,main]
> java.lang.AssertionError: row DecoratedKey(-5867787467868737053, 
> 000932373633313036313204808800) received out of order wrt 
> DecoratedKey(-5865937851627253360, 000933313230313737333204c3c700)
> at org.apache.cassandra.repair.Validator.add(Validator.java:127) 
> ~[apache-cassandra-2.1.11.jar:2.1.11]
> at 
> org.apache.cassandra.db.compaction.CompactionManager.doValidationCompaction(CompactionManager.java:1010)
>  ~[apache-cassandra-2.1.11.jar:2.1.11]
> at 
> org.apache.cassandra.db.compaction.CompactionManager.access$600(CompactionManager.java:94)
>  ~[apache-cassandra-2.1.11.jar:2.1.11]
> at 
> org.apache.cassandra.db.compaction.CompactionManager$9.call(CompactionManager.java:622)
>  ~[apache-cassandra-2.1.11.jar:2.1.11]
> at java.util.concurrent.FutureTask.run(FutureTask.java:262) 
> ~[na:1.7.0_80]
> at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
>  ~[na:1.7.0_80]
> at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
>  [na:1.7.0_80]
> at java.lang.Thread.run(Thread.java:745) [na:1.7.0_80]
> {code}
> What I did is to run repair on other node:
> {code}
> time nodetool repair --in-local-dc
> {code}
> Corresponding log on the node where repair has been started:
> {code}
> ERROR [AntiEntropySessions:414] 2015-11-25 06:28:21,533 
> RepairSession.java:303 - [repair #89fa2b70-933d-11e5-b036-75bb514ae072] 
> session completed with the following error
> org.apache.cassandra.exceptions.RepairException: [repair 
> #89fa2b70-933d-11e5-b036-75bb514ae072 on sync/entity_by_id2, 
> (-5867793819051725444,-5865919628027816979]] Validation failed in 
> /10.210.3.117
> at 
> org.apache.cassandra.repair.RepairSession.validationComplete(RepairSession.java:166)
>  ~[apache-cassandra-2.1.11.jar:2.1.11]
> at 
> org.apache.cassandra.service.ActiveRepairService.handleMessage(ActiveRepairService.java:406)
>  ~[apache-cassandra-2.1.11.jar:2.1.11]
> at 
> org.apache.cassandra.repair.RepairMessageVerbHandler.doVerb(RepairMessageVerbHandler.java:134)
>  ~[apache-cassandra-2.1.11.jar:2.1.11]
> at 
> org.apache.cassandra.net.MessageDeliveryTask.run(MessageDeliveryTask.java:64) 
> ~[apache-cassandra-2.1.11.jar:2.1.11]
> at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
>  [na:1.7.0_80]
> at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
>  [na:1.7.0_80]
> at java.lang.Thread.run(Thread.java:745) [na:1.7.0_80]
> INFO  [AntiEntropySessions:415] 2015-11-25 06:28:21,533 
> RepairSession.java:260 - [repair #b9458fa0-933d-11e5-b036-75bb514ae072] new 
> session: will sync /10.210.3.221, /10.210.3.118, /10.210.3.117 on range 
> (7119703141488009983,7129744584776466802] for sync.[device_token, entity2, 
> user_stats, user_device, user_quota, user_store, user_device_progress, 
> entity_by_id2]
> ERROR [AntiEntropySessions:414] 2015-11-25 06:28:21,533 
> CassandraDaemon.java:227 - Exception in thread 
> Thread[AntiEntropySessions:414,5,RMI Runtime]
> java.lang.RuntimeException: org.apache.cassandra.exceptions.RepairException: 
> [repair #89fa2b70-933d-11e5-b036-75bb514ae072 on sync/entity_by_id2, 
> (-5867793819051725444,-5865919628027816979]] Validation failed in 
> /10.210.3.117
> at com.google.common.base.Throwables.propagate(Throwables.java:160) 
> ~[guava-16.0.jar:na]
> at 
> org.apache.cassandra.utils.WrappedRunnable.run(WrappedRunnable.java:32) 
> ~[apache-cassandra-2.1.11.jar:2.1.11]
> at 
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) 
> ~[na:1.7.0_80]
> at java.util.concurrent.FutureTask.run(FutureTask.java:262) 
> ~[na:1.7.0_80]
> at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExe

[jira] [Commented] (CASSANDRA-10769) "received out of order wrt DecoratedKey" after scrub

2015-11-25 Thread Mark Curtis (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-10769?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15026651#comment-15026651
 ] 

Mark Curtis commented on CASSANDRA-10769:
-

[~mlowicki] Can I ask what errors your were hitting that preceded the need to 
run scrub?

> "received out of order wrt DecoratedKey" after scrub
> 
>
> Key: CASSANDRA-10769
> URL: https://issues.apache.org/jira/browse/CASSANDRA-10769
> Project: Cassandra
>  Issue Type: Bug
> Environment: C* 2.1.11, Debian Wheezy
>Reporter: mlowicki
>
> After running scrub and cleanup on all nodes in single data center I'm 
> getting:
> {code}
> ERROR [ValidationExecutor:103] 2015-11-25 06:28:21,530 Validator.java:245 - 
> Failed creating a merkle tree for [repair 
> #89fa2b70-933d-11e5-b036-75bb514ae072 on sync/entity_by_id2, 
> (-5867793819051725444,-5865919628027816979]], /10.210.3.221 (see log for 
> details)
> ERROR [ValidationExecutor:103] 2015-11-25 06:28:21,531 
> CassandraDaemon.java:227 - Exception in thread 
> Thread[ValidationExecutor:103,1,main]
> java.lang.AssertionError: row DecoratedKey(-5867787467868737053, 
> 000932373633313036313204808800) received out of order wrt 
> DecoratedKey(-5865937851627253360, 000933313230313737333204c3c700)
> at org.apache.cassandra.repair.Validator.add(Validator.java:127) 
> ~[apache-cassandra-2.1.11.jar:2.1.11]
> at 
> org.apache.cassandra.db.compaction.CompactionManager.doValidationCompaction(CompactionManager.java:1010)
>  ~[apache-cassandra-2.1.11.jar:2.1.11]
> at 
> org.apache.cassandra.db.compaction.CompactionManager.access$600(CompactionManager.java:94)
>  ~[apache-cassandra-2.1.11.jar:2.1.11]
> at 
> org.apache.cassandra.db.compaction.CompactionManager$9.call(CompactionManager.java:622)
>  ~[apache-cassandra-2.1.11.jar:2.1.11]
> at java.util.concurrent.FutureTask.run(FutureTask.java:262) 
> ~[na:1.7.0_80]
> at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
>  ~[na:1.7.0_80]
> at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
>  [na:1.7.0_80]
> at java.lang.Thread.run(Thread.java:745) [na:1.7.0_80]
> {code}
> What I did is to run repair on other node:
> {code}
> time nodetool repair --in-local-dc
> {code}
> Corresponding log on the node where repair has been started:
> {code}
> ERROR [AntiEntropySessions:414] 2015-11-25 06:28:21,533 
> RepairSession.java:303 - [repair #89fa2b70-933d-11e5-b036-75bb514ae072] 
> session completed with the following error
> org.apache.cassandra.exceptions.RepairException: [repair 
> #89fa2b70-933d-11e5-b036-75bb514ae072 on sync/entity_by_id2, 
> (-5867793819051725444,-5865919628027816979]] Validation failed in 
> /10.210.3.117
> at 
> org.apache.cassandra.repair.RepairSession.validationComplete(RepairSession.java:166)
>  ~[apache-cassandra-2.1.11.jar:2.1.11]
> at 
> org.apache.cassandra.service.ActiveRepairService.handleMessage(ActiveRepairService.java:406)
>  ~[apache-cassandra-2.1.11.jar:2.1.11]
> at 
> org.apache.cassandra.repair.RepairMessageVerbHandler.doVerb(RepairMessageVerbHandler.java:134)
>  ~[apache-cassandra-2.1.11.jar:2.1.11]
> at 
> org.apache.cassandra.net.MessageDeliveryTask.run(MessageDeliveryTask.java:64) 
> ~[apache-cassandra-2.1.11.jar:2.1.11]
> at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
>  [na:1.7.0_80]
> at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
>  [na:1.7.0_80]
> at java.lang.Thread.run(Thread.java:745) [na:1.7.0_80]
> INFO  [AntiEntropySessions:415] 2015-11-25 06:28:21,533 
> RepairSession.java:260 - [repair #b9458fa0-933d-11e5-b036-75bb514ae072] new 
> session: will sync /10.210.3.221, /10.210.3.118, /10.210.3.117 on range 
> (7119703141488009983,7129744584776466802] for sync.[device_token, entity2, 
> user_stats, user_device, user_quota, user_store, user_device_progress, 
> entity_by_id2]
> ERROR [AntiEntropySessions:414] 2015-11-25 06:28:21,533 
> CassandraDaemon.java:227 - Exception in thread 
> Thread[AntiEntropySessions:414,5,RMI Runtime]
> java.lang.RuntimeException: org.apache.cassandra.exceptions.RepairException: 
> [repair #89fa2b70-933d-11e5-b036-75bb514ae072 on sync/entity_by_id2, 
> (-5867793819051725444,-5865919628027816979]] Validation failed in 
> /10.210.3.117
> at com.google.common.base.Throwables.propagate(Throwables.java:160) 
> ~[guava-16.0.jar:na]
> at 
> org.apache.cassandra.utils.WrappedRunnable.run(WrappedRunnable.java:32) 
> ~[apache-cassandra-2.1.11.jar:2.1.11]
> at 
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) 
> ~[na:1.7.0_80]
> at java.util.concurrent.Futur

[jira] [Commented] (CASSANDRA-10769) "received out of order wrt DecoratedKey" after scrub

2015-11-25 Thread mlowicki (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-10769?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15026657#comment-15026657
 ] 

mlowicki commented on CASSANDRA-10769:
--

I'm struggling with CASSANDRA-9935.

> "received out of order wrt DecoratedKey" after scrub
> 
>
> Key: CASSANDRA-10769
> URL: https://issues.apache.org/jira/browse/CASSANDRA-10769
> Project: Cassandra
>  Issue Type: Bug
> Environment: C* 2.1.11, Debian Wheezy
>Reporter: mlowicki
>
> After running scrub and cleanup on all nodes in single data center I'm 
> getting:
> {code}
> ERROR [ValidationExecutor:103] 2015-11-25 06:28:21,530 Validator.java:245 - 
> Failed creating a merkle tree for [repair 
> #89fa2b70-933d-11e5-b036-75bb514ae072 on sync/entity_by_id2, 
> (-5867793819051725444,-5865919628027816979]], /10.210.3.221 (see log for 
> details)
> ERROR [ValidationExecutor:103] 2015-11-25 06:28:21,531 
> CassandraDaemon.java:227 - Exception in thread 
> Thread[ValidationExecutor:103,1,main]
> java.lang.AssertionError: row DecoratedKey(-5867787467868737053, 
> 000932373633313036313204808800) received out of order wrt 
> DecoratedKey(-5865937851627253360, 000933313230313737333204c3c700)
> at org.apache.cassandra.repair.Validator.add(Validator.java:127) 
> ~[apache-cassandra-2.1.11.jar:2.1.11]
> at 
> org.apache.cassandra.db.compaction.CompactionManager.doValidationCompaction(CompactionManager.java:1010)
>  ~[apache-cassandra-2.1.11.jar:2.1.11]
> at 
> org.apache.cassandra.db.compaction.CompactionManager.access$600(CompactionManager.java:94)
>  ~[apache-cassandra-2.1.11.jar:2.1.11]
> at 
> org.apache.cassandra.db.compaction.CompactionManager$9.call(CompactionManager.java:622)
>  ~[apache-cassandra-2.1.11.jar:2.1.11]
> at java.util.concurrent.FutureTask.run(FutureTask.java:262) 
> ~[na:1.7.0_80]
> at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
>  ~[na:1.7.0_80]
> at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
>  [na:1.7.0_80]
> at java.lang.Thread.run(Thread.java:745) [na:1.7.0_80]
> {code}
> What I did is to run repair on other node:
> {code}
> time nodetool repair --in-local-dc
> {code}
> Corresponding log on the node where repair has been started:
> {code}
> ERROR [AntiEntropySessions:414] 2015-11-25 06:28:21,533 
> RepairSession.java:303 - [repair #89fa2b70-933d-11e5-b036-75bb514ae072] 
> session completed with the following error
> org.apache.cassandra.exceptions.RepairException: [repair 
> #89fa2b70-933d-11e5-b036-75bb514ae072 on sync/entity_by_id2, 
> (-5867793819051725444,-5865919628027816979]] Validation failed in 
> /10.210.3.117
> at 
> org.apache.cassandra.repair.RepairSession.validationComplete(RepairSession.java:166)
>  ~[apache-cassandra-2.1.11.jar:2.1.11]
> at 
> org.apache.cassandra.service.ActiveRepairService.handleMessage(ActiveRepairService.java:406)
>  ~[apache-cassandra-2.1.11.jar:2.1.11]
> at 
> org.apache.cassandra.repair.RepairMessageVerbHandler.doVerb(RepairMessageVerbHandler.java:134)
>  ~[apache-cassandra-2.1.11.jar:2.1.11]
> at 
> org.apache.cassandra.net.MessageDeliveryTask.run(MessageDeliveryTask.java:64) 
> ~[apache-cassandra-2.1.11.jar:2.1.11]
> at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
>  [na:1.7.0_80]
> at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
>  [na:1.7.0_80]
> at java.lang.Thread.run(Thread.java:745) [na:1.7.0_80]
> INFO  [AntiEntropySessions:415] 2015-11-25 06:28:21,533 
> RepairSession.java:260 - [repair #b9458fa0-933d-11e5-b036-75bb514ae072] new 
> session: will sync /10.210.3.221, /10.210.3.118, /10.210.3.117 on range 
> (7119703141488009983,7129744584776466802] for sync.[device_token, entity2, 
> user_stats, user_device, user_quota, user_store, user_device_progress, 
> entity_by_id2]
> ERROR [AntiEntropySessions:414] 2015-11-25 06:28:21,533 
> CassandraDaemon.java:227 - Exception in thread 
> Thread[AntiEntropySessions:414,5,RMI Runtime]
> java.lang.RuntimeException: org.apache.cassandra.exceptions.RepairException: 
> [repair #89fa2b70-933d-11e5-b036-75bb514ae072 on sync/entity_by_id2, 
> (-5867793819051725444,-5865919628027816979]] Validation failed in 
> /10.210.3.117
> at com.google.common.base.Throwables.propagate(Throwables.java:160) 
> ~[guava-16.0.jar:na]
> at 
> org.apache.cassandra.utils.WrappedRunnable.run(WrappedRunnable.java:32) 
> ~[apache-cassandra-2.1.11.jar:2.1.11]
> at 
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) 
> ~[na:1.7.0_80]
> at java.util.concurrent.FutureTask.run(FutureTask.java:262) 
> ~[na:1.7.0_80]
> a

[jira] [Updated] (CASSANDRA-9126) java.lang.RuntimeException: Last written key DecoratedKey >= current key DecoratedKey

2015-11-25 Thread Marcus Eriksson (JIRA)

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

Marcus Eriksson updated CASSANDRA-9126:
---
Fix Version/s: (was: 2.1.x)

> java.lang.RuntimeException: Last written key DecoratedKey >= current key 
> DecoratedKey
> -
>
> Key: CASSANDRA-9126
> URL: https://issues.apache.org/jira/browse/CASSANDRA-9126
> Project: Cassandra
>  Issue Type: Bug
>Reporter: srinivasu gottipati
>Priority: Critical
> Attachments: cassandra-system.log
>
>
> Cassandra V: 2.0.14,
> Getting the following exceptions while trying to compact (I see this issue 
> was raised in earlier versions and marked as closed. However it still appears 
> in 2.0.14). In our case, compaction is not getting succeeded and keep failing 
> with this error.:
> {code}java.lang.RuntimeException: Last written key 
> DecoratedKey(3462767860784856708, 
> 354038323137333038305f3330325f31355f474d4543454f) >= current key 
> DecoratedKey(3462334604624154281, 
> 354036333036353334315f3336315f31355f474d4543454f) writing into {code}
> ...
> Stacktrace:{code}
>   at 
> org.apache.cassandra.io.sstable.SSTableWriter.beforeAppend(SSTableWriter.java:143)
>   at 
> org.apache.cassandra.io.sstable.SSTableWriter.append(SSTableWriter.java:166)
>   at 
> org.apache.cassandra.db.compaction.CompactionTask.runMayThrow(CompactionTask.java:167)
>   at 
> org.apache.cassandra.utils.WrappedRunnable.run(WrappedRunnable.java:28)
>   at 
> org.apache.cassandra.db.compaction.CompactionTask.executeInternal(CompactionTask.java:60)
>   at 
> org.apache.cassandra.db.compaction.AbstractCompactionTask.execute(AbstractCompactionTask.java:59)
>   at 
> org.apache.cassandra.db.compaction.CompactionManager$BackgroundCompactionTask.run(CompactionManager.java:198)
>   at 
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
>   at java.util.concurrent.FutureTask.run(FutureTask.java:266)
>   at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
>   at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
>   at java.lang.Thread.run(Thread.java:745){code}
> Any help is greatly appreciated



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CASSANDRA-10740) Incorrect condition causes cleanup of SSTables which might not need it

2015-11-25 Thread Marcus Eriksson (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-10740?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15026746#comment-15026746
 ] 

Marcus Eriksson commented on CASSANDRA-10740:
-

Thanks!

This looks good to me - moved the test into CleanupTest (made needsCleanup 
public with @VisibleForTesting)

pushed to github to get a clean CI run before committing:
||branch||testall||dtest||
|[jakub/10740|https://github.com/krummas/cassandra/tree/jakub/10740]|[testall|http://cassci.datastax.com/view/Dev/view/krummas/job/krummas-jakub-10740-testall]|[dtest|http://cassci.datastax.com/view/Dev/view/krummas/job/krummas-jakub-10740-dtest]|
|[jakub/10740-2.2|https://github.com/krummas/cassandra/tree/jakub/10740-2.2]|[testall|http://cassci.datastax.com/view/Dev/view/krummas/job/krummas-jakub-10740-2.2-testall]|[dtest|http://cassci.datastax.com/view/Dev/view/krummas/job/krummas-jakub-10740-2.2-dtest]|
|[jakub/10740-3.0|https://github.com/krummas/cassandra/tree/jakub/10740-3.0]|[testall|http://cassci.datastax.com/view/Dev/view/krummas/job/krummas-jakub-10740-3.0-testall]|[dtest|http://cassci.datastax.com/view/Dev/view/krummas/job/krummas-jakub-10740-3.0-dtest]|
|[jakub/10740-3.1|https://github.com/krummas/cassandra/tree/jakub/10740-3.1]|[testall|http://cassci.datastax.com/view/Dev/view/krummas/job/krummas-jakub-10740-3.1-testall]|[dtest|http://cassci.datastax.com/view/Dev/view/krummas/job/krummas-jakub-10740-3.1-dtest]|
|[jakub/10740-trunk|https://github.com/krummas/cassandra/tree/jakub/10740-trunk]|[testall|http://cassci.datastax.com/view/Dev/view/krummas/job/krummas-jakub-10740-trunk-testall]|[dtest|http://cassci.datastax.com/view/Dev/view/krummas/job/krummas-jakub-10740-trunk-dtest]|


> Incorrect condition causes cleanup of SSTables which might not need it
> --
>
> Key: CASSANDRA-10740
> URL: https://issues.apache.org/jira/browse/CASSANDRA-10740
> Project: Cassandra
>  Issue Type: Bug
>Reporter: Jakub Janecek
> Fix For: 2.1.x
>
> Attachments: trunk-10740.txt, trunk-test-10740.txt
>
>
> We needed to perform cleanup of SSTables in our production cluster but found 
> out that it would take several months. Together with my colleague 
> [~JiriHorky] we have pinpointed the issue to method 
> CompactionManager.needsCleanup which incorrectly marks almost all SSTables as 
> the ones needing the cleanup even though that might not be true. I am 
> attaching a patch which should be applicable from version 2.x forward (this 
> is the version we would need it in).
> To explain the problem, the last condition in the cycle that checks whether 
> the next key in the SSTable after the current checked range is NOT contained 
> in the next range falsely marks SSTable as necessary to have cleanup even 
> though it might be contained in some other range. The correct condition 
> (which is actully described in the comment) is to check whether the next key 
> in the SSTable after the current range is less than or equal to the "left" 
> key of the next range (assuming that the left key is exclusive which is 
> described in another comment of the same method).
> Is our patch and reasoning correct?



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CASSANDRA-7910) wildcard prepared statements are incorrect after a column is added to the table

2015-11-25 Thread Olivier Michallat (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-7910?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15026795#comment-15026795
 ] 

Olivier Michallat commented on CASSANDRA-7910:
--

There's still an issue if multiple clients are connected to the same host. The 
first client to execute the query after the cache was invalidated will receive 
an UNPREPARED response, re-prepare, and update its local metadata. But other 
clients might miss it entirely (the MD5 hasn't changed), and they will keep 
using their old metadata.

> wildcard prepared statements are incorrect after a column is added to the 
> table
> ---
>
> Key: CASSANDRA-7910
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7910
> Project: Cassandra
>  Issue Type: Bug
>Reporter: Oded Peer
>Assignee: Tyler Hobbs
>Priority: Minor
>  Labels: client-impacting
> Fix For: 2.1.3
>
> Attachments: 7910-2.1.txt, 7910-trunk.txt, 
> PreparedStatementAfterAddColumnTest.java
>
>
> 1. Prepare a statement with a wildcard in the select clause.
> 2. Alter the table - add a column
> 3. execute the prepared statement
> Expected result - get all the columns including the new column
> Actual result - get the columns except the new column
> Attached a test using cassandra-unit



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CASSANDRA-9991) Implement efficient btree removal

2015-11-25 Thread Branimir Lambov (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-9991?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15026807#comment-15026807
 ] 

Branimir Lambov commented on CASSANDRA-9991:


Thanks, I think the code is much easier to understand now.

Performance-wise, I still think you can improve significantly on the number of 
costly comparisons if you switch to working with indices. You are currently 
doing three passes over the tree using binary searches with the provided 
comparator (and the second version increases that number). That can be reduced 
that to just one {{findIndex}} pass, where the later stages of the processing 
do integer searches (see {{BTree.findByIndex}}).

bq. About the random test - I don't think it's a good idea to create a random 
unit tests. The fundamental attribute of unit test is its repeatability. Is 
there any convention in Cassandra how to create a randomized fuzzy tests?

The test can have a fixed seed, and just be something that's large enough, 
hopefully covering scenarios that we did not think of. For example,
{code}
@Test
public void randomizedTest()
{
Random rand = new Random(2);
SortedSet data = new TreeSet<>();
for (int i = 0; i < 1000; ++i)
data.add(rand.nextInt());
Object[] btree = BTree.build(data, UpdateFunction.noOp());

assertTrue(BTree.isWellFormed(btree, CMP));
assertTrue(Iterables.elementsEqual(data, BTree.iterable(btree)));
while (btree != BTree.empty())
{
int idx = rand.nextInt(BTree.size(btree));
Integer val = BTree.findByIndex(btree, idx);
assertTrue(data.remove(val));
Object[] next = BTreeRemoval.remove(btree, CMP, val);
assertTrue(next != btree);
assertTrue(BTree.isWellFormed(next, CMP));
assertTrue(Iterables.elementsEqual(data, BTree.iterable(next)));
btree = next;
}
}
{code}
which currently fails an {{isWellFormed}} test.

bq. Bottom up was messier

Thank you, I thought you probably already tried it and wanted to hear why it 
didn't work out.


> Implement efficient btree removal
> -
>
> Key: CASSANDRA-9991
> URL: https://issues.apache.org/jira/browse/CASSANDRA-9991
> Project: Cassandra
>  Issue Type: Sub-task
>Reporter: Benedict
>  Labels: patch
> Fix For: 3.x
>
> Attachments: trunk-9991.txt, trunk-9991.txt-v2
>
>
> Currently removal is implemented as a reconstruction by filtering and 
> iterator over the original btree. This could be much more efficient, editing 
> just the necessary nodes. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


cassandra git commit: For CASSANDRA-7217, have stress calculate maximum # of pending requests based on thread count and allow manually specifying max pending requests per connection as well as # of co

2015-11-25 Thread jake
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-3.0 602f736e2 -> a0076e70e


For CASSANDRA-7217, have stress calculate maximum # of pending requests based 
on thread count and allow manually specifying max pending requests per 
connection as well as # of connections

patch by Ariel Weisberg; reviewed by tjake for CASSANDRA-7217


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

Branch: refs/heads/cassandra-3.0
Commit: a0076e70eed5501ac9d8c3ff41ce8018710a1585
Parents: 602f736
Author: Ariel Weisberg 
Authored: Tue Nov 17 13:22:55 2015 -0500
Committer: T Jake Luciani 
Committed: Wed Nov 25 09:02:02 2015 -0500

--
 CHANGES.txt |  1 +
 .../cassandra/stress/settings/SettingsMode.java | 22 +
 .../cassandra/stress/util/JavaDriverClient.java | 26 +---
 3 files changed, 40 insertions(+), 9 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/a0076e70/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 116d4c3..513e682 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 3.0.1
+ * Improve stress performance over 1k threads (CASSANDRA-7217)
  * Wait for migration responses to complete before bootstrapping 
(CASSANDRA-10731)
  * Unable to create a function with argument of type Inet (CASSANDRA-10741)
  * Fix backward incompatibiliy in CqlInputFormat (CASSANDRA-10717)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/a0076e70/tools/stress/src/org/apache/cassandra/stress/settings/SettingsMode.java
--
diff --git 
a/tools/stress/src/org/apache/cassandra/stress/settings/SettingsMode.java 
b/tools/stress/src/org/apache/cassandra/stress/settings/SettingsMode.java
index 2c91b6d..699f10e 100644
--- a/tools/stress/src/org/apache/cassandra/stress/settings/SettingsMode.java
+++ b/tools/stress/src/org/apache/cassandra/stress/settings/SettingsMode.java
@@ -1,6 +1,6 @@
 package org.apache.cassandra.stress.settings;
 /*
- * 
+ *
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -8,16 +8,16 @@ package org.apache.cassandra.stress.settings;
  * to you under the Apache License, Version 2.0 (the
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
- * 
+ *
  *   http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- * 
+ *
  */
 
 
@@ -42,6 +42,9 @@ public class SettingsMode implements Serializable
 public final String authProviderClassname;
 public final AuthProvider authProvider;
 
+public final Integer maxPendingPerConnection;
+public final Integer connectionsPerHost;
+
 private final String compression;
 
 public SettingsMode(GroupedOptions options)
@@ -55,6 +58,8 @@ public class SettingsMode implements Serializable
 compression = 
ProtocolOptions.Compression.valueOf(opts.useCompression.value().toUpperCase()).name();
 username = opts.user.value();
 password = opts.password.value();
+maxPendingPerConnection = 
opts.maxPendingPerConnection.value().isEmpty() ? null : 
Integer.valueOf(opts.maxPendingPerConnection.value());
+connectionsPerHost = opts.connectionsPerHost.value().isEmpty() ? 
null : Integer.valueOf(opts.connectionsPerHost.value());
 authProviderClassname = opts.authProvider.value();
 if (authProviderClassname != null)
 {
@@ -94,6 +99,8 @@ public class SettingsMode implements Serializable
 password = null;
 authProvider = null;
 authProviderClassname = null;
+maxPendingPerConnection = null;
+connectionsPerHost = null;
 }
 else if (options instanceof ThriftOptions)
 {
@@ -106,6 +113,8 @@ public class SettingsMode implements Serializable
 password = opts.password.value();
 authProviderClassname = null;
 authProvider = null;
+maxPendingPerConnection = null;
+connectionsPerHost = null;
 }
 else
 throw new 

[2/2] cassandra git commit: Merge branch 'cassandra-3.0' into cassandra-3.1

2015-11-25 Thread jake
Merge branch 'cassandra-3.0' into cassandra-3.1

Conflicts:
CHANGES.txt


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

Branch: refs/heads/cassandra-3.1
Commit: af089f6fff9bc9587f6467a50ae6ad1634040193
Parents: 8e1b6ea a0076e7
Author: T Jake Luciani 
Authored: Wed Nov 25 09:04:29 2015 -0500
Committer: T Jake Luciani 
Committed: Wed Nov 25 09:04:29 2015 -0500

--
 CHANGES.txt |  1 +
 .../cassandra/stress/settings/SettingsMode.java | 22 +
 .../cassandra/stress/util/JavaDriverClient.java | 26 +---
 3 files changed, 40 insertions(+), 9 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/af089f6f/CHANGES.txt
--
diff --cc CHANGES.txt
index 75922bf,513e682..9f6a027
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,5 -1,5 +1,6 @@@
 -3.0.1
 +3.1
 +Merged from 3.0:
+  * Improve stress performance over 1k threads (CASSANDRA-7217)
   * Wait for migration responses to complete before bootstrapping 
(CASSANDRA-10731)
   * Unable to create a function with argument of type Inet (CASSANDRA-10741)
   * Fix backward incompatibiliy in CqlInputFormat (CASSANDRA-10717)



[2/3] cassandra git commit: Merge branch 'cassandra-3.0' into cassandra-3.1

2015-11-25 Thread jake
Merge branch 'cassandra-3.0' into cassandra-3.1

Conflicts:
CHANGES.txt


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

Branch: refs/heads/trunk
Commit: af089f6fff9bc9587f6467a50ae6ad1634040193
Parents: 8e1b6ea a0076e7
Author: T Jake Luciani 
Authored: Wed Nov 25 09:04:29 2015 -0500
Committer: T Jake Luciani 
Committed: Wed Nov 25 09:04:29 2015 -0500

--
 CHANGES.txt |  1 +
 .../cassandra/stress/settings/SettingsMode.java | 22 +
 .../cassandra/stress/util/JavaDriverClient.java | 26 +---
 3 files changed, 40 insertions(+), 9 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/af089f6f/CHANGES.txt
--
diff --cc CHANGES.txt
index 75922bf,513e682..9f6a027
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,5 -1,5 +1,6 @@@
 -3.0.1
 +3.1
 +Merged from 3.0:
+  * Improve stress performance over 1k threads (CASSANDRA-7217)
   * Wait for migration responses to complete before bootstrapping 
(CASSANDRA-10731)
   * Unable to create a function with argument of type Inet (CASSANDRA-10741)
   * Fix backward incompatibiliy in CqlInputFormat (CASSANDRA-10717)



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

2015-11-25 Thread jake
Merge branch 'cassandra-3.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/d58a50b8
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/d58a50b8
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/d58a50b8

Branch: refs/heads/trunk
Commit: d58a50b8ccb897f68e874dd00550146eeb98d2c5
Parents: ea9b360 af089f6
Author: T Jake Luciani 
Authored: Wed Nov 25 09:04:55 2015 -0500
Committer: T Jake Luciani 
Committed: Wed Nov 25 09:04:55 2015 -0500

--
 CHANGES.txt |  1 +
 .../cassandra/stress/settings/SettingsMode.java | 22 +
 .../cassandra/stress/util/JavaDriverClient.java | 26 +---
 3 files changed, 40 insertions(+), 9 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/d58a50b8/CHANGES.txt
--
diff --cc CHANGES.txt
index fa65735,9f6a027..d820343
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,16 -1,6 +1,17 @@@
 +3.2
 + * Optimize building of Clustering object when only one is created 
(CASSANDRA-10409)
 + * Make index building pluggable (CASSANDRA-10681)
 + * Add sstable flush observer (CASSANDRA-10678)
 + * Improve NTS endpoints calculation (CASSANDRA-10200)
 + * Improve performance of the folderSize function (CASSANDRA-10677)
 + * Add support for type casting in selection clause (CASSANDRA-10310)
 + * Added graphing option to cassandra-stress (CASSANDRA-7918)
 + * Abort in-progress queries that time out (CASSANDRA-7392)
 + * Add transparent data encryption core classes (CASSANDRA-9945)
 +
  3.1
  Merged from 3.0:
+  * Improve stress performance over 1k threads (CASSANDRA-7217)
   * Wait for migration responses to complete before bootstrapping 
(CASSANDRA-10731)
   * Unable to create a function with argument of type Inet (CASSANDRA-10741)
   * Fix backward incompatibiliy in CqlInputFormat (CASSANDRA-10717)



[1/3] cassandra git commit: For CASSANDRA-7217, have stress calculate maximum # of pending requests based on thread count and allow manually specifying max pending requests per connection as well as #

2015-11-25 Thread jake
Repository: cassandra
Updated Branches:
  refs/heads/trunk ea9b36011 -> d58a50b8c


For CASSANDRA-7217, have stress calculate maximum # of pending requests based 
on thread count and allow manually specifying max pending requests per 
connection as well as # of connections

patch by Ariel Weisberg; reviewed by tjake for CASSANDRA-7217


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

Branch: refs/heads/trunk
Commit: a0076e70eed5501ac9d8c3ff41ce8018710a1585
Parents: 602f736
Author: Ariel Weisberg 
Authored: Tue Nov 17 13:22:55 2015 -0500
Committer: T Jake Luciani 
Committed: Wed Nov 25 09:02:02 2015 -0500

--
 CHANGES.txt |  1 +
 .../cassandra/stress/settings/SettingsMode.java | 22 +
 .../cassandra/stress/util/JavaDriverClient.java | 26 +---
 3 files changed, 40 insertions(+), 9 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/a0076e70/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 116d4c3..513e682 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 3.0.1
+ * Improve stress performance over 1k threads (CASSANDRA-7217)
  * Wait for migration responses to complete before bootstrapping 
(CASSANDRA-10731)
  * Unable to create a function with argument of type Inet (CASSANDRA-10741)
  * Fix backward incompatibiliy in CqlInputFormat (CASSANDRA-10717)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/a0076e70/tools/stress/src/org/apache/cassandra/stress/settings/SettingsMode.java
--
diff --git 
a/tools/stress/src/org/apache/cassandra/stress/settings/SettingsMode.java 
b/tools/stress/src/org/apache/cassandra/stress/settings/SettingsMode.java
index 2c91b6d..699f10e 100644
--- a/tools/stress/src/org/apache/cassandra/stress/settings/SettingsMode.java
+++ b/tools/stress/src/org/apache/cassandra/stress/settings/SettingsMode.java
@@ -1,6 +1,6 @@
 package org.apache.cassandra.stress.settings;
 /*
- * 
+ *
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -8,16 +8,16 @@ package org.apache.cassandra.stress.settings;
  * to you under the Apache License, Version 2.0 (the
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
- * 
+ *
  *   http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- * 
+ *
  */
 
 
@@ -42,6 +42,9 @@ public class SettingsMode implements Serializable
 public final String authProviderClassname;
 public final AuthProvider authProvider;
 
+public final Integer maxPendingPerConnection;
+public final Integer connectionsPerHost;
+
 private final String compression;
 
 public SettingsMode(GroupedOptions options)
@@ -55,6 +58,8 @@ public class SettingsMode implements Serializable
 compression = 
ProtocolOptions.Compression.valueOf(opts.useCompression.value().toUpperCase()).name();
 username = opts.user.value();
 password = opts.password.value();
+maxPendingPerConnection = 
opts.maxPendingPerConnection.value().isEmpty() ? null : 
Integer.valueOf(opts.maxPendingPerConnection.value());
+connectionsPerHost = opts.connectionsPerHost.value().isEmpty() ? 
null : Integer.valueOf(opts.connectionsPerHost.value());
 authProviderClassname = opts.authProvider.value();
 if (authProviderClassname != null)
 {
@@ -94,6 +99,8 @@ public class SettingsMode implements Serializable
 password = null;
 authProvider = null;
 authProviderClassname = null;
+maxPendingPerConnection = null;
+connectionsPerHost = null;
 }
 else if (options instanceof ThriftOptions)
 {
@@ -106,6 +113,8 @@ public class SettingsMode implements Serializable
 password = opts.password.value();
 authProviderClassname = null;
 authProvider = null;
+maxPendingPerConnection = null;
+connectionsPerHost = null;
 }
 else
 throw new IllegalStateExce

[1/2] cassandra git commit: For CASSANDRA-7217, have stress calculate maximum # of pending requests based on thread count and allow manually specifying max pending requests per connection as well as #

2015-11-25 Thread jake
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-3.1 8e1b6ea70 -> af089f6ff


For CASSANDRA-7217, have stress calculate maximum # of pending requests based 
on thread count and allow manually specifying max pending requests per 
connection as well as # of connections

patch by Ariel Weisberg; reviewed by tjake for CASSANDRA-7217


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

Branch: refs/heads/cassandra-3.1
Commit: a0076e70eed5501ac9d8c3ff41ce8018710a1585
Parents: 602f736
Author: Ariel Weisberg 
Authored: Tue Nov 17 13:22:55 2015 -0500
Committer: T Jake Luciani 
Committed: Wed Nov 25 09:02:02 2015 -0500

--
 CHANGES.txt |  1 +
 .../cassandra/stress/settings/SettingsMode.java | 22 +
 .../cassandra/stress/util/JavaDriverClient.java | 26 +---
 3 files changed, 40 insertions(+), 9 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/a0076e70/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 116d4c3..513e682 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 3.0.1
+ * Improve stress performance over 1k threads (CASSANDRA-7217)
  * Wait for migration responses to complete before bootstrapping 
(CASSANDRA-10731)
  * Unable to create a function with argument of type Inet (CASSANDRA-10741)
  * Fix backward incompatibiliy in CqlInputFormat (CASSANDRA-10717)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/a0076e70/tools/stress/src/org/apache/cassandra/stress/settings/SettingsMode.java
--
diff --git 
a/tools/stress/src/org/apache/cassandra/stress/settings/SettingsMode.java 
b/tools/stress/src/org/apache/cassandra/stress/settings/SettingsMode.java
index 2c91b6d..699f10e 100644
--- a/tools/stress/src/org/apache/cassandra/stress/settings/SettingsMode.java
+++ b/tools/stress/src/org/apache/cassandra/stress/settings/SettingsMode.java
@@ -1,6 +1,6 @@
 package org.apache.cassandra.stress.settings;
 /*
- * 
+ *
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -8,16 +8,16 @@ package org.apache.cassandra.stress.settings;
  * to you under the Apache License, Version 2.0 (the
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
- * 
+ *
  *   http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- * 
+ *
  */
 
 
@@ -42,6 +42,9 @@ public class SettingsMode implements Serializable
 public final String authProviderClassname;
 public final AuthProvider authProvider;
 
+public final Integer maxPendingPerConnection;
+public final Integer connectionsPerHost;
+
 private final String compression;
 
 public SettingsMode(GroupedOptions options)
@@ -55,6 +58,8 @@ public class SettingsMode implements Serializable
 compression = 
ProtocolOptions.Compression.valueOf(opts.useCompression.value().toUpperCase()).name();
 username = opts.user.value();
 password = opts.password.value();
+maxPendingPerConnection = 
opts.maxPendingPerConnection.value().isEmpty() ? null : 
Integer.valueOf(opts.maxPendingPerConnection.value());
+connectionsPerHost = opts.connectionsPerHost.value().isEmpty() ? 
null : Integer.valueOf(opts.connectionsPerHost.value());
 authProviderClassname = opts.authProvider.value();
 if (authProviderClassname != null)
 {
@@ -94,6 +99,8 @@ public class SettingsMode implements Serializable
 password = null;
 authProvider = null;
 authProviderClassname = null;
+maxPendingPerConnection = null;
+connectionsPerHost = null;
 }
 else if (options instanceof ThriftOptions)
 {
@@ -106,6 +113,8 @@ public class SettingsMode implements Serializable
 password = opts.password.value();
 authProviderClassname = null;
 authProvider = null;
+maxPendingPerConnection = null;
+connectionsPerHost = null;
 }
 else
 throw new 

[jira] [Updated] (CASSANDRA-5780) nodetool status and ring report incorrect/stale information after decommission

2015-11-25 Thread T Jake Luciani (JIRA)

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

T Jake Luciani updated CASSANDRA-5780:
--
Assignee: John Sumsion

> nodetool status and ring report incorrect/stale information after decommission
> --
>
> Key: CASSANDRA-5780
> URL: https://issues.apache.org/jira/browse/CASSANDRA-5780
> Project: Cassandra
>  Issue Type: Bug
>  Components: Tools
>Reporter: Peter Haggerty
>Assignee: John Sumsion
>Priority: Trivial
>  Labels: lhf, ponies, qa-resolved
> Fix For: 2.1.x
>
>
> Cassandra 1.2.6 ring of 12 instances, each with 256 tokens.
> Decommission 3 of the 12 nodes, one after another resulting a 9 instance ring.
> The 9 instances of cassandra that are in the ring all correctly report 
> nodetool status information for the ring and have the same data.
> After the first node is decommissioned:
> "nodetool status" on "decommissioned-1st" reports 11 nodes
> After the second node is decommissioned:
> "nodetool status" on "decommissioned-1st" reports 11 nodes
> "nodetool status" on "decommissioned-2nd" reports 10 nodes
> After the second node is decommissioned:
> "nodetool status" on "decommissioned-1st" reports 11 nodes
> "nodetool status" on "decommissioned-2nd" reports 10 nodes
> "nodetool status" on "decommissioned-3rd" reports 9 nodes
> The storage load information is similarly stale on the various decommissioned 
> nodes. The nodetool status and ring commands continue to return information 
> as if they were part of a cluster and they appear to return the last 
> information that they saw.
> In contrast the nodetool info command fails with an exception, which isn't 
> ideal but at least indicates that there was a failure rather than returning 
> stale information.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CASSANDRA-10738) upgrading to v3.0.0 nodes crashes with "org.apache.cassandra.serializers.MarshalException: Unexpected extraneous bytes after map value"

2015-11-25 Thread Sam Tunnicliffe (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-10738?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15026819#comment-15026819
 ] 

Sam Tunnicliffe commented on CASSANDRA-10738:
-

The post-upgrade sstables for {{system_schema.keyspaces}} you have are 
definitely corrupted, I added some additional debug logging to the code that 
tries to load the schema at startup and there's a load of junk in there. The 
good(ish) news is I've run the same upgrade several times using your 
pre-upgrade {{system.schema_keyspaces}} tables and have been unable to 
reproduce the corruption. My suggestion then is to force the migration code 
that converts from the old to new tables at startup to run again & see if you 
get usable tables this time around. 

To do that, remove all the corrupt tables from 
{{data/system_schema/keyspaces-abac5682dea631c5b535b3d6cffd0fb6/}} and restore 
the pre-upgrade tables (the ones in the zip you attached) to 
{{data/system/schema_keyspaces-b0f2235744583cdb9631c43e59ce3676/}}. When you 
restart the node, it should redo the conversion of the keyspaces table, leaving 
in place the other system tables that were already converted. It's possible 
there may be other corrupted sstables in the system keyspace, in which case you 
should see a similar error as before. If that happens, can you attach the 
debug.log, and we'll see where to go from there. It the node does start up 
cleanly, you can verify the schema is correct, data accessible and so forth. 

Of course, the bad news is that this tells us nothing about how those sstables 
came to be corrupted in the first place.


> upgrading to v3.0.0 nodes crashes with 
> "org.apache.cassandra.serializers.MarshalException: Unexpected extraneous 
> bytes after map value"
> ---
>
> Key: CASSANDRA-10738
> URL: https://issues.apache.org/jira/browse/CASSANDRA-10738
> Project: Cassandra
>  Issue Type: Bug
> Environment: ubuntu14, java8
>Reporter: Christian Sherwood
>Assignee: Sam Tunnicliffe
> Attachments: 1447894738468-upgrade-2.2.3-3.0.0.zip, cassv3.txt, 
> keyspaces-abac5682dea631c5b535b3d6cffd0fb6.zip, system_schemas.txt
>
>
> upgrading from v.2.2.3 to v3.0.0
> restarting after upgrade crashes with either
> ERROR [main] 2015-11-19 20:21:26,511 CassandraDaemon.java:702 - Exception 
> encountered during startup
> org.apache.cassandra.serializers.MarshalException: Unexpected extraneous 
> bytes after map value
> OR 
> ERROR [main] 2015-11-19 20:01:13,945 CassandraDaemon.java:702 - Exception 
> encountered during startup
> java.lang.IllegalArgumentException: null
> see attached debug and schema



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CASSANDRA-5780) nodetool status and ring report incorrect/stale information after decommission

2015-11-25 Thread T Jake Luciani (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-5780?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15026823#comment-15026823
 ] 

T Jake Luciani commented on CASSANDRA-5780:
---

[~jdsumsion] here's a simple dtest you can use to build a test with 
https://github.com/riptano/cassandra-dtest/blob/7e7b09d977eb1e113fd4e26fb96bdba3a250a03a/topology_test.py#L87

I'm happy to help on irc if you have any questions (tjake)

> nodetool status and ring report incorrect/stale information after decommission
> --
>
> Key: CASSANDRA-5780
> URL: https://issues.apache.org/jira/browse/CASSANDRA-5780
> Project: Cassandra
>  Issue Type: Bug
>  Components: Tools
>Reporter: Peter Haggerty
>Assignee: John Sumsion
>Priority: Trivial
>  Labels: lhf, ponies, qa-resolved
> Fix For: 2.1.x
>
>
> Cassandra 1.2.6 ring of 12 instances, each with 256 tokens.
> Decommission 3 of the 12 nodes, one after another resulting a 9 instance ring.
> The 9 instances of cassandra that are in the ring all correctly report 
> nodetool status information for the ring and have the same data.
> After the first node is decommissioned:
> "nodetool status" on "decommissioned-1st" reports 11 nodes
> After the second node is decommissioned:
> "nodetool status" on "decommissioned-1st" reports 11 nodes
> "nodetool status" on "decommissioned-2nd" reports 10 nodes
> After the second node is decommissioned:
> "nodetool status" on "decommissioned-1st" reports 11 nodes
> "nodetool status" on "decommissioned-2nd" reports 10 nodes
> "nodetool status" on "decommissioned-3rd" reports 9 nodes
> The storage load information is similarly stale on the various decommissioned 
> nodes. The nodetool status and ring commands continue to return information 
> as if they were part of a cluster and they appear to return the last 
> information that they saw.
> In contrast the nodetool info command fails with an exception, which isn't 
> ideal but at least indicates that there was a failure rather than returning 
> stale information.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (CASSANDRA-10044) Native-Transport-Requests is missing from the nodetool tpstats output in Cassandra 2.1

2015-11-25 Thread T Jake Luciani (JIRA)

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

T Jake Luciani updated CASSANDRA-10044:
---
Fix Version/s: 2.1.12

> Native-Transport-Requests is missing from the nodetool tpstats output in 
> Cassandra 2.1
> --
>
> Key: CASSANDRA-10044
> URL: https://issues.apache.org/jira/browse/CASSANDRA-10044
> Project: Cassandra
>  Issue Type: Bug
>Reporter: Wei Deng
>Priority: Minor
>  Labels: patch
> Fix For: 2.1.12
>
> Attachments: 
> 0001-Add-the-missing-Native-Transport-Requests-in-tpstats.patch
>
>
> It appears that in Cassandra 2.1 the output of "nodetool tpstats" has changed 
> a bit, and Native-Transport-Requests is removed. This is a useful piece of 
> statistics information to understand the pressure at the coordinator. Even 
> though people can still use JMX or metrics reporter to get the same 
> information, it is not as convenient as before (in Cassandra 2.0 this is 
> exposed through tpstats).
> Looking at the code 
> https://github.com/apache/cassandra/blob/cassandra-2.1/src/java/org/apache/cassandra/tools/NodeProbe.java#L1369-L1371,
>  this appears to be caused by some restructure in the JMX metrics, and can be 
> easily patched by adding "org.apache.cassandra.transport:type=*" into the 
> list of thread pools we print out.
> I understand Sam filed another JIRA 
> https://issues.apache.org/jira/browse/CASSANDRA-10018 just a few days ago. 
> However, that is for versions 2.2 and beyond. The patch here is to 
> specifically address a missing information in Cassandra 2.1.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (CASSANDRA-5657) Upgrade metrics lib and remove deprecated metrics

2015-11-25 Thread T Jake Luciani (JIRA)

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

T Jake Luciani updated CASSANDRA-5657:
--
Component/s: Observability

> Upgrade metrics lib and remove deprecated metrics
> -
>
> Key: CASSANDRA-5657
> URL: https://issues.apache.org/jira/browse/CASSANDRA-5657
> Project: Cassandra
>  Issue Type: Task
>  Components: Observability, Tools
>Reporter: Jonathan Ellis
>Assignee: T Jake Luciani
>  Labels: technical_debt
> Fix For: 2.2.0 beta 1
>
> Attachments: 5657.txt, 5657v2.txt, nits.txt
>
>




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (CASSANDRA-10044) Native-Transport-Requests is missing from the nodetool tpstats output in Cassandra 2.1

2015-11-25 Thread T Jake Luciani (JIRA)

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

T Jake Luciani updated CASSANDRA-10044:
---
Assignee: Wei Deng

> Native-Transport-Requests is missing from the nodetool tpstats output in 
> Cassandra 2.1
> --
>
> Key: CASSANDRA-10044
> URL: https://issues.apache.org/jira/browse/CASSANDRA-10044
> Project: Cassandra
>  Issue Type: Bug
>Reporter: Wei Deng
>Assignee: Wei Deng
>Priority: Minor
>  Labels: patch
> Fix For: 2.1.12
>
> Attachments: 
> 0001-Add-the-missing-Native-Transport-Requests-in-tpstats.patch
>
>
> It appears that in Cassandra 2.1 the output of "nodetool tpstats" has changed 
> a bit, and Native-Transport-Requests is removed. This is a useful piece of 
> statistics information to understand the pressure at the coordinator. Even 
> though people can still use JMX or metrics reporter to get the same 
> information, it is not as convenient as before (in Cassandra 2.0 this is 
> exposed through tpstats).
> Looking at the code 
> https://github.com/apache/cassandra/blob/cassandra-2.1/src/java/org/apache/cassandra/tools/NodeProbe.java#L1369-L1371,
>  this appears to be caused by some restructure in the JMX metrics, and can be 
> easily patched by adding "org.apache.cassandra.transport:type=*" into the 
> list of thread pools we print out.
> I understand Sam filed another JIRA 
> https://issues.apache.org/jira/browse/CASSANDRA-10018 just a few days ago. 
> However, that is for versions 2.2 and beyond. The patch here is to 
> specifically address a missing information in Cassandra 2.1.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


cassandra git commit: Add the missing Native-Transport-Requests in tpstats back

2015-11-25 Thread jake
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-2.1 f5a09c125 -> 5cafe8606


Add the missing Native-Transport-Requests in tpstats back

Patch by Wei Deng; reviewed by tjake for CASSANDRA-10044


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

Branch: refs/heads/cassandra-2.1
Commit: 5cafe8606fa1f28b535c69c57f78593c4e6ea85a
Parents: f5a09c1
Author: Wei Deng 
Authored: Mon Aug 10 22:57:49 2015 -0600
Committer: T Jake Luciani 
Committed: Wed Nov 25 09:19:21 2015 -0500

--
 CHANGES.txt| 1 +
 src/java/org/apache/cassandra/tools/NodeProbe.java | 3 ++-
 2 files changed, 3 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/5cafe860/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 91f4577..6f69f03 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.1.12
+ * Add Native-Transport-Requests back to tpstats (CASSANDRA-10044)
  * Make paging logic consistent between searcher impls (CASSANDRA-10683)
  * Fix CompressedInputStream for proper cleanup (CASSANDRA-10012)
  * (cqlsh) Support counters in COPY commands (CASSANDRA-9043)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/5cafe860/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 49c493d..5ba5a32 100644
--- a/src/java/org/apache/cassandra/tools/NodeProbe.java
+++ b/src/java/org/apache/cassandra/tools/NodeProbe.java
@@ -1380,7 +1380,8 @@ class ThreadPoolProxyMBeanIterator implements 
Iterator requests = mbeanServerConn.queryNames(new 
ObjectName("org.apache.cassandra.request:type=*"), null);
 Set internal = mbeanServerConn.queryNames(new 
ObjectName("org.apache.cassandra.internal:type=*"), null);
-resIter = Iterables.concat(requests, internal).iterator();
+Set transport = mbeanServerConn.queryNames(new 
ObjectName("org.apache.cassandra.transport:type=*"), null);
+resIter = Iterables.concat(requests, internal, transport).iterator();
 this.mbeanServerConn = mbeanServerConn;
 }
 



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

2015-11-25 Thread jake
Merge branch 'cassandra-2.1' into cassandra-2.2


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

Branch: refs/heads/cassandra-2.2
Commit: 3841f9cb2041a7af43cbda3ff7c85e78216a6d22
Parents: a907533 5cafe86
Author: T Jake Luciani 
Authored: Wed Nov 25 09:21:41 2015 -0500
Committer: T Jake Luciani 
Committed: Wed Nov 25 09:21:41 2015 -0500

--

--




[1/2] cassandra git commit: Add the missing Native-Transport-Requests in tpstats back

2015-11-25 Thread jake
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-2.2 a90753392 -> 3841f9cb2


Add the missing Native-Transport-Requests in tpstats back

Patch by Wei Deng; reviewed by tjake for CASSANDRA-10044


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

Branch: refs/heads/cassandra-2.2
Commit: 5cafe8606fa1f28b535c69c57f78593c4e6ea85a
Parents: f5a09c1
Author: Wei Deng 
Authored: Mon Aug 10 22:57:49 2015 -0600
Committer: T Jake Luciani 
Committed: Wed Nov 25 09:19:21 2015 -0500

--
 CHANGES.txt| 1 +
 src/java/org/apache/cassandra/tools/NodeProbe.java | 3 ++-
 2 files changed, 3 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/5cafe860/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 91f4577..6f69f03 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.1.12
+ * Add Native-Transport-Requests back to tpstats (CASSANDRA-10044)
  * Make paging logic consistent between searcher impls (CASSANDRA-10683)
  * Fix CompressedInputStream for proper cleanup (CASSANDRA-10012)
  * (cqlsh) Support counters in COPY commands (CASSANDRA-9043)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/5cafe860/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 49c493d..5ba5a32 100644
--- a/src/java/org/apache/cassandra/tools/NodeProbe.java
+++ b/src/java/org/apache/cassandra/tools/NodeProbe.java
@@ -1380,7 +1380,8 @@ class ThreadPoolProxyMBeanIterator implements 
Iterator requests = mbeanServerConn.queryNames(new 
ObjectName("org.apache.cassandra.request:type=*"), null);
 Set internal = mbeanServerConn.queryNames(new 
ObjectName("org.apache.cassandra.internal:type=*"), null);
-resIter = Iterables.concat(requests, internal).iterator();
+Set transport = mbeanServerConn.queryNames(new 
ObjectName("org.apache.cassandra.transport:type=*"), null);
+resIter = Iterables.concat(requests, internal, transport).iterator();
 this.mbeanServerConn = mbeanServerConn;
 }
 



[jira] [Updated] (CASSANDRA-10018) Stats for several pools removed from nodetool tpstats output

2015-11-25 Thread T Jake Luciani (JIRA)

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

T Jake Luciani updated CASSANDRA-10018:
---
Fix Version/s: 2.2.x

> Stats for several pools removed from nodetool tpstats output 
> -
>
> Key: CASSANDRA-10018
> URL: https://issues.apache.org/jira/browse/CASSANDRA-10018
> Project: Cassandra
>  Issue Type: Bug
>  Components: Observability
>Reporter: Sam Tunnicliffe
>Assignee: Joel Knighton
> Fix For: 2.2.x
>
>
> With CASSANDRA-5657, the output of nodetool tpstats changed to only include 
> threadpool info for actual Stages. There are a number of
> JMX enabled thread pool executors which we used to include in tpstats and 
> that are still in use but no longer show up.
> Before CASSANDRA-5657
> {noformat}
> Pool NameActive   Pending  Completed   Blocked  All 
> time blocked
> MutationStage 0 0  0 0
>  0
> ReadStage 0 0  0 0
>  0
> RequestResponseStage  0 0  0 0
>  0
> ReadRepairStage   0 0  0 0
>  0
> CounterMutationStage  0 0  0 0
>  0
> MiscStage 0 0  0 0
>  0
> HintedHandoff 0 1  0 0
>  0
> GossipStage   0 0  0 0
>  0
> CacheCleanupExecutor  0 0  0 0
>  0
> InternalResponseStage 0 0  0 0
>  0
> CommitLogArchiver 0 0  0 0
>  0
> CompactionExecutor0 0 48 0
>  0
> ValidationExecutor0 0  0 0
>  0
> MigrationStage0 0  2 0
>  0
> AntiEntropyStage  0 0  0 0
>  0
> PendingRangeCalculator0 0  1 0
>  0
> Sampler   0 0  0 0
>  0
> MemtableFlushWriter   0 0 14 0
>  0
> MemtablePostFlush 0 0 20 0
>  0
> MemtableReclaimMemory 0 0 14 0
>  0
> Message type   Dropped
> READ 0
> RANGE_SLICE  0
> _TRACE   0
> MUTATION 0
> COUNTER_MUTATION 0
> BINARY   0
> REQUEST_RESPONSE 0
> PAGED_RANGE  0
> READ_REPAIR  0
> {noformat}
> After CASSANDRA-5657
> {noformat}
> Pool NameActive   Pending  Completed   Blocked  All 
> time blocked
> ReadStage 0 0  0 0
>  0
> MutationStage 0 0  0 0
>  0
> CounterMutationStage  0 0  0 0
>  0
> GossipStage   0 0  0 0
>  0
> RequestResponseStage  0 0  0 0
>  0
> AntiEntropyStage  0 0  0 0
>  0
> MigrationStage0 0  2 0
>  0
> MiscStage 0 0  0 0
>  0
> InternalResponseStage 0 0  0 0
>  0
> ReadRepairStage   0 0  0 0
>  0
> Message type   Dropped
> READ 0
> RANGE_SLICE  0
> _TRACE   0
> MUTATION 0
> COUNTER_MUTATION 0
> BINARY   0
> REQUEST_RESPONSE 0
> PAGED_RANGE  0
> READ_REPAIR  0
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CASSANDRA-8505) Invalid results are returned while secondary index are being build

2015-11-25 Thread Jim Witschey (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-8505?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15026852#comment-15026852
 ] 

Jim Witschey commented on CASSANDRA-8505:
-

[~blerer] Noted, thanks for the warning.

> Invalid results are returned while secondary index are being build
> --
>
> Key: CASSANDRA-8505
> URL: https://issues.apache.org/jira/browse/CASSANDRA-8505
> Project: Cassandra
>  Issue Type: Bug
>  Components: Coordination
>Reporter: Benjamin Lerer
>Assignee: Benjamin Lerer
> Fix For: 2.2.x, 3.0.x
>
>
> If you request an index creation and then execute a query that use the index 
> the results returned might be invalid until the index is fully build. This is 
> caused by the fact that the table column will be marked as indexed before the 
> index is ready.
> The following unit tests can be use to reproduce the problem:
> {code}
> @Test
> public void testIndexCreatedAfterInsert() throws Throwable
> {
> createTable("CREATE TABLE %s (a int, b int, c int, primary key((a, 
> b)))");
> execute("INSERT INTO %s (a, b, c) VALUES (0, 0, 0);");
> execute("INSERT INTO %s (a, b, c) VALUES (0, 1, 1);");
> execute("INSERT INTO %s (a, b, c) VALUES (0, 2, 2);");
> execute("INSERT INTO %s (a, b, c) VALUES (1, 0, 3);");
> execute("INSERT INTO %s (a, b, c) VALUES (1, 1, 4);");
> 
> createIndex("CREATE INDEX ON %s(b)");
> 
> assertRows(execute("SELECT * FROM %s WHERE b = ?;", 1),
>row(0, 1, 1),
>row(1, 1, 4));
> }
> 
> @Test
> public void testIndexCreatedBeforeInsert() throws Throwable
> {
> createTable("CREATE TABLE %s (a int, b int, c int, primary key((a, 
> b)))");
> createIndex("CREATE INDEX ON %s(b)");
> 
> execute("INSERT INTO %s (a, b, c) VALUES (0, 0, 0);");
> execute("INSERT INTO %s (a, b, c) VALUES (0, 1, 1);");
> execute("INSERT INTO %s (a, b, c) VALUES (0, 2, 2);");
> execute("INSERT INTO %s (a, b, c) VALUES (1, 0, 3);");
> execute("INSERT INTO %s (a, b, c) VALUES (1, 1, 4);");
> assertRows(execute("SELECT * FROM %s WHERE b = ?;", 1),
>row(0, 1, 1),
>row(1, 1, 4));
> }
> {code}
> The first test will fail while the second will work. 
> In my opinion the first test should reject the request as invalid (as if the 
> index was not existing) until the index is fully build.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CASSANDRA-10740) Incorrect condition causes cleanup of SSTables which might not need it

2015-11-25 Thread Jakub Janecek (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-10740?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15026856#comment-15026856
 ] 

Jakub Janecek commented on CASSANDRA-10740:
---

OK. Do I need to do something else or is that it? :)

> Incorrect condition causes cleanup of SSTables which might not need it
> --
>
> Key: CASSANDRA-10740
> URL: https://issues.apache.org/jira/browse/CASSANDRA-10740
> Project: Cassandra
>  Issue Type: Bug
>Reporter: Jakub Janecek
> Fix For: 2.1.x
>
> Attachments: trunk-10740.txt, trunk-test-10740.txt
>
>
> We needed to perform cleanup of SSTables in our production cluster but found 
> out that it would take several months. Together with my colleague 
> [~JiriHorky] we have pinpointed the issue to method 
> CompactionManager.needsCleanup which incorrectly marks almost all SSTables as 
> the ones needing the cleanup even though that might not be true. I am 
> attaching a patch which should be applicable from version 2.x forward (this 
> is the version we would need it in).
> To explain the problem, the last condition in the cycle that checks whether 
> the next key in the SSTable after the current checked range is NOT contained 
> in the next range falsely marks SSTable as necessary to have cleanup even 
> though it might be contained in some other range. The correct condition 
> (which is actully described in the comment) is to check whether the next key 
> in the SSTable after the current range is less than or equal to the "left" 
> key of the next range (assuming that the left key is exclusive which is 
> described in another comment of the same method).
> Is our patch and reasoning correct?



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CASSANDRA-9669) If sstable flushes complete out of order, on restart we can fail to replay necessary commit log records

2015-11-25 Thread Branimir Lambov (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-9669?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15026925#comment-15026925
 ] 

Branimir Lambov commented on CASSANDRA-9669:


The code looks good to me.

Nit: [Comment to {{Memtable}} 
contructor|https://github.com/apache/cassandra/compare/trunk...belliottsmith:9669-2.2#diff-f0a15c3588b56c5ce53ece7c48e325b5R96]
 appears wrong as it is the one e.g. {{CFS.Flush}} uses.

> If sstable flushes complete out of order, on restart we can fail to replay 
> necessary commit log records
> ---
>
> Key: CASSANDRA-9669
> URL: https://issues.apache.org/jira/browse/CASSANDRA-9669
> Project: Cassandra
>  Issue Type: Bug
>  Components: Local Write-Read Paths
>Reporter: Benedict
>Assignee: Benedict
>Priority: Critical
>  Labels: correctness
> Fix For: 2.1.12, 2.2.4, 3.0.1, 3.1
>
>
> While {{postFlushExecutor}} ensures it never expires CL entries out-of-order, 
> on restart we simply take the maximum replay position of any sstable on disk, 
> and ignore anything prior. 
> It is quite possible for there to be two flushes triggered for a given table, 
> and for the second to finish first by virtue of containing a much smaller 
> quantity of live data (or perhaps the disk is just under less pressure). If 
> we crash before the first sstable has been written, then on restart the data 
> it would have represented will disappear, since we will not replay the CL 
> records.
> This looks to be a bug present since time immemorial, and also seems pretty 
> serious.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CASSANDRA-7276) Include keyspace and table names in logs where possible

2015-11-25 Thread Paulo Motta (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-7276?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15026937#comment-15026937
 ] 

Paulo Motta commented on CASSANDRA-7276:


Sorry mate, with the 3.0 release I prioritized other tasks and just now had 
time to have a closer look on this.

I'm not happy with manually having to fetch the MDC context Map on each 
runnable and cleaning afterwards, since it's error prone and requires a great 
deal of developer cooperation. We would need to add transparent MDC-awareness 
to our custom executors (DebuggableThreadPoolExecutor and 
AbstractTracingAwareExecutorService), similar to what was done to tracing 
awareness on CASSANDRA-1123, and this would increase considerably the 
complexity of this ticket, given how critical those components are.

Another problem with using finally clauses to limit the scope of the MDC 
variables is that in the case of an exception (such as the one in the 
description of this ticket), the finally clause would clear the context map 
before the exception is handled by an outer handler, so the ks/cf information 
would not show up in the exception handling log. So we would need to let the 
MDC context propagate and clear only when the exception is catched by an outer 
handler, what would again require developer cooperation to work right.

Given these problems, I wonder if it's worth the effort of introducing MDC 
support and require developers to follow certain constraints to use it, or if 
we should just stick to manually adding KS/CF information to log statements and 
exception traces on an as-needed basis. What do you think [~thobbs], 
[~aweisberg] ?

> Include keyspace and table names in logs where possible
> ---
>
> Key: CASSANDRA-7276
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7276
> Project: Cassandra
>  Issue Type: Improvement
>Reporter: Tyler Hobbs
>Assignee: Nitzan Volman
>Priority: Minor
>  Labels: bootcamp, lhf
> Fix For: 2.1.x
>
> Attachments: 2.1-CASSANDRA-7276-v1.txt, 
> cassandra-2.1-7276-compaction.txt, cassandra-2.1-7276.txt, 
> cassandra-2.1.9-7276-v2.txt, cassandra-2.1.9-7276.txt
>
>
> Most error messages and stacktraces give you no clue as to what keyspace or 
> table was causing the problem.  For example:
> {noformat}
> ERROR [MutationStage:61648] 2014-05-20 12:05:45,145 CassandraDaemon.java 
> (line 198) Exception in thread Thread[MutationStage:61648,5,main]
> java.lang.IllegalArgumentException
> at java.nio.Buffer.limit(Unknown Source)
> at 
> org.apache.cassandra.db.marshal.AbstractCompositeType.getBytes(AbstractCompositeType.java:63)
> at 
> org.apache.cassandra.db.marshal.AbstractCompositeType.getWithShortLength(AbstractCompositeType.java:72)
> at 
> org.apache.cassandra.db.marshal.AbstractCompositeType.compare(AbstractCompositeType.java:98)
> at 
> org.apache.cassandra.db.marshal.AbstractCompositeType.compare(AbstractCompositeType.java:35)
> at 
> edu.stanford.ppl.concurrent.SnapTreeMap$1.compareTo(SnapTreeMap.java:538)
> at 
> edu.stanford.ppl.concurrent.SnapTreeMap.attemptUpdate(SnapTreeMap.java:1108)
> at 
> edu.stanford.ppl.concurrent.SnapTreeMap.updateUnderRoot(SnapTreeMap.java:1059)
> at edu.stanford.ppl.concurrent.SnapTreeMap.update(SnapTreeMap.java:1023)
> at 
> edu.stanford.ppl.concurrent.SnapTreeMap.putIfAbsent(SnapTreeMap.java:985)
> at 
> org.apache.cassandra.db.AtomicSortedColumns$Holder.addColumn(AtomicSortedColumns.java:328)
> at 
> org.apache.cassandra.db.AtomicSortedColumns.addAllWithSizeDelta(AtomicSortedColumns.java:200)
> at org.apache.cassandra.db.Memtable.resolve(Memtable.java:226)
> at org.apache.cassandra.db.Memtable.put(Memtable.java:173)
> at 
> org.apache.cassandra.db.ColumnFamilyStore.apply(ColumnFamilyStore.java:893)
> at org.apache.cassandra.db.Keyspace.apply(Keyspace.java:368)
> at org.apache.cassandra.db.Keyspace.apply(Keyspace.java:333)
> at org.apache.cassandra.db.RowMutation.apply(RowMutation.java:206)
> at 
> org.apache.cassandra.db.RowMutationVerbHandler.doVerb(RowMutationVerbHandler.java:56)
> at 
> org.apache.cassandra.net.MessageDeliveryTask.run(MessageDeliveryTask.java:60)
> at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
> at java.lang.Thread.run(Unknown Source)
> {noformat}
> We should try to include info on the keyspace and column family in the error 
> messages or logs whenever possible.  This includes reads, writes, 
> compactions, flushes, repairs, and probably more.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CASSANDRA-7910) wildcard prepared statements are incorrect after a column is added to the table

2015-11-25 Thread Tyler Hobbs (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-7910?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15026957#comment-15026957
 ] 

Tyler Hobbs commented on CASSANDRA-7910:


Hmm, that's a good point.  Perhaps we should include a hash of the result set 
metadata (in some way) in the prepared statement ID?

> wildcard prepared statements are incorrect after a column is added to the 
> table
> ---
>
> Key: CASSANDRA-7910
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7910
> Project: Cassandra
>  Issue Type: Bug
>Reporter: Oded Peer
>Assignee: Tyler Hobbs
>Priority: Minor
>  Labels: client-impacting
> Fix For: 2.1.3
>
> Attachments: 7910-2.1.txt, 7910-trunk.txt, 
> PreparedStatementAfterAddColumnTest.java
>
>
> 1. Prepare a statement with a wildcard in the select clause.
> 2. Alter the table - add a column
> 3. execute the prepared statement
> Expected result - get all the columns including the new column
> Actual result - get the columns except the new column
> Attached a test using cassandra-unit



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CASSANDRA-8805) runWithCompactionsDisabled only cancels compactions, which is not the only source of markCompacted

2015-11-25 Thread Marcus Eriksson (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-8805?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15026972#comment-15026972
 ] 

Marcus Eriksson commented on CASSANDRA-8805:


ok, +1

could you rebase the branches?

> runWithCompactionsDisabled only cancels compactions, which is not the only 
> source of markCompacted
> --
>
> Key: CASSANDRA-8805
> URL: https://issues.apache.org/jira/browse/CASSANDRA-8805
> Project: Cassandra
>  Issue Type: Bug
>Reporter: Benedict
>Assignee: Carl Yeksigian
> Fix For: 2.1.x
>
> Attachments: 8805-2.1.txt
>
>
> Operations like repair that may operate over all sstables cancel compactions 
> before beginning, and fail if there are any files marked compacting after 
> doing so. Redistribution of index summaries is not a compaction, so is not 
> cancelled by this action, but does mark sstables as compacting, so such an 
> action will fail to initiate if there is an index summary redistribution in 
> progress. It seems that IndexSummaryManager needs to register itself as 
> interruptible along with compactions (AFAICT no other actions that may 
> markCompacting are not themselves compactions).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (CASSANDRA-10747) CQL.textile syntax incorrectly includes optional keyspace for aggregate SFUNC and FINALFUNC

2015-11-25 Thread Sylvain Lebresne (JIRA)

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

Sylvain Lebresne updated CASSANDRA-10747:
-
Reviewer: Sylvain Lebresne

> CQL.textile syntax incorrectly includes optional keyspace for aggregate SFUNC 
> and FINALFUNC
> ---
>
> Key: CASSANDRA-10747
> URL: https://issues.apache.org/jira/browse/CASSANDRA-10747
> Project: Cassandra
>  Issue Type: Bug
>  Components: Documentation and Website
>Reporter: dan jatnieks
>Assignee: Robert Stupp
>Priority: Trivial
> Fix For: 2.2.x
>
> Attachments: 10747.txt
>
>
> [CQL.textile|https://github.com/apache/cassandra/blob/trunk/doc/cql3/CQL.textile]
>  incorrectly includes an optional keyspace for the {{SFUNC}} and 
> {{FINALFUNC}} parts of a {{CREATE AGGREGATE}} statement.
> The grammar for 2.2 and 3.0 does not allow a keyspace to be specified here.
> From the CQL.textile:
> {noformat}
>  ::= CREATE ( OR REPLACE )? 
> AGGREGATE ( IF NOT EXISTS )?
> (  '.' )? 
> '('  ( ','  )* ')'
> SFUNC (  '.' )? 
> STYPE 
> ( FINALFUNC (  '.' )? 
>  )?
> ( INITCOND  )?
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (CASSANDRA-10749) DeletionTime.compareTo wrong ??

2015-11-25 Thread Sylvain Lebresne (JIRA)

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

Sylvain Lebresne updated CASSANDRA-10749:
-
Reviewer: Sylvain Lebresne

> DeletionTime.compareTo wrong ??
> ---
>
> Key: CASSANDRA-10749
> URL: https://issues.apache.org/jira/browse/CASSANDRA-10749
> Project: Cassandra
>  Issue Type: Bug
>Reporter: Robert Stupp
>Assignee: Robert Stupp
>Priority: Minor
>
> {{org.apache.cassandra.db.DeletionTime#compareTo}} looks like this:
> {code}
> public int compareTo(DeletionTime dt)
> {
> if (markedForDeleteAt() < dt.markedForDeleteAt())
> return -1;
> else if (markedForDeleteAt() > dt.markedForDeleteAt())
> return 1;
> else if (localDeletionTime() < dt.localDeletionTime())
> return -1;
> else if (localDeletionTime() > dt.localDeletionTime())
> return -1;
> else
> return 0;
> }
> {code}
> I think that {{localDeletionTime() > dt.localDeletionTime()}} should return 
> {{1}}, but I'm not sure. /cc [~slebresne]



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CASSANDRA-10749) DeletionTime.compareTo wrong ??

2015-11-25 Thread Sylvain Lebresne (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-10749?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15027009#comment-15027009
 ] 

Sylvain Lebresne commented on CASSANDRA-10749:
--

+1

> DeletionTime.compareTo wrong ??
> ---
>
> Key: CASSANDRA-10749
> URL: https://issues.apache.org/jira/browse/CASSANDRA-10749
> Project: Cassandra
>  Issue Type: Bug
>Reporter: Robert Stupp
>Assignee: Robert Stupp
>Priority: Minor
>
> {{org.apache.cassandra.db.DeletionTime#compareTo}} looks like this:
> {code}
> public int compareTo(DeletionTime dt)
> {
> if (markedForDeleteAt() < dt.markedForDeleteAt())
> return -1;
> else if (markedForDeleteAt() > dt.markedForDeleteAt())
> return 1;
> else if (localDeletionTime() < dt.localDeletionTime())
> return -1;
> else if (localDeletionTime() > dt.localDeletionTime())
> return -1;
> else
> return 0;
> }
> {code}
> I think that {{localDeletionTime() > dt.localDeletionTime()}} should return 
> {{1}}, but I'm not sure. /cc [~slebresne]



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[Cassandra Wiki] Update of "HowToContribute" by AdamHolmberg

2015-11-25 Thread Apache Wiki
Dear Wiki user,

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

The "HowToContribute" page has been changed by AdamHolmberg:
https://wiki.apache.org/cassandra/HowToContribute?action=diff&rev1=62&rev2=63

  
  This workflow also makes it so git knows what commits have been made to 
earlier branches but not to trunk: if you forget to merge a fix immediately, 
the next time someone goes to merge from the branch, git will incorporate the 
forgotten ones too.
  
+ == Bundled Drivers ==
+ A copy of the Python driver is included for use in `cqlsh`. For instructions 
on how to package the bundled driver for the Cassandra project, see the 
[[https://github.com/datastax/python-driver/blob/master/README-dev.rst#packaging-for-cassandra|instructions
 here]].
+ 
  {{https://c.statcounter.com/9397521/0/fe557aad/1/|stats}}
  


[jira] [Updated] (CASSANDRA-10755) PreparedStatement is the same id for different Japanese katakana characters with same length

2015-11-25 Thread Sylvain Lebresne (JIRA)

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

Sylvain Lebresne updated CASSANDRA-10755:
-
Reviewer: Sylvain Lebresne

> PreparedStatement is the same id for different Japanese katakana characters 
> with same length
> 
>
> Key: CASSANDRA-10755
> URL: https://issues.apache.org/jira/browse/CASSANDRA-10755
> Project: Cassandra
>  Issue Type: Bug
> Environment: cassandra-2.1.8, java driver 2.1.5, ubuntu 14.04
>Reporter: ZhaoYang
>
> String q1 = "UPDATE table SET value='タニャア' WHERE key=? AND key2=?";
> String q2 = "UPDATE table SET value='ャアタニ' WHERE key=? AND key2=?";
> when using  session.prepare().
> q1 and q2 will return the prepared-statement with the same prepared ID, but 
> the query in prepared-statement is correct.
> So if I update using q1 first, all later q2 will not be able to update.( It's 
> means , it still updates q1)
> Please note that the Japanese katakana is the same length in q1 and q2.
> I know it's a bad use case for putting value into prepared-query itself. 
> Is it related to how Cassandra cache prepared statement?



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CASSANDRA-10759) nodetool upgradesstables does not always complete synchronously

2015-11-25 Thread Joshua McKenzie (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-10759?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15027022#comment-15027022
 ] 

Joshua McKenzie commented on CASSANDRA-10759:
-

What's the environment (OS) you're running into this on?

> nodetool upgradesstables does not always complete synchronously
> ---
>
> Key: CASSANDRA-10759
> URL: https://issues.apache.org/jira/browse/CASSANDRA-10759
> Project: Cassandra
>  Issue Type: Bug
>  Components: Tools
> Environment: Discovered on Apache Cassandra 2.1.8.689
>Reporter: Jamie
>
> The "nodetool upgradesstables" command does not always complete 
> synchronously. We notice that the command exits with an exit code 0, however, 
> there are still files left behind on an older version that disappear later. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (CASSANDRA-10760) Counters are erroneously allowed as map key type

2015-11-25 Thread Sylvain Lebresne (JIRA)

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

Sylvain Lebresne updated CASSANDRA-10760:
-
Reviewer: Sylvain Lebresne

> Counters are erroneously allowed as map key type
> 
>
> Key: CASSANDRA-10760
> URL: https://issues.apache.org/jira/browse/CASSANDRA-10760
> Project: Cassandra
>  Issue Type: Bug
>  Components: CQL
>Reporter: Aleksey Yeschenko
>Assignee: Michael Edge
>Priority: Minor
>  Labels: cql, cqlsh
> Fix For: 2.1.x, 2.2.x, 3.0.x
>
> Attachments: CASSANDRA-3.0-10760-Counters-in-Maps.patch
>
>
> We do validate collection value types, but not collection key types, which 
> allows counters to be used as map keys:
> {noformat}
> cqlsh> create keyspace test with replication = {'class': 'SimpleStrategy', 
> 'replication_factor': 1};
> cqlsh> use test;
> cqlsh:test> create table test.test (id int primary key, amap map text>);
> cqlsh:test> insert into test.test (id, amap) values (0, {1: '2'});
> cqlsh:test> select * from test.test;
>  id | amap
> +--
>   0 | {1: '2'}
> (1 rows)
> {noformat}
> This should obviously not be allowed and must be rejected.
> /cc [~slebresne]



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (CASSANDRA-10658) Some DROP ... IF EXISTS incorrectly result in exceptions on non-existing KS

2015-11-25 Thread Sylvain Lebresne (JIRA)

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

Sylvain Lebresne updated CASSANDRA-10658:
-
Reviewer: Marcus Eriksson

> Some DROP ... IF EXISTS incorrectly result in exceptions on non-existing KS
> ---
>
> Key: CASSANDRA-10658
> URL: https://issues.apache.org/jira/browse/CASSANDRA-10658
> Project: Cassandra
>  Issue Type: Bug
>Reporter: Robert Stupp
>Assignee: Robert Stupp
>Priority: Minor
> Fix For: 2.1.x, 2.2.x, 3.0.x
>
>
> 2.1, 2.2 and 3.0 incorrectly throws {{InvalidRequestException}} on 
> non-existing keyspace for {{DROP TYPE IF EXISTS}}
> 3.0 incorrectly throws {{ConfigurationException}} for {{DROP AGGREGATE IF 
> EXISTS}} with type arguments.
> 3.0 incorrectly throws {{ConfigurationException}} for {{DROP FUNCTION IF 
> EXISTS}} with type arguments.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (CASSANDRA-10721) Altering a UDT might break UDA deserialisation

2015-11-25 Thread Sylvain Lebresne (JIRA)

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

Sylvain Lebresne updated CASSANDRA-10721:
-
Reviewer: Benjamin Lerer

> Altering a UDT might break UDA deserialisation
> --
>
> Key: CASSANDRA-10721
> URL: https://issues.apache.org/jira/browse/CASSANDRA-10721
> Project: Cassandra
>  Issue Type: Bug
>  Components: CQL, Distributed Metadata
>Reporter: Aleksey Yeschenko
>Assignee: Robert Stupp
> Fix For: 3.0.x
>
>
> CASSANDRA-10650 switched UDA's {{initcond}} serialisation in schema to its 
> CQL literal. This means that if any particular field is renamed in the UDT, 
> or of its type gets changes, we will not be able to parse initcond back.
> We should either:
> 1) Forbid renames and type switches in UDTs that are being used in UDAs, or
> 2) Make sure we alter the UDAs in schema alongside the new UDT at all times



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Assigned] (CASSANDRA-10761) Possible regression of CASSANDRA-9201

2015-11-25 Thread Sam Tunnicliffe (JIRA)

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

Sam Tunnicliffe reassigned CASSANDRA-10761:
---

Assignee: Sam Tunnicliffe

> Possible regression of CASSANDRA-9201
> -
>
> Key: CASSANDRA-10761
> URL: https://issues.apache.org/jira/browse/CASSANDRA-10761
> Project: Cassandra
>  Issue Type: Sub-task
>Reporter: Philip Thompson
>Assignee: Sam Tunnicliffe
> Fix For: 3.0.1, 3.1, 2.2.x
>
> Attachments: 10761-logs.tar.gz
>
>
> Some dtests like 
> {{consistency_test.TestAccuracy.test_network_topology_strategy_each_quorum_counters}}
>  are failing with the follow auth related assertion exception
> {code}
> [node6 ERROR] java.lang.AssertionError: 
> org.apache.cassandra.exceptions.InvalidRequestException: unconfigured table 
> roles
>   at 
> org.apache.cassandra.auth.CassandraRoleManager.prepare(CassandraRoleManager.java:450)
>   at 
> org.apache.cassandra.auth.CassandraRoleManager.setup(CassandraRoleManager.java:144)
>   at 
> org.apache.cassandra.service.StorageService.doAuthSetup(StorageService.java:1036)
>   at 
> org.apache.cassandra.service.StorageService.joinTokenRing(StorageService.java:984)
>   at 
> org.apache.cassandra.service.StorageService.initServer(StorageService.java:708)
>   at 
> org.apache.cassandra.service.StorageService.initServer(StorageService.java:579)
>   at 
> org.apache.cassandra.service.CassandraDaemon.setup(CassandraDaemon.java:345)
>   at 
> org.apache.cassandra.service.CassandraDaemon.activate(CassandraDaemon.java:561)
>   at 
> org.apache.cassandra.service.CassandraDaemon.main(CassandraDaemon.java:689)
> Caused by: org.apache.cassandra.exceptions.InvalidRequestException: 
> unconfigured table roles
>   at 
> org.apache.cassandra.thrift.ThriftValidation.validateColumnFamily(ThriftValidation.java:114)
>   at 
> org.apache.cassandra.cql3.statements.SelectStatement$RawStatement.prepare(SelectStatement.java:757)
>   at 
> org.apache.cassandra.cql3.statements.SelectStatement$RawStatement.prepare(SelectStatement.java:752)
>   at 
> org.apache.cassandra.auth.CassandraRoleManager.prepare(CassandraRoleManager.java:446)
>   ... 8 more
> {code}
> This looks very similar to CASSANDRA-9201.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CASSANDRA-9915) IndexError('list index out of range') when trying to connect to Cassandra cluster with cqlsh

2015-11-25 Thread Adam Holmberg (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-9915?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15027060#comment-15027060
 ] 

Adam Holmberg commented on CASSANDRA-9915:
--

Still unclear what was leading to this metadata condition, but the updated 
driver (now in both 2.2 and 3.0) handles this without blowing up. I think we 
can close this.

> IndexError('list index out of range') when trying to connect to Cassandra 
> cluster with cqlsh
> 
>
> Key: CASSANDRA-9915
> URL: https://issues.apache.org/jira/browse/CASSANDRA-9915
> Project: Cassandra
>  Issue Type: Bug
> Environment: Ubuntu, Cassandra 2.5.1, Python 2.7.3
>Reporter: Prabir Kr Sarkar
>Assignee: Adam Holmberg
>Priority: Minor
>  Labels: cqlsh
> Fix For: 2.1.x
>
> Attachments: schema_columnfamilies.xls
>
>
> Cassandra by default uses a Python driver to connect
> {code}
> >>> cluster = Cluster(['IP'], protocol_version=3)
> >>> session = cluster.connect()
> Traceback (most recent call last):
>   File "", line 1, in 
>   File "/usr/local/lib/python2.7/dist-packages/cassandra/cluster.py", line 
> 839, in connect
> self.control_connection.connect()
>   File "/usr/local/lib/python2.7/dist-packages/cassandra/cluster.py", line 
> 2075, in connect
> self._set_new_connection(self._reconnect_internal())
>   File "/usr/local/lib/python2.7/dist-packages/cassandra/cluster.py", line 
> 2110, in _reconnect_internal
> raise NoHostAvailable("Unable to connect to any servers", errors)
> cassandra.cluster.NoHostAvailable: ('Unable to connect to any servers', 
> {'IP': IndexError('list index out of range',)})
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CASSANDRA-7281) SELECT on tuple relations are broken for mixed ASC/DESC clustering order

2015-11-25 Thread Benjamin Lerer (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-7281?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15027102#comment-15027102
 ] 

Benjamin Lerer commented on CASSANDRA-7281:
---

[~marcinszymaniuk] do you have any comments on my modified version?

Are you still interested in providing a patch for 2.1 and 3.0?

> SELECT on tuple relations are broken for mixed ASC/DESC clustering order
> 
>
> Key: CASSANDRA-7281
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7281
> Project: Cassandra
>  Issue Type: Bug
>Reporter: Sylvain Lebresne
>Assignee: Marcin Szymaniuk
> Fix For: 2.1.x
>
> Attachments: 
> 0001-CASSANDRA-7281-SELECT-on-tuple-relations-are-broken-.patch, 
> 0001-CASSANDRA-7281-SELECT-on-tuple-relations-are-broken-v2.patch, 
> 0001-CASSANDRA-7281-SELECT-on-tuple-relations-are-broken-v3.patch, 
> 0001-CASSANDRA-7281-SELECT-on-tuple-relations-are-broken-v4.patch, 
> 0001-CASSANDRA-7281-SELECT-on-tuple-relations-are-broken-v5.patch, 
> 7281_unit_tests.txt
>
>
> As noted on 
> [CASSANDRA-6875|https://issues.apache.org/jira/browse/CASSANDRA-6875?focusedCommentId=13992153&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-13992153],
>  the tuple notation is broken when the clustering order mixes ASC and DESC 
> directives because the range of data they describe don't correspond to a 
> single continuous slice internally. To copy the example from CASSANDRA-6875:
> {noformat}
> cqlsh:ks> create table foo (a int, b int, c int, PRIMARY KEY (a, b, c)) WITH 
> CLUSTERING ORDER BY (b DESC, c ASC);
> cqlsh:ks> INSERT INTO foo (a, b, c) VALUES (0, 2, 0);
> cqlsh:ks> INSERT INTO foo (a, b, c) VALUES (0, 1, 0);
> cqlsh:ks> INSERT INTO foo (a, b, c) VALUES (0, 1, 1);
> cqlsh:ks> INSERT INTO foo (a, b, c) VALUES (0, 0, 0);
> cqlsh:ks> SELECT * FROM foo WHERE a=0;
>  a | b | c
> ---+---+---
>  0 | 2 | 0
>  0 | 1 | 0
>  0 | 1 | 1
>  0 | 0 | 0
> (4 rows)
> cqlsh:ks> SELECT * FROM foo WHERE a=0 AND (b, c) > (1, 0);
>  a | b | c
> ---+---+---
>  0 | 2 | 0
> (1 rows)
> {noformat}
> The last query should really return {{(0, 2, 0)}} and {{(0, 1, 1)}}.
> For that specific example we should generate 2 internal slices, but I believe 
> that with more clustering columns we may have more slices.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CASSANDRA-9302) Optimize cqlsh COPY FROM, part 3

2015-11-25 Thread Adam Holmberg (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-9302?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15027176#comment-15027176
 ] 

Adam Holmberg commented on CASSANDRA-9302:
--

I'm a bit surprised by this note. If both branches are using 3.0.x variants of 
the driver there should be no API discontinuity. I think we should be referring 
to {{ColumnMeta.cql_type}} here.

> Optimize cqlsh COPY FROM, part 3
> 
>
> Key: CASSANDRA-9302
> URL: https://issues.apache.org/jira/browse/CASSANDRA-9302
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Tools
>Reporter: Jonathan Ellis
>Assignee: Stefania
>Priority: Critical
> Fix For: 2.1.x
>
>
> We've had some discussion moving to Spark CSV import for bulk load in 3.x, 
> but people need a good bulk load tool now.  One option is to add a separate 
> Java bulk load tool (CASSANDRA-9048), but if we can match that performance 
> from cqlsh I would prefer to leave COPY FROM as the preferred option to which 
> we point people, rather than adding more tools that need to be supported 
> indefinitely.
> Previous work on COPY FROM optimization was done in CASSANDRA-7405 and 
> CASSANDRA-8225.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CASSANDRA-9302) Optimize cqlsh COPY FROM, part 3

2015-11-25 Thread Adam Holmberg (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-9302?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15027191#comment-15027191
 ] 

Adam Holmberg commented on CASSANDRA-9302:
--

I see now that cassandra-2.2 branch has driver 3.0.0a3, which did not include 
the finalized 3.0 API. I recommend bundling the current driver if possible.

> Optimize cqlsh COPY FROM, part 3
> 
>
> Key: CASSANDRA-9302
> URL: https://issues.apache.org/jira/browse/CASSANDRA-9302
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Tools
>Reporter: Jonathan Ellis
>Assignee: Stefania
>Priority: Critical
> Fix For: 2.1.x
>
>
> We've had some discussion moving to Spark CSV import for bulk load in 3.x, 
> but people need a good bulk load tool now.  One option is to add a separate 
> Java bulk load tool (CASSANDRA-9048), but if we can match that performance 
> from cqlsh I would prefer to leave COPY FROM as the preferred option to which 
> we point people, rather than adding more tools that need to be supported 
> indefinitely.
> Previous work on COPY FROM optimization was done in CASSANDRA-7405 and 
> CASSANDRA-8225.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CASSANDRA-10771) bootstrap_test.py:TestBootstrap.resumable_bootstrap_test is failing

2015-11-25 Thread Philip Thompson (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-10771?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15027201#comment-15027201
 ] 

Philip Thompson commented on CASSANDRA-10771:
-

>From monitoring logs of failing tests, it appears that after node3 has 
>finished streaming in the data from node1, it never begins listening for CQL 
>clients, so the test never moves on to bringing node1 back up.

The test failure looks like:

{code}
Traceback (most recent call last):
  File "/Users/philipthompson/cstar/cassandra-dtest/tools.py", line 253, in 
wrapped
f(obj)
  File "/Users/philipthompson/cstar/cassandra-dtest/bootstrap_test.py", line 
138, in resumable_bootstrap_test
node3.watch_log_for("Starting listening for CQL clients", timeout=100)
  File "/Users/philipthompson/cstar/ccm/ccmlib/node.py", line 409, in 
watch_log_for
raise TimeoutError(time.strftime("%d %b %Y %H:%M:%S", time.gmtime()) + " [" 
+ self.name + "] Missing: " + str([e.pattern for e in tofind]) + ":\n" + 
reads[:50] + ".\nSee {} for remainder".format(filename))
TimeoutError: 25 Nov 2015 17:13:23 [node3] Missing: ['Starting listening for 
CQL clients']:
INFO  [main] 2015-11-25 12:11:04,679 YamlConfigura.
See system.log for remainder
{code}

And I see this in node3's log
{code}
java.lang.NullPointerException: Cannot suppress a null exception.
at java.lang.Throwable.addSuppressed(Throwable.java:1046) ~[na:1.8.0_51]
at 
org.apache.cassandra.streaming.StreamReader.read(StreamReader.java:121) 
~[main/:na]
at 
org.apache.cassandra.streaming.messages.IncomingFileMessage$1.deserialize(IncomingFileMessage.java:50)
 [main/:na]
at 
org.apache.cassandra.streaming.messages.IncomingFileMessage$1.deserialize(IncomingFileMessage.java:39)
 [main/:na]
at 
org.apache.cassandra.streaming.messages.StreamMessage.deserialize(StreamMessage.java:59)
 [main/:na]
at 
org.apache.cassandra.streaming.ConnectionHandler$IncomingMessageHandler.run(ConnectionHandler.java:261)
 [main/:na]
at java.lang.Thread.run(Thread.java:745) [na:1.8.0_51]
{code}

> bootstrap_test.py:TestBootstrap.resumable_bootstrap_test is failing
> ---
>
> Key: CASSANDRA-10771
> URL: https://issues.apache.org/jira/browse/CASSANDRA-10771
> Project: Cassandra
>  Issue Type: Sub-task
>  Components: Streaming and Messaging
>Reporter: Philip Thompson
> Fix For: 3.0.1, 3.1
>
>
> When running {{bootstrap_test.py:TestBootstrap.resumable_bootstrap_test}} 
> locally, the test is failing on cassandra-3.0. When I bisect the failure, I 
> find that 87f5e2e39c100, the commit that merged CASSANDRA-10557 into 3.0 is 
> the first failing commit. I can reproduce this consistently locally, but 
> cassci is only having intermittent failures.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Created] (CASSANDRA-10771) bootstrap_test.py:TestBootstrap.resumable_bootstrap_test is failing

2015-11-25 Thread Philip Thompson (JIRA)
Philip Thompson created CASSANDRA-10771:
---

 Summary: bootstrap_test.py:TestBootstrap.resumable_bootstrap_test 
is failing
 Key: CASSANDRA-10771
 URL: https://issues.apache.org/jira/browse/CASSANDRA-10771
 Project: Cassandra
  Issue Type: Sub-task
  Components: Streaming and Messaging
Reporter: Philip Thompson
 Fix For: 3.0.1, 3.1


When running {{bootstrap_test.py:TestBootstrap.resumable_bootstrap_test}} 
locally, the test is failing on cassandra-3.0. When I bisect the failure, I 
find that 87f5e2e39c100, the commit that merged CASSANDRA-10557 into 3.0 is the 
first failing commit. I can reproduce this consistently locally, but cassci is 
only having intermittent failures.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (CASSANDRA-8639) Can OOM on CL replay with dense mutations

2015-11-25 Thread Ariel Weisberg (JIRA)

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

Ariel Weisberg updated CASSANDRA-8639:
--
Reviewer: T Jake Luciani

> Can OOM on CL replay with dense mutations
> -
>
> Key: CASSANDRA-8639
> URL: https://issues.apache.org/jira/browse/CASSANDRA-8639
> Project: Cassandra
>  Issue Type: Bug
>Reporter: T Jake Luciani
>Assignee: Ariel Weisberg
>Priority: Minor
> Fix For: 2.1.x
>
>
> If you write dense mutations with many clustering keys, the replay of the CL 
> can quickly overwhelm a node on startup.  This looks to be caused by the fact 
> we only ensure there are 1000 mutations in flight at a time. but those 
> mutations could have thousands of cells in them.
> A better approach would be to limit the CL replay to the amount of memory in 
> flight using cell.unsharedHeapSize()



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


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

2015-11-25 Thread tylerhobbs
Merge branch 'cassandra-2.1' into cassandra-2.2


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

Branch: refs/heads/cassandra-2.2
Commit: a90c3b2b85daa9cbc3fc41b823c08a4a87afd768
Parents: 3841f9c 68ea4ed
Author: Tyler Hobbs 
Authored: Wed Nov 25 11:56:16 2015 -0600
Committer: Tyler Hobbs 
Committed: Wed Nov 25 11:56:16 2015 -0600

--
 CHANGES.txt  | 1 +
 bin/cqlsh.py | 2 ++
 2 files changed, 3 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/a90c3b2b/CHANGES.txt
--
diff --cc CHANGES.txt
index a274ea9,8548d71..5ff53b6
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,17 -1,6 +1,18 @@@
 -2.1.12
 +2.2.4
 + * Don't do anticompaction after subrange repair (CASSANDRA-10422)
 + * Fix SimpleDateType type compatibility (CASSANDRA-10027)
 + * (Hadoop) fix splits calculation (CASSANDRA-10640)
 + * (Hadoop) ensure that Cluster instances are always closed (CASSANDRA-10058)
 + * (cqlsh) show partial trace if incomplete after max_trace_wait 
(CASSANDRA-7645)
 + * Use most up-to-date version of schema for system tables (CASSANDRA-10652)
 + * Deprecate memory_allocator in cassandra.yaml (CASSANDRA-10581,10628)
 + * Expose phi values from failure detector via JMX and tweak debug
 +   and trace logging (CASSANDRA-9526)
 + * Fix RangeNamesQueryPager (CASSANDRA-10509)
 + * Deprecate Pig support (CASSANDRA-10542)
 + * Reduce contention getting instances of CompositeType (CASSANDRA-10433)
 +Merged from 2.1:
+  * (cqlsh) Print column names before COPY operation (CASSANDRA-8935)
 - * Add Native-Transport-Requests back to tpstats (CASSANDRA-10044)
   * Make paging logic consistent between searcher impls (CASSANDRA-10683)
   * Fix CompressedInputStream for proper cleanup (CASSANDRA-10012)
   * (cqlsh) Support counters in COPY commands (CASSANDRA-9043)



cassandra git commit: cqlsh: print column names before COPY operation

2015-11-25 Thread tylerhobbs
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-2.1 5cafe8606 -> 68ea4edb3


cqlsh: print column names before COPY operation

Patch by Michael Edge; reviewed by Tyler Hobbs for CASSANDRA-8935


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

Branch: refs/heads/cassandra-2.1
Commit: 68ea4edb33a9907a1a2e1cde0374a52225b519b0
Parents: 5cafe86
Author: Michael Edge 
Authored: Wed Nov 25 11:54:11 2015 -0600
Committer: Tyler Hobbs 
Committed: Wed Nov 25 11:54:11 2015 -0600

--
 CHANGES.txt | 1 +
 bin/cqlsh   | 2 ++
 2 files changed, 3 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/68ea4edb/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 6f69f03..8548d71 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.1.12
+ * (cqlsh) Print column names before COPY operation (CASSANDRA-8935)
  * Add Native-Transport-Requests back to tpstats (CASSANDRA-10044)
  * Make paging logic consistent between searcher impls (CASSANDRA-10683)
  * Fix CompressedInputStream for proper cleanup (CASSANDRA-10012)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/68ea4edb/bin/cqlsh
--
diff --git a/bin/cqlsh b/bin/cqlsh
index f4bedcd..3e830b5 100755
--- a/bin/cqlsh
+++ b/bin/cqlsh
@@ -1551,6 +1551,8 @@ class Shell(cmd.Cmd):
 cleancopyoptvals = [optval.decode('string-escape') for optval in 
copyoptvals]
 opts = dict(zip(copyoptnames, cleancopyoptvals))
 
+print "\nStarting copy of %s.%s with columns %s." % (ks, cf, columns)
+
 timestart = time.time()
 
 direction = parsed.get_binding('dir').upper()



[1/6] cassandra git commit: Add the missing Native-Transport-Requests in tpstats back

2015-11-25 Thread tylerhobbs
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-3.0 a0076e70e -> 9b3b3ca00


Add the missing Native-Transport-Requests in tpstats back

Patch by Wei Deng; reviewed by tjake for CASSANDRA-10044


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

Branch: refs/heads/cassandra-3.0
Commit: 5cafe8606fa1f28b535c69c57f78593c4e6ea85a
Parents: f5a09c1
Author: Wei Deng 
Authored: Mon Aug 10 22:57:49 2015 -0600
Committer: T Jake Luciani 
Committed: Wed Nov 25 09:19:21 2015 -0500

--
 CHANGES.txt| 1 +
 src/java/org/apache/cassandra/tools/NodeProbe.java | 3 ++-
 2 files changed, 3 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/5cafe860/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 91f4577..6f69f03 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.1.12
+ * Add Native-Transport-Requests back to tpstats (CASSANDRA-10044)
  * Make paging logic consistent between searcher impls (CASSANDRA-10683)
  * Fix CompressedInputStream for proper cleanup (CASSANDRA-10012)
  * (cqlsh) Support counters in COPY commands (CASSANDRA-9043)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/5cafe860/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 49c493d..5ba5a32 100644
--- a/src/java/org/apache/cassandra/tools/NodeProbe.java
+++ b/src/java/org/apache/cassandra/tools/NodeProbe.java
@@ -1380,7 +1380,8 @@ class ThreadPoolProxyMBeanIterator implements 
Iterator requests = mbeanServerConn.queryNames(new 
ObjectName("org.apache.cassandra.request:type=*"), null);
 Set internal = mbeanServerConn.queryNames(new 
ObjectName("org.apache.cassandra.internal:type=*"), null);
-resIter = Iterables.concat(requests, internal).iterator();
+Set transport = mbeanServerConn.queryNames(new 
ObjectName("org.apache.cassandra.transport:type=*"), null);
+resIter = Iterables.concat(requests, internal, transport).iterator();
 this.mbeanServerConn = mbeanServerConn;
 }
 



[6/6] cassandra git commit: Merge branch 'cassandra-2.2' into cassandra-3.0

2015-11-25 Thread tylerhobbs
Merge branch 'cassandra-2.2' into cassandra-3.0

Conflicts:
CHANGES.txt


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

Branch: refs/heads/cassandra-3.0
Commit: 9b3b3ca00f71a4ae38149194e3c8c7c448974275
Parents: a0076e7 a90c3b2
Author: Tyler Hobbs 
Authored: Wed Nov 25 11:57:24 2015 -0600
Committer: Tyler Hobbs 
Committed: Wed Nov 25 11:57:24 2015 -0600

--
 CHANGES.txt  | 1 +
 bin/cqlsh.py | 2 ++
 2 files changed, 3 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/9b3b3ca0/CHANGES.txt
--
diff --cc CHANGES.txt
index 513e682,5ff53b6..f95f079
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -13,7 -3,17 +13,8 @@@ Merged from 2.2
   * Fix SimpleDateType type compatibility (CASSANDRA-10027)
   * (Hadoop) fix splits calculation (CASSANDRA-10640)
   * (Hadoop) ensure that Cluster instances are always closed (CASSANDRA-10058)
 - * (cqlsh) show partial trace if incomplete after max_trace_wait 
(CASSANDRA-7645)
 - * Use most up-to-date version of schema for system tables (CASSANDRA-10652)
 - * Deprecate memory_allocator in cassandra.yaml (CASSANDRA-10581,10628)
 - * Expose phi values from failure detector via JMX and tweak debug
 -   and trace logging (CASSANDRA-9526)
 - * Fix RangeNamesQueryPager (CASSANDRA-10509)
 - * Deprecate Pig support (CASSANDRA-10542)
 - * Reduce contention getting instances of CompositeType (CASSANDRA-10433)
  Merged from 2.1:
+  * (cqlsh) Print column names before COPY operation (CASSANDRA-8935)
 - * Make paging logic consistent between searcher impls (CASSANDRA-10683)
   * Fix CompressedInputStream for proper cleanup (CASSANDRA-10012)
   * (cqlsh) Support counters in COPY commands (CASSANDRA-9043)
   * Try next replica if not possible to connect to primary replica on

http://git-wip-us.apache.org/repos/asf/cassandra/blob/9b3b3ca0/bin/cqlsh.py
--



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

2015-11-25 Thread tylerhobbs
Merge branch 'cassandra-2.1' into cassandra-2.2


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

Branch: refs/heads/cassandra-3.1
Commit: 3841f9cb2041a7af43cbda3ff7c85e78216a6d22
Parents: a907533 5cafe86
Author: T Jake Luciani 
Authored: Wed Nov 25 09:21:41 2015 -0500
Committer: T Jake Luciani 
Committed: Wed Nov 25 09:21:41 2015 -0500

--

--




[3/6] cassandra git commit: cqlsh: print column names before COPY operation

2015-11-25 Thread tylerhobbs
cqlsh: print column names before COPY operation

Patch by Michael Edge; reviewed by Tyler Hobbs for CASSANDRA-8935


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

Branch: refs/heads/cassandra-3.0
Commit: 68ea4edb33a9907a1a2e1cde0374a52225b519b0
Parents: 5cafe86
Author: Michael Edge 
Authored: Wed Nov 25 11:54:11 2015 -0600
Committer: Tyler Hobbs 
Committed: Wed Nov 25 11:54:11 2015 -0600

--
 CHANGES.txt | 1 +
 bin/cqlsh   | 2 ++
 2 files changed, 3 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/68ea4edb/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 6f69f03..8548d71 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.1.12
+ * (cqlsh) Print column names before COPY operation (CASSANDRA-8935)
  * Add Native-Transport-Requests back to tpstats (CASSANDRA-10044)
  * Make paging logic consistent between searcher impls (CASSANDRA-10683)
  * Fix CompressedInputStream for proper cleanup (CASSANDRA-10012)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/68ea4edb/bin/cqlsh
--
diff --git a/bin/cqlsh b/bin/cqlsh
index f4bedcd..3e830b5 100755
--- a/bin/cqlsh
+++ b/bin/cqlsh
@@ -1551,6 +1551,8 @@ class Shell(cmd.Cmd):
 cleancopyoptvals = [optval.decode('string-escape') for optval in 
copyoptvals]
 opts = dict(zip(copyoptnames, cleancopyoptvals))
 
+print "\nStarting copy of %s.%s with columns %s." % (ks, cf, columns)
+
 timestart = time.time()
 
 direction = parsed.get_binding('dir').upper()



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

2015-11-25 Thread tylerhobbs
Merge branch 'cassandra-2.1' into cassandra-2.2


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

Branch: refs/heads/cassandra-3.1
Commit: a90c3b2b85daa9cbc3fc41b823c08a4a87afd768
Parents: 3841f9c 68ea4ed
Author: Tyler Hobbs 
Authored: Wed Nov 25 11:56:16 2015 -0600
Committer: Tyler Hobbs 
Committed: Wed Nov 25 11:56:16 2015 -0600

--
 CHANGES.txt  | 1 +
 bin/cqlsh.py | 2 ++
 2 files changed, 3 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/a90c3b2b/CHANGES.txt
--
diff --cc CHANGES.txt
index a274ea9,8548d71..5ff53b6
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,17 -1,6 +1,18 @@@
 -2.1.12
 +2.2.4
 + * Don't do anticompaction after subrange repair (CASSANDRA-10422)
 + * Fix SimpleDateType type compatibility (CASSANDRA-10027)
 + * (Hadoop) fix splits calculation (CASSANDRA-10640)
 + * (Hadoop) ensure that Cluster instances are always closed (CASSANDRA-10058)
 + * (cqlsh) show partial trace if incomplete after max_trace_wait 
(CASSANDRA-7645)
 + * Use most up-to-date version of schema for system tables (CASSANDRA-10652)
 + * Deprecate memory_allocator in cassandra.yaml (CASSANDRA-10581,10628)
 + * Expose phi values from failure detector via JMX and tweak debug
 +   and trace logging (CASSANDRA-9526)
 + * Fix RangeNamesQueryPager (CASSANDRA-10509)
 + * Deprecate Pig support (CASSANDRA-10542)
 + * Reduce contention getting instances of CompositeType (CASSANDRA-10433)
 +Merged from 2.1:
+  * (cqlsh) Print column names before COPY operation (CASSANDRA-8935)
 - * Add Native-Transport-Requests back to tpstats (CASSANDRA-10044)
   * Make paging logic consistent between searcher impls (CASSANDRA-10683)
   * Fix CompressedInputStream for proper cleanup (CASSANDRA-10012)
   * (cqlsh) Support counters in COPY commands (CASSANDRA-9043)



[7/7] cassandra git commit: Merge branch 'cassandra-3.0' into cassandra-3.1

2015-11-25 Thread tylerhobbs
Merge branch 'cassandra-3.0' into cassandra-3.1


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

Branch: refs/heads/cassandra-3.1
Commit: c1b1aec19ca8a2038a5878334efe40a092ed1be0
Parents: af089f6 9b3b3ca
Author: Tyler Hobbs 
Authored: Wed Nov 25 11:57:49 2015 -0600
Committer: Tyler Hobbs 
Committed: Wed Nov 25 11:57:49 2015 -0600

--
 CHANGES.txt  | 1 +
 bin/cqlsh.py | 2 ++
 2 files changed, 3 insertions(+)
--


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



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

2015-11-25 Thread tylerhobbs
Merge branch 'cassandra-2.1' into cassandra-2.2


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

Branch: refs/heads/trunk
Commit: a90c3b2b85daa9cbc3fc41b823c08a4a87afd768
Parents: 3841f9c 68ea4ed
Author: Tyler Hobbs 
Authored: Wed Nov 25 11:56:16 2015 -0600
Committer: Tyler Hobbs 
Committed: Wed Nov 25 11:56:16 2015 -0600

--
 CHANGES.txt  | 1 +
 bin/cqlsh.py | 2 ++
 2 files changed, 3 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/a90c3b2b/CHANGES.txt
--
diff --cc CHANGES.txt
index a274ea9,8548d71..5ff53b6
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,17 -1,6 +1,18 @@@
 -2.1.12
 +2.2.4
 + * Don't do anticompaction after subrange repair (CASSANDRA-10422)
 + * Fix SimpleDateType type compatibility (CASSANDRA-10027)
 + * (Hadoop) fix splits calculation (CASSANDRA-10640)
 + * (Hadoop) ensure that Cluster instances are always closed (CASSANDRA-10058)
 + * (cqlsh) show partial trace if incomplete after max_trace_wait 
(CASSANDRA-7645)
 + * Use most up-to-date version of schema for system tables (CASSANDRA-10652)
 + * Deprecate memory_allocator in cassandra.yaml (CASSANDRA-10581,10628)
 + * Expose phi values from failure detector via JMX and tweak debug
 +   and trace logging (CASSANDRA-9526)
 + * Fix RangeNamesQueryPager (CASSANDRA-10509)
 + * Deprecate Pig support (CASSANDRA-10542)
 + * Reduce contention getting instances of CompositeType (CASSANDRA-10433)
 +Merged from 2.1:
+  * (cqlsh) Print column names before COPY operation (CASSANDRA-8935)
 - * Add Native-Transport-Requests back to tpstats (CASSANDRA-10044)
   * Make paging logic consistent between searcher impls (CASSANDRA-10683)
   * Fix CompressedInputStream for proper cleanup (CASSANDRA-10012)
   * (cqlsh) Support counters in COPY commands (CASSANDRA-9043)



[1/7] cassandra git commit: Add the missing Native-Transport-Requests in tpstats back

2015-11-25 Thread tylerhobbs
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-3.1 af089f6ff -> c1b1aec19


Add the missing Native-Transport-Requests in tpstats back

Patch by Wei Deng; reviewed by tjake for CASSANDRA-10044


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

Branch: refs/heads/cassandra-3.1
Commit: 5cafe8606fa1f28b535c69c57f78593c4e6ea85a
Parents: f5a09c1
Author: Wei Deng 
Authored: Mon Aug 10 22:57:49 2015 -0600
Committer: T Jake Luciani 
Committed: Wed Nov 25 09:19:21 2015 -0500

--
 CHANGES.txt| 1 +
 src/java/org/apache/cassandra/tools/NodeProbe.java | 3 ++-
 2 files changed, 3 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/5cafe860/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 91f4577..6f69f03 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.1.12
+ * Add Native-Transport-Requests back to tpstats (CASSANDRA-10044)
  * Make paging logic consistent between searcher impls (CASSANDRA-10683)
  * Fix CompressedInputStream for proper cleanup (CASSANDRA-10012)
  * (cqlsh) Support counters in COPY commands (CASSANDRA-9043)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/5cafe860/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 49c493d..5ba5a32 100644
--- a/src/java/org/apache/cassandra/tools/NodeProbe.java
+++ b/src/java/org/apache/cassandra/tools/NodeProbe.java
@@ -1380,7 +1380,8 @@ class ThreadPoolProxyMBeanIterator implements 
Iterator requests = mbeanServerConn.queryNames(new 
ObjectName("org.apache.cassandra.request:type=*"), null);
 Set internal = mbeanServerConn.queryNames(new 
ObjectName("org.apache.cassandra.internal:type=*"), null);
-resIter = Iterables.concat(requests, internal).iterator();
+Set transport = mbeanServerConn.queryNames(new 
ObjectName("org.apache.cassandra.transport:type=*"), null);
+resIter = Iterables.concat(requests, internal, transport).iterator();
 this.mbeanServerConn = mbeanServerConn;
 }
 



[1/3] cassandra git commit: cqlsh: print column names before COPY operation

2015-11-25 Thread tylerhobbs
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-2.2 3841f9cb2 -> a90c3b2b8


cqlsh: print column names before COPY operation

Patch by Michael Edge; reviewed by Tyler Hobbs for CASSANDRA-8935


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

Branch: refs/heads/cassandra-2.2
Commit: 68ea4edb33a9907a1a2e1cde0374a52225b519b0
Parents: 5cafe86
Author: Michael Edge 
Authored: Wed Nov 25 11:54:11 2015 -0600
Committer: Tyler Hobbs 
Committed: Wed Nov 25 11:54:11 2015 -0600

--
 CHANGES.txt | 1 +
 bin/cqlsh   | 2 ++
 2 files changed, 3 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/68ea4edb/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 6f69f03..8548d71 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.1.12
+ * (cqlsh) Print column names before COPY operation (CASSANDRA-8935)
  * Add Native-Transport-Requests back to tpstats (CASSANDRA-10044)
  * Make paging logic consistent between searcher impls (CASSANDRA-10683)
  * Fix CompressedInputStream for proper cleanup (CASSANDRA-10012)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/68ea4edb/bin/cqlsh
--
diff --git a/bin/cqlsh b/bin/cqlsh
index f4bedcd..3e830b5 100755
--- a/bin/cqlsh
+++ b/bin/cqlsh
@@ -1551,6 +1551,8 @@ class Shell(cmd.Cmd):
 cleancopyoptvals = [optval.decode('string-escape') for optval in 
copyoptvals]
 opts = dict(zip(copyoptnames, cleancopyoptvals))
 
+print "\nStarting copy of %s.%s with columns %s." % (ks, cf, columns)
+
 timestart = time.time()
 
 direction = parsed.get_binding('dir').upper()



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

2015-11-25 Thread tylerhobbs
http://git-wip-us.apache.org/repos/asf/cassandra/blob/a90c3b2b/bin/cqlsh.py
--
diff --cc bin/cqlsh.py
index ffcbcbd,000..28054ba
mode 100644,00..100644
--- a/bin/cqlsh.py
+++ b/bin/cqlsh.py
@@@ -1,2699 -1,0 +1,2701 @@@
 +#!/bin/sh
 +# -*- mode: Python -*-
 +
 +# Licensed to the Apache Software Foundation (ASF) under one
 +# or more contributor license agreements.  See the NOTICE file
 +# distributed with this work for additional information
 +# regarding copyright ownership.  The ASF licenses this file
 +# to you under the Apache License, Version 2.0 (the
 +# "License"); you may not use this file except in compliance
 +# with the License.  You may obtain a copy of the License at
 +#
 +# http://www.apache.org/licenses/LICENSE-2.0
 +#
 +# Unless required by applicable law or agreed to in writing, software
 +# distributed under the License is distributed on an "AS IS" BASIS,
 +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 +# See the License for the specific language governing permissions and
 +# limitations under the License.
 +
 +""":"
 +# bash code here; finds a suitable python interpreter and execs this file.
 +# prefer unqualified "python" if suitable:
 +python -c 'import sys; sys.exit(not (0x020500b0 < sys.hexversion < 
0x0300))' 2>/dev/null \
 +&& exec python "$0" "$@"
 +for pyver in 2.6 2.7 2.5; do
 +which python$pyver > /dev/null 2>&1 && exec python$pyver "$0" "$@"
 +done
 +echo "No appropriate python interpreter found." >&2
 +exit 1
 +":"""
 +
 +from __future__ import with_statement
 +
 +import cmd
 +import codecs
 +import ConfigParser
 +import csv
 +import getpass
 +import locale
 +import multiprocessing as mp
 +import optparse
 +import os
 +import platform
 +import sys
 +import time
 +import traceback
 +import warnings
 +from contextlib import contextmanager
 +from functools import partial
 +from glob import glob
 +from StringIO import StringIO
 +from uuid import UUID
 +
 +if sys.version_info[0] != 2 or sys.version_info[1] != 7:
 +sys.exit("\nCQL Shell supports only Python 2.7\n")
 +
 +description = "CQL Shell for Apache Cassandra"
 +version = "5.0.1"
 +
 +readline = None
 +try:
 +# check if tty first, cause readline doesn't check, and only cares
 +# about $TERM. we don't want the funky escape code stuff to be
 +# output if not a tty.
 +if sys.stdin.isatty():
 +import readline
 +except ImportError:
 +pass
 +
 +CQL_LIB_PREFIX = 'cassandra-driver-internal-only-'
 +
 +CASSANDRA_PATH = os.path.join(os.path.dirname(os.path.realpath(__file__)), 
'..')
 +
 +# use bundled libs for python-cql and thrift, if available. if there
 +# is a ../lib dir, use bundled libs there preferentially.
 +ZIPLIB_DIRS = [os.path.join(CASSANDRA_PATH, 'lib')]
 +myplatform = platform.system()
 +if myplatform == 'Linux':
 +ZIPLIB_DIRS.append('/usr/share/cassandra/lib')
 +
 +if os.environ.get('CQLSH_NO_BUNDLED', ''):
 +ZIPLIB_DIRS = ()
 +
 +
 +def find_zip(libprefix):
 +for ziplibdir in ZIPLIB_DIRS:
 +zips = glob(os.path.join(ziplibdir, libprefix + '*.zip'))
 +if zips:
 +return max(zips)   # probably the highest version, if multiple
 +
 +cql_zip = find_zip(CQL_LIB_PREFIX)
 +if cql_zip:
 +ver = os.path.splitext(os.path.basename(cql_zip))[0][len(CQL_LIB_PREFIX):]
 +sys.path.insert(0, os.path.join(cql_zip, 'cassandra-driver-' + ver))
 +
 +third_parties = ('futures-', 'six-')
 +
 +for lib in third_parties:
 +lib_zip = find_zip(lib)
 +if lib_zip:
 +sys.path.insert(0, lib_zip)
 +
 +warnings.filterwarnings("ignore", r".*blist.*")
 +try:
 +import cassandra
 +except ImportError, e:
 +sys.exit("\nPython Cassandra driver not installed, or not on 
PYTHONPATH.\n"
 + 'You might try "pip install cassandra-driver".\n\n'
 + 'Python: %s\n'
 + 'Module load path: %r\n\n'
 + 'Error: %s\n' % (sys.executable, sys.path, e))
 +
 +from cassandra.auth import PlainTextAuthProvider
 +from cassandra.cluster import Cluster
 +from cassandra.metadata import (ColumnMetadata, KeyspaceMetadata,
 +TableMetadata, protect_name, protect_names,
 +protect_value)
 +from cassandra.policies import WhiteListRoundRobinPolicy
 +from cassandra.protocol import QueryMessage, ResultMessage
 +from cassandra.query import SimpleStatement, ordered_dict_factory, 
TraceUnavailable
 +
 +# cqlsh should run correctly when run out of a Cassandra source tree,
 +# out of an unpacked Cassandra tarball, and after a proper package install.
 +cqlshlibdir = os.path.join(CASSANDRA_PATH, 'pylib')
 +if os.path.isdir(cqlshlibdir):
 +sys.path.insert(0, cqlshlibdir)
 +
 +from cqlshlib import cql3handling, cqlhandling, pylexotron, sslhandling, copy
 +from cqlshlib.displaying import (ANSI_RESET, BLUE, COLUMN_NAME_COLORS, CYAN,
 + RED, Form

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

2015-11-25 Thread tylerhobbs
Merge branch 'cassandra-2.1' into cassandra-2.2


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

Branch: refs/heads/cassandra-3.0
Commit: 3841f9cb2041a7af43cbda3ff7c85e78216a6d22
Parents: a907533 5cafe86
Author: T Jake Luciani 
Authored: Wed Nov 25 09:21:41 2015 -0500
Committer: T Jake Luciani 
Committed: Wed Nov 25 09:21:41 2015 -0500

--

--




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

2015-11-25 Thread tylerhobbs
http://git-wip-us.apache.org/repos/asf/cassandra/blob/a90c3b2b/bin/cqlsh.py
--
diff --cc bin/cqlsh.py
index ffcbcbd,000..28054ba
mode 100644,00..100644
--- a/bin/cqlsh.py
+++ b/bin/cqlsh.py
@@@ -1,2699 -1,0 +1,2701 @@@
 +#!/bin/sh
 +# -*- mode: Python -*-
 +
 +# Licensed to the Apache Software Foundation (ASF) under one
 +# or more contributor license agreements.  See the NOTICE file
 +# distributed with this work for additional information
 +# regarding copyright ownership.  The ASF licenses this file
 +# to you under the Apache License, Version 2.0 (the
 +# "License"); you may not use this file except in compliance
 +# with the License.  You may obtain a copy of the License at
 +#
 +# http://www.apache.org/licenses/LICENSE-2.0
 +#
 +# Unless required by applicable law or agreed to in writing, software
 +# distributed under the License is distributed on an "AS IS" BASIS,
 +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 +# See the License for the specific language governing permissions and
 +# limitations under the License.
 +
 +""":"
 +# bash code here; finds a suitable python interpreter and execs this file.
 +# prefer unqualified "python" if suitable:
 +python -c 'import sys; sys.exit(not (0x020500b0 < sys.hexversion < 
0x0300))' 2>/dev/null \
 +&& exec python "$0" "$@"
 +for pyver in 2.6 2.7 2.5; do
 +which python$pyver > /dev/null 2>&1 && exec python$pyver "$0" "$@"
 +done
 +echo "No appropriate python interpreter found." >&2
 +exit 1
 +":"""
 +
 +from __future__ import with_statement
 +
 +import cmd
 +import codecs
 +import ConfigParser
 +import csv
 +import getpass
 +import locale
 +import multiprocessing as mp
 +import optparse
 +import os
 +import platform
 +import sys
 +import time
 +import traceback
 +import warnings
 +from contextlib import contextmanager
 +from functools import partial
 +from glob import glob
 +from StringIO import StringIO
 +from uuid import UUID
 +
 +if sys.version_info[0] != 2 or sys.version_info[1] != 7:
 +sys.exit("\nCQL Shell supports only Python 2.7\n")
 +
 +description = "CQL Shell for Apache Cassandra"
 +version = "5.0.1"
 +
 +readline = None
 +try:
 +# check if tty first, cause readline doesn't check, and only cares
 +# about $TERM. we don't want the funky escape code stuff to be
 +# output if not a tty.
 +if sys.stdin.isatty():
 +import readline
 +except ImportError:
 +pass
 +
 +CQL_LIB_PREFIX = 'cassandra-driver-internal-only-'
 +
 +CASSANDRA_PATH = os.path.join(os.path.dirname(os.path.realpath(__file__)), 
'..')
 +
 +# use bundled libs for python-cql and thrift, if available. if there
 +# is a ../lib dir, use bundled libs there preferentially.
 +ZIPLIB_DIRS = [os.path.join(CASSANDRA_PATH, 'lib')]
 +myplatform = platform.system()
 +if myplatform == 'Linux':
 +ZIPLIB_DIRS.append('/usr/share/cassandra/lib')
 +
 +if os.environ.get('CQLSH_NO_BUNDLED', ''):
 +ZIPLIB_DIRS = ()
 +
 +
 +def find_zip(libprefix):
 +for ziplibdir in ZIPLIB_DIRS:
 +zips = glob(os.path.join(ziplibdir, libprefix + '*.zip'))
 +if zips:
 +return max(zips)   # probably the highest version, if multiple
 +
 +cql_zip = find_zip(CQL_LIB_PREFIX)
 +if cql_zip:
 +ver = os.path.splitext(os.path.basename(cql_zip))[0][len(CQL_LIB_PREFIX):]
 +sys.path.insert(0, os.path.join(cql_zip, 'cassandra-driver-' + ver))
 +
 +third_parties = ('futures-', 'six-')
 +
 +for lib in third_parties:
 +lib_zip = find_zip(lib)
 +if lib_zip:
 +sys.path.insert(0, lib_zip)
 +
 +warnings.filterwarnings("ignore", r".*blist.*")
 +try:
 +import cassandra
 +except ImportError, e:
 +sys.exit("\nPython Cassandra driver not installed, or not on 
PYTHONPATH.\n"
 + 'You might try "pip install cassandra-driver".\n\n'
 + 'Python: %s\n'
 + 'Module load path: %r\n\n'
 + 'Error: %s\n' % (sys.executable, sys.path, e))
 +
 +from cassandra.auth import PlainTextAuthProvider
 +from cassandra.cluster import Cluster
 +from cassandra.metadata import (ColumnMetadata, KeyspaceMetadata,
 +TableMetadata, protect_name, protect_names,
 +protect_value)
 +from cassandra.policies import WhiteListRoundRobinPolicy
 +from cassandra.protocol import QueryMessage, ResultMessage
 +from cassandra.query import SimpleStatement, ordered_dict_factory, 
TraceUnavailable
 +
 +# cqlsh should run correctly when run out of a Cassandra source tree,
 +# out of an unpacked Cassandra tarball, and after a proper package install.
 +cqlshlibdir = os.path.join(CASSANDRA_PATH, 'pylib')
 +if os.path.isdir(cqlshlibdir):
 +sys.path.insert(0, cqlshlibdir)
 +
 +from cqlshlib import cql3handling, cqlhandling, pylexotron, sslhandling, copy
 +from cqlshlib.displaying import (ANSI_RESET, BLUE, COLUMN_NAME_COLORS, CYAN,
 + RED, Form

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

2015-11-25 Thread tylerhobbs
Merge branch 'cassandra-2.1' into cassandra-2.2


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

Branch: refs/heads/cassandra-3.0
Commit: a90c3b2b85daa9cbc3fc41b823c08a4a87afd768
Parents: 3841f9c 68ea4ed
Author: Tyler Hobbs 
Authored: Wed Nov 25 11:56:16 2015 -0600
Committer: Tyler Hobbs 
Committed: Wed Nov 25 11:56:16 2015 -0600

--
 CHANGES.txt  | 1 +
 bin/cqlsh.py | 2 ++
 2 files changed, 3 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/a90c3b2b/CHANGES.txt
--
diff --cc CHANGES.txt
index a274ea9,8548d71..5ff53b6
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,17 -1,6 +1,18 @@@
 -2.1.12
 +2.2.4
 + * Don't do anticompaction after subrange repair (CASSANDRA-10422)
 + * Fix SimpleDateType type compatibility (CASSANDRA-10027)
 + * (Hadoop) fix splits calculation (CASSANDRA-10640)
 + * (Hadoop) ensure that Cluster instances are always closed (CASSANDRA-10058)
 + * (cqlsh) show partial trace if incomplete after max_trace_wait 
(CASSANDRA-7645)
 + * Use most up-to-date version of schema for system tables (CASSANDRA-10652)
 + * Deprecate memory_allocator in cassandra.yaml (CASSANDRA-10581,10628)
 + * Expose phi values from failure detector via JMX and tweak debug
 +   and trace logging (CASSANDRA-9526)
 + * Fix RangeNamesQueryPager (CASSANDRA-10509)
 + * Deprecate Pig support (CASSANDRA-10542)
 + * Reduce contention getting instances of CompositeType (CASSANDRA-10433)
 +Merged from 2.1:
+  * (cqlsh) Print column names before COPY operation (CASSANDRA-8935)
 - * Add Native-Transport-Requests back to tpstats (CASSANDRA-10044)
   * Make paging logic consistent between searcher impls (CASSANDRA-10683)
   * Fix CompressedInputStream for proper cleanup (CASSANDRA-10012)
   * (cqlsh) Support counters in COPY commands (CASSANDRA-9043)



[7/8] cassandra git commit: Merge branch 'cassandra-3.0' into cassandra-3.1

2015-11-25 Thread tylerhobbs
Merge branch 'cassandra-3.0' into cassandra-3.1


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

Branch: refs/heads/trunk
Commit: c1b1aec19ca8a2038a5878334efe40a092ed1be0
Parents: af089f6 9b3b3ca
Author: Tyler Hobbs 
Authored: Wed Nov 25 11:57:49 2015 -0600
Committer: Tyler Hobbs 
Committed: Wed Nov 25 11:57:49 2015 -0600

--
 CHANGES.txt  | 1 +
 bin/cqlsh.py | 2 ++
 2 files changed, 3 insertions(+)
--


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



[8/8] cassandra git commit: Merge branch 'cassandra-3.1' into trunk

2015-11-25 Thread tylerhobbs
Merge branch 'cassandra-3.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/49a5074c
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/49a5074c
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/49a5074c

Branch: refs/heads/trunk
Commit: 49a5074c7b9135bae105309a562849d5d474a78b
Parents: d58a50b c1b1aec
Author: Tyler Hobbs 
Authored: Wed Nov 25 11:58:09 2015 -0600
Committer: Tyler Hobbs 
Committed: Wed Nov 25 11:58:09 2015 -0600

--
 CHANGES.txt  | 1 +
 bin/cqlsh.py | 2 ++
 2 files changed, 3 insertions(+)
--


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



[3/8] cassandra git commit: cqlsh: print column names before COPY operation

2015-11-25 Thread tylerhobbs
cqlsh: print column names before COPY operation

Patch by Michael Edge; reviewed by Tyler Hobbs for CASSANDRA-8935


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

Branch: refs/heads/trunk
Commit: 68ea4edb33a9907a1a2e1cde0374a52225b519b0
Parents: 5cafe86
Author: Michael Edge 
Authored: Wed Nov 25 11:54:11 2015 -0600
Committer: Tyler Hobbs 
Committed: Wed Nov 25 11:54:11 2015 -0600

--
 CHANGES.txt | 1 +
 bin/cqlsh   | 2 ++
 2 files changed, 3 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/68ea4edb/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 6f69f03..8548d71 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.1.12
+ * (cqlsh) Print column names before COPY operation (CASSANDRA-8935)
  * Add Native-Transport-Requests back to tpstats (CASSANDRA-10044)
  * Make paging logic consistent between searcher impls (CASSANDRA-10683)
  * Fix CompressedInputStream for proper cleanup (CASSANDRA-10012)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/68ea4edb/bin/cqlsh
--
diff --git a/bin/cqlsh b/bin/cqlsh
index f4bedcd..3e830b5 100755
--- a/bin/cqlsh
+++ b/bin/cqlsh
@@ -1551,6 +1551,8 @@ class Shell(cmd.Cmd):
 cleancopyoptvals = [optval.decode('string-escape') for optval in 
copyoptvals]
 opts = dict(zip(copyoptnames, cleancopyoptvals))
 
+print "\nStarting copy of %s.%s with columns %s." % (ks, cf, columns)
+
 timestart = time.time()
 
 direction = parsed.get_binding('dir').upper()



[6/8] cassandra git commit: Merge branch 'cassandra-2.2' into cassandra-3.0

2015-11-25 Thread tylerhobbs
Merge branch 'cassandra-2.2' into cassandra-3.0

Conflicts:
CHANGES.txt


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

Branch: refs/heads/trunk
Commit: 9b3b3ca00f71a4ae38149194e3c8c7c448974275
Parents: a0076e7 a90c3b2
Author: Tyler Hobbs 
Authored: Wed Nov 25 11:57:24 2015 -0600
Committer: Tyler Hobbs 
Committed: Wed Nov 25 11:57:24 2015 -0600

--
 CHANGES.txt  | 1 +
 bin/cqlsh.py | 2 ++
 2 files changed, 3 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/9b3b3ca0/CHANGES.txt
--
diff --cc CHANGES.txt
index 513e682,5ff53b6..f95f079
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -13,7 -3,17 +13,8 @@@ Merged from 2.2
   * Fix SimpleDateType type compatibility (CASSANDRA-10027)
   * (Hadoop) fix splits calculation (CASSANDRA-10640)
   * (Hadoop) ensure that Cluster instances are always closed (CASSANDRA-10058)
 - * (cqlsh) show partial trace if incomplete after max_trace_wait 
(CASSANDRA-7645)
 - * Use most up-to-date version of schema for system tables (CASSANDRA-10652)
 - * Deprecate memory_allocator in cassandra.yaml (CASSANDRA-10581,10628)
 - * Expose phi values from failure detector via JMX and tweak debug
 -   and trace logging (CASSANDRA-9526)
 - * Fix RangeNamesQueryPager (CASSANDRA-10509)
 - * Deprecate Pig support (CASSANDRA-10542)
 - * Reduce contention getting instances of CompositeType (CASSANDRA-10433)
  Merged from 2.1:
+  * (cqlsh) Print column names before COPY operation (CASSANDRA-8935)
 - * Make paging logic consistent between searcher impls (CASSANDRA-10683)
   * Fix CompressedInputStream for proper cleanup (CASSANDRA-10012)
   * (cqlsh) Support counters in COPY commands (CASSANDRA-9043)
   * Try next replica if not possible to connect to primary replica on

http://git-wip-us.apache.org/repos/asf/cassandra/blob/9b3b3ca0/bin/cqlsh.py
--



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

2015-11-25 Thread tylerhobbs
http://git-wip-us.apache.org/repos/asf/cassandra/blob/a90c3b2b/bin/cqlsh.py
--
diff --cc bin/cqlsh.py
index ffcbcbd,000..28054ba
mode 100644,00..100644
--- a/bin/cqlsh.py
+++ b/bin/cqlsh.py
@@@ -1,2699 -1,0 +1,2701 @@@
 +#!/bin/sh
 +# -*- mode: Python -*-
 +
 +# Licensed to the Apache Software Foundation (ASF) under one
 +# or more contributor license agreements.  See the NOTICE file
 +# distributed with this work for additional information
 +# regarding copyright ownership.  The ASF licenses this file
 +# to you under the Apache License, Version 2.0 (the
 +# "License"); you may not use this file except in compliance
 +# with the License.  You may obtain a copy of the License at
 +#
 +# http://www.apache.org/licenses/LICENSE-2.0
 +#
 +# Unless required by applicable law or agreed to in writing, software
 +# distributed under the License is distributed on an "AS IS" BASIS,
 +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 +# See the License for the specific language governing permissions and
 +# limitations under the License.
 +
 +""":"
 +# bash code here; finds a suitable python interpreter and execs this file.
 +# prefer unqualified "python" if suitable:
 +python -c 'import sys; sys.exit(not (0x020500b0 < sys.hexversion < 
0x0300))' 2>/dev/null \
 +&& exec python "$0" "$@"
 +for pyver in 2.6 2.7 2.5; do
 +which python$pyver > /dev/null 2>&1 && exec python$pyver "$0" "$@"
 +done
 +echo "No appropriate python interpreter found." >&2
 +exit 1
 +":"""
 +
 +from __future__ import with_statement
 +
 +import cmd
 +import codecs
 +import ConfigParser
 +import csv
 +import getpass
 +import locale
 +import multiprocessing as mp
 +import optparse
 +import os
 +import platform
 +import sys
 +import time
 +import traceback
 +import warnings
 +from contextlib import contextmanager
 +from functools import partial
 +from glob import glob
 +from StringIO import StringIO
 +from uuid import UUID
 +
 +if sys.version_info[0] != 2 or sys.version_info[1] != 7:
 +sys.exit("\nCQL Shell supports only Python 2.7\n")
 +
 +description = "CQL Shell for Apache Cassandra"
 +version = "5.0.1"
 +
 +readline = None
 +try:
 +# check if tty first, cause readline doesn't check, and only cares
 +# about $TERM. we don't want the funky escape code stuff to be
 +# output if not a tty.
 +if sys.stdin.isatty():
 +import readline
 +except ImportError:
 +pass
 +
 +CQL_LIB_PREFIX = 'cassandra-driver-internal-only-'
 +
 +CASSANDRA_PATH = os.path.join(os.path.dirname(os.path.realpath(__file__)), 
'..')
 +
 +# use bundled libs for python-cql and thrift, if available. if there
 +# is a ../lib dir, use bundled libs there preferentially.
 +ZIPLIB_DIRS = [os.path.join(CASSANDRA_PATH, 'lib')]
 +myplatform = platform.system()
 +if myplatform == 'Linux':
 +ZIPLIB_DIRS.append('/usr/share/cassandra/lib')
 +
 +if os.environ.get('CQLSH_NO_BUNDLED', ''):
 +ZIPLIB_DIRS = ()
 +
 +
 +def find_zip(libprefix):
 +for ziplibdir in ZIPLIB_DIRS:
 +zips = glob(os.path.join(ziplibdir, libprefix + '*.zip'))
 +if zips:
 +return max(zips)   # probably the highest version, if multiple
 +
 +cql_zip = find_zip(CQL_LIB_PREFIX)
 +if cql_zip:
 +ver = os.path.splitext(os.path.basename(cql_zip))[0][len(CQL_LIB_PREFIX):]
 +sys.path.insert(0, os.path.join(cql_zip, 'cassandra-driver-' + ver))
 +
 +third_parties = ('futures-', 'six-')
 +
 +for lib in third_parties:
 +lib_zip = find_zip(lib)
 +if lib_zip:
 +sys.path.insert(0, lib_zip)
 +
 +warnings.filterwarnings("ignore", r".*blist.*")
 +try:
 +import cassandra
 +except ImportError, e:
 +sys.exit("\nPython Cassandra driver not installed, or not on 
PYTHONPATH.\n"
 + 'You might try "pip install cassandra-driver".\n\n'
 + 'Python: %s\n'
 + 'Module load path: %r\n\n'
 + 'Error: %s\n' % (sys.executable, sys.path, e))
 +
 +from cassandra.auth import PlainTextAuthProvider
 +from cassandra.cluster import Cluster
 +from cassandra.metadata import (ColumnMetadata, KeyspaceMetadata,
 +TableMetadata, protect_name, protect_names,
 +protect_value)
 +from cassandra.policies import WhiteListRoundRobinPolicy
 +from cassandra.protocol import QueryMessage, ResultMessage
 +from cassandra.query import SimpleStatement, ordered_dict_factory, 
TraceUnavailable
 +
 +# cqlsh should run correctly when run out of a Cassandra source tree,
 +# out of an unpacked Cassandra tarball, and after a proper package install.
 +cqlshlibdir = os.path.join(CASSANDRA_PATH, 'pylib')
 +if os.path.isdir(cqlshlibdir):
 +sys.path.insert(0, cqlshlibdir)
 +
 +from cqlshlib import cql3handling, cqlhandling, pylexotron, sslhandling, copy
 +from cqlshlib.displaying import (ANSI_RESET, BLUE, COLUMN_NAME_COLORS, CYAN,
 + RED, Form

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

2015-11-25 Thread tylerhobbs
http://git-wip-us.apache.org/repos/asf/cassandra/blob/a90c3b2b/bin/cqlsh.py
--
diff --cc bin/cqlsh.py
index ffcbcbd,000..28054ba
mode 100644,00..100644
--- a/bin/cqlsh.py
+++ b/bin/cqlsh.py
@@@ -1,2699 -1,0 +1,2701 @@@
 +#!/bin/sh
 +# -*- mode: Python -*-
 +
 +# Licensed to the Apache Software Foundation (ASF) under one
 +# or more contributor license agreements.  See the NOTICE file
 +# distributed with this work for additional information
 +# regarding copyright ownership.  The ASF licenses this file
 +# to you under the Apache License, Version 2.0 (the
 +# "License"); you may not use this file except in compliance
 +# with the License.  You may obtain a copy of the License at
 +#
 +# http://www.apache.org/licenses/LICENSE-2.0
 +#
 +# Unless required by applicable law or agreed to in writing, software
 +# distributed under the License is distributed on an "AS IS" BASIS,
 +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 +# See the License for the specific language governing permissions and
 +# limitations under the License.
 +
 +""":"
 +# bash code here; finds a suitable python interpreter and execs this file.
 +# prefer unqualified "python" if suitable:
 +python -c 'import sys; sys.exit(not (0x020500b0 < sys.hexversion < 
0x0300))' 2>/dev/null \
 +&& exec python "$0" "$@"
 +for pyver in 2.6 2.7 2.5; do
 +which python$pyver > /dev/null 2>&1 && exec python$pyver "$0" "$@"
 +done
 +echo "No appropriate python interpreter found." >&2
 +exit 1
 +":"""
 +
 +from __future__ import with_statement
 +
 +import cmd
 +import codecs
 +import ConfigParser
 +import csv
 +import getpass
 +import locale
 +import multiprocessing as mp
 +import optparse
 +import os
 +import platform
 +import sys
 +import time
 +import traceback
 +import warnings
 +from contextlib import contextmanager
 +from functools import partial
 +from glob import glob
 +from StringIO import StringIO
 +from uuid import UUID
 +
 +if sys.version_info[0] != 2 or sys.version_info[1] != 7:
 +sys.exit("\nCQL Shell supports only Python 2.7\n")
 +
 +description = "CQL Shell for Apache Cassandra"
 +version = "5.0.1"
 +
 +readline = None
 +try:
 +# check if tty first, cause readline doesn't check, and only cares
 +# about $TERM. we don't want the funky escape code stuff to be
 +# output if not a tty.
 +if sys.stdin.isatty():
 +import readline
 +except ImportError:
 +pass
 +
 +CQL_LIB_PREFIX = 'cassandra-driver-internal-only-'
 +
 +CASSANDRA_PATH = os.path.join(os.path.dirname(os.path.realpath(__file__)), 
'..')
 +
 +# use bundled libs for python-cql and thrift, if available. if there
 +# is a ../lib dir, use bundled libs there preferentially.
 +ZIPLIB_DIRS = [os.path.join(CASSANDRA_PATH, 'lib')]
 +myplatform = platform.system()
 +if myplatform == 'Linux':
 +ZIPLIB_DIRS.append('/usr/share/cassandra/lib')
 +
 +if os.environ.get('CQLSH_NO_BUNDLED', ''):
 +ZIPLIB_DIRS = ()
 +
 +
 +def find_zip(libprefix):
 +for ziplibdir in ZIPLIB_DIRS:
 +zips = glob(os.path.join(ziplibdir, libprefix + '*.zip'))
 +if zips:
 +return max(zips)   # probably the highest version, if multiple
 +
 +cql_zip = find_zip(CQL_LIB_PREFIX)
 +if cql_zip:
 +ver = os.path.splitext(os.path.basename(cql_zip))[0][len(CQL_LIB_PREFIX):]
 +sys.path.insert(0, os.path.join(cql_zip, 'cassandra-driver-' + ver))
 +
 +third_parties = ('futures-', 'six-')
 +
 +for lib in third_parties:
 +lib_zip = find_zip(lib)
 +if lib_zip:
 +sys.path.insert(0, lib_zip)
 +
 +warnings.filterwarnings("ignore", r".*blist.*")
 +try:
 +import cassandra
 +except ImportError, e:
 +sys.exit("\nPython Cassandra driver not installed, or not on 
PYTHONPATH.\n"
 + 'You might try "pip install cassandra-driver".\n\n'
 + 'Python: %s\n'
 + 'Module load path: %r\n\n'
 + 'Error: %s\n' % (sys.executable, sys.path, e))
 +
 +from cassandra.auth import PlainTextAuthProvider
 +from cassandra.cluster import Cluster
 +from cassandra.metadata import (ColumnMetadata, KeyspaceMetadata,
 +TableMetadata, protect_name, protect_names,
 +protect_value)
 +from cassandra.policies import WhiteListRoundRobinPolicy
 +from cassandra.protocol import QueryMessage, ResultMessage
 +from cassandra.query import SimpleStatement, ordered_dict_factory, 
TraceUnavailable
 +
 +# cqlsh should run correctly when run out of a Cassandra source tree,
 +# out of an unpacked Cassandra tarball, and after a proper package install.
 +cqlshlibdir = os.path.join(CASSANDRA_PATH, 'pylib')
 +if os.path.isdir(cqlshlibdir):
 +sys.path.insert(0, cqlshlibdir)
 +
 +from cqlshlib import cql3handling, cqlhandling, pylexotron, sslhandling, copy
 +from cqlshlib.displaying import (ANSI_RESET, BLUE, COLUMN_NAME_COLORS, CYAN,
 + RED, Form

[3/7] cassandra git commit: cqlsh: print column names before COPY operation

2015-11-25 Thread tylerhobbs
cqlsh: print column names before COPY operation

Patch by Michael Edge; reviewed by Tyler Hobbs for CASSANDRA-8935


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

Branch: refs/heads/cassandra-3.1
Commit: 68ea4edb33a9907a1a2e1cde0374a52225b519b0
Parents: 5cafe86
Author: Michael Edge 
Authored: Wed Nov 25 11:54:11 2015 -0600
Committer: Tyler Hobbs 
Committed: Wed Nov 25 11:54:11 2015 -0600

--
 CHANGES.txt | 1 +
 bin/cqlsh   | 2 ++
 2 files changed, 3 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/68ea4edb/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 6f69f03..8548d71 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.1.12
+ * (cqlsh) Print column names before COPY operation (CASSANDRA-8935)
  * Add Native-Transport-Requests back to tpstats (CASSANDRA-10044)
  * Make paging logic consistent between searcher impls (CASSANDRA-10683)
  * Fix CompressedInputStream for proper cleanup (CASSANDRA-10012)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/68ea4edb/bin/cqlsh
--
diff --git a/bin/cqlsh b/bin/cqlsh
index f4bedcd..3e830b5 100755
--- a/bin/cqlsh
+++ b/bin/cqlsh
@@ -1551,6 +1551,8 @@ class Shell(cmd.Cmd):
 cleancopyoptvals = [optval.decode('string-escape') for optval in 
copyoptvals]
 opts = dict(zip(copyoptnames, cleancopyoptvals))
 
+print "\nStarting copy of %s.%s with columns %s." % (ks, cf, columns)
+
 timestart = time.time()
 
 direction = parsed.get_binding('dir').upper()



  1   2   >