[jira] [Updated] (CASSANDRA-9607) Get high load after upgrading from 2.1.3 to cassandra 2.1.6

2015-06-22 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis updated CASSANDRA-9607:
--
Fix Version/s: (was: 2.2.0 rc2)
   2.2.x

 Get high load after upgrading from 2.1.3 to cassandra 2.1.6
 ---

 Key: CASSANDRA-9607
 URL: https://issues.apache.org/jira/browse/CASSANDRA-9607
 Project: Cassandra
  Issue Type: Bug
 Environment: OS: 
 CentOS 6 * 4
 Ubuntu 14.04 * 2
 JDK: Oracle JDK 7, Oracle JDK 8
 VM: Azure VM Standard A3 * 6
 RAM: 7 GB
 Cores: 4
Reporter: Study Hsueh
Assignee: Tyler Hobbs
Priority: Critical
 Fix For: 2.1.x, 2.2.x

 Attachments: cassandra.yaml, load.png, log.zip, schema.zip


 After upgrading cassandra version from 2.1.3 to 2.1.6, the average load of my 
 cassandra cluster grows from 0.x~1.x to 3.x~6.x. 
 What kind of additional information should I provide for this problem?



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


[jira] [Commented] (CASSANDRA-9102) Consistency levels such as non-local quorum need better tests

2015-06-22 Thread Ariel Weisberg (JIRA)

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

Ariel Weisberg commented on CASSANDRA-9102:
---

Sorry I am late to commenting on this. I think this is adding a lot of coverage 
we don't have. The classes that concern me on the read and write path are 
AbstractReadExecutor, and the StorageProxy read/write path. My beef with the 
coverage there was that there is no unit test coverage before this task.

As far as I can tell those have little/no unit test coverage because they 
aren't testable due to an inability to mock the entire thing. So that leads to 
a dtest trying to hit all those paths. Even though it's a dtest it would be 
helpful for it to behave more like a unit test when testing each branch. So 
rather then having sessions racing and checking for the correct result of the 
race (which may or may not race all) construct a scenario where you know 
specific code will run. This will make it fail every time instead of just some 
of the time when there is a bug. I think our focus for that kind of race would 
be better handled by the kitchen sink harness which runs for a long time and 
not on every commit.

Maybe from a unit testing (via dtests) perspective we want a way to blackhole 
writes to part of the cluster to force recovery paths without failing nodes? 
Otherwise from a dtest you would have to kill a node, do the write, and then 
bring it back, in order to know the state of the node when you go to have it 
participate in a read/write. This is all working around the fact that you can't 
write it as a unit test without invasive refactoring (and maybe that is the 
answer). I am kind of warming up to the idea of being able to ask a node to do 
something like that from a dtest.

 Consistency levels such as non-local quorum need better tests
 -

 Key: CASSANDRA-9102
 URL: https://issues.apache.org/jira/browse/CASSANDRA-9102
 Project: Cassandra
  Issue Type: Test
Reporter: Ariel Weisberg
Assignee: Stefania

 We didn't catch unit testing for this functionality. There is dtest 
 consistency_test but it doesn't cover non-local functionality.



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


[jira] [Updated] (CASSANDRA-9558) Cassandra-stress regression in 2.2

2015-06-22 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis updated CASSANDRA-9558:
--
Fix Version/s: (was: 2.2.0 rc2)
   2.2.x

 Cassandra-stress regression in 2.2
 --

 Key: CASSANDRA-9558
 URL: https://issues.apache.org/jira/browse/CASSANDRA-9558
 Project: Cassandra
  Issue Type: Bug
Reporter: Alan Boudreault
 Fix For: 2.2.x

 Attachments: 2.1.log, 2.2.log, CASSANDRA-9558-2.patch, 
 CASSANDRA-9558-ProtocolV2.patch, atolber-CASSANDRA-9558-stress.tgz, 
 atolber-trunk-driver-coalescing-disabled.txt, 
 stress-2.1-java-driver-2.0.9.2.log, stress-2.1-java-driver-2.2+PATCH.log, 
 stress-2.1-java-driver-2.2.log, stress-2.2-java-driver-2.2+PATCH.log, 
 stress-2.2-java-driver-2.2.log


 We are seeing some regression in performance when using cassandra-stress 2.2. 
 You can see the difference at this url:
 http://riptano.github.io/cassandra_performance/graph_v5/graph.html?stats=stress_regression.jsonmetric=op_rateoperation=1_writesmoothing=1show_aggregates=truexmin=0xmax=108.57ymin=0ymax=168147.1
 The cassandra version of the cluster doesn't seem to have any impact. 
 //cc [~tjake] [~benedict]



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


[jira] [Updated] (CASSANDRA-9558) Cassandra-stress regression in 2.2

2015-06-22 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis updated CASSANDRA-9558:
--
Assignee: T Jake Luciani

 Cassandra-stress regression in 2.2
 --

 Key: CASSANDRA-9558
 URL: https://issues.apache.org/jira/browse/CASSANDRA-9558
 Project: Cassandra
  Issue Type: Bug
Reporter: Alan Boudreault
Assignee: T Jake Luciani
 Fix For: 2.2.x

 Attachments: 2.1.log, 2.2.log, CASSANDRA-9558-2.patch, 
 CASSANDRA-9558-ProtocolV2.patch, atolber-CASSANDRA-9558-stress.tgz, 
 atolber-trunk-driver-coalescing-disabled.txt, 
 stress-2.1-java-driver-2.0.9.2.log, stress-2.1-java-driver-2.2+PATCH.log, 
 stress-2.1-java-driver-2.2.log, stress-2.2-java-driver-2.2+PATCH.log, 
 stress-2.2-java-driver-2.2.log


 We are seeing some regression in performance when using cassandra-stress 2.2. 
 You can see the difference at this url:
 http://riptano.github.io/cassandra_performance/graph_v5/graph.html?stats=stress_regression.jsonmetric=op_rateoperation=1_writesmoothing=1show_aggregates=truexmin=0xmax=108.57ymin=0ymax=168147.1
 The cassandra version of the cluster doesn't seem to have any impact. 
 //cc [~tjake] [~benedict]



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


[jira] [Updated] (CASSANDRA-9624) unable to bootstrap; streaming fails with NullPointerException

2015-06-22 Thread Philip Thompson (JIRA)

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

Philip Thompson updated CASSANDRA-9624:
---
Assignee: Yuki Morishita

 unable to bootstrap; streaming fails with NullPointerException
 --

 Key: CASSANDRA-9624
 URL: https://issues.apache.org/jira/browse/CASSANDRA-9624
 Project: Cassandra
  Issue Type: Bug
 Environment: Debian Jessie, 7u79-2.5.5-1~deb8u1, Cassandra 2.1.3
