[jira] [Commented] (CASSANDRA-7968) permissions_validity_in_ms should be settable via JMX

2014-09-17 Thread Benedict (JIRA)

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

Benedict commented on CASSANDRA-7968:
-

Well, let's do it then, and just make sure anyone who cares about compliance 
realises they need to run JMX over SSL with authentication

> permissions_validity_in_ms should be settable via JMX
> -
>
> Key: CASSANDRA-7968
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7968
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Core
>Reporter: Brandon Williams
>Assignee: Brandon Williams
>Priority: Minor
> Fix For: 2.0.11, 2.1.1
>
> Attachments: 7968.txt
>
>
> Oftentimes people don't think about auth problems and just run with the 
> default of RF=2 and 2000ms until it's too late, and at that point doing a 
> rolling restart to change the permissions cache can be a bit painful vs 
> setting it via JMX everywhere and then updating the yaml for future restarts.



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


[jira] [Commented] (CASSANDRA-6904) commitlog segments may not be archived after restart

2014-09-17 Thread Benedict (JIRA)

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

Benedict commented on CASSANDRA-6904:
-

As discussed on CASSANDRA-7965, we could simply archive all commit logs present 
on restart. This runs the risk of repeatedly archiving commit logs if we fail 
repeatedly on restart for some reason, so may be undesirable. However we can 
avoid replaying the same CLS twice in 2.1 since we retain the original id in 
the header.

> commitlog segments may not be archived after restart
> 
>
> Key: CASSANDRA-6904
> URL: https://issues.apache.org/jira/browse/CASSANDRA-6904
> Project: Cassandra
>  Issue Type: Bug
>  Components: Core
>Reporter: Jonathan Ellis
> Fix For: 2.1.1
>
>
> commitlog segments are archived when they are full, so the current active 
> segment will not be archived on restart (and its contents will not be 
> available for pitr).



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


[jira] [Commented] (CASSANDRA-7968) permissions_validity_in_ms should be settable via JMX

2014-09-17 Thread Aleksey Yeschenko (JIRA)

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

Aleksey Yeschenko commented on CASSANDRA-7968:
--

The goal as requested by the particular user is to raise it without having to 
shut down several hundred nodes to change a single yaml config.

> permissions_validity_in_ms should be settable via JMX
> -
>
> Key: CASSANDRA-7968
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7968
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Core
>Reporter: Brandon Williams
>Assignee: Brandon Williams
>Priority: Minor
> Fix For: 2.0.11, 2.1.1
>
> Attachments: 7968.txt
>
>
> Oftentimes people don't think about auth problems and just run with the 
> default of RF=2 and 2000ms until it's too late, and at that point doing a 
> rolling restart to change the permissions cache can be a bit painful vs 
> setting it via JMX everywhere and then updating the yaml for future restarts.



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


[jira] [Resolved] (CASSANDRA-7965) Active commit log doesn't get archived on Cassandra restart

2014-09-17 Thread Benedict (JIRA)

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

Benedict resolved CASSANDRA-7965.
-
   Resolution: Duplicate
Reproduced In: 2.0.10, 2.0.9  (was: 2.0.9, 2.0.10)

> Active commit log doesn't get archived on Cassandra restart
> ---
>
> Key: CASSANDRA-7965
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7965
> Project: Cassandra
>  Issue Type: Bug
>Reporter: Max Barnash
>
> After a restart Cassandra replays and recycles all present commit logs. 
> Because active commit log never gets archived, we lose some of the data from 
> the archives.
> One of the ways to fix this would be archiving all commit logs at startup 
> before replaying and recycling them.



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


[jira] [Commented] (CASSANDRA-7968) permissions_validity_in_ms should be settable via JMX

2014-09-17 Thread Benedict (JIRA)

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

Benedict commented on CASSANDRA-7968:
-

Presumably the main goal of this function is to _reduce_ the window? So perhaps 
we support only that direction (or perhaps a raise to within the config defined 
value)

> permissions_validity_in_ms should be settable via JMX
> -
>
> Key: CASSANDRA-7968
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7968
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Core
>Reporter: Brandon Williams
>Assignee: Brandon Williams
>Priority: Minor
> Fix For: 2.0.11, 2.1.1
>
> Attachments: 7968.txt
>
>
> Oftentimes people don't think about auth problems and just run with the 
> default of RF=2 and 2000ms until it's too late, and at that point doing a 
> rolling restart to change the permissions cache can be a bit painful vs 
> setting it via JMX everywhere and then updating the yaml for future restarts.



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


[jira] [Commented] (CASSANDRA-7968) permissions_validity_in_ms should be settable via JMX

2014-09-17 Thread Benedict (JIRA)

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

Benedict commented on CASSANDRA-7968:
-

Well, before having their permissions revoked somebody could increase the 
permission_validity_ms dramatically, retaining them past their permitted 
window, breaking compliance.

> permissions_validity_in_ms should be settable via JMX
> -
>
> Key: CASSANDRA-7968
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7968
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Core
>Reporter: Brandon Williams
>Assignee: Brandon Williams
>Priority: Minor
> Fix For: 2.0.11, 2.1.1
>
> Attachments: 7968.txt
>
>
> Oftentimes people don't think about auth problems and just run with the 
> default of RF=2 and 2000ms until it's too late, and at that point doing a 
> rolling restart to change the permissions cache can be a bit painful vs 
> setting it via JMX everywhere and then updating the yaml for future restarts.



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


[jira] [Commented] (CASSANDRA-7968) permissions_validity_in_ms should be settable via JMX

2014-09-17 Thread Aleksey Yeschenko (JIRA)

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

Aleksey Yeschenko commented on CASSANDRA-7968:
--

I don't really see how that's the case.

> permissions_validity_in_ms should be settable via JMX
> -
>
> Key: CASSANDRA-7968
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7968
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Core
>Reporter: Brandon Williams
>Assignee: Brandon Williams
>Priority: Minor
> Fix For: 2.0.11, 2.1.1
>
> Attachments: 7968.txt
>
>
> Oftentimes people don't think about auth problems and just run with the 
> default of RF=2 and 2000ms until it's too late, and at that point doing a 
> rolling restart to change the permissions cache can be a bit painful vs 
> setting it via JMX everywhere and then updating the yaml for future restarts.



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


[jira] [Commented] (CASSANDRA-7968) permissions_validity_in_ms should be settable via JMX

2014-09-17 Thread Benedict (JIRA)

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

Benedict commented on CASSANDRA-7968:
-

Well, it depends what you mean by deeper trouble. I don't think anybody with 
access to JMX can get access to any raw data, so you won't be at any risk of 
breaking a data policy or data _laws_. This potentially introduces that risk

> permissions_validity_in_ms should be settable via JMX
> -
>
> Key: CASSANDRA-7968
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7968
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Core
>Reporter: Brandon Williams
>Assignee: Brandon Williams
>Priority: Minor
> Fix For: 2.0.11, 2.1.1
>
> Attachments: 7968.txt
>
>
> Oftentimes people don't think about auth problems and just run with the 
> default of RF=2 and 2000ms until it's too late, and at that point doing a 
> rolling restart to change the permissions cache can be a bit painful vs 
> setting it via JMX everywhere and then updating the yaml for future restarts.



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


[jira] [Commented] (CASSANDRA-7968) permissions_validity_in_ms should be settable via JMX

2014-09-17 Thread Aleksey Yeschenko (JIRA)

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

Aleksey Yeschenko commented on CASSANDRA-7968:
--

bq. Isn't this a security flaw?

You mean someone increasing the validity period? I'd say it's no big deal. Or, 
rather, that if someone who shouldn't have JMX access to your nodes has it, you 
are in much deeper trouble.

> permissions_validity_in_ms should be settable via JMX
> -
>
> Key: CASSANDRA-7968
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7968
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Core
>Reporter: Brandon Williams
>Assignee: Brandon Williams
>Priority: Minor
> Fix For: 2.0.11, 2.1.1
>
> Attachments: 7968.txt
>
>
> Oftentimes people don't think about auth problems and just run with the 
> default of RF=2 and 2000ms until it's too late, and at that point doing a 
> rolling restart to change the permissions cache can be a bit painful vs 
> setting it via JMX everywhere and then updating the yaml for future restarts.



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


[jira] [Comment Edited] (CASSANDRA-7968) permissions_validity_in_ms should be settable via JMX

2014-09-17 Thread Benedict (JIRA)

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

Benedict edited comment on CASSANDRA-7968 at 9/18/14 6:38 AM:
--

-Isn't this a security flaw?- edit: I see we support authentication over JMX, 
but it still leaves me a little uncomfortable; if we're not accepting commands 
like this only over authenticated, SSL'd JMX connections, it leaves this open 
to exploit. Probably not a big deal, but still a slight potential security risk


was (Author: benedict):
Isn't this a security flaw?

> permissions_validity_in_ms should be settable via JMX
> -
>
> Key: CASSANDRA-7968
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7968
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Core
>Reporter: Brandon Williams
>Assignee: Brandon Williams
>Priority: Minor
> Fix For: 2.0.11, 2.1.1
>
> Attachments: 7968.txt
>
>
> Oftentimes people don't think about auth problems and just run with the 
> default of RF=2 and 2000ms until it's too late, and at that point doing a 
> rolling restart to change the permissions cache can be a bit painful vs 
> setting it via JMX everywhere and then updating the yaml for future restarts.



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


[jira] [Commented] (CASSANDRA-7968) permissions_validity_in_ms should be settable via JMX

2014-09-17 Thread Benedict (JIRA)

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

Benedict commented on CASSANDRA-7968:
-

Isn't this a security flaw?

> permissions_validity_in_ms should be settable via JMX
> -
>
> Key: CASSANDRA-7968
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7968
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Core
>Reporter: Brandon Williams
>Assignee: Brandon Williams
>Priority: Minor
> Fix For: 2.0.11, 2.1.1
>
> Attachments: 7968.txt
>
>
> Oftentimes people don't think about auth problems and just run with the 
> default of RF=2 and 2000ms until it's too late, and at that point doing a 
> rolling restart to change the permissions cache can be a bit painful vs 
> setting it via JMX everywhere and then updating the yaml for future restarts.



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


[jira] [Commented] (CASSANDRA-7968) permissions_validity_in_ms should be settable via JMX

2014-09-17 Thread Aleksey Yeschenko (JIRA)

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

Aleksey Yeschenko commented on CASSANDRA-7968:
--

+1

Nits:
- a bunch of unused imports left over in ClientState, o.a.c.u.Pair import in 
the wrong place in Auth
- Auth#initPermissionsCache() should be made private, and (subjective 
preference) accept the previous cache (or null) as an argument instead of 
accessing Auth.permissionsCache

> permissions_validity_in_ms should be settable via JMX
> -
>
> Key: CASSANDRA-7968
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7968
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Core
>Reporter: Brandon Williams
>Assignee: Brandon Williams
>Priority: Minor
> Fix For: 2.0.11, 2.1.1
>
> Attachments: 7968.txt
>
>
> Oftentimes people don't think about auth problems and just run with the 
> default of RF=2 and 2000ms until it's too late, and at that point doing a 
> rolling restart to change the permissions cache can be a bit painful vs 
> setting it via JMX everywhere and then updating the yaml for future restarts.



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


[jira] [Updated] (CASSANDRA-7930) Warn when evicting prepared statements from cache

2014-09-17 Thread Aleksey Yeschenko (JIRA)

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

Aleksey Yeschenko updated CASSANDRA-7930:
-
Reviewer: Aleksey Yeschenko  (was: Tyler Hobbs)

> Warn when evicting prepared statements from cache
> -
>
> Key: CASSANDRA-7930
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7930
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Core
>Reporter: Robbie Strickland
>Assignee: Robbie Strickland
>  Labels: bootcamp, jmx
> Attachments: cassandra-2.0-v2.txt, cassandra-2.0-v3.txt, 
> cassandra-2.0-v4.txt, cassandra-2.0-v5.txt, cassandra-2.0-v6.txt, 
> cassandra-2.0.txt, cassandra-2.1.txt
>
>
> The prepared statement cache is an LRU, with a max size of maxMemory / 256.  
> There is currently no warning when statements are evicted, which could be 
> problematic if the user is unaware that this is happening.
> At the very least, we should provide a JMX metric and possibly a log message 
> indicating this is happening.  At some point it may also be worthwhile to 
> make this tunable for users with large numbers of statements.



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


[jira] [Updated] (CASSANDRA-7921) Provide visibility into prepared statement churn

2014-09-17 Thread Aleksey Yeschenko (JIRA)

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

Aleksey Yeschenko updated CASSANDRA-7921:
-
Labels: bootcamp  (was: )

> Provide visibility into prepared statement churn
> 
>
> Key: CASSANDRA-7921
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7921
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Core
>Reporter: Nate McCall
>Assignee: Nate McCall
>Priority: Minor
>  Labels: bootcamp
> Fix For: 2.1.1
>
> Attachments: 7921-ps-churn.txt
>
>
> Some JDBC drivers provide visibility into the preparedstatement cache in such 
> a way as to track churn. It would be nice to have this added to 
> CqlStatementMetrics



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


[1/2] git commit: Provide visibility into prepared statements churn

2014-09-17 Thread aleksey
Repository: cassandra
Updated Branches:
  refs/heads/trunk 674808340 -> d57890ca6


Provide visibility into prepared statements churn

patch by Nate McCall; reviewed by Aleksey Yeschenko for CASSANDRA-7921


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

Branch: refs/heads/trunk
Commit: 5ba1f80a2509e8301bcda3502f9757ca1bbfda55
Parents: dfe1f23
Author: Nate McCall 
Authored: Wed Sep 17 22:57:44 2014 -0700
Committer: Aleksey Yeschenko 
Committed: Wed Sep 17 22:57:44 2014 -0700

--
 CHANGES.txt| 1 +
 src/java/org/apache/cassandra/cql3/QueryProcessor.java | 2 ++
 src/java/org/apache/cassandra/metrics/CQLMetrics.java  | 3 +++
 test/unit/org/apache/cassandra/metrics/CQLMetricsTest.java | 1 +
 4 files changed, 7 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/5ba1f80a/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 4619bee..5125c77 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.1.1
+ * Provide visibility into prepared statements churn (CASSANDRA-7921)
  * Invalidate prepared statements when their keyspace or table is
dropped (CASSANDRA-7566)
  * cassandra-stress: fix support for NetworkTopologyStrategy (CASSANDRA-7945)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/5ba1f80a/src/java/org/apache/cassandra/cql3/QueryProcessor.java
--
diff --git a/src/java/org/apache/cassandra/cql3/QueryProcessor.java 
b/src/java/org/apache/cassandra/cql3/QueryProcessor.java
index 419a3e1..8744db4 100644
--- a/src/java/org/apache/cassandra/cql3/QueryProcessor.java
+++ b/src/java/org/apache/cassandra/cql3/QueryProcessor.java
@@ -99,6 +99,7 @@ public class QueryProcessor implements QueryHandler
  {
  public void onEviction(MD5Digest md5Digest, 
ParsedStatement.Prepared prepared)
  {
+ metrics.preparedStatementsEvicted.inc();
  }
  }).build();
 
@@ -109,6 +110,7 @@ public class QueryProcessor implements QueryHandler
{
public void onEviction(Integer integer, 
CQLStatement cqlStatement)
{
+   
metrics.preparedStatementsEvicted.inc();
}
})
.build();

http://git-wip-us.apache.org/repos/asf/cassandra/blob/5ba1f80a/src/java/org/apache/cassandra/metrics/CQLMetrics.java
--
diff --git a/src/java/org/apache/cassandra/metrics/CQLMetrics.java 
b/src/java/org/apache/cassandra/metrics/CQLMetrics.java
index 79a8e10..a7076dd 100644
--- a/src/java/org/apache/cassandra/metrics/CQLMetrics.java
+++ b/src/java/org/apache/cassandra/metrics/CQLMetrics.java
@@ -29,6 +29,7 @@ public class CQLMetrics
 
 public final Counter regularStatementsExecuted;
 public final Counter preparedStatementsExecuted;
+public final Counter preparedStatementsEvicted;
 
 public final Gauge preparedStatementsCount;
 public final Gauge preparedStatementsRatio;
@@ -37,6 +38,8 @@ public class CQLMetrics
 {
 regularStatementsExecuted = 
Metrics.newCounter(factory.createMetricName("RegularStatementsExecuted"));
 preparedStatementsExecuted = 
Metrics.newCounter(factory.createMetricName("PreparedStatementsExecuted"));
+preparedStatementsEvicted = 
Metrics.newCounter(factory.createMetricName("PreparedStatementsEvicted"));
+
 preparedStatementsCount = 
Metrics.newGauge(factory.createMetricName("PreparedStatementsCount"), new 
Gauge()
 {
 public Integer value()

http://git-wip-us.apache.org/repos/asf/cassandra/blob/5ba1f80a/test/unit/org/apache/cassandra/metrics/CQLMetricsTest.java
--
diff --git a/test/unit/org/apache/cassandra/metrics/CQLMetricsTest.java 
b/test/unit/org/apache/cassandra/metrics/CQLMetricsTest.java
index 91abf86..88104a6 100644
--- a/test/unit/org/apache/cassandra/metrics/CQLMetricsTest.java
+++ b/test/unit/org/apache/cassandra/metrics/CQLMetricsTest.java
@@ -119,6 +119,7 @@ public class CQLMetricsTest extends SchemaLoader
 {
 QueryProcessor.metrics.preparedStatementsExecuted.clear();
 QueryPr

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

2014-09-17 Thread aleksey
Merge branch 'cassandra-2.1' into trunk


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

Branch: refs/heads/trunk
Commit: d57890ca6112872524e6f830815549e179d0157d
Parents: 6748083 5ba1f80
Author: Aleksey Yeschenko 
Authored: Wed Sep 17 22:58:44 2014 -0700
Committer: Aleksey Yeschenko 
Committed: Wed Sep 17 22:58:44 2014 -0700

--
 CHANGES.txt| 1 +
 src/java/org/apache/cassandra/cql3/QueryProcessor.java | 2 ++
 src/java/org/apache/cassandra/metrics/CQLMetrics.java  | 3 +++
 test/unit/org/apache/cassandra/metrics/CQLMetricsTest.java | 1 +
 4 files changed, 7 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/d57890ca/CHANGES.txt
--
diff --cc CHANGES.txt
index 5fd51ba,5125c77..77830f7
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,29 -1,5 +1,30 @@@
 +3.0
 + * Make assassinate a first class command (CASSANDRA-7935)
 + * Support IN clause on any clustering column (CASSANDRA-4762)
 + * Improve compaction logging (CASSANDRA-7818)
 + * Remove YamlFileNetworkTopologySnitch (CASSANDRA-7917)
 + * Support Java source code for user-defined functions (CASSANDRA-7562)
 + * Require arg types to disambiguate UDF drops (CASSANDRA-7812)
 + * Do anticompaction in groups (CASSANDRA-6851)
 + * Verify that UDF class methods are static (CASSANDRA-7781)
 + * Support pure user-defined functions (CASSANDRA-7395, 7740)
 + * Permit configurable timestamps with cassandra-stress (CASSANDRA-7416)
 + * Move sstable RandomAccessReader to nio2, which allows using the
 +   FILE_SHARE_DELETE flag on Windows (CASSANDRA-4050)
 + * Remove CQL2 (CASSANDRA-5918)
 + * Add Thrift get_multi_slice call (CASSANDRA-6757)
 + * Optimize fetching multiple cells by name (CASSANDRA-6933)
 + * Allow compilation in java 8 (CASSANDRA-7028)
 + * Make incremental repair default (CASSANDRA-7250)
 + * Enable code coverage thru JaCoCo (CASSANDRA-7226)
 + * Switch external naming of 'column families' to 'tables' (CASSANDRA-4369) 
 + * Shorten SSTable path (CASSANDRA-6962)
 + * Use unsafe mutations for most unit tests (CASSANDRA-6969)
 + * Fix race condition during calculation of pending ranges (CASSANDRA-7390)
 +
 +
  2.1.1
+  * Provide visibility into prepared statements churn (CASSANDRA-7921)
   * Invalidate prepared statements when their keyspace or table is
 dropped (CASSANDRA-7566)
   * cassandra-stress: fix support for NetworkTopologyStrategy (CASSANDRA-7945)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/d57890ca/src/java/org/apache/cassandra/cql3/QueryProcessor.java
--



git commit: Provide visibility into prepared statements churn

2014-09-17 Thread aleksey
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-2.1 dfe1f2351 -> 5ba1f80a2


Provide visibility into prepared statements churn

patch by Nate McCall; reviewed by Aleksey Yeschenko for CASSANDRA-7921


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

Branch: refs/heads/cassandra-2.1
Commit: 5ba1f80a2509e8301bcda3502f9757ca1bbfda55
Parents: dfe1f23
Author: Nate McCall 
Authored: Wed Sep 17 22:57:44 2014 -0700
Committer: Aleksey Yeschenko 
Committed: Wed Sep 17 22:57:44 2014 -0700

--
 CHANGES.txt| 1 +
 src/java/org/apache/cassandra/cql3/QueryProcessor.java | 2 ++
 src/java/org/apache/cassandra/metrics/CQLMetrics.java  | 3 +++
 test/unit/org/apache/cassandra/metrics/CQLMetricsTest.java | 1 +
 4 files changed, 7 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/5ba1f80a/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 4619bee..5125c77 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.1.1
+ * Provide visibility into prepared statements churn (CASSANDRA-7921)
  * Invalidate prepared statements when their keyspace or table is
dropped (CASSANDRA-7566)
  * cassandra-stress: fix support for NetworkTopologyStrategy (CASSANDRA-7945)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/5ba1f80a/src/java/org/apache/cassandra/cql3/QueryProcessor.java
--
diff --git a/src/java/org/apache/cassandra/cql3/QueryProcessor.java 
b/src/java/org/apache/cassandra/cql3/QueryProcessor.java
index 419a3e1..8744db4 100644
--- a/src/java/org/apache/cassandra/cql3/QueryProcessor.java
+++ b/src/java/org/apache/cassandra/cql3/QueryProcessor.java
@@ -99,6 +99,7 @@ public class QueryProcessor implements QueryHandler
  {
  public void onEviction(MD5Digest md5Digest, 
ParsedStatement.Prepared prepared)
  {
+ metrics.preparedStatementsEvicted.inc();
  }
  }).build();
 
@@ -109,6 +110,7 @@ public class QueryProcessor implements QueryHandler
{
public void onEviction(Integer integer, 
CQLStatement cqlStatement)
{
+   
metrics.preparedStatementsEvicted.inc();
}
})
.build();

http://git-wip-us.apache.org/repos/asf/cassandra/blob/5ba1f80a/src/java/org/apache/cassandra/metrics/CQLMetrics.java
--
diff --git a/src/java/org/apache/cassandra/metrics/CQLMetrics.java 
b/src/java/org/apache/cassandra/metrics/CQLMetrics.java
index 79a8e10..a7076dd 100644
--- a/src/java/org/apache/cassandra/metrics/CQLMetrics.java
+++ b/src/java/org/apache/cassandra/metrics/CQLMetrics.java
@@ -29,6 +29,7 @@ public class CQLMetrics
 
 public final Counter regularStatementsExecuted;
 public final Counter preparedStatementsExecuted;
+public final Counter preparedStatementsEvicted;
 
 public final Gauge preparedStatementsCount;
 public final Gauge preparedStatementsRatio;
@@ -37,6 +38,8 @@ public class CQLMetrics
 {
 regularStatementsExecuted = 
Metrics.newCounter(factory.createMetricName("RegularStatementsExecuted"));
 preparedStatementsExecuted = 
Metrics.newCounter(factory.createMetricName("PreparedStatementsExecuted"));
+preparedStatementsEvicted = 
Metrics.newCounter(factory.createMetricName("PreparedStatementsEvicted"));
+
 preparedStatementsCount = 
Metrics.newGauge(factory.createMetricName("PreparedStatementsCount"), new 
Gauge()
 {
 public Integer value()

http://git-wip-us.apache.org/repos/asf/cassandra/blob/5ba1f80a/test/unit/org/apache/cassandra/metrics/CQLMetricsTest.java
--
diff --git a/test/unit/org/apache/cassandra/metrics/CQLMetricsTest.java 
b/test/unit/org/apache/cassandra/metrics/CQLMetricsTest.java
index 91abf86..88104a6 100644
--- a/test/unit/org/apache/cassandra/metrics/CQLMetricsTest.java
+++ b/test/unit/org/apache/cassandra/metrics/CQLMetricsTest.java
@@ -119,6 +119,7 @@ public class CQLMetricsTest extends SchemaLoader
 {
 QueryProcessor.metrics.preparedStatementsExecuted.clear();

[jira] [Resolved] (CASSANDRA-7967) Include schema_triggers CF in readable system resources

2014-09-17 Thread Aleksey Yeschenko (JIRA)

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

Aleksey Yeschenko resolved CASSANDRA-7967.
--
Resolution: Fixed

Committed, thanks.

> Include schema_triggers CF in readable system resources
> ---
>
> Key: CASSANDRA-7967
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7967
> Project: Cassandra
>  Issue Type: Bug
>  Components: Core
>Reporter: Adam Holmberg
>Assignee: Adam Holmberg
> Fix For: 2.0.11, 2.1.1
>
> Attachments: schema_triggers_readable.txt
>
>
> SCHEMA_TRIGGERS_CF is missing from readable system resources.
> This makes tools, which attempt to read schema information, fail when 
> authorization is enabled.
> Patch attached.



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


[jira] [Updated] (CASSANDRA-7967) Include schema_triggers CF in readable system resources

2014-09-17 Thread Aleksey Yeschenko (JIRA)

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

Aleksey Yeschenko updated CASSANDRA-7967:
-
Assignee: Adam Holmberg

> Include schema_triggers CF in readable system resources
> ---
>
> Key: CASSANDRA-7967
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7967
> Project: Cassandra
>  Issue Type: Bug
>  Components: Core
>Reporter: Adam Holmberg
>Assignee: Adam Holmberg
> Fix For: 2.0.11, 2.1.1
>
> Attachments: schema_triggers_readable.txt
>
>
> SCHEMA_TRIGGERS_CF is missing from readable system resources.
> This makes tools, which attempt to read schema information, fail when 
> authorization is enabled.
> Patch attached.



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


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

2014-09-17 Thread aleksey
Merge branch 'cassandra-2.1' into trunk


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

Branch: refs/heads/trunk
Commit: 674808340422d473579f27cee5829004cc21d241
Parents: 065cd67 dfe1f23
Author: Aleksey Yeschenko 
Authored: Wed Sep 17 22:47:05 2014 -0700
Committer: Aleksey Yeschenko 
Committed: Wed Sep 17 22:47:05 2014 -0700

--
 CHANGES.txt|  1 +
 src/java/org/apache/cassandra/service/ClientState.java | 12 
 2 files changed, 5 insertions(+), 8 deletions(-)
--


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

http://git-wip-us.apache.org/repos/asf/cassandra/blob/67480834/src/java/org/apache/cassandra/service/ClientState.java
--
diff --cc src/java/org/apache/cassandra/service/ClientState.java
index 2fd9b68,af4dead..20682e9
--- a/src/java/org/apache/cassandra/service/ClientState.java
+++ b/src/java/org/apache/cassandra/service/ClientState.java
@@@ -25,7 -25,9 +25,8 @@@ import java.util.concurrent.TimeUnit
  import com.google.common.cache.CacheBuilder;
  import com.google.common.cache.CacheLoader;
  import com.google.common.cache.LoadingCache;
+ import com.google.common.collect.Iterables;
  import com.google.common.collect.Sets;
 -import org.apache.commons.lang3.StringUtils;
  import org.slf4j.Logger;
  import org.slf4j.LoggerFactory;
  



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

2014-09-17 Thread aleksey
Merge branch 'cassandra-2.0' into cassandra-2.1

Conflicts:
CHANGES.txt
src/java/org/apache/cassandra/service/ClientState.java


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

Branch: refs/heads/trunk
Commit: dfe1f23511a43981af996f00e61997dc7d069241
Parents: 8026163 62db990
Author: Aleksey Yeschenko 
Authored: Wed Sep 17 22:46:25 2014 -0700
Committer: Aleksey Yeschenko 
Committed: Wed Sep 17 22:46:25 2014 -0700

--
 CHANGES.txt|  1 +
 src/java/org/apache/cassandra/service/ClientState.java | 12 
 2 files changed, 5 insertions(+), 8 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/dfe1f235/CHANGES.txt
--
diff --cc CHANGES.txt
index 47d5591,1eab20e..4619bee
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,47 -1,5 +1,48 @@@
 -2.0.11:
 +2.1.1
 + * Invalidate prepared statements when their keyspace or table is
 +   dropped (CASSANDRA-7566)
 + * cassandra-stress: fix support for NetworkTopologyStrategy (CASSANDRA-7945)
 + * Fix saving caches when a table is dropped (CASSANDRA-7784)
 + * Add better error checking of new stress profile (CASSANDRA-7716)
 + * Use ThreadLocalRandom and remove FBUtilities.threadLocalRandom 
(CASSANDRA-7934)
 + * Prevent operator mistakes due to simultaneous bootstrap (CASSANDRA-7069)
 + * cassandra-stress supports whitelist mode for node config (CASSANDRA-7658)
 + * GCInspector more closely tracks GC; cassandra-stress and nodetool report 
it (CASSANDRA-7916)
 + * nodetool won't output bogus ownership info without a keyspace 
(CASSANDRA-7173)
 + * Add human readable option to nodetool commands (CASSANDRA-5433)
 + * Don't try to set repairedAt on old sstables (CASSANDRA-7913)
 + * Add metrics for tracking PreparedStatement use (CASSANDRA-7719)
 + * (cqlsh) tab-completion for triggers (CASSANDRA-7824)
 + * (cqlsh) Support for query paging (CASSANDRA-7514)
 + * (cqlsh) Show progress of COPY operations (CASSANDRA-7789)
 + * Add syntax to remove multiple elements from a map (CASSANDRA-6599)
 + * Support non-equals conditions in lightweight transactions (CASSANDRA-6839)
 + * Add IF [NOT] EXISTS to create/drop triggers (CASSANDRA-7606)
 + * (cqlsh) Display the current logged-in user (CASSANDRA-7785)
 + * (cqlsh) Don't ignore CTRL-C during COPY FROM execution (CASSANDRA-7815)
 + * (cqlsh) Order UDTs according to cross-type dependencies in DESCRIBE
 +   output (CASSANDRA-7659)
 + * (cqlsh) Fix handling of CAS statement results (CASSANDRA-7671)
 + * (cqlsh) COPY TO/FROM improvements (CASSANDRA-7405)
 + * Support list index operations with conditions (CASSANDRA-7499)
 + * Add max live/tombstoned cells to nodetool cfstats output (CASSANDRA-7731)
 + * Validate IPv6 wildcard addresses properly (CASSANDRA-7680)
 + * (cqlsh) Error when tracing query (CASSANDRA-7613)
 + * Avoid IOOBE when building SyntaxError message snippet (CASSANDRA-7569)
 + * SSTableExport uses correct validator to create string representation of 
partition
 +   keys (CASSANDRA-7498)
 + * Avoid NPEs when receiving type changes for an unknown keyspace 
(CASSANDRA-7689)
 + * Add support for custom 2i validation (CASSANDRA-7575)
 + * Pig support for hadoop CqlInputFormat (CASSANDRA-6454)
 + * Add listen_interface and rpc_interface options (CASSANDRA-7417)
 + * Improve schema merge performance (CASSANDRA-7444)
 + * Adjust MT depth based on # of partition validating (CASSANDRA-5263)
 + * Optimise NativeCell comparisons (CASSANDRA-6755)
 + * Configurable client timeout for cqlsh (CASSANDRA-7516)
 + * Include snippet of CQL query near syntax error in messages (CASSANDRA-7111)
 + * Make repair -pr work with -local (CASSANDRA-7450)
 +Merged from 2.0:
+  * Include schema_triggers CF in readable system resources (CASSANDRA-7967)
   * Fix RowIndexEntry to report correct serializedSize (CASSANDRA-7948)
   * Make CQLSSTableWriter sync within partitions (CASSANDRA-7360)
   * Potentially use non-local replicas in CqlConfigHelper (CASSANDRA-7906)

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



[1/3] git commit: Include schema_triggers CF in readable system resources

2014-09-17 Thread aleksey
Repository: cassandra
Updated Branches:
  refs/heads/trunk 065cd67ab -> 674808340


Include schema_triggers CF in readable system resources

patch by Adam Holmberg; reviewed by Aleksey Yeschenko for CASSANDRA-7967


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

Branch: refs/heads/trunk
Commit: 62db99037e19dcd75b0aa052619e3f10baca375d
Parents: 85aa794
Author: Aleksey Yeschenko 
Authored: Wed Sep 17 22:39:40 2014 -0700
Committer: Aleksey Yeschenko 
Committed: Wed Sep 17 22:40:51 2014 -0700

--
 CHANGES.txt|  3 ++-
 src/java/org/apache/cassandra/db/SystemKeyspace.java   |  5 +
 src/java/org/apache/cassandra/service/ClientState.java | 11 ---
 3 files changed, 11 insertions(+), 8 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/62db9903/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 58c6647..1eab20e 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,6 @@
 2.0.11:
+ * Include schema_triggers CF in readable system resources (CASSANDRA-7967)
+ * Fix RowIndexEntry to report correct serializedSize (CASSANDRA-7948)
  * Make CQLSSTableWriter sync within partitions (CASSANDRA-7360)
  * Potentially use non-local replicas in CqlConfigHelper (CASSANDRA-7906)
  * Explicitly disallowing mixing multi-column and single-column
@@ -11,7 +13,6 @@
  * Always send Paxos commit to all replicas (CASSANDRA-7479)
  * Make disruptor_thrift_server invocation pool configurable (CASSANDRA-7594)
  * Make repair no-op when RF=1 (CASSANDRA-7864)
- * Fix RowIndexEntry to report correct serializedSize (CASSANDRA-7948)
 Merged from 1.2:
  * Don't index tombstones (CASSANDRA-7828)
 

http://git-wip-us.apache.org/repos/asf/cassandra/blob/62db9903/src/java/org/apache/cassandra/db/SystemKeyspace.java
--
diff --git a/src/java/org/apache/cassandra/db/SystemKeyspace.java 
b/src/java/org/apache/cassandra/db/SystemKeyspace.java
index fe8f179..5b77f63 100644
--- a/src/java/org/apache/cassandra/db/SystemKeyspace.java
+++ b/src/java/org/apache/cassandra/db/SystemKeyspace.java
@@ -86,6 +86,11 @@ public class SystemKeyspace
 private static final String LOCAL_KEY = "local";
 private static final ByteBuffer ALL_LOCAL_NODE_ID_KEY = 
ByteBufferUtil.bytes("Local");
 
+public static final List allSchemaCfs = 
Arrays.asList(SCHEMA_KEYSPACES_CF,
+  
SCHEMA_COLUMNFAMILIES_CF,
+  
SCHEMA_COLUMNS_CF,
+  
SCHEMA_TRIGGERS_CF);
+
 private static volatile Map> 
truncationRecords;
 
 public enum BootstrapState

http://git-wip-us.apache.org/repos/asf/cassandra/blob/62db9903/src/java/org/apache/cassandra/service/ClientState.java
--
diff --git a/src/java/org/apache/cassandra/service/ClientState.java 
b/src/java/org/apache/cassandra/service/ClientState.java
index be3b895..44f2b87 100644
--- a/src/java/org/apache/cassandra/service/ClientState.java
+++ b/src/java/org/apache/cassandra/service/ClientState.java
@@ -25,6 +25,7 @@ import java.util.concurrent.TimeUnit;
 import com.google.common.cache.CacheBuilder;
 import com.google.common.cache.CacheLoader;
 import com.google.common.cache.LoadingCache;
+import com.google.common.collect.Iterables;
 import com.google.common.collect.Sets;
 import org.apache.commons.lang3.StringUtils;
 import org.slf4j.Logger;
@@ -62,13 +63,9 @@ public class ClientState
 
 static
 {
-// We want these system cfs to be always readable since many tools 
rely on them (nodetool, cqlsh, bulkloader, etc.)
-String[] cfs =  new String[] { SystemKeyspace.LOCAL_CF,
-   SystemKeyspace.PEERS_CF,
-   SystemKeyspace.SCHEMA_KEYSPACES_CF,
-   SystemKeyspace.SCHEMA_COLUMNFAMILIES_CF,
-   SystemKeyspace.SCHEMA_COLUMNS_CF };
-for (String cf : cfs)
+// We want these system cfs to be always readable to authenticated 
users since many tools rely on them
+// (nodetool, cqlsh, bulkloader, etc.)
+for (String cf : 
Iterables.concat(Arrays.asList(SystemKeyspace.LOCAL_CF, 
SystemKeyspace.PEERS_CF), SystemKeyspace.allSchemaCfs))
 
READABLE_SYSTEM_RESOURCES.add(DataResource.columnFamily(Keyspace.SYSTEM_KS, 
cf));
 
   

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

2014-09-17 Thread aleksey
Merge branch 'cassandra-2.0' into cassandra-2.1

Conflicts:
CHANGES.txt
src/java/org/apache/cassandra/service/ClientState.java


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

Branch: refs/heads/cassandra-2.1
Commit: dfe1f23511a43981af996f00e61997dc7d069241
Parents: 8026163 62db990
Author: Aleksey Yeschenko 
Authored: Wed Sep 17 22:46:25 2014 -0700
Committer: Aleksey Yeschenko 
Committed: Wed Sep 17 22:46:25 2014 -0700

--
 CHANGES.txt|  1 +
 src/java/org/apache/cassandra/service/ClientState.java | 12 
 2 files changed, 5 insertions(+), 8 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/dfe1f235/CHANGES.txt
--
diff --cc CHANGES.txt
index 47d5591,1eab20e..4619bee
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,47 -1,5 +1,48 @@@
 -2.0.11:
 +2.1.1
 + * Invalidate prepared statements when their keyspace or table is
 +   dropped (CASSANDRA-7566)
 + * cassandra-stress: fix support for NetworkTopologyStrategy (CASSANDRA-7945)
 + * Fix saving caches when a table is dropped (CASSANDRA-7784)
 + * Add better error checking of new stress profile (CASSANDRA-7716)
 + * Use ThreadLocalRandom and remove FBUtilities.threadLocalRandom 
(CASSANDRA-7934)
 + * Prevent operator mistakes due to simultaneous bootstrap (CASSANDRA-7069)
 + * cassandra-stress supports whitelist mode for node config (CASSANDRA-7658)
 + * GCInspector more closely tracks GC; cassandra-stress and nodetool report 
it (CASSANDRA-7916)
 + * nodetool won't output bogus ownership info without a keyspace 
(CASSANDRA-7173)
 + * Add human readable option to nodetool commands (CASSANDRA-5433)
 + * Don't try to set repairedAt on old sstables (CASSANDRA-7913)
 + * Add metrics for tracking PreparedStatement use (CASSANDRA-7719)
 + * (cqlsh) tab-completion for triggers (CASSANDRA-7824)
 + * (cqlsh) Support for query paging (CASSANDRA-7514)
 + * (cqlsh) Show progress of COPY operations (CASSANDRA-7789)
 + * Add syntax to remove multiple elements from a map (CASSANDRA-6599)
 + * Support non-equals conditions in lightweight transactions (CASSANDRA-6839)
 + * Add IF [NOT] EXISTS to create/drop triggers (CASSANDRA-7606)
 + * (cqlsh) Display the current logged-in user (CASSANDRA-7785)
 + * (cqlsh) Don't ignore CTRL-C during COPY FROM execution (CASSANDRA-7815)
 + * (cqlsh) Order UDTs according to cross-type dependencies in DESCRIBE
 +   output (CASSANDRA-7659)
 + * (cqlsh) Fix handling of CAS statement results (CASSANDRA-7671)
 + * (cqlsh) COPY TO/FROM improvements (CASSANDRA-7405)
 + * Support list index operations with conditions (CASSANDRA-7499)
 + * Add max live/tombstoned cells to nodetool cfstats output (CASSANDRA-7731)
 + * Validate IPv6 wildcard addresses properly (CASSANDRA-7680)
 + * (cqlsh) Error when tracing query (CASSANDRA-7613)
 + * Avoid IOOBE when building SyntaxError message snippet (CASSANDRA-7569)
 + * SSTableExport uses correct validator to create string representation of 
partition
 +   keys (CASSANDRA-7498)
 + * Avoid NPEs when receiving type changes for an unknown keyspace 
(CASSANDRA-7689)
 + * Add support for custom 2i validation (CASSANDRA-7575)
 + * Pig support for hadoop CqlInputFormat (CASSANDRA-6454)
 + * Add listen_interface and rpc_interface options (CASSANDRA-7417)
 + * Improve schema merge performance (CASSANDRA-7444)
 + * Adjust MT depth based on # of partition validating (CASSANDRA-5263)
 + * Optimise NativeCell comparisons (CASSANDRA-6755)
 + * Configurable client timeout for cqlsh (CASSANDRA-7516)
 + * Include snippet of CQL query near syntax error in messages (CASSANDRA-7111)
 + * Make repair -pr work with -local (CASSANDRA-7450)
 +Merged from 2.0:
+  * Include schema_triggers CF in readable system resources (CASSANDRA-7967)
   * Fix RowIndexEntry to report correct serializedSize (CASSANDRA-7948)
   * Make CQLSSTableWriter sync within partitions (CASSANDRA-7360)
   * Potentially use non-local replicas in CqlConfigHelper (CASSANDRA-7906)

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



[1/2] git commit: Include schema_triggers CF in readable system resources

2014-09-17 Thread aleksey
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-2.1 8026163de -> dfe1f2351


Include schema_triggers CF in readable system resources

patch by Adam Holmberg; reviewed by Aleksey Yeschenko for CASSANDRA-7967


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

Branch: refs/heads/cassandra-2.1
Commit: 62db99037e19dcd75b0aa052619e3f10baca375d
Parents: 85aa794
Author: Aleksey Yeschenko 
Authored: Wed Sep 17 22:39:40 2014 -0700
Committer: Aleksey Yeschenko 
Committed: Wed Sep 17 22:40:51 2014 -0700

--
 CHANGES.txt|  3 ++-
 src/java/org/apache/cassandra/db/SystemKeyspace.java   |  5 +
 src/java/org/apache/cassandra/service/ClientState.java | 11 ---
 3 files changed, 11 insertions(+), 8 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/62db9903/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 58c6647..1eab20e 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,6 @@
 2.0.11:
+ * Include schema_triggers CF in readable system resources (CASSANDRA-7967)
+ * Fix RowIndexEntry to report correct serializedSize (CASSANDRA-7948)
  * Make CQLSSTableWriter sync within partitions (CASSANDRA-7360)
  * Potentially use non-local replicas in CqlConfigHelper (CASSANDRA-7906)
  * Explicitly disallowing mixing multi-column and single-column
@@ -11,7 +13,6 @@
  * Always send Paxos commit to all replicas (CASSANDRA-7479)
  * Make disruptor_thrift_server invocation pool configurable (CASSANDRA-7594)
  * Make repair no-op when RF=1 (CASSANDRA-7864)
- * Fix RowIndexEntry to report correct serializedSize (CASSANDRA-7948)
 Merged from 1.2:
  * Don't index tombstones (CASSANDRA-7828)
 

http://git-wip-us.apache.org/repos/asf/cassandra/blob/62db9903/src/java/org/apache/cassandra/db/SystemKeyspace.java
--
diff --git a/src/java/org/apache/cassandra/db/SystemKeyspace.java 
b/src/java/org/apache/cassandra/db/SystemKeyspace.java
index fe8f179..5b77f63 100644
--- a/src/java/org/apache/cassandra/db/SystemKeyspace.java
+++ b/src/java/org/apache/cassandra/db/SystemKeyspace.java
@@ -86,6 +86,11 @@ public class SystemKeyspace
 private static final String LOCAL_KEY = "local";
 private static final ByteBuffer ALL_LOCAL_NODE_ID_KEY = 
ByteBufferUtil.bytes("Local");
 
+public static final List allSchemaCfs = 
Arrays.asList(SCHEMA_KEYSPACES_CF,
+  
SCHEMA_COLUMNFAMILIES_CF,
+  
SCHEMA_COLUMNS_CF,
+  
SCHEMA_TRIGGERS_CF);
+
 private static volatile Map> 
truncationRecords;
 
 public enum BootstrapState

http://git-wip-us.apache.org/repos/asf/cassandra/blob/62db9903/src/java/org/apache/cassandra/service/ClientState.java
--
diff --git a/src/java/org/apache/cassandra/service/ClientState.java 
b/src/java/org/apache/cassandra/service/ClientState.java
index be3b895..44f2b87 100644
--- a/src/java/org/apache/cassandra/service/ClientState.java
+++ b/src/java/org/apache/cassandra/service/ClientState.java
@@ -25,6 +25,7 @@ import java.util.concurrent.TimeUnit;
 import com.google.common.cache.CacheBuilder;
 import com.google.common.cache.CacheLoader;
 import com.google.common.cache.LoadingCache;
+import com.google.common.collect.Iterables;
 import com.google.common.collect.Sets;
 import org.apache.commons.lang3.StringUtils;
 import org.slf4j.Logger;
@@ -62,13 +63,9 @@ public class ClientState
 
 static
 {
-// We want these system cfs to be always readable since many tools 
rely on them (nodetool, cqlsh, bulkloader, etc.)
-String[] cfs =  new String[] { SystemKeyspace.LOCAL_CF,
-   SystemKeyspace.PEERS_CF,
-   SystemKeyspace.SCHEMA_KEYSPACES_CF,
-   SystemKeyspace.SCHEMA_COLUMNFAMILIES_CF,
-   SystemKeyspace.SCHEMA_COLUMNS_CF };
-for (String cf : cfs)
+// We want these system cfs to be always readable to authenticated 
users since many tools rely on them
+// (nodetool, cqlsh, bulkloader, etc.)
+for (String cf : 
Iterables.concat(Arrays.asList(SystemKeyspace.LOCAL_CF, 
SystemKeyspace.PEERS_CF), SystemKeyspace.allSchemaCfs))
 
READABLE_SYSTEM_RESOURCES.add(DataResource.columnFamily(Keyspace.SYSTEM_

git commit: Include schema_triggers CF in readable system resources

2014-09-17 Thread aleksey
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-2.0 85aa794e1 -> 62db99037


Include schema_triggers CF in readable system resources

patch by Adam Holmberg; reviewed by Aleksey Yeschenko for CASSANDRA-7967


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

Branch: refs/heads/cassandra-2.0
Commit: 62db99037e19dcd75b0aa052619e3f10baca375d
Parents: 85aa794
Author: Aleksey Yeschenko 
Authored: Wed Sep 17 22:39:40 2014 -0700
Committer: Aleksey Yeschenko 
Committed: Wed Sep 17 22:40:51 2014 -0700

--
 CHANGES.txt|  3 ++-
 src/java/org/apache/cassandra/db/SystemKeyspace.java   |  5 +
 src/java/org/apache/cassandra/service/ClientState.java | 11 ---
 3 files changed, 11 insertions(+), 8 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/62db9903/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 58c6647..1eab20e 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,6 @@
 2.0.11:
+ * Include schema_triggers CF in readable system resources (CASSANDRA-7967)
+ * Fix RowIndexEntry to report correct serializedSize (CASSANDRA-7948)
  * Make CQLSSTableWriter sync within partitions (CASSANDRA-7360)
  * Potentially use non-local replicas in CqlConfigHelper (CASSANDRA-7906)
  * Explicitly disallowing mixing multi-column and single-column
@@ -11,7 +13,6 @@
  * Always send Paxos commit to all replicas (CASSANDRA-7479)
  * Make disruptor_thrift_server invocation pool configurable (CASSANDRA-7594)
  * Make repair no-op when RF=1 (CASSANDRA-7864)
- * Fix RowIndexEntry to report correct serializedSize (CASSANDRA-7948)
 Merged from 1.2:
  * Don't index tombstones (CASSANDRA-7828)
 

http://git-wip-us.apache.org/repos/asf/cassandra/blob/62db9903/src/java/org/apache/cassandra/db/SystemKeyspace.java
--
diff --git a/src/java/org/apache/cassandra/db/SystemKeyspace.java 
b/src/java/org/apache/cassandra/db/SystemKeyspace.java
index fe8f179..5b77f63 100644
--- a/src/java/org/apache/cassandra/db/SystemKeyspace.java
+++ b/src/java/org/apache/cassandra/db/SystemKeyspace.java
@@ -86,6 +86,11 @@ public class SystemKeyspace
 private static final String LOCAL_KEY = "local";
 private static final ByteBuffer ALL_LOCAL_NODE_ID_KEY = 
ByteBufferUtil.bytes("Local");
 
+public static final List allSchemaCfs = 
Arrays.asList(SCHEMA_KEYSPACES_CF,
+  
SCHEMA_COLUMNFAMILIES_CF,
+  
SCHEMA_COLUMNS_CF,
+  
SCHEMA_TRIGGERS_CF);
+
 private static volatile Map> 
truncationRecords;
 
 public enum BootstrapState

http://git-wip-us.apache.org/repos/asf/cassandra/blob/62db9903/src/java/org/apache/cassandra/service/ClientState.java
--
diff --git a/src/java/org/apache/cassandra/service/ClientState.java 
b/src/java/org/apache/cassandra/service/ClientState.java
index be3b895..44f2b87 100644
--- a/src/java/org/apache/cassandra/service/ClientState.java
+++ b/src/java/org/apache/cassandra/service/ClientState.java
@@ -25,6 +25,7 @@ import java.util.concurrent.TimeUnit;
 import com.google.common.cache.CacheBuilder;
 import com.google.common.cache.CacheLoader;
 import com.google.common.cache.LoadingCache;
+import com.google.common.collect.Iterables;
 import com.google.common.collect.Sets;
 import org.apache.commons.lang3.StringUtils;
 import org.slf4j.Logger;
@@ -62,13 +63,9 @@ public class ClientState
 
 static
 {
-// We want these system cfs to be always readable since many tools 
rely on them (nodetool, cqlsh, bulkloader, etc.)
-String[] cfs =  new String[] { SystemKeyspace.LOCAL_CF,
-   SystemKeyspace.PEERS_CF,
-   SystemKeyspace.SCHEMA_KEYSPACES_CF,
-   SystemKeyspace.SCHEMA_COLUMNFAMILIES_CF,
-   SystemKeyspace.SCHEMA_COLUMNS_CF };
-for (String cf : cfs)
+// We want these system cfs to be always readable to authenticated 
users since many tools rely on them
+// (nodetool, cqlsh, bulkloader, etc.)
+for (String cf : 
Iterables.concat(Arrays.asList(SystemKeyspace.LOCAL_CF, 
SystemKeyspace.PEERS_CF), SystemKeyspace.allSchemaCfs))
 
READABLE_SYSTEM_RESOURCES.add(DataResource.columnFamily(Keyspace.SYSTEM_

[1/3] git commit: Fix RowIndexEntry to report correct serializedSize patch by Pavel Yaskevich; reviewed by Aleksey Yeschenko for CASSANDRA-7948

2014-09-17 Thread xedin
Repository: cassandra
Updated Branches:
  refs/heads/trunk a8285fea6 -> 065cd67ab


Fix RowIndexEntry to report correct serializedSize
patch by Pavel Yaskevich; reviewed by Aleksey Yeschenko for CASSANDRA-7948


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

Branch: refs/heads/trunk
Commit: 85aa794e1f7ff4323a6dde0b088e0cb9e1dd3f21
Parents: 05920cb
Author: Pavel Yaskevich 
Authored: Tue Sep 16 16:33:44 2014 -0700
Committer: Pavel Yaskevich 
Committed: Wed Sep 17 22:19:21 2014 -0700

--
 CHANGES.txt |  1 +
 .../org/apache/cassandra/db/RowIndexEntry.java  | 14 -
 .../apache/cassandra/db/RowIndexEntryTest.java  | 64 
 3 files changed, 78 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/85aa794e/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 3ee938a..58c6647 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -11,6 +11,7 @@
  * Always send Paxos commit to all replicas (CASSANDRA-7479)
  * Make disruptor_thrift_server invocation pool configurable (CASSANDRA-7594)
  * Make repair no-op when RF=1 (CASSANDRA-7864)
+ * Fix RowIndexEntry to report correct serializedSize (CASSANDRA-7948)
 Merged from 1.2:
  * Don't index tombstones (CASSANDRA-7828)
 

http://git-wip-us.apache.org/repos/asf/cassandra/blob/85aa794e/src/java/org/apache/cassandra/db/RowIndexEntry.java
--
diff --git a/src/java/org/apache/cassandra/db/RowIndexEntry.java 
b/src/java/org/apache/cassandra/db/RowIndexEntry.java
index cfc7cf1..cdafd5d 100644
--- a/src/java/org/apache/cassandra/db/RowIndexEntry.java
+++ b/src/java/org/apache/cassandra/db/RowIndexEntry.java
@@ -45,7 +45,19 @@ public class RowIndexEntry implements IMeasurableMemory
 
 public int serializedSize()
 {
-return TypeSizes.NATIVE.sizeof(position) + promotedSize();
+int size = TypeSizes.NATIVE.sizeof(position) + 
TypeSizes.NATIVE.sizeof(promotedSize());
+
+if (isIndexed())
+{
+List index = columnsIndex();
+
+size += DeletionTime.serializer.serializedSize(deletionTime(), 
TypeSizes.NATIVE);
+size += TypeSizes.NATIVE.sizeof(index.size());
+for (IndexHelper.IndexInfo info : index)
+size += info.serializedSize(TypeSizes.NATIVE);
+}
+
+return size;
 }
 
 protected int promotedSize()

http://git-wip-us.apache.org/repos/asf/cassandra/blob/85aa794e/test/unit/org/apache/cassandra/db/RowIndexEntryTest.java
--
diff --git a/test/unit/org/apache/cassandra/db/RowIndexEntryTest.java 
b/test/unit/org/apache/cassandra/db/RowIndexEntryTest.java
new file mode 100644
index 000..9728f1f
--- /dev/null
+++ b/test/unit/org/apache/cassandra/db/RowIndexEntryTest.java
@@ -0,0 +1,64 @@
+/*
+ * 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.db;
+
+import java.io.IOException;
+
+import junit.framework.Assert;
+import org.apache.cassandra.SchemaLoader;
+import org.apache.cassandra.config.DatabaseDescriptor;
+import org.apache.cassandra.io.util.DataOutputBuffer;
+import org.apache.cassandra.utils.ByteBufferUtil;
+import org.apache.cassandra.utils.FBUtilities;
+import org.junit.Test;
+
+public class RowIndexEntryTest extends SchemaLoader
+{
+@Test
+public void testSerializedSize() throws IOException
+{
+final RowIndexEntry simple = new RowIndexEntry(123);
+
+DataOutputBuffer buffer = new DataOutputBuffer();
+RowIndexEntry.serializer.serialize(simple, buffer);
+
+Assert.assertEquals(buffer.size(), simple.serializedSize());
+
+buffer = new DataOutputBuffer();
+ColumnFamily cf = ArrayBackedSor

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

2014-09-17 Thread xedin
Merge branch 'cassandra-2.1' into trunk


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

Branch: refs/heads/trunk
Commit: 065cd67ab2fcac348e1b1a48bc22aa3ae3a4adfa
Parents: a8285fe 8026163
Author: Pavel Yaskevich 
Authored: Wed Sep 17 22:35:27 2014 -0700
Committer: Pavel Yaskevich 
Committed: Wed Sep 17 22:35:27 2014 -0700

--
 CHANGES.txt |  1 +
 .../org/apache/cassandra/db/RowIndexEntry.java  | 16 -
 .../apache/cassandra/db/RowIndexEntryTest.java  | 69 
 3 files changed, 85 insertions(+), 1 deletion(-)
--


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



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

2014-09-17 Thread xedin
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/8026163d
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/8026163d
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/8026163d

Branch: refs/heads/cassandra-2.1
Commit: 8026163decf3af2a0984b387acc01cfdfe44c926
Parents: ad89d44 85aa794
Author: Pavel Yaskevich 
Authored: Wed Sep 17 22:34:19 2014 -0700
Committer: Pavel Yaskevich 
Committed: Wed Sep 17 22:34:19 2014 -0700

--
 CHANGES.txt |  1 +
 .../org/apache/cassandra/db/RowIndexEntry.java  | 16 -
 .../apache/cassandra/db/RowIndexEntryTest.java  | 69 
 3 files changed, 85 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/8026163d/CHANGES.txt
--
diff --cc CHANGES.txt
index cc8c691,58c6647..47d5591
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,96 -1,9 +1,97 @@@
 -2.0.11:
 +2.1.1
 + * Invalidate prepared statements when their keyspace or table is
 +   dropped (CASSANDRA-7566)
 + * cassandra-stress: fix support for NetworkTopologyStrategy (CASSANDRA-7945)
 + * Fix saving caches when a table is dropped (CASSANDRA-7784)
 + * Add better error checking of new stress profile (CASSANDRA-7716)
 + * Use ThreadLocalRandom and remove FBUtilities.threadLocalRandom 
(CASSANDRA-7934)
 + * Prevent operator mistakes due to simultaneous bootstrap (CASSANDRA-7069)
 + * cassandra-stress supports whitelist mode for node config (CASSANDRA-7658)
 + * GCInspector more closely tracks GC; cassandra-stress and nodetool report 
it (CASSANDRA-7916)
 + * nodetool won't output bogus ownership info without a keyspace 
(CASSANDRA-7173)
 + * Add human readable option to nodetool commands (CASSANDRA-5433)
 + * Don't try to set repairedAt on old sstables (CASSANDRA-7913)
 + * Add metrics for tracking PreparedStatement use (CASSANDRA-7719)
 + * (cqlsh) tab-completion for triggers (CASSANDRA-7824)
 + * (cqlsh) Support for query paging (CASSANDRA-7514)
 + * (cqlsh) Show progress of COPY operations (CASSANDRA-7789)
 + * Add syntax to remove multiple elements from a map (CASSANDRA-6599)
 + * Support non-equals conditions in lightweight transactions (CASSANDRA-6839)
 + * Add IF [NOT] EXISTS to create/drop triggers (CASSANDRA-7606)
 + * (cqlsh) Display the current logged-in user (CASSANDRA-7785)
 + * (cqlsh) Don't ignore CTRL-C during COPY FROM execution (CASSANDRA-7815)
 + * (cqlsh) Order UDTs according to cross-type dependencies in DESCRIBE
 +   output (CASSANDRA-7659)
 + * (cqlsh) Fix handling of CAS statement results (CASSANDRA-7671)
 + * (cqlsh) COPY TO/FROM improvements (CASSANDRA-7405)
 + * Support list index operations with conditions (CASSANDRA-7499)
 + * Add max live/tombstoned cells to nodetool cfstats output (CASSANDRA-7731)
 + * Validate IPv6 wildcard addresses properly (CASSANDRA-7680)
 + * (cqlsh) Error when tracing query (CASSANDRA-7613)
 + * Avoid IOOBE when building SyntaxError message snippet (CASSANDRA-7569)
 + * SSTableExport uses correct validator to create string representation of 
partition
 +   keys (CASSANDRA-7498)
 + * Avoid NPEs when receiving type changes for an unknown keyspace 
(CASSANDRA-7689)
 + * Add support for custom 2i validation (CASSANDRA-7575)
 + * Pig support for hadoop CqlInputFormat (CASSANDRA-6454)
 + * Add listen_interface and rpc_interface options (CASSANDRA-7417)
 + * Improve schema merge performance (CASSANDRA-7444)
 + * Adjust MT depth based on # of partition validating (CASSANDRA-5263)
 + * Optimise NativeCell comparisons (CASSANDRA-6755)
 + * Configurable client timeout for cqlsh (CASSANDRA-7516)
 + * Include snippet of CQL query near syntax error in messages (CASSANDRA-7111)
 + * Make repair -pr work with -local (CASSANDRA-7450)
 +Merged from 2.0:
++ * Fix RowIndexEntry to report correct serializedSize (CASSANDRA-7948)
   * Make CQLSSTableWriter sync within partitions (CASSANDRA-7360)
   * Potentially use non-local replicas in CqlConfigHelper (CASSANDRA-7906)
 - * Explicitly disallowing mixing multi-column and single-column
 + * Explicitly disallow mixing multi-column and single-column
 relations on clustering columns (CASSANDRA-7711)
   * Better error message when condition is set on PK column (CASSANDRA-7804)
 + * Don't send schema change responses and events for no-op DDL
 +   statements (CASSANDRA-7600)
 + * (Hadoop) fix cluster initialisation for a split fetching (CASSANDRA-7774)
 + * Throw InvalidRequestException when queries contain relations on entire
 +   collection columns (CASSANDRA-7506)
 + * (cqlsh) enable CTRL-R history search with libedit (CASSANDRA-7577)
 + * (Hadoop) allow ACFRW to limit nodes to local DC (CASSANDRA-7252)
 + * (cqlsh) cqlsh shou

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

2014-09-17 Thread xedin
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/8026163d
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/8026163d
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/8026163d

Branch: refs/heads/trunk
Commit: 8026163decf3af2a0984b387acc01cfdfe44c926
Parents: ad89d44 85aa794
Author: Pavel Yaskevich 
Authored: Wed Sep 17 22:34:19 2014 -0700
Committer: Pavel Yaskevich 
Committed: Wed Sep 17 22:34:19 2014 -0700

--
 CHANGES.txt |  1 +
 .../org/apache/cassandra/db/RowIndexEntry.java  | 16 -
 .../apache/cassandra/db/RowIndexEntryTest.java  | 69 
 3 files changed, 85 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/8026163d/CHANGES.txt
--
diff --cc CHANGES.txt
index cc8c691,58c6647..47d5591
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,96 -1,9 +1,97 @@@
 -2.0.11:
 +2.1.1
 + * Invalidate prepared statements when their keyspace or table is
 +   dropped (CASSANDRA-7566)
 + * cassandra-stress: fix support for NetworkTopologyStrategy (CASSANDRA-7945)
 + * Fix saving caches when a table is dropped (CASSANDRA-7784)
 + * Add better error checking of new stress profile (CASSANDRA-7716)
 + * Use ThreadLocalRandom and remove FBUtilities.threadLocalRandom 
(CASSANDRA-7934)
 + * Prevent operator mistakes due to simultaneous bootstrap (CASSANDRA-7069)
 + * cassandra-stress supports whitelist mode for node config (CASSANDRA-7658)
 + * GCInspector more closely tracks GC; cassandra-stress and nodetool report 
it (CASSANDRA-7916)
 + * nodetool won't output bogus ownership info without a keyspace 
(CASSANDRA-7173)
 + * Add human readable option to nodetool commands (CASSANDRA-5433)
 + * Don't try to set repairedAt on old sstables (CASSANDRA-7913)
 + * Add metrics for tracking PreparedStatement use (CASSANDRA-7719)
 + * (cqlsh) tab-completion for triggers (CASSANDRA-7824)
 + * (cqlsh) Support for query paging (CASSANDRA-7514)
 + * (cqlsh) Show progress of COPY operations (CASSANDRA-7789)
 + * Add syntax to remove multiple elements from a map (CASSANDRA-6599)
 + * Support non-equals conditions in lightweight transactions (CASSANDRA-6839)
 + * Add IF [NOT] EXISTS to create/drop triggers (CASSANDRA-7606)
 + * (cqlsh) Display the current logged-in user (CASSANDRA-7785)
 + * (cqlsh) Don't ignore CTRL-C during COPY FROM execution (CASSANDRA-7815)
 + * (cqlsh) Order UDTs according to cross-type dependencies in DESCRIBE
 +   output (CASSANDRA-7659)
 + * (cqlsh) Fix handling of CAS statement results (CASSANDRA-7671)
 + * (cqlsh) COPY TO/FROM improvements (CASSANDRA-7405)
 + * Support list index operations with conditions (CASSANDRA-7499)
 + * Add max live/tombstoned cells to nodetool cfstats output (CASSANDRA-7731)
 + * Validate IPv6 wildcard addresses properly (CASSANDRA-7680)
 + * (cqlsh) Error when tracing query (CASSANDRA-7613)
 + * Avoid IOOBE when building SyntaxError message snippet (CASSANDRA-7569)
 + * SSTableExport uses correct validator to create string representation of 
partition
 +   keys (CASSANDRA-7498)
 + * Avoid NPEs when receiving type changes for an unknown keyspace 
(CASSANDRA-7689)
 + * Add support for custom 2i validation (CASSANDRA-7575)
 + * Pig support for hadoop CqlInputFormat (CASSANDRA-6454)
 + * Add listen_interface and rpc_interface options (CASSANDRA-7417)
 + * Improve schema merge performance (CASSANDRA-7444)
 + * Adjust MT depth based on # of partition validating (CASSANDRA-5263)
 + * Optimise NativeCell comparisons (CASSANDRA-6755)
 + * Configurable client timeout for cqlsh (CASSANDRA-7516)
 + * Include snippet of CQL query near syntax error in messages (CASSANDRA-7111)
 + * Make repair -pr work with -local (CASSANDRA-7450)
 +Merged from 2.0:
++ * Fix RowIndexEntry to report correct serializedSize (CASSANDRA-7948)
   * Make CQLSSTableWriter sync within partitions (CASSANDRA-7360)
   * Potentially use non-local replicas in CqlConfigHelper (CASSANDRA-7906)
 - * Explicitly disallowing mixing multi-column and single-column
 + * Explicitly disallow mixing multi-column and single-column
 relations on clustering columns (CASSANDRA-7711)
   * Better error message when condition is set on PK column (CASSANDRA-7804)
 + * Don't send schema change responses and events for no-op DDL
 +   statements (CASSANDRA-7600)
 + * (Hadoop) fix cluster initialisation for a split fetching (CASSANDRA-7774)
 + * Throw InvalidRequestException when queries contain relations on entire
 +   collection columns (CASSANDRA-7506)
 + * (cqlsh) enable CTRL-R history search with libedit (CASSANDRA-7577)
 + * (Hadoop) allow ACFRW to limit nodes to local DC (CASSANDRA-7252)
 + * (cqlsh) cqlsh should autom

[1/2] git commit: Fix RowIndexEntry to report correct serializedSize patch by Pavel Yaskevich; reviewed by Aleksey Yeschenko for CASSANDRA-7948

2014-09-17 Thread xedin
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-2.1 ad89d4437 -> 8026163de


Fix RowIndexEntry to report correct serializedSize
patch by Pavel Yaskevich; reviewed by Aleksey Yeschenko for CASSANDRA-7948


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

Branch: refs/heads/cassandra-2.1
Commit: 85aa794e1f7ff4323a6dde0b088e0cb9e1dd3f21
Parents: 05920cb
Author: Pavel Yaskevich 
Authored: Tue Sep 16 16:33:44 2014 -0700
Committer: Pavel Yaskevich 
Committed: Wed Sep 17 22:19:21 2014 -0700

--
 CHANGES.txt |  1 +
 .../org/apache/cassandra/db/RowIndexEntry.java  | 14 -
 .../apache/cassandra/db/RowIndexEntryTest.java  | 64 
 3 files changed, 78 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/85aa794e/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 3ee938a..58c6647 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -11,6 +11,7 @@
  * Always send Paxos commit to all replicas (CASSANDRA-7479)
  * Make disruptor_thrift_server invocation pool configurable (CASSANDRA-7594)
  * Make repair no-op when RF=1 (CASSANDRA-7864)
+ * Fix RowIndexEntry to report correct serializedSize (CASSANDRA-7948)
 Merged from 1.2:
  * Don't index tombstones (CASSANDRA-7828)
 

http://git-wip-us.apache.org/repos/asf/cassandra/blob/85aa794e/src/java/org/apache/cassandra/db/RowIndexEntry.java
--
diff --git a/src/java/org/apache/cassandra/db/RowIndexEntry.java 
b/src/java/org/apache/cassandra/db/RowIndexEntry.java
index cfc7cf1..cdafd5d 100644
--- a/src/java/org/apache/cassandra/db/RowIndexEntry.java
+++ b/src/java/org/apache/cassandra/db/RowIndexEntry.java
@@ -45,7 +45,19 @@ public class RowIndexEntry implements IMeasurableMemory
 
 public int serializedSize()
 {
-return TypeSizes.NATIVE.sizeof(position) + promotedSize();
+int size = TypeSizes.NATIVE.sizeof(position) + 
TypeSizes.NATIVE.sizeof(promotedSize());
+
+if (isIndexed())
+{
+List index = columnsIndex();
+
+size += DeletionTime.serializer.serializedSize(deletionTime(), 
TypeSizes.NATIVE);
+size += TypeSizes.NATIVE.sizeof(index.size());
+for (IndexHelper.IndexInfo info : index)
+size += info.serializedSize(TypeSizes.NATIVE);
+}
+
+return size;
 }
 
 protected int promotedSize()

http://git-wip-us.apache.org/repos/asf/cassandra/blob/85aa794e/test/unit/org/apache/cassandra/db/RowIndexEntryTest.java
--
diff --git a/test/unit/org/apache/cassandra/db/RowIndexEntryTest.java 
b/test/unit/org/apache/cassandra/db/RowIndexEntryTest.java
new file mode 100644
index 000..9728f1f
--- /dev/null
+++ b/test/unit/org/apache/cassandra/db/RowIndexEntryTest.java
@@ -0,0 +1,64 @@
+/*
+ * 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.db;
+
+import java.io.IOException;
+
+import junit.framework.Assert;
+import org.apache.cassandra.SchemaLoader;
+import org.apache.cassandra.config.DatabaseDescriptor;
+import org.apache.cassandra.io.util.DataOutputBuffer;
+import org.apache.cassandra.utils.ByteBufferUtil;
+import org.apache.cassandra.utils.FBUtilities;
+import org.junit.Test;
+
+public class RowIndexEntryTest extends SchemaLoader
+{
+@Test
+public void testSerializedSize() throws IOException
+{
+final RowIndexEntry simple = new RowIndexEntry(123);
+
+DataOutputBuffer buffer = new DataOutputBuffer();
+RowIndexEntry.serializer.serialize(simple, buffer);
+
+Assert.assertEquals(buffer.size(), simple.serializedSize());
+
+buffer = new DataOutputBuffer();
+ColumnFamily cf 

git commit: Fix RowIndexEntry to report correct serializedSize patch by Pavel Yaskevich; reviewed by Aleksey Yeschenko for CASSANDRA-7948

2014-09-17 Thread xedin
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-2.0 05920cb38 -> 85aa794e1


Fix RowIndexEntry to report correct serializedSize
patch by Pavel Yaskevich; reviewed by Aleksey Yeschenko for CASSANDRA-7948


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

Branch: refs/heads/cassandra-2.0
Commit: 85aa794e1f7ff4323a6dde0b088e0cb9e1dd3f21
Parents: 05920cb
Author: Pavel Yaskevich 
Authored: Tue Sep 16 16:33:44 2014 -0700
Committer: Pavel Yaskevich 
Committed: Wed Sep 17 22:19:21 2014 -0700

--
 CHANGES.txt |  1 +
 .../org/apache/cassandra/db/RowIndexEntry.java  | 14 -
 .../apache/cassandra/db/RowIndexEntryTest.java  | 64 
 3 files changed, 78 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/85aa794e/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 3ee938a..58c6647 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -11,6 +11,7 @@
  * Always send Paxos commit to all replicas (CASSANDRA-7479)
  * Make disruptor_thrift_server invocation pool configurable (CASSANDRA-7594)
  * Make repair no-op when RF=1 (CASSANDRA-7864)
+ * Fix RowIndexEntry to report correct serializedSize (CASSANDRA-7948)
 Merged from 1.2:
  * Don't index tombstones (CASSANDRA-7828)
 

http://git-wip-us.apache.org/repos/asf/cassandra/blob/85aa794e/src/java/org/apache/cassandra/db/RowIndexEntry.java
--
diff --git a/src/java/org/apache/cassandra/db/RowIndexEntry.java 
b/src/java/org/apache/cassandra/db/RowIndexEntry.java
index cfc7cf1..cdafd5d 100644
--- a/src/java/org/apache/cassandra/db/RowIndexEntry.java
+++ b/src/java/org/apache/cassandra/db/RowIndexEntry.java
@@ -45,7 +45,19 @@ public class RowIndexEntry implements IMeasurableMemory
 
 public int serializedSize()
 {
-return TypeSizes.NATIVE.sizeof(position) + promotedSize();
+int size = TypeSizes.NATIVE.sizeof(position) + 
TypeSizes.NATIVE.sizeof(promotedSize());
+
+if (isIndexed())
+{
+List index = columnsIndex();
+
+size += DeletionTime.serializer.serializedSize(deletionTime(), 
TypeSizes.NATIVE);
+size += TypeSizes.NATIVE.sizeof(index.size());
+for (IndexHelper.IndexInfo info : index)
+size += info.serializedSize(TypeSizes.NATIVE);
+}
+
+return size;
 }
 
 protected int promotedSize()

http://git-wip-us.apache.org/repos/asf/cassandra/blob/85aa794e/test/unit/org/apache/cassandra/db/RowIndexEntryTest.java
--
diff --git a/test/unit/org/apache/cassandra/db/RowIndexEntryTest.java 
b/test/unit/org/apache/cassandra/db/RowIndexEntryTest.java
new file mode 100644
index 000..9728f1f
--- /dev/null
+++ b/test/unit/org/apache/cassandra/db/RowIndexEntryTest.java
@@ -0,0 +1,64 @@
+/*
+ * 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.db;
+
+import java.io.IOException;
+
+import junit.framework.Assert;
+import org.apache.cassandra.SchemaLoader;
+import org.apache.cassandra.config.DatabaseDescriptor;
+import org.apache.cassandra.io.util.DataOutputBuffer;
+import org.apache.cassandra.utils.ByteBufferUtil;
+import org.apache.cassandra.utils.FBUtilities;
+import org.junit.Test;
+
+public class RowIndexEntryTest extends SchemaLoader
+{
+@Test
+public void testSerializedSize() throws IOException
+{
+final RowIndexEntry simple = new RowIndexEntry(123);
+
+DataOutputBuffer buffer = new DataOutputBuffer();
+RowIndexEntry.serializer.serialize(simple, buffer);
+
+Assert.assertEquals(buffer.size(), simple.serializedSize());
+
+buffer = new DataOutputBuffer();
+ColumnFamily cf 

[jira] [Comment Edited] (CASSANDRA-7282) Faster Memtable map

2014-09-17 Thread Jason Brown (JIRA)

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

Jason Brown edited comment on CASSANDRA-7282 at 9/18/14 5:17 AM:
-

just an update: running into some weird problems getting trunk/benedict's 
branch to run on my servers - I think it might be some settings I have in the 
cassandra.in.sh script conflict with 3.0 (i might have had some crazy crap a 
priori). will figure it out in the morning when i'm not falling asleep.


was (Author: jasobrown):
just an update: running into some weird problems getting trunk to run on my 
servers - I think it might be some settings I have in the cassandra.in.sh 
script conflict with 3.0. will figure it out in the morning when i'm not 
falling asleep.

> Faster Memtable map
> ---
>
> Key: CASSANDRA-7282
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7282
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Core
>Reporter: Benedict
>Assignee: Benedict
>  Labels: performance
> Fix For: 3.0
>
> Attachments: profile.yaml, reads.svg, run1.svg, writes.svg
>
>
> Currently we maintain a ConcurrentSkipLastMap of DecoratedKey -> Partition in 
> our memtables. Maintaining this is an O(lg(n)) operation; since the vast 
> majority of users use a hash partitioner, it occurs to me we could maintain a 
> hybrid ordered list / hash map. The list would impose the normal order on the 
> collection, but a hash index would live alongside as part of the same data 
> structure, simply mapping into the list and permitting O(1) lookups and 
> inserts.
> I've chosen to implement this initial version as a linked-list node per item, 
> but we can optimise this in future by storing fatter nodes that permit a 
> cache-line's worth of hashes to be checked at once,  further reducing the 
> constant factor costs for lookups.



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


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

2014-09-17 Thread Jason Brown (JIRA)

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

Jason Brown commented on CASSANDRA-7282:


just an update: running into some weird problems getting trunk to run on my 
servers - I think it might be some settings I have in the cassandra.in.sh 
script conflict with 3.0. will figure it out in the morning when i'm not 
falling asleep.

> Faster Memtable map
> ---
>
> Key: CASSANDRA-7282
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7282
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Core
>Reporter: Benedict
>Assignee: Benedict
>  Labels: performance
> Fix For: 3.0
>
> Attachments: profile.yaml, reads.svg, run1.svg, writes.svg
>
>
> Currently we maintain a ConcurrentSkipLastMap of DecoratedKey -> Partition in 
> our memtables. Maintaining this is an O(lg(n)) operation; since the vast 
> majority of users use a hash partitioner, it occurs to me we could maintain a 
> hybrid ordered list / hash map. The list would impose the normal order on the 
> collection, but a hash index would live alongside as part of the same data 
> structure, simply mapping into the list and permitting O(1) lookups and 
> inserts.
> I've chosen to implement this initial version as a linked-list node per item, 
> but we can optimise this in future by storing fatter nodes that permit a 
> cache-line's worth of hashes to be checked at once,  further reducing the 
> constant factor costs for lookups.



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


[jira] [Updated] (CASSANDRA-7967) Include schema_triggers CF in readable system resources

2014-09-17 Thread Aleksey Yeschenko (JIRA)

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

Aleksey Yeschenko updated CASSANDRA-7967:
-
Reviewer: Aleksey Yeschenko

> Include schema_triggers CF in readable system resources
> ---
>
> Key: CASSANDRA-7967
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7967
> Project: Cassandra
>  Issue Type: Bug
>  Components: Core
>Reporter: Adam Holmberg
> Fix For: 2.0.11, 2.1.1
>
> Attachments: schema_triggers_readable.txt
>
>
> SCHEMA_TRIGGERS_CF is missing from readable system resources.
> This makes tools, which attempt to read schema information, fail when 
> authorization is enabled.
> Patch attached.



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


[jira] [Commented] (CASSANDRA-7948) RowIndexEntry incorrectly reports serializedSize.

2014-09-17 Thread Aleksey Yeschenko (JIRA)

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

Aleksey Yeschenko commented on CASSANDRA-7948:
--

+1

> RowIndexEntry incorrectly reports serializedSize.
> -
>
> Key: CASSANDRA-7948
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7948
> Project: Cassandra
>  Issue Type: Bug
>  Components: Core
>Reporter: Pavel Yaskevich
>Assignee: Pavel Yaskevich
>Priority: Minor
> Fix For: 2.0.11
>
> Attachments: CASSANDRA-7948.patch
>
>
> RowIndexEntry serializedSize is off by 4 bytes (promotedSize) and doesn't 
> account for situation when column index is not empty.



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


[jira] [Resolved] (CASSANDRA-7719) Add PreparedStatements related metrics

2014-09-17 Thread Aleksey Yeschenko (JIRA)

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

Aleksey Yeschenko resolved CASSANDRA-7719.
--
Resolution: Fixed

Committed in ad89d4437bd2997f0c9b7bc1812e27d29a41b8db, thanks.

> Add PreparedStatements related metrics
> --
>
> Key: CASSANDRA-7719
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7719
> Project: Cassandra
>  Issue Type: New Feature
>Reporter: Michaël Figuière
>Assignee: T Jake Luciani
>Priority: Minor
> Fix For: 2.1.1
>
> Attachments: 7719-followup.txt, 7719.txt
>
>
> Cassandra newcomers often don't understand that they're expected to use 
> PreparedStatements for almost all of their repetitive queries executed in 
> production.
> It doesn't look like Cassandra currently expose any PreparedStatements 
> related metrics.It would be interesting, and I believe fairly simple, to add 
> several of them to make it possible, in development / management / monitoring 
> tools, to show warnings or alerts related to this bad practice.
> Thus I would suggest to add the following metrics:
> * Executed prepared statements count
> * Executed unprepared statements count
> * Amount of PreparedStatements that have been registered on the node



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


[1/2] git commit: Follow up to CASSANDRA-7719

2014-09-17 Thread aleksey
Repository: cassandra
Updated Branches:
  refs/heads/trunk 48682d69a -> a8285fea6


Follow up to CASSANDRA-7719

patch by Aleksey Yeschenko; reviewed by Jake Luciani for CASSANDRA-7719


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

Branch: refs/heads/trunk
Commit: ad89d4437bd2997f0c9b7bc1812e27d29a41b8db
Parents: 83d1563
Author: Aleksey Yeschenko 
Authored: Wed Sep 17 21:02:15 2014 -0700
Committer: Aleksey Yeschenko 
Committed: Wed Sep 17 21:02:15 2014 -0700

--
 .../apache/cassandra/cql3/QueryProcessor.java   |  48 +++
 .../apache/cassandra/metrics/CQLMetrics.java|  60 +
 .../cassandra/metrics/CqlStatementMetrics.java  |  53 
 .../apache/cassandra/cql3/CqlMetricsTest.java   | 114 -
 .../cassandra/metrics/CQLMetricsTest.java   | 124 +++
 5 files changed, 203 insertions(+), 196 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/ad89d443/src/java/org/apache/cassandra/cql3/QueryProcessor.java
--
diff --git a/src/java/org/apache/cassandra/cql3/QueryProcessor.java 
b/src/java/org/apache/cassandra/cql3/QueryProcessor.java
index efd1ebb..419a3e1 100644
--- a/src/java/org/apache/cassandra/cql3/QueryProcessor.java
+++ b/src/java/org/apache/cassandra/cql3/QueryProcessor.java
@@ -40,7 +40,7 @@ import org.apache.cassandra.db.*;
 import org.apache.cassandra.db.composites.*;
 import org.apache.cassandra.db.marshal.AbstractType;
 import org.apache.cassandra.exceptions.*;
-import org.apache.cassandra.metrics.CqlStatementMetrics;
+import org.apache.cassandra.metrics.CQLMetrics;
 import org.apache.cassandra.service.ClientState;
 import org.apache.cassandra.service.QueryState;
 import org.apache.cassandra.service.pager.QueryPager;
@@ -88,7 +88,7 @@ public class QueryProcessor implements QueryHandler
 private static final ConcurrentMap 
internalStatements = new ConcurrentHashMap<>();
 
 @VisibleForTesting
-public static final CqlStatementMetrics metrics = new 
CqlStatementMetrics();
+public static final CQLMetrics metrics = new CQLMetrics();
 
 static
 {
@@ -97,10 +97,8 @@ public class QueryProcessor implements QueryHandler
  .weigher(cqlMemoryUsageWeigher)
  .listener(new EvictionListener()
  {
- @Override
  public void onEviction(MD5Digest md5Digest, 
ParsedStatement.Prepared prepared)
  {
- metrics.activePreparedStatements.dec();
  }
  }).build();
 
@@ -109,17 +107,20 @@ public class QueryProcessor implements QueryHandler
.weigher(thriftMemoryUsageWeigher)
.listener(new EvictionListener()
{
-   @Override
public void onEviction(Integer integer, 
CQLStatement cqlStatement)
{
-   
metrics.activePreparedStatements.dec();
}
})
.build();
 
 }
 
-// Work aound initialization dependency
+public static int preparedStatementsCount()
+{
+return preparedStatements.size() + thriftPreparedStatements.size();
+}
+
+// Work around initialization dependency
 private static enum InternalStateInstance
 {
 INSTANCE;
@@ -228,7 +229,7 @@ public class QueryProcessor implements QueryHandler
 throw new InvalidRequestException("Invalid amount of bind 
variables");
 
 if (!queryState.getClientState().isInternal)
-metrics.executedUnprepared.inc();
+metrics.regularStatementsExecuted.inc();
 
 return processStatement(prepared, queryState, options);
 }
@@ -397,28 +398,17 @@ public class QueryProcessor implements QueryHandler
 throw new InvalidRequestException(String.format("Prepared 
statement of size %d bytes is larger than allowed maximum of %d bytes.",
 statementSize,
 
MAX_CACHE_PREPARED_MEMORY));
-try
+if (forThrift)
 {
-if (forThrift)
-{
-int statementId = toHash.hashCode();
-  

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

2014-09-17 Thread aleksey
Merge branch 'cassandra-2.1' into trunk


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

Branch: refs/heads/trunk
Commit: a8285fea60a1bad92fa598c0a2a51eff4575394d
Parents: 48682d6 ad89d44
Author: Aleksey Yeschenko 
Authored: Wed Sep 17 21:04:00 2014 -0700
Committer: Aleksey Yeschenko 
Committed: Wed Sep 17 21:04:00 2014 -0700

--
 .../apache/cassandra/cql3/QueryProcessor.java   |  48 +++
 .../apache/cassandra/metrics/CQLMetrics.java|  60 +
 .../cassandra/metrics/CqlStatementMetrics.java  |  53 
 .../apache/cassandra/cql3/CqlMetricsTest.java   | 114 -
 .../cassandra/metrics/CQLMetricsTest.java   | 124 +++
 5 files changed, 203 insertions(+), 196 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/a8285fea/src/java/org/apache/cassandra/cql3/QueryProcessor.java
--



git commit: Follow up to CASSANDRA-7719

2014-09-17 Thread aleksey
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-2.1 83d15631f -> ad89d4437


Follow up to CASSANDRA-7719

patch by Aleksey Yeschenko; reviewed by Jake Luciani for CASSANDRA-7719


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

Branch: refs/heads/cassandra-2.1
Commit: ad89d4437bd2997f0c9b7bc1812e27d29a41b8db
Parents: 83d1563
Author: Aleksey Yeschenko 
Authored: Wed Sep 17 21:02:15 2014 -0700
Committer: Aleksey Yeschenko 
Committed: Wed Sep 17 21:02:15 2014 -0700

--
 .../apache/cassandra/cql3/QueryProcessor.java   |  48 +++
 .../apache/cassandra/metrics/CQLMetrics.java|  60 +
 .../cassandra/metrics/CqlStatementMetrics.java  |  53 
 .../apache/cassandra/cql3/CqlMetricsTest.java   | 114 -
 .../cassandra/metrics/CQLMetricsTest.java   | 124 +++
 5 files changed, 203 insertions(+), 196 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/ad89d443/src/java/org/apache/cassandra/cql3/QueryProcessor.java
--
diff --git a/src/java/org/apache/cassandra/cql3/QueryProcessor.java 
b/src/java/org/apache/cassandra/cql3/QueryProcessor.java
index efd1ebb..419a3e1 100644
--- a/src/java/org/apache/cassandra/cql3/QueryProcessor.java
+++ b/src/java/org/apache/cassandra/cql3/QueryProcessor.java
@@ -40,7 +40,7 @@ import org.apache.cassandra.db.*;
 import org.apache.cassandra.db.composites.*;
 import org.apache.cassandra.db.marshal.AbstractType;
 import org.apache.cassandra.exceptions.*;
-import org.apache.cassandra.metrics.CqlStatementMetrics;
+import org.apache.cassandra.metrics.CQLMetrics;
 import org.apache.cassandra.service.ClientState;
 import org.apache.cassandra.service.QueryState;
 import org.apache.cassandra.service.pager.QueryPager;
@@ -88,7 +88,7 @@ public class QueryProcessor implements QueryHandler
 private static final ConcurrentMap 
internalStatements = new ConcurrentHashMap<>();
 
 @VisibleForTesting
-public static final CqlStatementMetrics metrics = new 
CqlStatementMetrics();
+public static final CQLMetrics metrics = new CQLMetrics();
 
 static
 {
@@ -97,10 +97,8 @@ public class QueryProcessor implements QueryHandler
  .weigher(cqlMemoryUsageWeigher)
  .listener(new EvictionListener()
  {
- @Override
  public void onEviction(MD5Digest md5Digest, 
ParsedStatement.Prepared prepared)
  {
- metrics.activePreparedStatements.dec();
  }
  }).build();
 
@@ -109,17 +107,20 @@ public class QueryProcessor implements QueryHandler
.weigher(thriftMemoryUsageWeigher)
.listener(new EvictionListener()
{
-   @Override
public void onEviction(Integer integer, 
CQLStatement cqlStatement)
{
-   
metrics.activePreparedStatements.dec();
}
})
.build();
 
 }
 
-// Work aound initialization dependency
+public static int preparedStatementsCount()
+{
+return preparedStatements.size() + thriftPreparedStatements.size();
+}
+
+// Work around initialization dependency
 private static enum InternalStateInstance
 {
 INSTANCE;
@@ -228,7 +229,7 @@ public class QueryProcessor implements QueryHandler
 throw new InvalidRequestException("Invalid amount of bind 
variables");
 
 if (!queryState.getClientState().isInternal)
-metrics.executedUnprepared.inc();
+metrics.regularStatementsExecuted.inc();
 
 return processStatement(prepared, queryState, options);
 }
@@ -397,28 +398,17 @@ public class QueryProcessor implements QueryHandler
 throw new InvalidRequestException(String.format("Prepared 
statement of size %d bytes is larger than allowed maximum of %d bytes.",
 statementSize,
 
MAX_CACHE_PREPARED_MEMORY));
-try
+if (forThrift)
 {
-if (forThrift)
-{
-int statementId = toHash.hashCod

[jira] [Issue Comment Deleted] (CASSANDRA-7968) permissions_validity_in_ms should be settable via JMX

2014-09-17 Thread Brandon Williams (JIRA)

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

Brandon Williams updated CASSANDRA-7968:

Comment: was deleted

(was: Guess I don't really need that null check on oldCache, I'll remove it on 
commit.)

> permissions_validity_in_ms should be settable via JMX
> -
>
> Key: CASSANDRA-7968
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7968
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Core
>Reporter: Brandon Williams
>Assignee: Brandon Williams
>Priority: Minor
> Fix For: 2.0.11, 2.1.1
>
> Attachments: 7968.txt
>
>
> Oftentimes people don't think about auth problems and just run with the 
> default of RF=2 and 2000ms until it's too late, and at that point doing a 
> rolling restart to change the permissions cache can be a bit painful vs 
> setting it via JMX everywhere and then updating the yaml for future restarts.



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


[jira] [Commented] (CASSANDRA-7968) permissions_validity_in_ms should be settable via JMX

2014-09-17 Thread Brandon Williams (JIRA)

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

Brandon Williams commented on CASSANDRA-7968:
-

Guess I don't really need that null check on oldCache, I'll remove it on commit.

> permissions_validity_in_ms should be settable via JMX
> -
>
> Key: CASSANDRA-7968
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7968
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Core
>Reporter: Brandon Williams
>Assignee: Brandon Williams
>Priority: Minor
> Fix For: 2.0.11, 2.1.1
>
> Attachments: 7968.txt
>
>
> Oftentimes people don't think about auth problems and just run with the 
> default of RF=2 and 2000ms until it's too late, and at that point doing a 
> rolling restart to change the permissions cache can be a bit painful vs 
> setting it via JMX everywhere and then updating the yaml for future restarts.



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


[jira] [Commented] (CASSANDRA-7719) Add PreparedStatements related metrics

2014-09-17 Thread T Jake Luciani (JIRA)

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

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

+1

> Add PreparedStatements related metrics
> --
>
> Key: CASSANDRA-7719
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7719
> Project: Cassandra
>  Issue Type: New Feature
>Reporter: Michaël Figuière
>Assignee: T Jake Luciani
>Priority: Minor
> Fix For: 2.1.1
>
> Attachments: 7719-followup.txt, 7719.txt
>
>
> Cassandra newcomers often don't understand that they're expected to use 
> PreparedStatements for almost all of their repetitive queries executed in 
> production.
> It doesn't look like Cassandra currently expose any PreparedStatements 
> related metrics.It would be interesting, and I believe fairly simple, to add 
> several of them to make it possible, in development / management / monitoring 
> tools, to show warnings or alerts related to this bad practice.
> Thus I would suggest to add the following metrics:
> * Executed prepared statements count
> * Executed unprepared statements count
> * Amount of PreparedStatements that have been registered on the node



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


[jira] [Commented] (CASSANDRA-7965) Active commit log doesn't get archived on Cassandra restart

2014-09-17 Thread Max Barnash (JIRA)

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

Max Barnash commented on CASSANDRA-7965:


Right, looks like a duplicate. Sorry for that, failed to find #6904.

> Active commit log doesn't get archived on Cassandra restart
> ---
>
> Key: CASSANDRA-7965
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7965
> Project: Cassandra
>  Issue Type: Bug
>Reporter: Max Barnash
>
> After a restart Cassandra replays and recycles all present commit logs. 
> Because active commit log never gets archived, we lose some of the data from 
> the archives.
> One of the ways to fix this would be archiving all commit logs at startup 
> before replaying and recycling them.



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


[jira] [Commented] (CASSANDRA-7965) Active commit log doesn't get archived on Cassandra restart

2014-09-17 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis commented on CASSANDRA-7965:
---

NB: archiving everything is a simpler solution than we discussed in 6904, but 
it's only safe in 2.1.  (2.0 has non-idempotent counter replay.)

> Active commit log doesn't get archived on Cassandra restart
> ---
>
> Key: CASSANDRA-7965
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7965
> Project: Cassandra
>  Issue Type: Bug
>Reporter: Max Barnash
>
> After a restart Cassandra replays and recycles all present commit logs. 
> Because active commit log never gets archived, we lose some of the data from 
> the archives.
> One of the ways to fix this would be archiving all commit logs at startup 
> before replaying and recycling them.



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


[jira] [Commented] (CASSANDRA-7965) Active commit log doesn't get archived on Cassandra restart

2014-09-17 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis commented on CASSANDRA-7965:
---

Isn't this the same as CASSANDRA-6904?

> Active commit log doesn't get archived on Cassandra restart
> ---
>
> Key: CASSANDRA-7965
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7965
> Project: Cassandra
>  Issue Type: Bug
>Reporter: Max Barnash
>
> After a restart Cassandra replays and recycles all present commit logs. 
> Because active commit log never gets archived, we lose some of the data from 
> the archives.
> One of the ways to fix this would be archiving all commit logs at startup 
> before replaying and recycling them.



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


[jira] [Updated] (CASSANDRA-7968) permissions_validity_in_ms should be settable via JMX

2014-09-17 Thread Brandon Williams (JIRA)

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

Brandon Williams updated CASSANDRA-7968:

Attachment: (was: 7968.txt)

> permissions_validity_in_ms should be settable via JMX
> -
>
> Key: CASSANDRA-7968
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7968
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Core
>Reporter: Brandon Williams
>Assignee: Brandon Williams
>Priority: Minor
> Fix For: 2.0.11, 2.1.1
>
> Attachments: 7968.txt
>
>
> Oftentimes people don't think about auth problems and just run with the 
> default of RF=2 and 2000ms until it's too late, and at that point doing a 
> rolling restart to change the permissions cache can be a bit painful vs 
> setting it via JMX everywhere and then updating the yaml for future restarts.



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


[jira] [Updated] (CASSANDRA-7968) permissions_validity_in_ms should be settable via JMX

2014-09-17 Thread Brandon Williams (JIRA)

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

Brandon Williams updated CASSANDRA-7968:

Attachment: 7968.txt

> permissions_validity_in_ms should be settable via JMX
> -
>
> Key: CASSANDRA-7968
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7968
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Core
>Reporter: Brandon Williams
>Assignee: Brandon Williams
>Priority: Minor
> Fix For: 2.0.11, 2.1.1
>
> Attachments: 7968.txt
>
>
> Oftentimes people don't think about auth problems and just run with the 
> default of RF=2 and 2000ms until it's too late, and at that point doing a 
> rolling restart to change the permissions cache can be a bit painful vs 
> setting it via JMX everywhere and then updating the yaml for future restarts.



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


[jira] [Updated] (CASSANDRA-7968) permissions_validity_in_ms should be settable via JMX

2014-09-17 Thread Brandon Williams (JIRA)

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

Brandon Williams updated CASSANDRA-7968:

Attachment: (was: 7968.txt)

> permissions_validity_in_ms should be settable via JMX
> -
>
> Key: CASSANDRA-7968
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7968
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Core
>Reporter: Brandon Williams
>Assignee: Brandon Williams
>Priority: Minor
> Fix For: 2.0.11, 2.1.1
>
> Attachments: 7968.txt
>
>
> Oftentimes people don't think about auth problems and just run with the 
> default of RF=2 and 2000ms until it's too late, and at that point doing a 
> rolling restart to change the permissions cache can be a bit painful vs 
> setting it via JMX everywhere and then updating the yaml for future restarts.



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


[jira] [Updated] (CASSANDRA-7968) permissions_validity_in_ms should be settable via JMX

2014-09-17 Thread Brandon Williams (JIRA)

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

Brandon Williams updated CASSANDRA-7968:

Attachment: 7968.txt

> permissions_validity_in_ms should be settable via JMX
> -
>
> Key: CASSANDRA-7968
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7968
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Core
>Reporter: Brandon Williams
>Assignee: Brandon Williams
>Priority: Minor
> Fix For: 2.0.11, 2.1.1
>
> Attachments: 7968.txt
>
>
> Oftentimes people don't think about auth problems and just run with the 
> default of RF=2 and 2000ms until it's too late, and at that point doing a 
> rolling restart to change the permissions cache can be a bit painful vs 
> setting it via JMX everywhere and then updating the yaml for future restarts.



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


[jira] [Commented] (CASSANDRA-5357) Query cache / partition head cache

2014-09-17 Thread Robert Coli (JIRA)

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

Robert Coli commented on CASSANDRA-5357:


[~krummas] : To be 100% clear, this keeps the "invalidate on write" behavior 
from the previous Row Cache? 

(Your previous answer to [~d-_-b] implies so, but people reading this ticket 
might still be unclear.)

> Query cache / partition head cache
> --
>
> Key: CASSANDRA-5357
> URL: https://issues.apache.org/jira/browse/CASSANDRA-5357
> Project: Cassandra
>  Issue Type: New Feature
>Reporter: Jonathan Ellis
>Assignee: Marcus Eriksson
> Fix For: 2.1 beta1
>
> Attachments: 0001-Cache-a-configurable-amount-of-columns.patch
>
>
> I think that most people expect the row cache to act like a query cache, 
> because that's a reasonable model.  Caching the entire partition is, in 
> retrospect, not really reasonable, so it's not surprising that it catches 
> people off guard, especially given the confusion we've inflicted on ourselves 
> as to what a "row" constitutes.
> I propose replacing it with a true query cache.



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


[jira] [Updated] (CASSANDRA-7946) NPE when streaming data to a joining node and dropping table in cluster

2014-09-17 Thread Yuki Morishita (JIRA)

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

Yuki Morishita updated CASSANDRA-7946:
--
Attachment: 7946-2.0.txt

There are 3 places where streaming looks up table.
Attached patch checks if table metadata is not null.

> NPE when streaming data to a joining node and dropping table in cluster
> ---
>
> Key: CASSANDRA-7946
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7946
> Project: Cassandra
>  Issue Type: Bug
>  Components: Core
> Environment: Cassandra 2.0.9
>Reporter: DOAN DuyHai
>Assignee: Yuki Morishita
> Attachments: 7946-2.0.txt
>
>
> Summary
>  The cluster has 3 nodes with Vnodes. We were adding a 4th one (in auto 
> bootstrap mode). The 4 node has stream sessions, receiving data from the 
> others.
>  While the streaming was going on (it takes quite a while because there are 
> 200Gb of data of worth), an existing table is dropped in the cluster and a 
> new one is created.
>  A few time after, we caught an NPE in the log file of the joining node 
> (still not finished joining):
>  The NPE is located here: 
> https://github.com/apache/cassandra/blob/cassandra-2.0/src/java/org/apache/cassandra/streaming/compress/CompressedStreamReader.java#L63
>  It can be a race condition where schema agreement has not reached the 
> joining node.



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


[jira] [Updated] (CASSANDRA-7968) permissions_validity_in_ms should be settable via JMX

2014-09-17 Thread Brandon Williams (JIRA)

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

Brandon Williams updated CASSANDRA-7968:

Attachment: 7968.txt

> permissions_validity_in_ms should be settable via JMX
> -
>
> Key: CASSANDRA-7968
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7968
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Core
>Reporter: Brandon Williams
>Assignee: Brandon Williams
>Priority: Minor
> Fix For: 2.0.11, 2.1.1
>
> Attachments: 7968.txt
>
>
> Oftentimes people don't think about auth problems and just run with the 
> default of RF=2 and 2000ms until it's too late, and at that point doing a 
> rolling restart to change the permissions cache can be a bit painful vs 
> setting it via JMX everywhere and then updating the yaml for future restarts.



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


[jira] [Updated] (CASSANDRA-7968) permissions_validity_in_ms should be settable via JMX

2014-09-17 Thread Brandon Williams (JIRA)

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

Brandon Williams updated CASSANDRA-7968:

Attachment: (was: 7968.txt)

> permissions_validity_in_ms should be settable via JMX
> -
>
> Key: CASSANDRA-7968
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7968
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Core
>Reporter: Brandon Williams
>Assignee: Brandon Williams
>Priority: Minor
> Fix For: 2.0.11, 2.1.1
>
> Attachments: 7968.txt
>
>
> Oftentimes people don't think about auth problems and just run with the 
> default of RF=2 and 2000ms until it's too late, and at that point doing a 
> rolling restart to change the permissions cache can be a bit painful vs 
> setting it via JMX everywhere and then updating the yaml for future restarts.



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


[jira] [Commented] (CASSANDRA-7966) 1.2.18 -> 2.0.10 upgrade compactions_in_progress: java.lang.IllegalArgumentException

2014-09-17 Thread Karl Mueller (JIRA)

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

Karl Mueller commented on CASSANDRA-7966:
-

It's not a new node. This is a very old cluster that's been migrated since the 
0.6.x days. It was running 1.2.18, and I'm upgrading it to 2.0.10.

upgradesstables was run on every node in it using 1.2.18

> 1.2.18 -> 2.0.10 upgrade compactions_in_progress: 
> java.lang.IllegalArgumentException
> 
>
> Key: CASSANDRA-7966
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7966
> Project: Cassandra
>  Issue Type: Bug
> Environment: JDK 1.7
>Reporter: Karl Mueller
>Priority: Minor
>
> This happened on a new node when starting 2.0.10 after 1.2.18 with complete 
> upgradesstables run:
> {noformat}
>  INFO 15:31:11,532 Enqueuing flush of 
> Memtable-compactions_in_progress@1366724594(0/0 serialized/live bytes, 1 ops)
>  INFO 15:31:11,532 Writing Memtable-compactions_in_progress@1366724594(0/0 
> serialized/live bytes, 1 ops)
>  INFO 15:31:11,547 Completed flushing 
> /data2/data-cassandra/system/compactions_in_progress/system-compactions_in_progress-jb-10-Data.db
>  (42 bytes) for commitlog position ReplayPosition(segmentId=1410993002452, 
> position=164409)
> ERROR 15:31:11,550 Exception in thread Thread[CompactionExecutor:36,1,main]
> java.lang.IllegalArgumentException
> at java.nio.Buffer.limit(Buffer.java:267)
> at 
> org.apache.cassandra.utils.ByteBufferUtil.readBytes(ByteBufferUtil.java:587)
> at 
> org.apache.cassandra.utils.ByteBufferUtil.readBytesWithShortLength(ByteBufferUtil.java:596)
> at 
> org.apache.cassandra.db.marshal.AbstractCompositeType.compare(AbstractCompositeType.java:61)
> at 
> org.apache.cassandra.db.marshal.AbstractCompositeType.compare(AbstractCompositeType.java:36)
> at 
> org.apache.cassandra.db.ArrayBackedSortedColumns.addColumn(ArrayBackedSortedColumns.java:112)
> at 
> org.apache.cassandra.db.ColumnFamily.addColumn(ColumnFamily.java:116)
> at org.apache.cassandra.db.ColumnFamily.addAtom(ColumnFamily.java:150)
> 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.(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.runWith(CompactionTask.java:143)
> at 
> org.apache.cassandra.io.util.DiskAwareRunnable.runMayThrow(DiskAwareRunnable.java:48)
> 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:724)
> {noformat}



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


[jira] [Commented] (CASSANDRA-7966) 1.2.18 -> 2.0.10 upgrade compactions_in_progress: java.lang.IllegalArgumentException

2014-09-17 Thread Michael Shuler (JIRA)

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

Michael Shuler commented on CASSANDRA-7966:
---

(added noformat to OP)

I'm unclear - you mention this is a "new node".  Does this mean a new, freshly 
installed 2.0.10 node added to a once-1.2.18-but-now-upgraded-to-2.0.10 
cluster? Or a freshly installed 1.2.18 node, then upgraded to 2.0.10?  I assume 
the latter.

> 1.2.18 -> 2.0.10 upgrade compactions_in_progress: 
> java.lang.IllegalArgumentException
> 
>
> Key: CASSANDRA-7966
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7966
> Project: Cassandra
>  Issue Type: Bug
> Environment: JDK 1.7
>Reporter: Karl Mueller
>Priority: Minor
>
> This happened on a new node when starting 2.0.10 after 1.2.18 with complete 
> upgradesstables run:
> {noformat}
>  INFO 15:31:11,532 Enqueuing flush of 
> Memtable-compactions_in_progress@1366724594(0/0 serialized/live bytes, 1 ops)
>  INFO 15:31:11,532 Writing Memtable-compactions_in_progress@1366724594(0/0 
> serialized/live bytes, 1 ops)
>  INFO 15:31:11,547 Completed flushing 
> /data2/data-cassandra/system/compactions_in_progress/system-compactions_in_progress-jb-10-Data.db
>  (42 bytes) for commitlog position ReplayPosition(segmentId=1410993002452, 
> position=164409)
> ERROR 15:31:11,550 Exception in thread Thread[CompactionExecutor:36,1,main]
> java.lang.IllegalArgumentException
> at java.nio.Buffer.limit(Buffer.java:267)
> at 
> org.apache.cassandra.utils.ByteBufferUtil.readBytes(ByteBufferUtil.java:587)
> at 
> org.apache.cassandra.utils.ByteBufferUtil.readBytesWithShortLength(ByteBufferUtil.java:596)
> at 
> org.apache.cassandra.db.marshal.AbstractCompositeType.compare(AbstractCompositeType.java:61)
> at 
> org.apache.cassandra.db.marshal.AbstractCompositeType.compare(AbstractCompositeType.java:36)
> at 
> org.apache.cassandra.db.ArrayBackedSortedColumns.addColumn(ArrayBackedSortedColumns.java:112)
> at 
> org.apache.cassandra.db.ColumnFamily.addColumn(ColumnFamily.java:116)
> at org.apache.cassandra.db.ColumnFamily.addAtom(ColumnFamily.java:150)
> 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.(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.runWith(CompactionTask.java:143)
> at 
> org.apache.cassandra.io.util.DiskAwareRunnable.runMayThrow(DiskAwareRunnable.java:48)
> 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:724)
> {noformat}



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


[jira] [Updated] (CASSANDRA-7966) 1.2.18 -> 2.0.10 upgrade compactions_in_progress: java.lang.IllegalArgumentException

2014-09-17 Thread Michael Shuler (JIRA)

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

Michael Shuler updated CASSANDRA-7966:
--
Description: 
This happened on a new node when starting 2.0.10 after 1.2.18 with complete 
upgradesstables run:

{noformat}
 INFO 15:31:11,532 Enqueuing flush of 
Memtable-compactions_in_progress@1366724594(0/0 serialized/live bytes, 1 ops)
 INFO 15:31:11,532 Writing Memtable-compactions_in_progress@1366724594(0/0 
serialized/live bytes, 1 ops)
 INFO 15:31:11,547 Completed flushing 
/data2/data-cassandra/system/compactions_in_progress/system-compactions_in_progress-jb-10-Data.db
 (42 bytes) for commitlog position ReplayPosition(segmentId=1410993002452, 
position=164409)
ERROR 15:31:11,550 Exception in thread Thread[CompactionExecutor:36,1,main]
java.lang.IllegalArgumentException
at java.nio.Buffer.limit(Buffer.java:267)
at 
org.apache.cassandra.utils.ByteBufferUtil.readBytes(ByteBufferUtil.java:587)
at 
org.apache.cassandra.utils.ByteBufferUtil.readBytesWithShortLength(ByteBufferUtil.java:596)
at 
org.apache.cassandra.db.marshal.AbstractCompositeType.compare(AbstractCompositeType.java:61)
at 
org.apache.cassandra.db.marshal.AbstractCompositeType.compare(AbstractCompositeType.java:36)
at 
org.apache.cassandra.db.ArrayBackedSortedColumns.addColumn(ArrayBackedSortedColumns.java:112)
at org.apache.cassandra.db.ColumnFamily.addColumn(ColumnFamily.java:116)
at org.apache.cassandra.db.ColumnFamily.addAtom(ColumnFamily.java:150)
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.(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.runWith(CompactionTask.java:143)
at 
org.apache.cassandra.io.util.DiskAwareRunnable.runMayThrow(DiskAwareRunnable.java:48)
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:724)
{noformat}

  was:

This happened on a new node when starting 2.0.10 after 1.2.18 with complete 
upgradesstables run:


 INFO 15:31:11,532 Enqueuing flush of 
Memtable-compactions_in_progress@1366724594(0/0 serialized/live bytes, 1 ops)
 INFO 15:31:11,532 Writing Memtable-compactions_in_progress@1366724594(0/0 
serialized/live bytes, 1 ops)
 INFO 15:31:11,547 Completed flushing 
/data2/data-cassandra/system/compactions_in_progress/system-compactions_in_progress-jb-10-Data.db
 (42 bytes) for commitlog position ReplayPosition(segmentId=1410993002452, 
position=164409)
ERROR 15:31:11,550 Exception in thread Thread[CompactionExecutor:36,1,main]
java.lang.IllegalArgumentException
at java.nio.Buffer.limit(Buffer.java:267)
at 
org.apache.cassandra.utils.ByteBufferUtil.readBytes(ByteBufferUtil.java:587)
at 
org.apache.cassandra.utils.ByteBufferUtil.readBytesWithShortLength(ByteBufferUtil.java:596)
at 
org.apache.cassandra.db.marshal.AbstractCompositeType.compare(AbstractCompositeType.java:61)
at 
org.apache.cassandra.db.marshal.AbstractCompositeType.compare(AbstractCompositeType.java:36)
at 
org.apache.cassandra.db.ArrayBackedSortedColumns.addColumn(ArrayBackedSortedColumns.java:112)
at org.apache.cassandra.db.ColumnFamily.addColumn(ColumnFamily.java:116)
at org.apache.c

[jira] [Updated] (CASSANDRA-7968) permissions_validity_in_ms should be settable via JMX

2014-09-17 Thread Brandon Williams (JIRA)

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

Brandon Williams updated CASSANDRA-7968:

Attachment: 7968.txt

Patch to make this settable via a new AuthMBean.

> permissions_validity_in_ms should be settable via JMX
> -
>
> Key: CASSANDRA-7968
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7968
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Core
>Reporter: Brandon Williams
>Assignee: Brandon Williams
>Priority: Minor
> Fix For: 2.0.11, 2.1.1
>
> Attachments: 7968.txt
>
>
> Oftentimes people don't think about auth problems and just run with the 
> default of RF=2 and 2000ms until it's too late, and at that point doing a 
> rolling restart to change the permissions cache can be a bit painful vs 
> setting it via JMX everywhere and then updating the yaml for future restarts.



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


[jira] [Created] (CASSANDRA-7968) permissions_validity_in_ms should be settable via JMX

2014-09-17 Thread Brandon Williams (JIRA)
Brandon Williams created CASSANDRA-7968:
---

 Summary: permissions_validity_in_ms should be settable via JMX
 Key: CASSANDRA-7968
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7968
 Project: Cassandra
  Issue Type: Improvement
  Components: Core
Reporter: Brandon Williams
Assignee: Brandon Williams
Priority: Minor
 Fix For: 2.0.11, 2.1.1


Oftentimes people don't think about auth problems and just run with the default 
of RF=2 and 2000ms until it's too late, and at that point doing a rolling 
restart to change the permissions cache can be a bit painful vs setting it via 
JMX everywhere and then updating the yaml for future restarts.



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


[jira] [Commented] (CASSANDRA-5777) Crash if internode compression is on

2014-09-17 Thread Peter Magnusson (JIRA)

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

Peter Magnusson commented on CASSANDRA-5777:


It crashes even if compression is of. I'm getting segfaults using 
apache-cassandra 2.1.0.
In cassandra.yaml i do have *internode_compression: none*
I can trigger it by just letting cassandra start and then try to connect with 
cqlsh on the same, or remote, machine.

I had the impression that snappy wasn't used if compression was disabled but it 
doesn't look like it.

{noformat}
bin/cqlsh 192.168.1.166
Connection error: ('Unable to connect to any servers', {'192.168.1.166': 
ConnectionShutdown('Connection  is already closed',)})
{noformat}

{noformat}
INFO  23:31:27 Enqueuing flush of local: 636 (0%) on-heap, 0 (0%) off-heap
INFO  23:31:27 Writing Memtable-local@18046640(104 serialized bytes, 4 ops, 
0%/0% of on/off-heap limit)
INFO  23:31:28 Completed flushing 
/home/pi/apache-cassandra-2.1.0/bin/../data/data/system/local-7ad54392bcdd35a684174e047860b377/system-local-ka-51-Data.db
 (116 bytes) for commitlog position ReplayPosition(segmentId=1410996668320, 
position=87353)
INFO  23:31:28 Enqueuing flush of local: 49383 (0%) on-heap, 0 (0%) off-heap
INFO  23:31:28 Writing Memtable-local@16539197(8541 serialized bytes, 259 ops, 
0%/0% of on/off-heap limit)
INFO  23:31:28 Completed flushing 
/home/pi/apache-cassandra-2.1.0/bin/../data/data/system/local-7ad54392bcdd35a684174e047860b377/system-local-ka-52-Data.db
 (5291 bytes) for commitlog position ReplayPosition(segmentId=1410996668320, 
position=99326)
INFO  23:31:28 Compacting 
[SSTableReader(path='/home/pi/apache-cassandra-2.1.0/bin/../data/data/system/local-7ad54392bcdd35a684174e047860b377/system-local-ka-50-Data.db'),
 
SSTableReader(path='/home/pi/apache-cassandra-2.1.0/bin/../data/data/system/local-7ad54392bcdd35a684174e047860b377/system-local-ka-52-Data.db'),
 
SSTableReader(path='/home/pi/apache-cassandra-2.1.0/bin/../data/data/system/local-7ad54392bcdd35a684174e047860b377/system-local-ka-49-Data.db'),
 
SSTableReader(path='/home/pi/apache-cassandra-2.1.0/bin/../data/data/system/local-7ad54392bcdd35a684174e047860b377/system-local-ka-51-Data.db')]
INFO  23:31:29 Node /192.168.1.166 state jump to normal
INFO  23:31:29 Waiting for gossip to settle before accepting client requests...
INFO  23:31:29 Compacted 4 sstables to 
[bin/../data/data/system/local-7ad54392bcdd35a684174e047860b377/system-local-ka-53,].
  11,383 bytes to 5,732 (~50% of original) in 1,147ms = 0.004766MB/s.  4 total 
partitions merged to 1.  Partition merge counts were {4:1, }
INFO  23:31:37 No gossip backlog; proceeding
INFO  23:31:39 Using Netty Version: 
[netty-buffer=netty-buffer-4.0.20.Final.1709113, 
netty-codec=netty-codec-4.0.20.Final.1709113, 
netty-codec-http=netty-codec-http-4.0.20.Final.1709113, 
netty-codec-socks=netty-codec-socks-4.0.20.Final.1709113, 
netty-common=netty-common-4.0.20.Final.1709113, 
netty-handler=netty-handler-4.0.20.Final.1709113, 
netty-transport=netty-transport-4.0.20.Final.1709113, 
netty-transport-rxtx=netty-transport-rxtx-4.0.20.Final.1709113, 
netty-transport-sctp=netty-transport-sctp-4.0.20.Final.1709113, 
netty-transport-udt=netty-transport-udt-4.0.20.Final.1709113]
INFO  23:31:39 Starting listening for CQL clients on /192.168.1.166:9042...
INFO  23:31:40 Binding thrift service to /192.168.1.166:9160
INFO  23:31:40 Listening for thrift clients...
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGILL (0x4) at pc=0x996f2254, pid=10493, tid=2630349936
#
# JRE version: Java(TM) SE Runtime Environment (7.0_40-b43) (build 1.7.0_40-b43)
# Java VM: Java HotSpot(TM) Client VM (24.0-b56 mixed mode linux-arm )
# Problematic frame:
# C  [snappy-1.0.5.2-libsnappyjava.so+0x1254]  _init+0x223
#
# Failed to write core dump. Core dumps have been disabled. To enable core 
dumping, try "ulimit -c unlimited" before starting Java again
#
# An error report file with more information is saved as:
# /home/pi/apache-cassandra-2.1.0/hs_err_pid10493.log
Segmentation fault

{noformat}


> Crash  if internode compression is on
> -
>
> Key: CASSANDRA-5777
> URL: https://issues.apache.org/jira/browse/CASSANDRA-5777
> Project: Cassandra
>  Issue Type: Bug
>Affects Versions: 2.0 beta 1
> Environment: Raspberry Pi, Oracle jdk 1.8
>Reporter: Andy Cobley
>Priority: Minor
>
> 2 node Raspberry Pi system.  Node one is started fine.  Try and start node 2 
> making sure that both nodes have internnode compression turned on:
> internode_compression: all
> When node 2 starts there is a crash.  Trace is:
> {noformat}
> DEBUG 10:45:08,432 adding 
> /var/lib/cassandra/data/system/local/system-local-ja-2 to list of files 
> tracked for system.local
> DEBUG 10:45:08,438 Scheduli

[jira] [Updated] (CASSANDRA-7838) Warn user when disks are network/ebs mounted

2014-09-17 Thread Tyler Hobbs (JIRA)

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

Tyler Hobbs updated CASSANDRA-7838:
---
Labels: bootcamp lhf  (was: lhf)

> Warn user when disks are network/ebs mounted
> 
>
> Key: CASSANDRA-7838
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7838
> Project: Cassandra
>  Issue Type: Improvement
>Reporter: T Jake Luciani
>Priority: Minor
>  Labels: bootcamp, lhf
> Fix For: 3.0
>
>
> The Sigar project let's you probe os/cpu/filesystems across the major 
> platforms.
> https://github.com/hyperic/sigar
> It would be nice on start-up to use this to warn users if they are running 
> with settings that will make them sad, like Network drive or EBS on Ec2.



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


[jira] [Updated] (CASSANDRA-7927) Kill daemon on any disk error

2014-09-17 Thread Tyler Hobbs (JIRA)

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

Tyler Hobbs updated CASSANDRA-7927:
---
Labels: bootcamp lhf  (was: lhf)

> Kill daemon on any disk error
> -
>
> Key: CASSANDRA-7927
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7927
> Project: Cassandra
>  Issue Type: New Feature
>  Components: Core
> Environment: aws, stock cassandra or dse
>Reporter: John Sumsion
>Assignee: John Sumsion
>  Labels: bootcamp, lhf
> Fix For: 2.1.1
>
> Attachments: 7927-v1-die.patch
>
>
> We got a disk read error on 1.2.13 that didn't trigger the disk failure 
> policy, and I'm trying to hunt down why, but in doing so, I saw that there is 
> no disk_failure_policy option for just killing the daemon.
> If we ever get a corrupt sstable, we want to replace the node anyway, because 
> some aws instance store disks just go bad.
> I want to use the JVMStabilityInspector from CASSANDRA-7507 to kill so that 
> remains standard, so I will base my patch on CASSANDRA-7507.



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


[jira] [Created] (CASSANDRA-7967) Include schema_triggers CF in readable system resources

2014-09-17 Thread Adam Holmberg (JIRA)
Adam Holmberg created CASSANDRA-7967:


 Summary: Include schema_triggers CF in readable system resources
 Key: CASSANDRA-7967
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7967
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Reporter: Adam Holmberg
 Fix For: 2.0.11, 2.1.1
 Attachments: schema_triggers_readable.txt

SCHEMA_TRIGGERS_CF is missing from readable system resources.

This makes tools, which attempt to read schema information, fail when 
authorization is enabled.

Patch attached.



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


[jira] [Commented] (CASSANDRA-7410) Pig support for BulkOutputFormat as a parameter in url

2014-09-17 Thread Brandon Williams (JIRA)

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

Brandon Williams commented on CASSANDRA-7410:
-

I'd prefer just rebasing the first much smaller patch, rather than do such a 
large refactoring in a minor release. We can do that in 2.1 if that's what we 
want.

> Pig support for BulkOutputFormat as a parameter in url
> --
>
> Key: CASSANDRA-7410
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7410
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Hadoop
>Reporter: Alex Liu
>Assignee: Alex Liu
>Priority: Minor
> Fix For: 2.0.11
>
> Attachments: 7410-2.0-branch.txt, 7410-v2-2.0-branch.txt
>
>
> Add BulkOutputFormat support in Pig url



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


[jira] [Commented] (CASSANDRA-7949) LCS compaction low performance, many pending compactions, nodes are almost idle

2014-09-17 Thread Nikolai Grigoriev (JIRA)

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

Nikolai Grigoriev commented on CASSANDRA-7949:
--

Just an update: I have switched to STCS early this morning and by now half of 
the nodes are getting close to zero pending transactions. Half of remaining 
nodes seem to be behind but they are compacting at full speed (smoke coming 
from the lab ;) ) and I see the number of pending compactions going down on 
them as well. On the nodes where compactions are almost over the number of 
sstables is now very small, less than a hundred.


> LCS compaction low performance, many pending compactions, nodes are almost 
> idle
> ---
>
> Key: CASSANDRA-7949
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7949
> Project: Cassandra
>  Issue Type: Bug
>  Components: Core
> Environment: DSE 4.5.1-1, Cassandra 2.0.8
>Reporter: Nikolai Grigoriev
> Attachments: iostats.txt, nodetool_compactionstats.txt, 
> nodetool_tpstats.txt, pending compactions 2day.png, system.log.gz, vmstat.txt
>
>
> I've been evaluating new cluster of 15 nodes (32 core, 6x800Gb SSD disks + 
> 2x600Gb SAS, 128Gb RAM, OEL 6.5) and I've built a simulator that creates the 
> load similar to the load in our future product. Before running the simulator 
> I had to pre-generate enough data. This was done using Java code and DataStax 
> Java driver. To avoid going deep into details, two tables have been 
> generated. Each table currently has about 55M rows and between few dozens and 
> few thousands of columns in each row.
> This data generation process was generating massive amount of non-overlapping 
> data. Thus, the activity was write-only and highly parallel. This is not the 
> type of the traffic that the system will have ultimately to deal with, it 
> will be mix of reads and updates to the existing data in the future. This is 
> just to explain the choice of LCS, not mentioning the expensive SSD disk 
> space.
> At some point while generating the data I have noticed that the compactions 
> started to pile up. I knew that I was overloading the cluster but I still 
> wanted the genration test to complete. I was expecting to give the cluster 
> enough time to finish the pending compactions and get ready for real traffic.
> However, after the storm of write requests have been stopped I have noticed 
> that the number of pending compactions remained constant (and even climbed up 
> a little bit) on all nodes. After trying to tune some parameters (like 
> setting the compaction bandwidth cap to 0) I have noticed a strange pattern: 
> the nodes were compacting one of the CFs in a single stream using virtually 
> no CPU and no disk I/O. This process was taking hours. After that it would be 
> followed by a short burst of few dozens of compactions running in parallel 
> (CPU at 2000%, some disk I/O - up to 10-20%) and then getting stuck again for 
> many hours doing one compaction at time. So it looks like this:
> # nodetool compactionstats
> pending tasks: 3351
>   compaction typekeyspace   table   completed 
>   total  unit  progress
>Compaction  myks table_list1 66499295588   
> 1910515889913 bytes 3.48%
> Active compaction remaining time :n/a
> # df -h
> ...
> /dev/sdb1.5T  637G  854G  43% /cassandra-data/disk1
> /dev/sdc1.5T  425G  1.1T  29% /cassandra-data/disk2
> /dev/sdd1.5T  429G  1.1T  29% /cassandra-data/disk3
> # find . -name **table_list1**Data** | grep -v snapshot | wc -l
> 1310
> Among these files I see:
> 1043 files of 161Mb (my sstable size is 160Mb)
> 9 large files - 3 between 1 and 2Gb, 3 of 5-8Gb, 55Gb, 70Gb and 370Gb
> 263 files of various sized - between few dozens of Kb and 160Mb
> I've been running the heavy load for about 1,5days and it's been close to 3 
> days after that and the number of pending compactions does not go down.
> I have applied one of the not-so-obvious recommendations to disable 
> multithreaded compactions and that seems to be helping a bit - I see some 
> nodes started to have fewer pending compactions. About half of the cluster, 
> in fact. But even there I see they are sitting idle most of the time lazily 
> compacting in one stream with CPU at ~140% and occasionally doing the bursts 
> of compaction work for few minutes.
> I am wondering if this is really a bug or something in the LCS logic that 
> would manifest itself only in such an edge case scenario where I have loaded 
> lots of unique data quickly.
> By the way, I see this pattern only for one of two tables - the one that has 
> about 4 times more data than another (space-wise, number of rows is the 
> same). Looks

[jira] [Created] (CASSANDRA-7966) 1.2.18 -> 2.0.10 upgrade compactions_in_progress: java.lang.IllegalArgumentException

2014-09-17 Thread Karl Mueller (JIRA)
Karl Mueller created CASSANDRA-7966:
---

 Summary: 1.2.18 -> 2.0.10 upgrade compactions_in_progress: 
java.lang.IllegalArgumentException
 Key: CASSANDRA-7966
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7966
 Project: Cassandra
  Issue Type: Bug
 Environment: JDK 1.7

Reporter: Karl Mueller
Priority: Minor



This happened on a new node when starting 2.0.10 after 1.2.18 with complete 
upgradesstables run:


 INFO 15:31:11,532 Enqueuing flush of 
Memtable-compactions_in_progress@1366724594(0/0 serialized/live bytes, 1 ops)
 INFO 15:31:11,532 Writing Memtable-compactions_in_progress@1366724594(0/0 
serialized/live bytes, 1 ops)
 INFO 15:31:11,547 Completed flushing 
/data2/data-cassandra/system/compactions_in_progress/system-compactions_in_progress-jb-10-Data.db
 (42 bytes) for commitlog position ReplayPosition(segmentId=1410993002452, 
position=164409)
ERROR 15:31:11,550 Exception in thread Thread[CompactionExecutor:36,1,main]
java.lang.IllegalArgumentException
at java.nio.Buffer.limit(Buffer.java:267)
at 
org.apache.cassandra.utils.ByteBufferUtil.readBytes(ByteBufferUtil.java:587)
at 
org.apache.cassandra.utils.ByteBufferUtil.readBytesWithShortLength(ByteBufferUtil.java:596)
at 
org.apache.cassandra.db.marshal.AbstractCompositeType.compare(AbstractCompositeType.java:61)
at 
org.apache.cassandra.db.marshal.AbstractCompositeType.compare(AbstractCompositeType.java:36)
at 
org.apache.cassandra.db.ArrayBackedSortedColumns.addColumn(ArrayBackedSortedColumns.java:112)
at org.apache.cassandra.db.ColumnFamily.addColumn(ColumnFamily.java:116)
at org.apache.cassandra.db.ColumnFamily.addAtom(ColumnFamily.java:150)
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.(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.runWith(CompactionTask.java:143)
at 
org.apache.cassandra.io.util.DiskAwareRunnable.runMayThrow(DiskAwareRunnable.java:48)
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:724)



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


[jira] [Commented] (CASSANDRA-7965) Active commit log doesn't get archived on Cassandra restart

2014-09-17 Thread Benedict (JIRA)

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

Benedict commented on CASSANDRA-7965:
-

In practice it could be any CL that hasn't already been recycled. We should 
trigger an archive of every existing file on startup.

> Active commit log doesn't get archived on Cassandra restart
> ---
>
> Key: CASSANDRA-7965
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7965
> Project: Cassandra
>  Issue Type: Bug
>Reporter: Max Barnash
>
> After a restart Cassandra replays and recycles all present commit logs. 
> Because active commit log never gets archived, we lose some of the data from 
> the archives.
> One of the ways to fix this would be archiving all commit logs at startup 
> before replaying and recycling them.



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


[Cassandra Wiki] Update of "ClientOptions" by TylerHobbs

2014-09-17 Thread Apache Wiki
Dear Wiki user,

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

The "ClientOptions" page has been changed by TylerHobbs:
https://wiki.apache.org/cassandra/ClientOptions?action=diff&rev1=190&rev2=191

Comment:
Add DataStax Ruby driver

* cassandra-sharp: [[https://github.com/pchalamet/cassandra-sharp|sources]] 
[[https://www.nuget.org/packages/cassandra-sharp|NuGet]]
* CqlSharp: https://github.com/reuzel/CqlSharp
   * Ruby:
+   * [[https://github.com/datastax/ruby-driver|DataStax Ruby driver]]
* [[https://github.com/iconara/cql-rb|cql-rb]]
   * PHP:
* [[http://code.google.com/a/apache-extras.org/p/cassandra-pdo/|Cassandra 
PDO driver]]


[jira] [Created] (CASSANDRA-7965) Active commit log doesn't get archived on Cassandra restart

2014-09-17 Thread Max Barnash (JIRA)
Max Barnash created CASSANDRA-7965:
--

 Summary: Active commit log doesn't get archived on Cassandra 
restart
 Key: CASSANDRA-7965
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7965
 Project: Cassandra
  Issue Type: Bug
Reporter: Max Barnash


After a restart Cassandra replays and recycles all present commit logs. Because 
active commit log never gets archived, we lose some of the data from the 
archives.

One of the ways to fix this would be archiving all commit logs at startup 
before replaying and recycling them.



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


git commit: stupid brace

2014-09-17 Thread brandonwilliams
Repository: cassandra
Updated Branches:
  refs/heads/trunk a33733601 -> 48682d69a


stupid brace


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

Branch: refs/heads/trunk
Commit: 48682d69adf976dee9a1698ff12402afd030a7b2
Parents: a337336
Author: Brandon Williams 
Authored: Wed Sep 17 15:26:39 2014 +
Committer: Brandon Williams 
Committed: Wed Sep 17 15:26:39 2014 +

--
 src/java/org/apache/cassandra/tools/NodeTool.java | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/48682d69/src/java/org/apache/cassandra/tools/NodeTool.java
--
diff --git a/src/java/org/apache/cassandra/tools/NodeTool.java 
b/src/java/org/apache/cassandra/tools/NodeTool.java
index db75305..e768d47 100644
--- a/src/java/org/apache/cassandra/tools/NodeTool.java
+++ b/src/java/org/apache/cassandra/tools/NodeTool.java
@@ -1636,7 +1636,8 @@ public class NodeTool
 @Override
 public void execute(NodeProbe probe)
 {
-try {
+try
+{
 probe.assassinateEndpoint(endpoint);
 }
 catch (UnknownHostException e)



git commit: Make assassinate a first class command.

2014-09-17 Thread brandonwilliams
Repository: cassandra
Updated Branches:
  refs/heads/trunk a07977900 -> a33733601


Make assassinate a first class command.

Patch by brandonwilliams, reviewed by thobbs for CASSANDRA-7935


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

Branch: refs/heads/trunk
Commit: a337336013eb1efabe709844f1a7755d54b746a8
Parents: a079779
Author: Brandon Williams 
Authored: Wed Sep 17 15:25:01 2014 +
Committer: Brandon Williams 
Committed: Wed Sep 17 15:25:01 2014 +

--
 CHANGES.txt |  1 +
 src/java/org/apache/cassandra/gms/Gossiper.java | 16 
 .../org/apache/cassandra/gms/GossiperMBean.java |  2 ++
 .../org/apache/cassandra/tools/NodeProbe.java   | 10 ++
 .../org/apache/cassandra/tools/NodeTool.java| 20 
 5 files changed, 45 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/a3373360/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 5b80e07..6f9e681 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 3.0
+ * Make assassinate a first class command (CASSANDRA-7935)
  * Support IN clause on any clustering column (CASSANDRA-4762)
  * Improve compaction logging (CASSANDRA-7818)
  * Remove YamlFileNetworkTopologySnitch (CASSANDRA-7917)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/a3373360/src/java/org/apache/cassandra/gms/Gossiper.java
--
diff --git a/src/java/org/apache/cassandra/gms/Gossiper.java 
b/src/java/org/apache/cassandra/gms/Gossiper.java
index 01af8cd..b9576f0 100644
--- a/src/java/org/apache/cassandra/gms/Gossiper.java
+++ b/src/java/org/apache/cassandra/gms/Gossiper.java
@@ -63,7 +63,7 @@ import com.google.common.collect.ImmutableList;
 
 public class Gossiper implements IFailureDetectionEventListener, GossiperMBean
 {
-private static final String MBEAN_NAME = 
"org.apache.cassandra.net:type=Gossiper";
+public static final String MBEAN_NAME = 
"org.apache.cassandra.net:type=Gossiper";
 
 private static final DebuggableScheduledThreadPoolExecutor executor = new 
DebuggableScheduledThreadPoolExecutor("GossipTasks");
 
@@ -474,16 +474,21 @@ public class Gossiper implements 
IFailureDetectionEventListener, GossiperMBean
 Uninterruptibles.sleepUninterruptibly(intervalInMillis * 2, 
TimeUnit.MILLISECONDS);
 }
 
+public void unsafeAssassinateEndpoint(String address) throws 
UnknownHostException
+{
+logger.warn("Gossiper.unsafeAssassinateEndpoint is deprecated and will 
be removed in the next release; use assassinateEndpoint instead");
+assassinateEndpoint(address);
+}
+
 /**
  * Do not call this method unless you know what you are doing.
  * It will try extremely hard to obliterate any endpoint from the ring,
  * even if it does not know about it.
- * This should only ever be called by human via JMX.
  *
  * @param address
  * @throws UnknownHostException
  */
-public void unsafeAssassinateEndpoint(String address) throws 
UnknownHostException
+public void assassinateEndpoint(String address) throws UnknownHostException
 {
 InetAddress endpoint = InetAddress.getByName(address);
 EndpointState epState = endpointStateMap.get(endpoint);
@@ -507,6 +512,7 @@ public class Gossiper implements 
IFailureDetectionEventListener, GossiperMBean
 tokens = 
Collections.singletonList(StorageService.getPartitioner().getRandomToken());
 }
 int generation = epState.getHeartBeatState().getGeneration();
+int heartbeat = epState.getHeartBeatState().getHeartBeatVersion();
 logger.info("Sleeping for {}ms to ensure {} does not change", 
StorageService.RING_DELAY, endpoint);
 Uninterruptibles.sleepUninterruptibly(StorageService.RING_DELAY, 
TimeUnit.MILLISECONDS);
 // make sure it did not change
@@ -514,7 +520,9 @@ public class Gossiper implements 
IFailureDetectionEventListener, GossiperMBean
 if (newState == null)
 logger.warn("Endpoint {} disappeared while trying to 
assassinate, continuing anyway", endpoint);
 else if (newState.getHeartBeatState().getGeneration() != 
generation)
-throw new RuntimeException("Endpoint " + endpoint + " 
generation changed while trying to remove it");
+throw new RuntimeException("Endpoint still alive: " + endpoint 
+ " generation changed while trying to assassinate it");
+else if (ne

[Cassandra Wiki] Update of "ClientOptions" by daniels

2014-09-17 Thread Apache Wiki
Dear Wiki user,

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

The "ClientOptions" page has been changed by daniels:
https://wiki.apache.org/cassandra/ClientOptions?action=diff&rev1=189&rev2=190

Comment:
added datastax nodejs driver

   * Java:
* [[http://github.com/datastax/java-driver|DataStax Java driver]]
   * Node.js
+   * [[https://github.com/datastax/nodejs-driver|DataStax Node.js Driver]]
* Helenus: https://github.com/simplereach/helenus
* https://github.com/jorgebay/node-cassandra-cql
* [[https://github.com/mosfeq4cm/casson|Casson ODM]]


[jira] [Commented] (CASSANDRA-7935) Make assassinate a first class command

2014-09-17 Thread Tyler Hobbs (JIRA)

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

Tyler Hobbs commented on CASSANDRA-7935:


+1 with a nit: there's a curly brace on the same line in 
{{Assassinate.execute()}}

> Make assassinate a first class command
> --
>
> Key: CASSANDRA-7935
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7935
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Core
>Reporter: Brandon Williams
>Assignee: Brandon Williams
>  Labels: jmx
> Fix For: 3.0
>
> Attachments: 7935-v2.txt, 7935.txt
>
>
> Assassinate has proven itself as the top tier in the hierarchy of node 
> removal.  It's time we removed the unsafe moniker and made it a nodetool 
> command so people don't have to mess with JMX themselves when they need it.



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


git commit: Remove deprecated removetoken command from nodetool

2014-09-17 Thread brandonwilliams
Repository: cassandra
Updated Branches:
  refs/heads/trunk 47cda388f -> a07977900


Remove deprecated removetoken command from nodetool


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

Branch: refs/heads/trunk
Commit: a079779000a9e4479d5a035a9ffba8fabfdf5222
Parents: 47cda38
Author: Brandon Williams 
Authored: Wed Sep 17 14:47:52 2014 +
Committer: Brandon Williams 
Committed: Wed Sep 17 14:47:52 2014 +

--
 src/java/org/apache/cassandra/tools/NodeTool.java | 12 
 1 file changed, 12 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/a0797790/src/java/org/apache/cassandra/tools/NodeTool.java
--
diff --git a/src/java/org/apache/cassandra/tools/NodeTool.java 
b/src/java/org/apache/cassandra/tools/NodeTool.java
index a27c162..f7baa8b 100644
--- a/src/java/org/apache/cassandra/tools/NodeTool.java
+++ b/src/java/org/apache/cassandra/tools/NodeTool.java
@@ -113,7 +113,6 @@ public class NodeTool
 ProxyHistograms.class,
 Rebuild.class,
 Refresh.class,
-RemoveToken.class,
 RemoveNode.class,
 Repair.class,
 SetCacheCapacity.class,
@@ -1602,17 +1601,6 @@ public class NodeTool
 }
 }
 
-@Deprecated
-@Command(name = "removetoken", description = "DEPRECATED (see 
removenode)", hidden = true)
-public static class RemoveToken extends NodeToolCmd
-{
-@Override
-public void execute(NodeProbe probe)
-{
-System.err.println("Warn: removetoken is deprecated, please use 
removenode instead");
-}
-}
-
 @Command(name = "removenode", description = "Show status of current node 
removal, force completion of pending removal or remove provided ID")
 public static class RemoveNode extends NodeToolCmd
 {



[jira] [Updated] (CASSANDRA-7719) Add PreparedStatements related metrics

2014-09-17 Thread Aleksey Yeschenko (JIRA)

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

Aleksey Yeschenko updated CASSANDRA-7719:
-
Attachment: 7719-followup.txt

Attaching a follow up patch, that

- fixes the prepared statements count to be a gauge that simply sums up the 
values of thrift/native prepared statement caches
- makes the ratio calculate the ratio or prepared to total, instead of prepared 
to regular (don't need to handle 0 in getDenominator(), b/c the gauge handles 
that and would simply return NaN then)
- removes logger.trace() calls from QP#storePreparedStatement()
- renames a bunch of stuff for consistency with the rest of our metrics code

I've left empty onEviction() callbacks instead of removing them entirely - for 
CASSANDRA-7930 purposes.

> Add PreparedStatements related metrics
> --
>
> Key: CASSANDRA-7719
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7719
> Project: Cassandra
>  Issue Type: New Feature
>Reporter: Michaël Figuière
>Assignee: T Jake Luciani
>Priority: Minor
> Fix For: 2.1.1
>
> Attachments: 7719-followup.txt, 7719.txt
>
>
> Cassandra newcomers often don't understand that they're expected to use 
> PreparedStatements for almost all of their repetitive queries executed in 
> production.
> It doesn't look like Cassandra currently expose any PreparedStatements 
> related metrics.It would be interesting, and I believe fairly simple, to add 
> several of them to make it possible, in development / management / monitoring 
> tools, to show warnings or alerts related to this bad practice.
> Thus I would suggest to add the following metrics:
> * Executed prepared statements count
> * Executed unprepared statements count
> * Amount of PreparedStatements that have been registered on the node



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


[jira] [Updated] (CASSANDRA-7935) Make assassinate a first class command

2014-09-17 Thread Brandon Williams (JIRA)

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

Brandon Williams updated CASSANDRA-7935:

Attachment: 7935-v2.txt

> Make assassinate a first class command
> --
>
> Key: CASSANDRA-7935
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7935
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Core
>Reporter: Brandon Williams
>Assignee: Brandon Williams
>  Labels: jmx
> Fix For: 3.0
>
> Attachments: 7935-v2.txt, 7935.txt
>
>
> Assassinate has proven itself as the top tier in the hierarchy of node 
> removal.  It's time we removed the unsafe moniker and made it a nodetool 
> command so people don't have to mess with JMX themselves when they need it.



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


[jira] [Updated] (CASSANDRA-7801) A successful INSERT with CAS does not always store data in the DB after a DELETE

2014-09-17 Thread Mikhail Stepura (JIRA)

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

Mikhail Stepura updated CASSANDRA-7801:
---
Description: 
When I run a loop with CQL statements to DELETE, INSERT with CAS and then a GET.
The INSERT opertion is successful (Applied), but no data is stored in the 
database. I have checked the database manually after the test to verify that 
the DB is empty.
{code}
for (int i = 0; i < 1; ++i)
{
try
{
t.del();
t.cas();
t.select();
}
catch (Exception e)
{
System.err.println("i=" + i);
e.printStackTrace();
break;
}
}


myCluster = 
Cluster.builder().addContactPoint("localhost").withPort(12742).build();
mySession = myCluster.connect();

mySession.execute("CREATE KEYSPACE IF NOT EXISTS castest WITH 
REPLICATION = { 'class' : 'SimpleStrategy', 'replication_factor' : 1 };");
mySession.execute("CREATE TABLE IF NOT EXISTS castest.users (userid 
text PRIMARY KEY, name text)");

myInsert = mySession.prepare("INSERT INTO castest.users (userid, name) 
values ('user1', 'calle') IF NOT EXISTS");
myDelete = mySession.prepare("DELETE FROM castest.users where 
userid='user1'");
myGet = mySession.prepare("SELECT * FROM castest.users where 
userid='user1'");
}
{code}

I can reproduce the fault with the attached program on a PC with windows 7.
You need a cassandra runing and you need to set the port in the program.



  was:
When I run a loop with CQL statements to DELETE, INSERT with CAS and then a GET.
The INSERT opertion is successful (Applied), but no data is stored in the 
database. I have checked the database manually after the test to verify that 
the DB is empty.

for (int i = 0; i < 1; ++i)
{
try
{
t.del();
t.cas();
t.select();
}
catch (Exception e)
{
System.err.println("i=" + i);
e.printStackTrace();
break;
}
}


myCluster = 
Cluster.builder().addContactPoint("localhost").withPort(12742).build();
mySession = myCluster.connect();

mySession.execute("CREATE KEYSPACE IF NOT EXISTS castest WITH 
REPLICATION = { 'class' : 'SimpleStrategy', 'replication_factor' : 1 };");
mySession.execute("CREATE TABLE IF NOT EXISTS castest.users (userid 
text PRIMARY KEY, name text)");

myInsert = mySession.prepare("INSERT INTO castest.users (userid, name) 
values ('user1', 'calle') IF NOT EXISTS");
myDelete = mySession.prepare("DELETE FROM castest.users where 
userid='user1'");
myGet = mySession.prepare("SELECT * FROM castest.users where 
userid='user1'");
}


I can reproduce the fault with the attached program on a PC with windows 7.
You need a cassandra runing and you need to set the port in the program.




> A successful INSERT with CAS does not always store data in the DB after a 
> DELETE
> 
>
> Key: CASSANDRA-7801
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7801
> Project: Cassandra
>  Issue Type: Bug
>  Components: Core
> Environment: PC with Windows 7 and on Linux installation.
> Have seen the fault on Cassandra 2.0.9 and Cassandra 2.1.0-rc5 
>Reporter: Martin Fransson
>Assignee: Sylvain Lebresne
> Fix For: 2.0.11
>
> Attachments: 7801.txt, cas.zip
>
>
> When I run a loop with CQL statements to DELETE, INSERT with CAS and then a 
> GET.
> The INSERT opertion is successful (Applied), but no data is stored in the 
> database. I have checked the database manually after the test to verify that 
> the DB is empty.
> {code}
> for (int i = 0; i < 1; ++i)
> {
> try
> {
> t.del();
> t.cas();
> t.select();
> }
> catch (Exception e)
> {
> System.err.println("i=" + i);
> e.printStackTrace();
> break;
> }
> }
> myCluster = 
> Cluster.builder().addContactPoint("localhost").withPort(12742).build();
> mySession = myCluster.connect();
> mySession.execute("CREATE KEYSPACE IF NOT EXISTS castest WITH 
> REPLICATION = { 'class' : 'SimpleStrategy', 'replication_factor' : 1 };");
> mySession.execute("CREATE TABLE IF NOT EXISTS castest.users (userid 
> text PRIMARY KEY, name text)");
> myInsert = mySession.prepare("INSERT INTO castest.users (userid, 
> name) values ('user1', 'calle') IF NOT EXISTS");
>

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

2014-09-17 Thread brandonwilliams
Merge branch 'cassandra-2.0' into cassandra-2.1


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

Branch: refs/heads/cassandra-2.1
Commit: 83d15631f09da9cdd8d57b422ee9842ad9e5ba74
Parents: 7c34d8b 05920cb
Author: Brandon Williams 
Authored: Wed Sep 17 14:07:18 2014 +
Committer: Brandon Williams 
Committed: Wed Sep 17 14:07:18 2014 +

--
 src/java/org/apache/cassandra/gms/Gossiper.java | 2 ++
 1 file changed, 2 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/83d15631/src/java/org/apache/cassandra/gms/Gossiper.java
--



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

2014-09-17 Thread brandonwilliams
Merge branch 'cassandra-2.1' into trunk


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

Branch: refs/heads/trunk
Commit: 47cda388f57531c3f9801ff22f8541ee64ce6bb5
Parents: 134c2e9 83d1563
Author: Brandon Williams 
Authored: Wed Sep 17 14:07:25 2014 +
Committer: Brandon Williams 
Committed: Wed Sep 17 14:07:25 2014 +

--
 src/java/org/apache/cassandra/gms/Gossiper.java | 2 ++
 1 file changed, 2 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/47cda388/src/java/org/apache/cassandra/gms/Gossiper.java
--



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

2014-09-17 Thread brandonwilliams
Merge branch 'cassandra-2.0' into cassandra-2.1


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

Branch: refs/heads/trunk
Commit: 83d15631f09da9cdd8d57b422ee9842ad9e5ba74
Parents: 7c34d8b 05920cb
Author: Brandon Williams 
Authored: Wed Sep 17 14:07:18 2014 +
Committer: Brandon Williams 
Committed: Wed Sep 17 14:07:18 2014 +

--
 src/java/org/apache/cassandra/gms/Gossiper.java | 2 ++
 1 file changed, 2 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/83d15631/src/java/org/apache/cassandra/gms/Gossiper.java
--



[1/6] git commit: Prevent NPE on FD conviction race

2014-09-17 Thread brandonwilliams
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-2.0 f19b4cb80 -> 05920cb38
  refs/heads/cassandra-2.1 7c34d8bb7 -> 83d15631f
  refs/heads/trunk 134c2e969 -> 47cda388f


Prevent NPE on FD conviction race

Patch by brandonwilliams, reviewed by thobbs for CASSANDRA-7940


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

Branch: refs/heads/cassandra-2.0
Commit: 05920cb38bc8559704450965ce4bb326a917c86a
Parents: f19b4cb
Author: Brandon Williams 
Authored: Wed Sep 17 14:06:10 2014 +
Committer: Brandon Williams 
Committed: Wed Sep 17 14:06:10 2014 +

--
 src/java/org/apache/cassandra/gms/Gossiper.java | 2 ++
 1 file changed, 2 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/05920cb3/src/java/org/apache/cassandra/gms/Gossiper.java
--
diff --git a/src/java/org/apache/cassandra/gms/Gossiper.java 
b/src/java/org/apache/cassandra/gms/Gossiper.java
index 01299ea..4514da7 100644
--- a/src/java/org/apache/cassandra/gms/Gossiper.java
+++ b/src/java/org/apache/cassandra/gms/Gossiper.java
@@ -298,6 +298,8 @@ public class Gossiper implements 
IFailureDetectionEventListener, GossiperMBean
 public void convict(InetAddress endpoint, double phi)
 {
 EndpointState epState = endpointStateMap.get(endpoint);
+if (epState == null)
+return;
 if (epState.isAlive() && !isDeadState(epState))
 {
 markDead(endpoint, epState);



[3/6] git commit: Prevent NPE on FD conviction race

2014-09-17 Thread brandonwilliams
Prevent NPE on FD conviction race

Patch by brandonwilliams, reviewed by thobbs for CASSANDRA-7940


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

Branch: refs/heads/trunk
Commit: 05920cb38bc8559704450965ce4bb326a917c86a
Parents: f19b4cb
Author: Brandon Williams 
Authored: Wed Sep 17 14:06:10 2014 +
Committer: Brandon Williams 
Committed: Wed Sep 17 14:06:10 2014 +

--
 src/java/org/apache/cassandra/gms/Gossiper.java | 2 ++
 1 file changed, 2 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/05920cb3/src/java/org/apache/cassandra/gms/Gossiper.java
--
diff --git a/src/java/org/apache/cassandra/gms/Gossiper.java 
b/src/java/org/apache/cassandra/gms/Gossiper.java
index 01299ea..4514da7 100644
--- a/src/java/org/apache/cassandra/gms/Gossiper.java
+++ b/src/java/org/apache/cassandra/gms/Gossiper.java
@@ -298,6 +298,8 @@ public class Gossiper implements 
IFailureDetectionEventListener, GossiperMBean
 public void convict(InetAddress endpoint, double phi)
 {
 EndpointState epState = endpointStateMap.get(endpoint);
+if (epState == null)
+return;
 if (epState.isAlive() && !isDeadState(epState))
 {
 markDead(endpoint, epState);



[2/6] git commit: Prevent NPE on FD conviction race

2014-09-17 Thread brandonwilliams
Prevent NPE on FD conviction race

Patch by brandonwilliams, reviewed by thobbs for CASSANDRA-7940


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

Branch: refs/heads/cassandra-2.1
Commit: 05920cb38bc8559704450965ce4bb326a917c86a
Parents: f19b4cb
Author: Brandon Williams 
Authored: Wed Sep 17 14:06:10 2014 +
Committer: Brandon Williams 
Committed: Wed Sep 17 14:06:10 2014 +

--
 src/java/org/apache/cassandra/gms/Gossiper.java | 2 ++
 1 file changed, 2 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/05920cb3/src/java/org/apache/cassandra/gms/Gossiper.java
--
diff --git a/src/java/org/apache/cassandra/gms/Gossiper.java 
b/src/java/org/apache/cassandra/gms/Gossiper.java
index 01299ea..4514da7 100644
--- a/src/java/org/apache/cassandra/gms/Gossiper.java
+++ b/src/java/org/apache/cassandra/gms/Gossiper.java
@@ -298,6 +298,8 @@ public class Gossiper implements 
IFailureDetectionEventListener, GossiperMBean
 public void convict(InetAddress endpoint, double phi)
 {
 EndpointState epState = endpointStateMap.get(endpoint);
+if (epState == null)
+return;
 if (epState.isAlive() && !isDeadState(epState))
 {
 markDead(endpoint, epState);



[jira] [Commented] (CASSANDRA-7935) Make assassinate a first class command

2014-09-17 Thread Tyler Hobbs (JIRA)

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

Tyler Hobbs commented on CASSANDRA-7935:


Okay, you can keep something about the heartbeat in there, just explain that it 
appears that the node is alive and gossiping.

> Make assassinate a first class command
> --
>
> Key: CASSANDRA-7935
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7935
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Core
>Reporter: Brandon Williams
>Assignee: Brandon Williams
>  Labels: jmx
> Fix For: 3.0
>
> Attachments: 7935.txt
>
>
> Assassinate has proven itself as the top tier in the hierarchy of node 
> removal.  It's time we removed the unsafe moniker and made it a nodetool 
> command so people don't have to mess with JMX themselves when they need it.



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


[jira] [Commented] (CASSANDRA-7935) Make assassinate a first class command

2014-09-17 Thread Brandon Williams (JIRA)

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

Brandon Williams commented on CASSANDRA-7935:
-

I kind of like having the specificity between generation/heartbeat so it if 
fails, we can know why.  For the description, I'm open to your bikeshed. :)

> Make assassinate a first class command
> --
>
> Key: CASSANDRA-7935
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7935
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Core
>Reporter: Brandon Williams
>Assignee: Brandon Williams
>  Labels: jmx
> Fix For: 3.0
>
> Attachments: 7935.txt
>
>
> Assassinate has proven itself as the top tier in the hierarchy of node 
> removal.  It's time we removed the unsafe moniker and made it a nodetool 
> command so people don't have to mess with JMX themselves when they need it.



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


[jira] [Created] (CASSANDRA-7964) cassandra-stress over schema should support multiple simultaneous inserts over the same seed

2014-09-17 Thread Benedict (JIRA)
Benedict created CASSANDRA-7964:
---

 Summary: cassandra-stress over schema should support multiple 
simultaneous inserts over the same seed
 Key: CASSANDRA-7964
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7964
 Project: Cassandra
  Issue Type: Improvement
  Components: Tools
Reporter: Benedict
Assignee: Benedict
Priority: Minor


This constraint makes testing contention essentially impossible



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


git commit: Support IN clause for any clustering column

2014-09-17 Thread tylerhobbs
Repository: cassandra
Updated Branches:
  refs/heads/trunk 87ba0dc1b -> 9553dae93


Support IN clause for any clustering column

Patch by Benjamin Lerer; reviewed by Tyler Hobbs for CASSANDRA-4762


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

Branch: refs/heads/trunk
Commit: 9553dae93ba328f3538b213051d180c21717c158
Parents: 87ba0dc
Author: blerer 
Authored: Wed Sep 17 13:54:45 2014 -0500
Committer: Tyler Hobbs 
Committed: Wed Sep 17 13:54:45 2014 -0500

--
 CHANGES.txt |   1 +
 .../cql3/statements/SelectStatement.java|  90 +++-
 .../db/composites/CompositesBuilder.java| 219 +++
 .../cql3/SingleColumnRelationTest.java  | 119 ++
 4 files changed, 366 insertions(+), 63 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/9553dae9/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index ca192a7..a11de41 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 3.0
+ * Support IN clause on any clustering column (CASSANDRA-4762)
  * Improve compaction logging (CASSANDRA-7818)
  * Remove YamlFileNetworkTopologySnitch (CASSANDRA-7917)
  * Support Java source code for user-defined functions (CASSANDRA-7562)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/9553dae9/src/java/org/apache/cassandra/cql3/statements/SelectStatement.java
--
diff --git a/src/java/org/apache/cassandra/cql3/statements/SelectStatement.java 
b/src/java/org/apache/cassandra/cql3/statements/SelectStatement.java
index ad66232..e135c0a 100644
--- a/src/java/org/apache/cassandra/cql3/statements/SelectStatement.java
+++ b/src/java/org/apache/cassandra/cql3/statements/SelectStatement.java
@@ -31,6 +31,7 @@ import org.github.jamm.MemoryMeter;
 import org.apache.cassandra.auth.Permission;
 import org.apache.cassandra.cql3.*;
 import org.apache.cassandra.db.composites.*;
+import org.apache.cassandra.db.composites.Composite.EOC;
 import org.apache.cassandra.transport.messages.ResultMessage;
 import org.apache.cassandra.config.CFMetaData;
 import org.apache.cassandra.config.ColumnDefinition;
@@ -694,7 +695,7 @@ public class SelectStatement implements CQLStatement, 
MeasurableForPreparedCache
 // we always do a slice for CQL3 tables, so it's ok to ignore them here
 assert !isColumnRange();
 
-CBuilder builder = cfm.comparator.prefixBuilder();
+CompositesBuilder builder = new 
CompositesBuilder(cfm.comparator.prefixBuilder(), cfm.comparator);
 Iterator idIter = cfm.clusteringColumns().iterator();
 for (Restriction r : columnRestrictions)
 {
@@ -702,36 +703,20 @@ public class SelectStatement implements CQLStatement, 
MeasurableForPreparedCache
 assert r != null && !r.isSlice();
 
 List values = r.values(options);
-if (values.size() == 1)
-{
-ByteBuffer val = values.get(0);
-if (val == null)
-throw new InvalidRequestException(String.format("Invalid 
null value for clustering key part %s", def.name));
-builder.add(val);
-}
-else
-{
-// We have a IN, which we only support for the last column.
-// If compact, just add all values and we're done. Otherwise,
-// for each value of the IN, creates all the columns 
corresponding to the selection.
-if (values.isEmpty())
-return null;
-SortedSet columns = new 
TreeSet(cfm.comparator);
-Iterator iter = values.iterator();
-while (iter.hasNext())
-{
-ByteBuffer val = iter.next();
-if (val == null)
-throw new 
InvalidRequestException(String.format("Invalid null value for clustering key 
part %s", def.name));
 
-Composite prefix = builder.buildWith(val);
-columns.addAll(addSelectedColumns(prefix));
-}
-return columns;
-}
+if (values.isEmpty())
+return null;
+
+builder.addEachElementToAll(values);
+if (builder.containsNull())
+throw new InvalidRequestException(String.format("Invalid null 
value for clustering key part %s",
+def.name));
 }
+SortedSet columns = new TreeSet(cfm.com

[jira] [Commented] (CASSANDRA-7935) Make assassinate a first class command

2014-09-17 Thread Tyler Hobbs (JIRA)

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

Tyler Hobbs commented on CASSANDRA-7935:


Overall this looks good, I just have a couple of usability improvements:
* Instead of this error message: {{"Endpoint " + endpoint + " heartbeat changed 
while trying to assassinate it"}}, just say that the node appears to be alive 
and gossiping. Users that aren't familiar with gossip probably don't know what 
that means.
* Instead of this description: {{""Obliterate an endpoint from the ring without 
re-replicating any data"}}, describe when to use it and be a little more 
precise about what it does.

> Make assassinate a first class command
> --
>
> Key: CASSANDRA-7935
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7935
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Core
>Reporter: Brandon Williams
>Assignee: Brandon Williams
>  Labels: jmx
> Fix For: 3.0
>
> Attachments: 7935.txt
>
>
> Assassinate has proven itself as the top tier in the hierarchy of node 
> removal.  It's time we removed the unsafe moniker and made it a nodetool 
> command so people don't have to mess with JMX themselves when they need it.



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


[jira] [Updated] (CASSANDRA-7935) Make assassinate a first class command

2014-09-17 Thread Tyler Hobbs (JIRA)

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

Tyler Hobbs updated CASSANDRA-7935:
---
Labels: jmx  (was: )

> Make assassinate a first class command
> --
>
> Key: CASSANDRA-7935
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7935
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Core
>Reporter: Brandon Williams
>Assignee: Brandon Williams
>  Labels: jmx
> Fix For: 3.0
>
> Attachments: 7935.txt
>
>
> Assassinate has proven itself as the top tier in the hierarchy of node 
> removal.  It's time we removed the unsafe moniker and made it a nodetool 
> command so people don't have to mess with JMX themselves when they need it.



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


[jira] [Commented] (CASSANDRA-7940) Gossip only node removal can race with FD.convict

2014-09-17 Thread Tyler Hobbs (JIRA)

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

Tyler Hobbs commented on CASSANDRA-7940:


+1

> Gossip only node removal can race with FD.convict
> -
>
> Key: CASSANDRA-7940
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7940
> Project: Cassandra
>  Issue Type: Bug
>  Components: Core
>Reporter: Brandon Williams
>Assignee: Brandon Williams
>Priority: Minor
> Fix For: 2.0.11, 2.1.1
>
> Attachments: 7940.txt
>
>
> {noformat}
> INFO  00:04:48 FatClient /10.208.8.63 has been silent for 3ms, removing 
> from gossip
> INFO  00:04:49 Handshaking version with /10.208.8.63
> ERROR 00:04:53 Exception in thread Thread[GossipStage:1,5,main]
> java.lang.NullPointerException: null
> at org.apache.cassandra.gms.Gossiper.convict(Gossiper.java:301) 
> ~[main/:na]
> at 
> org.apache.cassandra.gms.FailureDetector.forceConviction(FailureDetector.java:251)
>  ~[main/:na]
> at 
> org.apache.cassandra.gms.GossipShutdownVerbHandler.doVerb(GossipShutdownVerbHandler.java:37)
>  ~[main/:na]
> at 
> org.apache.cassandra.net.MessageDeliveryTask.run(MessageDeliveryTask.java:62) 
> ~[main/:na]
> at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
>  ~[na:1.7.0_60]
> at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
>  ~[na:1.7.0_60]
> at java.lang.Thread.run(Thread.java:745) ~[na:1.7.0_60]
> {noformat}



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


[jira] [Commented] (CASSANDRA-7833) Collection types validation is incomplete

2014-09-17 Thread Tyler Hobbs (JIRA)

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

Tyler Hobbs commented on CASSANDRA-7833:


+1, but in 2.1 you should also make the same change to 
{{validateForNativeProtocol()}} in the serializer classes.

> Collection types validation is incomplete
> -
>
> Key: CASSANDRA-7833
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7833
> Project: Cassandra
>  Issue Type: Bug
>Reporter: Sylvain Lebresne
>Assignee: Sylvain Lebresne
>Priority: Minor
> Fix For: 2.0.11
>
> Attachments: 7833.txt
>
>
> The collection types will complain if a value has less values than 
> advertised, or if some of those values don't validate, but it does check that 
> there is no remaining bytes after the collection. One consequence is that if 
> you prepare {{INSERT INTO t(k, s) VALUES (0, ?)}} where {{s}} is a set, and 
> you pass a map value (with the same type for keys and values than the set), 
> then no error will be issued.



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


[jira] [Updated] (CASSANDRA-7935) Make assassinate a first class command

2014-09-17 Thread Brandon Williams (JIRA)

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

Brandon Williams updated CASSANDRA-7935:

Attachment: 7935.txt

Patch emits a deprecation warning when unsafeAssassinate is called, but passes 
through to assassinate anyway, adds a check on the heartbeat, and adds the 
nodetool command to assassinate.  The check on the heartbeat being stable is 
arguably something we should backport, but my impetus for adding it here was to 
make sure the node is completely and truly dead to prevent operator error since 
assassinate is more accessible now. (Without the hearbeat check you can 
actually assassinate a live node, so I justify removing the unsafe moniker with 
this check :))

> Make assassinate a first class command
> --
>
> Key: CASSANDRA-7935
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7935
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Core
>Reporter: Brandon Williams
>Assignee: Brandon Williams
> Fix For: 3.0
>
> Attachments: 7935.txt
>
>
> Assassinate has proven itself as the top tier in the hierarchy of node 
> removal.  It's time we removed the unsafe moniker and made it a nodetool 
> command so people don't have to mess with JMX themselves when they need it.



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


[jira] [Commented] (CASSANDRA-7941) Fix bin/cassandra cassandra.logdir option in debian package

2014-09-17 Thread Michael Shuler (JIRA)

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

Michael Shuler commented on CASSANDRA-7941:
---

[~jared.b...@bolderthinking.com] we're working on that  :)

> Fix bin/cassandra cassandra.logdir option in debian package
> ---
>
> Key: CASSANDRA-7941
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7941
> Project: Cassandra
>  Issue Type: Bug
>  Components: Packaging
>Reporter: Michael Shuler
>Assignee: Michael Shuler
> Fix For: 2.1.1
>
> Attachments: 
> 0001-Fix-bin-cassandra-cassandra.logdir-option-in-debian-.patch
>
>
> Cassandra writes logs to $CASSANDRA_HOME/logs by default, and the debian 
> package needs to write to /var/log/cassandra.



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


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

2014-09-17 Thread yukim
Merge branch 'cassandra-2.1' into trunk


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

Branch: refs/heads/trunk
Commit: 134c2e96929ce82f347815d72a476184332c6016
Parents: 9553dae 7c34d8b
Author: Yuki Morishita 
Authored: Wed Sep 17 15:14:46 2014 -0500
Committer: Yuki Morishita 
Committed: Wed Sep 17 15:14:46 2014 -0500

--
 CHANGES.txt | 1 +
 1 file changed, 1 insertion(+)
--


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



[2/3] git commit: Add CASSANDRA-7450 to CHANGES

2014-09-17 Thread yukim
Add CASSANDRA-7450 to CHANGES


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

Branch: refs/heads/trunk
Commit: 7c34d8bb72672747317963f96c1a22c74d955d84
Parents: 125b464
Author: Yuki Morishita 
Authored: Wed Sep 17 15:14:41 2014 -0500
Committer: Yuki Morishita 
Committed: Wed Sep 17 15:14:41 2014 -0500

--
 CHANGES.txt | 1 +
 1 file changed, 1 insertion(+)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/7c34d8bb/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index ca578f3..cc8c691 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -40,6 +40,7 @@
  * Optimise NativeCell comparisons (CASSANDRA-6755)
  * Configurable client timeout for cqlsh (CASSANDRA-7516)
  * Include snippet of CQL query near syntax error in messages (CASSANDRA-7111)
+ * Make repair -pr work with -local (CASSANDRA-7450)
 Merged from 2.0:
  * Make CQLSSTableWriter sync within partitions (CASSANDRA-7360)
  * Potentially use non-local replicas in CqlConfigHelper (CASSANDRA-7906)



[1/3] git commit: Add CASSANDRA-7450 to CHANGES

2014-09-17 Thread yukim
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-2.1 125b4642d -> 7c34d8bb7
  refs/heads/trunk 9553dae93 -> 134c2e969


Add CASSANDRA-7450 to CHANGES


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

Branch: refs/heads/cassandra-2.1
Commit: 7c34d8bb72672747317963f96c1a22c74d955d84
Parents: 125b464
Author: Yuki Morishita 
Authored: Wed Sep 17 15:14:41 2014 -0500
Committer: Yuki Morishita 
Committed: Wed Sep 17 15:14:41 2014 -0500

--
 CHANGES.txt | 1 +
 1 file changed, 1 insertion(+)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/7c34d8bb/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index ca578f3..cc8c691 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -40,6 +40,7 @@
  * Optimise NativeCell comparisons (CASSANDRA-6755)
  * Configurable client timeout for cqlsh (CASSANDRA-7516)
  * Include snippet of CQL query near syntax error in messages (CASSANDRA-7111)
+ * Make repair -pr work with -local (CASSANDRA-7450)
 Merged from 2.0:
  * Make CQLSSTableWriter sync within partitions (CASSANDRA-7360)
  * Potentially use non-local replicas in CqlConfigHelper (CASSANDRA-7906)



[jira] [Commented] (CASSANDRA-7546) AtomicSortedColumns.addAllWithSizeDelta has a spin loop that allocates memory

2014-09-17 Thread graham sanderson (JIRA)

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

graham sanderson commented on CASSANDRA-7546:
-

Yeah, this is only a cluster for my testing this... I just don't want a massive 
breakage that stops it working completely! I'll install head

> AtomicSortedColumns.addAllWithSizeDelta has a spin loop that allocates memory
> -
>
> Key: CASSANDRA-7546
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7546
> Project: Cassandra
>  Issue Type: Bug
>  Components: Core
>Reporter: graham sanderson
>Assignee: graham sanderson
> Fix For: 2.1.1
>
> Attachments: 7546.20.txt, 7546.20_2.txt, 7546.20_3.txt, 
> 7546.20_4.txt, 7546.20_5.txt, 7546.20_6.txt, 7546.20_7.txt, 7546.20_7b.txt, 
> 7546.20_alt.txt, 7546.20_async.txt, 7546.21_v1.txt, hint_spikes.png, 
> suggestion1.txt, suggestion1_21.txt, young_gen_gc.png
>
>
> In order to preserve atomicity, this code attempts to read, clone/update, 
> then CAS the state of the partition.
> Under heavy contention for updating a single partition this can cause some 
> fairly staggering memory growth (the more cores on your machine the worst it 
> gets).
> Whilst many usage patterns don't do highly concurrent updates to the same 
> partition, hinting today, does, and in this case wild (order(s) of magnitude 
> more than expected) memory allocation rates can be seen (especially when the 
> updates being hinted are small updates to different partitions which can 
> happen very fast on their own) - see CASSANDRA-7545
> It would be best to eliminate/reduce/limit the spinning memory allocation 
> whilst not slowing down the very common un-contended case.



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


[jira] [Commented] (CASSANDRA-7546) AtomicSortedColumns.addAllWithSizeDelta has a spin loop that allocates memory

2014-09-17 Thread graham sanderson (JIRA)

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

graham sanderson commented on CASSANDRA-7546:
-

Hmm - i'll definitely have to try again - it didn't respond to SIGHUP or non -F 
jstack, and isn't responding to ctrl+C, so maybe close to OOM

> AtomicSortedColumns.addAllWithSizeDelta has a spin loop that allocates memory
> -
>
> Key: CASSANDRA-7546
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7546
> Project: Cassandra
>  Issue Type: Bug
>  Components: Core
>Reporter: graham sanderson
>Assignee: graham sanderson
> Fix For: 2.1.1
>
> Attachments: 7546.20.txt, 7546.20_2.txt, 7546.20_3.txt, 
> 7546.20_4.txt, 7546.20_5.txt, 7546.20_6.txt, 7546.20_7.txt, 7546.20_7b.txt, 
> 7546.20_alt.txt, 7546.20_async.txt, 7546.21_v1.txt, hint_spikes.png, 
> suggestion1.txt, suggestion1_21.txt, young_gen_gc.png
>
>
> In order to preserve atomicity, this code attempts to read, clone/update, 
> then CAS the state of the partition.
> Under heavy contention for updating a single partition this can cause some 
> fairly staggering memory growth (the more cores on your machine the worst it 
> gets).
> Whilst many usage patterns don't do highly concurrent updates to the same 
> partition, hinting today, does, and in this case wild (order(s) of magnitude 
> more than expected) memory allocation rates can be seen (especially when the 
> updates being hinted are small updates to different partitions which can 
> happen very fast on their own) - see CASSANDRA-7545
> It would be best to eliminate/reduce/limit the spinning memory allocation 
> whilst not slowing down the very common un-contended case.



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


[jira] [Commented] (CASSANDRA-7849) Server logged error messages (in binary protocol) for unexpected exceptions could be more helpful

2014-09-17 Thread Tyler Hobbs (JIRA)

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

Tyler Hobbs commented on CASSANDRA-7849:


bq. That said, if our intention is to ONLY put at DEBUG things we absolutely 
know to be spurious, then we could test the error message string, and just risk 
some OS or locale getting a different message at INFO - they could always open 
a new issue.

+1

> Server logged error messages (in binary protocol) for unexpected exceptions 
> could be more helpful
> -
>
> Key: CASSANDRA-7849
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7849
> Project: Cassandra
>  Issue Type: Improvement
>Reporter: graham sanderson
>Assignee: graham sanderson
> Fix For: 1.2.19, 2.0.11
>
> Attachments: cassandra-1.2-7849.txt, cassandra-1.2-7849_v2.txt
>
>
> From time to time (actually quite frequently) we get error messages in the 
> server logs like this
> {code}
> ERROR [Native-Transport-Requests:288] 2014-08-29 04:48:07,118 
> ErrorMessage.java (line 222) Unexpected exception during request
> java.io.IOException: Connection reset by peer
> at sun.nio.ch.FileDispatcherImpl.read0(Native Method)
> at sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:39)
> at sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:223)
> at sun.nio.ch.IOUtil.read(IOUtil.java:192)
> at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:379)
> at 
> org.jboss.netty.channel.socket.nio.NioWorker.read(NioWorker.java:64)
> at 
> org.jboss.netty.channel.socket.nio.AbstractNioWorker.process(AbstractNioWorker.java:109)
> at 
> org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:312)
> at 
> org.jboss.netty.channel.socket.nio.AbstractNioWorker.run(AbstractNioWorker.java:90)
> at 
> org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:178)
> 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}
> These particular cases are almost certainly problems with the client driver, 
> client machine, client process, however after the fact this particular 
> exception is practically impossible to debug because there is no indication 
> in the underlying JVM/netty exception of who the peer was. I should note we 
> have lots of different types of applications running against the cluster so 
> it is very hard to correlate these to anything



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


[jira] [Commented] (CASSANDRA-7546) AtomicSortedColumns.addAllWithSizeDelta has a spin loop that allocates memory

2014-09-17 Thread Benedict (JIRA)

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

Benedict commented on CASSANDRA-7546:
-

It's hard to say for certain, but glancing at CHANGES.txt, it looks like 
2.1.1-HEAD is same ballpark as safe to run as 2.1.0. There are a lot of changes 
merged, but mostly for tools like cqlsh, and the things in the core application 
are pretty minor. I don't officially endorse it though, since we only just 
shipped to 2.1.0, and haven't had much time to QA 2.1.1 

> AtomicSortedColumns.addAllWithSizeDelta has a spin loop that allocates memory
> -
>
> Key: CASSANDRA-7546
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7546
> Project: Cassandra
>  Issue Type: Bug
>  Components: Core
>Reporter: graham sanderson
>Assignee: graham sanderson
> Fix For: 2.1.1
>
> Attachments: 7546.20.txt, 7546.20_2.txt, 7546.20_3.txt, 
> 7546.20_4.txt, 7546.20_5.txt, 7546.20_6.txt, 7546.20_7.txt, 7546.20_7b.txt, 
> 7546.20_alt.txt, 7546.20_async.txt, 7546.21_v1.txt, hint_spikes.png, 
> suggestion1.txt, suggestion1_21.txt, young_gen_gc.png
>
>
> In order to preserve atomicity, this code attempts to read, clone/update, 
> then CAS the state of the partition.
> Under heavy contention for updating a single partition this can cause some 
> fairly staggering memory growth (the more cores on your machine the worst it 
> gets).
> Whilst many usage patterns don't do highly concurrent updates to the same 
> partition, hinting today, does, and in this case wild (order(s) of magnitude 
> more than expected) memory allocation rates can be seen (especially when the 
> updates being hinted are small updates to different partitions which can 
> happen very fast on their own) - see CASSANDRA-7545
> It would be best to eliminate/reduce/limit the spinning memory allocation 
> whilst not slowing down the very common un-contended case.



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


[jira] [Commented] (CASSANDRA-7932) Corrupt SSTable Cleanup Leak Resources

2014-09-17 Thread Benedict (JIRA)

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

Benedict commented on CASSANDRA-7932:
-

bq. I've patched on top of the leak detection code for trunk

Sounds like you reviewed the underlying patch for CASSANDRA-7705 as well, not 
just the bug fix? In which case, thanks! Wasn't planning on rolling that out to 
2.1, although there's a good argument to be made there. Think that should get 
some wider input though.



> Corrupt SSTable Cleanup Leak Resources
> --
>
> Key: CASSANDRA-7932
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7932
> Project: Cassandra
>  Issue Type: Bug
>  Components: Core
>Reporter: Benedict
>Assignee: Benedict
> Fix For: 2.1.1
>
>
> CASSANDRA-7705, during the BlackingListingCompactionsTest, detected leaks. 
> I've tracked this down to DataTracker.removeUnreadableSSTables() , which does 
> not release the reference to any sstables from the tracker.



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


  1   2   >