Reporter: Eric Evans
Assignee: Yuki Morishita
 Fix For: 2.1.x


 When attempting to bootstrap a new node into a 2.1.3 cluster, the stream 
 source fails with a {{NullPointerException}}:
 {noformat}
 ERROR [STREAM-IN-/10.xx.x.xxx] 2015-06-13 00:02:01,264 StreamSession.java:477 
 - [Stream #60e8c120-
 115f-11e5-9fee-] Streaming error occurred
 java.lang.NullPointerException: null
 at 
 org.apache.cassandra.io.sstable.SSTableReader.getPositionsForRanges(SSTableReader.java:1277)
  ~[apache-cassandra-2.1.3.jar:2.1.3]
 at 
 org.apache.cassandra.streaming.StreamSession.getSSTableSectionsForRanges(StreamSession.java:313)
  ~[apache-cassandra-2.1.3.jar:2.1.3]
 at 
 org.apache.cassandra.streaming.StreamSession.addTransferRanges(StreamSession.java:266)
  ~[apache-cassandra-2.1.3.jar:2.1.3]
 at 
 org.apache.cassandra.streaming.StreamSession.prepare(StreamSession.java:493) 
 ~[apache-cassandra-2.1.3.jar:2.1.3]
 at 
 org.apache.cassandra.streaming.StreamSession.messageReceived(StreamSession.java:425)
  ~[apache-cassandra-2.1.3.jar:2.1.3]
 at 
 org.apache.cassandra.streaming.ConnectionHandler$IncomingMessageHandler.run(ConnectionHandler.java:251)
  ~[apache-cassandra-2.1.3.jar:2.1.3]
 at java.lang.Thread.run(Thread.java:745) [na:1.7.0_79]
 INFO  [STREAM-IN-/10.xx.x.xxx] 2015-06-13 00:02:01,265 
 StreamResultFuture.java:180 - [Stream #60e8c120-115f-11e5-9fee-] 
 Session with /10.xx.x.xx1 is complete
 {noformat}



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


[jira] [Updated] (CASSANDRA-9624) unable to bootstrap; streaming fails with NullPointerException

2015-06-22 Thread Philip Thompson (JIRA)

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

Philip Thompson updated CASSANDRA-9624:
---
Reproduced In: 2.1.3
Fix Version/s: 2.1.x

 unable to bootstrap; streaming fails with NullPointerException
 --

 Key: CASSANDRA-9624
 URL: https://issues.apache.org/jira/browse/CASSANDRA-9624
 Project: Cassandra
  Issue Type: Bug
 Environment: Debian Jessie, 7u79-2.5.5-1~deb8u1, Cassandra 2.1.3
Reporter: Eric Evans
 Fix For: 2.1.x


 When attempting to bootstrap a new node into a 2.1.3 cluster, the stream 
 source fails with a {{NullPointerException}}:
 {noformat}
 ERROR [STREAM-IN-/10.xx.x.xxx] 2015-06-13 00:02:01,264 StreamSession.java:477 
 - [Stream #60e8c120-
 115f-11e5-9fee-] Streaming error occurred
 java.lang.NullPointerException: null
 at 
 org.apache.cassandra.io.sstable.SSTableReader.getPositionsForRanges(SSTableReader.java:1277)
  ~[apache-cassandra-2.1.3.jar:2.1.3]
 at 
 org.apache.cassandra.streaming.StreamSession.getSSTableSectionsForRanges(StreamSession.java:313)
  ~[apache-cassandra-2.1.3.jar:2.1.3]
 at 
 org.apache.cassandra.streaming.StreamSession.addTransferRanges(StreamSession.java:266)
  ~[apache-cassandra-2.1.3.jar:2.1.3]
 at 
 org.apache.cassandra.streaming.StreamSession.prepare(StreamSession.java:493) 
 ~[apache-cassandra-2.1.3.jar:2.1.3]
 at 
 org.apache.cassandra.streaming.StreamSession.messageReceived(StreamSession.java:425)
  ~[apache-cassandra-2.1.3.jar:2.1.3]
 at 
 org.apache.cassandra.streaming.ConnectionHandler$IncomingMessageHandler.run(ConnectionHandler.java:251)
  ~[apache-cassandra-2.1.3.jar:2.1.3]
 at java.lang.Thread.run(Thread.java:745) [na:1.7.0_79]
 INFO  [STREAM-IN-/10.xx.x.xxx] 2015-06-13 00:02:01,265 
 StreamResultFuture.java:180 - [Stream #60e8c120-115f-11e5-9fee-] 
 Session with /10.xx.x.xx1 is complete
 {noformat}



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


[jira] [Updated] (CASSANDRA-9132) resumable_bootstrap_test can hang

2015-06-22 Thread T Jake Luciani (JIRA)

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

T Jake Luciani updated CASSANDRA-9132:
--
Fix Version/s: (was: 2.0.16)
   2.0.x

 resumable_bootstrap_test can hang
 -

 Key: CASSANDRA-9132
 URL: https://issues.apache.org/jira/browse/CASSANDRA-9132
 Project: Cassandra
  Issue Type: Bug
  Components: Tests
Reporter: Tyler Hobbs
Assignee: Yuki Morishita
 Fix For: 2.1.6, 2.0.x, 2.2.0 rc1

 Attachments: 9132-2.0.txt, 9132-followup-2.0.txt


 The {{bootstrap_test.TestBootstrap.resumable_bootstrap_test}} can hang 
 sometimes.  It looks like the following line never completes:
 {noformat}
 node3.watch_log_for(Listening for thrift clients...)
 {noformat}
 I'm not familiar enough with the recent bootstrap changes to know why that's 
 not happening.



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


Git Push Summary

2015-06-22 Thread jake
Repository: cassandra
Updated Tags:  refs/tags/2.0.16-tentative [deleted] 23e66a9d1


[jira] [Updated] (CASSANDRA-9618) Consider deprecating sstable2json/json2sstable in 2.2

2015-06-22 Thread Sylvain Lebresne (JIRA)

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

Sylvain Lebresne updated CASSANDRA-9618:

Attachment: 0001-Deprecate-sstable2json-and-json2sstable.patch

Simple patch that adds a warning to the 2 tools and document the deprecation in 
the changes file.

 Consider deprecating sstable2json/json2sstable in 2.2
 -

 Key: CASSANDRA-9618
 URL: https://issues.apache.org/jira/browse/CASSANDRA-9618
 Project: Cassandra
  Issue Type: Task
Reporter: Sylvain Lebresne
 Fix For: 2.2.0 rc2

 Attachments: 0001-Deprecate-sstable2json-and-json2sstable.patch


 The rational is explained in CASSANDRA-7464 but to rephrase a bit:
 * json2sstable is pretty much useless, {{CQLSSTableWriter}} is way more 
 flexible if you need to write sstable directly.
 * sstable2json is really only potentially useful for debugging, but it's 
 pretty bad at that (it's output is not really all that helpul in modern 
 Cassandra in particular).
 Now, it happens that updating those tool for CASSANDRA-8099, while possible, 
 is a bit involved. So I don't think it make sense to invest effort in 
 maintain these tools. So I propose to deprecate these in 2.2 with removal in 
 3.0.
 I'll note that having a tool to help debugging sstable can be useful, but I 
 propose to add a tool for that purpose with CASSANDRA-7464.



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


[jira] [Commented] (CASSANDRA-9628) Unknown keyspace system_traces exception when using nodetool on a new cluster

2015-06-22 Thread Philip Thompson (JIRA)

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

Philip Thompson commented on CASSANDRA-9628:


I'm unable to reproduce this with 2.1.2. Are you running into the issue on a 
newer version (2.1.5 or 2.1.6)?

 Unknown keyspace system_traces exception when using nodetool on a new 
 cluster
 ---

 Key: CASSANDRA-9628
 URL: https://issues.apache.org/jira/browse/CASSANDRA-9628
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Reporter: tzach
Priority: Minor

 When creating a new cluster from scratch,  nodetool status fails on 
 system_traces as follow
 {code}
 $ nodetool status
 error: Unknown keyspace system_traces
 -- StackTrace --
 java.lang.AssertionError: Unknown keyspace system_traces
   at org.apache.cassandra.db.Keyspace.init(Keyspace.java:270)
   at org.apache.cassandra.db.Keyspace.open(Keyspace.java:119)
   at org.apache.cassandra.db.Keyspace.open(Keyspace.java:96)
 ...
 {code}
 the problem disappear when creating an empty keyspace
 {code}
 cqlsh create keyspace temp WITH REPLICATION = { 'class' : 'SimpleStrategy', 
 'replication_factor' : 2 };
 {code}
 My guess is system_traces initialization complete only after any data 
 insertion.
 Before it does, any attempt to read  from it either from nodetool, cqlsh or 
 streaming to a new node will fail.



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


[jira] [Resolved] (CASSANDRA-6490) Please delete old releases from mirroring system

2015-06-22 Thread T Jake Luciani (JIRA)

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

T Jake Luciani resolved CASSANDRA-6490.
---
Resolution: Fixed

I've cleaned up the system but I well say I like to include the latest and 
previous releases since when a release happens we wait to update the website 
till the mirrors are updated (otherwise users get a 404) if we push delete the 
old release and add the new then users get the worst of both worlds during the 
transition. 404 on the old versions and 404 on the new till all mirrors are 
updated.  

 Please delete old releases from mirroring system
 

 Key: CASSANDRA-6490
 URL: https://issues.apache.org/jira/browse/CASSANDRA-6490
 Project: Cassandra
  Issue Type: Bug
 Environment: http://www.apache.org/dist/cassandra/
Reporter: Sebb
Assignee: T Jake Luciani

 To reduce the load on the ASF mirrors, projects are required to delete old 
 releases [1]
 Please can you remove all non-current releases?
 Thanks!
 [Note that older releases are always available from the ASF archive server]
 Any links to older releases on download pages should first be adjusted to 
 point to the archive server.
 [1] http://www.apache.org/dev/release.html#when-to-archive



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


[jira] [Updated] (CASSANDRA-9625) GraphiteReporter not reporting

2015-06-22 Thread Philip Thompson (JIRA)

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

Philip Thompson updated CASSANDRA-9625:
---
Reproduced In: 2.1.6
Fix Version/s: 2.1.x

 GraphiteReporter not reporting
 --

 Key: CASSANDRA-9625
 URL: https://issues.apache.org/jira/browse/CASSANDRA-9625
 Project: Cassandra
  Issue Type: Bug
 Environment: Debian Jessie, 7u79-2.5.5-1~deb8u1, Cassandra 2.1.3
Reporter: Eric Evans
 Fix For: 2.1.x

 Attachments: metrics.yaml, thread-dump.log


 When upgrading from 2.1.3 to 2.1.6, the Graphite metrics reporter stops 
 working.  The usual startup is logged, and one batch of samples is sent, but 
 the reporting interval comes and goes, and no other samples are ever sent.  
 The logs are free from errors.
 Frustratingly, metrics reporting works in our smaller (staging) environment 
 on 2.1.6; We are able to reproduce this on all 6 of production nodes, but not 
 on a 3 node (otherwise identical) staging cluster (maybe it takes a certain 
 level of concurrency?).
 Attached is a thread dump, and our metrics.yaml.



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


[jira] [Commented] (CASSANDRA-9618) Consider deprecating sstable2json/json2sstable in 2.2

2015-06-22 Thread Aleksey Yeschenko (JIRA)

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

Aleksey Yeschenko commented on CASSANDRA-9618:
--

Should we write the warning to {{err}} instead? Printing to {{out}} might break 
things for those who (wrongly or rightly) use sst2j and j2sst in an automated 
fashion.

Otherwise +1.

 Consider deprecating sstable2json/json2sstable in 2.2
 -

 Key: CASSANDRA-9618
 URL: https://issues.apache.org/jira/browse/CASSANDRA-9618
 Project: Cassandra
  Issue Type: Task
Reporter: Sylvain Lebresne
Assignee: Sylvain Lebresne
 Fix For: 2.2.0 rc2

 Attachments: 0001-Deprecate-sstable2json-and-json2sstable.patch


 The rational is explained in CASSANDRA-7464 but to rephrase a bit:
 * json2sstable is pretty much useless, {{CQLSSTableWriter}} is way more 
 flexible if you need to write sstable directly.
 * sstable2json is really only potentially useful for debugging, but it's 
 pretty bad at that (it's output is not really all that helpul in modern 
 Cassandra in particular).
 Now, it happens that updating those tool for CASSANDRA-8099, while possible, 
 is a bit involved. So I don't think it make sense to invest effort in 
 maintain these tools. So I propose to deprecate these in 2.2 with removal in 
 3.0.
 I'll note that having a tool to help debugging sstable can be useful, but I 
 propose to add a tool for that purpose with CASSANDRA-7464.



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


[jira] [Comment Edited] (CASSANDRA-9102) Consistency levels such as non-local quorum need better tests

2015-06-22 Thread Ariel Weisberg (JIRA)

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

Ariel Weisberg edited comment on CASSANDRA-9102 at 6/22/15 5:28 PM:


Sorry I am late to commenting on this. I think this is adding a lot of coverage 
we don't have. The classes that concern me on the read and write path are 
AbstractReadExecutor, and the StorageProxy read/write path. My beef with the 
coverage there was that there is no unit test coverage before this task.

As far as I can tell those have little/no unit test coverage because they 
aren't testable due to an inability to mock the entire thing. So that leads to 
a dtest trying to hit all those paths. Even though it's a dtest it would be 
helpful for it to behave more like a unit test when testing each branch. So 
rather then having sessions racing and checking for the correct result of the 
race (which may or may not race all) construct a scenario where you know 
specific code will run. This will make it fail every time instead of just some 
of the time when there is a bug. I think checking for races, or testing 
functionality in a racy way, would be better handled by the kitchen sink 
harness which runs for a long time and not on every commit.

Maybe from a unit testing (via dtests) perspective we want a way to blackhole 
writes to part of the cluster to force recovery paths without failing nodes? 
Otherwise from a dtest you would have to kill a node, do the write, and then 
bring it back, in order to know the state of the node when you go to have it 
participate in a read/write. This is all working around the fact that you can't 
write it as a unit test without invasive refactoring (and maybe that is the 
answer). I am kind of warming up to the idea of being able to ask a node to do 
something like that from a dtest.


was (Author: aweisberg):
Sorry I am late to commenting on this. I think this is adding a lot of coverage 
we don't have. The classes that concern me on the read and write path are 
AbstractReadExecutor, and the StorageProxy read/write path. My beef with the 
coverage there was that there is no unit test coverage before this task.

As far as I can tell those have little/no unit test coverage because they 
aren't testable due to an inability to mock the entire thing. So that leads to 
a dtest trying to hit all those paths. Even though it's a dtest it would be 
helpful for it to behave more like a unit test when testing each branch. So 
rather then having sessions racing and checking for the correct result of the 
race (which may or may not race all) construct a scenario where you know 
specific code will run. This will make it fail every time instead of just some 
of the time when there is a bug. I think our focus for that kind of race would 
be better handled by the kitchen sink harness which runs for a long time and 
not on every commit.

Maybe from a unit testing (via dtests) perspective we want a way to blackhole 
writes to part of the cluster to force recovery paths without failing nodes? 
Otherwise from a dtest you would have to kill a node, do the write, and then 
bring it back, in order to know the state of the node when you go to have it 
participate in a read/write. This is all working around the fact that you can't 
write it as a unit test without invasive refactoring (and maybe that is the 
answer). I am kind of warming up to the idea of being able to ask a node to do 
something like that from a dtest.

 Consistency levels such as non-local quorum need better tests
 -

 Key: CASSANDRA-9102
 URL: https://issues.apache.org/jira/browse/CASSANDRA-9102
 Project: Cassandra
  Issue Type: Test
Reporter: Ariel Weisberg
Assignee: Stefania

 We didn't catch unit testing for this functionality. There is dtest 
 consistency_test but it doesn't cover non-local functionality.



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


[2/3] cassandra git commit: Allow native functions in user-defined aggregates

2015-06-22 Thread snazy
Allow native functions in user-defined aggregates

patch by Robert Stupp; reviewed by Aleksey Yeschenko CASSANDRA-9542


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

Branch: refs/heads/trunk
Commit: d6312c5f4d6b1dbc16518becef1b7a785cea73b3
Parents: 5931eb4
Author: Robert Stupp sn...@snazy.de
Authored: Mon Jun 22 17:19:20 2015 +0200
Committer: Robert Stupp sn...@snazy.de
Committed: Mon Jun 22 17:19:20 2015 +0200

--
 CHANGES.txt |  1 +
 doc/cql3/CQL.textile|  4 +--
 .../statements/CreateAggregateStatement.java| 24 -
 .../cassandra/schema/LegacySchemaTables.java| 25 ++---
 .../apache/cassandra/cql3/AggregationTest.java  | 37 +---
 test/unit/org/apache/cassandra/cql3/UFTest.java |  1 +
 6 files changed, 74 insertions(+), 18 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/d6312c5f/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index f821136..93753e5 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.2
+ * Allow native functions in user-defined aggregates (CASSANDRA-9542)
  * Don't repair system_distributed by default (CASSANDRA-9621)
  * Fix mixing min, max, and count aggregates for blob type (CASSANRA-9622)
  * Rename class for DATE type in Java driver (CASSANDRA-9563)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/d6312c5f/doc/cql3/CQL.textile
--
diff --git a/doc/cql3/CQL.textile b/doc/cql3/CQL.textile
index 689ac94..ec1f660 100644
--- a/doc/cql3/CQL.textile
+++ b/doc/cql3/CQL.textile
@@ -708,9 +708,9 @@ Signatures for user-defined aggregates follow the same 
rules:#functionSignatur
 
 The optional @INITCOND@ defines the initial state value for the aggregate. It 
defaults to @null@. A non-@null@ @INITCOND@ must be specified for state 
functions that are declared with @RETURNS NULL ON NULL INPUT@.
 
-@SFUNC@ references an existing function to be used as the state modifying 
function. The type of first argument of the state function must match @STYPE@. 
The remaining argument types of the state function must match the argument 
types of the aggregate function. State is not updated for state functions 
declared with @RETURNS NULL ON NULL INPUT@ and called with @null@.
+@SFUNC@ references an existing function to be used as the state modifying 
function. The type of first argument of the state function must match @STYPE@. 
The remaining argument types of the state function must match the argument 
types of the aggregate function. State is not updated for state functions 
declared with @RETURNS NULL ON NULL INPUT@ and called with @null@. Functions 
from the system keyspace are resolved before functions in the current keyspace.
 
-The optional @FINALFUNC@ is called just before the aggregate result is 
returned. It must take only one argument with type @STYPE@. The return type of 
the @FINALFUNC@ may be a different type. A final function declared with 
@RETURNS NULL ON NULL INPUT@ means that the aggregate's return value will be 
@null@, if the last state is @null@.
+The optional @FINALFUNC@ is called just before the aggregate result is 
returned. It must take only one argument with type @STYPE@. The return type of 
the @FINALFUNC@ may be a different type. A final function declared with 
@RETURNS NULL ON NULL INPUT@ means that the aggregate's return value will be 
@null@, if the last state is @null@. Functions from the system keyspace are 
resolved before functions in the current keyspace.
 
 If no @FINALFUNC@ is defined, the overall return type of the aggregate 
function is @STYPE@.  If a @FINALFUNC@ is defined, it is the return type of 
that function.
 

http://git-wip-us.apache.org/repos/asf/cassandra/blob/d6312c5f/src/java/org/apache/cassandra/cql3/statements/CreateAggregateStatement.java
--
diff --git 
a/src/java/org/apache/cassandra/cql3/statements/CreateAggregateStatement.java 
b/src/java/org/apache/cassandra/cql3/statements/CreateAggregateStatement.java
index 8b6c8d6..039993f 100644
--- 
a/src/java/org/apache/cassandra/cql3/statements/CreateAggregateStatement.java
+++ 
b/src/java/org/apache/cassandra/cql3/statements/CreateAggregateStatement.java
@@ -86,7 +86,11 @@ public final class CreateAggregateStatement extends 
SchemaAlteringStatement
 argTypes.add(prepareType(arguments, rawType));
 
 AbstractType? stateType = prepareType(state type, stateTypeRaw);
-Function f = 

[jira] [Updated] (CASSANDRA-9627) fsync should not be best effort

2015-06-22 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis updated CASSANDRA-9627:
--
Fix Version/s: (was: 2.2.0 rc2)
   2.2.x

 fsync should not be best effort
 -

 Key: CASSANDRA-9627
 URL: https://issues.apache.org/jira/browse/CASSANDRA-9627
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Reporter: Benedict
Priority: Minor
 Fix For: 2.2.x


 Currently we make an effort to synchronize both the file contents and the 
 directory contents. Both are essential to ensure no data loss. Currently we 
 just try to do this, and ignore the problem if we can't. Presumably this 
 behaviour was to sort of support Windows (i.e. not crash). Now we 
 officially support Windows, we need to behave better, and really IMO we 
 should _never_ for any platform ignore a failure here. It should be part of 
 our pre-flight checks: if we cannot do it, we cannot run safely.
 It looks like this may be supported trivially through FileChannel, by opening 
 one on the directory itself (and calling force()), although it's not clear if 
 this will still be supported in Java 9 [see discussion 
 here|http://mail.openjdk.java.net/pipermail/nio-dev/2015-May/003140.html].
 [~JoshuaMcKenzie]: assigning to you for now, just so it's tracked by the 
 Windows overlord.



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


Git Push Summary

2015-06-22 Thread jake
Repository: cassandra
Updated Tags:  refs/tags/cassandra-2.1.7 [created] da52be811


[jira] [Comment Edited] (CASSANDRA-6490) Please delete old releases from mirroring system

2015-06-22 Thread T Jake Luciani (JIRA)

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

T Jake Luciani edited comment on CASSANDRA-6490 at 6/22/15 4:28 PM:


I've cleaned up the system but I will say, I like to include the latest and 
previous releases since when a release happens we wait to update the website 
till the mirrors are updated (otherwise users get a 404). If we push delete the 
old release and add the new then users get the worst of both worlds during the 
transition. 404 on the old versions and 404 on the new till all mirrors are 
updated.  


was (Author: tjake):
I've cleaned up the system but I well say I like to include the latest and 
previous releases since when a release happens we wait to update the website 
till the mirrors are updated (otherwise users get a 404) if we push delete the 
old release and add the new then users get the worst of both worlds during the 
transition. 404 on the old versions and 404 on the new till all mirrors are 
updated.  

 Please delete old releases from mirroring system
 

 Key: CASSANDRA-6490
 URL: https://issues.apache.org/jira/browse/CASSANDRA-6490
 Project: Cassandra
  Issue Type: Bug
 Environment: http://www.apache.org/dist/cassandra/
Reporter: Sebb
Assignee: T Jake Luciani

 To reduce the load on the ASF mirrors, projects are required to delete old 
 releases [1]
 Please can you remove all non-current releases?
 Thanks!
 [Note that older releases are always available from the ASF archive server]
 Any links to older releases on download pages should first be adjusted to 
 point to the archive server.
 [1] http://www.apache.org/dev/release.html#when-to-archive



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


[jira] [Commented] (CASSANDRA-9603) Expose private listen_address in system.local

2015-06-22 Thread Aleksey Yeschenko (JIRA)

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

Aleksey Yeschenko commented on CASSANDRA-9603:
--

It added both broadcast address, but not listen_address. Apparently we want all 
three. Will be added.

 Expose private listen_address in system.local
 -

 Key: CASSANDRA-9603
 URL: https://issues.apache.org/jira/browse/CASSANDRA-9603
 Project: Cassandra
  Issue Type: Improvement
  Components: Core
Reporter: Piotr Kołaczkowski
 Fix For: 2.1.x


 We had some hopes CASSANDRA-9436 would add it, yet it added rpc_address 
 instead of both rpc_address *and* listen_address. We really need 
 listen_address here, because we need to get information on the private IP C* 
 binds to. Knowing this we could better match Spark nodes to C* nodes and 
 process data locally in environments where rpc_address != listen_address like 
 EC2. 
 See, Spark does not know rpc addresses nor it has a concept of broadcast 
 address. It only knows the hostname / IP its workers bind to. In case of 
 cloud environments, these are private IPs. Now if we give Spark a set of C* 
 nodes identified by rpc_addresses, Spark doesn't recognize them as belonging 
 to the same cluster. It treats them as remote nodes and has no idea where 
 to send tasks optimally. 
 Current situation (example):
 Spark worker nodes: [10.0.0.1, 10.0.0.2, 10.0.0.3]
 C* nodes: [10.0.0.1 / node1.blah.ec2.com, 10.0.0.2 / node2.blah.ec2.com, 
 10.0.0.3 / node3.blah.ec2.com]
 What the application knows about the cluster: [node1.blah.ec2.com, 
 node2.blah.ec2.com, node3.blah.ec2.com]
 What the application sends to Spark for execution:
  Task1 - please execute on node1.blah.ec2.com
  Task2 - please execute on node2.blah.ec2.com
  Task3 - please execute on node3.blah.ec2.com
 How Spark understands it: I have no idea what node1.blah.ec2.com is, let's 
 assign Task1 it to a *random* node :(
 Expected:
 Spark worker nodes: [10.0.0.1, 10.0.0.2, 10.0.0.3]
 C* nodes: [10.0.0.1 / node1.blah.ec2.com, 10.0.0.2 / node2.blah.ec2.com, 
 10.0.0.3 / node3.blah.ec2.com]
 What the application knows about the cluster: [10.0.0.1 / node1.blah.ec2.com, 
 10.0.0.2 / node2.blah.ec2.com, 10.0.0.3 / node3.blah.ec2.com]
 What the application sends to Spark for execution:
  Task1 - please execute on node1.blah.ec2.com or 10.0.0.1
  Task2 - please execute on node2.blah.ec2.com or 10.0.0.2
  Task3 - please execute on node3.blah.ec2.com or 10.0.0.3
 How Spark understands it: 10.0.0.1? - I have a worker on that node, lets put 
 Task 1 there



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


[jira] [Updated] (CASSANDRA-9542) Create UDA does not recognize built-in functions without specifying system keyspace

2015-06-22 Thread Robert Stupp (JIRA)

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

Robert Stupp updated CASSANDRA-9542:

Fix Version/s: (was: 2.2.x)
   2.2.0 rc2

 Create UDA does not recognize built-in functions without specifying system 
 keyspace
 ---

 Key: CASSANDRA-9542
 URL: https://issues.apache.org/jira/browse/CASSANDRA-9542
 Project: Cassandra
  Issue Type: Bug
Reporter: Zachary Kurey
Assignee: Robert Stupp
Priority: Minor
 Fix For: 2.2.0 rc2

 Attachments: 9542.txt


 I'd expect when creating a UDA not to have to specify the system keyspace 
 when using a built-in function for the state or final function.  For example:
 {code}
 CREATE AGGREGATE if not exists ks.my_agg(int) 
 SFUNC ks.adder
 STYPE int
 FINALFUNC intasblob
 ;
 {code}
 Gives me me the error:
 {quote}Final function ks.intasblob(int) does not exist or is not a scalar 
 function{quote}
 Prefixing with 'system.' fixes the issue. But I was expecting it to resolve 
 as if I were using a built in function elsewhere.



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


[jira] [Updated] (CASSANDRA-9618) Consider deprecating sstable2json/json2sstable in 2.2

2015-06-22 Thread Aleksey Yeschenko (JIRA)

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

Aleksey Yeschenko updated CASSANDRA-9618:
-
Reviewer: Aleksey Yeschenko

 Consider deprecating sstable2json/json2sstable in 2.2
 -

 Key: CASSANDRA-9618
 URL: https://issues.apache.org/jira/browse/CASSANDRA-9618
 Project: Cassandra
  Issue Type: Task
Reporter: Sylvain Lebresne
Assignee: Sylvain Lebresne
 Fix For: 2.2.0 rc2

 Attachments: 0001-Deprecate-sstable2json-and-json2sstable.patch


 The rational is explained in CASSANDRA-7464 but to rephrase a bit:
 * json2sstable is pretty much useless, {{CQLSSTableWriter}} is way more 
 flexible if you need to write sstable directly.
 * sstable2json is really only potentially useful for debugging, but it's 
 pretty bad at that (it's output is not really all that helpul in modern 
 Cassandra in particular).
 Now, it happens that updating those tool for CASSANDRA-8099, while possible, 
 is a bit involved. So I don't think it make sense to invest effort in 
 maintain these tools. So I propose to deprecate these in 2.2 with removal in 
 3.0.
 I'll note that having a tool to help debugging sstable can be useful, but I 
 propose to add a tool for that purpose with CASSANDRA-7464.



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


[jira] [Commented] (CASSANDRA-9634) Set kernel timer resolution on Windows

2015-06-22 Thread Joshua McKenzie (JIRA)

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

Joshua McKenzie commented on CASSANDRA-9634:


Branch updated to be configurable in yaml, disabled by default. Going to see 
how this looks in a couple other virtualized environments before settling on a 
position to default enabled at 1ms or not.

 Set kernel timer resolution on Windows
 --

 Key: CASSANDRA-9634
 URL: https://issues.apache.org/jira/browse/CASSANDRA-9634
 Project: Cassandra
  Issue Type: Improvement
Reporter: Joshua McKenzie
Assignee: Joshua McKenzie
  Labels: Windows, performance
 Fix For: 2.2.x


 In Windows 7/Server 2008 and to a similar extent Windows 8/Server 2012, the 
 kernel's internal time is set to an interval of 15.6ms. (Use 
 [clockres|https://technet.microsoft.com/en-us/sysinternals/bb897568.aspx] to 
 confirm current 'tick rate' on Windows). Win8/Server2012 have a tickless 
 kernel w/timer coalescing ([info 
 here|http://arstechnica.com/information-technology/2012/10/better-on-the-inside-under-the-hood-of-windows-8/2/])
  and the platform shows similar performance characteristics with C* to 
 Windows 7 with a slight edge in performance to win8/server 2012 in my testing 
 (the testing and results of which are outside the scope of this ticket).
 Some arguments against lowering the system's internal timer to 1ms are 
 [here|https://randomascii.wordpress.com/2013/07/08/windows-timer-resolution-megawatts-wasted/].
  These seem largely constrained to it'll drain your battery and it'll 
 prevent your processor from being as effective in sleep states. The 2nd is 
 somewhat of a concern as we don't want Windows users to all of a sudden have 
 increased CPU-usage bills from virtualized environments. In the comments, one 
 individual mentions a VirtualBox VM spinning at 10-20% cpu just from changing 
 that flag alone which seems mathematically unlikely, but is worth keeping an 
 eye on and testing.
 A Microsoft publication that largely reinforces the cautionary tale on power 
 consumption can be found 
 [here|http://download.microsoft.com/download/3/0/2/3027D574-C433-412A-A8B6-5E0A75D5B237/Timer-Resolution.docx].
 With the cautionary tales on our rader, the impact on throughput and latency 
 on the 2.2 branch on Windows is [fairly 
 dramatic|https://docs.google.com/spreadsheets/d/1nqPhNwOVt0SU7b9lt9o4Tyl0Z1yDrV2oo7LbBPaFa6A/edit#gid=0].
  A couple of caveats on these #'s: I'm not completely saturating the system 
 as the thread count is relatively low (keeping it consistent with other 
 testing where it *was* saturating), and the read #'s from our 2012 test 
 environment are not affected by this timer change while I see it on 3 other 
 bare-metal installations. The testing environment is new and we haven't 
 worked out the kinks yet, however the write / mixed illustrate the throughput 
 and latency #'s I've mentioned above; for reads the cpu's are sitting idle at 
 1-5% used by stress and C* so something else clearly needs to be addressed 
 there; I included them for completeness sake.
 Some preliminary testing on OpenStack indicates kernel-space syscall 
 saturation w/this patch that actually *degrades* performance, however the 
 unpatched performance numbers in our OpenStack environment are low enough 
 that I question their validity.
 Opening this ticket w/attached branch to get it on the radar / conversation 
 going, and I'm going to update this from being hard-coded to being a tunable 
 in the .yaml.
 Initial patch [available 
 here|https://github.com/apache/cassandra/compare/trunk...josh-mckenzie:2.2_WinTimer].



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


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

2015-06-22 Thread snazy
Merge branch 'cassandra-2.2' into trunk


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

Branch: refs/heads/trunk
Commit: 55269db171e31785f26bbae83a26b8b562337bdf
Parents: 4045c29 d6312c5
Author: Robert Stupp sn...@snazy.de
Authored: Mon Jun 22 17:20:18 2015 +0200
Committer: Robert Stupp sn...@snazy.de
Committed: Mon Jun 22 17:20:18 2015 +0200

--
 CHANGES.txt |  1 +
 doc/cql3/CQL.textile|  4 +--
 .../statements/CreateAggregateStatement.java| 24 -
 .../cassandra/schema/LegacySchemaTables.java| 25 ++---
 .../apache/cassandra/cql3/AggregationTest.java  | 37 +---
 test/unit/org/apache/cassandra/cql3/UFTest.java |  1 +
 6 files changed, 74 insertions(+), 18 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/55269db1/CHANGES.txt
--
diff --cc CHANGES.txt
index 0830e39,93753e5..3a22387
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,15 -1,5 +1,16 @@@
 +3.0:
 + * Add nodetool command to replay batchlog (CASSANDRA-9547)
 + * Make file buffer cache independent of paths being read (CASSANDRA-8897)
 + * Remove deprecated legacy Hadoop code (CASSANDRA-9353)
 + * Decommissioned nodes will not rejoin the cluster (CASSANDRA-8801)
 + * Change gossip stabilization to use endpoit size (CASSANDRA-9401)
 + * Change default garbage collector to G1 (CASSANDRA-7486)
 + * Populate TokenMetadata early during startup (CASSANDRA-9317)
 + * undeprecate cache recentHitRate (CASSANDRA-6591)
 +
 +
  2.2
+  * Allow native functions in user-defined aggregates (CASSANDRA-9542)
   * Don't repair system_distributed by default (CASSANDRA-9621)
   * Fix mixing min, max, and count aggregates for blob type (CASSANRA-9622)
   * Rename class for DATE type in Java driver (CASSANDRA-9563)



[1/3] cassandra git commit: Allow native functions in user-defined aggregates

2015-06-22 Thread snazy
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-2.2 5931eb432 - d6312c5f4
  refs/heads/trunk 4045c2933 - 55269db17


Allow native functions in user-defined aggregates

patch by Robert Stupp; reviewed by Aleksey Yeschenko CASSANDRA-9542


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

Branch: refs/heads/cassandra-2.2
Commit: d6312c5f4d6b1dbc16518becef1b7a785cea73b3
Parents: 5931eb4
Author: Robert Stupp sn...@snazy.de
Authored: Mon Jun 22 17:19:20 2015 +0200
Committer: Robert Stupp sn...@snazy.de
Committed: Mon Jun 22 17:19:20 2015 +0200

--
 CHANGES.txt |  1 +
 doc/cql3/CQL.textile|  4 +--
 .../statements/CreateAggregateStatement.java| 24 -
 .../cassandra/schema/LegacySchemaTables.java| 25 ++---
 .../apache/cassandra/cql3/AggregationTest.java  | 37 +---
 test/unit/org/apache/cassandra/cql3/UFTest.java |  1 +
 6 files changed, 74 insertions(+), 18 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/d6312c5f/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index f821136..93753e5 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.2
+ * Allow native functions in user-defined aggregates (CASSANDRA-9542)
  * Don't repair system_distributed by default (CASSANDRA-9621)
  * Fix mixing min, max, and count aggregates for blob type (CASSANRA-9622)
  * Rename class for DATE type in Java driver (CASSANDRA-9563)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/d6312c5f/doc/cql3/CQL.textile
--
diff --git a/doc/cql3/CQL.textile b/doc/cql3/CQL.textile
index 689ac94..ec1f660 100644
--- a/doc/cql3/CQL.textile
+++ b/doc/cql3/CQL.textile
@@ -708,9 +708,9 @@ Signatures for user-defined aggregates follow the same 
rules:#functionSignatur
 
 The optional @INITCOND@ defines the initial state value for the aggregate. It 
defaults to @null@. A non-@null@ @INITCOND@ must be specified for state 
functions that are declared with @RETURNS NULL ON NULL INPUT@.
 
-@SFUNC@ references an existing function to be used as the state modifying 
function. The type of first argument of the state function must match @STYPE@. 
The remaining argument types of the state function must match the argument 
types of the aggregate function. State is not updated for state functions 
declared with @RETURNS NULL ON NULL INPUT@ and called with @null@.
+@SFUNC@ references an existing function to be used as the state modifying 
function. The type of first argument of the state function must match @STYPE@. 
The remaining argument types of the state function must match the argument 
types of the aggregate function. State is not updated for state functions 
declared with @RETURNS NULL ON NULL INPUT@ and called with @null@. Functions 
from the system keyspace are resolved before functions in the current keyspace.
 
-The optional @FINALFUNC@ is called just before the aggregate result is 
returned. It must take only one argument with type @STYPE@. The return type of 
the @FINALFUNC@ may be a different type. A final function declared with 
@RETURNS NULL ON NULL INPUT@ means that the aggregate's return value will be 
@null@, if the last state is @null@.
+The optional @FINALFUNC@ is called just before the aggregate result is 
returned. It must take only one argument with type @STYPE@. The return type of 
the @FINALFUNC@ may be a different type. A final function declared with 
@RETURNS NULL ON NULL INPUT@ means that the aggregate's return value will be 
@null@, if the last state is @null@. Functions from the system keyspace are 
resolved before functions in the current keyspace.
 
 If no @FINALFUNC@ is defined, the overall return type of the aggregate 
function is @STYPE@.  If a @FINALFUNC@ is defined, it is the return type of 
that function.
 

http://git-wip-us.apache.org/repos/asf/cassandra/blob/d6312c5f/src/java/org/apache/cassandra/cql3/statements/CreateAggregateStatement.java
--
diff --git 
a/src/java/org/apache/cassandra/cql3/statements/CreateAggregateStatement.java 
b/src/java/org/apache/cassandra/cql3/statements/CreateAggregateStatement.java
index 8b6c8d6..039993f 100644
--- 
a/src/java/org/apache/cassandra/cql3/statements/CreateAggregateStatement.java
+++ 
b/src/java/org/apache/cassandra/cql3/statements/CreateAggregateStatement.java
@@ -86,7 +86,11 @@ public final class CreateAggregateStatement extends 
SchemaAlteringStatement
 

[jira] [Created] (CASSANDRA-9634) Set kernel timer resolution on Windows

2015-06-22 Thread Joshua McKenzie (JIRA)
Joshua McKenzie created CASSANDRA-9634:
--

 Summary: Set kernel timer resolution on Windows
 Key: CASSANDRA-9634
 URL: https://issues.apache.org/jira/browse/CASSANDRA-9634
 Project: Cassandra
  Issue Type: Improvement
Reporter: Joshua McKenzie
Assignee: Joshua McKenzie
 Fix For: 2.2.x


In Windows 7 and to a similar extent Windows 8, the kernel's internal time is 
set to an interval of 15.6ms. (Use 
[clockres|https://technet.microsoft.com/en-us/sysinternals/bb897568.aspx] to 
confirm current 'tick rate' on Windows). Win8/Server2012 have a tickless kernel 
w/timer coalescing ([info 
here|http://arstechnica.com/information-technology/2012/10/better-on-the-inside-under-the-hood-of-windows-8/2/])
 and the platform shows similar performance characteristics with C* to Windows 
7 with a slight edge in performance to win8/server 2012 in my testing (the 
testing and results of which are outside the scope of this ticket).

Some arguments against lowering the system's internal timer to 1ms are 
[here|https://randomascii.wordpress.com/2013/07/08/windows-timer-resolution-megawatts-wasted/].
 These seem largely constrained to it'll drain your battery and it'll 
prevent your processor from being as effective in sleep states. The 2nd is 
somewhat of a concern as we don't want Windows users to all of a sudden have 
increased CPU-usage bills from virtualized environments. In the comments, one 
individual mentions a VirtualBox VM spinning at 10-20% cpu just from changing 
that flag alone which seems mathematically unlikely, but is worth keeping an 
eye on and testing.

A Microsoft publication that largely reinforces the cautionary tale on power 
consumption can be found 
[here|http://download.microsoft.com/download/3/0/2/3027D574-C433-412A-A8B6-5E0A75D5B237/Timer-Resolution.docx].

With the cautionary tales on our rader, the impact on throughput and latency on 
the 2.2 branch on Windows is [fairly 
dramatic|https://docs.google.com/spreadsheets/d/1nqPhNwOVt0SU7b9lt9o4Tyl0Z1yDrV2oo7LbBPaFa6A/edit#gid=0].
 A couple of caveats on these #'s: I'm not completely saturating the system as 
the thread count is relatively low (keeping it consistent with other testing 
where it *was* saturating), and the read #'s from our 2012 test environment are 
not affected by this timer change while I see it on 3 other bare-metal 
installations. The testing environment is new and we haven't worked out the 
kinks yet, however the write / mixed illustrate the throughput and latency #'s 
I've mentioned above; for reads the cpu's are sitting idle at 1-5% used by 
stress and C* so something else clearly needs to be addressed there; I included 
them for completeness sake.

Some preliminary testing on OpenStack indicates kernel-space syscall saturation 
w/this patch that actually *degrades* performance, however the unpatched 
performance numbers in our OpenStack environment are low enough that I question 
their validity.

Opening this ticket w/attached branch to get it on the radar / conversation 
going, and I'm going to update this from being hard-coded to being a tunable in 
the .yaml.

Initial patch [available 
here|https://github.com/apache/cassandra/compare/trunk...josh-mckenzie:2.2_WinTimer].



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


[jira] [Updated] (CASSANDRA-9623) Added column does not sort as the last column

2015-06-22 Thread Philip Thompson (JIRA)

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

Philip Thompson updated CASSANDRA-9623:
---
Reproduced In: 2.0.13
Fix Version/s: 2.0.x
 Assignee: Tyler Hobbs

 Added column does not sort as the last column
 -

 Key: CASSANDRA-9623
 URL: https://issues.apache.org/jira/browse/CASSANDRA-9623
 Project: Cassandra
  Issue Type: Bug
Reporter: Marcin Pietraszek
Assignee: Tyler Hobbs
 Fix For: 2.0.x


 After adding new machines to existing cluster running cleanup one of the 
 tables ends with:
 {noformat}
 ERROR [CompactionExecutor:1015] 2015-06-19 11:24:05,038 CassandraDaemon.java 
 (line 199) Exception in thread Thread[CompactionExecutor:1015,1,main]
 java.lang.AssertionError: Added column does not sort as the last column
 at 
 org.apache.cassandra.db.ArrayBackedSortedColumns.addColumn(ArrayBackedSortedColumns.java:116)
 at 
 org.apache.cassandra.db.ColumnFamily.addColumn(ColumnFamily.java:121)
 at org.apache.cassandra.db.ColumnFamily.addAtom(ColumnFamily.java:155)
 at 
 org.apache.cassandra.io.sstable.SSTableIdentityIterator.getColumnFamilyWithColumns(SSTableIdentityIterator.java:186)
 at 
 org.apache.cassandra.db.compaction.PrecompactedRow.merge(PrecompactedRow.java:98)
 at 
 org.apache.cassandra.db.compaction.PrecompactedRow.init(PrecompactedRow.java:85)
 at 
 org.apache.cassandra.db.compaction.CompactionController.getCompactedRow(CompactionController.java:196)
 at 
 org.apache.cassandra.db.compaction.CompactionIterable$Reducer.getReduced(CompactionIterable.java:74)
 at 
 org.apache.cassandra.db.compaction.CompactionIterable$Reducer.getReduced(CompactionIterable.java:55)
 at 
 org.apache.cassandra.utils.MergeIterator$ManyToOne.consume(MergeIterator.java:115)
 at 
 org.apache.cassandra.utils.MergeIterator$ManyToOne.computeNext(MergeIterator.java:98)
 at 
 com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:143)
 at 
 com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:138)
 at 
 org.apache.cassandra.db.compaction.CompactionTask.runMayThrow(CompactionTask.java:161)
 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:471)
 at java.util.concurrent.FutureTask.run(FutureTask.java:262)
 at 
 java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
 at 
 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
 at java.lang.Thread.run(Thread.java:745)
 {noformat}
 We're using patched 2.0.13-190ef4f



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


[1/2] cassandra git commit: Deprecate sstable2json and json2sstable

2015-06-22 Thread slebresne
Repository: cassandra
Updated Branches:
  refs/heads/trunk 55269db17 - c31ecba4b


Deprecate sstable2json and json2sstable

patch by slebresne; reviewed by iamaleksey for CASSANDRA-9618


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

Branch: refs/heads/trunk
Commit: affb10ce3a477c5630dd672af6e7b21ce9079761
Parents: d6312c5
Author: Sylvain Lebresne sylv...@datastax.com
Authored: Mon Jun 22 17:55:16 2015 +0200
Committer: Sylvain Lebresne sylv...@datastax.com
Committed: Mon Jun 22 18:12:38 2015 +0200

--
 CHANGES.txt| 1 +
 NEWS.txt   | 3 +++
 src/java/org/apache/cassandra/tools/SSTableExport.java | 3 +++
 src/java/org/apache/cassandra/tools/SSTableImport.java | 4 
 4 files changed, 11 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/affb10ce/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 93753e5..1e2acc4 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.2
+ * Deprected sstable2json and json2sstable (CASSANDRA-9618)
  * Allow native functions in user-defined aggregates (CASSANDRA-9542)
  * Don't repair system_distributed by default (CASSANDRA-9621)
  * Fix mixing min, max, and count aggregates for blob type (CASSANRA-9622)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/affb10ce/NEWS.txt
--
diff --git a/NEWS.txt b/NEWS.txt
index 3c71310..fcf254b 100644
--- a/NEWS.txt
+++ b/NEWS.txt
@@ -135,6 +135,9 @@ Upgrading
- The SSTableSimpleWriter and SSTableSimpleUnsortedWriter classes have been
  deprecated and will be removed in the next major Cassandra release. You
  should use the CQLSSTableWriter class instead.
+   - The sstable2json and json2sstable tools have been deprecated and will be
+ removed in the next major Cassandra release. See CASSANDRA-9618
+ (https://issues.apache.org/jira/browse/CASSANDRA-9618) for details.
 
 2.1.6
 =

http://git-wip-us.apache.org/repos/asf/cassandra/blob/affb10ce/src/java/org/apache/cassandra/tools/SSTableExport.java
--
diff --git a/src/java/org/apache/cassandra/tools/SSTableExport.java 
b/src/java/org/apache/cassandra/tools/SSTableExport.java
index bc460a1..9f833e7 100644
--- a/src/java/org/apache/cassandra/tools/SSTableExport.java
+++ b/src/java/org/apache/cassandra/tools/SSTableExport.java
@@ -380,6 +380,9 @@ public class SSTableExport
  */
 public static void main(String[] args) throws ConfigurationException
 {
+System.err.println(WARNING: please note that sstable2json is now 
deprecated and will be removed in Cassandra 3.0. 
+ + Please see 
https://issues.apache.org/jira/browse/CASSANDRA-9618 for details.);
+
 String usage = String.format(Usage: %s sstable [-k key [-k key 
[...]] -x key [-x key [...]]]%n, SSTableExport.class.getName());
 
 CommandLineParser parser = new PosixParser();

http://git-wip-us.apache.org/repos/asf/cassandra/blob/affb10ce/src/java/org/apache/cassandra/tools/SSTableImport.java
--
diff --git a/src/java/org/apache/cassandra/tools/SSTableImport.java 
b/src/java/org/apache/cassandra/tools/SSTableImport.java
index 2fda6bd..b2d63aa 100644
--- a/src/java/org/apache/cassandra/tools/SSTableImport.java
+++ b/src/java/org/apache/cassandra/tools/SSTableImport.java
@@ -470,6 +470,10 @@ public class SSTableImport
  */
 public static void main(String[] args) throws ParseException, 
ConfigurationException
 {
+System.err.println(WARNING: please note that json2sstable is now 
deprecated and will be removed in Cassandra 3.0. 
+ + You should use CQLSSTableWriter if you want to 
write sstables directly. 
+ + Please see 
https://issues.apache.org/jira/browse/CASSANDRA-9618 for details.);
+
 CommandLineParser parser = new PosixParser();
 
 try



[jira] [Updated] (CASSANDRA-9603) Expose private listen_address in system.local

2015-06-22 Thread T Jake Luciani (JIRA)

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

T Jake Luciani updated CASSANDRA-9603:
--
Fix Version/s: (was: 2.1.7)
   2.1.x

 Expose private listen_address in system.local
 -

 Key: CASSANDRA-9603
 URL: https://issues.apache.org/jira/browse/CASSANDRA-9603
 Project: Cassandra
  Issue Type: Improvement
  Components: Core
Reporter: Piotr Kołaczkowski
 Fix For: 2.1.x


 We had some hopes CASSANDRA-9436 would add it, yet it added rpc_address 
 instead of both rpc_address *and* listen_address. We really need 
 listen_address here, because we need to get information on the private IP C* 
 binds to. Knowing this we could better match Spark nodes to C* nodes and 
 process data locally in environments where rpc_address != listen_address like 
 EC2. 
 See, Spark does not know rpc addresses nor it has a concept of broadcast 
 address. It only knows the hostname / IP its workers bind to. In case of 
 cloud environments, these are private IPs. Now if we give Spark a set of C* 
 nodes identified by rpc_addresses, Spark doesn't recognize them as belonging 
 to the same cluster. It treats them as remote nodes and has no idea where 
 to send tasks optimally. 
 Current situation (example):
 Spark worker nodes: [10.0.0.1, 10.0.0.2, 10.0.0.3]
 C* nodes: [10.0.0.1 / node1.blah.ec2.com, 10.0.0.2 / node2.blah.ec2.com, 
 10.0.0.3 / node3.blah.ec2.com]
 What the application knows about the cluster: [node1.blah.ec2.com, 
 node2.blah.ec2.com, node3.blah.ec2.com]
 What the application sends to Spark for execution:
  Task1 - please execute on node1.blah.ec2.com
  Task2 - please execute on node2.blah.ec2.com
  Task3 - please execute on node3.blah.ec2.com
 How Spark understands it: I have no idea what node1.blah.ec2.com is, let's 
 assign Task1 it to a *random* node :(
 Expected:
 Spark worker nodes: [10.0.0.1, 10.0.0.2, 10.0.0.3]
 C* nodes: [10.0.0.1 / node1.blah.ec2.com, 10.0.0.2 / node2.blah.ec2.com, 
 10.0.0.3 / node3.blah.ec2.com]
 What the application knows about the cluster: [10.0.0.1 / node1.blah.ec2.com, 
 10.0.0.2 / node2.blah.ec2.com, 10.0.0.3 / node3.blah.ec2.com]
 What the application sends to Spark for execution:
  Task1 - please execute on node1.blah.ec2.com or 10.0.0.1
  Task2 - please execute on node2.blah.ec2.com or 10.0.0.2
  Task3 - please execute on node3.blah.ec2.com or 10.0.0.3
 How Spark understands it: 10.0.0.1? - I have a worker on that node, lets put 
 Task 1 there



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


Git Push Summary

2015-06-22 Thread jake
Repository: cassandra
Updated Tags:  refs/tags/cassandra-2.0.16 [created] 8248f4bb5


[jira] [Updated] (CASSANDRA-9625) GraphiteReporter not reporting

2015-06-22 Thread Philip Thompson (JIRA)

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

Philip Thompson updated CASSANDRA-9625:
---
Assignee: T Jake Luciani

 GraphiteReporter not reporting
 --

 Key: CASSANDRA-9625
 URL: https://issues.apache.org/jira/browse/CASSANDRA-9625
 Project: Cassandra
  Issue Type: Bug
 Environment: Debian Jessie, 7u79-2.5.5-1~deb8u1, Cassandra 2.1.3
Reporter: Eric Evans
Assignee: T Jake Luciani
 Fix For: 2.1.x

 Attachments: metrics.yaml, thread-dump.log


 When upgrading from 2.1.3 to 2.1.6, the Graphite metrics reporter stops 
 working.  The usual startup is logged, and one batch of samples is sent, but 
 the reporting interval comes and goes, and no other samples are ever sent.  
 The logs are free from errors.
 Frustratingly, metrics reporting works in our smaller (staging) environment 
 on 2.1.6; We are able to reproduce this on all 6 of production nodes, but not 
 on a 3 node (otherwise identical) staging cluster (maybe it takes a certain 
 level of concurrency?).
 Attached is a thread dump, and our metrics.yaml.



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


[jira] [Updated] (CASSANDRA-9565) 'WITH WITH' in alter keyspace statements causes NPE

2015-06-22 Thread Robert Stupp (JIRA)

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

Robert Stupp updated CASSANDRA-9565:

Fix Version/s: 2.2.0 rc2

 'WITH WITH' in alter keyspace statements causes NPE
 ---

 Key: CASSANDRA-9565
 URL: https://issues.apache.org/jira/browse/CASSANDRA-9565
 Project: Cassandra
  Issue Type: Bug
Reporter: Jim Witschey
Assignee: Benjamin Lerer
 Fix For: 2.2.0 rc2

 Attachments: 9565-2.0.txt, 9565-2.1.txt


 Running any of these statements:
 {code}
 ALTER KEYSPACE WITH WITH DURABLE_WRITES = true;
 ALTER KEYSPACE ks WITH WITH DURABLE_WRITES = true;
 CREATE KEYSPACE WITH WITH DURABLE_WRITES = true;
 CREATE KEYSPACE ks WITH WITH DURABLE_WRITES = true;
 {code}
 Fails, raising a {{SyntaxException}} and giving a {{NullPointerException}} as 
 the reason for failure. This happens in all versions I tried, including 
 2.0.15, 2.1.5, and HEAD on cassandra-2.0, cassandra-2.1, cassandra-2.2, and 
 trunk.
 EDIT: A dtest is 
 [here|https://github.com/mambocab/cassandra-dtest/commit/da3785e25cce505183e0ebc8dd21340f3a3ea3a4#diff-dcb0fc3aff201fd7eeea6cbf1181f921R5300],
  but it would probably be more appropriate to test with unit tests.



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


[jira] [Updated] (CASSANDRA-9629) Error when reading date after altering column

2015-06-22 Thread Philip Thompson (JIRA)

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

Philip Thompson updated CASSANDRA-9629:
---
Assignee: Carl Yeksigian

 Error when reading date after altering column
 -

 Key: CASSANDRA-9629
 URL: https://issues.apache.org/jira/browse/CASSANDRA-9629
 Project: Cassandra
  Issue Type: Bug
Reporter: Tomasz Bartczak
Assignee: Carl Yeksigian
 Fix For: 2.1.x


 Having a table with timestamp column and a prepared statement for it - after 
 altering the table with new column - reading date values are broken.
 {code}
 com.datastax.driver.core.exceptions.InvalidTypeException: Invalid 64-bits 
 long value, expecting 8 bytes but got 1
   at 
 com.datastax.driver.core.TypeCodec$LongCodec.deserializeNoBoxing(TypeCodec.java:452)
   at 
 com.datastax.driver.core.TypeCodec$DateCodec.deserialize(TypeCodec.java:826)
   at 
 com.datastax.driver.core.AbstractGettableByIndexData.getDate(AbstractGettableByIndexData.java:155)
   at 
 com.datastax.driver.core.AbstractGettableData.getDate(AbstractGettableData.java:26)
   at 
 com.datastax.driver.core.AbstractGettableData.getDate(AbstractGettableData.java:99)
   at 
 CassandraAlterTable$delayedInit$body.apply(CassandraAlterTable.scala:19)
   at scala.Function0$class.apply$mcV$sp(Function0.scala:40)
   at 
 scala.runtime.AbstractFunction0.apply$mcV$sp(AbstractFunction0.scala:12)
   at scala.App$$anonfun$main$1.apply(App.scala:71)
   at scala.App$$anonfun$main$1.apply(App.scala:71)
   at scala.collection.immutable.List.foreach(List.scala:318)
   at 
 scala.collection.generic.TraversableForwarder$class.foreach(TraversableForwarder.scala:32)
   at scala.App$class.main(App.scala:71)
   at CassandraAlterTable$.main(CassandraAlterTable.scala:8)
   at CassandraAlterTable.main(CassandraAlterTable.scala)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at 
 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
   at 
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   at java.lang.reflect.Method.invoke(Method.java:497)
 {code}
 This bug is reproduced in : https://github.com/kretes/cassandra-alter



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


[jira] [Updated] (CASSANDRA-9629) Error when reading date after altering column

2015-06-22 Thread Philip Thompson (JIRA)

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

Philip Thompson updated CASSANDRA-9629:
---
Fix Version/s: 2.1.x

 Error when reading date after altering column
 -

 Key: CASSANDRA-9629
 URL: https://issues.apache.org/jira/browse/CASSANDRA-9629
 Project: Cassandra
  Issue Type: Bug
Reporter: Tomasz Bartczak
 Fix For: 2.1.x


 Having a table with timestamp column and a prepared statement for it - after 
 altering the table with new column - reading date values are broken.
 {code}
 com.datastax.driver.core.exceptions.InvalidTypeException: Invalid 64-bits 
 long value, expecting 8 bytes but got 1
   at 
 com.datastax.driver.core.TypeCodec$LongCodec.deserializeNoBoxing(TypeCodec.java:452)
   at 
 com.datastax.driver.core.TypeCodec$DateCodec.deserialize(TypeCodec.java:826)
   at 
 com.datastax.driver.core.AbstractGettableByIndexData.getDate(AbstractGettableByIndexData.java:155)
   at 
 com.datastax.driver.core.AbstractGettableData.getDate(AbstractGettableData.java:26)
   at 
 com.datastax.driver.core.AbstractGettableData.getDate(AbstractGettableData.java:99)
   at 
 CassandraAlterTable$delayedInit$body.apply(CassandraAlterTable.scala:19)
   at scala.Function0$class.apply$mcV$sp(Function0.scala:40)
   at 
 scala.runtime.AbstractFunction0.apply$mcV$sp(AbstractFunction0.scala:12)
   at scala.App$$anonfun$main$1.apply(App.scala:71)
   at scala.App$$anonfun$main$1.apply(App.scala:71)
   at scala.collection.immutable.List.foreach(List.scala:318)
   at 
 scala.collection.generic.TraversableForwarder$class.foreach(TraversableForwarder.scala:32)
   at scala.App$class.main(App.scala:71)
   at CassandraAlterTable$.main(CassandraAlterTable.scala:8)
   at CassandraAlterTable.main(CassandraAlterTable.scala)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at 
 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
   at 
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   at java.lang.reflect.Method.invoke(Method.java:497)
 {code}
 This bug is reproduced in : https://github.com/kretes/cassandra-alter



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


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

2015-06-22 Thread slebresne
Merge branch 'cassandra-2.2' into trunk


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

Branch: refs/heads/trunk
Commit: c31ecba4b516c6fa6ab2a879e45c4f035bd70d27
Parents: 55269db affb10c
Author: Sylvain Lebresne sylv...@datastax.com
Authored: Mon Jun 22 18:13:43 2015 +0200
Committer: Sylvain Lebresne sylv...@datastax.com
Committed: Mon Jun 22 18:13:43 2015 +0200

--
 CHANGES.txt| 1 +
 NEWS.txt   | 3 +++
 src/java/org/apache/cassandra/tools/SSTableExport.java | 3 +++
 src/java/org/apache/cassandra/tools/SSTableImport.java | 4 
 4 files changed, 11 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/c31ecba4/CHANGES.txt
--
diff --cc CHANGES.txt
index 3a22387,1e2acc4..c2c62ae
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,15 -1,5 +1,16 @@@
 +3.0:
 + * Add nodetool command to replay batchlog (CASSANDRA-9547)
 + * Make file buffer cache independent of paths being read (CASSANDRA-8897)
 + * Remove deprecated legacy Hadoop code (CASSANDRA-9353)
 + * Decommissioned nodes will not rejoin the cluster (CASSANDRA-8801)
 + * Change gossip stabilization to use endpoit size (CASSANDRA-9401)
 + * Change default garbage collector to G1 (CASSANDRA-7486)
 + * Populate TokenMetadata early during startup (CASSANDRA-9317)
 + * undeprecate cache recentHitRate (CASSANDRA-6591)
 +
 +
  2.2
+  * Deprected sstable2json and json2sstable (CASSANDRA-9618)
   * Allow native functions in user-defined aggregates (CASSANDRA-9542)
   * Don't repair system_distributed by default (CASSANDRA-9621)
   * Fix mixing min, max, and count aggregates for blob type (CASSANRA-9622)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/c31ecba4/NEWS.txt
--



cassandra git commit: Deprecate sstable2json and json2sstable

2015-06-22 Thread slebresne
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-2.2 d6312c5f4 - affb10ce3


Deprecate sstable2json and json2sstable

patch by slebresne; reviewed by iamaleksey for CASSANDRA-9618


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

Branch: refs/heads/cassandra-2.2
Commit: affb10ce3a477c5630dd672af6e7b21ce9079761
Parents: d6312c5
Author: Sylvain Lebresne sylv...@datastax.com
Authored: Mon Jun 22 17:55:16 2015 +0200
Committer: Sylvain Lebresne sylv...@datastax.com
Committed: Mon Jun 22 18:12:38 2015 +0200

--
 CHANGES.txt| 1 +
 NEWS.txt   | 3 +++
 src/java/org/apache/cassandra/tools/SSTableExport.java | 3 +++
 src/java/org/apache/cassandra/tools/SSTableImport.java | 4 
 4 files changed, 11 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/affb10ce/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 93753e5..1e2acc4 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.2
+ * Deprected sstable2json and json2sstable (CASSANDRA-9618)
  * Allow native functions in user-defined aggregates (CASSANDRA-9542)
  * Don't repair system_distributed by default (CASSANDRA-9621)
  * Fix mixing min, max, and count aggregates for blob type (CASSANRA-9622)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/affb10ce/NEWS.txt
--
diff --git a/NEWS.txt b/NEWS.txt
index 3c71310..fcf254b 100644
--- a/NEWS.txt
+++ b/NEWS.txt
@@ -135,6 +135,9 @@ Upgrading
- The SSTableSimpleWriter and SSTableSimpleUnsortedWriter classes have been
  deprecated and will be removed in the next major Cassandra release. You
  should use the CQLSSTableWriter class instead.
+   - The sstable2json and json2sstable tools have been deprecated and will be
+ removed in the next major Cassandra release. See CASSANDRA-9618
+ (https://issues.apache.org/jira/browse/CASSANDRA-9618) for details.
 
 2.1.6
 =

http://git-wip-us.apache.org/repos/asf/cassandra/blob/affb10ce/src/java/org/apache/cassandra/tools/SSTableExport.java
--
diff --git a/src/java/org/apache/cassandra/tools/SSTableExport.java 
b/src/java/org/apache/cassandra/tools/SSTableExport.java
index bc460a1..9f833e7 100644
--- a/src/java/org/apache/cassandra/tools/SSTableExport.java
+++ b/src/java/org/apache/cassandra/tools/SSTableExport.java
@@ -380,6 +380,9 @@ public class SSTableExport
  */
 public static void main(String[] args) throws ConfigurationException
 {
+System.err.println(WARNING: please note that sstable2json is now 
deprecated and will be removed in Cassandra 3.0. 
+ + Please see 
https://issues.apache.org/jira/browse/CASSANDRA-9618 for details.);
+
 String usage = String.format(Usage: %s sstable [-k key [-k key 
[...]] -x key [-x key [...]]]%n, SSTableExport.class.getName());
 
 CommandLineParser parser = new PosixParser();

http://git-wip-us.apache.org/repos/asf/cassandra/blob/affb10ce/src/java/org/apache/cassandra/tools/SSTableImport.java
--
diff --git a/src/java/org/apache/cassandra/tools/SSTableImport.java 
b/src/java/org/apache/cassandra/tools/SSTableImport.java
index 2fda6bd..b2d63aa 100644
--- a/src/java/org/apache/cassandra/tools/SSTableImport.java
+++ b/src/java/org/apache/cassandra/tools/SSTableImport.java
@@ -470,6 +470,10 @@ public class SSTableImport
  */
 public static void main(String[] args) throws ParseException, 
ConfigurationException
 {
+System.err.println(WARNING: please note that json2sstable is now 
deprecated and will be removed in Cassandra 3.0. 
+ + You should use CQLSSTableWriter if you want to 
write sstables directly. 
+ + Please see 
https://issues.apache.org/jira/browse/CASSANDRA-9618 for details.);
+
 CommandLineParser parser = new PosixParser();
 
 try



Git Push Summary

2015-06-22 Thread jake
Repository: cassandra
Updated Tags:  refs/tags/2.1.7-tentative [deleted] 718c14432


svn commit: r9474 - in /release/cassandra: 2.0.14/ 2.0.15/ 2.0.16/ 2.1.4/ 2.1.5/ 2.1.6/ 2.1.7/ debian/dists/20x/ debian/dists/20x/main/binary-amd64/ debian/dists/20x/main/binary-i386/ debian/dists/20x

2015-06-22 Thread jake
Author: jake
Date: Mon Jun 22 16:07:48 2015
New Revision: 9474

Log:
2.0.16 and 2.1.7 releases

Added:
release/cassandra/2.0.16/
release/cassandra/2.0.16/apache-cassandra-2.0.16-bin.tar.gz   (with props)
release/cassandra/2.0.16/apache-cassandra-2.0.16-bin.tar.gz.asc
release/cassandra/2.0.16/apache-cassandra-2.0.16-bin.tar.gz.asc.md5
release/cassandra/2.0.16/apache-cassandra-2.0.16-bin.tar.gz.asc.sha1
release/cassandra/2.0.16/apache-cassandra-2.0.16-bin.tar.gz.md5
release/cassandra/2.0.16/apache-cassandra-2.0.16-bin.tar.gz.sha1
release/cassandra/2.0.16/apache-cassandra-2.0.16-src.tar.gz   (with props)
release/cassandra/2.0.16/apache-cassandra-2.0.16-src.tar.gz.asc
release/cassandra/2.0.16/apache-cassandra-2.0.16-src.tar.gz.asc.md5
release/cassandra/2.0.16/apache-cassandra-2.0.16-src.tar.gz.asc.sha1
release/cassandra/2.0.16/apache-cassandra-2.0.16-src.tar.gz.md5
release/cassandra/2.0.16/apache-cassandra-2.0.16-src.tar.gz.sha1
release/cassandra/2.1.7/
release/cassandra/2.1.7/apache-cassandra-2.1.7-bin.tar.gz   (with props)
release/cassandra/2.1.7/apache-cassandra-2.1.7-bin.tar.gz.asc
release/cassandra/2.1.7/apache-cassandra-2.1.7-bin.tar.gz.asc.md5
release/cassandra/2.1.7/apache-cassandra-2.1.7-bin.tar.gz.asc.sha1
release/cassandra/2.1.7/apache-cassandra-2.1.7-bin.tar.gz.md5
release/cassandra/2.1.7/apache-cassandra-2.1.7-bin.tar.gz.sha1
release/cassandra/2.1.7/apache-cassandra-2.1.7-src.tar.gz   (with props)
release/cassandra/2.1.7/apache-cassandra-2.1.7-src.tar.gz.asc
release/cassandra/2.1.7/apache-cassandra-2.1.7-src.tar.gz.asc.md5
release/cassandra/2.1.7/apache-cassandra-2.1.7-src.tar.gz.asc.sha1
release/cassandra/2.1.7/apache-cassandra-2.1.7-src.tar.gz.md5
release/cassandra/2.1.7/apache-cassandra-2.1.7-src.tar.gz.sha1

release/cassandra/debian/pool/main/c/cassandra/cassandra-tools_2.1.7_all.deb   
(with props)
release/cassandra/debian/pool/main/c/cassandra/cassandra_2.0.16.diff.gz   
(with props)
release/cassandra/debian/pool/main/c/cassandra/cassandra_2.0.16.dsc
release/cassandra/debian/pool/main/c/cassandra/cassandra_2.0.16.orig.tar.gz 
  (with props)

release/cassandra/debian/pool/main/c/cassandra/cassandra_2.0.16.orig.tar.gz.asc
release/cassandra/debian/pool/main/c/cassandra/cassandra_2.0.16_all.deb   
(with props)
release/cassandra/debian/pool/main/c/cassandra/cassandra_2.1.7.diff.gz   
(with props)
release/cassandra/debian/pool/main/c/cassandra/cassandra_2.1.7.dsc
release/cassandra/debian/pool/main/c/cassandra/cassandra_2.1.7.orig.tar.gz  
 (with props)

release/cassandra/debian/pool/main/c/cassandra/cassandra_2.1.7.orig.tar.gz.asc
release/cassandra/debian/pool/main/c/cassandra/cassandra_2.1.7_all.deb   
(with props)
Removed:
release/cassandra/2.0.14/
release/cassandra/2.0.15/
release/cassandra/2.1.4/
release/cassandra/2.1.5/
release/cassandra/2.1.6/
release/cassandra/debian/pool/main/c/cassandra/cassandra-tools_2.1.4_all.deb
release/cassandra/debian/pool/main/c/cassandra/cassandra-tools_2.1.5_all.deb
release/cassandra/debian/pool/main/c/cassandra/cassandra-tools_2.1.6_all.deb
release/cassandra/debian/pool/main/c/cassandra/cassandra_2.0.14.diff.gz
release/cassandra/debian/pool/main/c/cassandra/cassandra_2.0.14.dsc
release/cassandra/debian/pool/main/c/cassandra/cassandra_2.0.14.orig.tar.gz

release/cassandra/debian/pool/main/c/cassandra/cassandra_2.0.14.orig.tar.gz.asc
release/cassandra/debian/pool/main/c/cassandra/cassandra_2.0.14_all.deb
release/cassandra/debian/pool/main/c/cassandra/cassandra_2.0.15.diff.gz
release/cassandra/debian/pool/main/c/cassandra/cassandra_2.0.15.dsc
release/cassandra/debian/pool/main/c/cassandra/cassandra_2.0.15.orig.tar.gz

release/cassandra/debian/pool/main/c/cassandra/cassandra_2.0.15.orig.tar.gz.asc
release/cassandra/debian/pool/main/c/cassandra/cassandra_2.0.15_all.deb
release/cassandra/debian/pool/main/c/cassandra/cassandra_2.1.4.diff.gz
release/cassandra/debian/pool/main/c/cassandra/cassandra_2.1.4.dsc
release/cassandra/debian/pool/main/c/cassandra/cassandra_2.1.4.orig.tar.gz

release/cassandra/debian/pool/main/c/cassandra/cassandra_2.1.4.orig.tar.gz.asc
release/cassandra/debian/pool/main/c/cassandra/cassandra_2.1.4_all.deb
release/cassandra/debian/pool/main/c/cassandra/cassandra_2.1.5.diff.gz
release/cassandra/debian/pool/main/c/cassandra/cassandra_2.1.5.dsc
release/cassandra/debian/pool/main/c/cassandra/cassandra_2.1.5.orig.tar.gz

release/cassandra/debian/pool/main/c/cassandra/cassandra_2.1.5.orig.tar.gz.asc
release/cassandra/debian/pool/main/c/cassandra/cassandra_2.1.5_all.deb
release/cassandra/debian/pool/main/c/cassandra/cassandra_2.1.6.diff.gz
release/cassandra/debian/pool/main/c/cassandra/cassandra_2.1.6.dsc
release/cassandra/debian/pool/main/c/cassandra/cassandra_2.1.6.orig.tar.gz


[jira] [Updated] (CASSANDRA-9634) Set kernel timer resolution on Windows

2015-06-22 Thread Joshua McKenzie (JIRA)

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

Joshua McKenzie updated CASSANDRA-9634:
---
Description: 
In Windows 7/Server 2008 and to a similar extent Windows 8/Server 2012, the 
kernel's internal time is set to an interval of 15.6ms. (Use 
[clockres|https://technet.microsoft.com/en-us/sysinternals/bb897568.aspx] to 
confirm current 'tick rate' on Windows). Win8/Server2012 have a tickless kernel 
w/timer coalescing ([info 
here|http://arstechnica.com/information-technology/2012/10/better-on-the-inside-under-the-hood-of-windows-8/2/])
 and the platform shows similar performance characteristics with C* to Windows 
7 with a slight edge in performance to win8/server 2012 in my testing (the 
testing and results of which are outside the scope of this ticket).

Some arguments against lowering the system's internal timer to 1ms are 
[here|https://randomascii.wordpress.com/2013/07/08/windows-timer-resolution-megawatts-wasted/].
 These seem largely constrained to it'll drain your battery and it'll 
prevent your processor from being as effective in sleep states. The 2nd is 
somewhat of a concern as we don't want Windows users to all of a sudden have 
increased CPU-usage bills from virtualized environments. In the comments, one 
individual mentions a VirtualBox VM spinning at 10-20% cpu just from changing 
that flag alone which seems mathematically unlikely, but is worth keeping an 
eye on and testing.

A Microsoft publication that largely reinforces the cautionary tale on power 
consumption can be found 
[here|http://download.microsoft.com/download/3/0/2/3027D574-C433-412A-A8B6-5E0A75D5B237/Timer-Resolution.docx].

With the cautionary tales on our rader, the impact on throughput and latency on 
the 2.2 branch on Windows is [fairly 
dramatic|https://docs.google.com/spreadsheets/d/1nqPhNwOVt0SU7b9lt9o4Tyl0Z1yDrV2oo7LbBPaFa6A/edit#gid=0].
 A couple of caveats on these #'s: I'm not completely saturating the system as 
the thread count is relatively low (keeping it consistent with other testing 
where it *was* saturating), and the read #'s from our 2012 test environment are 
not affected by this timer change while I see it on 3 other bare-metal 
installations. The testing environment is new and we haven't worked out the 
kinks yet, however the write / mixed illustrate the throughput and latency #'s 
I've mentioned above; for reads the cpu's are sitting idle at 1-5% used by 
stress and C* so something else clearly needs to be addressed there; I included 
them for completeness sake.

Some preliminary testing on OpenStack indicates kernel-space syscall saturation 
w/this patch that actually *degrades* performance, however the unpatched 
performance numbers in our OpenStack environment are low enough that I question 
their validity.

Opening this ticket w/attached branch to get it on the radar / conversation 
going, and I'm going to update this from being hard-coded to being a tunable in 
the .yaml.

Initial patch [available 
here|https://github.com/apache/cassandra/compare/trunk...josh-mckenzie:2.2_WinTimer].

  was:
In Windows 7 and to a similar extent Windows 8, the kernel's internal time is 
set to an interval of 15.6ms. (Use 
[clockres|https://technet.microsoft.com/en-us/sysinternals/bb897568.aspx] to 
confirm current 'tick rate' on Windows). Win8/Server2012 have a tickless kernel 
w/timer coalescing ([info 
here|http://arstechnica.com/information-technology/2012/10/better-on-the-inside-under-the-hood-of-windows-8/2/])
 and the platform shows similar performance characteristics with C* to Windows 
7 with a slight edge in performance to win8/server 2012 in my testing (the 
testing and results of which are outside the scope of this ticket).

Some arguments against lowering the system's internal timer to 1ms are 
[here|https://randomascii.wordpress.com/2013/07/08/windows-timer-resolution-megawatts-wasted/].
 These seem largely constrained to it'll drain your battery and it'll 
prevent your processor from being as effective in sleep states. The 2nd is 
somewhat of a concern as we don't want Windows users to all of a sudden have 
increased CPU-usage bills from virtualized environments. In the comments, one 
individual mentions a VirtualBox VM spinning at 10-20% cpu just from changing 
that flag alone which seems mathematically unlikely, but is worth keeping an 
eye on and testing.

A Microsoft publication that largely reinforces the cautionary tale on power 
consumption can be found 
[here|http://download.microsoft.com/download/3/0/2/3027D574-C433-412A-A8B6-5E0A75D5B237/Timer-Resolution.docx].

With the cautionary tales on our rader, the impact on throughput and latency on 
the 2.2 branch on Windows is [fairly 
dramatic|https://docs.google.com/spreadsheets/d/1nqPhNwOVt0SU7b9lt9o4Tyl0Z1yDrV2oo7LbBPaFa6A/edit#gid=0].
 A couple of caveats on these #'s: I'm not completely saturating the system as 
the 

[jira] [Assigned] (CASSANDRA-9603) Expose private listen_address in system.local

2015-06-22 Thread Aleksey Yeschenko (JIRA)

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

Aleksey Yeschenko reassigned CASSANDRA-9603:


Assignee: Aleksey Yeschenko

 Expose private listen_address in system.local
 -

 Key: CASSANDRA-9603
 URL: https://issues.apache.org/jira/browse/CASSANDRA-9603
 Project: Cassandra
  Issue Type: Improvement
  Components: Core
Reporter: Piotr Kołaczkowski
Assignee: Aleksey Yeschenko
 Fix For: 2.1.x


 We had some hopes CASSANDRA-9436 would add it, yet it added rpc_address 
 instead of both rpc_address *and* listen_address. We really need 
 listen_address here, because we need to get information on the private IP C* 
 binds to. Knowing this we could better match Spark nodes to C* nodes and 
 process data locally in environments where rpc_address != listen_address like 
 EC2. 
 See, Spark does not know rpc addresses nor it has a concept of broadcast 
 address. It only knows the hostname / IP its workers bind to. In case of 
 cloud environments, these are private IPs. Now if we give Spark a set of C* 
 nodes identified by rpc_addresses, Spark doesn't recognize them as belonging 
 to the same cluster. It treats them as remote nodes and has no idea where 
 to send tasks optimally. 
 Current situation (example):
 Spark worker nodes: [10.0.0.1, 10.0.0.2, 10.0.0.3]
 C* nodes: [10.0.0.1 / node1.blah.ec2.com, 10.0.0.2 / node2.blah.ec2.com, 
 10.0.0.3 / node3.blah.ec2.com]
 What the application knows about the cluster: [node1.blah.ec2.com, 
 node2.blah.ec2.com, node3.blah.ec2.com]
 What the application sends to Spark for execution:
  Task1 - please execute on node1.blah.ec2.com
  Task2 - please execute on node2.blah.ec2.com
  Task3 - please execute on node3.blah.ec2.com
 How Spark understands it: I have no idea what node1.blah.ec2.com is, let's 
 assign Task1 it to a *random* node :(
 Expected:
 Spark worker nodes: [10.0.0.1, 10.0.0.2, 10.0.0.3]
 C* nodes: [10.0.0.1 / node1.blah.ec2.com, 10.0.0.2 / node2.blah.ec2.com, 
 10.0.0.3 / node3.blah.ec2.com]
 What the application knows about the cluster: [10.0.0.1 / node1.blah.ec2.com, 
 10.0.0.2 / node2.blah.ec2.com, 10.0.0.3 / node3.blah.ec2.com]
 What the application sends to Spark for execution:
  Task1 - please execute on node1.blah.ec2.com or 10.0.0.1
  Task2 - please execute on node2.blah.ec2.com or 10.0.0.2
  Task3 - please execute on node3.blah.ec2.com or 10.0.0.3
 How Spark understands it: 10.0.0.1? - I have a worker on that node, lets put 
 Task 1 there



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


[01/16] cassandra git commit: bump versions

2015-06-22 Thread snazy
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-2.0 f778c1f88 - c93942263
  refs/heads/cassandra-2.1 efebd8f17 - b969496e4
  refs/heads/cassandra-2.2 2deb68ede - 5931eb432
  refs/heads/trunk 51a9285e9 - 4045c2933


bump versions


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

Branch: refs/heads/cassandra-2.2
Commit: 718c144324d170535d4f1a1e79dd9869cce19ed1
Parents: 42ea6e1
Author: T Jake Luciani j...@apache.org
Authored: Thu Jun 18 14:53:07 2015 -0400
Committer: T Jake Luciani j...@apache.org
Committed: Thu Jun 18 14:53:07 2015 -0400

--
 NEWS.txt | 10 ++
 build.xml|  2 +-
 debian/changelog |  6 ++
 3 files changed, 17 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/718c1443/NEWS.txt
--
diff --git a/NEWS.txt b/NEWS.txt
index 272c837..80776e8 100644
--- a/NEWS.txt
+++ b/NEWS.txt
@@ -13,6 +13,16 @@ restore snapshots created with the previous major version 
using the
 'sstableloader' tool. You can upgrade the file format of your snapshots
 using the provided 'sstableupgrade' tool.
 
+
+2.1.7
+=
+
+Upgrading
+-
+- Nothing specific to this release, but please see 2.1 if you are upgrading
+  from a previous version.
+
+
 2.1.6
 =
 

http://git-wip-us.apache.org/repos/asf/cassandra/blob/718c1443/build.xml
--
diff --git a/build.xml b/build.xml
index adde1d3..73e76e5 100644
--- a/build.xml
+++ b/build.xml
@@ -25,7 +25,7 @@
 property name=debuglevel value=source,lines,vars/
 
 !-- default version and SCM information --
-property name=base.version value=2.1.6/
+property name=base.version value=2.1.7/
 property name=scm.connection 
value=scm:git://git.apache.org/cassandra.git/
 property name=scm.developerConnection 
value=scm:git://git.apache.org/cassandra.git/
 property name=scm.url 
value=http://git-wip-us.apache.org/repos/asf?p=cassandra.git;a=tree/

http://git-wip-us.apache.org/repos/asf/cassandra/blob/718c1443/debian/changelog
--
diff --git a/debian/changelog b/debian/changelog
index 1a742fa..d7e1fd1 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+cassandra (2.1.7) unstable; urgency=medium
+
+  * New release 
+
+ -- Jake Luciani j...@apache.org  Thu, 18 Jun 2015 14:52:26 -0400
+
 cassandra (2.1.6) unstable; urgency=medium
 
   * New release



[10/16] cassandra git commit: 'WITH WITH' in alter keyspace statements causes NPE

2015-06-22 Thread snazy
'WITH WITH' in alter keyspace statements causes NPE

patch by Benjamin Lerer; reviewed by Robert Stupp for CASSANDRA-9565


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

Branch: refs/heads/cassandra-2.0
Commit: c939422637bdba13fa3b5849cc1e7eacf26d46d0
Parents: f778c1f
Author: Benjamin Lerer blerer@benjamin.le...@datastax.com
Authored: Mon Jun 22 16:40:36 2015 +0200
Committer: Robert Stupp sn...@snazy.de
Committed: Mon Jun 22 16:40:36 2015 +0200

--
 CHANGES.txt |  1 +
 src/java/org/apache/cassandra/cql3/Cql.g|  4 +-
 .../cql3/CreateAndAlterKeyspaceTest.java| 89 
 3 files changed, 92 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/c9394226/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index b5b2f32..6e3a147 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.0.17
+ * 'WITH WITH' in alter keyspace statements causes NPE (CASSANDRA-9565)
  * Display min timestamp in sstablemetadata viewer (CASSANDRA-6767)
 
 

http://git-wip-us.apache.org/repos/asf/cassandra/blob/c9394226/src/java/org/apache/cassandra/cql3/Cql.g
--
diff --git a/src/java/org/apache/cassandra/cql3/Cql.g 
b/src/java/org/apache/cassandra/cql3/Cql.g
index d41434d..8b382fa 100644
--- a/src/java/org/apache/cassandra/cql3/Cql.g
+++ b/src/java/org/apache/cassandra/cql3/Cql.g
@@ -891,8 +891,8 @@ properties[PropertyDefinitions props]
 ;
 
 property[PropertyDefinitions props]
-: k=ident '=' (simple=propertyValue { try { 
$props.addProperty(k.toString(), simple); } catch (SyntaxException e) { 
addRecognitionError(e.getMessage()); } }
-   |   map=map_literal   { try { 
$props.addProperty(k.toString(), convertPropertyMap(map)); } catch 
(SyntaxException e) { addRecognitionError(e.getMessage()); } })
+: k=ident '=' simple=propertyValue { try { 
$props.addProperty(k.toString(), simple); } catch (SyntaxException e) { 
addRecognitionError(e.getMessage()); } }
+| k=ident '=' map=map_literal { try { $props.addProperty(k.toString(), 
convertPropertyMap(map)); } catch (SyntaxException e) { 
addRecognitionError(e.getMessage()); } }
 ;
 
 propertyValue returns [String str]

http://git-wip-us.apache.org/repos/asf/cassandra/blob/c9394226/test/unit/org/apache/cassandra/cql3/CreateAndAlterKeyspaceTest.java
--
diff --git 
a/test/unit/org/apache/cassandra/cql3/CreateAndAlterKeyspaceTest.java 
b/test/unit/org/apache/cassandra/cql3/CreateAndAlterKeyspaceTest.java
new file mode 100644
index 000..45be0df
--- /dev/null
+++ b/test/unit/org/apache/cassandra/cql3/CreateAndAlterKeyspaceTest.java
@@ -0,0 +1,89 @@
+/*
+ * 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.
+ */
+package org.apache.cassandra.cql3;
+
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+import org.apache.cassandra.SchemaLoader;
+import org.apache.cassandra.db.ConsistencyLevel;
+import org.apache.cassandra.exceptions.SyntaxException;
+import org.apache.cassandra.gms.Gossiper;
+
+import static org.apache.cassandra.cql3.QueryProcessor.process;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
+public class CreateAndAlterKeyspaceTest
+{
+@BeforeClass
+public static void setUpClass() throws Throwable
+{
+SchemaLoader.loadSchema();
+}
+
+@AfterClass
+public static void stopGossiper()
+{
+Gossiper.instance.stop();
+}
+
+@Test
+// tests CASSANDRA-9565
+public void testCreateAndAlterWithDoubleWith() throws Throwable
+{
+String[] stmts = new String[] {ALTER KEYSPACE WITH WITH 
DURABLE_WRITES = true,
+  

[02/16] cassandra git commit: bump versions

2015-06-22 Thread snazy
bump versions


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

Branch: refs/heads/trunk
Commit: 718c144324d170535d4f1a1e79dd9869cce19ed1
Parents: 42ea6e1
Author: T Jake Luciani j...@apache.org
Authored: Thu Jun 18 14:53:07 2015 -0400
Committer: T Jake Luciani j...@apache.org
Committed: Thu Jun 18 14:53:07 2015 -0400

--
 NEWS.txt | 10 ++
 build.xml|  2 +-
 debian/changelog |  6 ++
 3 files changed, 17 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/718c1443/NEWS.txt
--
diff --git a/NEWS.txt b/NEWS.txt
index 272c837..80776e8 100644
--- a/NEWS.txt
+++ b/NEWS.txt
@@ -13,6 +13,16 @@ restore snapshots created with the previous major version 
using the
 'sstableloader' tool. You can upgrade the file format of your snapshots
 using the provided 'sstableupgrade' tool.
 
+
+2.1.7
+=
+
+Upgrading
+-
+- Nothing specific to this release, but please see 2.1 if you are upgrading
+  from a previous version.
+
+
 2.1.6
 =
 

http://git-wip-us.apache.org/repos/asf/cassandra/blob/718c1443/build.xml
--
diff --git a/build.xml b/build.xml
index adde1d3..73e76e5 100644
--- a/build.xml
+++ b/build.xml
@@ -25,7 +25,7 @@
 property name=debuglevel value=source,lines,vars/
 
 !-- default version and SCM information --
-property name=base.version value=2.1.6/
+property name=base.version value=2.1.7/
 property name=scm.connection 
value=scm:git://git.apache.org/cassandra.git/
 property name=scm.developerConnection 
value=scm:git://git.apache.org/cassandra.git/
 property name=scm.url 
value=http://git-wip-us.apache.org/repos/asf?p=cassandra.git;a=tree/

http://git-wip-us.apache.org/repos/asf/cassandra/blob/718c1443/debian/changelog
--
diff --git a/debian/changelog b/debian/changelog
index 1a742fa..d7e1fd1 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+cassandra (2.1.7) unstable; urgency=medium
+
+  * New release 
+
+ -- Jake Luciani j...@apache.org  Thu, 18 Jun 2015 14:52:26 -0400
+
 cassandra (2.1.6) unstable; urgency=medium
 
   * New release



[06/16] cassandra git commit: Merge branch 'cassandra-2.0' into cassandra-2.1

2015-06-22 Thread snazy
Merge branch 'cassandra-2.0' into cassandra-2.1


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

Branch: refs/heads/cassandra-2.2
Commit: efebd8f172d19d3c325366201235882af7531244
Parents: 718c144 f778c1f
Author: Marcus Eriksson marc...@apache.org
Authored: Fri Jun 19 19:36:11 2015 +0200
Committer: Marcus Eriksson marc...@apache.org
Committed: Fri Jun 19 19:36:11 2015 +0200

--

--




[13/16] cassandra git commit: Merge branch 'cassandra-2.0' into cassandra-2.1

2015-06-22 Thread snazy
Merge branch 'cassandra-2.0' into cassandra-2.1


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

Branch: refs/heads/cassandra-2.1
Commit: b969496e47be72d6f094f7c7db4ebac97104f924
Parents: efebd8f c939422
Author: Benjamin Lerer blerer@benjamin.le...@datastax.com
Authored: Mon Jun 22 16:42:43 2015 +0200
Committer: Robert Stupp sn...@snazy.de
Committed: Mon Jun 22 16:42:43 2015 +0200

--
 CHANGES.txt |  1 +
 src/java/org/apache/cassandra/cql3/Cql.g|  4 +--
 .../cql3/CreateAndAlterKeyspaceTest.java| 37 
 3 files changed, 40 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/b969496e/CHANGES.txt
--
diff --cc CHANGES.txt
index 9ae0969,6e3a147..28b145b
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,7 -1,9 +1,8 @@@
 -2.0.17
 +2.1.7
 + * Fix bug in cardinality check when compacting (CASSANDRA-9580)
 + * Fix memory leak in Ref due to ConcurrentLinkedQueue.remove() behaviour 
(CASSANDRA-9549)
 +Merged from 2.0
+  * 'WITH WITH' in alter keyspace statements causes NPE (CASSANDRA-9565)
 - * Display min timestamp in sstablemetadata viewer (CASSANDRA-6767)
 -
 -
 -2.0.16:
   * Expose some internals of SelectStatement for inspection (CASSANDRA-9532)
   * ArrivalWindow should use primitives (CASSANDRA-9496)
   * Periodically submit background compaction tasks (CASSANDRA-9592)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/b969496e/src/java/org/apache/cassandra/cql3/Cql.g
--
diff --cc src/java/org/apache/cassandra/cql3/Cql.g
index f9a07b3,8b382fa..db8ef25
--- a/src/java/org/apache/cassandra/cql3/Cql.g
+++ b/src/java/org/apache/cassandra/cql3/Cql.g
@@@ -1030,8 -891,8 +1030,8 @@@ properties[PropertyDefinitions props
  ;
  
  property[PropertyDefinitions props]
- : k=ident '=' (simple=propertyValue { try { 
$props.addProperty(k.toString(), simple); } catch (SyntaxException e) { 
addRecognitionError(e.getMessage()); } }
-   |   map=mapLiteral{ try { 
$props.addProperty(k.toString(), convertPropertyMap(map)); } catch 
(SyntaxException e) { addRecognitionError(e.getMessage()); } })
+ : k=ident '=' simple=propertyValue { try { 
$props.addProperty(k.toString(), simple); } catch (SyntaxException e) { 
addRecognitionError(e.getMessage()); } }
 -| k=ident '=' map=map_literal { try { $props.addProperty(k.toString(), 
convertPropertyMap(map)); } catch (SyntaxException e) { 
addRecognitionError(e.getMessage()); } }
++| k=ident '=' map=mapLiteral { try { $props.addProperty(k.toString(), 
convertPropertyMap(map)); } catch (SyntaxException e) { 
addRecognitionError(e.getMessage()); } }
  ;
  
  propertyValue returns [String str]

http://git-wip-us.apache.org/repos/asf/cassandra/blob/b969496e/test/unit/org/apache/cassandra/cql3/CreateAndAlterKeyspaceTest.java
--
diff --cc test/unit/org/apache/cassandra/cql3/CreateAndAlterKeyspaceTest.java
index 000,45be0df..9e0ca21
mode 00,100644..100644
--- a/test/unit/org/apache/cassandra/cql3/CreateAndAlterKeyspaceTest.java
+++ b/test/unit/org/apache/cassandra/cql3/CreateAndAlterKeyspaceTest.java
@@@ -1,0 -1,89 +1,37 @@@
+ /*
+  * 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.
+  */
+ package org.apache.cassandra.cql3;
+ 
 -import org.junit.AfterClass;
 -import org.junit.BeforeClass;
+ import org.junit.Test;
+ 
 -import org.apache.cassandra.SchemaLoader;
 -import org.apache.cassandra.db.ConsistencyLevel;
 -import org.apache.cassandra.exceptions.SyntaxException;
 -import org.apache.cassandra.gms.Gossiper;
 -
 -import static org.apache.cassandra.cql3.QueryProcessor.process;
 -import static org.junit.Assert.assertTrue;
 -import 

[05/16] cassandra git commit: Merge branch 'cassandra-2.0' into cassandra-2.1

2015-06-22 Thread snazy
Merge branch 'cassandra-2.0' into cassandra-2.1


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

Branch: refs/heads/trunk
Commit: efebd8f172d19d3c325366201235882af7531244
Parents: 718c144 f778c1f
Author: Marcus Eriksson marc...@apache.org
Authored: Fri Jun 19 19:36:11 2015 +0200
Committer: Marcus Eriksson marc...@apache.org
Committed: Fri Jun 19 19:36:11 2015 +0200

--

--




[09/16] cassandra git commit: 'WITH WITH' in alter keyspace statements causes NPE

2015-06-22 Thread snazy
'WITH WITH' in alter keyspace statements causes NPE

patch by Benjamin Lerer; reviewed by Robert Stupp for CASSANDRA-9565


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

Branch: refs/heads/cassandra-2.2
Commit: c939422637bdba13fa3b5849cc1e7eacf26d46d0
Parents: f778c1f
Author: Benjamin Lerer blerer@benjamin.le...@datastax.com
Authored: Mon Jun 22 16:40:36 2015 +0200
Committer: Robert Stupp sn...@snazy.de
Committed: Mon Jun 22 16:40:36 2015 +0200

--
 CHANGES.txt |  1 +
 src/java/org/apache/cassandra/cql3/Cql.g|  4 +-
 .../cql3/CreateAndAlterKeyspaceTest.java| 89 
 3 files changed, 92 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/c9394226/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index b5b2f32..6e3a147 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.0.17
+ * 'WITH WITH' in alter keyspace statements causes NPE (CASSANDRA-9565)
  * Display min timestamp in sstablemetadata viewer (CASSANDRA-6767)
 
 

http://git-wip-us.apache.org/repos/asf/cassandra/blob/c9394226/src/java/org/apache/cassandra/cql3/Cql.g
--
diff --git a/src/java/org/apache/cassandra/cql3/Cql.g 
b/src/java/org/apache/cassandra/cql3/Cql.g
index d41434d..8b382fa 100644
--- a/src/java/org/apache/cassandra/cql3/Cql.g
+++ b/src/java/org/apache/cassandra/cql3/Cql.g
@@ -891,8 +891,8 @@ properties[PropertyDefinitions props]
 ;
 
 property[PropertyDefinitions props]
-: k=ident '=' (simple=propertyValue { try { 
$props.addProperty(k.toString(), simple); } catch (SyntaxException e) { 
addRecognitionError(e.getMessage()); } }
-   |   map=map_literal   { try { 
$props.addProperty(k.toString(), convertPropertyMap(map)); } catch 
(SyntaxException e) { addRecognitionError(e.getMessage()); } })
+: k=ident '=' simple=propertyValue { try { 
$props.addProperty(k.toString(), simple); } catch (SyntaxException e) { 
addRecognitionError(e.getMessage()); } }
+| k=ident '=' map=map_literal { try { $props.addProperty(k.toString(), 
convertPropertyMap(map)); } catch (SyntaxException e) { 
addRecognitionError(e.getMessage()); } }
 ;
 
 propertyValue returns [String str]

http://git-wip-us.apache.org/repos/asf/cassandra/blob/c9394226/test/unit/org/apache/cassandra/cql3/CreateAndAlterKeyspaceTest.java
--
diff --git 
a/test/unit/org/apache/cassandra/cql3/CreateAndAlterKeyspaceTest.java 
b/test/unit/org/apache/cassandra/cql3/CreateAndAlterKeyspaceTest.java
new file mode 100644
index 000..45be0df
--- /dev/null
+++ b/test/unit/org/apache/cassandra/cql3/CreateAndAlterKeyspaceTest.java
@@ -0,0 +1,89 @@
+/*
+ * 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.
+ */
+package org.apache.cassandra.cql3;
+
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+import org.apache.cassandra.SchemaLoader;
+import org.apache.cassandra.db.ConsistencyLevel;
+import org.apache.cassandra.exceptions.SyntaxException;
+import org.apache.cassandra.gms.Gossiper;
+
+import static org.apache.cassandra.cql3.QueryProcessor.process;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
+public class CreateAndAlterKeyspaceTest
+{
+@BeforeClass
+public static void setUpClass() throws Throwable
+{
+SchemaLoader.loadSchema();
+}
+
+@AfterClass
+public static void stopGossiper()
+{
+Gossiper.instance.stop();
+}
+
+@Test
+// tests CASSANDRA-9565
+public void testCreateAndAlterWithDoubleWith() throws Throwable
+{
+String[] stmts = new String[] {ALTER KEYSPACE WITH WITH 
DURABLE_WRITES = true,
+  

[11/16] cassandra git commit: Merge branch 'cassandra-2.0' into cassandra-2.1

2015-06-22 Thread snazy
Merge branch 'cassandra-2.0' into cassandra-2.1


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

Branch: refs/heads/trunk
Commit: b969496e47be72d6f094f7c7db4ebac97104f924
Parents: efebd8f c939422
Author: Benjamin Lerer blerer@benjamin.le...@datastax.com
Authored: Mon Jun 22 16:42:43 2015 +0200
Committer: Robert Stupp sn...@snazy.de
Committed: Mon Jun 22 16:42:43 2015 +0200

--
 CHANGES.txt |  1 +
 src/java/org/apache/cassandra/cql3/Cql.g|  4 +--
 .../cql3/CreateAndAlterKeyspaceTest.java| 37 
 3 files changed, 40 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/b969496e/CHANGES.txt
--
diff --cc CHANGES.txt
index 9ae0969,6e3a147..28b145b
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,7 -1,9 +1,8 @@@
 -2.0.17
 +2.1.7
 + * Fix bug in cardinality check when compacting (CASSANDRA-9580)
 + * Fix memory leak in Ref due to ConcurrentLinkedQueue.remove() behaviour 
(CASSANDRA-9549)
 +Merged from 2.0
+  * 'WITH WITH' in alter keyspace statements causes NPE (CASSANDRA-9565)
 - * Display min timestamp in sstablemetadata viewer (CASSANDRA-6767)
 -
 -
 -2.0.16:
   * Expose some internals of SelectStatement for inspection (CASSANDRA-9532)
   * ArrivalWindow should use primitives (CASSANDRA-9496)
   * Periodically submit background compaction tasks (CASSANDRA-9592)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/b969496e/src/java/org/apache/cassandra/cql3/Cql.g
--
diff --cc src/java/org/apache/cassandra/cql3/Cql.g
index f9a07b3,8b382fa..db8ef25
--- a/src/java/org/apache/cassandra/cql3/Cql.g
+++ b/src/java/org/apache/cassandra/cql3/Cql.g
@@@ -1030,8 -891,8 +1030,8 @@@ properties[PropertyDefinitions props
  ;
  
  property[PropertyDefinitions props]
- : k=ident '=' (simple=propertyValue { try { 
$props.addProperty(k.toString(), simple); } catch (SyntaxException e) { 
addRecognitionError(e.getMessage()); } }
-   |   map=mapLiteral{ try { 
$props.addProperty(k.toString(), convertPropertyMap(map)); } catch 
(SyntaxException e) { addRecognitionError(e.getMessage()); } })
+ : k=ident '=' simple=propertyValue { try { 
$props.addProperty(k.toString(), simple); } catch (SyntaxException e) { 
addRecognitionError(e.getMessage()); } }
 -| k=ident '=' map=map_literal { try { $props.addProperty(k.toString(), 
convertPropertyMap(map)); } catch (SyntaxException e) { 
addRecognitionError(e.getMessage()); } }
++| k=ident '=' map=mapLiteral { try { $props.addProperty(k.toString(), 
convertPropertyMap(map)); } catch (SyntaxException e) { 
addRecognitionError(e.getMessage()); } }
  ;
  
  propertyValue returns [String str]

http://git-wip-us.apache.org/repos/asf/cassandra/blob/b969496e/test/unit/org/apache/cassandra/cql3/CreateAndAlterKeyspaceTest.java
--
diff --cc test/unit/org/apache/cassandra/cql3/CreateAndAlterKeyspaceTest.java
index 000,45be0df..9e0ca21
mode 00,100644..100644
--- a/test/unit/org/apache/cassandra/cql3/CreateAndAlterKeyspaceTest.java
+++ b/test/unit/org/apache/cassandra/cql3/CreateAndAlterKeyspaceTest.java
@@@ -1,0 -1,89 +1,37 @@@
+ /*
+  * 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.
+  */
+ package org.apache.cassandra.cql3;
+ 
 -import org.junit.AfterClass;
 -import org.junit.BeforeClass;
+ import org.junit.Test;
+ 
 -import org.apache.cassandra.SchemaLoader;
 -import org.apache.cassandra.db.ConsistencyLevel;
 -import org.apache.cassandra.exceptions.SyntaxException;
 -import org.apache.cassandra.gms.Gossiper;
 -
 -import static org.apache.cassandra.cql3.QueryProcessor.process;
 -import static org.junit.Assert.assertTrue;
 -import static 

[03/16] cassandra git commit: Backport CASSANDRA-6767 to 2.0: Display min timestamp in sstablemetadata viewer

2015-06-22 Thread snazy
Backport CASSANDRA-6767 to 2.0: Display min timestamp in sstablemetadata viewer


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

Branch: refs/heads/trunk
Commit: f778c1f88f4deb075b383f3a8b24ef279585bd32
Parents: 23e66a9
Author: Marcus Eriksson marc...@apache.org
Authored: Fri Jun 19 19:18:44 2015 +0200
Committer: Marcus Eriksson marc...@apache.org
Committed: Fri Jun 19 19:28:54 2015 +0200

--
 CHANGES.txt| 4 
 src/java/org/apache/cassandra/tools/SSTableMetadataViewer.java | 1 +
 2 files changed, 5 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/f778c1f8/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index a235528..b5b2f32 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,3 +1,7 @@
+2.0.17
+ * Display min timestamp in sstablemetadata viewer (CASSANDRA-6767)
+
+
 2.0.16:
  * Expose some internals of SelectStatement for inspection (CASSANDRA-9532)
  * ArrivalWindow should use primitives (CASSANDRA-9496)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/f778c1f8/src/java/org/apache/cassandra/tools/SSTableMetadataViewer.java
--
diff --git a/src/java/org/apache/cassandra/tools/SSTableMetadataViewer.java 
b/src/java/org/apache/cassandra/tools/SSTableMetadataViewer.java
index 64720b5..9664e9e 100644
--- a/src/java/org/apache/cassandra/tools/SSTableMetadataViewer.java
+++ b/src/java/org/apache/cassandra/tools/SSTableMetadataViewer.java
@@ -51,6 +51,7 @@ public class SSTableMetadataViewer
 
 out.printf(SSTable: %s%n, descriptor);
 out.printf(Partitioner: %s%n, metadata.partitioner);
+out.printf(Minimum timestamp: %s%n, metadata.minTimestamp);
 out.printf(Maximum timestamp: %s%n, metadata.maxTimestamp);
 out.printf(SSTable max local deletion time: %s%n, 
metadata.maxLocalDeletionTime);
 out.printf(Compression ratio: %s%n, 
metadata.compressionRatio);



[08/16] cassandra git commit: 'WITH WITH' in alter keyspace statements causes NPE

2015-06-22 Thread snazy
'WITH WITH' in alter keyspace statements causes NPE

patch by Benjamin Lerer; reviewed by Robert Stupp for CASSANDRA-9565


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

Branch: refs/heads/trunk
Commit: c939422637bdba13fa3b5849cc1e7eacf26d46d0
Parents: f778c1f
Author: Benjamin Lerer blerer@benjamin.le...@datastax.com
Authored: Mon Jun 22 16:40:36 2015 +0200
Committer: Robert Stupp sn...@snazy.de
Committed: Mon Jun 22 16:40:36 2015 +0200

--
 CHANGES.txt |  1 +
 src/java/org/apache/cassandra/cql3/Cql.g|  4 +-
 .../cql3/CreateAndAlterKeyspaceTest.java| 89 
 3 files changed, 92 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/c9394226/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index b5b2f32..6e3a147 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.0.17
+ * 'WITH WITH' in alter keyspace statements causes NPE (CASSANDRA-9565)
  * Display min timestamp in sstablemetadata viewer (CASSANDRA-6767)
 
 

http://git-wip-us.apache.org/repos/asf/cassandra/blob/c9394226/src/java/org/apache/cassandra/cql3/Cql.g
--
diff --git a/src/java/org/apache/cassandra/cql3/Cql.g 
b/src/java/org/apache/cassandra/cql3/Cql.g
index d41434d..8b382fa 100644
--- a/src/java/org/apache/cassandra/cql3/Cql.g
+++ b/src/java/org/apache/cassandra/cql3/Cql.g
@@ -891,8 +891,8 @@ properties[PropertyDefinitions props]
 ;
 
 property[PropertyDefinitions props]
-: k=ident '=' (simple=propertyValue { try { 
$props.addProperty(k.toString(), simple); } catch (SyntaxException e) { 
addRecognitionError(e.getMessage()); } }
-   |   map=map_literal   { try { 
$props.addProperty(k.toString(), convertPropertyMap(map)); } catch 
(SyntaxException e) { addRecognitionError(e.getMessage()); } })
+: k=ident '=' simple=propertyValue { try { 
$props.addProperty(k.toString(), simple); } catch (SyntaxException e) { 
addRecognitionError(e.getMessage()); } }
+| k=ident '=' map=map_literal { try { $props.addProperty(k.toString(), 
convertPropertyMap(map)); } catch (SyntaxException e) { 
addRecognitionError(e.getMessage()); } }
 ;
 
 propertyValue returns [String str]

http://git-wip-us.apache.org/repos/asf/cassandra/blob/c9394226/test/unit/org/apache/cassandra/cql3/CreateAndAlterKeyspaceTest.java
--
diff --git 
a/test/unit/org/apache/cassandra/cql3/CreateAndAlterKeyspaceTest.java 
b/test/unit/org/apache/cassandra/cql3/CreateAndAlterKeyspaceTest.java
new file mode 100644
index 000..45be0df
--- /dev/null
+++ b/test/unit/org/apache/cassandra/cql3/CreateAndAlterKeyspaceTest.java
@@ -0,0 +1,89 @@
+/*
+ * 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.
+ */
+package org.apache.cassandra.cql3;
+
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+import org.apache.cassandra.SchemaLoader;
+import org.apache.cassandra.db.ConsistencyLevel;
+import org.apache.cassandra.exceptions.SyntaxException;
+import org.apache.cassandra.gms.Gossiper;
+
+import static org.apache.cassandra.cql3.QueryProcessor.process;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
+public class CreateAndAlterKeyspaceTest
+{
+@BeforeClass
+public static void setUpClass() throws Throwable
+{
+SchemaLoader.loadSchema();
+}
+
+@AfterClass
+public static void stopGossiper()
+{
+Gossiper.instance.stop();
+}
+
+@Test
+// tests CASSANDRA-9565
+public void testCreateAndAlterWithDoubleWith() throws Throwable
+{
+String[] stmts = new String[] {ALTER KEYSPACE WITH WITH 
DURABLE_WRITES = true,
+  

[16/16] cassandra git commit: Merge branch 'cassandra-2.2' into trunk

2015-06-22 Thread snazy
Merge branch 'cassandra-2.2' into trunk


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

Branch: refs/heads/trunk
Commit: 4045c2933935a8cc73a9034c60e7680f625078eb
Parents: 51a9285 5931eb4
Author: Robert Stupp sn...@snazy.de
Authored: Mon Jun 22 16:50:50 2015 +0200
Committer: Robert Stupp sn...@snazy.de
Committed: Mon Jun 22 16:50:50 2015 +0200

--
 CHANGES.txt |  1 +
 src/java/org/apache/cassandra/cql3/Cql.g|  4 +--
 .../cql3/CreateAndAlterKeyspaceTest.java| 37 
 3 files changed, 40 insertions(+), 2 deletions(-)
--


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



[12/16] cassandra git commit: Merge branch 'cassandra-2.0' into cassandra-2.1

2015-06-22 Thread snazy
Merge branch 'cassandra-2.0' into cassandra-2.1


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

Branch: refs/heads/cassandra-2.2
Commit: b969496e47be72d6f094f7c7db4ebac97104f924
Parents: efebd8f c939422
Author: Benjamin Lerer blerer@benjamin.le...@datastax.com
Authored: Mon Jun 22 16:42:43 2015 +0200
Committer: Robert Stupp sn...@snazy.de
Committed: Mon Jun 22 16:42:43 2015 +0200

--
 CHANGES.txt |  1 +
 src/java/org/apache/cassandra/cql3/Cql.g|  4 +--
 .../cql3/CreateAndAlterKeyspaceTest.java| 37 
 3 files changed, 40 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/b969496e/CHANGES.txt
--
diff --cc CHANGES.txt
index 9ae0969,6e3a147..28b145b
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,7 -1,9 +1,8 @@@
 -2.0.17
 +2.1.7
 + * Fix bug in cardinality check when compacting (CASSANDRA-9580)
 + * Fix memory leak in Ref due to ConcurrentLinkedQueue.remove() behaviour 
(CASSANDRA-9549)
 +Merged from 2.0
+  * 'WITH WITH' in alter keyspace statements causes NPE (CASSANDRA-9565)
 - * Display min timestamp in sstablemetadata viewer (CASSANDRA-6767)
 -
 -
 -2.0.16:
   * Expose some internals of SelectStatement for inspection (CASSANDRA-9532)
   * ArrivalWindow should use primitives (CASSANDRA-9496)
   * Periodically submit background compaction tasks (CASSANDRA-9592)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/b969496e/src/java/org/apache/cassandra/cql3/Cql.g
--
diff --cc src/java/org/apache/cassandra/cql3/Cql.g
index f9a07b3,8b382fa..db8ef25
--- a/src/java/org/apache/cassandra/cql3/Cql.g
+++ b/src/java/org/apache/cassandra/cql3/Cql.g
@@@ -1030,8 -891,8 +1030,8 @@@ properties[PropertyDefinitions props
  ;
  
  property[PropertyDefinitions props]
- : k=ident '=' (simple=propertyValue { try { 
$props.addProperty(k.toString(), simple); } catch (SyntaxException e) { 
addRecognitionError(e.getMessage()); } }
-   |   map=mapLiteral{ try { 
$props.addProperty(k.toString(), convertPropertyMap(map)); } catch 
(SyntaxException e) { addRecognitionError(e.getMessage()); } })
+ : k=ident '=' simple=propertyValue { try { 
$props.addProperty(k.toString(), simple); } catch (SyntaxException e) { 
addRecognitionError(e.getMessage()); } }
 -| k=ident '=' map=map_literal { try { $props.addProperty(k.toString(), 
convertPropertyMap(map)); } catch (SyntaxException e) { 
addRecognitionError(e.getMessage()); } }
++| k=ident '=' map=mapLiteral { try { $props.addProperty(k.toString(), 
convertPropertyMap(map)); } catch (SyntaxException e) { 
addRecognitionError(e.getMessage()); } }
  ;
  
  propertyValue returns [String str]

http://git-wip-us.apache.org/repos/asf/cassandra/blob/b969496e/test/unit/org/apache/cassandra/cql3/CreateAndAlterKeyspaceTest.java
--
diff --cc test/unit/org/apache/cassandra/cql3/CreateAndAlterKeyspaceTest.java
index 000,45be0df..9e0ca21
mode 00,100644..100644
--- a/test/unit/org/apache/cassandra/cql3/CreateAndAlterKeyspaceTest.java
+++ b/test/unit/org/apache/cassandra/cql3/CreateAndAlterKeyspaceTest.java
@@@ -1,0 -1,89 +1,37 @@@
+ /*
+  * 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.
+  */
+ package org.apache.cassandra.cql3;
+ 
 -import org.junit.AfterClass;
 -import org.junit.BeforeClass;
+ import org.junit.Test;
+ 
 -import org.apache.cassandra.SchemaLoader;
 -import org.apache.cassandra.db.ConsistencyLevel;
 -import org.apache.cassandra.exceptions.SyntaxException;
 -import org.apache.cassandra.gms.Gossiper;
 -
 -import static org.apache.cassandra.cql3.QueryProcessor.process;
 -import static org.junit.Assert.assertTrue;
 -import 

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

2015-06-22 Thread snazy
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/5931eb43
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/5931eb43
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/5931eb43

Branch: refs/heads/cassandra-2.2
Commit: 5931eb432ee523e4c973595416b705f52ac02116
Parents: 2deb68e b969496
Author: Robert Stupp sn...@snazy.de
Authored: Mon Jun 22 16:50:20 2015 +0200
Committer: Robert Stupp sn...@snazy.de
Committed: Mon Jun 22 16:50:20 2015 +0200

--
 CHANGES.txt |  1 +
 src/java/org/apache/cassandra/cql3/Cql.g|  4 +--
 .../cql3/CreateAndAlterKeyspaceTest.java| 37 
 3 files changed, 40 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/5931eb43/CHANGES.txt
--
diff --cc CHANGES.txt
index 45727f9,28b145b..f821136
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,20 -1,8 +1,21 @@@
 -2.1.7
 +2.2
 + * Don't repair system_distributed by default (CASSANDRA-9621)
 + * Fix mixing min, max, and count aggregates for blob type (CASSANRA-9622)
 + * Rename class for DATE type in Java driver (CASSANDRA-9563)
 + * Duplicate compilation of UDFs on coordinator (CASSANDRA-9475)
 + * Fix connection leak in CqlRecordWriter (CASSANDRA-9576)
 + * Mlockall before opening system sstables  remove boot_without_jna option 
(CASSANDRA-9573)
 + * Add functions to convert timeuuid to date or time, deprecate dateOf and 
unixTimestampOf (CASSANDRA-9229)
 + * Make sure we cancel non-compacting sstables from LifecycleTransaction 
(CASSANDRA-9566)
 + * Fix deprecated repair JMX API (CASSANDRA-9570)
 + * Add logback metrics (CASSANDRA-9378)
 + * Update and refactor ant test/test-compression to run the tests in parallel 
(CASSANDRA-9583)
 +Merged from 2.1:
   * Fix bug in cardinality check when compacting (CASSANDRA-9580)
   * Fix memory leak in Ref due to ConcurrentLinkedQueue.remove() behaviour 
(CASSANDRA-9549)
 + * Make rebuild only run one at a time (CASSANDRA-9119)
  Merged from 2.0
+  * 'WITH WITH' in alter keyspace statements causes NPE (CASSANDRA-9565)
   * Expose some internals of SelectStatement for inspection (CASSANDRA-9532)
   * ArrivalWindow should use primitives (CASSANDRA-9496)
   * Periodically submit background compaction tasks (CASSANDRA-9592)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/5931eb43/src/java/org/apache/cassandra/cql3/Cql.g
--



[07/16] cassandra git commit: 'WITH WITH' in alter keyspace statements causes NPE

2015-06-22 Thread snazy
'WITH WITH' in alter keyspace statements causes NPE

patch by Benjamin Lerer; reviewed by Robert Stupp for CASSANDRA-9565


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

Branch: refs/heads/cassandra-2.1
Commit: c939422637bdba13fa3b5849cc1e7eacf26d46d0
Parents: f778c1f
Author: Benjamin Lerer blerer@benjamin.le...@datastax.com
Authored: Mon Jun 22 16:40:36 2015 +0200
Committer: Robert Stupp sn...@snazy.de
Committed: Mon Jun 22 16:40:36 2015 +0200

--
 CHANGES.txt |  1 +
 src/java/org/apache/cassandra/cql3/Cql.g|  4 +-
 .../cql3/CreateAndAlterKeyspaceTest.java| 89 
 3 files changed, 92 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/c9394226/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index b5b2f32..6e3a147 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.0.17
+ * 'WITH WITH' in alter keyspace statements causes NPE (CASSANDRA-9565)
  * Display min timestamp in sstablemetadata viewer (CASSANDRA-6767)
 
 

http://git-wip-us.apache.org/repos/asf/cassandra/blob/c9394226/src/java/org/apache/cassandra/cql3/Cql.g
--
diff --git a/src/java/org/apache/cassandra/cql3/Cql.g 
b/src/java/org/apache/cassandra/cql3/Cql.g
index d41434d..8b382fa 100644
--- a/src/java/org/apache/cassandra/cql3/Cql.g
+++ b/src/java/org/apache/cassandra/cql3/Cql.g
@@ -891,8 +891,8 @@ properties[PropertyDefinitions props]
 ;
 
 property[PropertyDefinitions props]
-: k=ident '=' (simple=propertyValue { try { 
$props.addProperty(k.toString(), simple); } catch (SyntaxException e) { 
addRecognitionError(e.getMessage()); } }
-   |   map=map_literal   { try { 
$props.addProperty(k.toString(), convertPropertyMap(map)); } catch 
(SyntaxException e) { addRecognitionError(e.getMessage()); } })
+: k=ident '=' simple=propertyValue { try { 
$props.addProperty(k.toString(), simple); } catch (SyntaxException e) { 
addRecognitionError(e.getMessage()); } }
+| k=ident '=' map=map_literal { try { $props.addProperty(k.toString(), 
convertPropertyMap(map)); } catch (SyntaxException e) { 
addRecognitionError(e.getMessage()); } }
 ;
 
 propertyValue returns [String str]

http://git-wip-us.apache.org/repos/asf/cassandra/blob/c9394226/test/unit/org/apache/cassandra/cql3/CreateAndAlterKeyspaceTest.java
--
diff --git 
a/test/unit/org/apache/cassandra/cql3/CreateAndAlterKeyspaceTest.java 
b/test/unit/org/apache/cassandra/cql3/CreateAndAlterKeyspaceTest.java
new file mode 100644
index 000..45be0df
--- /dev/null
+++ b/test/unit/org/apache/cassandra/cql3/CreateAndAlterKeyspaceTest.java
@@ -0,0 +1,89 @@
+/*
+ * 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.
+ */
+package org.apache.cassandra.cql3;
+
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+import org.apache.cassandra.SchemaLoader;
+import org.apache.cassandra.db.ConsistencyLevel;
+import org.apache.cassandra.exceptions.SyntaxException;
+import org.apache.cassandra.gms.Gossiper;
+
+import static org.apache.cassandra.cql3.QueryProcessor.process;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
+public class CreateAndAlterKeyspaceTest
+{
+@BeforeClass
+public static void setUpClass() throws Throwable
+{
+SchemaLoader.loadSchema();
+}
+
+@AfterClass
+public static void stopGossiper()
+{
+Gossiper.instance.stop();
+}
+
+@Test
+// tests CASSANDRA-9565
+public void testCreateAndAlterWithDoubleWith() throws Throwable
+{
+String[] stmts = new String[] {ALTER KEYSPACE WITH WITH 
DURABLE_WRITES = true,
+  

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

2015-06-22 Thread snazy
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/5931eb43
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/5931eb43
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/5931eb43

Branch: refs/heads/trunk
Commit: 5931eb432ee523e4c973595416b705f52ac02116
Parents: 2deb68e b969496
Author: Robert Stupp sn...@snazy.de
Authored: Mon Jun 22 16:50:20 2015 +0200
Committer: Robert Stupp sn...@snazy.de
Committed: Mon Jun 22 16:50:20 2015 +0200

--
 CHANGES.txt |  1 +
 src/java/org/apache/cassandra/cql3/Cql.g|  4 +--
 .../cql3/CreateAndAlterKeyspaceTest.java| 37 
 3 files changed, 40 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/5931eb43/CHANGES.txt
--
diff --cc CHANGES.txt
index 45727f9,28b145b..f821136
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,20 -1,8 +1,21 @@@
 -2.1.7
 +2.2
 + * Don't repair system_distributed by default (CASSANDRA-9621)
 + * Fix mixing min, max, and count aggregates for blob type (CASSANRA-9622)
 + * Rename class for DATE type in Java driver (CASSANDRA-9563)
 + * Duplicate compilation of UDFs on coordinator (CASSANDRA-9475)
 + * Fix connection leak in CqlRecordWriter (CASSANDRA-9576)
 + * Mlockall before opening system sstables  remove boot_without_jna option 
(CASSANDRA-9573)
 + * Add functions to convert timeuuid to date or time, deprecate dateOf and 
unixTimestampOf (CASSANDRA-9229)
 + * Make sure we cancel non-compacting sstables from LifecycleTransaction 
(CASSANDRA-9566)
 + * Fix deprecated repair JMX API (CASSANDRA-9570)
 + * Add logback metrics (CASSANDRA-9378)
 + * Update and refactor ant test/test-compression to run the tests in parallel 
(CASSANDRA-9583)
 +Merged from 2.1:
   * Fix bug in cardinality check when compacting (CASSANDRA-9580)
   * Fix memory leak in Ref due to ConcurrentLinkedQueue.remove() behaviour 
(CASSANDRA-9549)
 + * Make rebuild only run one at a time (CASSANDRA-9119)
  Merged from 2.0
+  * 'WITH WITH' in alter keyspace statements causes NPE (CASSANDRA-9565)
   * Expose some internals of SelectStatement for inspection (CASSANDRA-9532)
   * ArrivalWindow should use primitives (CASSANDRA-9496)
   * Periodically submit background compaction tasks (CASSANDRA-9592)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/5931eb43/src/java/org/apache/cassandra/cql3/Cql.g
--



[04/16] cassandra git commit: Backport CASSANDRA-6767 to 2.0: Display min timestamp in sstablemetadata viewer

2015-06-22 Thread snazy
Backport CASSANDRA-6767 to 2.0: Display min timestamp in sstablemetadata viewer


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

Branch: refs/heads/cassandra-2.2
Commit: f778c1f88f4deb075b383f3a8b24ef279585bd32
Parents: 23e66a9
Author: Marcus Eriksson marc...@apache.org
Authored: Fri Jun 19 19:18:44 2015 +0200
Committer: Marcus Eriksson marc...@apache.org
Committed: Fri Jun 19 19:28:54 2015 +0200

--
 CHANGES.txt| 4 
 src/java/org/apache/cassandra/tools/SSTableMetadataViewer.java | 1 +
 2 files changed, 5 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/f778c1f8/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index a235528..b5b2f32 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,3 +1,7 @@
+2.0.17
+ * Display min timestamp in sstablemetadata viewer (CASSANDRA-6767)
+
+
 2.0.16:
  * Expose some internals of SelectStatement for inspection (CASSANDRA-9532)
  * ArrivalWindow should use primitives (CASSANDRA-9496)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/f778c1f8/src/java/org/apache/cassandra/tools/SSTableMetadataViewer.java
--
diff --git a/src/java/org/apache/cassandra/tools/SSTableMetadataViewer.java 
b/src/java/org/apache/cassandra/tools/SSTableMetadataViewer.java
index 64720b5..9664e9e 100644
--- a/src/java/org/apache/cassandra/tools/SSTableMetadataViewer.java
+++ b/src/java/org/apache/cassandra/tools/SSTableMetadataViewer.java
@@ -51,6 +51,7 @@ public class SSTableMetadataViewer
 
 out.printf(SSTable: %s%n, descriptor);
 out.printf(Partitioner: %s%n, metadata.partitioner);
+out.printf(Minimum timestamp: %s%n, metadata.minTimestamp);
 out.printf(Maximum timestamp: %s%n, metadata.maxTimestamp);
 out.printf(SSTable max local deletion time: %s%n, 
metadata.maxLocalDeletionTime);
 out.printf(Compression ratio: %s%n, 
metadata.compressionRatio);



[jira] [Commented] (CASSANDRA-9607) Get high load after upgrading from 2.1.3 to cassandra 2.1.6

2015-06-22 Thread Robbie Strickland (JIRA)

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

Robbie Strickland commented on CASSANDRA-9607:
--

[~tjake] I'll go wrangle someone from devops to get me set up to do that.  BTW, 
we did just downgrade the production cluster from 2.1.5 to 2.1.4, and our Spark 
jobs all work now.  Two weeks of downtime.  Yay.

 Get high load after upgrading from 2.1.3 to cassandra 2.1.6
 ---

 Key: CASSANDRA-9607
 URL: https://issues.apache.org/jira/browse/CASSANDRA-9607
 Project: Cassandra
  Issue Type: Bug
 Environment: OS: 
 CentOS 6 * 4
 Ubuntu 14.04 * 2
 JDK: Oracle JDK 7, Oracle JDK 8
 VM: Azure VM Standard A3 * 6
 RAM: 7 GB
 Cores: 4
Reporter: Study Hsueh
Assignee: Tyler Hobbs
Priority: Critical
 Fix For: 2.1.x, 2.2.0 rc2

 Attachments: cassandra.yaml, load.png, log.zip, schema.zip


 After upgrading cassandra version from 2.1.3 to 2.1.6, the average load of my 
 cassandra cluster grows from 0.x~1.x to 3.x~6.x. 
 What kind of additional information should I provide for this problem?



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


[jira] [Commented] (CASSANDRA-9634) Set kernel timer resolution on Windows

2015-06-22 Thread T Jake Luciani (JIRA)

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

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

+1

 Set kernel timer resolution on Windows
 --

 Key: CASSANDRA-9634
 URL: https://issues.apache.org/jira/browse/CASSANDRA-9634
 Project: Cassandra
  Issue Type: Improvement
Reporter: Joshua McKenzie
Assignee: Joshua McKenzie
  Labels: Windows, performance
 Fix For: 2.2.x


 In Windows 7/Server 2008 and to a similar extent Windows 8/Server 2012, the 
 kernel's internal time is set to an interval of 15.6ms. (Use 
 [clockres|https://technet.microsoft.com/en-us/sysinternals/bb897568.aspx] to 
 confirm current 'tick rate' on Windows). Win8/Server2012 have a tickless 
 kernel w/timer coalescing ([info 
 here|http://arstechnica.com/information-technology/2012/10/better-on-the-inside-under-the-hood-of-windows-8/2/])
  and the platform shows similar performance characteristics with C* to 
 Windows 7 with a slight edge in performance to win8/server 2012 in my testing 
 (the testing and results of which are outside the scope of this ticket).
 Some arguments against lowering the system's internal timer to 1ms are 
 [here|https://randomascii.wordpress.com/2013/07/08/windows-timer-resolution-megawatts-wasted/].
  These seem largely constrained to it'll drain your battery and it'll 
 prevent your processor from being as effective in sleep states. The 2nd is 
 somewhat of a concern as we don't want Windows users to all of a sudden have 
 increased CPU-usage bills from virtualized environments. In the comments, one 
 individual mentions a VirtualBox VM spinning at 10-20% cpu just from changing 
 that flag alone which seems mathematically unlikely, but is worth keeping an 
 eye on and testing.
 A Microsoft publication that largely reinforces the cautionary tale on power 
 consumption can be found 
 [here|http://download.microsoft.com/download/3/0/2/3027D574-C433-412A-A8B6-5E0A75D5B237/Timer-Resolution.docx].
 With the cautionary tales on our radar, the impact on throughput and latency 
 on the 2.2 branch on Windows is [fairly 
 dramatic|https://docs.google.com/spreadsheets/d/1nqPhNwOVt0SU7b9lt9o4Tyl0Z1yDrV2oo7LbBPaFa6A/edit#gid=0].
  A couple of caveats on these #'s: I'm not completely saturating the system 
 as the thread count is relatively low (keeping it consistent with other 
 testing where it *was* saturating), and the read #'s from our 2012 test 
 environment are not affected by this timer change while I see it on 3 other 
 bare-metal installations. The testing environment is new and we haven't 
 worked out the kinks yet, however the write / mixed illustrate the throughput 
 and latency #'s I've mentioned above; for reads the cpu's are sitting idle at 
 1-5% used by stress and C* so something else clearly needs to be addressed 
 there; I included them for completeness sake.
 Some preliminary testing on OpenStack indicates kernel-space syscall 
 saturation w/this patch that actually *degrades* performance, however the 
 unpatched performance numbers in our OpenStack environment are low enough 
 that I question their validity.
 Opening this ticket w/attached branch to get it on the radar / conversation 
 going, and I'm going to update this from being hard-coded to being a tunable 
 in the .yaml.
 Initial patch [available 
 here|https://github.com/apache/cassandra/compare/trunk...josh-mckenzie:2.2_WinTimer].



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


[jira] [Updated] (CASSANDRA-9607) Get high load after upgrading from 2.1.3 to cassandra 2.1.6

2015-06-22 Thread Robbie Strickland (JIRA)

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

Robbie Strickland updated CASSANDRA-9607:
-
Attachment: vm_monitor.png
GC_state.png
dump.tdump
cpu_profile.png
client_blocked_thread.png

I was able to bring the data down to my local machine and replicate the issue 
on a fresh install while profiling.  I've attached screen shots of the session, 
as well as the thread state on the client while it's happening.  You can see 
the server blocking on select and the client blocking on accept, which of 
course causes both ends to become unresponsive.

 Get high load after upgrading from 2.1.3 to cassandra 2.1.6
 ---

 Key: CASSANDRA-9607
 URL: https://issues.apache.org/jira/browse/CASSANDRA-9607
 Project: Cassandra
  Issue Type: Bug
 Environment: OS: 
 CentOS 6 * 4
 Ubuntu 14.04 * 2
 JDK: Oracle JDK 7, Oracle JDK 8
 VM: Azure VM Standard A3 * 6
 RAM: 7 GB
 Cores: 4
Reporter: Study Hsueh
Assignee: Tyler Hobbs
Priority: Critical
 Fix For: 2.1.x, 2.2.x

 Attachments: GC_state.png, cassandra.yaml, client_blocked_thread.png, 
 cpu_profile.png, dump.tdump, load.png, log.zip, schema.zip, vm_monitor.png


 After upgrading cassandra version from 2.1.3 to 2.1.6, the average load of my 
 cassandra cluster grows from 0.x~1.x to 3.x~6.x. 
 What kind of additional information should I provide for this problem?



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


[1/2] cassandra git commit: Change Windows Kernel default timer resolution

2015-06-22 Thread jmckenzie
Repository: cassandra
Updated Branches:
  refs/heads/trunk c31ecba4b - 115ed236a


Change Windows Kernel default timer resolution

Patch by jmckenzie; reviewed by tjake for CASSANDRA-9634


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

Branch: refs/heads/trunk
Commit: d6d32d26ffd9aa17aa991c8c003e53632e5ba1c0
Parents: affb10c
Author: Josh McKenzie josh.mcken...@datastax.com
Authored: Mon Jun 22 17:27:08 2015 -0400
Committer: Josh McKenzie josh.mcken...@datastax.com
Committed: Mon Jun 22 17:27:08 2015 -0400

--
 CHANGES.txt |  1 +
 conf/cassandra.yaml |  7 +++
 .../org/apache/cassandra/config/Config.java |  2 +
 .../cassandra/config/DatabaseDescriptor.java|  5 ++
 .../cassandra/service/CassandraDaemon.java  |  7 +++
 .../cassandra/service/StorageService.java   |  7 +++
 .../org/apache/cassandra/transport/Server.java  |  1 -
 .../apache/cassandra/utils/WindowsTimer.java| 65 
 .../src/org/apache/cassandra/stress/Stress.java |  7 +++
 9 files changed, 101 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/d6d32d26/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 1e2acc4..16fe569 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.2
+ * Change Windows kernel default timer resolution (CASSANDRA-9634)
  * Deprected sstable2json and json2sstable (CASSANDRA-9618)
  * Allow native functions in user-defined aggregates (CASSANDRA-9542)
  * Don't repair system_distributed by default (CASSANDRA-9621)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/d6d32d26/conf/cassandra.yaml
--
diff --git a/conf/cassandra.yaml b/conf/cassandra.yaml
index ea22e01..dba8e1f 100644
--- a/conf/cassandra.yaml
+++ b/conf/cassandra.yaml
@@ -853,3 +853,10 @@ tracetype_repair_ttl: 604800
 # This will inherently be backwards-incompatible with any 2.2 UDF that perform 
insecure
 # operations such as opening a socket or writing to the filesystem.
 enable_user_defined_functions: false
+
+# The default Windows kernel timer and scheduling resolution is 15.6ms for 
power conservation.
+# Lowering this value on Windows can provide much tighter latency and better 
throughput, however
+# some virtualized environments may see a negative performance impact from 
changing this setting
+# below their system default. The sysinternals 'clockres' tool can confirm 
your system's default
+# setting.
+windows_timer_interval: 1

http://git-wip-us.apache.org/repos/asf/cassandra/blob/d6d32d26/src/java/org/apache/cassandra/config/Config.java
--
diff --git a/src/java/org/apache/cassandra/config/Config.java 
b/src/java/org/apache/cassandra/config/Config.java
index 269f577..5beeef2 100644
--- a/src/java/org/apache/cassandra/config/Config.java
+++ b/src/java/org/apache/cassandra/config/Config.java
@@ -259,6 +259,8 @@ public class Config
 public static final int otc_coalescing_window_us_default = 200;
 public int otc_coalescing_window_us = otc_coalescing_window_us_default;
 
+public int windows_timer_interval = 0;
+
 public boolean enable_user_defined_functions = false;
 
 public static boolean getOutboundBindAny()

http://git-wip-us.apache.org/repos/asf/cassandra/blob/d6d32d26/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
--
diff --git a/src/java/org/apache/cassandra/config/DatabaseDescriptor.java 
b/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
index ad6b117..443246e 100644
--- a/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
+++ b/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
@@ -1688,4 +1688,9 @@ public class DatabaseDescriptor
 {
 return conf.enable_user_defined_functions;
 }
+
+public static int getWindowsTimerInterval()
+{
+return conf.windows_timer_interval;
+}
 }

http://git-wip-us.apache.org/repos/asf/cassandra/blob/d6d32d26/src/java/org/apache/cassandra/service/CassandraDaemon.java
--
diff --git a/src/java/org/apache/cassandra/service/CassandraDaemon.java 
b/src/java/org/apache/cassandra/service/CassandraDaemon.java
index 59ecca7..49e0c58 100644
--- a/src/java/org/apache/cassandra/service/CassandraDaemon.java
+++ b/src/java/org/apache/cassandra/service/CassandraDaemon.java
@@ -439,6 +439,13 @@ 

cassandra git commit: Change Windows Kernel default timer resolution

2015-06-22 Thread jmckenzie
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-2.2 affb10ce3 - d6d32d26f


Change Windows Kernel default timer resolution

Patch by jmckenzie; reviewed by tjake for CASSANDRA-9634


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

Branch: refs/heads/cassandra-2.2
Commit: d6d32d26ffd9aa17aa991c8c003e53632e5ba1c0
Parents: affb10c
Author: Josh McKenzie josh.mcken...@datastax.com
Authored: Mon Jun 22 17:27:08 2015 -0400
Committer: Josh McKenzie josh.mcken...@datastax.com
Committed: Mon Jun 22 17:27:08 2015 -0400

--
 CHANGES.txt |  1 +
 conf/cassandra.yaml |  7 +++
 .../org/apache/cassandra/config/Config.java |  2 +
 .../cassandra/config/DatabaseDescriptor.java|  5 ++
 .../cassandra/service/CassandraDaemon.java  |  7 +++
 .../cassandra/service/StorageService.java   |  7 +++
 .../org/apache/cassandra/transport/Server.java  |  1 -
 .../apache/cassandra/utils/WindowsTimer.java| 65 
 .../src/org/apache/cassandra/stress/Stress.java |  7 +++
 9 files changed, 101 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/d6d32d26/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 1e2acc4..16fe569 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.2
+ * Change Windows kernel default timer resolution (CASSANDRA-9634)
  * Deprected sstable2json and json2sstable (CASSANDRA-9618)
  * Allow native functions in user-defined aggregates (CASSANDRA-9542)
  * Don't repair system_distributed by default (CASSANDRA-9621)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/d6d32d26/conf/cassandra.yaml
--
diff --git a/conf/cassandra.yaml b/conf/cassandra.yaml
index ea22e01..dba8e1f 100644
--- a/conf/cassandra.yaml
+++ b/conf/cassandra.yaml
@@ -853,3 +853,10 @@ tracetype_repair_ttl: 604800
 # This will inherently be backwards-incompatible with any 2.2 UDF that perform 
insecure
 # operations such as opening a socket or writing to the filesystem.
 enable_user_defined_functions: false
+
+# The default Windows kernel timer and scheduling resolution is 15.6ms for 
power conservation.
+# Lowering this value on Windows can provide much tighter latency and better 
throughput, however
+# some virtualized environments may see a negative performance impact from 
changing this setting
+# below their system default. The sysinternals 'clockres' tool can confirm 
your system's default
+# setting.
+windows_timer_interval: 1

http://git-wip-us.apache.org/repos/asf/cassandra/blob/d6d32d26/src/java/org/apache/cassandra/config/Config.java
--
diff --git a/src/java/org/apache/cassandra/config/Config.java 
b/src/java/org/apache/cassandra/config/Config.java
index 269f577..5beeef2 100644
--- a/src/java/org/apache/cassandra/config/Config.java
+++ b/src/java/org/apache/cassandra/config/Config.java
@@ -259,6 +259,8 @@ public class Config
 public static final int otc_coalescing_window_us_default = 200;
 public int otc_coalescing_window_us = otc_coalescing_window_us_default;
 
+public int windows_timer_interval = 0;
+
 public boolean enable_user_defined_functions = false;
 
 public static boolean getOutboundBindAny()

http://git-wip-us.apache.org/repos/asf/cassandra/blob/d6d32d26/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
--
diff --git a/src/java/org/apache/cassandra/config/DatabaseDescriptor.java 
b/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
index ad6b117..443246e 100644
--- a/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
+++ b/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
@@ -1688,4 +1688,9 @@ public class DatabaseDescriptor
 {
 return conf.enable_user_defined_functions;
 }
+
+public static int getWindowsTimerInterval()
+{
+return conf.windows_timer_interval;
+}
 }

http://git-wip-us.apache.org/repos/asf/cassandra/blob/d6d32d26/src/java/org/apache/cassandra/service/CassandraDaemon.java
--
diff --git a/src/java/org/apache/cassandra/service/CassandraDaemon.java 
b/src/java/org/apache/cassandra/service/CassandraDaemon.java
index 59ecca7..49e0c58 100644
--- a/src/java/org/apache/cassandra/service/CassandraDaemon.java
+++ b/src/java/org/apache/cassandra/service/CassandraDaemon.java
@@ 

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

2015-06-22 Thread jmckenzie
Merge branch 'cassandra-2.2' into trunk


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

Branch: refs/heads/trunk
Commit: 115ed236aa041529897065f0b18a0bfd0f656189
Parents: c31ecba d6d32d2
Author: Josh McKenzie josh.mcken...@datastax.com
Authored: Mon Jun 22 17:27:46 2015 -0400
Committer: Josh McKenzie josh.mcken...@datastax.com
Committed: Mon Jun 22 17:27:46 2015 -0400

--
 CHANGES.txt |  1 +
 conf/cassandra.yaml |  7 +++
 .../org/apache/cassandra/config/Config.java |  2 +
 .../cassandra/config/DatabaseDescriptor.java|  5 ++
 .../cassandra/service/CassandraDaemon.java  |  7 +++
 .../cassandra/service/StorageService.java   |  7 +++
 .../org/apache/cassandra/transport/Server.java  |  1 -
 .../apache/cassandra/utils/WindowsTimer.java| 65 
 .../src/org/apache/cassandra/stress/Stress.java |  7 +++
 9 files changed, 101 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/115ed236/CHANGES.txt
--
diff --cc CHANGES.txt
index c2c62ae,16fe569..f15a263
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,15 -1,5 +1,16 @@@
 +3.0:
 + * Add nodetool command to replay batchlog (CASSANDRA-9547)
 + * Make file buffer cache independent of paths being read (CASSANDRA-8897)
 + * Remove deprecated legacy Hadoop code (CASSANDRA-9353)
 + * Decommissioned nodes will not rejoin the cluster (CASSANDRA-8801)
 + * Change gossip stabilization to use endpoit size (CASSANDRA-9401)
 + * Change default garbage collector to G1 (CASSANDRA-7486)
 + * Populate TokenMetadata early during startup (CASSANDRA-9317)
 + * undeprecate cache recentHitRate (CASSANDRA-6591)
 +
 +
  2.2
+  * Change Windows kernel default timer resolution (CASSANDRA-9634)
   * Deprected sstable2json and json2sstable (CASSANDRA-9618)
   * Allow native functions in user-defined aggregates (CASSANDRA-9542)
   * Don't repair system_distributed by default (CASSANDRA-9621)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/115ed236/conf/cassandra.yaml
--

http://git-wip-us.apache.org/repos/asf/cassandra/blob/115ed236/src/java/org/apache/cassandra/config/Config.java
--

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

http://git-wip-us.apache.org/repos/asf/cassandra/blob/115ed236/src/java/org/apache/cassandra/service/CassandraDaemon.java
--

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



[jira] [Updated] (CASSANDRA-9607) Get high load after upgrading from 2.1.3 to cassandra 2.1.6

2015-06-22 Thread Robbie Strickland (JIRA)

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

Robbie Strickland updated CASSANDRA-9607:
-
Since Version: 2.1.5  (was: 2.1.6)

 Get high load after upgrading from 2.1.3 to cassandra 2.1.6
 ---

 Key: CASSANDRA-9607
 URL: https://issues.apache.org/jira/browse/CASSANDRA-9607
 Project: Cassandra
  Issue Type: Bug
 Environment: OS: 
 CentOS 6 * 4
 Ubuntu 14.04 * 2
 JDK: Oracle JDK 7, Oracle JDK 8
 VM: Azure VM Standard A3 * 6
 RAM: 7 GB
 Cores: 4
Reporter: Study Hsueh
Assignee: Tyler Hobbs
Priority: Critical
 Fix For: 2.1.x, 2.2.x

 Attachments: GC_state.png, cassandra.yaml, client_blocked_thread.png, 
 cpu_profile.png, dump.tdump, load.png, log.zip, schema.zip, vm_monitor.png


 After upgrading cassandra version from 2.1.3 to 2.1.6, the average load of my 
 cassandra cluster grows from 0.x~1.x to 3.x~6.x. 
 What kind of additional information should I provide for this problem?



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


[jira] [Comment Edited] (CASSANDRA-9607) Get high load after upgrading from 2.1.3 to cassandra 2.1.6

2015-06-22 Thread Robbie Strickland (JIRA)

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

Robbie Strickland edited comment on CASSANDRA-9607 at 6/22/15 8:43 PM:
---

I was able to bring the data down to my local machine and replicate the issue 
on a fresh 2.1.5 install while profiling.  I've attached screen shots of the 
session, as well as the thread state on the client while it's happening.  You 
can see the server blocking on select and the client blocking on accept, which 
of course causes both ends to become unresponsive.


was (Author: rstrickland):
I was able to bring the data down to my local machine and replicate the issue 
on a fresh install while profiling.  I've attached screen shots of the session, 
as well as the thread state on the client while it's happening.  You can see 
the server blocking on select and the client blocking on accept, which of 
course causes both ends to become unresponsive.

 Get high load after upgrading from 2.1.3 to cassandra 2.1.6
 ---

 Key: CASSANDRA-9607
 URL: https://issues.apache.org/jira/browse/CASSANDRA-9607
 Project: Cassandra
  Issue Type: Bug
 Environment: OS: 
 CentOS 6 * 4
 Ubuntu 14.04 * 2
 JDK: Oracle JDK 7, Oracle JDK 8
 VM: Azure VM Standard A3 * 6
 RAM: 7 GB
 Cores: 4
Reporter: Study Hsueh
Assignee: Tyler Hobbs
Priority: Critical
 Fix For: 2.1.x, 2.2.x

 Attachments: GC_state.png, cassandra.yaml, client_blocked_thread.png, 
 cpu_profile.png, dump.tdump, load.png, log.zip, schema.zip, vm_monitor.png


 After upgrading cassandra version from 2.1.3 to 2.1.6, the average load of my 
 cassandra cluster grows from 0.x~1.x to 3.x~6.x. 
 What kind of additional information should I provide for this problem?



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


[jira] [Created] (CASSANDRA-9635) Silent startup failure with filesystem that does not support mmap

2015-06-22 Thread Kevin McLaughlin (JIRA)
Kevin McLaughlin created CASSANDRA-9635:
---

 Summary: Silent startup failure with filesystem that does not 
support mmap
 Key: CASSANDRA-9635
 URL: https://issues.apache.org/jira/browse/CASSANDRA-9635
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Reporter: Kevin McLaughlin
 Attachments: c_tdump.txt


C* version 2.0.9.

When running C* in virtualbox on OS X via boot2docker with the data directory 
on a shared volume from the host system (vboxfs), C* fails to start without 
printing any errors.

I do not know if C* is supposed to support filesystems that do not support mmap 
(does not appear so), however, I think the failure exposes a static 
initialization deadlock 
(http://ternarysearch.blogspot.ru/2013/07/static-initialization-deadlock.html).

I believe the virtualbox bug is https://www.virtualbox.org/ticket/819.

Stacktrace of the deadlock is attached.  When placing a t.printStackTrace() 
between lines 115 and 116 in 
https://github.com/apache/cassandra/blob/cassandra-2.0.9/src/java/org/apache/cassandra/db/commitlog/CommitLogAllocator.java,
 the stack trace at startup is:

{quote}
DEBUG 21:16:54,716 Creating new commit log segment 
/var/lib/cassandra/commitlog/CommitLog-3-1435007814714.log
FSWriteError in /var/lib/cassandra/commitlog/CommitLog-3-1435007814714.log
at 
org.apache.cassandra.db.commitlog.CommitLogSegment.init(CommitLogSegment.java:143)
at 
org.apache.cassandra.db.commitlog.CommitLogSegment.freshSegment(CommitLogSegment.java:90)
at 
org.apache.cassandra.db.commitlog.CommitLogAllocator.createFreshSegment(CommitLogAllocator.java:263)
at 
org.apache.cassandra.db.commitlog.CommitLogAllocator.access$500(CommitLogAllocator.java:50)
at 
org.apache.cassandra.db.commitlog.CommitLogAllocator$1.runMayThrow(CommitLogAllocator.java:109)
at org.apache.cassandra.utils.WrappedRunnable.run(WrappedRunnable.java:28)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.io.IOException: Invalid argument
at sun.nio.ch.FileChannelImpl.map0(Native Method)
at sun.nio.ch.FileChannelImpl.map(FileChannelImpl.java:893)
at 
org.apache.cassandra.db.commitlog.CommitLogSegment.init(CommitLogSegment.java:133)
... 6 more
{quote}



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


[jira] [Commented] (CASSANDRA-9160) Migrate CQL dtests to unit tests

2015-06-22 Thread Stefania (JIRA)

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

Stefania commented on CASSANDRA-9160:
-

[~JoshuaMcKenzie] gentle nudge. We have moved around so much code that rebasing 
could be problematic if someone edits any of the existing tests that were 
moved. 



 Migrate CQL dtests to unit tests
 

 Key: CASSANDRA-9160
 URL: https://issues.apache.org/jira/browse/CASSANDRA-9160
 Project: Cassandra
  Issue Type: Test
Reporter: Sylvain Lebresne
Assignee: Stefania

 We have CQL tests in 2 places: dtests and unit tests. The unit tests are 
 actually somewhat better in the sense that they have the ability to test both 
 prepared and unprepared statements at the flip of a switch. It's also better 
 to have all those tests in the same place so we can improve the test 
 framework in only one place (CASSANDRA-7959, CASSANDRA-9159, etc...). So we 
 should move the CQL dtests to the unit tests (which will be a good occasion 
 to organize them better).



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


[jira] [Commented] (CASSANDRA-6794) Optimise slab allocator to enable higher number of column families

2015-06-22 Thread Arun Chaitanya Miriappalli (JIRA)

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

Arun Chaitanya Miriappalli commented on CASSANDRA-6794:
---

I completely understand that large numbers of CFs is an anti-pattern. But 
unfortunately, in our use case we have many CFs.

Now we settled on the following approach - Use  Off Heap Memory

Modifications to default cassandra.yaml and cassandra-env.sh

 * memory_allocator: JEMallocAllocator 
(https://issues.apache.org/jira/browse/CASSANDRA-7883)
 * memtable_allocation_type: offheap_objects

 By above two, the slab allocation 
(https://issues.apache.org/jira/browse/CASSANDRA-5935), which requires
 1MB heap memory per table, is disabled. The memory for table metadata, caches 
and memtable are thus
 allocated natively and does not affect GC performance.

 * tombstone_failure_threshold: 1
   Without this, C* throws TombstoneOverwhelmingException while in startup.
   This setting looks problematic so I want to know why just creating tables 
makes so many tombstones ...

 * -XX:+UseG1GC
   It is good for reducing GC time.
   Without this, full GCs  1s are observed.

We created 5000 column families with about 1000 entries per column family. The 
read/write performance seems to stable and comparable.
The problem we saw is only with startup time.

No of CFs500 onHeap 5000 off Heap
Cassandra Start Time (s)20   349
Average CPU Usage (%)   40   49.65
GC Actitivy (%) 2.6  0.6

I want to know if there are any problems that are foreseen in the production 
environment.
Sorry, if this is not the right place to ask this question.


 Optimise slab allocator to enable higher number of column families
 --

 Key: CASSANDRA-6794
 URL: https://issues.apache.org/jira/browse/CASSANDRA-6794
 Project: Cassandra
  Issue Type: New Feature
  Components: Core
Reporter: Jeremy Hanna
Priority: Minor

 Currently the slab allocator allocates 1MB per column family.  This has been 
 very beneficial for gc efficiency.  However, it makes it more difficult to 
 have large numbers of column families.
 It would be preferable to have a more intelligent way to allocate slabs so 
 that there is more flexibility between slab allocator and non-slab allocator 
 behaviour.
 A simple first step is to ramp up size of slabs from small (say  8KB) when 
 empty, to 1MB after a few slabs.



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


[jira] [Updated] (CASSANDRA-8384) Change CREATE TABLE syntax for compression options

2015-06-22 Thread Benjamin Lerer (JIRA)

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

Benjamin Lerer updated CASSANDRA-8384:
--
Labels: doc-impacting docs  (was: )

 Change CREATE TABLE syntax for compression options
 --

 Key: CASSANDRA-8384
 URL: https://issues.apache.org/jira/browse/CASSANDRA-8384
 Project: Cassandra
  Issue Type: Sub-task
Reporter: Aleksey Yeschenko
Assignee: Benjamin Lerer
  Labels: doc-impacting, docs
 Fix For: 3.x


 Currently, `compression` table options are inconsistent with the likes of it 
 (table `compaction`, keyspace `replication`).
 I suggest we change it for 3.0, like we did change `caching` syntax for 2.1 
 (while continuing to accept the old syntax for a release).
 I recommend the following changes:
 1. rename `sstable_compression` to `class`, to make it consistent 
 `compression` and `replication`
 2. rename `chunk_length_kb` to `chunk_length_in_kb`, to match 
 `memtable_flush_period_in_ms`, or, alternatively, to just `chunk_length`, 
 with `memtable_flush_period_in_ms` renamed to `memtable_flush_period` - 
 consistent with every other CQL option everywhere else
 3. add a boolean `enabled` option, to match `compaction`. Currently, the 
 official way to disable comression is an ugly, ugly hack (see CASSANDRA-8288)



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


[jira] [Commented] (CASSANDRA-9503) Update CQL doc reflecting current keywords

2015-06-22 Thread Benjamin Lerer (JIRA)

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

Benjamin Lerer commented on CASSANDRA-9503:
---

+1
[~thobbs] Could you commit?

 Update CQL doc reflecting current keywords
 --

 Key: CASSANDRA-9503
 URL: https://issues.apache.org/jira/browse/CASSANDRA-9503
 Project: Cassandra
  Issue Type: Bug
  Components: Documentation  website
Reporter: Adam Holmberg
Assignee: Benjamin Lerer
Priority: Trivial
 Fix For: 2.2.x

 Attachments: 9503-2.txt, cql_keywords.txt


 The table in doc/cql3/CQL.textile#appendixA is outdated.



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


[jira] [Commented] (CASSANDRA-9250) Make compactionstats more detailed

2015-06-22 Thread Marcus Eriksson (JIRA)

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

Marcus Eriksson commented on CASSANDRA-9250:


What I wanted was probably more details about the ongoing compactions, what 
levels are we compacting in LCS? How old windows are we compacting in DTCS? etc

 Make compactionstats more detailed
 --

 Key: CASSANDRA-9250
 URL: https://issues.apache.org/jira/browse/CASSANDRA-9250
 Project: Cassandra
  Issue Type: Improvement
Reporter: Marcus Eriksson
 Fix For: 3.x


 When a user runs nodetool compactionstats, we could allow compaction 
 strategies to print more information about themselves, example from rocksdb:
 https://gist.github.com/mdcallag/52719276a79b23df18a4
 It could show details about levels for LCS, sizes of sstables with STCS or 
 time windows with DTCS.



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


cassandra git commit: Don't repair system_distributed by default

2015-06-22 Thread marcuse
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-2.2 44c7bdec9 - 2deb68ede


Don't repair system_distributed by default

Patch by marcuse; reviewed by slebresne for CASSANDRA-9621


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

Branch: refs/heads/cassandra-2.2
Commit: 2deb68ede4b1eaf45eddaeb15e3af704daa1bbff
Parents: 44c7bde
Author: Marcus Eriksson marc...@apache.org
Authored: Mon Jun 22 09:55:05 2015 +0200
Committer: Marcus Eriksson marc...@apache.org
Committed: Mon Jun 22 12:59:57 2015 +0200

--
 CHANGES.txt  |  1 +
 src/java/org/apache/cassandra/tools/nodetool/Repair.java | 10 ++
 2 files changed, 11 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/2deb68ed/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 4886850..45727f9 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.2
+ * Don't repair system_distributed by default (CASSANDRA-9621)
  * Fix mixing min, max, and count aggregates for blob type (CASSANRA-9622)
  * Rename class for DATE type in Java driver (CASSANDRA-9563)
  * Duplicate compilation of UDFs on coordinator (CASSANDRA-9475)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/2deb68ed/src/java/org/apache/cassandra/tools/nodetool/Repair.java
--
diff --git a/src/java/org/apache/cassandra/tools/nodetool/Repair.java 
b/src/java/org/apache/cassandra/tools/nodetool/Repair.java
index 45b3d98..7d0e207 100644
--- a/src/java/org/apache/cassandra/tools/nodetool/Repair.java
+++ b/src/java/org/apache/cassandra/tools/nodetool/Repair.java
@@ -27,8 +27,12 @@ import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
+import java.util.Set;
+
+import com.google.common.collect.Sets;
 
 import org.apache.cassandra.repair.RepairParallelism;
+import org.apache.cassandra.repair.SystemDistributedKeyspace;
 import org.apache.cassandra.repair.messages.RepairOption;
 import org.apache.cassandra.tools.NodeProbe;
 import org.apache.cassandra.tools.NodeTool.NodeToolCmd;
@@ -37,6 +41,8 @@ import org.apache.commons.lang3.StringUtils;
 @Command(name = repair, description = Repair one or more tables)
 public class Repair extends NodeToolCmd
 {
+public final static SetString ONLY_EXPLICITLY_REPAIRED = 
Sets.newHashSet(SystemDistributedKeyspace.NAME);
+
 @Arguments(usage = [keyspace tables...], description = The keyspace 
followed by one or many tables)
 private ListString args = new ArrayList();
 
@@ -86,6 +92,10 @@ public class Repair extends NodeToolCmd
 
 for (String keyspace : keyspaces)
 {
+// avoid repairing system_distributed by default (CASSANDRA-9621)
+if ((args == null || args.isEmpty())  
ONLY_EXPLICITLY_REPAIRED.contains(keyspace))
+continue;
+
 MapString, String options = new HashMap();
 RepairParallelism parallelismDegree = RepairParallelism.PARALLEL;
 if (sequential)



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

2015-06-22 Thread marcuse
Merge branch 'cassandra-2.2' into trunk


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

Branch: refs/heads/trunk
Commit: 51a9285e9cd7966a7eb8215583060f684bb53e14
Parents: 1af3c3b 2deb68e
Author: Marcus Eriksson marc...@apache.org
Authored: Mon Jun 22 13:01:57 2015 +0200
Committer: Marcus Eriksson marc...@apache.org
Committed: Mon Jun 22 13:01:57 2015 +0200

--
 CHANGES.txt |  1 +
 .../org/apache/cassandra/tools/nodetool/Repair.java | 10 ++
 .../org/apache/cassandra/db/RangeTombstoneTest.java | 12 ++--
 3 files changed, 21 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/51a9285e/CHANGES.txt
--
diff --cc CHANGES.txt
index c631c8d,45727f9..188393f
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,15 -1,5 +1,16 @@@
 +3.0:
 + * Add nodetool command to replay batchlog (CASSANDRA-9547)
 + * Make file buffer cache independent of paths being read (CASSANDRA-8897)
 + * Remove deprecated legacy Hadoop code (CASSANDRA-9353)
 + * Decommissioned nodes will not rejoin the cluster (CASSANDRA-8801)
 + * Change gossip stabilization to use endpoit size (CASSANDRA-9401)
 + * Change default garbage collector to G1 (CASSANDRA-7486)
 + * Populate TokenMetadata early during startup (CASSANDRA-9317)
 + * undeprecate cache recentHitRate (CASSANDRA-6591)
 +
 +
  2.2
+  * Don't repair system_distributed by default (CASSANDRA-9621)
   * Fix mixing min, max, and count aggregates for blob type (CASSANRA-9622)
   * Rename class for DATE type in Java driver (CASSANDRA-9563)
   * Duplicate compilation of UDFs on coordinator (CASSANDRA-9475)



[jira] [Commented] (CASSANDRA-9250) Make compactionstats more detailed

2015-06-22 Thread Lyuben Todorov (JIRA)

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

Lyuben Todorov commented on CASSANDRA-9250:
---

/cc ^ [~krummas] 

 Make compactionstats more detailed
 --

 Key: CASSANDRA-9250
 URL: https://issues.apache.org/jira/browse/CASSANDRA-9250
 Project: Cassandra
  Issue Type: Improvement
Reporter: Marcus Eriksson
 Fix For: 3.x


 When a user runs nodetool compactionstats, we could allow compaction 
 strategies to print more information about themselves, example from rocksdb:
 https://gist.github.com/mdcallag/52719276a79b23df18a4
 It could show details about levels for LCS, sizes of sstables with STCS or 
 time windows with DTCS.



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


[jira] [Comment Edited] (CASSANDRA-9565) 'WITH WITH' in alter keyspace statements causes NPE

2015-06-22 Thread Benjamin Lerer (JIRA)

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

Benjamin Lerer edited comment on CASSANDRA-9565 at 6/22/15 11:56 AM:
-

[~snazy] could you review?


was (Author: blerer):
@snazy could you review?

 'WITH WITH' in alter keyspace statements causes NPE
 ---

 Key: CASSANDRA-9565
 URL: https://issues.apache.org/jira/browse/CASSANDRA-9565
 Project: Cassandra
  Issue Type: Bug
Reporter: Jim Witschey
Assignee: Benjamin Lerer
 Attachments: 9565-2.0.txt, 9565-2.1.txt


 Running any of these statements:
 {code}
 ALTER KEYSPACE WITH WITH DURABLE_WRITES = true;
 ALTER KEYSPACE ks WITH WITH DURABLE_WRITES = true;
 CREATE KEYSPACE WITH WITH DURABLE_WRITES = true;
 CREATE KEYSPACE ks WITH WITH DURABLE_WRITES = true;
 {code}
 Fails, raising a {{SyntaxException}} and giving a {{NullPointerException}} as 
 the reason for failure. This happens in all versions I tried, including 
 2.0.15, 2.1.5, and HEAD on cassandra-2.0, cassandra-2.1, cassandra-2.2, and 
 trunk.
 EDIT: A dtest is 
 [here|https://github.com/mambocab/cassandra-dtest/commit/da3785e25cce505183e0ebc8dd21340f3a3ea3a4#diff-dcb0fc3aff201fd7eeea6cbf1181f921R5300],
  but it would probably be more appropriate to test with unit tests.



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


[jira] [Commented] (CASSANDRA-9565) 'WITH WITH' in alter keyspace statements causes NPE

2015-06-22 Thread Benjamin Lerer (JIRA)

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

Benjamin Lerer commented on CASSANDRA-9565:
---

@snazy could you review?

 'WITH WITH' in alter keyspace statements causes NPE
 ---

 Key: CASSANDRA-9565
 URL: https://issues.apache.org/jira/browse/CASSANDRA-9565
 Project: Cassandra
  Issue Type: Bug
Reporter: Jim Witschey
Assignee: Benjamin Lerer
 Attachments: 9565-2.0.txt, 9565-2.1.txt


 Running any of these statements:
 {code}
 ALTER KEYSPACE WITH WITH DURABLE_WRITES = true;
 ALTER KEYSPACE ks WITH WITH DURABLE_WRITES = true;
 CREATE KEYSPACE WITH WITH DURABLE_WRITES = true;
 CREATE KEYSPACE ks WITH WITH DURABLE_WRITES = true;
 {code}
 Fails, raising a {{SyntaxException}} and giving a {{NullPointerException}} as 
 the reason for failure. This happens in all versions I tried, including 
 2.0.15, 2.1.5, and HEAD on cassandra-2.0, cassandra-2.1, cassandra-2.2, and 
 trunk.
 EDIT: A dtest is 
 [here|https://github.com/mambocab/cassandra-dtest/commit/da3785e25cce505183e0ebc8dd21340f3a3ea3a4#diff-dcb0fc3aff201fd7eeea6cbf1181f921R5300],
  but it would probably be more appropriate to test with unit tests.



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


[jira] [Commented] (CASSANDRA-9035) Fix hinted_handoff_enabled yaml setting

2015-06-22 Thread Aleksey Yeschenko (JIRA)

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

Aleksey Yeschenko commented on CASSANDRA-9035:
--

{{disablehintsfordc}} to add a single DC to the blacklist and 
{{enablehintsfordc}} to remove a single DC from the blacklist (if there). Not 
accepting lists, but the end user can presumably use loops.

 Fix hinted_handoff_enabled yaml setting
 ---

 Key: CASSANDRA-9035
 URL: https://issues.apache.org/jira/browse/CASSANDRA-9035
 Project: Cassandra
  Issue Type: Sub-task
Reporter: Stefania
Assignee: Stefania
Priority: Minor
 Fix For: 3.x


 As discussed in CASSANDRA-6157, at the moment we have a single parameter 
 {{hinted_handoff_enabled}} that can be either a boolean or a csv list of 
 enabled data centers.
 We should have a boolean global {{hinted_handoff_enabled}} param plus a 
 separate yaml list for the HH DC blacklist - 
 {{hinted_handoff_disabled_datacenters}} to be checked when the global flag is 
 on.
 Backward compatibility with the existing approach should be kept.



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


[jira] [Commented] (CASSANDRA-9035) Fix hinted_handoff_enabled yaml setting

2015-06-22 Thread Aleksey Yeschenko (JIRA)

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

Aleksey Yeschenko commented on CASSANDRA-9035:
--

[~Stefania] We'll mark that formally deprecated in 2.2 (in NEWS.txt if nowhere 
else), and stop supporting that behavior in 3.0.

A separate JMX {{nodetool blacklistdatacetnersforthints}}, or something with a 
better name, in 3.0, will be added.

 Fix hinted_handoff_enabled yaml setting
 ---

 Key: CASSANDRA-9035
 URL: https://issues.apache.org/jira/browse/CASSANDRA-9035
 Project: Cassandra
  Issue Type: Sub-task
Reporter: Stefania
Assignee: Stefania
Priority: Minor
 Fix For: 3.x


 As discussed in CASSANDRA-6157, at the moment we have a single parameter 
 {{hinted_handoff_enabled}} that can be either a boolean or a csv list of 
 enabled data centers.
 We should have a boolean global {{hinted_handoff_enabled}} param plus a 
 separate yaml list for the HH DC blacklist - 
 {{hinted_handoff_disabled_datacenters}} to be checked when the global flag is 
 on.
 Backward compatibility with the existing approach should be kept.



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


[1/3] cassandra git commit: Fix flakiness in RangeTombstoneTest

2015-06-22 Thread marcuse
Repository: cassandra
Updated Branches:
  refs/heads/trunk 1af3c3b98 - 51a9285e9


Fix flakiness in RangeTombstoneTest

patch by Ariel Weisberg; reviewed by Aleksey Yeschenko for
CASSANDRA-9523


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

Branch: refs/heads/trunk
Commit: 44c7bdec9ad2085db1c99230e49adfbd8eb2e0c9
Parents: 716b253
Author: Ariel Weisberg ar...@weisberg.ws
Authored: Fri Jun 5 13:02:20 2015 -0400
Committer: Aleksey Yeschenko alek...@apache.org
Committed: Sat Jun 20 22:31:45 2015 +0300

--
 .../org/apache/cassandra/db/RangeTombstoneTest.java | 12 ++--
 1 file changed, 10 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/44c7bdec/test/unit/org/apache/cassandra/db/RangeTombstoneTest.java
--
diff --git a/test/unit/org/apache/cassandra/db/RangeTombstoneTest.java 
b/test/unit/org/apache/cassandra/db/RangeTombstoneTest.java
index 34e592a..9ce1236 100644
--- a/test/unit/org/apache/cassandra/db/RangeTombstoneTest.java
+++ b/test/unit/org/apache/cassandra/db/RangeTombstoneTest.java
@@ -26,6 +26,7 @@ import java.util.Set;
 import java.util.SortedSet;
 import java.util.TreeSet;
 import java.util.concurrent.ExecutionException;
+import java.util.concurrent.Future;
 
 import com.google.common.collect.ImmutableMap;
 import com.google.common.collect.Iterators;
@@ -572,7 +573,10 @@ public class RangeTombstoneTest
 {
 ColumnDefinition cd = new ColumnDefinition(cfs.metadata, 
indexedColumnName, Int32Type.instance, null, ColumnDefinition.Kind.REGULAR);
 cd.setIndex(test_index, IndexType.CUSTOM, 
ImmutableMap.of(SecondaryIndex.CUSTOM_INDEX_OPTION_NAME, 
TestIndex.class.getName()));
-cfs.indexManager.addIndexedColumn(cd);
+Future? rebuild = cfs.indexManager.addIndexedColumn(cd);
+// If rebuild there is, wait for the rebuild to finish so it 
doesn't race with the following insertions
+if (rebuild != null)
+rebuild.get();
 }
 
 TestIndex index = 
((TestIndex)cfs.indexManager.getIndexForColumn(indexedColumnName));
@@ -615,7 +619,11 @@ public class RangeTombstoneTest
 {
 ColumnDefinition cd = ColumnDefinition.regularDef(cfs.metadata, 
indexedColumnName, cfs.getComparator().asAbstractType(), 0)
   .setIndex(test_index, 
IndexType.CUSTOM, ImmutableMap.of(SecondaryIndex.CUSTOM_INDEX_OPTION_NAME, 
TestIndex.class.getName()));
-cfs.indexManager.addIndexedColumn(cd);
+Future? rebuild = cfs.indexManager.addIndexedColumn(cd);
+// If rebuild there is, wait for the rebuild to finish so it 
doesn't race with the following insertions
+if (rebuild != null)
+rebuild.get();
+
 }
 
 TestIndex index = 
((TestIndex)cfs.indexManager.getIndexForColumn(indexedColumnName));



[2/3] cassandra git commit: Don't repair system_distributed by default

2015-06-22 Thread marcuse
Don't repair system_distributed by default

Patch by marcuse; reviewed by slebresne for CASSANDRA-9621


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

Branch: refs/heads/trunk
Commit: 2deb68ede4b1eaf45eddaeb15e3af704daa1bbff
Parents: 44c7bde
Author: Marcus Eriksson marc...@apache.org
Authored: Mon Jun 22 09:55:05 2015 +0200
Committer: Marcus Eriksson marc...@apache.org
Committed: Mon Jun 22 12:59:57 2015 +0200

--
 CHANGES.txt  |  1 +
 src/java/org/apache/cassandra/tools/nodetool/Repair.java | 10 ++
 2 files changed, 11 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/2deb68ed/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 4886850..45727f9 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.2
+ * Don't repair system_distributed by default (CASSANDRA-9621)
  * Fix mixing min, max, and count aggregates for blob type (CASSANRA-9622)
  * Rename class for DATE type in Java driver (CASSANDRA-9563)
  * Duplicate compilation of UDFs on coordinator (CASSANDRA-9475)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/2deb68ed/src/java/org/apache/cassandra/tools/nodetool/Repair.java
--
diff --git a/src/java/org/apache/cassandra/tools/nodetool/Repair.java 
b/src/java/org/apache/cassandra/tools/nodetool/Repair.java
index 45b3d98..7d0e207 100644
--- a/src/java/org/apache/cassandra/tools/nodetool/Repair.java
+++ b/src/java/org/apache/cassandra/tools/nodetool/Repair.java
@@ -27,8 +27,12 @@ import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
+import java.util.Set;
+
+import com.google.common.collect.Sets;
 
 import org.apache.cassandra.repair.RepairParallelism;
+import org.apache.cassandra.repair.SystemDistributedKeyspace;
 import org.apache.cassandra.repair.messages.RepairOption;
 import org.apache.cassandra.tools.NodeProbe;
 import org.apache.cassandra.tools.NodeTool.NodeToolCmd;
@@ -37,6 +41,8 @@ import org.apache.commons.lang3.StringUtils;
 @Command(name = repair, description = Repair one or more tables)
 public class Repair extends NodeToolCmd
 {
+public final static SetString ONLY_EXPLICITLY_REPAIRED = 
Sets.newHashSet(SystemDistributedKeyspace.NAME);
+
 @Arguments(usage = [keyspace tables...], description = The keyspace 
followed by one or many tables)
 private ListString args = new ArrayList();
 
@@ -86,6 +92,10 @@ public class Repair extends NodeToolCmd
 
 for (String keyspace : keyspaces)
 {
+// avoid repairing system_distributed by default (CASSANDRA-9621)
+if ((args == null || args.isEmpty())  
ONLY_EXPLICITLY_REPAIRED.contains(keyspace))
+continue;
+
 MapString, String options = new HashMap();
 RepairParallelism parallelismDegree = RepairParallelism.PARALLEL;
 if (sequential)



[jira] [Commented] (CASSANDRA-9623) Added column does not sort as the last column

2015-06-22 Thread Marcin Pietraszek (JIRA)

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

Marcin Pietraszek commented on CASSANDRA-9623:
--

{noformat}
DESCRIBE TABLE Histograms_monthly;

CREATE TABLE Histograms_monthly (
  key text,
  bucket_size bigint,
  value bigint,
  PRIMARY KEY ((key), bucket_size)
) WITH COMPACT STORAGE AND
  bloom_filter_fp_chance=0.10 AND
  caching='KEYS_ONLY' AND
  comment='' AND
  dclocal_read_repair_chance=0.00 AND
  gc_grace_seconds=864000 AND
  index_interval=512 AND
  read_repair_chance=0.05 AND
  replicate_on_write='true' AND
  populate_io_cache_on_flush='false' AND
  default_time_to_live=0 AND
  speculative_retry='99.0PERCENTILE' AND
  memtable_flush_period_in_ms=0 AND
  compaction={'sstable_size_in_mb': '256', 'class': 
'LeveledCompactionStrategy'} AND
  compression={'sstable_compression': 'DeflateCompressor'};
{noformat}

 Added column does not sort as the last column
 -

 Key: CASSANDRA-9623
 URL: https://issues.apache.org/jira/browse/CASSANDRA-9623
 Project: Cassandra
  Issue Type: Bug
Reporter: Marcin Pietraszek

 After adding new machines to existing cluster running cleanup one of the 
 tables ends with:
 {noformat}
 ERROR [CompactionExecutor:1015] 2015-06-19 11:24:05,038 CassandraDaemon.java 
 (line 199) Exception in thread Thread[CompactionExecutor:1015,1,main]
 java.lang.AssertionError: Added column does not sort as the last column
 at 
 org.apache.cassandra.db.ArrayBackedSortedColumns.addColumn(ArrayBackedSortedColumns.java:116)
 at 
 org.apache.cassandra.db.ColumnFamily.addColumn(ColumnFamily.java:121)
 at org.apache.cassandra.db.ColumnFamily.addAtom(ColumnFamily.java:155)
 at 
 org.apache.cassandra.io.sstable.SSTableIdentityIterator.getColumnFamilyWithColumns(SSTableIdentityIterator.java:186)
 at 
 org.apache.cassandra.db.compaction.PrecompactedRow.merge(PrecompactedRow.java:98)
 at 
 org.apache.cassandra.db.compaction.PrecompactedRow.init(PrecompactedRow.java:85)
 at 
 org.apache.cassandra.db.compaction.CompactionController.getCompactedRow(CompactionController.java:196)
 at 
 org.apache.cassandra.db.compaction.CompactionIterable$Reducer.getReduced(CompactionIterable.java:74)
 at 
 org.apache.cassandra.db.compaction.CompactionIterable$Reducer.getReduced(CompactionIterable.java:55)
 at 
 org.apache.cassandra.utils.MergeIterator$ManyToOne.consume(MergeIterator.java:115)
 at 
 org.apache.cassandra.utils.MergeIterator$ManyToOne.computeNext(MergeIterator.java:98)
 at 
 com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:143)
 at 
 com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:138)
 at 
 org.apache.cassandra.db.compaction.CompactionTask.runMayThrow(CompactionTask.java:161)
 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:471)
 at java.util.concurrent.FutureTask.run(FutureTask.java:262)
 at 
 java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
 at 
 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
 at java.lang.Thread.run(Thread.java:745)
 {noformat}
 We're using patched 2.0.13-190ef4f



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


[jira] [Updated] (CASSANDRA-9565) 'WITH WITH' in alter keyspace statements causes NPE

2015-06-22 Thread Benjamin Lerer (JIRA)

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

Benjamin Lerer updated CASSANDRA-9565:
--
Attachment: 9565-2.1.txt
9565-2.0.txt

The patch fixes the Cql.g grammar and add Unit tests to verify the behaviour.


* [unit tests for 
2.0|http://cassci.datastax.com/view/Dev/view/blerer/job/blerer-9565-testall/lastCompletedBuild/testReport/]
* [DTests for 
2.0|http://cassci.datastax.com/view/Dev/view/blerer/job/blerer-9565-dtest/lastCompletedBuild/testReport/]
* [unit tests for 
2.1|http://cassci.datastax.com/view/Dev/view/blerer/job/blerer-9565-2.1-testall/lastCompletedBuild/testReport/]
* [DTests for 
2.1|http://cassci.datastax.com/view/Dev/view/blerer/job/blerer-9565-2.1-dtest/lastCompletedBuild/testReport/]

 'WITH WITH' in alter keyspace statements causes NPE
 ---

 Key: CASSANDRA-9565
 URL: https://issues.apache.org/jira/browse/CASSANDRA-9565
 Project: Cassandra
  Issue Type: Bug
Reporter: Jim Witschey
Assignee: Benjamin Lerer
 Attachments: 9565-2.0.txt, 9565-2.1.txt


 Running any of these statements:
 {code}
 ALTER KEYSPACE WITH WITH DURABLE_WRITES = true;
 ALTER KEYSPACE ks WITH WITH DURABLE_WRITES = true;
 CREATE KEYSPACE WITH WITH DURABLE_WRITES = true;
 CREATE KEYSPACE ks WITH WITH DURABLE_WRITES = true;
 {code}
 Fails, raising a {{SyntaxException}} and giving a {{NullPointerException}} as 
 the reason for failure. This happens in all versions I tried, including 
 2.0.15, 2.1.5, and HEAD on cassandra-2.0, cassandra-2.1, cassandra-2.2, and 
 trunk.
 EDIT: A dtest is 
 [here|https://github.com/mambocab/cassandra-dtest/commit/da3785e25cce505183e0ebc8dd21340f3a3ea3a4#diff-dcb0fc3aff201fd7eeea6cbf1181f921R5300],
  but it would probably be more appropriate to test with unit tests.



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


[jira] [Commented] (CASSANDRA-8894) Our default buffer size for (uncompressed) buffered reads should be smaller, and based on the expected record size

2015-06-22 Thread Stefania (JIRA)

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

Stefania commented on CASSANDRA-8894:
-

[~benedict] is {{estimatedRowSize.mean()}} the correct average record size for 
the data file? For the index file do we need to calculate an average or is it 
OK to just use the minimum, 4096?

 Our default buffer size for (uncompressed) buffered reads should be smaller, 
 and based on the expected record size
 --

 Key: CASSANDRA-8894
 URL: https://issues.apache.org/jira/browse/CASSANDRA-8894
 Project: Cassandra
  Issue Type: Improvement
  Components: Core
Reporter: Benedict
Assignee: Stefania
 Fix For: 3.x


 A large contributor to slower buffered reads than mmapped is likely that we 
 read a full 64Kb at once, when average record sizes may be as low as 140 
 bytes on our stress tests. The TLB has only 128 entries on a modern core, and 
 each read will touch 32 of these, meaning we are unlikely to almost ever be 
 hitting the TLB, and will be incurring at least 30 unnecessary misses each 
 time (as well as the other costs of larger than necessary accesses). When 
 working with an SSD there is little to no benefit reading more than 4Kb at 
 once, and in either case reading more data than we need is wasteful. So, I 
 propose selecting a buffer size that is the next larger power of 2 than our 
 average record size (with a minimum of 4Kb), so that we expect to read in one 
 operation. I also propose that we create a pool of these buffers up-front, 
 and that we ensure they are all exactly aligned to a virtual page, so that 
 the source and target operations each touch exactly one virtual page per 4Kb 
 of expected record size.



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


[jira] [Commented] (CASSANDRA-8894) Our default buffer size for (uncompressed) buffered reads should be smaller, and based on the expected record size

2015-06-22 Thread Benedict (JIRA)

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

Benedict commented on CASSANDRA-8894:
-

{{estimatedRowSize.mean()}} is probably the best number to use, but it's a bit 
expensive to call for every operation (so let's memoize it). 

For the index file, we scan a number of index records and ideally want them all 
to be read in one go. So we need to ask the IndexSummary to tell us how many 
records are in the scan range we've found (by calling 
getEffectiveIndexIntervalAfterIndex, and to divide the file length by this (and 
round up). This will probably leave us with quite big buffers for the index 
files, but with CASSANDRA-8931 it should shrink dramatically (which is an 
excellent follow up to this).

Then we have a decision to make regarding alignment of our reads. I'm of the 
opinion we should align them, so that we don't issue more read operations than 
necessary. If so, we should put a floor of 4K on the size of the buffer, since 
we cannot read less than this anyway (if we don't read aligned, we will cross 
alignment boundaries, so our buffer size won't dictate how many reads we 
perform). This would also mean we probably want to size our buffer to = ~4x 
estimatedRowSize.mean(), though, so we have a high likelihood of reading the 
whole row in our read operation (2x to make sure the average is not too small, 
and 2x to make sure we don't miss it through alignment).

WDYT?

 Our default buffer size for (uncompressed) buffered reads should be smaller, 
 and based on the expected record size
 --

 Key: CASSANDRA-8894
 URL: https://issues.apache.org/jira/browse/CASSANDRA-8894
 Project: Cassandra
  Issue Type: Improvement
  Components: Core
Reporter: Benedict
Assignee: Stefania
 Fix For: 3.x


 A large contributor to slower buffered reads than mmapped is likely that we 
 read a full 64Kb at once, when average record sizes may be as low as 140 
 bytes on our stress tests. The TLB has only 128 entries on a modern core, and 
 each read will touch 32 of these, meaning we are unlikely to almost ever be 
 hitting the TLB, and will be incurring at least 30 unnecessary misses each 
 time (as well as the other costs of larger than necessary accesses). When 
 working with an SSD there is little to no benefit reading more than 4Kb at 
 once, and in either case reading more data than we need is wasteful. So, I 
 propose selecting a buffer size that is the next larger power of 2 than our 
 average record size (with a minimum of 4Kb), so that we expect to read in one 
 operation. I also propose that we create a pool of these buffers up-front, 
 and that we ensure they are all exactly aligned to a virtual page, so that 
 the source and target operations each touch exactly one virtual page per 4Kb 
 of expected record size.



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


[jira] [Commented] (CASSANDRA-8894) Our default buffer size for (uncompressed) buffered reads should be smaller, and based on the expected record size

2015-06-22 Thread Stefania (JIRA)

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

Stefania commented on CASSANDRA-8894:
-

Sounds good, thanks.

Do we also need some cperf tests?

 Our default buffer size for (uncompressed) buffered reads should be smaller, 
 and based on the expected record size
 --

 Key: CASSANDRA-8894
 URL: https://issues.apache.org/jira/browse/CASSANDRA-8894
 Project: Cassandra
  Issue Type: Improvement
  Components: Core
Reporter: Benedict
Assignee: Stefania
 Fix For: 3.x


 A large contributor to slower buffered reads than mmapped is likely that we 
 read a full 64Kb at once, when average record sizes may be as low as 140 
 bytes on our stress tests. The TLB has only 128 entries on a modern core, and 
 each read will touch 32 of these, meaning we are unlikely to almost ever be 
 hitting the TLB, and will be incurring at least 30 unnecessary misses each 
 time (as well as the other costs of larger than necessary accesses). When 
 working with an SSD there is little to no benefit reading more than 4Kb at 
 once, and in either case reading more data than we need is wasteful. So, I 
 propose selecting a buffer size that is the next larger power of 2 than our 
 average record size (with a minimum of 4Kb), so that we expect to read in one 
 operation. I also propose that we create a pool of these buffers up-front, 
 and that we ensure they are all exactly aligned to a virtual page, so that 
 the source and target operations each touch exactly one virtual page per 4Kb 
 of expected record size.



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


[jira] [Commented] (CASSANDRA-8894) Our default buffer size for (uncompressed) buffered reads should be smaller, and based on the expected record size

2015-06-22 Thread Benedict (JIRA)

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

Benedict commented on CASSANDRA-8894:
-

Yes, I think so. With {{disk_access_mode: standard}}

 Our default buffer size for (uncompressed) buffered reads should be smaller, 
 and based on the expected record size
 --

 Key: CASSANDRA-8894
 URL: https://issues.apache.org/jira/browse/CASSANDRA-8894
 Project: Cassandra
  Issue Type: Improvement
  Components: Core
Reporter: Benedict
Assignee: Stefania
 Fix For: 3.x


 A large contributor to slower buffered reads than mmapped is likely that we 
 read a full 64Kb at once, when average record sizes may be as low as 140 
 bytes on our stress tests. The TLB has only 128 entries on a modern core, and 
 each read will touch 32 of these, meaning we are unlikely to almost ever be 
 hitting the TLB, and will be incurring at least 30 unnecessary misses each 
 time (as well as the other costs of larger than necessary accesses). When 
 working with an SSD there is little to no benefit reading more than 4Kb at 
 once, and in either case reading more data than we need is wasteful. So, I 
 propose selecting a buffer size that is the next larger power of 2 than our 
 average record size (with a minimum of 4Kb), so that we expect to read in one 
 operation. I also propose that we create a pool of these buffers up-front, 
 and that we ensure they are all exactly aligned to a virtual page, so that 
 the source and target operations each touch exactly one virtual page per 4Kb 
 of expected record size.



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


[jira] [Created] (CASSANDRA-9629) Error when reading date after altering column

2015-06-22 Thread Tomasz Bartczak (JIRA)
Tomasz Bartczak created CASSANDRA-9629:
--

 Summary: Error when reading date after altering column
 Key: CASSANDRA-9629
 URL: https://issues.apache.org/jira/browse/CASSANDRA-9629
 Project: Cassandra
  Issue Type: Bug
Reporter: Tomasz Bartczak


Having a table with timestamp column and a prepared statement for it - after 
altering the table with new column - reading date values are broken.

{code}
com.datastax.driver.core.exceptions.InvalidTypeException: Invalid 64-bits long 
value, expecting 8 bytes but got 1
at 
com.datastax.driver.core.TypeCodec$LongCodec.deserializeNoBoxing(TypeCodec.java:452)
at 
com.datastax.driver.core.TypeCodec$DateCodec.deserialize(TypeCodec.java:826)
at 
com.datastax.driver.core.AbstractGettableByIndexData.getDate(AbstractGettableByIndexData.java:155)
at 
com.datastax.driver.core.AbstractGettableData.getDate(AbstractGettableData.java:26)
at 
com.datastax.driver.core.AbstractGettableData.getDate(AbstractGettableData.java:99)
at 
CassandraAlterTable$delayedInit$body.apply(CassandraAlterTable.scala:19)
at scala.Function0$class.apply$mcV$sp(Function0.scala:40)
at 
scala.runtime.AbstractFunction0.apply$mcV$sp(AbstractFunction0.scala:12)
at scala.App$$anonfun$main$1.apply(App.scala:71)
at scala.App$$anonfun$main$1.apply(App.scala:71)
at scala.collection.immutable.List.foreach(List.scala:318)
at 
scala.collection.generic.TraversableForwarder$class.foreach(TraversableForwarder.scala:32)
at scala.App$class.main(App.scala:71)
at CassandraAlterTable$.main(CassandraAlterTable.scala:8)
at CassandraAlterTable.main(CassandraAlterTable.scala)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
{code}

This bug is reproduced in : https://github.com/kretes/cassandra-alter



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


[jira] [Commented] (CASSANDRA-9621) Repair of the SystemDistributed keyspace creates a non-trivial amount of memory pressure

2015-06-22 Thread Sylvain Lebresne (JIRA)

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

Sylvain Lebresne commented on CASSANDRA-9621:
-

I don't particularly care if we make CASSANDRA-5839 opt-in or not, but I do 
think this issue shouldn't weight much in that decision. As Markus said, this 
would still hurt people enabling it and it's not gonna be clear at all that 
opting-in for CASSANDRA-5839 buys you into this.

Anyway, the patch is very simple and I don't think it's a big deal if we want 
to undo it later so I'm not too fussed about this issue but I'm personally +1 
on Marcus' patch (though I'd add a comment pointing to this issue so we 
remember why we're doing this). 

 Repair of the SystemDistributed keyspace creates a non-trivial amount of 
 memory pressure
 

 Key: CASSANDRA-9621
 URL: https://issues.apache.org/jira/browse/CASSANDRA-9621
 Project: Cassandra
  Issue Type: Bug
Reporter: Sylvain Lebresne
Assignee: Marcus Eriksson
Priority: Minor
 Fix For: 2.2.0 rc2


 When a repair without any particular option is triggered, the 
 {{SystemDistributed}} keyspace is repaired for all range, and in particular 
 the {{repair_history}} table. For every range, that table is written and 
 flushed (as part of normal repair), meaning that every range triggers the 
 creation of a new 1MB slab region (this also triggers quite a few compactions 
 that also write and flush {{compaction_progress}} at every start and end).
 I don't know how much of a big deal this will be in practice, but I wonder if 
 it's really useful to repair the {{repair_*}} tables by default so maybe we 
 could exclude the SystemDistributed keyspace from default repairs and only 
 repair it if asked explicitly?



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


[jira] [Commented] (CASSANDRA-9621) Repair of the SystemDistributed keyspace creates a non-trivial amount of memory pressure

2015-06-22 Thread Marcus Eriksson (JIRA)

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

Marcus Eriksson commented on CASSANDRA-9621:


patch to only repair system_distributed explicitly here: 
https://github.com/krummas/cassandra/commits/marcuse/9621

bq. What if we made CASSANDRA-5839 opt-in only?
Even if we do, this would still hurt the people who enable it. Should we do 
both?

 Repair of the SystemDistributed keyspace creates a non-trivial amount of 
 memory pressure
 

 Key: CASSANDRA-9621
 URL: https://issues.apache.org/jira/browse/CASSANDRA-9621
 Project: Cassandra
  Issue Type: Bug
Reporter: Sylvain Lebresne
Assignee: Marcus Eriksson
Priority: Minor
 Fix For: 2.2.0 rc2


 When a repair without any particular option is triggered, the 
 {{SystemDistributed}} keyspace is repaired for all range, and in particular 
 the {{repair_history}} table. For every range, that table is written and 
 flushed (as part of normal repair), meaning that every range triggers the 
 creation of a new 1MB slab region (this also triggers quite a few compactions 
 that also write and flush {{compaction_progress}} at every start and end).
 I don't know how much of a big deal this will be in practice, but I wonder if 
 it's really useful to repair the {{repair_*}} tables by default so maybe we 
 could exclude the SystemDistributed keyspace from default repairs and only 
 repair it if asked explicitly?



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


[jira] [Updated] (CASSANDRA-9634) Set kernel timer resolution on Windows

2015-06-22 Thread Philip Thompson (JIRA)

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

Philip Thompson updated CASSANDRA-9634:
---
Description: 
In Windows 7/Server 2008 and to a similar extent Windows 8/Server 2012, the 
kernel's internal time is set to an interval of 15.6ms. (Use 
[clockres|https://technet.microsoft.com/en-us/sysinternals/bb897568.aspx] to 
confirm current 'tick rate' on Windows). Win8/Server2012 have a tickless kernel 
w/timer coalescing ([info 
here|http://arstechnica.com/information-technology/2012/10/better-on-the-inside-under-the-hood-of-windows-8/2/])
 and the platform shows similar performance characteristics with C* to Windows 
7 with a slight edge in performance to win8/server 2012 in my testing (the 
testing and results of which are outside the scope of this ticket).

Some arguments against lowering the system's internal timer to 1ms are 
[here|https://randomascii.wordpress.com/2013/07/08/windows-timer-resolution-megawatts-wasted/].
 These seem largely constrained to it'll drain your battery and it'll 
prevent your processor from being as effective in sleep states. The 2nd is 
somewhat of a concern as we don't want Windows users to all of a sudden have 
increased CPU-usage bills from virtualized environments. In the comments, one 
individual mentions a VirtualBox VM spinning at 10-20% cpu just from changing 
that flag alone which seems mathematically unlikely, but is worth keeping an 
eye on and testing.

A Microsoft publication that largely reinforces the cautionary tale on power 
consumption can be found 
[here|http://download.microsoft.com/download/3/0/2/3027D574-C433-412A-A8B6-5E0A75D5B237/Timer-Resolution.docx].

With the cautionary tales on our radar, the impact on throughput and latency on 
the 2.2 branch on Windows is [fairly 
dramatic|https://docs.google.com/spreadsheets/d/1nqPhNwOVt0SU7b9lt9o4Tyl0Z1yDrV2oo7LbBPaFa6A/edit#gid=0].
 A couple of caveats on these #'s: I'm not completely saturating the system as 
the thread count is relatively low (keeping it consistent with other testing 
where it *was* saturating), and the read #'s from our 2012 test environment are 
not affected by this timer change while I see it on 3 other bare-metal 
installations. The testing environment is new and we haven't worked out the 
kinks yet, however the write / mixed illustrate the throughput and latency #'s 
I've mentioned above; for reads the cpu's are sitting idle at 1-5% used by 
stress and C* so something else clearly needs to be addressed there; I included 
them for completeness sake.

Some preliminary testing on OpenStack indicates kernel-space syscall saturation 
w/this patch that actually *degrades* performance, however the unpatched 
performance numbers in our OpenStack environment are low enough that I question 
their validity.

Opening this ticket w/attached branch to get it on the radar / conversation 
going, and I'm going to update this from being hard-coded to being a tunable in 
the .yaml.

Initial patch [available 
here|https://github.com/apache/cassandra/compare/trunk...josh-mckenzie:2.2_WinTimer].

  was:
In Windows 7/Server 2008 and to a similar extent Windows 8/Server 2012, the 
kernel's internal time is set to an interval of 15.6ms. (Use 
[clockres|https://technet.microsoft.com/en-us/sysinternals/bb897568.aspx] to 
confirm current 'tick rate' on Windows). Win8/Server2012 have a tickless kernel 
w/timer coalescing ([info 
here|http://arstechnica.com/information-technology/2012/10/better-on-the-inside-under-the-hood-of-windows-8/2/])
 and the platform shows similar performance characteristics with C* to Windows 
7 with a slight edge in performance to win8/server 2012 in my testing (the 
testing and results of which are outside the scope of this ticket).

Some arguments against lowering the system's internal timer to 1ms are 
[here|https://randomascii.wordpress.com/2013/07/08/windows-timer-resolution-megawatts-wasted/].
 These seem largely constrained to it'll drain your battery and it'll 
prevent your processor from being as effective in sleep states. The 2nd is 
somewhat of a concern as we don't want Windows users to all of a sudden have 
increased CPU-usage bills from virtualized environments. In the comments, one 
individual mentions a VirtualBox VM spinning at 10-20% cpu just from changing 
that flag alone which seems mathematically unlikely, but is worth keeping an 
eye on and testing.

A Microsoft publication that largely reinforces the cautionary tale on power 
consumption can be found 
[here|http://download.microsoft.com/download/3/0/2/3027D574-C433-412A-A8B6-5E0A75D5B237/Timer-Resolution.docx].

With the cautionary tales on our rader, the impact on throughput and latency on 
the 2.2 branch on Windows is [fairly 
dramatic|https://docs.google.com/spreadsheets/d/1nqPhNwOVt0SU7b9lt9o4Tyl0Z1yDrV2oo7LbBPaFa6A/edit#gid=0].
 A couple of caveats on these #'s: I'm not completely 

[jira] [Commented] (CASSANDRA-9499) Introduce writeVInt method to DataOutputStreamPlus

2015-06-22 Thread Ariel Weisberg (JIRA)

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

Ariel Weisberg commented on CASSANDRA-9499:
---

I am +1 on Benedict's changes. I merged everything in and rebased C-9499 and 
C-9499-madness and both are passing.

 Introduce writeVInt method to DataOutputStreamPlus
 --

 Key: CASSANDRA-9499
 URL: https://issues.apache.org/jira/browse/CASSANDRA-9499
 Project: Cassandra
  Issue Type: Improvement
  Components: Core
Reporter: Benedict
Assignee: Ariel Weisberg
Priority: Minor
 Fix For: 3.0 beta 1


 CASSANDRA-8099 really could do with a writeVInt method, for both fixing 
 CASSANDRA-9498 but also efficiently encoding timestamp/deletion deltas. It 
 should be possible to make an especially efficient implementation against 
 BufferedDataOutputStreamPlus.



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


[jira] [Commented] (CASSANDRA-9625) GraphiteReporter not reporting

2015-06-22 Thread Nimi Wariboko Jr. (JIRA)

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

Nimi Wariboko Jr. commented on CASSANDRA-9625:
--

We are seeing this issue as well on single node. Our cluster has been upgraded 
to 2.1.6 - however for one node we enabled reporting on all the column family 
metrics. This is the only node the eventually stops reporting its metrics to 
graphite.

 GraphiteReporter not reporting
 --

 Key: CASSANDRA-9625
 URL: https://issues.apache.org/jira/browse/CASSANDRA-9625
 Project: Cassandra
  Issue Type: Bug
 Environment: Debian Jessie, 7u79-2.5.5-1~deb8u1, Cassandra 2.1.3
Reporter: Eric Evans
Assignee: T Jake Luciani
 Fix For: 2.1.x

 Attachments: metrics.yaml, thread-dump.log


 When upgrading from 2.1.3 to 2.1.6, the Graphite metrics reporter stops 
 working.  The usual startup is logged, and one batch of samples is sent, but 
 the reporting interval comes and goes, and no other samples are ever sent.  
 The logs are free from errors.
 Frustratingly, metrics reporting works in our smaller (staging) environment 
 on 2.1.6; We are able to reproduce this on all 6 of production nodes, but not 
 on a 3 node (otherwise identical) staging cluster (maybe it takes a certain 
 level of concurrency?).
 Attached is a thread dump, and our metrics.yaml.



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


[jira] [Resolved] (CASSANDRA-9634) Set kernel timer resolution on Windows

2015-06-22 Thread Joshua McKenzie (JIRA)

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

Joshua McKenzie resolved CASSANDRA-9634.

   Resolution: Fixed
Fix Version/s: (was: 2.2.x)
   2.2.0 rc2
 Reviewer: T Jake Luciani

Moved timer reso start to CassandraDaemon.activate and timer reso end to the 
StorageService.drainOnShutdown shutdown hook as well as removeShutdownHook in 
case the JVMStabilityInspector calls that.

Committed.

 Set kernel timer resolution on Windows
 --

 Key: CASSANDRA-9634
 URL: https://issues.apache.org/jira/browse/CASSANDRA-9634
 Project: Cassandra
  Issue Type: Improvement
Reporter: Joshua McKenzie
Assignee: Joshua McKenzie
  Labels: Windows, performance
 Fix For: 2.2.0 rc2


 In Windows 7/Server 2008 and to a similar extent Windows 8/Server 2012, the 
 kernel's internal time is set to an interval of 15.6ms. (Use 
 [clockres|https://technet.microsoft.com/en-us/sysinternals/bb897568.aspx] to 
 confirm current 'tick rate' on Windows). Win8/Server2012 have a tickless 
 kernel w/timer coalescing ([info 
 here|http://arstechnica.com/information-technology/2012/10/better-on-the-inside-under-the-hood-of-windows-8/2/])
  and the platform shows similar performance characteristics with C* to 
 Windows 7 with a slight edge in performance to win8/server 2012 in my testing 
 (the testing and results of which are outside the scope of this ticket).
 Some arguments against lowering the system's internal timer to 1ms are 
 [here|https://randomascii.wordpress.com/2013/07/08/windows-timer-resolution-megawatts-wasted/].
  These seem largely constrained to it'll drain your battery and it'll 
 prevent your processor from being as effective in sleep states. The 2nd is 
 somewhat of a concern as we don't want Windows users to all of a sudden have 
 increased CPU-usage bills from virtualized environments. In the comments, one 
 individual mentions a VirtualBox VM spinning at 10-20% cpu just from changing 
 that flag alone which seems mathematically unlikely, but is worth keeping an 
 eye on and testing.
 A Microsoft publication that largely reinforces the cautionary tale on power 
 consumption can be found 
 [here|http://download.microsoft.com/download/3/0/2/3027D574-C433-412A-A8B6-5E0A75D5B237/Timer-Resolution.docx].
 With the cautionary tales on our radar, the impact on throughput and latency 
 on the 2.2 branch on Windows is [fairly 
 dramatic|https://docs.google.com/spreadsheets/d/1nqPhNwOVt0SU7b9lt9o4Tyl0Z1yDrV2oo7LbBPaFa6A/edit#gid=0].
  A couple of caveats on these #'s: I'm not completely saturating the system 
 as the thread count is relatively low (keeping it consistent with other 
 testing where it *was* saturating), and the read #'s from our 2012 test 
 environment are not affected by this timer change while I see it on 3 other 
 bare-metal installations. The testing environment is new and we haven't 
 worked out the kinks yet, however the write / mixed illustrate the throughput 
 and latency #'s I've mentioned above; for reads the cpu's are sitting idle at 
 1-5% used by stress and C* so something else clearly needs to be addressed 
 there; I included them for completeness sake.
 Some preliminary testing on OpenStack indicates kernel-space syscall 
 saturation w/this patch that actually *degrades* performance, however the 
 unpatched performance numbers in our OpenStack environment are low enough 
 that I question their validity.
 Opening this ticket w/attached branch to get it on the radar / conversation 
 going, and I'm going to update this from being hard-coded to being a tunable 
 in the .yaml.
 Initial patch [available 
 here|https://github.com/apache/cassandra/compare/trunk...josh-mckenzie:2.2_WinTimer].



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


svn commit: r1686917 - in /cassandra/site: publish/download/index.html publish/index.html src/settings.py

2015-06-22 Thread jake
Author: jake
Date: Mon Jun 22 18:58:39 2015
New Revision: 1686917

URL: http://svn.apache.org/r1686917
Log:
new version

Modified:
cassandra/site/publish/download/index.html
cassandra/site/publish/index.html
cassandra/site/src/settings.py

Modified: cassandra/site/publish/download/index.html
URL: 
http://svn.apache.org/viewvc/cassandra/site/publish/download/index.html?rev=1686917r1=1686916r2=1686917view=diff
==
--- cassandra/site/publish/download/index.html (original)
+++ cassandra/site/publish/download/index.html Mon Jun 22 18:58:39 2015
@@ -53,20 +53,20 @@
   
 
   p
-  The bmost stable/b release of Apache Cassandra is 2.1.6
-  (released on 2015-06-08).  iIf you are looking for latest production ready 
Cassandra, download this one./i
+  The bmost stable/b release of Apache Cassandra is 2.1.7
+  (released on 2015-06-22).  iIf you are looking for latest production ready 
Cassandra, download this one./i
   /p
 
   ul
 li
 a class=filename 
-   
href=http://www.apache.org/dyn/closer.cgi?path=/cassandra/2.1.6/apache-cassandra-2.1.6-bin.tar.gz;
+   
href=http://www.apache.org/dyn/closer.cgi?path=/cassandra/2.1.7/apache-cassandra-2.1.7-bin.tar.gz;
onclick=javascript: 
pageTracker._trackPageview('/clicks/binary_download');
-  apache-cassandra-2.1.6-bin.tar.gz
+  apache-cassandra-2.1.7-bin.tar.gz
 /a
-[a 
href=http://www.apache.org/dist/cassandra/2.1.6/apache-cassandra-2.1.6-bin.tar.gz.asc;PGP/a]
-[a 
href=http://www.apache.org/dist/cassandra/2.1.6/apache-cassandra-2.1.6-bin.tar.gz.md5;MD5/a]
-[a 
href=http://www.apache.org/dist/cassandra/2.1.6/apache-cassandra-2.1.6-bin.tar.gz.sha1;SHA1/a]
+[a 
href=http://www.apache.org/dist/cassandra/2.1.7/apache-cassandra-2.1.7-bin.tar.gz.asc;PGP/a]
+[a 
href=http://www.apache.org/dist/cassandra/2.1.7/apache-cassandra-2.1.7-bin.tar.gz.md5;MD5/a]
+[a 
href=http://www.apache.org/dist/cassandra/2.1.7/apache-cassandra-2.1.7-bin.tar.gz.sha1;SHA1/a]
 /li
 li
 a href=http://wiki.apache.org/cassandra/DebianPackaging;Debian 
installation instructions/a
@@ -125,16 +125,16 @@
   p
   Previous stable branches of Cassandra continue to see periodic maintenance
   for some time after a new major release is made. The lastest release on the
-  2.0 branch is 2.0.15 (released on
-  2015-05-18).
+  2.0 branch is 2.0.16 (released on
+  2015-06-22).
   /p
 
   ul
 li
-a class=filename 
href=http://www.apache.org/dyn/closer.cgi?path=/cassandra/2.0.15/apache-cassandra-2.0.15-bin.tar.gz;apache-cassandra-2.0.15-bin.tar.gz/a
-[a 
href=http://www.apache.org/dist/cassandra/2.0.15/apache-cassandra-2.0.15-bin.tar.gz.asc;PGP/a]
-[a 
href=http://www.apache.org/dist/cassandra/2.0.15/apache-cassandra-2.0.15-bin.tar.gz.md5;MD5/a]
-[a 
href=http://www.apache.org/dist/cassandra/2.0.15/apache-cassandra-2.0.15-bin.tar.gz.sha1;SHA1/a]
+a class=filename 
href=http://www.apache.org/dyn/closer.cgi?path=/cassandra/2.0.16/apache-cassandra-2.0.16-bin.tar.gz;apache-cassandra-2.0.16-bin.tar.gz/a
+[a 
href=http://www.apache.org/dist/cassandra/2.0.16/apache-cassandra-2.0.16-bin.tar.gz.asc;PGP/a]
+[a 
href=http://www.apache.org/dist/cassandra/2.0.16/apache-cassandra-2.0.16-bin.tar.gz.md5;MD5/a]
+[a 
href=http://www.apache.org/dist/cassandra/2.0.16/apache-cassandra-2.0.16-bin.tar.gz.sha1;SHA1/a]
 /li
   /ul
   
@@ -167,20 +167,20 @@
   ul
 li
 a class=filename 
-   
href=http://www.apache.org/dyn/closer.cgi?path=/cassandra/2.1.6/apache-cassandra-2.1.6-src.tar.gz;
+   
href=http://www.apache.org/dyn/closer.cgi?path=/cassandra/2.1.7/apache-cassandra-2.1.7-src.tar.gz;
onclick=javascript: 
pageTracker._trackPageview('/clicks/source_download');
-  apache-cassandra-2.1.6-src.tar.gz
+  apache-cassandra-2.1.7-src.tar.gz
 /a
-[a 
href=http://www.apache.org/dist/cassandra/2.1.6/apache-cassandra-2.1.6-src.tar.gz.asc;PGP/a]
-[a 
href=http://www.apache.org/dist/cassandra/2.1.6/apache-cassandra-2.1.6-src.tar.gz.md5;MD5/a]
-[a 
href=http://www.apache.org/dist/cassandra/2.1.6/apache-cassandra-2.1.6-src.tar.gz.sha1;SHA1/a]
+[a 
href=http://www.apache.org/dist/cassandra/2.1.7/apache-cassandra-2.1.7-src.tar.gz.asc;PGP/a]
+[a 
href=http://www.apache.org/dist/cassandra/2.1.7/apache-cassandra-2.1.7-src.tar.gz.md5;MD5/a]
+[a 
href=http://www.apache.org/dist/cassandra/2.1.7/apache-cassandra-2.1.7-src.tar.gz.sha1;SHA1/a]
 /li
   
 li
-a class=filename 
href=http://www.apache.org/dyn/closer.cgi?path=/cassandra/2.0.15/apache-cassandra-2.0.15-src.tar.gz;apache-cassandra-2.0.15-src.tar.gz/a
-[a 
href=http://www.apache.org/dist/cassandra/2.0.15/apache-cassandra-2.0.15-src.tar.gz.asc;PGP/a]
-[a 
href=http://www.apache.org/dist/cassandra/2.0.15/apache-cassandra-2.0.15-src.tar.gz.md5;MD5/a]
-[a 

[jira] [Commented] (CASSANDRA-9634) Set kernel timer resolution on Windows

2015-06-22 Thread Andy Tolbert (JIRA)

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

Andy Tolbert commented on CASSANDRA-9634:
-

Ran a test on a c3.8xlarge Windows Server 2012 R2 instance in ec2 and observed 
([results|https://docs.google.com/spreadsheets/d/16uZEhin0Gpj0gJIQzjTi_f6OIfeWDIc8u_gDualI2r8/edit?usp=sharing])
 that there is a noticeable improvement (9-14%) using a clock interval of 1ms 
for write-based workloads.   Read and 50/50 mixed workloads did not seem to be 
impacted much (correlating with the description).   

I was able to keep CPU pretty busy, with up to 90% utilization with 500-800 
threads during writes with both clock resolutions.   I could not seem to exceed 
50% CPU utilization while running stress w/ read.  I think by using a 
linux-based stress client I was able to generate load more easily.  In 
addition, EC2s network throughput capabilities might have allowed me to 
generate more load as well.   

 Set kernel timer resolution on Windows
 --

 Key: CASSANDRA-9634
 URL: https://issues.apache.org/jira/browse/CASSANDRA-9634
 Project: Cassandra
  Issue Type: Improvement
Reporter: Joshua McKenzie
Assignee: Joshua McKenzie
  Labels: Windows, performance
 Fix For: 2.2.x


 In Windows 7/Server 2008 and to a similar extent Windows 8/Server 2012, the 
 kernel's internal time is set to an interval of 15.6ms. (Use 
 [clockres|https://technet.microsoft.com/en-us/sysinternals/bb897568.aspx] to 
 confirm current 'tick rate' on Windows). Win8/Server2012 have a tickless 
 kernel w/timer coalescing ([info 
 here|http://arstechnica.com/information-technology/2012/10/better-on-the-inside-under-the-hood-of-windows-8/2/])
  and the platform shows similar performance characteristics with C* to 
 Windows 7 with a slight edge in performance to win8/server 2012 in my testing 
 (the testing and results of which are outside the scope of this ticket).
 Some arguments against lowering the system's internal timer to 1ms are 
 [here|https://randomascii.wordpress.com/2013/07/08/windows-timer-resolution-megawatts-wasted/].
  These seem largely constrained to it'll drain your battery and it'll 
 prevent your processor from being as effective in sleep states. The 2nd is 
 somewhat of a concern as we don't want Windows users to all of a sudden have 
 increased CPU-usage bills from virtualized environments. In the comments, one 
 individual mentions a VirtualBox VM spinning at 10-20% cpu just from changing 
 that flag alone which seems mathematically unlikely, but is worth keeping an 
 eye on and testing.
 A Microsoft publication that largely reinforces the cautionary tale on power 
 consumption can be found 
 [here|http://download.microsoft.com/download/3/0/2/3027D574-C433-412A-A8B6-5E0A75D5B237/Timer-Resolution.docx].
 With the cautionary tales on our radar, the impact on throughput and latency 
 on the 2.2 branch on Windows is [fairly 
 dramatic|https://docs.google.com/spreadsheets/d/1nqPhNwOVt0SU7b9lt9o4Tyl0Z1yDrV2oo7LbBPaFa6A/edit#gid=0].
  A couple of caveats on these #'s: I'm not completely saturating the system 
 as the thread count is relatively low (keeping it consistent with other 
 testing where it *was* saturating), and the read #'s from our 2012 test 
 environment are not affected by this timer change while I see it on 3 other 
 bare-metal installations. The testing environment is new and we haven't 
 worked out the kinks yet, however the write / mixed illustrate the throughput 
 and latency #'s I've mentioned above; for reads the cpu's are sitting idle at 
 1-5% used by stress and C* so something else clearly needs to be addressed 
 there; I included them for completeness sake.
 Some preliminary testing on OpenStack indicates kernel-space syscall 
 saturation w/this patch that actually *degrades* performance, however the 
 unpatched performance numbers in our OpenStack environment are low enough 
 that I question their validity.
 Opening this ticket w/attached branch to get it on the radar / conversation 
 going, and I'm going to update this from being hard-coded to being a tunable 
 in the .yaml.
 Initial patch [available 
 here|https://github.com/apache/cassandra/compare/trunk...josh-mckenzie:2.2_WinTimer].



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


[jira] [Commented] (CASSANDRA-7342) CAS writes does not have hint functionality.

2015-06-22 Thread sankalp kohli (JIRA)

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

sankalp kohli commented on CASSANDRA-7342:
--

Can't we treat the RowMutation inside a Commit as normal mutation and just drop 
it into hints. If we do this, we won't be calling PaxosState.commit which won't 
call SystemKeyspace.savePaxosCommit(proposal);


 CAS writes does not have hint functionality. 
 -

 Key: CASSANDRA-7342
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7342
 Project: Cassandra
  Issue Type: Sub-task
Reporter: sankalp kohli
Assignee: sankalp kohli

 When a dead node comes up, it gets the last commit but not anything which it 
 has missed. 
 This reduces the durability of those writes compared to other writes. 



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


[jira] [Commented] (CASSANDRA-9628) Unknown keyspace system_traces exception when using nodetool on a new cluster

2015-06-22 Thread tzach (JIRA)

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

tzach commented on CASSANDRA-9628:
--

Retry with 2.1.6 and I see the same results.
More details on my setup:
* EC2, m3.large servers, with ubuntu 14.04
* Oracle Java 7 from ppa:webupd8team/java
* Installing Cassandra from deb http://debian.datastax.com/community stable main
* A cluster of two servers, both are seeds

When running nodetool status right after install I get (on both server)
{code}
ubuntu@ip-172-31-31-37:~$ nodetool status
error: Unknown keyspace system_traces
-- StackTrace --
java.lang.AssertionError: Unknown keyspace system_traces
at org.apache.cassandra.db.Keyspace.init(Keyspace.java:272)
at org.apache.cassandra.db.Keyspace.open(Keyspace.java:121)
at org.apache.cassandra.db.Keyspace.open(Keyspace.java:98)
at 
org.apache.cassandra.service.StorageService.getRangesForEndpoint(StorageService.java:3046)
at 
org.apache.cassandra.service.StorageService.effectiveOwnership(StorageService.java:3954)
at 
org.apache.cassandra.service.StorageService.effectiveOwnership(StorageService.java:175)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:75)
at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:279)
at 
com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:112)
at 
com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:46)
at 
com.sun.jmx.mbeanserver.MBeanIntrospector.invokeM(MBeanIntrospector.java:237)
at com.sun.jmx.mbeanserver.PerInterface.invoke(PerInterface.java:138)
at com.sun.jmx.mbeanserver.MBeanSupport.invoke(MBeanSupport.java:252)
at 
com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)
at 
com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)
at 
javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1487)
at 
javax.management.remote.rmi.RMIConnectionImpl.access$300(RMIConnectionImpl.java:97)
at 
javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1328)
at 
javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1420)
at 
javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:848)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:322)
at sun.rmi.transport.Transport$2.run(Transport.java:202)
at sun.rmi.transport.Transport$2.run(Transport.java:199)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:198)
at 
sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:567)
at 
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:828)
at 
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.access$400(TCPTransport.java:619)
at 
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler$1.run(TCPTransport.java:684)
at 
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler$1.run(TCPTransport.java:681)
at java.security.AccessController.doPrivileged(Native Method)
at 
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:681)
at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
{code}

To bypass I start a cqlsh, and input what ever:
{code}
cqlsh 172.31.31.37
Connected to CassandraCluster at 172.31.31.37:9042.
[cqlsh 5.0.1 | Cassandra 2.1.6 | CQL spec 3.2.0 | Native protocol v3]
Use HELP for help.
cqlsh  create keyspace temp WITH REPLICATION = { 'class' : 'SimpleStrategy', 
'replication_factor' : 2 };
cqlsh exit
{code}

After 

[jira] [Commented] (CASSANDRA-9490) testcase failure : testWithDeletes(org.apache.cassandra.io.sstable.SSTableMetadataTest):

2015-06-22 Thread Pallavi Bhardwaj (JIRA)

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

Pallavi Bhardwaj commented on CASSANDRA-9490:
-

Built the latest code on Cassandra-2.1, still the below test case is failing.

 [junit] Testcase: 
testWithDeletes(org.apache.cassandra.io.sstable.SSTableMetadataTest): FAILED
[junit] expected:1.374062677E9 but was:1.435035217E9
[junit] junit.framework.AssertionFailedError: expected:1.374062677E9 but 
was:1.435035217E9
[junit] at 
org.apache.cassandra.io.sstable.SSTableMetadataTest.testWithDeletes(SSTableMetadataTest.java:156)



 testcase failure : 
 testWithDeletes(org.apache.cassandra.io.sstable.SSTableMetadataTest):
 

 Key: CASSANDRA-9490
 URL: https://issues.apache.org/jira/browse/CASSANDRA-9490
 Project: Cassandra
  Issue Type: Bug
  Components: Tests
 Environment: Red Hat enterprise Linux ; Arch : PPC64le
Reporter: Pallavi Bhardwaj
 Fix For: 2.1.x


 While executing the unit test cases, I observed the following failure,
 [junit] Testcase: 
 testWithDeletes(org.apache.cassandra.io.sstable.SSTableMetadataTest): 
 FAILED
 [junit] expected:-2.038078123E9 but was:1.432716678E9
 [junit] junit.framework.AssertionFailedError: expected:-2.038078123E9 
 but was:1.432716678E9
 [junit] at 
 org.apache.cassandra.io.sstable.SSTableMetadataTest.testWithDeletes(SSTableMetadataTest.java:156)
 [junit]



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


[jira] [Commented] (CASSANDRA-7032) Improve vnode allocation

2015-06-22 Thread Branimir Lambov (JIRA)

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

Branimir Lambov commented on CASSANDRA-7032:


Done, including the static access change for the commitlog code.

[testall|http://cassci.datastax.com/view/Dev/view/blambov/job/blambov-7032-vnode-assignment-testall/]
 is OK, 
[dtest|http://cassci.datastax.com/view/Dev/view/blambov/job/blambov-7032-vnode-assignment-dtest/]
 includes an {{incremental_repair_test.TestIncRepair.sstable_repairedset_test}} 
which last failed ~20 builds ago on trunk.

 Improve vnode allocation
 

 Key: CASSANDRA-7032
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7032
 Project: Cassandra
  Issue Type: Improvement
  Components: Core
Reporter: Benedict
Assignee: Branimir Lambov
  Labels: performance, vnodes
 Fix For: 3.x

 Attachments: TestVNodeAllocation.java, TestVNodeAllocation.java, 
 TestVNodeAllocation.java, TestVNodeAllocation.java, TestVNodeAllocation.java, 
 TestVNodeAllocation.java


 It's been known for a little while that random vnode allocation causes 
 hotspots of ownership. It should be possible to improve dramatically on this 
 with deterministic allocation. I have quickly thrown together a simple greedy 
 algorithm that allocates vnodes efficiently, and will repair hotspots in a 
 randomly allocated cluster gradually as more nodes are added, and also 
 ensures that token ranges are fairly evenly spread between nodes (somewhat 
 tunably so). The allocation still permits slight discrepancies in ownership, 
 but it is bound by the inverse of the size of the cluster (as opposed to 
 random allocation, which strangely gets worse as the cluster size increases). 
 I'm sure there is a decent dynamic programming solution to this that would be 
 even better.
 If on joining the ring a new node were to CAS a shared table where a 
 canonical allocation of token ranges lives after running this (or a similar) 
 algorithm, we could then get guaranteed bounds on the ownership distribution 
 in a cluster. This will also help for CASSANDRA-6696.



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


[jira] [Updated] (CASSANDRA-9630) Killing cassandra process results in unclosed connections

2015-06-22 Thread Paulo Motta (JIRA)

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

Paulo Motta updated CASSANDRA-9630:
---
Description: 
After upgrading from Cassandra from 2.0.12 to 2.0.15, whenever we killed a 
cassandra process (with SIGTERM), some other nodes maintained a connection with 
the killed node in the CLOSE_WAIT state on port 7000 for about 5-20 minutes.

So, when we started the killed node again, other nodes could not establish a 
handshake because of the connections on the CLOSE_WAIT state, so they remained 
on the DOWN state to each other until the initial connection expired.

The problem did not happen if I ran a nodetool disablegossip before killing the 
node.

I was able to fix this issue by reverting the CASSANDRA-8336 commits (including 
CASSANDRA-9238). After reverting this, cassandra now closes connection 
correctly when killed with -TERM, but leaves connections on CLOSE_WAIT state if 
I run nodetool disablethrift before killing the nodes.

I did not try to reproduce the problem in a clean environment.

  was:
After upgrading from Cassandra from 2.0.12 to 2.0.15, whenever we killed a 
cassandra process (with SIGTERM), some other nodes maintained a connection with 
the killed node in the CLOSE_WAIT state on port 7000 for about 5-20 minutes.

So, when we started the killed node again, other nodes could not establish a 
handshake because of the connections on the CLOSE_WAIT state, so they remained 
on the DOWN state to each other until the initial connection expired.

The problem did not happen if I ran a nodetool disablegossip before killing the 
node.

I was able to fix this issue by reverting the CASSANDRA-8336 commits (including 
CASSANDRA-9238). After reverting this, cassandra now closes conenction 
correctly when killed with -TERM, but leaves connections on CLOSE_WAIT state if 
I run nodetool disablethrift before killing the nodes.

I did not try to reproduce the problem in a clean environment.


 Killing cassandra process results in unclosed connections
 -

 Key: CASSANDRA-9630
 URL: https://issues.apache.org/jira/browse/CASSANDRA-9630
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Reporter: Paulo Motta
Assignee: Brandon Williams

 After upgrading from Cassandra from 2.0.12 to 2.0.15, whenever we killed a 
 cassandra process (with SIGTERM), some other nodes maintained a connection 
 with the killed node in the CLOSE_WAIT state on port 7000 for about 5-20 
 minutes.
 So, when we started the killed node again, other nodes could not establish a 
 handshake because of the connections on the CLOSE_WAIT state, so they 
 remained on the DOWN state to each other until the initial connection expired.
 The problem did not happen if I ran a nodetool disablegossip before killing 
 the node.
 I was able to fix this issue by reverting the CASSANDRA-8336 commits 
 (including CASSANDRA-9238). After reverting this, cassandra now closes 
 connection correctly when killed with -TERM, but leaves connections on 
 CLOSE_WAIT state if I run nodetool disablethrift before killing the nodes.
 I did not try to reproduce the problem in a clean environment.



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


[jira] [Created] (CASSANDRA-9630) Killing cassandra process results in unclosed connections

2015-06-22 Thread Paulo Motta (JIRA)
Paulo Motta created CASSANDRA-9630:
--

 Summary: Killing cassandra process results in unclosed connections
 Key: CASSANDRA-9630
 URL: https://issues.apache.org/jira/browse/CASSANDRA-9630
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Reporter: Paulo Motta
Assignee: Brandon Williams


After upgrading from Cassandra from 2.0.12 to 2.0.15, whenever we killed a 
cassandra process (with SIGTERM), some other nodes maintained a connection with 
the killed node in the CLOSE_WAIT state on port 7000 for about 5-20 minutes.

So, when we started the killed node again, other nodes could not establish a 
handshake because of the connections on the CLOSE_WAIT state, so they remained 
on the DOWN state to each other until the initial connection expired.

The problem did not happen if I ran a nodetool disablegossip before killing the 
node.

I was able to fix this issue by reverting the CASSANDRA-8336 commits (including 
CASSANDRA-9238). After reverting this, cassandra now closes conenction 
correctly when killed with -TERM, but leaves connections on CLOSE_WAIT state if 
I run nodetool disablethrift before killing the nodes.

I did not try to reproduce the problem in a clean environment.



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


[jira] [Updated] (CASSANDRA-9631) Unnecessary required filtering for query on indexed clustering key

2015-06-22 Thread Kevin Deldycke (JIRA)

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

Kevin Deldycke updated CASSANDRA-9631:
--
Description: 
Let's create and populate a simple table composed of one partition key {{a}}, 
two clustering keys {{b}}  {{c}}, and one secondary index on a standard column 
{{e}}:

{code:sql}
$ cqlsh 127.0.0.1
Connected to test21 at 127.0.0.1:9160.
[cqlsh 4.1.1 | Cassandra 2.1.6-SNAPSHOT | CQL spec 3.1.1 | Thrift protocol 
19.39.0]
Use HELP for help.
cqlsh CREATE KEYSPACE test WITH REPLICATION={'class': 'SimpleStrategy', 
'replication_factor': 3};
cqlsh CREATE TABLE test.table1 (
   ... a int,
   ... b int,
   ... c int,
   ... d int,
   ... e int,
   ... PRIMARY KEY (a, b, c)
   ... );
cqlsh CREATE INDEX table1_e ON test.table1 (e);
cqlsh INSERT INTO test.table1 (a, b, c, d, e) VALUES (1, 1, 1, 1, 1);
(...)
cqlsh SELECT * FROM test.table1;

 a | b | c | d | e
---+---+---+---+---
 1 | 1 | 1 | 1 | 1
 1 | 1 | 2 | 2 | 2
 1 | 1 | 3 | 3 | 3
 1 | 2 | 1 | 1 | 3
 1 | 3 | 1 | 1 | 1
 2 | 4 | 1 | 1 | 1

(6 rows)
{code}

With such a schema, I am allowed to query on the indexed column without 
filtering by providing the first two elements of the primary key:
{code:sql}
cqlsh SELECT * FROM test.table1 WHERE a=1 AND b=1 AND e=3;

 a | b | c | d | e
---+---+---+---+---
 1 | 1 | 3 | 3 | 3

(1 rows)
{code}

Let's now introduce an index on the first clustering key:
{code:sql}
cqlsh CREATE INDEX table1_b ON test.table1 (b);
{code}

Now, I expect the same query as above to work without filtering, but it's not:
{code:sql}
cqlsh SELECT * FROM test.unindexed_table WHERE a=1 AND b=1 AND e=3;
Bad Request: Cannot execute this query as it might involve data filtering and 
thus may have unpredictable performance. If you want to execute this query 
despite the performance unpredictability, use ALLOW FILTERING
{code}

I think this is a bug on the way secondary indexes are accounted for when 
checking for unfiltered queries.

  was:
Let's create and populate a simple table composed of one partition key {{a}}, 
two clustering keys {{b}}  {{c}}, and one secondary index on a standard column 
{{e}}:

{code:sql}
$ cqlsh 127.0.0.1
Connected to test21 at 127.0.0.1:9160.
[cqlsh 4.1.1 | Cassandra 2.1.6-SNAPSHOT | CQL spec 3.1.1 | Thrift protocol 
19.39.0]
Use HELP for help.
cqlsh CREATE KEYSPACE test WITH REPLICATION={'class': 'SimpleStrategy', 
'replication_factor': 3};
cqlsh CREATE TABLE test.table1 (
   ... a int,
   ... b int,
   ... c int,
   ... d int,
   ... e int,
   ... PRIMARY KEY (a, b, c)
   ... );
cqlsh CREATE INDEX table1_e ON test.table1 (e);
cqlsh INSERT INTO test.table1 (a, b, c, d, e) VALUES (1, 1, 1, 1, 1);
(...)
cqlsh SELECT * FROM test.table1;

 a | b | c | d | e
---+---+---+---+---
 1 | 1 | 1 | 1 | 1
 1 | 1 | 2 | 2 | 2
 1 | 1 | 3 | 3 | 3
 1 | 2 | 1 | 1 | 3
 1 | 3 | 1 | 1 | 1
 2 | 4 | 1 | 1 | 1

(7 rows)
{code}

With such a schema, I am allowed to query on the indexed column without 
filtering by providing the first two elements of the primary key:
{code:sql}
cqlsh SELECT * FROM test.table1 WHERE a=1 AND b=1 AND e=3;

 a | b | c | d | e
---+---+---+---+---
 1 | 1 | 3 | 3 | 3

(1 rows)
{code}

Let's now introduce an index on the first clustering key:
{code:sql}
cqlsh CREATE INDEX table1_b ON test.table1 (b);
{code}

Now, I expect the same query as above to work without filtering, but it's not:
{code:sql}
cqlsh SELECT * FROM test.unindexed_table WHERE a=1 AND b=1 AND e=3;
Bad Request: Cannot execute this query as it might involve data filtering and 
thus may have unpredictable performance. If you want to execute this query 
despite the performance unpredictability, use ALLOW FILTERING
{code}

I think this is a bug on the way secondary indexes are accounted for when 
checking for unfiltered queries.


 Unnecessary required filtering for query on indexed clustering key
 --

 Key: CASSANDRA-9631
 URL: https://issues.apache.org/jira/browse/CASSANDRA-9631
 Project: Cassandra
  Issue Type: Bug
  Components: Core
 Environment: Cassandra 2.1.6 vanilla; 3-node local cluster; OSX 
 Yosemite 10.10.3; Installed with CCM.
Reporter: Kevin Deldycke
  Labels: CQL, query, secondaryIndex

 Let's create and populate a simple table composed of one partition key {{a}}, 
 two clustering keys {{b}}  {{c}}, and one secondary index on a standard 
 column {{e}}:
 {code:sql}
 $ cqlsh 127.0.0.1
 Connected to test21 at 127.0.0.1:9160.
 [cqlsh 4.1.1 | Cassandra 2.1.6-SNAPSHOT | CQL spec 3.1.1 | Thrift protocol 
 19.39.0]
 Use HELP for help.
 cqlsh CREATE KEYSPACE test WITH REPLICATION={'class': 'SimpleStrategy', 
 'replication_factor': 3};
 cqlsh CREATE TABLE test.table1 (
... a int,
... b int,
... c int,
... d 

  1   2   >