[jira] [Commented] (CASSANDRA-4594) COPY TO and COPY FROM don't default to consistent ordering of columns

2012-09-04 Thread Sylvain Lebresne (JIRA)

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

Sylvain Lebresne commented on CASSANDRA-4594:
-

bq. This is because a select * from airplanes; does not give the columns in the 
order they were defined.

No it doesn't. The vaguely technical reason is that we don't keep internally 
the order of definition of columns, so we would have to start keeping that 
information (which honestly wouldn't be that much of a burden now that we have 
the list support, but was a tad more annoying to do at the time I wrote the 
code for select *). And I think that it's one place where it's not worth 
committing to any specific order but rather left it unspecified, so I don't see 
the point in bothering to record said definition order.

For the record though, the order of * is not completely random. It returns 
first the columns composing the PK (in the order of the PK) and then the rest 
of the columns in lexicographic order. But really it's mostly because it's 
convenient for the implementation to do it that way.

 COPY TO and COPY FROM don't default to consistent ordering of columns
 -

 Key: CASSANDRA-4594
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4594
 Project: Cassandra
  Issue Type: Bug
 Environment: Happens in CQLSH 2, may or may not happen in CQLSH 3
Reporter: Tyler Patterson
Assignee: paul cannon
Priority: Minor
 Fix For: 1.2.0


 Here is the input:
 {code} 
 CREATE KEYSPACE test WITH strategy_class = 'SimpleStrategy' AND 
 strategy_options:replication_factor = 1;
 USE test; 
   
   
   
 CREATE TABLE airplanes (  
   
 name text PRIMARY KEY,
   
 manufacturer ascii,   
   
 year int, 
   
 mach float
   
 );
   
   
   
 INSERT INTO airplanes (name, manufacturer, year, mach) VALUES 
 ('P38-Lightning', 'Lockheed', 1937, '.7');
   
   
 COPY airplanes TO 'temp.cfg' WITH HEADER=true;
   
   
   
 TRUNCATE airplanes;   
  
   
  
 COPY airplanes FROM 'temp.cfg' WITH HEADER=true;  
   
   
  
 SELECT * FROM airplanes;
 {code}
 Here is what happens when executed. Note how it tried to import the float 
 into the int column:
 {code}
 cqlsh:test DROP KEYSPACE test;   
  
 cqlsh:test CREATE KEYSPACE test WITH strategy_class = 'SimpleStrategy' AND 
 strategy_options:replication_factor = 1;
 cqlsh:test USE test; 
   
 cqlsh:test   
  
 cqlsh:test CREATE TABLE airplanes (  
   
 ... name text PRIMARY KEY,
   
 ... manufacturer ascii,   
   
 ... year int, 
   
 ... mach float
   
 ... );
   
 cqlsh:test   
   
 cqlsh:test INSERT INTO airplanes (name, manufacturer, year, mach) VALUES 
 ('P38-Lightning', 'Lockheed', 1937, '.7');
 cqlsh:test   
   
 cqlsh:test COPY airplanes TO 'temp.cfg' WITH HEADER=true;
   
 1 rows exported in 0.003 seconds. 
   
 cqlsh:test TRUNCATE airplanes;   
   
 cqlsh:test  

[jira] [Commented] (CASSANDRA-4471) Unable to drop keyspace

2012-09-04 Thread Svend Hansen (JIRA)

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

Svend Hansen commented on CASSANDRA-4471:
-

We're having the same problem on our build server. Can't drop or alter column 
families and can't drop keyspace.
We're running cassandra 1.1.3 on Ubuntu 12.04.1 LTS.
We haven't had the problem on any of our test servers which are running 1.1.2 
on Amazon Linux (based on RedHat).
Not sure if the difference is the Cassandra version (you see it on 1.1.2, 
right?) or the OS (you all experience this just on Debian?)



 Unable to drop keyspace
 ---

 Key: CASSANDRA-4471
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4471
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Affects Versions: 1.1.2
 Environment: Debian 6, cassandra.apache.org binary package
Reporter: Tuure Laurinolli

 Drop keyspace command completes without error but the keyspace is not 
 removed. Reproduced both using cassandra-cli and pycassa. 
 Drop as observed from command line:
 [default@unknown] show keyspaces; 
 Keyspace: system:
   Replication Strategy: org.apache.cassandra.locator.LocalStrategy
   Durable Writes: true
 Options: []
   Column Families:
 ColumnFamily: HintsColumnFamily (Super)
 hinted handoff data
   Key Validation Class: org.apache.cassandra.db.marshal.BytesType
   Default column value validator: 
 org.apache.cassandra.db.marshal.BytesType
   Columns sorted by: 
 org.apache.cassandra.db.marshal.BytesType/org.apache.cassandra.db.marshal.BytesType
   GC grace seconds: 0
   Compaction min/max thresholds: 4/32
   Read repair chance: 0.0
   DC Local Read repair chance: 0.0
   Replicate on write: true
   Caching: KEYS_ONLY
   Bloom Filter FP chance: default
   Built indexes: []
   Compaction Strategy: 
 org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy
 ColumnFamily: IndexInfo
 indexes that have been completed
   Key Validation Class: org.apache.cassandra.db.marshal.BytesType
   Default column value validator: 
 org.apache.cassandra.db.marshal.BytesType
   Columns sorted by: org.apache.cassandra.db.marshal.UTF8Type
   GC grace seconds: 0
   Compaction min/max thresholds: 4/32
   Read repair chance: 0.0
   DC Local Read repair chance: 0.0
   Replicate on write: true
   Caching: KEYS_ONLY
   Bloom Filter FP chance: default
   Built indexes: []
   Compaction Strategy: 
 org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy
 ColumnFamily: LocationInfo
 persistent metadata for the local node
   Key Validation Class: org.apache.cassandra.db.marshal.BytesType
   Default column value validator: 
 org.apache.cassandra.db.marshal.BytesType
   Columns sorted by: org.apache.cassandra.db.marshal.BytesType
   GC grace seconds: 0
   Compaction min/max thresholds: 4/32
   Read repair chance: 0.0
   DC Local Read repair chance: 0.0
   Replicate on write: true
   Caching: KEYS_ONLY
   Bloom Filter FP chance: default
   Built indexes: []
   Compaction Strategy: 
 org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy
 ColumnFamily: Migrations
 individual schema mutations
   Key Validation Class: org.apache.cassandra.db.marshal.BytesType
   Default column value validator: 
 org.apache.cassandra.db.marshal.BytesType
   Columns sorted by: org.apache.cassandra.db.marshal.TimeUUIDType
   GC grace seconds: 0
   Compaction min/max thresholds: 4/32
   Read repair chance: 0.0
   DC Local Read repair chance: 0.0
   Replicate on write: true
   Caching: KEYS_ONLY
   Bloom Filter FP chance: default
   Built indexes: []
   Compaction Strategy: 
 org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy
 ColumnFamily: NodeIdInfo
 nodeId and their metadata
   Key Validation Class: org.apache.cassandra.db.marshal.BytesType
   Default column value validator: 
 org.apache.cassandra.db.marshal.BytesType
   Columns sorted by: org.apache.cassandra.db.marshal.TimeUUIDType
   GC grace seconds: 0
   Compaction min/max thresholds: 4/32
   Read repair chance: 0.0
   DC Local Read repair chance: 0.0
   Replicate on write: true
   Caching: KEYS_ONLY
   Bloom Filter FP chance: default
   Built indexes: []
   Compaction Strategy: 
 org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy
 ColumnFamily: Schema
 current state of the schema
   Key Validation Class: org.apache.cassandra.db.marshal.BytesType
   Default column value validator: 
 org.apache.cassandra.db.marshal.BytesType
   Columns sorted by: 

git commit: (cql3) fix setting compaction strategy patch by Pavel Yaskevich; reviewed by Jonathan Ellis for CASSANDRA-4597

2012-09-04 Thread xedin
Updated Branches:
  refs/heads/cassandra-1.1 6e1f3a019 - 5c91bd142


(cql3) fix setting compaction strategy
patch by Pavel Yaskevich; reviewed by Jonathan Ellis for CASSANDRA-4597


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

Branch: refs/heads/cassandra-1.1
Commit: 5c91bd1420e68c84433681122cb0fb7f5235ad8c
Parents: 6e1f3a0
Author: Pavel Yaskevich xe...@apache.org
Authored: Mon Sep 3 12:19:08 2012 +0300
Committer: Pavel Yaskevich xe...@apache.org
Committed: Tue Sep 4 14:30:36 2012 +0300

--
 CHANGES.txt|1 +
 src/java/org/apache/cassandra/cql3/CFPropDefs.java |   12 +++-
 2 files changed, 12 insertions(+), 1 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/5c91bd14/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index d3eafe4..b23e9ba 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -3,6 +3,7 @@
  * increase stack size under Java7 to 180K
  * Log(info) schema changes (CASSANDRA-4547)
  * Change nodetool setcachecapcity to manipulate global caches (CASSANDRA-4563)
+ * (cql3) fix setting compaction strategy (CASSANDRA-4597)
 Merged from 1.0:
  * fix toString of hint destination tokens (CASSANDRA-4568)
 

http://git-wip-us.apache.org/repos/asf/cassandra/blob/5c91bd14/src/java/org/apache/cassandra/cql3/CFPropDefs.java
--
diff --git a/src/java/org/apache/cassandra/cql3/CFPropDefs.java 
b/src/java/org/apache/cassandra/cql3/CFPropDefs.java
index 04f0b41..01e14fb 100644
--- a/src/java/org/apache/cassandra/cql3/CFPropDefs.java
+++ b/src/java/org/apache/cassandra/cql3/CFPropDefs.java
@@ -21,10 +21,10 @@ package org.apache.cassandra.cql3;
 import com.google.common.collect.Sets;
 import org.apache.cassandra.config.CFMetaData;
 import org.apache.cassandra.config.ConfigurationException;
+import org.apache.cassandra.db.compaction.AbstractCompactionStrategy;
 import org.apache.cassandra.db.marshal.AbstractType;
 import org.apache.cassandra.db.marshal.TypeParser;
 import org.apache.cassandra.io.compress.CompressionParameters;
-import org.apache.cassandra.io.compress.SnappyCompressor;
 import org.apache.cassandra.thrift.InvalidRequestException;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -90,6 +90,7 @@ public class CFPropDefs
 }
 
 public final MapString, String properties = new HashMapString, 
String();
+private Class? extends AbstractCompactionStrategy 
compactionStrategyClass = null;
 public final MapString, String compactionStrategyOptions = new 
HashMapString, String();
 public final MapString, String compressionParameters = new 
HashMapString, String()
 {{
@@ -126,6 +127,12 @@ public class CFPropDefs
 throw new ConfigurationException(bogus +  is not a valid keyword 
argument for CREATE TABLE);
 for (String obsolete : Sets.intersection(properties.keySet(), 
obsoleteKeywords))
 logger.warn(Ignoring obsolete property {}, obsolete);
+
+if (properties.containsKey(KW_COMPACTION_STRATEGY_CLASS))
+{
+compactionStrategyClass = 
CFMetaData.createCompactionStrategy(properties.get(KW_COMPACTION_STRATEGY_CLASS));
+compactionStrategyOptions.remove(KW_COMPACTION_STRATEGY_CLASS);
+}
 }
 
 /** Map a keyword to the corresponding value */
@@ -173,6 +180,9 @@ public class CFPropDefs
 cfm.caching(CFMetaData.Caching.fromString(getString(KW_CACHING, 
cfm.getCaching().toString(;
 cfm.bloomFilterFpChance(getDouble(KW_BF_FP_CHANCE, 
cfm.getBloomFilterFpChance()));
 
+if (compactionStrategyClass != null)
+cfm.compactionStrategyClass(compactionStrategyClass);
+
 if (!compactionStrategyOptions.isEmpty())
 cfm.compactionStrategyOptions(new HashMapString, 
String(compactionStrategyOptions));
 



[2/2] git commit: (cql3) fix setting compaction strategy patch by Pavel Yaskevich; reviewed by Jonathan Ellis for CASSANDRA-4597

2012-09-04 Thread xedin
(cql3) fix setting compaction strategy
patch by Pavel Yaskevich; reviewed by Jonathan Ellis for CASSANDRA-4597


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

Branch: refs/heads/trunk
Commit: 5c91bd1420e68c84433681122cb0fb7f5235ad8c
Parents: 6e1f3a0
Author: Pavel Yaskevich xe...@apache.org
Authored: Mon Sep 3 12:19:08 2012 +0300
Committer: Pavel Yaskevich xe...@apache.org
Committed: Tue Sep 4 14:30:36 2012 +0300

--
 CHANGES.txt|1 +
 src/java/org/apache/cassandra/cql3/CFPropDefs.java |   12 +++-
 2 files changed, 12 insertions(+), 1 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/5c91bd14/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index d3eafe4..b23e9ba 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -3,6 +3,7 @@
  * increase stack size under Java7 to 180K
  * Log(info) schema changes (CASSANDRA-4547)
  * Change nodetool setcachecapcity to manipulate global caches (CASSANDRA-4563)
+ * (cql3) fix setting compaction strategy (CASSANDRA-4597)
 Merged from 1.0:
  * fix toString of hint destination tokens (CASSANDRA-4568)
 

http://git-wip-us.apache.org/repos/asf/cassandra/blob/5c91bd14/src/java/org/apache/cassandra/cql3/CFPropDefs.java
--
diff --git a/src/java/org/apache/cassandra/cql3/CFPropDefs.java 
b/src/java/org/apache/cassandra/cql3/CFPropDefs.java
index 04f0b41..01e14fb 100644
--- a/src/java/org/apache/cassandra/cql3/CFPropDefs.java
+++ b/src/java/org/apache/cassandra/cql3/CFPropDefs.java
@@ -21,10 +21,10 @@ package org.apache.cassandra.cql3;
 import com.google.common.collect.Sets;
 import org.apache.cassandra.config.CFMetaData;
 import org.apache.cassandra.config.ConfigurationException;
+import org.apache.cassandra.db.compaction.AbstractCompactionStrategy;
 import org.apache.cassandra.db.marshal.AbstractType;
 import org.apache.cassandra.db.marshal.TypeParser;
 import org.apache.cassandra.io.compress.CompressionParameters;
-import org.apache.cassandra.io.compress.SnappyCompressor;
 import org.apache.cassandra.thrift.InvalidRequestException;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -90,6 +90,7 @@ public class CFPropDefs
 }
 
 public final MapString, String properties = new HashMapString, 
String();
+private Class? extends AbstractCompactionStrategy 
compactionStrategyClass = null;
 public final MapString, String compactionStrategyOptions = new 
HashMapString, String();
 public final MapString, String compressionParameters = new 
HashMapString, String()
 {{
@@ -126,6 +127,12 @@ public class CFPropDefs
 throw new ConfigurationException(bogus +  is not a valid keyword 
argument for CREATE TABLE);
 for (String obsolete : Sets.intersection(properties.keySet(), 
obsoleteKeywords))
 logger.warn(Ignoring obsolete property {}, obsolete);
+
+if (properties.containsKey(KW_COMPACTION_STRATEGY_CLASS))
+{
+compactionStrategyClass = 
CFMetaData.createCompactionStrategy(properties.get(KW_COMPACTION_STRATEGY_CLASS));
+compactionStrategyOptions.remove(KW_COMPACTION_STRATEGY_CLASS);
+}
 }
 
 /** Map a keyword to the corresponding value */
@@ -173,6 +180,9 @@ public class CFPropDefs
 cfm.caching(CFMetaData.Caching.fromString(getString(KW_CACHING, 
cfm.getCaching().toString(;
 cfm.bloomFilterFpChance(getDouble(KW_BF_FP_CHANCE, 
cfm.getBloomFilterFpChance()));
 
+if (compactionStrategyClass != null)
+cfm.compactionStrategyClass(compactionStrategyClass);
+
 if (!compactionStrategyOptions.isEmpty())
 cfm.compactionStrategyOptions(new HashMapString, 
String(compactionStrategyOptions));
 



[1/2] git commit: merge from 1.1

2012-09-04 Thread xedin
Updated Branches:
  refs/heads/trunk 94e4ace75 - 5d8ba3d3b


merge from 1.1


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

Branch: refs/heads/trunk
Commit: 5d8ba3d3b4b76aa06a8e80abe017e43c007b
Parents: 94e4ace 5c91bd1
Author: Pavel Yaskevich xe...@apache.org
Authored: Tue Sep 4 14:39:41 2012 +0300
Committer: Pavel Yaskevich xe...@apache.org
Committed: Tue Sep 4 14:39:41 2012 +0300

--
 CHANGES.txt|1 +
 src/java/org/apache/cassandra/cql3/CFPropDefs.java |   11 +++
 2 files changed, 12 insertions(+), 0 deletions(-)
--


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

http://git-wip-us.apache.org/repos/asf/cassandra/blob/5d8ba3d3/src/java/org/apache/cassandra/cql3/CFPropDefs.java
--
diff --cc src/java/org/apache/cassandra/cql3/CFPropDefs.java
index bc0ba04,01e14fb..db85522
--- a/src/java/org/apache/cassandra/cql3/CFPropDefs.java
+++ b/src/java/org/apache/cassandra/cql3/CFPropDefs.java
@@@ -20,7 -21,11 +20,8 @@@ package org.apache.cassandra.cql3
  import com.google.common.collect.Sets;
  import org.apache.cassandra.config.CFMetaData;
  import org.apache.cassandra.config.ConfigurationException;
 -import org.apache.cassandra.db.compaction.AbstractCompactionStrategy;
 -import org.apache.cassandra.db.marshal.AbstractType;
 -import org.apache.cassandra.db.marshal.TypeParser;
  import org.apache.cassandra.io.compress.CompressionParameters;
 -import org.apache.cassandra.thrift.InvalidRequestException;
++import org.apache.cassandra.db.compaction.AbstractCompactionStrategy;
  import org.slf4j.Logger;
  import org.slf4j.LoggerFactory;
  



[jira] [Updated] (CASSANDRA-4497) Update CQL pseudo-maps to real maps

2012-09-04 Thread Pavel Yaskevich (JIRA)

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

Pavel Yaskevich updated CASSANDRA-4497:
---

Attachment: CASSANDRA-4497.patch

rebased patch after changes in CASSANDRA-4597

 Update CQL pseudo-maps to real maps
 ---

 Key: CASSANDRA-4497
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4497
 Project: Cassandra
  Issue Type: Bug
Affects Versions: 1.2.0 beta 1
Reporter: Jonathan Ellis
Assignee: Pavel Yaskevich
  Labels: cql3
 Fix For: 1.2.0 beta 1

 Attachments: CASSANDRA-4497.patch


 - compression_parameters
 - replication_parameters (combine strategy + options like we did compression)
 - anything else?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Updated] (CASSANDRA-4497) Update CQL pseudo-maps to real maps

2012-09-04 Thread Pavel Yaskevich (JIRA)

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

Pavel Yaskevich updated CASSANDRA-4497:
---

Attachment: (was: CASSANDRA-4497.patch)

 Update CQL pseudo-maps to real maps
 ---

 Key: CASSANDRA-4497
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4497
 Project: Cassandra
  Issue Type: Bug
Affects Versions: 1.2.0 beta 1
Reporter: Jonathan Ellis
Assignee: Pavel Yaskevich
  Labels: cql3
 Fix For: 1.2.0 beta 1


 - compression_parameters
 - replication_parameters (combine strategy + options like we did compression)
 - anything else?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (CASSANDRA-2478) Custom CQL protocol/transport

2012-09-04 Thread Nick Berardi (JIRA)

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

Nick Berardi commented on CASSANDRA-2478:
-

Has a default port been decided for the binary protocol yet?  I would love to 
get a jump on implementing this for my .NET library, FluentCassandra.

 Custom CQL protocol/transport
 -

 Key: CASSANDRA-2478
 URL: https://issues.apache.org/jira/browse/CASSANDRA-2478
 Project: Cassandra
  Issue Type: New Feature
  Components: API, Core
Reporter: Eric Evans
Assignee: Sylvain Lebresne
Priority: Minor
  Labels: cql
 Fix For: 1.2.0 beta 1

 Attachments: cql_binary_protocol, cql_binary_protocol-v2


 A custom wire protocol would give us the flexibility to optimize for our 
 specific use-cases, and eliminate a troublesome dependency (I'm referring to 
 Thrift, but none of the others would be significantly better).  Additionally, 
 RPC is bad fit here, and we'd do better to move in the direction of something 
 that natively supports streaming.
 I don't think this is as daunting as it might seem initially.  Utilizing an 
 existing server framework like Netty, combined with some copy-and-paste of 
 bits from other FLOSS projects would probably get us 80% of the way there.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (CASSANDRA-2478) Custom CQL protocol/transport

2012-09-04 Thread Sylvain Lebresne (JIRA)

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

Sylvain Lebresne commented on CASSANDRA-2478:
-

The currently committed implementation uses port 8000 for the binary protocol. 
Honestly that was kind of a random choice and I don't care about changing that 
to any other random choice. Not sure why that choice would stop anyone from 
starting implementing the binary protocol in any client library though.

 Custom CQL protocol/transport
 -

 Key: CASSANDRA-2478
 URL: https://issues.apache.org/jira/browse/CASSANDRA-2478
 Project: Cassandra
  Issue Type: New Feature
  Components: API, Core
Reporter: Eric Evans
Assignee: Sylvain Lebresne
Priority: Minor
  Labels: cql
 Fix For: 1.2.0 beta 1

 Attachments: cql_binary_protocol, cql_binary_protocol-v2


 A custom wire protocol would give us the flexibility to optimize for our 
 specific use-cases, and eliminate a troublesome dependency (I'm referring to 
 Thrift, but none of the others would be significantly better).  Additionally, 
 RPC is bad fit here, and we'd do better to move in the direction of something 
 that natively supports streaming.
 I don't think this is as daunting as it might seem initially.  Utilizing an 
 existing server framework like Netty, combined with some copy-and-paste of 
 bits from other FLOSS projects would probably get us 80% of the way there.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Created] (CASSANDRA-4607) Support SSL Client Encryption

2012-09-04 Thread T Jake Luciani (JIRA)
T Jake Luciani created CASSANDRA-4607:
-

 Summary: Support SSL Client Encryption
 Key: CASSANDRA-4607
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4607
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Reporter: T Jake Luciani
 Fix For: 1.1.5


There have been a number of requests for SSL client encryption.

Thrift supports this with TSSLSocket.

I'd like to continue with the approach taken in CASSANDRA-4558 and see a 
factory implementation for server and clients. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Resolved] (CASSANDRA-4607) Support SSL Client Encryption

2012-09-04 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis resolved CASSANDRA-4607.
---

Resolution: Duplicate

CASSANDRA-4239

 Support SSL Client Encryption
 -

 Key: CASSANDRA-4607
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4607
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Reporter: T Jake Luciani
 Fix For: 1.1.5


 There have been a number of requests for SSL client encryption.
 Thrift supports this with TSSLSocket.
 I'd like to continue with the approach taken in CASSANDRA-4558 and see a 
 factory implementation for server and clients. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (CASSANDRA-2478) Custom CQL protocol/transport

2012-09-04 Thread Nick Berardi (JIRA)

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

Nick Berardi commented on CASSANDRA-2478:
-

I didn't see a reference to any port, so 8000 is good enough for me.  It wasn't 
actually stopping me from doing anything, I just didn't know what endpoint to 
connect my build up to.  

 Custom CQL protocol/transport
 -

 Key: CASSANDRA-2478
 URL: https://issues.apache.org/jira/browse/CASSANDRA-2478
 Project: Cassandra
  Issue Type: New Feature
  Components: API, Core
Reporter: Eric Evans
Assignee: Sylvain Lebresne
Priority: Minor
  Labels: cql
 Fix For: 1.2.0 beta 1

 Attachments: cql_binary_protocol, cql_binary_protocol-v2


 A custom wire protocol would give us the flexibility to optimize for our 
 specific use-cases, and eliminate a troublesome dependency (I'm referring to 
 Thrift, but none of the others would be significantly better).  Additionally, 
 RPC is bad fit here, and we'd do better to move in the direction of something 
 that natively supports streaming.
 I don't think this is as daunting as it might seem initially.  Utilizing an 
 existing server framework like Netty, combined with some copy-and-paste of 
 bits from other FLOSS projects would probably get us 80% of the way there.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Created] (CASSANDRA-4608) Add thrift server factory to CassandraDaemon

2012-09-04 Thread T Jake Luciani (JIRA)
T Jake Luciani created CASSANDRA-4608:
-

 Summary: Add thrift server factory to CassandraDaemon
 Key: CASSANDRA-4608
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4608
 Project: Cassandra
  Issue Type: Sub-task
Reporter: T Jake Luciani
 Fix For: 1.1.5


Add factory class for CassandraServer

Default impl will be the current thrift server types.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (CASSANDRA-2478) Custom CQL protocol/transport

2012-09-04 Thread Nick Berardi (JIRA)

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

Nick Berardi commented on CASSANDRA-2478:
-

Apparently a lot of other software also choose 8000 at random too.  
http://www.speedguide.net/port.php?port=8000  Everything from internet radio to 
trojans to VoIP also use it.  It might be wise to choose one that is less 
random, so that communication over the internet isn't hampered by other rogue 
programs getting blocked for using the same port.

Port 8160 seems pretty clean:
http://www.speedguide.net/port.php?port=8160

I don't care either way, 8000 just seems crowded to me.

 Custom CQL protocol/transport
 -

 Key: CASSANDRA-2478
 URL: https://issues.apache.org/jira/browse/CASSANDRA-2478
 Project: Cassandra
  Issue Type: New Feature
  Components: API, Core
Reporter: Eric Evans
Assignee: Sylvain Lebresne
Priority: Minor
  Labels: cql
 Fix For: 1.2.0 beta 1

 Attachments: cql_binary_protocol, cql_binary_protocol-v2


 A custom wire protocol would give us the flexibility to optimize for our 
 specific use-cases, and eliminate a troublesome dependency (I'm referring to 
 Thrift, but none of the others would be significantly better).  Additionally, 
 RPC is bad fit here, and we'd do better to move in the direction of something 
 that natively supports streaming.
 I don't think this is as daunting as it might seem initially.  Utilizing an 
 existing server framework like Netty, combined with some copy-and-paste of 
 bits from other FLOSS projects would probably get us 80% of the way there.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Updated] (CASSANDRA-4579) CQL queries using LIMIT sometimes missing results

2012-09-04 Thread Sylvain Lebresne (JIRA)

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

Sylvain Lebresne updated CASSANDRA-4579:


Attachment: 0002-Fix-LIMIT-for-NamesQueryFilter.txt
0001-Add-all-columns-from-a-prefix-group-before-stopping.txt

There is indeed 2 bugs when counting columns with composites (introduced by the 
change made for collections, so 1.1 is not affected in particular).

The first one is that to count the number of CQL row to return, 
SliceQueryFilter groups columns having the same composite prefix (i.e. all the 
columns belonging to the same CQL row) and count that as 1. However the code 
was stopping collecting columns as sound as the requested count was reached, 
without waiting having seen all the columns of the last group.

The second one is that for NamesQueryFilter, each internal Cassandra row will 
yield exactly one CQL row, so we must use the count keys rather than count 
columns argument for getRangeSlice in that case.

Attached fix for both (I've pushed a dtest with the two examples from that 
ticket).


 CQL queries using LIMIT sometimes missing results
 -

 Key: CASSANDRA-4579
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4579
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Affects Versions: 1.2.0 beta 1
Reporter: paul cannon
Assignee: Sylvain Lebresne
  Labels: cql, cql3
 Fix For: 1.2.0

 Attachments: 
 0001-Add-all-columns-from-a-prefix-group-before-stopping.txt, 
 0002-Fix-LIMIT-for-NamesQueryFilter.txt


 In certain conditions, CQL queries using LIMIT clauses are not being given 
 all of the expected results (whether unset column values or missing rows).
 Here are the condition sets I've been able to identify:
 First mode: all rows are returned, but in the last row of results, all 
 columns which are not part of the primary key receive no values, except for 
 the first non-primary-key column. Conditions:
  * Table has a multi-component primary key
  * Table has more than one column which is not a component of the primary key
  * The number of results which would be returned by a query is equal to or 
 more than the specified LIMIT
 Second mode: result has fewer rows than it should, lower than both the LIMIT 
 and the actual number of matching rows. Conditions:
  * Table has a single-column primary key
  * Table has more than one column which is not a component of the primary key
  * The number of results which would be returned by a query is equal to or 
 more than the specified LIMIT
 It would make sense to me that this would have started with CASSANDRA-4329, 
 but bisecting indicates that this behavior started with commit 
 91bdf7fb4220b27e9566c6673bf5dbd14153017c, implementing CASSANDRA-3647.
 Test case for the first failure mode:
 {noformat}
 DROP KEYSPACE test;
 CREATE KEYSPACE test
 WITH strategy_class = 'SimpleStrategy'
 AND strategy_options:replication_factor = 1;
 USE test;
 CREATE TABLE testcf (
 a int,
 b int,
 c int,
 d int,
 e int,
 PRIMARY KEY (a, b)
 );
 INSERT INTO testcf (a, b, c, d, e) VALUES (1, 11, 111, , 1);
 INSERT INTO testcf (a, b, c, d, e) VALUES (2, 22, 222, , 2);
 INSERT INTO testcf (a, b, c, d, e) VALUES (3, 33, 333, , 3);
 INSERT INTO testcf (a, b, c, d, e) VALUES (4, 44, 444, , 4);
 SELECT * FROM testcf;
 SELECT * FROM testcf LIMIT 1; -- columns d and e in result row are null
 SELECT * FROM testcf LIMIT 2; -- columns d and e in last result row are null
 SELECT * FROM testcf LIMIT 3; -- columns d and e in last result row are null
 SELECT * FROM testcf LIMIT 4; -- columns d and e in last result row are null
 SELECT * FROM testcf LIMIT 5; -- results are correct (4 rows returned)
 {noformat}
 Test case for the second failure mode:
 {noformat}
 CREATE KEYSPACE test
 WITH strategy_class = 'SimpleStrategy'
 AND strategy_options:replication_factor = 1;
 USE test;
 CREATE TABLE testcf (
 a int primary key,
 b int,
 c int,
 );
 INSERT INTO testcf (a, b, c) VALUES (1, 11, 111);
 INSERT INTO testcf (a, b, c) VALUES (2, 22, 222);
 INSERT INTO testcf (a, b, c) VALUES (3, 33, 333);
 INSERT INTO testcf (a, b, c) VALUES (4, 44, 444);
 SELECT * FROM testcf;
 SELECT * FROM testcf LIMIT 1; -- gives 1 row
 SELECT * FROM testcf LIMIT 2; -- gives 1 row
 SELECT * FROM testcf LIMIT 3; -- gives 2 rows
 SELECT * FROM testcf LIMIT 4; -- gives 2 rows
 SELECT * FROM testcf LIMIT 5; -- gives 3 rows
 {noformat}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Created] (CASSANDRA-4610) Add thrift transport factory impl to cqlsh

2012-09-04 Thread T Jake Luciani (JIRA)
T Jake Luciani created CASSANDRA-4610:
-

 Summary: Add thrift transport factory impl to cqlsh
 Key: CASSANDRA-4610
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4610
 Project: Cassandra
  Issue Type: Sub-task
Reporter: T Jake Luciani




--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Created] (CASSANDRA-4609) Add thrift transport factory impl to cassandra-cli

2012-09-04 Thread T Jake Luciani (JIRA)
T Jake Luciani created CASSANDRA-4609:
-

 Summary: Add thrift transport factory impl to cassandra-cli
 Key: CASSANDRA-4609
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4609
 Project: Cassandra
  Issue Type: Sub-task
Reporter: T Jake Luciani




--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Updated] (CASSANDRA-4608) Add thrift server factory to CassandraDaemon

2012-09-04 Thread T Jake Luciani (JIRA)

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

T Jake Luciani updated CASSANDRA-4608:
--

Parent Issue: CASSANDRA-4239  (was: CASSANDRA-4607)

 Add thrift server factory to CassandraDaemon
 

 Key: CASSANDRA-4608
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4608
 Project: Cassandra
  Issue Type: Sub-task
Reporter: T Jake Luciani
 Fix For: 1.1.5


 Add factory class for CassandraServer
 Default impl will be the current thrift server types.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Updated] (CASSANDRA-4609) Add thrift transport factory impl to cassandra-cli

2012-09-04 Thread T Jake Luciani (JIRA)

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

T Jake Luciani updated CASSANDRA-4609:
--

Parent Issue: CASSANDRA-4239  (was: CASSANDRA-4607)

 Add thrift transport factory impl to cassandra-cli
 --

 Key: CASSANDRA-4609
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4609
 Project: Cassandra
  Issue Type: Sub-task
Reporter: T Jake Luciani



--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Updated] (CASSANDRA-4610) Add thrift transport factory impl to cqlsh

2012-09-04 Thread T Jake Luciani (JIRA)

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

T Jake Luciani updated CASSANDRA-4610:
--

Parent Issue: CASSANDRA-4239  (was: CASSANDRA-4607)

 Add thrift transport factory impl to cqlsh
 --

 Key: CASSANDRA-4610
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4610
 Project: Cassandra
  Issue Type: Sub-task
Reporter: T Jake Luciani



--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Comment Edited] (CASSANDRA-4471) Unable to drop keyspace

2012-09-04 Thread Svend Hansen (JIRA)

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

Svend Hansen edited comment on CASSANDRA-4471 at 9/5/12 12:53 AM:
--

We're having the same problem on our build server. Can't drop or alter column 
families and can't drop keyspace.
We're running cassandra 1.1.3 on Ubuntu 12.04.1 LTS.
We haven't had the problem on any of our test servers which are running 1.1.2 
on Amazon Linux (based on RedHat).
Not sure if the difference is the Cassandra version (you see it on 1.1.2, 
right?) or the OS (you all experience this just on Debian?)

Edit: I've installed 1.1.4 on the build server but had to actually delete the 
data files to get rid of the CFs. I'll see if it happens again with 1.1.4...

  was (Author: svendhhh):
We're having the same problem on our build server. Can't drop or alter 
column families and can't drop keyspace.
We're running cassandra 1.1.3 on Ubuntu 12.04.1 LTS.
We haven't had the problem on any of our test servers which are running 1.1.2 
on Amazon Linux (based on RedHat).
Not sure if the difference is the Cassandra version (you see it on 1.1.2, 
right?) or the OS (you all experience this just on Debian?)


  
 Unable to drop keyspace
 ---

 Key: CASSANDRA-4471
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4471
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Affects Versions: 1.1.2
 Environment: Debian 6, cassandra.apache.org binary package
Reporter: Tuure Laurinolli

 Drop keyspace command completes without error but the keyspace is not 
 removed. Reproduced both using cassandra-cli and pycassa. 
 Drop as observed from command line:
 [default@unknown] show keyspaces; 
 Keyspace: system:
   Replication Strategy: org.apache.cassandra.locator.LocalStrategy
   Durable Writes: true
 Options: []
   Column Families:
 ColumnFamily: HintsColumnFamily (Super)
 hinted handoff data
   Key Validation Class: org.apache.cassandra.db.marshal.BytesType
   Default column value validator: 
 org.apache.cassandra.db.marshal.BytesType
   Columns sorted by: 
 org.apache.cassandra.db.marshal.BytesType/org.apache.cassandra.db.marshal.BytesType
   GC grace seconds: 0
   Compaction min/max thresholds: 4/32
   Read repair chance: 0.0
   DC Local Read repair chance: 0.0
   Replicate on write: true
   Caching: KEYS_ONLY
   Bloom Filter FP chance: default
   Built indexes: []
   Compaction Strategy: 
 org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy
 ColumnFamily: IndexInfo
 indexes that have been completed
   Key Validation Class: org.apache.cassandra.db.marshal.BytesType
   Default column value validator: 
 org.apache.cassandra.db.marshal.BytesType
   Columns sorted by: org.apache.cassandra.db.marshal.UTF8Type
   GC grace seconds: 0
   Compaction min/max thresholds: 4/32
   Read repair chance: 0.0
   DC Local Read repair chance: 0.0
   Replicate on write: true
   Caching: KEYS_ONLY
   Bloom Filter FP chance: default
   Built indexes: []
   Compaction Strategy: 
 org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy
 ColumnFamily: LocationInfo
 persistent metadata for the local node
   Key Validation Class: org.apache.cassandra.db.marshal.BytesType
   Default column value validator: 
 org.apache.cassandra.db.marshal.BytesType
   Columns sorted by: org.apache.cassandra.db.marshal.BytesType
   GC grace seconds: 0
   Compaction min/max thresholds: 4/32
   Read repair chance: 0.0
   DC Local Read repair chance: 0.0
   Replicate on write: true
   Caching: KEYS_ONLY
   Bloom Filter FP chance: default
   Built indexes: []
   Compaction Strategy: 
 org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy
 ColumnFamily: Migrations
 individual schema mutations
   Key Validation Class: org.apache.cassandra.db.marshal.BytesType
   Default column value validator: 
 org.apache.cassandra.db.marshal.BytesType
   Columns sorted by: org.apache.cassandra.db.marshal.TimeUUIDType
   GC grace seconds: 0
   Compaction min/max thresholds: 4/32
   Read repair chance: 0.0
   DC Local Read repair chance: 0.0
   Replicate on write: true
   Caching: KEYS_ONLY
   Bloom Filter FP chance: default
   Built indexes: []
   Compaction Strategy: 
 org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy
 ColumnFamily: NodeIdInfo
 nodeId and their metadata
   Key Validation Class: org.apache.cassandra.db.marshal.BytesType
   Default column value validator: 
 org.apache.cassandra.db.marshal.BytesType
   Columns sorted by: 

[jira] [Commented] (CASSANDRA-4239) Support Thrift SSL socket

2012-09-04 Thread T Jake Luciani (JIRA)

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

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

Linking factory approach described in CASSANDRA-4607

 Support Thrift SSL socket
 -

 Key: CASSANDRA-4239
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4239
 Project: Cassandra
  Issue Type: New Feature
  Components: API
Reporter: Jonathan Ellis
Assignee: Jason Brown
Priority: Minor
 Fix For: 1.2.1


 Thrift has supported SSL encryption for a while now (THRIFT-106); we should 
 allow configuring that in cassandra.yaml

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (CASSANDRA-4239) Support Thrift SSL socket

2012-09-04 Thread T Jake Luciani (JIRA)

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

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

Re [~brandon.williams] comment, we could change to server_encryption_options 
with the fallback of encryption_options and a log warning saying it needs to be 
updated.

 Support Thrift SSL socket
 -

 Key: CASSANDRA-4239
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4239
 Project: Cassandra
  Issue Type: New Feature
  Components: API
Reporter: Jonathan Ellis
Assignee: Jason Brown
Priority: Minor
 Fix For: 1.2.1


 Thrift has supported SSL encryption for a while now (THRIFT-106); we should 
 allow configuring that in cassandra.yaml

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Updated] (CASSANDRA-4542) add atomic_batch_mutate method

2012-09-04 Thread Aleksey Yeschenko (JIRA)

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

Aleksey Yeschenko updated CASSANDRA-4542:
-

Attachment: CASSANDRA-4542-and-CASSANDRA-4544-v2.patch

 add atomic_batch_mutate method
 --

 Key: CASSANDRA-4542
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4542
 Project: Cassandra
  Issue Type: Sub-task
  Components: API, Core
Reporter: Jonathan Ellis
Assignee: Aleksey Yeschenko
 Fix For: 1.2.1

 Attachments: CASSANDRA-4542-4544.diff, 
 CASSANDRA-4542-and-CASSANDRA-4544-v2.patch, CASSANDRA-4542.patch


 atomic_batch_mutate will have the same parameters as batch_mutate, but will 
 write to the batchlog before attempting distribution to the batch rows' 
 replicas.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


git commit: Add gossip padding for 1.1 This puts us at 5 new states for trunk, and thus no more can be added or we exceed the previous padding.

2012-09-04 Thread brandonwilliams
Updated Branches:
  refs/heads/trunk 5d8ba3d3b - 73317c442


Add gossip padding for 1.1
This puts us at 5 new states for trunk, and thus no more can be added or
we exceed the previous padding.


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

Branch: refs/heads/trunk
Commit: 73317c4427e25c131a95095781b8ddb3c95d133e
Parents: 5d8ba3d
Author: Brandon Williams brandonwilli...@apache.org
Authored: Tue Sep 4 09:17:49 2012 -0500
Committer: Brandon Williams brandonwilli...@apache.org
Committed: Tue Sep 4 09:18:41 2012 -0500

--
 .../org/apache/cassandra/gms/ApplicationState.java |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/73317c44/src/java/org/apache/cassandra/gms/ApplicationState.java
--
diff --git a/src/java/org/apache/cassandra/gms/ApplicationState.java 
b/src/java/org/apache/cassandra/gms/ApplicationState.java
index 518aa80..0a97c4d 100644
--- a/src/java/org/apache/cassandra/gms/ApplicationState.java
+++ b/src/java/org/apache/cassandra/gms/ApplicationState.java
@@ -26,6 +26,7 @@ public enum ApplicationState
 RACK,
 RELEASE_VERSION,
 REMOVAL_COORDINATOR,
+X_11_PADDING, // padding specifically for 1.1
 INTERNAL_IP,
 RPC_ADDRESS,
 SEVERITY,



git commit: Add more padding to in case of gossipocalypse.

2012-09-04 Thread brandonwilliams
Updated Branches:
  refs/heads/trunk 73317c442 - 3282cb524


Add more padding to in case of gossipocalypse.


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

Branch: refs/heads/trunk
Commit: 3282cb5242bc9d29f5492f144fb5d593921779dc
Parents: 73317c4
Author: Brandon Williams brandonwilli...@apache.org
Authored: Tue Sep 4 09:26:01 2012 -0500
Committer: Brandon Williams brandonwilli...@apache.org
Committed: Tue Sep 4 09:26:01 2012 -0500

--
 .../org/apache/cassandra/gms/ApplicationState.java |5 +
 1 files changed, 5 insertions(+), 0 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/3282cb52/src/java/org/apache/cassandra/gms/ApplicationState.java
--
diff --git a/src/java/org/apache/cassandra/gms/ApplicationState.java 
b/src/java/org/apache/cassandra/gms/ApplicationState.java
index 0a97c4d..4fc7330 100644
--- a/src/java/org/apache/cassandra/gms/ApplicationState.java
+++ b/src/java/org/apache/cassandra/gms/ApplicationState.java
@@ -37,4 +37,9 @@ public enum ApplicationState
 X3,
 X4,
 X5,
+X6,
+X7,
+X8,
+X9,
+X10,
 }



[jira] [Commented] (CASSANDRA-4542) add atomic_batch_mutate method

2012-09-04 Thread Aleksey Yeschenko (JIRA)

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

Aleksey Yeschenko commented on CASSANDRA-4542:
--

Batchlog columnfamily currently lives in System KS. Moving it to a separate KS 
would allow disabling commitlog for batchlog writes, but I'm not sure that's a 
good idea.
Also, I probably shouldn't wait for writes to complete in 
StorageProxy#removeFromBatchlog (should remove handler.get() call).

 add atomic_batch_mutate method
 --

 Key: CASSANDRA-4542
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4542
 Project: Cassandra
  Issue Type: Sub-task
  Components: API, Core
Reporter: Jonathan Ellis
Assignee: Aleksey Yeschenko
 Fix For: 1.2.1

 Attachments: CASSANDRA-4542-4544.diff, 
 CASSANDRA-4542-and-CASSANDRA-4544-v2.patch, CASSANDRA-4542.patch


 atomic_batch_mutate will have the same parameters as batch_mutate, but will 
 write to the batchlog before attempting distribution to the batch rows' 
 replicas.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Updated] (CASSANDRA-4542) add atomic_batch_mutate method

2012-09-04 Thread Aleksey Yeschenko (JIRA)

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

Aleksey Yeschenko updated CASSANDRA-4542:
-

Attachment: (was: CASSANDRA-4542.patch)

 add atomic_batch_mutate method
 --

 Key: CASSANDRA-4542
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4542
 Project: Cassandra
  Issue Type: Sub-task
  Components: API, Core
Reporter: Jonathan Ellis
Assignee: Aleksey Yeschenko
 Fix For: 1.2.1

 Attachments: CASSANDRA-4542-4544.diff, 
 CASSANDRA-4542-and-CASSANDRA-4544-v2.patch


 atomic_batch_mutate will have the same parameters as batch_mutate, but will 
 write to the batchlog before attempting distribution to the batch rows' 
 replicas.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Updated] (CASSANDRA-4542) add atomic_batch_mutate method

2012-09-04 Thread Aleksey Yeschenko (JIRA)

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

Aleksey Yeschenko updated CASSANDRA-4542:
-

Attachment: (was: CASSANDRA-4542-4544.diff)

 add atomic_batch_mutate method
 --

 Key: CASSANDRA-4542
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4542
 Project: Cassandra
  Issue Type: Sub-task
  Components: API, Core
Reporter: Jonathan Ellis
Assignee: Aleksey Yeschenko
 Fix For: 1.2.1

 Attachments: CASSANDRA-4542-and-CASSANDRA-4544-v2.patch


 atomic_batch_mutate will have the same parameters as batch_mutate, but will 
 write to the batchlog before attempting distribution to the batch rows' 
 replicas.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Updated] (CASSANDRA-2858) make request dropping more accurate

2012-09-04 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis updated CASSANDRA-2858:
--

Reviewer: vijay2...@yahoo.com  (was: brandon.williams)

 make request dropping more accurate
 ---

 Key: CASSANDRA-2858
 URL: https://issues.apache.org/jira/browse/CASSANDRA-2858
 Project: Cassandra
  Issue Type: Improvement
Reporter: Ryan King
Assignee: Jonathan Ellis
Priority: Minor
 Fix For: 1.2.0 beta 1

 Attachments: 2858.txt


 Based on the discussion in CASSANDRA-2819, we can make the bookkeeping for 
 request times more accurate.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


git commit: Correct padding position

2012-09-04 Thread brandonwilliams
Updated Branches:
  refs/heads/trunk 3282cb524 - cf5a31ff9


Correct padding position


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

Branch: refs/heads/trunk
Commit: cf5a31ff90338783d451772fad57df781f45c24e
Parents: 3282cb5
Author: Brandon Williams brandonwilli...@apache.org
Authored: Tue Sep 4 09:39:44 2012 -0500
Committer: Brandon Williams brandonwilli...@apache.org
Committed: Tue Sep 4 09:39:44 2012 -0500

--
 .../org/apache/cassandra/gms/ApplicationState.java |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/cf5a31ff/src/java/org/apache/cassandra/gms/ApplicationState.java
--
diff --git a/src/java/org/apache/cassandra/gms/ApplicationState.java 
b/src/java/org/apache/cassandra/gms/ApplicationState.java
index 4fc7330..f23a6fc 100644
--- a/src/java/org/apache/cassandra/gms/ApplicationState.java
+++ b/src/java/org/apache/cassandra/gms/ApplicationState.java
@@ -26,9 +26,9 @@ public enum ApplicationState
 RACK,
 RELEASE_VERSION,
 REMOVAL_COORDINATOR,
-X_11_PADDING, // padding specifically for 1.1
 INTERNAL_IP,
 RPC_ADDRESS,
+X_11_PADDING, // padding specifically for 1.1
 SEVERITY,
 NET_VERSION,
 // pad to allow adding new states to existing cluster



[jira] [Commented] (CASSANDRA-4571) Strange permament socket descriptors increasing leads to Too many open files

2012-09-04 Thread Brandon Williams (JIRA)

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

Brandon Williams commented on CASSANDRA-4571:
-

Thanks to a reproducible example from Viktor Kuzmin, I've bisected this down to 
CASSANDRA-4116.

 Strange permament socket descriptors increasing leads to Too many open files
 --

 Key: CASSANDRA-4571
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4571
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Affects Versions: 1.1.1, 1.1.2, 1.1.3
 Environment: CentOS 5.8 Linux 2.6.18-308.13.1.el5 #1 SMP Tue Aug 21 
 17:10:18 EDT 2012 x86_64 x86_64 x86_64 GNU/Linux. 
 java version 1.6.0_33
 Java(TM) SE Runtime Environment (build 1.6.0_33-b03)
 Java HotSpot(TM) 64-Bit Server VM (build 20.8-b03, mixed mode)
Reporter: Serg Shnerson
Priority: Critical

 On the two-node cluster there was found strange socket descriptors 
 increasing. lsof -n | grep java shows many rows like
 java   8380 cassandra  113r unix 0x8101a374a080
 938348482 socket
 java   8380 cassandra  114r unix 0x8101a374a080
 938348482 socket
 java   8380 cassandra  115r unix 0x8101a374a080
 938348482 socket
 java   8380 cassandra  116r unix 0x8101a374a080
 938348482 socket
 java   8380 cassandra  117r unix 0x8101a374a080
 938348482 socket
 java   8380 cassandra  118r unix 0x8101a374a080
 938348482 socket
 java   8380 cassandra  119r unix 0x8101a374a080
 938348482 socket
 java   8380 cassandra  120r unix 0x8101a374a080
 938348482 socket
  And number of this rows constantly increasing. After about 24 hours this 
 situation leads to error.
 We use PHPCassa client. Load is not so high (aroud ~50kb/s on write). 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


git commit: Binary encoding of tokens. Also promotes new gossip states: HOST_ID and TOKENS Patch by brandonwilliams, reviewed by eevans for CASSANDRA-4383

2012-09-04 Thread brandonwilliams
Updated Branches:
  refs/heads/trunk cf5a31ff9 - b475bc69b


Binary encoding of tokens.
Also promotes new gossip states: HOST_ID and TOKENS
Patch by brandonwilliams, reviewed by eevans for CASSANDRA-4383


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

Branch: refs/heads/trunk
Commit: b475bc69b7e6d08e6d12527578552e67e8c0f88a
Parents: cf5a31f
Author: Brandon Williams brandonwilli...@apache.org
Authored: Tue Sep 4 10:41:58 2012 -0500
Committer: Brandon Williams brandonwilli...@apache.org
Committed: Tue Sep 4 10:41:58 2012 -0500

--
 .../org/apache/cassandra/gms/ApplicationState.java |2 +
 .../org/apache/cassandra/gms/FailureDetector.java  |4 +
 src/java/org/apache/cassandra/gms/Gossiper.java|   28 -
 .../org/apache/cassandra/gms/TokenSerializer.java  |   68 ++
 .../org/apache/cassandra/gms/VersionedValue.java   |   44 +--
 .../apache/cassandra/service/StorageService.java   |  105 +++
 test/unit/org/apache/cassandra/Util.java   |5 +-
 .../org/apache/cassandra/dht/BootStrapperTest.java |   12 +-
 .../apache/cassandra/gms/SerializationsTest.java   |3 +-
 .../service/AntiEntropyServiceTestAbstract.java|2 +-
 .../cassandra/service/LeaveAndBootstrapTest.java   |   46 ---
 .../org/apache/cassandra/service/MoveTest.java |   22 ++--
 .../org/apache/cassandra/service/RemoveTest.java   |4 -
 13 files changed, 234 insertions(+), 111 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/b475bc69/src/java/org/apache/cassandra/gms/ApplicationState.java
--
diff --git a/src/java/org/apache/cassandra/gms/ApplicationState.java 
b/src/java/org/apache/cassandra/gms/ApplicationState.java
index f23a6fc..777dfc5 100644
--- a/src/java/org/apache/cassandra/gms/ApplicationState.java
+++ b/src/java/org/apache/cassandra/gms/ApplicationState.java
@@ -31,6 +31,8 @@ public enum ApplicationState
 X_11_PADDING, // padding specifically for 1.1
 SEVERITY,
 NET_VERSION,
+HOST_ID,
+TOKENS,
 // pad to allow adding new states to existing cluster
 X1,
 X2,

http://git-wip-us.apache.org/repos/asf/cassandra/blob/b475bc69/src/java/org/apache/cassandra/gms/FailureDetector.java
--
diff --git a/src/java/org/apache/cassandra/gms/FailureDetector.java 
b/src/java/org/apache/cassandra/gms/FailureDetector.java
index c58a559..2b3905a 100644
--- a/src/java/org/apache/cassandra/gms/FailureDetector.java
+++ b/src/java/org/apache/cassandra/gms/FailureDetector.java
@@ -101,7 +101,11 @@ public class FailureDetector implements IFailureDetector, 
FailureDetectorMBean
 private void appendEndpointState(StringBuilder sb, EndpointState 
endpointState)
 {
 for (Map.EntryApplicationState, VersionedValue state : 
endpointState.applicationState.entrySet())
+{
+if (state.getKey() == ApplicationState.TOKENS)
+continue;
 sb.append(  
).append(state.getKey()).append(:).append(state.getValue().value).append(\n);
+}
 }
 
 /**

http://git-wip-us.apache.org/repos/asf/cassandra/blob/b475bc69/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 a771197..2404e40 100644
--- a/src/java/org/apache/cassandra/gms/Gossiper.java
+++ b/src/java/org/apache/cassandra/gms/Gossiper.java
@@ -618,6 +618,22 @@ public class Gossiper implements 
IFailureDetectionEventListener, GossiperMBean
 return endpointStateMap.entrySet();
 }
 
+public boolean usesHostId(InetAddress endpoint)
+{
+if (MessagingService.instance().knowsVersion(endpoint)  
MessagingService.instance().getVersion(endpoint) = MessagingService.VERSION_12)
+return true;
+else  if 
(getEndpointStateForEndpoint(endpoint).getApplicationState(ApplicationState.NET_VERSION)
 != null  
Integer.valueOf(getEndpointStateForEndpoint(endpoint).getApplicationState(ApplicationState.NET_VERSION).value)
 = MessagingService.VERSION_12)
+return true;
+return false;
+}
+
+public UUID getHostId(InetAddress endpoint)
+{
+if (!usesHostId(endpoint))
+throw new RuntimeException(Host  + endpoint +  does not use 
new-style tokens!);
+return 
UUID.fromString(getEndpointStateForEndpoint(endpoint).getApplicationState(ApplicationState.HOST_ID).value);
+}
+
 EndpointState 

[jira] [Created] (CASSANDRA-4611) Add AlterKeyspace statement

2012-09-04 Thread Sylvain Lebresne (JIRA)
Sylvain Lebresne created CASSANDRA-4611:
---

 Summary: Add AlterKeyspace statement
 Key: CASSANDRA-4611
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4611
 Project: Cassandra
  Issue Type: New Feature
  Components: API
Affects Versions: 1.1.0
Reporter: Sylvain Lebresne
Priority: Minor
 Fix For: 1.2.0


Somehow we never added an ALTER KEYSPACE statement. We should.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Updated] (CASSANDRA-4571) Strange permament socket descriptors increasing leads to Too many open files

2012-09-04 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis updated CASSANDRA-4571:
--

Attachment: 4116.txt

Patch to fix 4116 sstable iterator leak.

 Strange permament socket descriptors increasing leads to Too many open files
 --

 Key: CASSANDRA-4571
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4571
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Affects Versions: 1.1.1
 Environment: CentOS 5.8 Linux 2.6.18-308.13.1.el5 #1 SMP Tue Aug 21 
 17:10:18 EDT 2012 x86_64 x86_64 x86_64 GNU/Linux. 
 java version 1.6.0_33
 Java(TM) SE Runtime Environment (build 1.6.0_33-b03)
 Java HotSpot(TM) 64-Bit Server VM (build 20.8-b03, mixed mode)
Reporter: Serg Shnerson
Priority: Critical
 Fix For: 1.1.5

 Attachments: 4116.txt


 On the two-node cluster there was found strange socket descriptors 
 increasing. lsof -n | grep java shows many rows like
 java   8380 cassandra  113r unix 0x8101a374a080
 938348482 socket
 java   8380 cassandra  114r unix 0x8101a374a080
 938348482 socket
 java   8380 cassandra  115r unix 0x8101a374a080
 938348482 socket
 java   8380 cassandra  116r unix 0x8101a374a080
 938348482 socket
 java   8380 cassandra  117r unix 0x8101a374a080
 938348482 socket
 java   8380 cassandra  118r unix 0x8101a374a080
 938348482 socket
 java   8380 cassandra  119r unix 0x8101a374a080
 938348482 socket
 java   8380 cassandra  120r unix 0x8101a374a080
 938348482 socket
  And number of this rows constantly increasing. After about 24 hours this 
 situation leads to error.
 We use PHPCassa client. Load is not so high (aroud ~50kb/s on write). 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Updated] (CASSANDRA-4571) Strange permament socket descriptors increasing leads to Too many open files

2012-09-04 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis updated CASSANDRA-4571:
--

Attachment: (was: 4116.txt)

 Strange permament socket descriptors increasing leads to Too many open files
 --

 Key: CASSANDRA-4571
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4571
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Affects Versions: 1.1.1
 Environment: CentOS 5.8 Linux 2.6.18-308.13.1.el5 #1 SMP Tue Aug 21 
 17:10:18 EDT 2012 x86_64 x86_64 x86_64 GNU/Linux. 
 java version 1.6.0_33
 Java(TM) SE Runtime Environment (build 1.6.0_33-b03)
 Java HotSpot(TM) 64-Bit Server VM (build 20.8-b03, mixed mode)
Reporter: Serg Shnerson
Assignee: Jonathan Ellis
Priority: Critical
 Fix For: 1.1.5

 Attachments: 4571.txt


 On the two-node cluster there was found strange socket descriptors 
 increasing. lsof -n | grep java shows many rows like
 java   8380 cassandra  113r unix 0x8101a374a080
 938348482 socket
 java   8380 cassandra  114r unix 0x8101a374a080
 938348482 socket
 java   8380 cassandra  115r unix 0x8101a374a080
 938348482 socket
 java   8380 cassandra  116r unix 0x8101a374a080
 938348482 socket
 java   8380 cassandra  117r unix 0x8101a374a080
 938348482 socket
 java   8380 cassandra  118r unix 0x8101a374a080
 938348482 socket
 java   8380 cassandra  119r unix 0x8101a374a080
 938348482 socket
 java   8380 cassandra  120r unix 0x8101a374a080
 938348482 socket
  And number of this rows constantly increasing. After about 24 hours this 
 situation leads to error.
 We use PHPCassa client. Load is not so high (aroud ~50kb/s on write). 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Updated] (CASSANDRA-4571) Strange permament socket descriptors increasing leads to Too many open files

2012-09-04 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis updated CASSANDRA-4571:
--

Attachment: 4571.txt

 Strange permament socket descriptors increasing leads to Too many open files
 --

 Key: CASSANDRA-4571
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4571
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Affects Versions: 1.1.1
 Environment: CentOS 5.8 Linux 2.6.18-308.13.1.el5 #1 SMP Tue Aug 21 
 17:10:18 EDT 2012 x86_64 x86_64 x86_64 GNU/Linux. 
 java version 1.6.0_33
 Java(TM) SE Runtime Environment (build 1.6.0_33-b03)
 Java HotSpot(TM) 64-Bit Server VM (build 20.8-b03, mixed mode)
Reporter: Serg Shnerson
Assignee: Jonathan Ellis
Priority: Critical
 Fix For: 1.1.5

 Attachments: 4571.txt


 On the two-node cluster there was found strange socket descriptors 
 increasing. lsof -n | grep java shows many rows like
 java   8380 cassandra  113r unix 0x8101a374a080
 938348482 socket
 java   8380 cassandra  114r unix 0x8101a374a080
 938348482 socket
 java   8380 cassandra  115r unix 0x8101a374a080
 938348482 socket
 java   8380 cassandra  116r unix 0x8101a374a080
 938348482 socket
 java   8380 cassandra  117r unix 0x8101a374a080
 938348482 socket
 java   8380 cassandra  118r unix 0x8101a374a080
 938348482 socket
 java   8380 cassandra  119r unix 0x8101a374a080
 938348482 socket
 java   8380 cassandra  120r unix 0x8101a374a080
 938348482 socket
  And number of this rows constantly increasing. After about 24 hours this 
 situation leads to error.
 We use PHPCassa client. Load is not so high (aroud ~50kb/s on write). 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Updated] (CASSANDRA-4571) Strange permament socket descriptors increasing leads to Too many open files

2012-09-04 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis updated CASSANDRA-4571:
--

Attachment: 4571.txt

 Strange permament socket descriptors increasing leads to Too many open files
 --

 Key: CASSANDRA-4571
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4571
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Affects Versions: 1.1.1
 Environment: CentOS 5.8 Linux 2.6.18-308.13.1.el5 #1 SMP Tue Aug 21 
 17:10:18 EDT 2012 x86_64 x86_64 x86_64 GNU/Linux. 
 java version 1.6.0_33
 Java(TM) SE Runtime Environment (build 1.6.0_33-b03)
 Java HotSpot(TM) 64-Bit Server VM (build 20.8-b03, mixed mode)
Reporter: Serg Shnerson
Assignee: Jonathan Ellis
Priority: Critical
 Fix For: 1.1.5

 Attachments: 4571.txt


 On the two-node cluster there was found strange socket descriptors 
 increasing. lsof -n | grep java shows many rows like
 java   8380 cassandra  113r unix 0x8101a374a080
 938348482 socket
 java   8380 cassandra  114r unix 0x8101a374a080
 938348482 socket
 java   8380 cassandra  115r unix 0x8101a374a080
 938348482 socket
 java   8380 cassandra  116r unix 0x8101a374a080
 938348482 socket
 java   8380 cassandra  117r unix 0x8101a374a080
 938348482 socket
 java   8380 cassandra  118r unix 0x8101a374a080
 938348482 socket
 java   8380 cassandra  119r unix 0x8101a374a080
 938348482 socket
 java   8380 cassandra  120r unix 0x8101a374a080
 938348482 socket
  And number of this rows constantly increasing. After about 24 hours this 
 situation leads to error.
 We use PHPCassa client. Load is not so high (aroud ~50kb/s on write). 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Updated] (CASSANDRA-4571) Strange permament socket descriptors increasing leads to Too many open files

2012-09-04 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis updated CASSANDRA-4571:
--

Attachment: (was: 4571.txt)

 Strange permament socket descriptors increasing leads to Too many open files
 --

 Key: CASSANDRA-4571
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4571
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Affects Versions: 1.1.1
 Environment: CentOS 5.8 Linux 2.6.18-308.13.1.el5 #1 SMP Tue Aug 21 
 17:10:18 EDT 2012 x86_64 x86_64 x86_64 GNU/Linux. 
 java version 1.6.0_33
 Java(TM) SE Runtime Environment (build 1.6.0_33-b03)
 Java HotSpot(TM) 64-Bit Server VM (build 20.8-b03, mixed mode)
Reporter: Serg Shnerson
Assignee: Jonathan Ellis
Priority: Critical
 Fix For: 1.1.5

 Attachments: 4571.txt


 On the two-node cluster there was found strange socket descriptors 
 increasing. lsof -n | grep java shows many rows like
 java   8380 cassandra  113r unix 0x8101a374a080
 938348482 socket
 java   8380 cassandra  114r unix 0x8101a374a080
 938348482 socket
 java   8380 cassandra  115r unix 0x8101a374a080
 938348482 socket
 java   8380 cassandra  116r unix 0x8101a374a080
 938348482 socket
 java   8380 cassandra  117r unix 0x8101a374a080
 938348482 socket
 java   8380 cassandra  118r unix 0x8101a374a080
 938348482 socket
 java   8380 cassandra  119r unix 0x8101a374a080
 938348482 socket
 java   8380 cassandra  120r unix 0x8101a374a080
 938348482 socket
  And number of this rows constantly increasing. After about 24 hours this 
 situation leads to error.
 We use PHPCassa client. Load is not so high (aroud ~50kb/s on write). 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (CASSANDRA-4571) Strange permament socket descriptors increasing leads to Too many open files

2012-09-04 Thread Brandon Williams (JIRA)

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

Brandon Williams commented on CASSANDRA-4571:
-

Issue does not repro with this patch.

 Strange permament socket descriptors increasing leads to Too many open files
 --

 Key: CASSANDRA-4571
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4571
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Affects Versions: 1.1.1
 Environment: CentOS 5.8 Linux 2.6.18-308.13.1.el5 #1 SMP Tue Aug 21 
 17:10:18 EDT 2012 x86_64 x86_64 x86_64 GNU/Linux. 
 java version 1.6.0_33
 Java(TM) SE Runtime Environment (build 1.6.0_33-b03)
 Java HotSpot(TM) 64-Bit Server VM (build 20.8-b03, mixed mode)
Reporter: Serg Shnerson
Assignee: Jonathan Ellis
Priority: Critical
 Fix For: 1.1.5

 Attachments: 4571.txt


 On the two-node cluster there was found strange socket descriptors 
 increasing. lsof -n | grep java shows many rows like
 java   8380 cassandra  113r unix 0x8101a374a080
 938348482 socket
 java   8380 cassandra  114r unix 0x8101a374a080
 938348482 socket
 java   8380 cassandra  115r unix 0x8101a374a080
 938348482 socket
 java   8380 cassandra  116r unix 0x8101a374a080
 938348482 socket
 java   8380 cassandra  117r unix 0x8101a374a080
 938348482 socket
 java   8380 cassandra  118r unix 0x8101a374a080
 938348482 socket
 java   8380 cassandra  119r unix 0x8101a374a080
 938348482 socket
 java   8380 cassandra  120r unix 0x8101a374a080
 938348482 socket
  And number of this rows constantly increasing. After about 24 hours this 
 situation leads to error.
 We use PHPCassa client. Load is not so high (aroud ~50kb/s on write). 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (CASSANDRA-4490) Improve IAuthority interface by introducing fine-grained access permissions and grant/revoke commands.

2012-09-04 Thread Yuki Morishita (JIRA)

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

Yuki Morishita commented on CASSANDRA-4490:
---

Patch has two incompatible parts:

* IAuthority is now abstract class instead of interface. Implementation needs 
to change implements to extends.
* Permission.ALL/NONE are now part of enum instead of static EnumSet. If those 
are used, then they need to be changed to FULL_ACCESS/NO_ACCESS.

I only tested with SimpleAuth example, but with above modification, it worked 
as expected.
Little problem I had is that cqlsh disconnects from C* when 
NotImplementedException is thrown.

Also note that, it seems that it is implementation's responsibility to who can 
grant/revoke/list permission, and because IAuthority#revoke/listPermission 
don't know which user is calling, I assume anyone could revoke/list permission?

 Improve IAuthority interface by introducing fine-grained access permissions 
 and grant/revoke commands.
 --

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

 Attachments: CASSANDRA-4490.patch


 In order to improve IAuthority interface I propose to add the following new 
 permissions: USE, SELECT, CREATE, ALTER, DROP, UPDATE, DELETE, ALL, NONE. And 
 the following new commands to the CQL 3.0 which would give users possibility 
 (with appropriate implementation) to dynamically change user's rights to 
 access system objects:
 GRANT  permission ON resource TO user [WITH GRANT OPTION];
 REVOKE permission ON resource FROM user_name;
 LIST GRANTS FOR user; // Not 'SHOW' because it's reserved for cqlsh for 
 commands like 'show cluster'
 where resource is Keyspace or ColumnFamily (initially, but extendable to 
 indexes or configration options in the future), and permission is listed 
 above.
 To keep the system backward compatible with old authorization interface 
 implementations Permission class would include the mappings of the new to old 
 permissions:
 READ  - USE, SELECT
 WRITE - USE, CREATE, ALTER, DROP, UPDATE, DELETE

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Updated] (CASSANDRA-4497) Update CQL pseudo-maps to real maps

2012-09-04 Thread Sylvain Lebresne (JIRA)

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

Sylvain Lebresne updated CASSANDRA-4497:


Attachment: 4497-v2.txt


Since we're breaking from earlier version of CQL3 anyway (and we've been clear 
that CQL3 has been beta so far), I would be in favor of shortening some options 
names (some were in Pavel's patch already but not all) as said previous.

I'm attaching a v2 based on Pavel's patch that does that. So that the exact 
syntax is:
{noformat}
CREATE KEYSPACE foo WITH replication = { 'class' : 'SimpleStrategy',  
'replication_factor' : 1 }
CREATE TABLE  WITH compression = { ... }
   AND compaction = { 'class' : 'SizeTieredCompactionStrategy', 
'min_threshold' : 2, 'max_threshold' : 4 }
{noformat}

v2 also slightly update the grammar to better reuse code between create and 
alter table, and it fixes a potential NPE in the grammar convertMap method (due 
to antlr being a smart-ass). It also throw a ConfiguarionException in the case 
were compaction options are given but not the 'class' itself (since that feels 
more consistent with the semantic of having a map literal).

bq. it looks like there isn't any way to change one option and leave the other 
intact (like WITH replication['replication_factor'] = 2

I agree, but that's a bit of a pain to add (in particular things like WITH 
replication = { 'class' : 'SimpleStrategy} AND 
replication['replication_factor'] = 2 are a bit annoying to handle) so I would 
suggest leaving that to later.


 Update CQL pseudo-maps to real maps
 ---

 Key: CASSANDRA-4497
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4497
 Project: Cassandra
  Issue Type: Bug
Affects Versions: 1.2.0 beta 1
Reporter: Jonathan Ellis
Assignee: Pavel Yaskevich
  Labels: cql3
 Fix For: 1.2.0 beta 1

 Attachments: 4497-v2.txt, CASSANDRA-4497.patch


 - compression_parameters
 - replication_parameters (combine strategy + options like we did compression)
 - anything else?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (CASSANDRA-4497) Update CQL pseudo-maps to real maps

2012-09-04 Thread Pavel Yaskevich (JIRA)

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

Pavel Yaskevich commented on CASSANDRA-4497:


+1, with nit: I think we would be should make naming consistent and change 
COMPACTION_OPTIONS to COMPACTION_PARAMETERS.

 Update CQL pseudo-maps to real maps
 ---

 Key: CASSANDRA-4497
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4497
 Project: Cassandra
  Issue Type: Bug
Affects Versions: 1.2.0 beta 1
Reporter: Jonathan Ellis
Assignee: Pavel Yaskevich
  Labels: cql3
 Fix For: 1.2.0 beta 1

 Attachments: 4497-v2.txt, CASSANDRA-4497.patch


 - compression_parameters
 - replication_parameters (combine strategy + options like we did compression)
 - anything else?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


git commit: Rename [value] to [bytes] in binary protocol spec to avoid confusion

2012-09-04 Thread slebresne
Updated Branches:
  refs/heads/trunk b475bc69b - f61d88488


Rename [value] to [bytes] in binary protocol spec to avoid confusion


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

Branch: refs/heads/trunk
Commit: f61d88488a53bc87600419d83a76e74952f0efbb
Parents: b475bc6
Author: Sylvain Lebresne sylv...@datastax.com
Authored: Tue Sep 4 18:58:58 2012 +0200
Committer: Sylvain Lebresne sylv...@datastax.com
Committed: Tue Sep 4 18:59:20 2012 +0200

--
 doc/native_protocol.spec |   12 ++--
 1 files changed, 6 insertions(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/f61d8848/doc/native_protocol.spec
--
diff --git a/doc/native_protocol.spec b/doc/native_protocol.spec
index 0092f5d..a4a10e0 100644
--- a/doc/native_protocol.spec
+++ b/doc/native_protocol.spec
@@ -152,13 +152,13 @@ Table of Contents
string.
 [long string]  An [int] n, followed by n bytes representing an UTF-8 
string.
 [string list]  A [short] n, followed by n [string].
-[value]An [int] n, followed by n bytes if n = 0. If n  0,
+[bytes]An [int] n, followed by n bytes if n = 0. If n  0,
no byte should follow and the value represented is `null`.
 
 [option]   A pair of idvalue where id is a [short] representing
the option id and value depends on that option (and can be
-   of size 0). The supported id (and the respecting value) will
-   be described when this is used.
+   of size 0). The supported id (and the corresponding value)
+   will be described when this is usedt .
 [option list]  A [short] n, followed by n [option].
 
 
@@ -239,7 +239,7 @@ Table of Contents
 - id is the prepared query ID. It's an [int] returned as a response to a
   PREPARE message.
 - n is a [short] indicating the number of following values.
-- value_1...value_n are the [value] to use for bound variables in the
+- value_1...value_n are the [bytes] to use for bound variables in the
   prepared query.
 
   The response from the server will be a RESULT message.
@@ -367,9 +367,9 @@ Table of Contents
   result. Those rows are serialized in the rows_content part.
 - rows_content is composed of row_1...row_m where m is rows_count.
   Each row_i is composed of value_1...value_n where n is
-  columns_count and where value_j is a [value] representing the value
+  columns_count and where value_j is a [bytes] representing the value
   returned for the jth column of the ith row. In other words, 
rows_content
-  is composed of (rows_count * columns_count) [value].
+  is composed of (rows_count * columns_count) [bytes].
 
 
 4.2.5.3. Set_keyspace



[jira] [Updated] (CASSANDRA-2506) Push read repair setting down to the DC-level

2012-09-04 Thread Brandon Williams (JIRA)

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

Brandon Williams updated CASSANDRA-2506:


Fix Version/s: (was: 1.2.0 beta 1)

 Push read repair setting down to the DC-level
 -

 Key: CASSANDRA-2506
 URL: https://issues.apache.org/jira/browse/CASSANDRA-2506
 Project: Cassandra
  Issue Type: New Feature
  Components: Core
Reporter: Brandon Williams
Assignee: Vijay
Priority: Minor
 Fix For: 1.1.1

 Attachments: 0001-avro-and-Thrift-2506.patch, 
 0001-dc-localized-read-repair.patch, 0001-dc-localized-read-repair-v2.patch, 
 0001-documentation-for-read_repair-v4.patch, 
 0001-thrift-and-avro-changes-v3.patch, 
 0002-dc-localized-read-repair-v3.patch, 0002-dc-local-read-repair-2506.patch, 
 0002-thrift-and-avro.patch, 0002-thrift-and-avro-v2.patch, 
 0002-thrift-and-avro-v4.patch, 0003-dc-localized-read-repair-v4.patch, 
 0003-documentation-for-read_repair_options.patch, 
 0003-documentation-for-read_repair_options-v2.patch, 
 0003-documentation-for-read_repair-v3.patch, 2506-v2.patch


 Currently, read repair is a global setting.  However, when you have two DCs 
 and use one for analytics, it would be nice to turn it off only for that DC 
 so the live DC serving the application can still benefit from it.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (CASSANDRA-4239) Support Thrift SSL socket

2012-09-04 Thread Sid g (JIRA)

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

Sid g commented on CASSANDRA-4239:
--

Here is one interesting requirement; to only have SSL for Thrift Clients and 
rest be as-is.
To expose secured Thrift Server socket to Firewalled Thrift Clients.

Current solution is discussion is either SSL or not in entirity :)
What if only certain clients are use SSL.

I locally made changes to code and tested to have two Thrift SYNC Server 
sockets.
Also SSLFactory and quite some code is duplication of 
org.apache.thrift.transport.TSSLTransportFactory

Let me know if i going in wrong direction? I can wait on James; but in a rush 
to get some SSL Thrift Client solution

 Support Thrift SSL socket
 -

 Key: CASSANDRA-4239
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4239
 Project: Cassandra
  Issue Type: New Feature
  Components: API
Reporter: Jonathan Ellis
Assignee: Jason Brown
Priority: Minor
 Fix For: 1.2.1


 Thrift has supported SSL encryption for a while now (THRIFT-106); we should 
 allow configuring that in cassandra.yaml

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (CASSANDRA-4539) potential backwards incompatibility in native protocol

2012-09-04 Thread Sylvain Lebresne (JIRA)

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

Sylvain Lebresne commented on CASSANDRA-4539:
-

bq. I read that section as saying that value was a [value]

Hum, I see how one could be confused :). Though the idea is really that the two 
are not related at all. I've renamed [value] to [bytes] in commit 06269b9 to 
hopefully make if more clear that those are not related.

Now the main _raison d'être_ of [option] is to have a compact way to describe 
the type in the query response metadata. For that, and given that it's 
something sent very frequently, I really think we should keep it the way it is. 
I'm all for making client library implementers job easy as much as possible but 
adding even one byte per type is just not worth it in that case. And I don't 
think it's much of a problem in the case we add new data type as long as we fix 
the option ids for a given protocol version. And if we add a new type, the 
server can very well use the 'custom' option id until we decide to bump the 
protocol version to add a specific option id for that new type.

Now for STARTUP, I'll admit that reusing [option] might have been a bit 
overkill. It would probably be simpler/more flexible to change STARTUP to take 
some mapstring, string (and to have OPTIONS messages to return a mapstring, 
[string list]. I'll make that change.





 potential backwards incompatibility in native protocol
 --

 Key: CASSANDRA-4539
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4539
 Project: Cassandra
  Issue Type: Improvement
  Components: API
Affects Versions: 1.2.0 beta 1
Reporter: paul cannon
Assignee: Sylvain Lebresne
Priority: Minor
  Labels: cql, native_protocol
 Fix For: 1.2.0 beta 1


 In the text of the native_protocol.spec document, it explains the format for 
 a notation called {{[option]}}, which should represent {{a pair of 
 idvalue}}.
 In doing a first-draft implementation of the protocol for the python driver, 
 though, I found that I had a misunderstanding. I read that section as saying 
 that {{value}} was a {{[value]}}, and that it could have a length of 0 
 (i.e., the {{[int]}} on the front of the {{[value]}} could be 0). However, it 
 turns out that {{value}} might not be there at all, or might be *two* 
 {{[value]}}'s, depending on the option id and message context.
 I'm not a fan of this, since
  * A protocol parsing library can't simply implement a single function to 
 read in {{[option]}}'s, since the length of the value part is dependent on 
 the message context
  * If we add a new native data type (a new option id which could be used 
 inside a {{col_spec_i}} in a RESULT message), then older clients will not 
 know how to read past the value part. Of course they won't know how to 
 interpret the data or deserialize later rows of that unknown type - that's 
 not the problem - the problem is that the older client should be able just to 
 mark that column as unparseable and still handle the rest of the columns.
 Can we make {{value}} be a {{[value]}}, the contents of which can be 
 re-interpreted as a {{[string]}}, an {{[option]}}, two {{[option]}}'s, or 
 whatever?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[2/2] git commit: Fix typo

2012-09-04 Thread slebresne
Fix typo


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

Branch: refs/heads/trunk
Commit: 3bfe5fb8a4fec3613285fa7b19a686bfb8fd247e
Parents: f61d884
Author: Sylvain Lebresne sylv...@datastax.com
Authored: Tue Sep 4 19:33:04 2012 +0200
Committer: Sylvain Lebresne sylv...@datastax.com
Committed: Tue Sep 4 19:33:04 2012 +0200

--
 doc/native_protocol.spec |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/3bfe5fb8/doc/native_protocol.spec
--
diff --git a/doc/native_protocol.spec b/doc/native_protocol.spec
index a4a10e0..9c30db9 100644
--- a/doc/native_protocol.spec
+++ b/doc/native_protocol.spec
@@ -158,7 +158,7 @@ Table of Contents
 [option]   A pair of idvalue where id is a [short] representing
the option id and value depends on that option (and can be
of size 0). The supported id (and the corresponding value)
-   will be described when this is usedt .
+   will be described when this is used.
 [option list]  A [short] n, followed by n [option].
 
 



[1/2] git commit: Update CQL pseudo-maps to real maps

2012-09-04 Thread slebresne
Updated Branches:
  refs/heads/trunk f61d88488 - 769fe895a


Update CQL pseudo-maps to real maps

patch by xedin; reviewed by slebresne for CASSANDRA-4497


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

Branch: refs/heads/trunk
Commit: 769fe895a36868c47101f681f5fdd721bee1ad62
Parents: 3bfe5fb
Author: Sylvain Lebresne sylv...@datastax.com
Authored: Tue Sep 4 19:41:33 2012 +0200
Committer: Sylvain Lebresne sylv...@datastax.com
Committed: Tue Sep 4 19:41:33 2012 +0200

--
 CHANGES.txt|1 +
 NEWS.txt   |   10 ++-
 .../org/apache/cassandra/config/CFMetaData.java|3 +-
 src/java/org/apache/cassandra/cql3/CFPropDefs.java |   59 +--
 src/java/org/apache/cassandra/cql3/Cql.g   |   41 ---
 .../cql3/statements/AlterTableStatement.java   |6 +-
 .../statements/CreateColumnFamilyStatement.java|7 +--
 .../cql3/statements/CreateKeyspaceStatement.java   |   31 +---
 8 files changed, 103 insertions(+), 55 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/769fe895/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 256d5ec..d6b40ba 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -46,6 +46,7 @@
  * (cql3) fix defining more than one PK to be invalid (CASSANDRA-4477)
  * remove schema agreement checking from all external APIs (Thrift, CQL and 
CQL3) (CASSANDRA-4487)
  * add Murmur3Partitioner and make it default for new installations 
(CASSANDRA-3772)
+ * (cql3) update pseudo-map syntax to use map syntax (CASSANDRA-4497)
 
 
 1.1.5

http://git-wip-us.apache.org/repos/asf/cassandra/blob/769fe895/NEWS.txt
--
diff --git a/NEWS.txt b/NEWS.txt
index 56bb1dc..731040a 100644
--- a/NEWS.txt
+++ b/NEWS.txt
@@ -31,7 +31,7 @@ Upgrading
   remove nodes in this way with a mixed 1.1 (or lower) / 1.2 cluster,
   is not supported.
 - The somewhat ill-concieved CollatingOrderPreservingPartitioner
-  has been removed.  Use RandomPartitioner (recommended) or
+  has been removed.  Use Murmur3Partitioner (recommended) or
   ByteOrderedPartitioner instead.
 - Global option hinted_handoff_throttle_delay_in_ms has been removed.
   hinted_handoff_throttle_in_kb has been added instead.
@@ -41,6 +41,14 @@ Upgrading
 - The default partitioner was changed from RandomPartitioner to
   Murmur3Partitioner which provides faster hashing as well as
   improved performance with secondary indexes.
+- CQL3 is now considered final in this release. Compared to the beta
+  version that is part of 1.1, this final version has a few additions
+  (collections), but also some changes in the syntax for the options of the
+  create/alter keyspace/table statements. Typically, the syntax to create a
+  keyspace is now:
+CREATE KEYSPACE ks WITH replication = { 'class' : 'CompactionStrategy',
+'replication_faction' : 2 };
+  Please refer to the CQL3 documentation for details.
 
 Features
 

http://git-wip-us.apache.org/repos/asf/cassandra/blob/769fe895/src/java/org/apache/cassandra/config/CFMetaData.java
--
diff --git a/src/java/org/apache/cassandra/config/CFMetaData.java 
b/src/java/org/apache/cassandra/config/CFMetaData.java
index bb9a5a6..dbe0c6f 100644
--- a/src/java/org/apache/cassandra/config/CFMetaData.java
+++ b/src/java/org/apache/cassandra/config/CFMetaData.java
@@ -149,8 +149,7 @@ public final class CFMetaData
  + mutation blob,
  + PRIMARY KEY 
(target_id, hint_id, message_version)
  + ) WITH COMPACT 
STORAGE 
- + AND 
COMPACTION_STRATEGY_OPTIONS:MIN_COMPACTION_THRESHOLD=0 
- + AND 
COMPACTION_STRATEGY_OPTIONS:MAX_COMPACTION_THRESHOLD=0 
+ + AND 
COMPACTION={'class' : 'SizeTieredCompactionStrategy', 'min_threshold' : 0, 
'max_threshold' : 0} 
  + AND COMMENT='hints 
awaiting delivery');
 
 public static final CFMetaData PeersCf = compile(12, CREATE TABLE  + 
SystemTable.PEERS_CF +  (


[jira] [Commented] (CASSANDRA-2858) make request dropping more accurate

2012-09-04 Thread Vijay (JIRA)

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

Vijay commented on CASSANDRA-2858:
--

+1 
Side Note (Can be ignored): Maybe just sending the Integer for timeout instead 
of long will save us some bandwidth :)

 make request dropping more accurate
 ---

 Key: CASSANDRA-2858
 URL: https://issues.apache.org/jira/browse/CASSANDRA-2858
 Project: Cassandra
  Issue Type: Improvement
Reporter: Ryan King
Assignee: Jonathan Ellis
Priority: Minor
 Fix For: 1.2.0 beta 1

 Attachments: 2858.txt


 Based on the discussion in CASSANDRA-2819, we can make the bookkeeping for 
 request times more accurate.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (CASSANDRA-2858) make request dropping more accurate

2012-09-04 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis commented on CASSANDRA-2858:
---

bq. Maybe just sending the Integer for timeout instead of long will save us 
some bandwidth

What did you have in mind?  milliseconds gets too large for an int in less than 
a year.  Even 100ths of seconds do.  Cutting to 10ths of a second seems like 
we're losing too much resolution.

 make request dropping more accurate
 ---

 Key: CASSANDRA-2858
 URL: https://issues.apache.org/jira/browse/CASSANDRA-2858
 Project: Cassandra
  Issue Type: Improvement
Reporter: Ryan King
Assignee: Jonathan Ellis
Priority: Minor
 Fix For: 1.2.0 beta 1

 Attachments: 2858.txt


 Based on the discussion in CASSANDRA-2819, we can make the bookkeeping for 
 request times more accurate.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (CASSANDRA-2858) make request dropping more accurate

2012-09-04 Thread Vijay (JIRA)

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

Vijay commented on CASSANDRA-2858:
--

{quote}
What did you have in mind?
{quote}
I was talking about the lower part of the long where we have 2 billion 
milliseconds (2147483.648 seconds) to count which will give us enough to 
timeout... varint cannot save those 4 bytes because there is value in it. Makes 
sense? I should have been clear earlier.

 make request dropping more accurate
 ---

 Key: CASSANDRA-2858
 URL: https://issues.apache.org/jira/browse/CASSANDRA-2858
 Project: Cassandra
  Issue Type: Improvement
Reporter: Ryan King
Assignee: Jonathan Ellis
Priority: Minor
 Fix For: 1.2.0 beta 1

 Attachments: 2858.txt


 Based on the discussion in CASSANDRA-2819, we can make the bookkeeping for 
 request times more accurate.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Created] (CASSANDRA-4612) cql error with ORDER BY when using IN

2012-09-04 Thread Tyler Patterson (JIRA)
Tyler Patterson created CASSANDRA-4612:
--

 Summary: cql error with ORDER BY when using IN
 Key: CASSANDRA-4612
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4612
 Project: Cassandra
  Issue Type: Bug
 Environment: ubuntu, cassandra trunk (commit 
769fe895a36868c47101f681f5fdd721bee1ad62 )
Reporter: Tyler Patterson
Assignee: Pavel Yaskevich


{code}
CREATE TABLE test(
my_id varchar, 
col1 int, 
value varchar, 
PRIMARY KEY (my_id, col1)
);

INSERT INTO test(my_id, col1, value) VALUES ( 'key1', 1, 'a');
INSERT INTO test(my_id, col1, value) VALUES ( 'key2', 3, 'c');
INSERT INTO test(my_id, col1, value) VALUES ( 'key3', 2, 'b');
INSERT INTO test(my_id, col1, value) VALUES ( 'key4', 4, 'd');
SELECT col1 FROM test WHERE my_id in('key1', 'key2', 'key3') ORDER BY col1;
{code}

The following error results: TSocket read 0 bytes
The log gives a traceback:
{code}
ERROR [Thrift:8] 2012-09-04 12:02:15,894 CustomTThreadPoolServer.java (line 
202) Error occurred during processing of message.
java.lang.IndexOutOfBoundsException: Index: 1, Size: 1
at java.util.ArrayList.RangeCheck(ArrayList.java:547)
at java.util.ArrayList.get(ArrayList.java:322)
at 
org.apache.cassandra.cql3.statements.SelectStatement$SingleColumnComparator.compare(SelectStatement.java:1356)
at 
org.apache.cassandra.cql3.statements.SelectStatement$SingleColumnComparator.compare(SelectStatement.java:1343)
at java.util.Arrays.mergeSort(Arrays.java:1270)
at java.util.Arrays.sort(Arrays.java:1210)
at java.util.Collections.sort(Collections.java:159)
at 
org.apache.cassandra.cql3.statements.SelectStatement.orderResults(SelectStatement.java:821)
at 
org.apache.cassandra.cql3.statements.SelectStatement.process(SelectStatement.java:793)
at 
org.apache.cassandra.cql3.statements.SelectStatement.executeInternal(SelectStatement.java:136)
at 
org.apache.cassandra.cql3.statements.SelectStatement.execute(SelectStatement.java:118)
at 
org.apache.cassandra.cql3.statements.SelectStatement.execute(SelectStatement.java:62)
at 
org.apache.cassandra.cql3.QueryProcessor.processStatement(QueryProcessor.java:107)
at 
org.apache.cassandra.cql3.QueryProcessor.process(QueryProcessor.java:115)
at 
org.apache.cassandra.thrift.CassandraServer.execute_cql_query(CassandraServer.java:1521)
at 
org.apache.cassandra.thrift.Cassandra$Processor$execute_cql_query.getResult(Cassandra.java:3618)
at 
org.apache.cassandra.thrift.Cassandra$Processor$execute_cql_query.getResult(Cassandra.java:3606)
at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:32)
at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:34)
at 
org.apache.cassandra.thrift.CustomTThreadPoolServer$WorkerProcess.run(CustomTThreadPoolServer.java:184)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
{code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (CASSANDRA-4384) HintedHandoff can begin before SS knows the hostID

2012-09-04 Thread Brandon Williams (JIRA)

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

Brandon Williams commented on CASSANDRA-4384:
-

HOST_ID is a full app state after CASSANDRA-4383 now so we can revisit this.

 HintedHandoff can begin before SS knows the hostID
 --

 Key: CASSANDRA-4384
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4384
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Affects Versions: 1.2.0 beta 1
Reporter: Brandon Williams
Assignee: Eric Evans
 Fix For: 1.2.0


 Since HH fires from the FD, SS won't quite have the hostId yet:
 {noformat}
  INFO 18:58:04,196 Started hinted handoff for host: null with IP: 
 /10.179.65.102
  INFO 18:58:04,197 Node /10.179.65.102 state jump to normal
 ERROR 18:58:04,197 Exception in thread Thread[HintedHandoff:1,1,main]
 java.lang.NullPointerException
 at org.apache.cassandra.utils.UUIDGen.decompose(UUIDGen.java:120)
 at 
 org.apache.cassandra.db.HintedHandOffManager.deliverHintsToEndpointInternal(HintedHandOffManager.java:304)
 at 
 org.apache.cassandra.db.HintedHandOffManager.deliverHintsToEndpoint(HintedHandOffManager.java:250)
 at 
 org.apache.cassandra.db.HintedHandOffManager.access$400(HintedHandOffManager.java:87)
 at 
 org.apache.cassandra.db.HintedHandOffManager$4.runMayThrow(HintedHandOffManager.java:433)
 at 
 org.apache.cassandra.utils.WrappedRunnable.run(WrappedRunnable.java:26)
 at 
 java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
 at 
 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
 at java.lang.Thread.run(Thread.java:662)
 {noformat}
 Simple solution seems to be getting the hostId from gossip instead.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (CASSANDRA-4571) Strange permament socket descriptors increasing leads to Too many open files

2012-09-04 Thread Sam Tunnicliffe (JIRA)

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

Sam Tunnicliffe commented on CASSANDRA-4571:


LGTM +1

 Strange permament socket descriptors increasing leads to Too many open files
 --

 Key: CASSANDRA-4571
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4571
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Affects Versions: 1.1.1
 Environment: CentOS 5.8 Linux 2.6.18-308.13.1.el5 #1 SMP Tue Aug 21 
 17:10:18 EDT 2012 x86_64 x86_64 x86_64 GNU/Linux. 
 java version 1.6.0_33
 Java(TM) SE Runtime Environment (build 1.6.0_33-b03)
 Java HotSpot(TM) 64-Bit Server VM (build 20.8-b03, mixed mode)
Reporter: Serg Shnerson
Assignee: Jonathan Ellis
Priority: Critical
 Fix For: 1.1.5

 Attachments: 4571.txt


 On the two-node cluster there was found strange socket descriptors 
 increasing. lsof -n | grep java shows many rows like
 java   8380 cassandra  113r unix 0x8101a374a080
 938348482 socket
 java   8380 cassandra  114r unix 0x8101a374a080
 938348482 socket
 java   8380 cassandra  115r unix 0x8101a374a080
 938348482 socket
 java   8380 cassandra  116r unix 0x8101a374a080
 938348482 socket
 java   8380 cassandra  117r unix 0x8101a374a080
 938348482 socket
 java   8380 cassandra  118r unix 0x8101a374a080
 938348482 socket
 java   8380 cassandra  119r unix 0x8101a374a080
 938348482 socket
 java   8380 cassandra  120r unix 0x8101a374a080
 938348482 socket
  And number of this rows constantly increasing. After about 24 hours this 
 situation leads to error.
 We use PHPCassa client. Load is not so high (aroud ~50kb/s on write). 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Created] (CASSANDRA-4613) Utilise Secondary Indexes in ColumnFamilyRecordReader

2012-09-04 Thread Sam Tunnicliffe (JIRA)
Sam Tunnicliffe created CASSANDRA-4613:
--

 Summary: Utilise Secondary Indexes in ColumnFamilyRecordReader
 Key: CASSANDRA-4613
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4613
 Project: Cassandra
  Issue Type: New Feature
  Components: Hadoop
Reporter: Sam Tunnicliffe
Assignee: Sam Tunnicliffe
 Fix For: 1.1.5


Enable an IndexClause to be passed to ColumnFamilyRecordReader by serializing 
it and adding to the Hadoop job Configuration. This is a requirement for 
enabling Filter Pushdown[1] in Hive which can vastly reduce the number of 
scanned rows that need to be processed in the Hive layer.

[1] https://cwiki.apache.org/Hive/filterpushdowndev.html


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[3/3] git commit: fix FD leak in slice queries patch by jbellis; reviewed by Sam Tunnicliffe and tested by brandonwilliams

2012-09-04 Thread jbellis
fix FD leak in slice queries
patch by jbellis; reviewed by Sam Tunnicliffe and tested by brandonwilliams


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

Branch: refs/heads/cassandra-1.1
Commit: e1b10590e84189b92af168e33a63c14c3ca1f5fa
Parents: 5c91bd1
Author: Jonathan Ellis jbel...@apache.org
Authored: Tue Sep 4 11:12:28 2012 -0500
Committer: Jonathan Ellis jbel...@apache.org
Committed: Tue Sep 4 13:55:36 2012 -0500

--
 CHANGES.txt|1 +
 .../apache/cassandra/db/CollationController.java   |   19 +++
 .../db/columniterator/ISSTableColumnIterator.java  |8 ++
 .../db/columniterator/SSTableNamesIterator.java|   10 +++-
 .../db/columniterator/SSTableSliceIterator.java|   10 +++-
 .../org/apache/cassandra/db/filter/IFilter.java|5 ++-
 .../cassandra/db/filter/NamesQueryFilter.java  |5 ++-
 .../apache/cassandra/db/filter/QueryFilter.java|5 ++-
 .../cassandra/db/filter/SliceQueryFilter.java  |5 ++-
 9 files changed, 53 insertions(+), 15 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/e1b10590/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index b23e9ba..6c504e8 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 1.1.5
+ * fix FD leak in slice queries (CASSANDRA-4571)
  * avoid recursion in leveled compaction (CASSANDRA-4587)
  * increase stack size under Java7 to 180K
  * Log(info) schema changes (CASSANDRA-4547)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/e1b10590/src/java/org/apache/cassandra/db/CollationController.java
--
diff --git a/src/java/org/apache/cassandra/db/CollationController.java 
b/src/java/org/apache/cassandra/db/CollationController.java
index 8121062..fb9674f 100644
--- a/src/java/org/apache/cassandra/db/CollationController.java
+++ b/src/java/org/apache/cassandra/db/CollationController.java
@@ -29,6 +29,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 import org.apache.cassandra.db.columniterator.IColumnIterator;
+import org.apache.cassandra.db.columniterator.ISSTableColumnIterator;
 import org.apache.cassandra.db.columniterator.SimpleAbstractColumnIterator;
 import org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy;
 import org.apache.cassandra.db.filter.NamesQueryFilter;
@@ -245,7 +246,6 @@ public class CollationController
 }
 
 long mostRecentRowTombstone = Long.MIN_VALUE;
-MapIColumnIterator, Long iteratorMaxTimes = 
Maps.newHashMapWithExpectedSize(view.sstables.size());
 for (SSTableReader sstable : view.sstables)
 {
 // if we've already seen a row tombstone with a timestamp 
greater 
@@ -254,7 +254,7 @@ public class CollationController
 continue;
 
 IColumnIterator iter = 
filter.getSSTableColumnIterator(sstable);
-iteratorMaxTimes.put(iter, sstable.getMaxTimestamp());
+iterators.add(iter);
 if (iter.getColumnFamily() != null)
 {
 ColumnFamily cf = iter.getColumnFamily();
@@ -269,10 +269,19 @@ public class CollationController
 // If we saw a row tombstone, do a second pass through the 
iterators we
 // obtained from the sstables and drop any whose maxTimestamp  
that of the
 // row tombstone
-for (Map.EntryIColumnIterator, Long entry : 
iteratorMaxTimes.entrySet())
+if (mostRecentRowTombstone  Long.MIN_VALUE)
 {
-if (entry.getValue() = mostRecentRowTombstone)
-iterators.add(entry.getKey());
+IteratorIColumnIterator it = iterators.iterator();
+while (it.hasNext())
+{
+IColumnIterator iter = it.next();
+if ((iter instanceof ISSTableColumnIterator)
+ ((ISSTableColumnIterator) 
iter).getSStable().getMaxTimestamp()  mostRecentRowTombstone)
+{
+FileUtils.closeQuietly(iter);
+it.remove();
+}
+}
 }
 
 // we need to distinguish between there is no data at all for 
this row (BF will let us rebuild that efficiently)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/e1b10590/src/java/org/apache/cassandra/db/columniterator/ISSTableColumnIterator.java

[2/3] git commit: fix FD leak in slice queries patch by jbellis; reviewed by Sam Tunnicliffe and tested by brandonwilliams

2012-09-04 Thread jbellis
fix FD leak in slice queries
patch by jbellis; reviewed by Sam Tunnicliffe and tested by brandonwilliams


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

Branch: refs/heads/trunk
Commit: e1b10590e84189b92af168e33a63c14c3ca1f5fa
Parents: 5c91bd1
Author: Jonathan Ellis jbel...@apache.org
Authored: Tue Sep 4 11:12:28 2012 -0500
Committer: Jonathan Ellis jbel...@apache.org
Committed: Tue Sep 4 13:55:36 2012 -0500

--
 CHANGES.txt|1 +
 .../apache/cassandra/db/CollationController.java   |   19 +++
 .../db/columniterator/ISSTableColumnIterator.java  |8 ++
 .../db/columniterator/SSTableNamesIterator.java|   10 +++-
 .../db/columniterator/SSTableSliceIterator.java|   10 +++-
 .../org/apache/cassandra/db/filter/IFilter.java|5 ++-
 .../cassandra/db/filter/NamesQueryFilter.java  |5 ++-
 .../apache/cassandra/db/filter/QueryFilter.java|5 ++-
 .../cassandra/db/filter/SliceQueryFilter.java  |5 ++-
 9 files changed, 53 insertions(+), 15 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/e1b10590/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index b23e9ba..6c504e8 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 1.1.5
+ * fix FD leak in slice queries (CASSANDRA-4571)
  * avoid recursion in leveled compaction (CASSANDRA-4587)
  * increase stack size under Java7 to 180K
  * Log(info) schema changes (CASSANDRA-4547)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/e1b10590/src/java/org/apache/cassandra/db/CollationController.java
--
diff --git a/src/java/org/apache/cassandra/db/CollationController.java 
b/src/java/org/apache/cassandra/db/CollationController.java
index 8121062..fb9674f 100644
--- a/src/java/org/apache/cassandra/db/CollationController.java
+++ b/src/java/org/apache/cassandra/db/CollationController.java
@@ -29,6 +29,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 import org.apache.cassandra.db.columniterator.IColumnIterator;
+import org.apache.cassandra.db.columniterator.ISSTableColumnIterator;
 import org.apache.cassandra.db.columniterator.SimpleAbstractColumnIterator;
 import org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy;
 import org.apache.cassandra.db.filter.NamesQueryFilter;
@@ -245,7 +246,6 @@ public class CollationController
 }
 
 long mostRecentRowTombstone = Long.MIN_VALUE;
-MapIColumnIterator, Long iteratorMaxTimes = 
Maps.newHashMapWithExpectedSize(view.sstables.size());
 for (SSTableReader sstable : view.sstables)
 {
 // if we've already seen a row tombstone with a timestamp 
greater 
@@ -254,7 +254,7 @@ public class CollationController
 continue;
 
 IColumnIterator iter = 
filter.getSSTableColumnIterator(sstable);
-iteratorMaxTimes.put(iter, sstable.getMaxTimestamp());
+iterators.add(iter);
 if (iter.getColumnFamily() != null)
 {
 ColumnFamily cf = iter.getColumnFamily();
@@ -269,10 +269,19 @@ public class CollationController
 // If we saw a row tombstone, do a second pass through the 
iterators we
 // obtained from the sstables and drop any whose maxTimestamp  
that of the
 // row tombstone
-for (Map.EntryIColumnIterator, Long entry : 
iteratorMaxTimes.entrySet())
+if (mostRecentRowTombstone  Long.MIN_VALUE)
 {
-if (entry.getValue() = mostRecentRowTombstone)
-iterators.add(entry.getKey());
+IteratorIColumnIterator it = iterators.iterator();
+while (it.hasNext())
+{
+IColumnIterator iter = it.next();
+if ((iter instanceof ISSTableColumnIterator)
+ ((ISSTableColumnIterator) 
iter).getSStable().getMaxTimestamp()  mostRecentRowTombstone)
+{
+FileUtils.closeQuietly(iter);
+it.remove();
+}
+}
 }
 
 // we need to distinguish between there is no data at all for 
this row (BF will let us rebuild that efficiently)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/e1b10590/src/java/org/apache/cassandra/db/columniterator/ISSTableColumnIterator.java

[1/3] git commit: merge from 1.1

2012-09-04 Thread jbellis
Updated Branches:
  refs/heads/cassandra-1.1 5c91bd142 - e1b10590e
  refs/heads/trunk 769fe895a - 6c8687237


merge from 1.1


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

Branch: refs/heads/trunk
Commit: 6c8687237cf58fac21078a27ffb32dda4cca5b01
Parents: 769fe89 e1b1059
Author: Jonathan Ellis jbel...@apache.org
Authored: Tue Sep 4 14:07:46 2012 -0500
Committer: Jonathan Ellis jbel...@apache.org
Committed: Tue Sep 4 14:07:46 2012 -0500

--
 CHANGES.txt|1 +
 .../apache/cassandra/db/CollationController.java   |   18 ++
 .../db/columniterator/ISSTableColumnIterator.java  |8 ++
 .../db/columniterator/SSTableNamesIterator.java|7 +-
 .../db/columniterator/SSTableSliceIterator.java|   10 +++-
 .../org/apache/cassandra/db/filter/IFilter.java|9 +--
 .../cassandra/db/filter/NamesQueryFilter.java  |9 +--
 .../apache/cassandra/db/filter/QueryFilter.java|7 +++--
 .../cassandra/db/filter/SliceQueryFilter.java  |5 ++-
 9 files changed, 56 insertions(+), 18 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/6c868723/CHANGES.txt
--
diff --cc CHANGES.txt
index d6b40ba,6c504e8..38678dd
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,55 -1,5 +1,56 @@@
 +1.2-dev
 + * optimize WriteResponse (CASSANDRA-4548)
 + * new metrics (CASSANDRA-4009)
 + * redesign KEYS indexes to avoid read-before-write (CASSANDRA-2897)
 + * debug tracing (CASSANDRA-1123)
 + * parallelize row cache loading (CASSANDRA-4282)
 + * Make compaction, flush JBOD-aware (CASSANDRA-4292)
 + * run local range scans on the read stage (CASSANDRA-3687)
 + * clean up ioexceptions (CASSANDRA-2116)
 + * add disk_failure_policy (CASSANDRA-2118)
 + * Introduce new json format with row level deletion (CASSANDRA-4054)
 + * remove redundant name column from schema_keyspaces (CASSANDRA-4433)
 + * improve nodetool ring handling of multi-dc clusters (CASSANDRA-3047)
 + * update NTS calculateNaturalEndpoints to be O(N log N) (CASSANDRA-3881)
 + * add UseCondCardMark XX jvm settings on jdk 1.7 (CASSANDRA-4366)
 + * split up rpc timeout by operation type (CASSANDRA-2819)
 + * rewrite key cache save/load to use only sequential i/o (CASSANDRA-3762)
 + * update MS protocol with a version handshake + broadcast address id
 +   (CASSANDRA-4311)
 + * multithreaded hint replay (CASSANDRA-4189)
 + * add inter-node message compression (CASSANDRA-3127)
 + * remove COPP (CASSANDRA-2479)
 + * Track tombstone expiration and compact when tombstone content is
 +   higher than a configurable threshold, default 20% (CASSANDRA-3442, 4234)
 + * update MurmurHash to version 3 (CASSANDRA-2975)
 + * (CLI) track elapsed time for `delete' operation (CASSANDRA-4060)
 + * (CLI) jline version is bumped to 1.0 to properly  support
 +   'delete' key function (CASSANDRA-4132)
 + * Save IndexSummary into new SSTable 'Summary' component (CASSANDRA-2392, 
4289)
 + * Add support for range tombstones (CASSANDRA-3708)
 + * Improve MessagingService efficiency (CASSANDRA-3617)
 + * Avoid ID conflicts from concurrent schema changes (CASSANDRA-3794)
 + * Set thrift HSHA server thread limit to unlimited by default 
(CASSANDRA-4277)
 + * Avoids double serialization of CF id in RowMutation messages
 +   (CASSANDRA-4293)
 + * stream compressed sstables directly with java nio (CASSANDRA-4297)
 + * Support multiple ranges in SliceQueryFilter (CASSANDRA-3885)
 + * Add column metadata to system column families (CASSANDRA-4018)
 + * (cql3) Always use composite types by default (CASSANDRA-4329)
 + * (cql3) Add support for set, map and list (CASSANDRA-3647)
 + * Validate date type correctly (CASSANDRA-4441)
 + * (cql3) Allow definitions with only a PK (CASSANDRA-4361)
 + * (cql3) Add support for row key composites (CASSANDRA-4179)
 + * improve DynamicEndpointSnitch by using reservoir sampling (CASSANDRA-4038)
 + * (cql3) Add support for 2ndary indexes (CASSANDRA-3680)
 + * (cql3) fix defining more than one PK to be invalid (CASSANDRA-4477)
 + * remove schema agreement checking from all external APIs (Thrift, CQL and 
CQL3) (CASSANDRA-4487)
 + * add Murmur3Partitioner and make it default for new installations 
(CASSANDRA-3772)
 + * (cql3) update pseudo-map syntax to use map syntax (CASSANDRA-4497)
 +
 +
  1.1.5
+  * fix FD leak in slice queries (CASSANDRA-4571)
   * avoid recursion in leveled compaction (CASSANDRA-4587)
   * increase stack size under Java7 to 180K
   * Log(info) schema changes (CASSANDRA-4547)


[jira] [Created] (CASSANDRA-4614) CREATE KEYSPACE error with cqlsh -3 on trunk

2012-09-04 Thread Tyler Patterson (JIRA)
Tyler Patterson created CASSANDRA-4614:
--

 Summary: CREATE KEYSPACE error with cqlsh -3 on trunk
 Key: CASSANDRA-4614
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4614
 Project: Cassandra
  Issue Type: Bug
 Environment: current trunk 769fe895a36868c47101f681f5fdd721bee1ad62
Reporter: Tyler Patterson
Assignee: paul cannon



{code}
cqlsh create KEYSPACE test WITH strategy_class = 'SimpleStrategy' AND 
strategy_options:replication_factor = 1;
Bad Request: line 1:80 mismatched input ':' expecting '='
{code}
There is no error in the cassandra log.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Updated] (CASSANDRA-4613) Utilise Secondary Indexes in ColumnFamilyRecordReader

2012-09-04 Thread Sam Tunnicliffe (JIRA)

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

Sam Tunnicliffe updated CASSANDRA-4613:
---

Attachment: 0001-Utilise-Secondary-Indexes-in-ColumnFamilyRecordReader.txt

 Utilise Secondary Indexes in ColumnFamilyRecordReader
 -

 Key: CASSANDRA-4613
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4613
 Project: Cassandra
  Issue Type: New Feature
  Components: Hadoop
Reporter: Sam Tunnicliffe
Assignee: Sam Tunnicliffe
 Fix For: 1.1.5

 Attachments: 
 0001-Utilise-Secondary-Indexes-in-ColumnFamilyRecordReader.txt


 Enable an IndexClause to be passed to ColumnFamilyRecordReader by serializing 
 it and adding to the Hadoop job Configuration. This is a requirement for 
 enabling Filter Pushdown[1] in Hive which can vastly reduce the number of 
 scanned rows that need to be processed in the Hive layer.
 [1] https://cwiki.apache.org/Hive/filterpushdowndev.html

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Resolved] (CASSANDRA-4614) CREATE KEYSPACE error with cqlsh -3 on trunk

2012-09-04 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis resolved CASSANDRA-4614.
---

Resolution: Invalid
  Assignee: (was: paul cannon)

See CASSANDRA-4497

 CREATE KEYSPACE error with cqlsh -3 on trunk
 

 Key: CASSANDRA-4614
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4614
 Project: Cassandra
  Issue Type: Bug
 Environment: current trunk 769fe895a36868c47101f681f5fdd721bee1ad62
Reporter: Tyler Patterson

 {code}
 cqlsh create KEYSPACE test WITH strategy_class = 'SimpleStrategy' AND 
 strategy_options:replication_factor = 1;
 Bad Request: line 1:80 mismatched input ':' expecting '='
 {code}
 There is no error in the cassandra log.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Assigned] (CASSANDRA-2958) Flush memtables on shutdown when durable writes are disabled

2012-09-04 Thread Robert Coli (JIRA)

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

Robert Coli reassigned CASSANDRA-2958:
--

Assignee: Robert Coli  (was: Jonathan Ellis)

 Flush memtables on shutdown when durable writes are disabled
 

 Key: CASSANDRA-2958
 URL: https://issues.apache.org/jira/browse/CASSANDRA-2958
 Project: Cassandra
  Issue Type: Bug
Affects Versions: 0.8.1
Reporter: David Phillips
Assignee: Robert Coli
 Fix For: 0.8.3

 Attachments: 2958.txt


  

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (CASSANDRA-2958) Flush memtables on shutdown when durable writes are disabled

2012-09-04 Thread Robert Coli (JIRA)

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

Robert Coli commented on CASSANDRA-2958:


 a memtable holds changes until it hits a flush condition like being full or 
 graceful shutdown, or you explicitly flush it.

This is not an unambiguous summary of the current behavior. It is true only if 
durable_writes are off. If durable_writes are on, graceful shutdown does not 
flush.

a memtable holds changes until it hits a flush condition like being full (or, 
if durable_writes are disabled, on graceful shutdown), or you explicitly flush 
it

Seems to unambiguously describe the current behavior and doesn't read very well.

I gather from CASSANDRA-3564 that there is interest in extending this 
flush-on-graceful shutdown behavior to occur in all cases of graceful shutdown. 
If that happens, your sentence will be a correct summation of Cassandra's newly 
predictable behavior. It will also answer my primary objection here, which is 
that the flush only occurs in *some* graceful shutdown cases. :)

 Flush memtables on shutdown when durable writes are disabled
 

 Key: CASSANDRA-2958
 URL: https://issues.apache.org/jira/browse/CASSANDRA-2958
 Project: Cassandra
  Issue Type: Bug
Affects Versions: 0.8.1
Reporter: David Phillips
Assignee: Robert Coli
 Fix For: 0.8.3

 Attachments: 2958.txt


  

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Assigned] (CASSANDRA-2958) Flush memtables on shutdown when durable writes are disabled

2012-09-04 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis reassigned CASSANDRA-2958:
-

Assignee: Jonathan Ellis  (was: Robert Coli)

Robert, we use assign-to to track who fixed an issue.  Assigning to yourself at 
this point is not appropriate.

 Flush memtables on shutdown when durable writes are disabled
 

 Key: CASSANDRA-2958
 URL: https://issues.apache.org/jira/browse/CASSANDRA-2958
 Project: Cassandra
  Issue Type: Bug
Affects Versions: 0.8.1
Reporter: David Phillips
Assignee: Jonathan Ellis
 Fix For: 0.8.3

 Attachments: 2958.txt


  

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (CASSANDRA-4561) update column family fails

2012-09-04 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis commented on CASSANDRA-4561:
---

Don't you want to call cfs.truncate().get() to block for the truncate to 
finish?  Rest LGTM.

 update column family fails
 --

 Key: CASSANDRA-4561
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4561
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Affects Versions: 1.1.0, 1.1.1, 1.1.2, 1.1.3, 1.1.4
Reporter: Zenek Kraweznik
Assignee: Pavel Yaskevich
 Fix For: 1.1.5

 Attachments: CASSANDRA-4561.patch


 [default@test] show schema;
 create column family Messages
   with column_type = 'Standard'
   and comparator = 'AsciiType'
   and default_validation_class = 'BytesType'
   and key_validation_class = 'AsciiType'
   and read_repair_chance = 0.1
   and dclocal_read_repair_chance = 0.0
   and gc_grace = 864000
   and min_compaction_threshold = 2
   and max_compaction_threshold = 4
   and replicate_on_write = true
   and compaction_strategy = 
 'org.apache.cassandra.db.compaction.LeveledCompactionStrategy'
   and caching = 'KEYS_ONLY'
   and compaction_strategy_options = {'sstable_size_in_mb' : '1024'}
   and compression_options = {'chunk_length_kb' : '64', 'sstable_compression' 
 : 'org.apache.cassandra.io.compress.DeflateCompressor'};
 [default@test] update column family Messages with min_compaction_threshold = 
 4 and  max_compaction_threshold = 32;
 a5b7544e-1ef5-3bfd-8770-c09594e37ec2
 Waiting for schema agreement...
 ... schemas agree across the cluster
 [default@test] show schema;
 create column family Messages
   with column_type = 'Standard'
   and comparator = 'AsciiType'
   and default_validation_class = 'BytesType'
   and key_validation_class = 'AsciiType'
   and read_repair_chance = 0.1
   and dclocal_read_repair_chance = 0.0
   and gc_grace = 864000
   and min_compaction_threshold = 2
   and max_compaction_threshold = 4
   and replicate_on_write = true
   and compaction_strategy = 
 'org.apache.cassandra.db.compaction.LeveledCompactionStrategy'
   and caching = 'KEYS_ONLY'
   and compaction_strategy_options = {'sstable_size_in_mb' : '1024'}
   and compression_options = {'chunk_length_kb' : '64', 'sstable_compression' 
 : 'org.apache.cassandra.io.compress.DeflateCompressor'};

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (CASSANDRA-4602) Stack Size on Sun JVM 1.6.0_33 must be at least 160k

2012-09-04 Thread Brandon Williams (JIRA)

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

Brandon Williams commented on CASSANDRA-4602:
-

+1

 Stack Size on Sun JVM 1.6.0_33 must be at least 160k
 

 Key: CASSANDRA-4602
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4602
 Project: Cassandra
  Issue Type: Bug
  Components: Core
 Environment: Ubuntu 10.04 
 java version 1.6.0_35
 Java(TM) SE Runtime Environment (build 1.6.0_35-b10)
 Java HotSpot(TM) 64-Bit Server VM (build 20.10-b01, mixed mode)
Reporter: Aaron Morton
Assignee: Jonathan Ellis
 Fix For: 1.0.12, 1.1.5

 Attachments: 4602.txt


 I started a fresh Cassandra 1.1.4 install with Sun JVM 1.6.35.
 On startup I got this in output.log
 {noformat}
 The stack size specified is too small, Specify at least 160k
 Cannot create Java VM
 Service exit with a return value of 1
 {noformat}
 Remembering CASSANDRA-4275 I monkeyed around and started the JVM with 
 -Xss160k the same as Java 7. I then got
 {code:java}
 ERROR [WRITE-/192.168.1.12] 2012-08-31 01:43:29,865 
 AbstractCassandraDaemon.java (line 134) Exception in thread 
 Thread[WRITE-/192.168.1.12,5,main]
 java.lang.StackOverflowError
   at java.net.SocketOutputStream.socketWrite0(Native Method)
   at java.net.SocketOutputStream.socketWrite(Unknown Source)
   at java.net.SocketOutputStream.write(Unknown Source)
   at java.io.BufferedOutputStream.flushBuffer(Unknown Source)
   at java.io.BufferedOutputStream.flush(Unknown Source)
   at java.io.DataOutputStream.flush(Unknown Source)
   at 
 org.apache.cassandra.net.OutboundTcpConnection.writeConnected(OutboundTcpConnection.java:156)
   at 
 org.apache.cassandra.net.OutboundTcpConnection.run(OutboundTcpConnection.java:126)
 {code}
 Same as CASSANDRA-4442
 At which point I dropped back to Java 6.33. 
 CASSANDRA-4457 bumped the stack size to 180 for java 7, should we also do 
 this for Java 6.33+ ?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (CASSANDRA-4474) Respect five-minute flush moratorium after initial CL replay

2012-09-04 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis commented on CASSANDRA-4474:
---

I think the (existing) is compaction manager idle check is bogus: if we have 
enough CFs that CM starts working on the first, before it finishes looping over 
everyone, then some CFs will never have compaction kicked off.  Suggest just 
blindly submitting the background compaction, which will no-op if it's 
redundant (which is what flush does as well).

Otherwise LGTM.

 Respect five-minute flush moratorium after initial CL replay
 

 Key: CASSANDRA-4474
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4474
 Project: Cassandra
  Issue Type: Improvement
  Components: Core
Reporter: Jonathan Ellis
Assignee: Yuki Morishita
Priority: Minor
  Labels: commitlog, compaction
 Fix For: 1.1.5

 Attachments: 4474-1.1.txt


 As noted in CASSANDRA-1967, the post-replay flush can kick off compactions 
 before the five minute grace period introduced in CASSANDRA-3181 to avoid i/o 
 contention while server is warming up.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[2/6] git commit: merge from 1.0

2012-09-04 Thread jbellis
merge from 1.0


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

Branch: refs/heads/cassandra-1.1
Commit: f94c839dcf92b1e681fbaf20923df42a1bfbe04e
Parents: e1b1059 08c6546
Author: Jonathan Ellis jbel...@apache.org
Authored: Tue Sep 4 14:54:30 2012 -0500
Committer: Jonathan Ellis jbel...@apache.org
Committed: Tue Sep 4 14:54:30 2012 -0500

--
 CHANGES.txt   |1 +
 conf/cassandra-env.sh |2 +-
 2 files changed, 2 insertions(+), 1 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/f94c839d/CHANGES.txt
--
diff --cc CHANGES.txt
index 6c504e8,8a0ce59..5e72de3
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,172 -1,14 +1,173 @@@
 -1.0.12
 +1.1.5
 + * fix FD leak in slice queries (CASSANDRA-4571)
 + * avoid recursion in leveled compaction (CASSANDRA-4587)
 + * increase stack size under Java7 to 180K
 + * Log(info) schema changes (CASSANDRA-4547)
 + * Change nodetool setcachecapcity to manipulate global caches 
(CASSANDRA-4563)
 + * (cql3) fix setting compaction strategy (CASSANDRA-4597)
 +Merged from 1.0:
+  * increase Xss to 160k to accomodate latest 1.6 JVMs (CASSANDRA-4602)
   * fix toString of hint destination tokens (CASSANDRA-4568)
 +
 +
 +1.1.4
 + * fix offline scrub to catch = out of order rows (CASSANDRA-4411)
 + * fix cassandra-env.sh on RHEL and other non-dash-based systems 
 +   (CASSANDRA-4494)
 +Merged from 1.0:
   * (Hadoop) fix setting key length for old-style mapred api (CASSANDRA-4534)
 - * (Hadoop) fix iterating through a resultset consisting entirely
 -   of tombstoned rows (CASSANDRA-4466)
  
  
 -1.0.11
 +1.1.3
 + * munmap commitlog segments before rename (CASSANDRA-4337)
 + * (JMX) rename getRangeKeySample to sampleKeyRange to avoid returning
 +   multi-MB results as an attribute (CASSANDRA-4452)
 + * flush based on data size, not throughput; overwritten columns no 
 +   longer artificially inflate liveRatio (CASSANDRA-4399)
 + * update default commitlog segment size to 32MB and total commitlog
 +   size to 32/1024 MB for 32/64 bit JVMs, respectively (CASSANDRA-4422)
 + * avoid using global partitioner to estimate ranges in index sstables
 +   (CASSANDRA-4403)
 + * restore pre-CASSANDRA-3862 approach to removing expired tombstones
 +   from row cache during compaction (CASSANDRA-4364)
 + * (stress) support for CQL prepared statements (CASSANDRA-3633)
 + * Correctly catch exception when Snappy cannot be loaded (CASSANDRA-4400)
 + * (cql3) Support ORDER BY when IN condition is given in WHERE clause 
(CASSANDRA-4327)
 + * (cql3) delete component_index column on DROP TABLE call (CASSANDRA-4420)
 + * change nanoTime() to currentTimeInMillis() in schema related code 
(CASSANDRA-4432)
 + * add a token generation tool (CASSANDRA-3709)
 + * Fix LCS bug with sstable containing only 1 row (CASSANDRA-4411)
 + * fix Can't Modify Index Name problem on CF update (CASSANDRA-4439)
 + * Fix assertion error in getOverlappingSSTables during repair 
(CASSANDRA-4456)
 + * fix nodetool's setcompactionthreshold command (CASSANDRA-4455)
 + * Ensure compacted files are never used, to avoid counter overcount 
(CASSANDRA-4436)
 +Merged from 1.0:
 + * Push the validation of secondary index values to the SecondaryIndexManager 
(CASSANDRA-4240)
 + * (Hadoop) fix iterating through a resultset consisting entirely
 +   of tombstoned rows (CASSANDRA-4466)
   * allow dropping columns shadowed by not-yet-expired supercolumn or row
 tombstones in PrecompactedRow (CASSANDRA-4396)
 +
 +
 +1.1.2
 + * Fix cleanup not deleting index entries (CASSANDRA-4379)
 + * Use correct partitioner when saving + loading caches (CASSANDRA-4331)
 + * Check schema before trying to export sstable (CASSANDRA-2760)
 + * Raise a meaningful exception instead of NPE when PFS encounters
 +   an unconfigured node + no default (CASSANDRA-4349)
 + * fix bug in sstable blacklisting with LCS (CASSANDRA-4343)
 + * LCS no longer promotes tiny sstables out of L0 (CASSANDRA-4341)
 + * skip tombstones during hint replay (CASSANDRA-4320)
 + * fix NPE in compactionstats (CASSANDRA-4318)
 + * enforce 1m min keycache for auto (CASSANDRA-4306)
 + * Have DeletedColumn.isMFD always return true (CASSANDRA-4307)
 + * (cql3) exeption message for ORDER BY constraints said primary filter can be
 +an IN clause, which is misleading (CASSANDRA-4319)
 + * (cql3) Reject (not yet supported) creation of 2ndardy indexes on tables 
with
 +   composite primary keys (CASSANDRA-4328)
 + * Set JVM stack size to 160k for java 7 (CASSANDRA-4275)
 + * cqlsh: add COPY command to load data from CSV flat files (CASSANDRA-4012)
 + * 

[6/6] git commit: increase Xss to 160k to accomodate latest 1.6 JVMs patch by jbellis; reviewed by brandonwilliams for CASSANDRA-4602

2012-09-04 Thread jbellis
increase Xss to 160k to accomodate latest 1.6 JVMs
patch by jbellis; reviewed by brandonwilliams for CASSANDRA-4602


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

Branch: refs/heads/cassandra-1.0
Commit: 08c654601f8a54d50195c9a96939be47a428fec9
Parents: 4764a37
Author: Jonathan Ellis jbel...@apache.org
Authored: Tue Sep 4 14:52:37 2012 -0500
Committer: Jonathan Ellis jbel...@apache.org
Committed: Tue Sep 4 14:52:37 2012 -0500

--
 CHANGES.txt   |1 +
 conf/cassandra-env.sh |2 +-
 2 files changed, 2 insertions(+), 1 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/08c65460/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 6e82d11..8a0ce59 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 1.0.12
+ * increase Xss to 160k to accomodate latest 1.6 JVMs (CASSANDRA-4602)
  * fix toString of hint destination tokens (CASSANDRA-4568)
  * (Hadoop) fix setting key length for old-style mapred api (CASSANDRA-4534)
  * (Hadoop) fix iterating through a resultset consisting entirely

http://git-wip-us.apache.org/repos/asf/cassandra/blob/08c65460/conf/cassandra-env.sh
--
diff --git a/conf/cassandra-env.sh b/conf/cassandra-env.sh
index f1f2c43..5400fd9 100644
--- a/conf/cassandra-env.sh
+++ b/conf/cassandra-env.sh
@@ -150,7 +150,7 @@ if [ `uname` = Linux ] ; then
 # thread-per-client.  (Best practice is for client connections to
 # be pooled anyway.) Only do so on Linux where it is known to be
 # supported.
-JVM_OPTS=$JVM_OPTS -Xss128k
+JVM_OPTS=$JVM_OPTS -Xss160k
 fi
 
 # GC tuning options



[3/6] git commit: merge from 1.0

2012-09-04 Thread jbellis
merge from 1.0


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

Branch: refs/heads/trunk
Commit: f94c839dcf92b1e681fbaf20923df42a1bfbe04e
Parents: e1b1059 08c6546
Author: Jonathan Ellis jbel...@apache.org
Authored: Tue Sep 4 14:54:30 2012 -0500
Committer: Jonathan Ellis jbel...@apache.org
Committed: Tue Sep 4 14:54:30 2012 -0500

--
 CHANGES.txt   |1 +
 conf/cassandra-env.sh |2 +-
 2 files changed, 2 insertions(+), 1 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/f94c839d/CHANGES.txt
--
diff --cc CHANGES.txt
index 6c504e8,8a0ce59..5e72de3
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,172 -1,14 +1,173 @@@
 -1.0.12
 +1.1.5
 + * fix FD leak in slice queries (CASSANDRA-4571)
 + * avoid recursion in leveled compaction (CASSANDRA-4587)
 + * increase stack size under Java7 to 180K
 + * Log(info) schema changes (CASSANDRA-4547)
 + * Change nodetool setcachecapcity to manipulate global caches 
(CASSANDRA-4563)
 + * (cql3) fix setting compaction strategy (CASSANDRA-4597)
 +Merged from 1.0:
+  * increase Xss to 160k to accomodate latest 1.6 JVMs (CASSANDRA-4602)
   * fix toString of hint destination tokens (CASSANDRA-4568)
 +
 +
 +1.1.4
 + * fix offline scrub to catch = out of order rows (CASSANDRA-4411)
 + * fix cassandra-env.sh on RHEL and other non-dash-based systems 
 +   (CASSANDRA-4494)
 +Merged from 1.0:
   * (Hadoop) fix setting key length for old-style mapred api (CASSANDRA-4534)
 - * (Hadoop) fix iterating through a resultset consisting entirely
 -   of tombstoned rows (CASSANDRA-4466)
  
  
 -1.0.11
 +1.1.3
 + * munmap commitlog segments before rename (CASSANDRA-4337)
 + * (JMX) rename getRangeKeySample to sampleKeyRange to avoid returning
 +   multi-MB results as an attribute (CASSANDRA-4452)
 + * flush based on data size, not throughput; overwritten columns no 
 +   longer artificially inflate liveRatio (CASSANDRA-4399)
 + * update default commitlog segment size to 32MB and total commitlog
 +   size to 32/1024 MB for 32/64 bit JVMs, respectively (CASSANDRA-4422)
 + * avoid using global partitioner to estimate ranges in index sstables
 +   (CASSANDRA-4403)
 + * restore pre-CASSANDRA-3862 approach to removing expired tombstones
 +   from row cache during compaction (CASSANDRA-4364)
 + * (stress) support for CQL prepared statements (CASSANDRA-3633)
 + * Correctly catch exception when Snappy cannot be loaded (CASSANDRA-4400)
 + * (cql3) Support ORDER BY when IN condition is given in WHERE clause 
(CASSANDRA-4327)
 + * (cql3) delete component_index column on DROP TABLE call (CASSANDRA-4420)
 + * change nanoTime() to currentTimeInMillis() in schema related code 
(CASSANDRA-4432)
 + * add a token generation tool (CASSANDRA-3709)
 + * Fix LCS bug with sstable containing only 1 row (CASSANDRA-4411)
 + * fix Can't Modify Index Name problem on CF update (CASSANDRA-4439)
 + * Fix assertion error in getOverlappingSSTables during repair 
(CASSANDRA-4456)
 + * fix nodetool's setcompactionthreshold command (CASSANDRA-4455)
 + * Ensure compacted files are never used, to avoid counter overcount 
(CASSANDRA-4436)
 +Merged from 1.0:
 + * Push the validation of secondary index values to the SecondaryIndexManager 
(CASSANDRA-4240)
 + * (Hadoop) fix iterating through a resultset consisting entirely
 +   of tombstoned rows (CASSANDRA-4466)
   * allow dropping columns shadowed by not-yet-expired supercolumn or row
 tombstones in PrecompactedRow (CASSANDRA-4396)
 +
 +
 +1.1.2
 + * Fix cleanup not deleting index entries (CASSANDRA-4379)
 + * Use correct partitioner when saving + loading caches (CASSANDRA-4331)
 + * Check schema before trying to export sstable (CASSANDRA-2760)
 + * Raise a meaningful exception instead of NPE when PFS encounters
 +   an unconfigured node + no default (CASSANDRA-4349)
 + * fix bug in sstable blacklisting with LCS (CASSANDRA-4343)
 + * LCS no longer promotes tiny sstables out of L0 (CASSANDRA-4341)
 + * skip tombstones during hint replay (CASSANDRA-4320)
 + * fix NPE in compactionstats (CASSANDRA-4318)
 + * enforce 1m min keycache for auto (CASSANDRA-4306)
 + * Have DeletedColumn.isMFD always return true (CASSANDRA-4307)
 + * (cql3) exeption message for ORDER BY constraints said primary filter can be
 +an IN clause, which is misleading (CASSANDRA-4319)
 + * (cql3) Reject (not yet supported) creation of 2ndardy indexes on tables 
with
 +   composite primary keys (CASSANDRA-4328)
 + * Set JVM stack size to 160k for java 7 (CASSANDRA-4275)
 + * cqlsh: add COPY command to load data from CSV flat files (CASSANDRA-4012)
 + * 

[5/6] git commit: increase Xss to 160k to accomodate latest 1.6 JVMs patch by jbellis; reviewed by brandonwilliams for CASSANDRA-4602

2012-09-04 Thread jbellis
increase Xss to 160k to accomodate latest 1.6 JVMs
patch by jbellis; reviewed by brandonwilliams for CASSANDRA-4602


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

Branch: refs/heads/cassandra-1.1
Commit: 08c654601f8a54d50195c9a96939be47a428fec9
Parents: 4764a37
Author: Jonathan Ellis jbel...@apache.org
Authored: Tue Sep 4 14:52:37 2012 -0500
Committer: Jonathan Ellis jbel...@apache.org
Committed: Tue Sep 4 14:52:37 2012 -0500

--
 CHANGES.txt   |1 +
 conf/cassandra-env.sh |2 +-
 2 files changed, 2 insertions(+), 1 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/08c65460/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 6e82d11..8a0ce59 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 1.0.12
+ * increase Xss to 160k to accomodate latest 1.6 JVMs (CASSANDRA-4602)
  * fix toString of hint destination tokens (CASSANDRA-4568)
  * (Hadoop) fix setting key length for old-style mapred api (CASSANDRA-4534)
  * (Hadoop) fix iterating through a resultset consisting entirely

http://git-wip-us.apache.org/repos/asf/cassandra/blob/08c65460/conf/cassandra-env.sh
--
diff --git a/conf/cassandra-env.sh b/conf/cassandra-env.sh
index f1f2c43..5400fd9 100644
--- a/conf/cassandra-env.sh
+++ b/conf/cassandra-env.sh
@@ -150,7 +150,7 @@ if [ `uname` = Linux ] ; then
 # thread-per-client.  (Best practice is for client connections to
 # be pooled anyway.) Only do so on Linux where it is known to be
 # supported.
-JVM_OPTS=$JVM_OPTS -Xss128k
+JVM_OPTS=$JVM_OPTS -Xss160k
 fi
 
 # GC tuning options



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

2012-09-04 Thread jbellis
Updated Branches:
  refs/heads/cassandra-1.0 4764a379e - 08c654601
  refs/heads/cassandra-1.1 e1b10590e - f94c839dc
  refs/heads/trunk 6c8687237 - b2899f088


Merge branch 'cassandra-1.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/b2899f08
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/b2899f08
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/b2899f08

Branch: refs/heads/trunk
Commit: b2899f08893d86af60ebcc2087b5d4edb641fb83
Parents: 6c86872 f94c839
Author: Jonathan Ellis jbel...@apache.org
Authored: Tue Sep 4 14:54:40 2012 -0500
Committer: Jonathan Ellis jbel...@apache.org
Committed: Tue Sep 4 14:54:40 2012 -0500

--
 CHANGES.txt   |1 +
 conf/cassandra-env.sh |2 +-
 2 files changed, 2 insertions(+), 1 deletions(-)
--


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



[jira] [Commented] (CASSANDRA-4561) update column family fails

2012-09-04 Thread Pavel Yaskevich (JIRA)

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

Pavel Yaskevich commented on CASSANDRA-4561:


good point, I would add that and commit, thanks!

 update column family fails
 --

 Key: CASSANDRA-4561
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4561
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Affects Versions: 1.1.0, 1.1.1, 1.1.2, 1.1.3, 1.1.4
Reporter: Zenek Kraweznik
Assignee: Pavel Yaskevich
 Fix For: 1.1.5

 Attachments: CASSANDRA-4561.patch


 [default@test] show schema;
 create column family Messages
   with column_type = 'Standard'
   and comparator = 'AsciiType'
   and default_validation_class = 'BytesType'
   and key_validation_class = 'AsciiType'
   and read_repair_chance = 0.1
   and dclocal_read_repair_chance = 0.0
   and gc_grace = 864000
   and min_compaction_threshold = 2
   and max_compaction_threshold = 4
   and replicate_on_write = true
   and compaction_strategy = 
 'org.apache.cassandra.db.compaction.LeveledCompactionStrategy'
   and caching = 'KEYS_ONLY'
   and compaction_strategy_options = {'sstable_size_in_mb' : '1024'}
   and compression_options = {'chunk_length_kb' : '64', 'sstable_compression' 
 : 'org.apache.cassandra.io.compress.DeflateCompressor'};
 [default@test] update column family Messages with min_compaction_threshold = 
 4 and  max_compaction_threshold = 32;
 a5b7544e-1ef5-3bfd-8770-c09594e37ec2
 Waiting for schema agreement...
 ... schemas agree across the cluster
 [default@test] show schema;
 create column family Messages
   with column_type = 'Standard'
   and comparator = 'AsciiType'
   and default_validation_class = 'BytesType'
   and key_validation_class = 'AsciiType'
   and read_repair_chance = 0.1
   and dclocal_read_repair_chance = 0.0
   and gc_grace = 864000
   and min_compaction_threshold = 2
   and max_compaction_threshold = 4
   and replicate_on_write = true
   and compaction_strategy = 
 'org.apache.cassandra.db.compaction.LeveledCompactionStrategy'
   and caching = 'KEYS_ONLY'
   and compaction_strategy_options = {'sstable_size_in_mb' : '1024'}
   and compression_options = {'chunk_length_kb' : '64', 'sstable_compression' 
 : 'org.apache.cassandra.io.compress.DeflateCompressor'};

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Updated] (CASSANDRA-4601) Ensure unique commit log file names

2012-09-04 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis updated CASSANDRA-4601:
--

 Reviewer: jbellis
Affects Version/s: (was: 1.1.4)
   (was: 1.0.11)
   (was: 0.8.10)
   1.1.0
Fix Version/s: 1.1.5

This actually doesn't affect  1.1.0; it was introduced by CASSANDRA-3544.

 Ensure unique commit log file names
 ---

 Key: CASSANDRA-4601
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4601
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Affects Versions: 1.1.0
 Environment: Sun JVM 1.6.33 / Ubuntu 10.04.4 LTS 
Reporter: Aaron Morton
Assignee: Aaron Morton
Priority: Critical
 Fix For: 1.1.5

 Attachments: cassandra-1.1-4601.patch


 The commit log segment name uses System.nanoTime() as part of the file name. 
 There is no guarantee that successive calls to nanoTime() will return 
 different values. And on less than optimal hypervisors this happens a lot. 
 I observed the following in the wild:
 {code:java}
 ERROR [COMMIT-LOG-ALLOCATOR] 2012-08-31 15:56:49,815 
 AbstractCassandraDaemon.java (line 134) Exception in thread 
 Thread[COMMIT-LOG-ALLOCATOR,5,main]
 java.lang.AssertionError: attempted to delete non-existing file 
 CommitLog-13926764209796414.log
 at 
 org.apache.cassandra.io.util.FileUtils.deleteWithConfirm(FileUtils.java:68)
 at 
 org.apache.cassandra.db.commitlog.CommitLogSegment.discard(CommitLogSegment.java:172)
 at 
 org.apache.cassandra.db.commitlog.CommitLogAllocator$4.run(CommitLogAllocator.java:223)
 at 
 org.apache.cassandra.db.commitlog.CommitLogAllocator$1.runMayThrow(CommitLogAllocator.java:95)
 at 
 org.apache.cassandra.utils.WrappedRunnable.run(WrappedRunnable.java:30)
 at java.lang.Thread.run(Unknown Source)
 {code}
 My _assumption_ is that it was because of duplicate file names. As this is on 
 a hypervisor that is less than optimal. 
  
 After a while (about 30 minutes) mutations stopped being processed and the 
 pending count sky rocketed. I _think_ this was because log writing was 
 blocked trying to get a new segment and writers could not submit to the 
 commit log queue. The only way to stop the affected nodes was kill -9. 
 Over about 24 hours this happened 5 times. I have deployed a patch that has 
 been running for 12 hours without incident, will attach. 
 The affected nodes could still read, and I'm checking logs to see how the 
 other nodes handled the situation.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (CASSANDRA-4591) Pass -umask option to jsvc

2012-09-04 Thread Nick Bailey (JIRA)

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

Nick Bailey commented on CASSANDRA-4591:


Looks like the -umask option is only available in jsvc 1.0.8 which is too new 
to be available on all the debian style platforms we probably want to support.

Not sure if there is another solution we could come up with here.

 Pass -umask option to jsvc
 --

 Key: CASSANDRA-4591
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4591
 Project: Cassandra
  Issue Type: Improvement
  Components: Packaging
Affects Versions: 1.1.4
Reporter: Nick Bailey
Assignee: Nick Bailey
Priority: Minor
 Fix For: 1.1.5, 1.2.0


 Currently jsvc defaults to a very restrictive umask. This makes it hard for 
 external tools to work with cassandra data files (snapshots). It would be 
 useful to pass in a -umask option to jsvc with slightly less restrictive 
 permissions (just adding group read permissions).
 It should just be passing 'umask 0037' (u=rwx,g=r,o=), in the debian init 
 script.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


git commit: use millis + atomicint for commitlog segment creation patch by amorton; reviewed by jbellis for CASSANDRA-4601

2012-09-04 Thread jbellis
Updated Branches:
  refs/heads/cassandra-1.1 f94c839dc - 5df7b2512


use millis + atomicint for commitlog segment creation
patch by amorton; reviewed by jbellis for CASSANDRA-4601


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

Branch: refs/heads/cassandra-1.1
Commit: 5df7b2512de1f851d2add08d699c948f3d95d9c8
Parents: f94c839
Author: Jonathan Ellis jbel...@apache.org
Authored: Tue Sep 4 15:04:16 2012 -0500
Committer: Jonathan Ellis jbel...@apache.org
Committed: Tue Sep 4 15:04:16 2012 -0500

--
 CHANGES.txt|2 ++
 .../cassandra/db/commitlog/CommitLogArchiver.java  |2 +-
 .../cassandra/db/commitlog/CommitLogSegment.java   |9 -
 3 files changed, 11 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/5df7b251/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 5e72de3..6125c9c 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,6 @@
 1.1.5
+ * use millis + atomicint for commitlog segment creation instead of
+   nanotime, which has issues under some hypervisors (CASSANDRA-4601)
  * fix FD leak in slice queries (CASSANDRA-4571)
  * avoid recursion in leveled compaction (CASSANDRA-4587)
  * increase stack size under Java7 to 180K

http://git-wip-us.apache.org/repos/asf/cassandra/blob/5df7b251/src/java/org/apache/cassandra/db/commitlog/CommitLogArchiver.java
--
diff --git a/src/java/org/apache/cassandra/db/commitlog/CommitLogArchiver.java 
b/src/java/org/apache/cassandra/db/commitlog/CommitLogArchiver.java
index 556a37a..fe66369 100644
--- a/src/java/org/apache/cassandra/db/commitlog/CommitLogArchiver.java
+++ b/src/java/org/apache/cassandra/db/commitlog/CommitLogArchiver.java
@@ -150,7 +150,7 @@ public class CommitLogArchiver
 {
 File toFile = new 
File(DatabaseDescriptor.getCommitLogLocation(),
CommitLogSegment.FILENAME_PREFIX +
-   System.nanoTime() +
+   CommitLogSegment.getNextId() +
CommitLogSegment.FILENAME_EXTENSION);   
  
 String command = restoreCommand.replace(%from, 
fromFile.getPath());
 command = command.replace(%to, toFile.getPath());   

http://git-wip-us.apache.org/repos/asf/cassandra/blob/5df7b251/src/java/org/apache/cassandra/db/commitlog/CommitLogSegment.java
--
diff --git a/src/java/org/apache/cassandra/db/commitlog/CommitLogSegment.java 
b/src/java/org/apache/cassandra/db/commitlog/CommitLogSegment.java
index fcd4130..290db7c 100644
--- a/src/java/org/apache/cassandra/db/commitlog/CommitLogSegment.java
+++ b/src/java/org/apache/cassandra/db/commitlog/CommitLogSegment.java
@@ -27,6 +27,7 @@ import java.io.RandomAccessFile;
 import java.nio.channels.FileChannel;
 import java.nio.MappedByteBuffer;
 import java.util.Collection;
+import java.util.concurrent.atomic.AtomicInteger;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 import java.util.zip.Checksum;
@@ -56,6 +57,8 @@ public class CommitLogSegment
 static final String FILENAME_PREFIX = CommitLog-;
 static final String FILENAME_EXTENSION = .log;
 private static final Pattern COMMIT_LOG_FILE_PATTERN = 
Pattern.compile(FILENAME_PREFIX + (\\d+) + FILENAME_EXTENSION);
+private final static long idBase = System.currentTimeMillis();
+private final static AtomicInteger nextId = new AtomicInteger(1);
 
 // The commit log entry overhead in bytes (int: length + long: head 
checksum + long: tail checksum)
 static final int ENTRY_OVERHEAD_SIZE = 4 + 8 + 8;
@@ -81,6 +84,10 @@ public class CommitLogSegment
 return new CommitLogSegment(null);
 }
 
+public static long getNextId()
+{
+return idBase + nextId.getAndIncrement();
+}
 /**
  * Constructs a new segment file.
  *
@@ -88,7 +95,7 @@ public class CommitLogSegment
  */
 CommitLogSegment(String filePath)
 {
-id = System.nanoTime();
+id = getNextId();
 logFile = new File(DatabaseDescriptor.getCommitLogLocation(), 
FILENAME_PREFIX + id + FILENAME_EXTENSION);
 boolean isCreating = true;
 



[jira] [Updated] (CASSANDRA-4603) use Map internally in schema_ tables where appropriate

2012-09-04 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis updated CASSANDRA-4603:
--

Fix Version/s: (was: 1.2.0)
   1.3

This is a bigger change than I thought at first, since the schema_ tables are 
all created with COMPACT STORAGE.  So we'd have to migrate to a 
composite-enabled table to allow maps.

 use Map internally in schema_ tables where appropriate
 --

 Key: CASSANDRA-4603
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4603
 Project: Cassandra
  Issue Type: Improvement
  Components: API, Core
Affects Versions: 1.2.0
Reporter: Jonathan Ellis
Assignee: Pavel Yaskevich
  Labels: cql3
 Fix For: 1.3


 {replication, compression, compaction}_parameters should be stored as Map 
 type.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[2/2] git commit: use millis + atomicint for commitlog segment creation patch by amorton; reviewed by jbellis for CASSANDRA-4601

2012-09-04 Thread jbellis
use millis + atomicint for commitlog segment creation
patch by amorton; reviewed by jbellis for CASSANDRA-4601


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

Branch: refs/heads/trunk
Commit: 5df7b2512de1f851d2add08d699c948f3d95d9c8
Parents: f94c839
Author: Jonathan Ellis jbel...@apache.org
Authored: Tue Sep 4 15:04:16 2012 -0500
Committer: Jonathan Ellis jbel...@apache.org
Committed: Tue Sep 4 15:04:16 2012 -0500

--
 CHANGES.txt|2 ++
 .../cassandra/db/commitlog/CommitLogArchiver.java  |2 +-
 .../cassandra/db/commitlog/CommitLogSegment.java   |9 -
 3 files changed, 11 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/5df7b251/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 5e72de3..6125c9c 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,6 @@
 1.1.5
+ * use millis + atomicint for commitlog segment creation instead of
+   nanotime, which has issues under some hypervisors (CASSANDRA-4601)
  * fix FD leak in slice queries (CASSANDRA-4571)
  * avoid recursion in leveled compaction (CASSANDRA-4587)
  * increase stack size under Java7 to 180K

http://git-wip-us.apache.org/repos/asf/cassandra/blob/5df7b251/src/java/org/apache/cassandra/db/commitlog/CommitLogArchiver.java
--
diff --git a/src/java/org/apache/cassandra/db/commitlog/CommitLogArchiver.java 
b/src/java/org/apache/cassandra/db/commitlog/CommitLogArchiver.java
index 556a37a..fe66369 100644
--- a/src/java/org/apache/cassandra/db/commitlog/CommitLogArchiver.java
+++ b/src/java/org/apache/cassandra/db/commitlog/CommitLogArchiver.java
@@ -150,7 +150,7 @@ public class CommitLogArchiver
 {
 File toFile = new 
File(DatabaseDescriptor.getCommitLogLocation(),
CommitLogSegment.FILENAME_PREFIX +
-   System.nanoTime() +
+   CommitLogSegment.getNextId() +
CommitLogSegment.FILENAME_EXTENSION);   
  
 String command = restoreCommand.replace(%from, 
fromFile.getPath());
 command = command.replace(%to, toFile.getPath());   

http://git-wip-us.apache.org/repos/asf/cassandra/blob/5df7b251/src/java/org/apache/cassandra/db/commitlog/CommitLogSegment.java
--
diff --git a/src/java/org/apache/cassandra/db/commitlog/CommitLogSegment.java 
b/src/java/org/apache/cassandra/db/commitlog/CommitLogSegment.java
index fcd4130..290db7c 100644
--- a/src/java/org/apache/cassandra/db/commitlog/CommitLogSegment.java
+++ b/src/java/org/apache/cassandra/db/commitlog/CommitLogSegment.java
@@ -27,6 +27,7 @@ import java.io.RandomAccessFile;
 import java.nio.channels.FileChannel;
 import java.nio.MappedByteBuffer;
 import java.util.Collection;
+import java.util.concurrent.atomic.AtomicInteger;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 import java.util.zip.Checksum;
@@ -56,6 +57,8 @@ public class CommitLogSegment
 static final String FILENAME_PREFIX = CommitLog-;
 static final String FILENAME_EXTENSION = .log;
 private static final Pattern COMMIT_LOG_FILE_PATTERN = 
Pattern.compile(FILENAME_PREFIX + (\\d+) + FILENAME_EXTENSION);
+private final static long idBase = System.currentTimeMillis();
+private final static AtomicInteger nextId = new AtomicInteger(1);
 
 // The commit log entry overhead in bytes (int: length + long: head 
checksum + long: tail checksum)
 static final int ENTRY_OVERHEAD_SIZE = 4 + 8 + 8;
@@ -81,6 +84,10 @@ public class CommitLogSegment
 return new CommitLogSegment(null);
 }
 
+public static long getNextId()
+{
+return idBase + nextId.getAndIncrement();
+}
 /**
  * Constructs a new segment file.
  *
@@ -88,7 +95,7 @@ public class CommitLogSegment
  */
 CommitLogSegment(String filePath)
 {
-id = System.nanoTime();
+id = getNextId();
 logFile = new File(DatabaseDescriptor.getCommitLogLocation(), 
FILENAME_PREFIX + id + FILENAME_EXTENSION);
 boolean isCreating = true;
 



[1/2] git commit: merge from 1.1

2012-09-04 Thread jbellis
Updated Branches:
  refs/heads/trunk b2899f088 - 6b29ab709


merge from 1.1


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

Branch: refs/heads/trunk
Commit: 6b29ab709f03941037bda89171543860027475ba
Parents: b2899f0 5df7b25
Author: Jonathan Ellis jbel...@apache.org
Authored: Tue Sep 4 15:13:28 2012 -0500
Committer: Jonathan Ellis jbel...@apache.org
Committed: Tue Sep 4 15:13:28 2012 -0500

--
 CHANGES.txt|2 ++
 .../cassandra/db/commitlog/CommitLogArchiver.java  |2 +-
 .../cassandra/db/commitlog/CommitLogSegment.java   |   14 +++---
 3 files changed, 14 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/6b29ab70/CHANGES.txt
--
diff --cc CHANGES.txt
index 88a0172,6125c9c..61aae96
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,55 -1,6 +1,57 @@@
 +1.2-dev
 + * optimize WriteResponse (CASSANDRA-4548)
 + * new metrics (CASSANDRA-4009)
 + * redesign KEYS indexes to avoid read-before-write (CASSANDRA-2897)
 + * debug tracing (CASSANDRA-1123)
 + * parallelize row cache loading (CASSANDRA-4282)
 + * Make compaction, flush JBOD-aware (CASSANDRA-4292)
 + * run local range scans on the read stage (CASSANDRA-3687)
 + * clean up ioexceptions (CASSANDRA-2116)
 + * add disk_failure_policy (CASSANDRA-2118)
 + * Introduce new json format with row level deletion (CASSANDRA-4054)
 + * remove redundant name column from schema_keyspaces (CASSANDRA-4433)
 + * improve nodetool ring handling of multi-dc clusters (CASSANDRA-3047)
 + * update NTS calculateNaturalEndpoints to be O(N log N) (CASSANDRA-3881)
 + * add UseCondCardMark XX jvm settings on jdk 1.7 (CASSANDRA-4366)
 + * split up rpc timeout by operation type (CASSANDRA-2819)
 + * rewrite key cache save/load to use only sequential i/o (CASSANDRA-3762)
 + * update MS protocol with a version handshake + broadcast address id
 +   (CASSANDRA-4311)
 + * multithreaded hint replay (CASSANDRA-4189)
 + * add inter-node message compression (CASSANDRA-3127)
 + * remove COPP (CASSANDRA-2479)
 + * Track tombstone expiration and compact when tombstone content is
 +   higher than a configurable threshold, default 20% (CASSANDRA-3442, 4234)
 + * update MurmurHash to version 3 (CASSANDRA-2975)
 + * (CLI) track elapsed time for `delete' operation (CASSANDRA-4060)
 + * (CLI) jline version is bumped to 1.0 to properly  support
 +   'delete' key function (CASSANDRA-4132)
 + * Save IndexSummary into new SSTable 'Summary' component (CASSANDRA-2392, 
4289)
 + * Add support for range tombstones (CASSANDRA-3708)
 + * Improve MessagingService efficiency (CASSANDRA-3617)
 + * Avoid ID conflicts from concurrent schema changes (CASSANDRA-3794)
 + * Set thrift HSHA server thread limit to unlimited by default 
(CASSANDRA-4277)
 + * Avoids double serialization of CF id in RowMutation messages
 +   (CASSANDRA-4293)
 + * stream compressed sstables directly with java nio (CASSANDRA-4297)
 + * Support multiple ranges in SliceQueryFilter (CASSANDRA-3885)
 + * Add column metadata to system column families (CASSANDRA-4018)
 + * (cql3) Always use composite types by default (CASSANDRA-4329)
 + * (cql3) Add support for set, map and list (CASSANDRA-3647)
 + * Validate date type correctly (CASSANDRA-4441)
 + * (cql3) Allow definitions with only a PK (CASSANDRA-4361)
 + * (cql3) Add support for row key composites (CASSANDRA-4179)
 + * improve DynamicEndpointSnitch by using reservoir sampling (CASSANDRA-4038)
 + * (cql3) Add support for 2ndary indexes (CASSANDRA-3680)
 + * (cql3) fix defining more than one PK to be invalid (CASSANDRA-4477)
 + * remove schema agreement checking from all external APIs (Thrift, CQL and 
CQL3) (CASSANDRA-4487)
 + * add Murmur3Partitioner and make it default for new installations 
(CASSANDRA-3772)
 + * (cql3) update pseudo-map syntax to use map syntax (CASSANDRA-4497)
 +
 +
  1.1.5
+  * use millis + atomicint for commitlog segment creation instead of
+nanotime, which has issues under some hypervisors (CASSANDRA-4601)
   * fix FD leak in slice queries (CASSANDRA-4571)
   * avoid recursion in leveled compaction (CASSANDRA-4587)
   * increase stack size under Java7 to 180K

http://git-wip-us.apache.org/repos/asf/cassandra/blob/6b29ab70/src/java/org/apache/cassandra/db/commitlog/CommitLogArchiver.java
--
diff --cc src/java/org/apache/cassandra/db/commitlog/CommitLogArchiver.java
index b109db5,fe66369..c0732db
--- a/src/java/org/apache/cassandra/db/commitlog/CommitLogArchiver.java
+++ 

[jira] [Updated] (CASSANDRA-4421) Support cql3 table definitions in Hadoop InputFormat

2012-09-04 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis updated CASSANDRA-4421:
--

Fix Version/s: (was: 1.1.5)
   1.2.1

 Support cql3 table definitions in Hadoop InputFormat
 

 Key: CASSANDRA-4421
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4421
 Project: Cassandra
  Issue Type: Improvement
  Components: API
Affects Versions: 1.1.0
 Environment: Debian Squeeze
Reporter: bert Passek
Assignee: Sylvain Lebresne
  Labels: cql3
 Fix For: 1.2.1


 Hello,
 i faced a bug while writing composite column values and following validation 
 on server side.
 This is the setup for reproduction:
 1. create a keyspace
 create keyspace test with strategy_class = 'SimpleStrategy' and 
 strategy_options:replication_factor = 1;
 2. create a cf via cql (3.0)
 create table test1 (
 a int,
 b int,
 c int,
 primary key (a, b)
 );
 If i have a look at the schema in cli i noticed that there is no column 
 metadata for columns not part of primary key.
 create column family test1
   with column_type = 'Standard'
   and comparator = 
 'CompositeType(org.apache.cassandra.db.marshal.Int32Type,org.apache.cassandra.db.marshal.UTF8Type)'
   and default_validation_class = 'UTF8Type'
   and key_validation_class = 'Int32Type'
   and read_repair_chance = 0.1
   and dclocal_read_repair_chance = 0.0
   and gc_grace = 864000
   and min_compaction_threshold = 4
   and max_compaction_threshold = 32
   and replicate_on_write = true
   and compaction_strategy = 
 'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy'
   and caching = 'KEYS_ONLY'
   and compression_options = {'sstable_compression' : 
 'org.apache.cassandra.io.compress.SnappyCompressor'};
 Please notice the default validation class: UTF8Type
 Now i would like to insert value  127 via cassandra client (no cql, part of 
 mr-jobs). Have a look at the attachement.
 Batch mutate fails:
 InvalidRequestException(why:(String didn't validate.) [test][test1][1:c] 
 failed validation)
 A validator for column value is fetched in 
 ThriftValidation::validateColumnData which returns always the default 
 validator which is UTF8Type as described above (The ColumnDefinition for 
 given column name c is always null)
 In UTF8Type there is a check for
 if (b  127)
return false;
 Anyway, maybe i'm doing something wrong, but i used cql 3.0 for table 
 creation. I assigned data types to all columns, but i can not set values for 
 a composite column because the default validation class is used.
 I think the schema should know the correct validator even for composite 
 columns. The usage of the default validation class does not make sense.
 Best Regards 
 Bert Passek

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (CASSANDRA-4601) Ensure unique commit log file names

2012-09-04 Thread Aaron Morton (JIRA)

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

Aaron Morton commented on CASSANDRA-4601:
-

Thanks

 Ensure unique commit log file names
 ---

 Key: CASSANDRA-4601
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4601
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Affects Versions: 1.1.0
 Environment: Sun JVM 1.6.33 / Ubuntu 10.04.4 LTS 
Reporter: Aaron Morton
Assignee: Aaron Morton
Priority: Critical
 Fix For: 1.1.5

 Attachments: cassandra-1.1-4601.patch


 The commit log segment name uses System.nanoTime() as part of the file name. 
 There is no guarantee that successive calls to nanoTime() will return 
 different values. And on less than optimal hypervisors this happens a lot. 
 I observed the following in the wild:
 {code:java}
 ERROR [COMMIT-LOG-ALLOCATOR] 2012-08-31 15:56:49,815 
 AbstractCassandraDaemon.java (line 134) Exception in thread 
 Thread[COMMIT-LOG-ALLOCATOR,5,main]
 java.lang.AssertionError: attempted to delete non-existing file 
 CommitLog-13926764209796414.log
 at 
 org.apache.cassandra.io.util.FileUtils.deleteWithConfirm(FileUtils.java:68)
 at 
 org.apache.cassandra.db.commitlog.CommitLogSegment.discard(CommitLogSegment.java:172)
 at 
 org.apache.cassandra.db.commitlog.CommitLogAllocator$4.run(CommitLogAllocator.java:223)
 at 
 org.apache.cassandra.db.commitlog.CommitLogAllocator$1.runMayThrow(CommitLogAllocator.java:95)
 at 
 org.apache.cassandra.utils.WrappedRunnable.run(WrappedRunnable.java:30)
 at java.lang.Thread.run(Unknown Source)
 {code}
 My _assumption_ is that it was because of duplicate file names. As this is on 
 a hypervisor that is less than optimal. 
  
 After a while (about 30 minutes) mutations stopped being processed and the 
 pending count sky rocketed. I _think_ this was because log writing was 
 blocked trying to get a new segment and writers could not submit to the 
 commit log queue. The only way to stop the affected nodes was kill -9. 
 Over about 24 hours this happened 5 times. I have deployed a patch that has 
 been running for 12 hours without incident, will attach. 
 The affected nodes could still read, and I'm checking logs to see how the 
 other nodes handled the situation.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Reopened] (CASSANDRA-4383) Binary encoding of vnode tokens

2012-09-04 Thread Eric Evans (JIRA)

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

Eric Evans reopened CASSANDRA-4383:
---


I'm seeing these:

{noformat}
java.lang.NullPointerException
at org.apache.cassandra.utils.UUIDGen.decompose(UUIDGen.java:120)
at 
org.apache.cassandra.db.HintedHandOffManager.deliverHintsToEndpointInternal(HintedHandOffManager.java:304)
at 
org.apache.cassandra.db.HintedHandOffManager.deliverHintsToEndpoint(HintedHandOffManager.java:250)
at 
org.apache.cassandra.db.HintedHandOffManager.access$400(HintedHandOffManager.java:87)
at 
org.apache.cassandra.db.HintedHandOffManager$4.runMayThrow(HintedHandOffManager.java:433)
at 
org.apache.cassandra.utils.WrappedRunnable.run(WrappedRunnable.java:28)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
{noformat}

... and some of these:

{noformat}
java.lang.NullPointerException
at 
org.apache.cassandra.service.StorageService.getApplicationStateValue(StorageService.java:1117)
at 
org.apache.cassandra.service.StorageService.getTokensFor(StorageService.java:1125)
at 
org.apache.cassandra.service.StorageService.handleStateNormal(StorageService.java:1196)
at 
org.apache.cassandra.service.StorageService.onChange(StorageService.java:1103)
at org.apache.cassandra.gms.Gossiper.doNotifications(Gossiper.java:915)
at org.apache.cassandra.gms.Gossiper.applyNewStates(Gossiper.java:906)
at 
org.apache.cassandra.gms.Gossiper.applyStateLocally(Gossiper.java:868)
at 
org.apache.cassandra.gms.GossipDigestAck2VerbHandler.doVerb(GossipDigestAck2VerbHandler.java:43)
at 
org.apache.cassandra.net.MessageDeliveryTask.run(MessageDeliveryTask.java:55)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
{noformat}

In both cases it looks like an event is firing before HOST_ID or TOKENS 
respectively are being set.

To reproduce I use ccm to run a 3 node cluster, replication factor 2.  I load 
about 70k rows at CL = ONE, read them back at CL = ALL, and then restart all of 
the nodes.

 Binary encoding of vnode tokens
 ---

 Key: CASSANDRA-4383
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4383
 Project: Cassandra
  Issue Type: Sub-task
Reporter: Brandon Williams
Assignee: Brandon Williams
 Fix For: 1.2.0 beta 1

 Attachments: 
 0001-Add-HOST_ID-and-TOKENS-app-states-binary-serialization.txt, 
 0002-Fix-tests.txt


 Since after CASSANDRA-4317 we can know which version a remote node is using 
 (that is, whether it is vnode-aware or not) this a good opportunity to change 
 the token encoding to binary, since with a default of 256 tokens per node 
 even a fixed-length 16 byte encoding per token provides a great deal of 
 savings in gossip traffic over a text representation.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Resolved] (CASSANDRA-4383) Binary encoding of vnode tokens

2012-09-04 Thread Brandon Williams (JIRA)

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

Brandon Williams resolved CASSANDRA-4383.
-

Resolution: Fixed

This is actually CASSANDRA-4384.  It does not repro without hints.

 Binary encoding of vnode tokens
 ---

 Key: CASSANDRA-4383
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4383
 Project: Cassandra
  Issue Type: Sub-task
Reporter: Brandon Williams
Assignee: Brandon Williams
 Fix For: 1.2.0 beta 1

 Attachments: 
 0001-Add-HOST_ID-and-TOKENS-app-states-binary-serialization.txt, 
 0002-Fix-tests.txt


 Since after CASSANDRA-4317 we can know which version a remote node is using 
 (that is, whether it is vnode-aware or not) this a good opportunity to change 
 the token encoding to binary, since with a default of 256 tokens per node 
 even a fixed-length 16 byte encoding per token provides a great deal of 
 savings in gossip traffic over a text representation.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Created] (CASSANDRA-4615) cannot set log4j level on modules/classes

2012-09-04 Thread Brandon Williams (JIRA)
Brandon Williams created CASSANDRA-4615:
---

 Summary: cannot set log4j level on modules/classes
 Key: CASSANDRA-4615
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4615
 Project: Cassandra
  Issue Type: Bug
Affects Versions: 1.2.0 beta 1
Reporter: Brandon Williams
Priority: Minor


For example, setting log4j.logger.org.apache.cassandra.db=DEBUG in the config 
has no effect. Perhaps there is something else that needs to be set as well, 
but we should at least document that there.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (CASSANDRA-3564) flush before shutdown so restart is faster

2012-09-04 Thread Robert Coli (JIRA)

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

Robert Coli commented on CASSANDRA-3564:


 That sounds reasonable but I think we should have some kind of ceiling (10 
 minutes or something) where we kill -9 it, just in case we ever have a bug 
 that causes us not to exit (we've had them before), so we don't hang the 
 shutdown of the entire machine forever.
 ...
 Unless I'm missing something, you can't do anything about a kill -9, you're 
 cooked.

The trivial case of this is a node where the data directory has been marked 
read-only due to errors but the commitlog is on a different device which is 
still writable.

In the status quo, stopping such a node will not result in the sstable flush 
blocking forever. The node just stops. On restart it replays and 
(CASSANDRA-1967) these replayed memtables are then flushed. This results in the 
same flush blocking forever, but the node otherwise serves reads and can take 
writes until it OOMs. It also doesn't need to be sent a SIGKILL at any time.

If the node flushes on shutdown in such a way that it is effectively draining 
the node, then in order to avoid data loss you merely need to wait for the 
commitlog sync. The relevant thing seems to be that the *commitlog* is synced 
before you SIGKILL the node, not whether the *flush* succeeds or not. In 
practice, this window seems likely to be sized in a small number of seconds 
even with the most lenient commitlog flushing, and is therefore likely 
irrelevant.

However, with flush-on-shutdown you *have* to send the process SIGKILL in this 
case, because the flush can hang indefinitely. I get worried any time I *have* 
to send SIGKILL to a database, even if I understand logically that is it safe. 
Adding flush to the shutdown path seems to create a new case in which I *have* 
to do this uncomfortable thing.
 
 That is to say, with the status quo, if you want to flush before shutdown, 
 you call nodetool flush. Not a big deal. But if we made it 
 flush-everything-by-default then to make it NOT flush our options include.

I don't understand why calling nodetool flush/drain is not a big deal here, but 
is a big deal enough to special case shutdown when durable_writes is off in 
CASSANDRA-2958.

In my opinion, the sane default here is the pre-2958 status quo : no flushing 
on shutdown ever, including when durable_writes is off. Operators who want to 
drain nodes before stopping them can do so via nodetool.

 flush before shutdown so restart is faster
 --

 Key: CASSANDRA-3564
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3564
 Project: Cassandra
  Issue Type: New Feature
  Components: Packaging
Reporter: Jonathan Ellis
Assignee: Brandon Williams
Priority: Minor
 Fix For: 1.2.0

 Attachments: 3564.patch, 3564.patch


 Cassandra handles flush in its shutdown hook for durable_writes=false CFs 
 (otherwise we're *guaranteed* to lose data) but leaves it up to the operator 
 otherwise.  I'd rather leave it that way to offer these semantics:
 - cassandra stop = shutdown nicely [explicit flush, then kill -int]
 - kill -INT = shutdown faster but don't lose any updates [current behavior]
 - kill -KILL = lose most recent writes unless durable_writes=true and batch 
 commits are on [also current behavior]
 But if it's not reasonable to use nodetool from the init script then I guess 
 we can just make the shutdown hook flush everything.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


git commit: fix broken system.schema_* timestamps on system startup patch by Pavel Yaskevich; reviewed by Jonathan Ellis for CASSANDRA-4561

2012-09-04 Thread xedin
Updated Branches:
  refs/heads/cassandra-1.1 5df7b2512 - 846b14019


fix broken system.schema_* timestamps on system startup
patch by Pavel Yaskevich; reviewed by Jonathan Ellis for CASSANDRA-4561


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

Branch: refs/heads/cassandra-1.1
Commit: 846b14019de484e9bf36e8907c48d3518f09e32f
Parents: 5df7b25
Author: Pavel Yaskevich xe...@apache.org
Authored: Wed Aug 29 14:12:03 2012 +0300
Committer: Pavel Yaskevich xe...@apache.org
Committed: Wed Sep 5 00:15:43 2012 +0300

--
 CHANGES.txt   |1 +
 src/java/org/apache/cassandra/db/DefsTable.java   |   77 +++-
 src/java/org/apache/cassandra/db/SystemTable.java |1 +
 3 files changed, 78 insertions(+), 1 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/846b1401/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 6125c9c..75e856c 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -7,6 +7,7 @@
  * Log(info) schema changes (CASSANDRA-4547)
  * Change nodetool setcachecapcity to manipulate global caches (CASSANDRA-4563)
  * (cql3) fix setting compaction strategy (CASSANDRA-4597)
+ * fix broken system.schema_* timestamps on system startup (CASSANDRA-4561)
 Merged from 1.0:
  * increase Xss to 160k to accomodate latest 1.6 JVMs (CASSANDRA-4602)
  * fix toString of hint destination tokens (CASSANDRA-4568)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/846b1401/src/java/org/apache/cassandra/db/DefsTable.java
--
diff --git a/src/java/org/apache/cassandra/db/DefsTable.java 
b/src/java/org/apache/cassandra/db/DefsTable.java
index 93f9867..2e4e5d3 100644
--- a/src/java/org/apache/cassandra/db/DefsTable.java
+++ b/src/java/org/apache/cassandra/db/DefsTable.java
@@ -21,6 +21,7 @@ package org.apache.cassandra.db;
 import java.io.IOException;
 import java.nio.ByteBuffer;
 import java.util.*;
+import java.util.concurrent.ExecutionException;
 import java.util.concurrent.Future;
 
 import org.slf4j.Logger;
@@ -152,7 +153,7 @@ public class DefsTable
 
 for (Row row : serializedSchema)
 {
-if (row.cf == null || (row.cf.isMarkedForDelete()  
row.cf.isEmpty()))
+if (invalidSchemaRow(row))
 continue;
 
 keyspaces.add(KSMetaData.fromSchema(row, 
serializedColumnFamilies(row.key)));
@@ -161,6 +162,80 @@ public class DefsTable
 return keyspaces;
 }
 
+public static void fixSchemaNanoTimestamps() throws IOException
+{
+fixSchemaNanoTimestamp(SystemTable.SCHEMA_KEYSPACES_CF);
+fixSchemaNanoTimestamp(SystemTable.SCHEMA_COLUMNFAMILIES_CF);
+fixSchemaNanoTimestamp(SystemTable.SCHEMA_COLUMNS_CF);
+}
+
+private static void fixSchemaNanoTimestamp(String columnFamily) throws 
IOException
+{
+ColumnFamilyStore cfs = 
Table.open(Table.SYSTEM_TABLE).getColumnFamilyStore(columnFamily);
+
+boolean needsCleanup = false;
+long timestamp = FBUtilities.timestampMicros();
+
+ListRow rows = SystemTable.serializedSchema(columnFamily);
+
+row_check_loop:
+for (Row row : rows)
+{
+if (invalidSchemaRow(row))
+continue;
+
+for (IColumn column : row.cf.columns)
+{
+if (column.timestamp()  timestamp)
+{
+needsCleanup = true;
+// exit the loop on first found timestamp mismatch as we 
know that it
+// wouldn't be only one column/row that we would have to 
fix anyway
+break row_check_loop;
+}
+}
+}
+
+if (!needsCleanup)
+return;
+
+logger.info(Fixing timestamps of schema ColumnFamily  + columnFamily 
+ ...);
+
+try
+{
+cfs.truncate().get();
+}
+catch (ExecutionException e)
+{
+throw new RuntimeException(e);
+}
+catch (InterruptedException e)
+{
+throw new AssertionError(e);
+}
+
+for (Row row : rows)
+{
+if (invalidSchemaRow(row))
+continue;
+
+RowMutation mutation = new RowMutation(Table.SYSTEM_TABLE, 
row.key.key);
+
+for (IColumn column : row.cf.columns)
+{
+if (column.isLive())
+mutation.add(new QueryPath(columnFamily, null, 
column.name()), column.value(), timestamp);
+  

[jira] [Assigned] (CASSANDRA-4615) cannot set log4j level on modules/classes

2012-09-04 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis reassigned CASSANDRA-4615:
-

Assignee: David Alves

Any ideas, David?

 cannot set log4j level on modules/classes
 -

 Key: CASSANDRA-4615
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4615
 Project: Cassandra
  Issue Type: Bug
Affects Versions: 1.2.0 beta 1
Reporter: Brandon Williams
Assignee: David Alves
Priority: Minor

 For example, setting log4j.logger.org.apache.cassandra.db=DEBUG in the config 
 has no effect. Perhaps there is something else that needs to be set as well, 
 but we should at least document that there.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[2/3] git commit: merge from 1.1

2012-09-04 Thread xedin
merge from 1.1


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

Branch: refs/heads/trunk
Commit: d90eaf5b05a98ad090746424dcd507a915c55ca9
Parents: 6b29ab7 846b140
Author: Pavel Yaskevich xe...@apache.org
Authored: Wed Sep 5 00:17:00 2012 +0300
Committer: Pavel Yaskevich xe...@apache.org
Committed: Wed Sep 5 00:17:00 2012 +0300

--
 CHANGES.txt   |1 +
 src/java/org/apache/cassandra/db/DefsTable.java   |   77 +++-
 src/java/org/apache/cassandra/db/SystemTable.java |1 +
 3 files changed, 78 insertions(+), 1 deletions(-)
--


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

http://git-wip-us.apache.org/repos/asf/cassandra/blob/d90eaf5b/src/java/org/apache/cassandra/db/DefsTable.java
--

http://git-wip-us.apache.org/repos/asf/cassandra/blob/d90eaf5b/src/java/org/apache/cassandra/db/SystemTable.java
--
diff --cc src/java/org/apache/cassandra/db/SystemTable.java
index 23d9269,3256b91..cd64d2c
--- a/src/java/org/apache/cassandra/db/SystemTable.java
+++ b/src/java/org/apache/cassandra/db/SystemTable.java
@@@ -86,62 -83,66 +86,63 @@@ public class SystemTabl
  
  public static void finishStartup() throws IOException
  {
+ DefsTable.fixSchemaNanoTimestamps();
  setupVersion();
 -purgeIncompatibleHints();
 +try
 +{
 +upgradeSystemData();
 +}
 +catch (ExecutionException e)
 +{
 +throw new RuntimeException(e);
 +}
 +catch (InterruptedException e)
 +{
 +throw new RuntimeException(e);
 +}
  }
  
 -private static void setupVersion() throws IOException
 +private static void setupVersion()
  {
 -RowMutation rm;
 -ColumnFamily cf;
 -
 -rm = new RowMutation(Table.SYSTEM_TABLE, 
ByteBufferUtil.bytes(build));
 -cf = ColumnFamily.create(Table.SYSTEM_TABLE, VERSION_CF);
 -cf.addColumn(new Column(ByteBufferUtil.bytes(version), 
ByteBufferUtil.bytes(FBUtilities.getReleaseVersionString()), 
FBUtilities.timestampMicros()));
 -rm.add(cf);
 -rm.apply();
 -
 -rm = new RowMutation(Table.SYSTEM_TABLE, ByteBufferUtil.bytes(cql));
 -cf = ColumnFamily.create(Table.SYSTEM_TABLE, VERSION_CF);
 -cf.addColumn(new Column(ByteBufferUtil.bytes(version), 
ByteBufferUtil.bytes(QueryProcessor.CQL_VERSION.toString()), 
FBUtilities.timestampMicros()));
 -rm.add(cf);
 -rm.apply();
 -
 -rm = new RowMutation(Table.SYSTEM_TABLE, 
ByteBufferUtil.bytes(thrift));
 -cf = ColumnFamily.create(Table.SYSTEM_TABLE, VERSION_CF);
 -cf.addColumn(new Column(ByteBufferUtil.bytes(version), 
ByteBufferUtil.bytes(Constants.VERSION), FBUtilities.timestampMicros()));
 -rm.add(cf);
 -rm.apply();
 +String req = INSERT INTO system.%s (key, release_version, 
cql_version, thrift_version) VALUES ('%s', '%s', '%s', '%s');
 +processInternal(String.format(req, LOCAL_CF,
 + LOCAL_KEY,
 + 
FBUtilities.getReleaseVersionString(),
 + 
QueryProcessor.CQL_VERSION.toString(),
 + Constants.VERSION));
  }
  
 -/** if hints become incompatible across versions of cassandra, that logic 
(and associated purging) is managed here. */
 -private static void purgeIncompatibleHints() throws IOException
 +/** if system data becomes incompatible across versions of cassandra, 
that logic (and associated purging) is managed here */
 +private static void upgradeSystemData() throws IOException, 
ExecutionException, InterruptedException
  {
 -ByteBuffer upgradeMarker = ByteBufferUtil.bytes(Pre-1.0 hints 
purged);
 -Table table = Table.open(Table.SYSTEM_TABLE);
 -QueryFilter filter = QueryFilter.getNamesFilter(decorate(COOKIE_KEY), 
new QueryPath(STATUS_CF), upgradeMarker);
 -ColumnFamily cf = 
table.getColumnFamilyStore(STATUS_CF).getColumnFamily(filter);
 -if (cf != null)
 +Table table = Table.open(Table.SYSTEM_KS);
 +ColumnFamilyStore oldStatusCfs = 
table.getColumnFamilyStore(OLD_STATUS_CF);
 +if (oldStatusCfs.getSSTables().size()  0)
  {
 -logger.debug(Pre-1.0 hints already purged);
 -

[1/3] git commit: change SYSTEM_TABLE to SYSTEM_KS related to CASSANDRA-4561 merge

2012-09-04 Thread xedin
Updated Branches:
  refs/heads/trunk 6b29ab709 - cf23bd0a0


change SYSTEM_TABLE to SYSTEM_KS related to CASSANDRA-4561 merge


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

Branch: refs/heads/trunk
Commit: cf23bd0a0fd192d991e971bcae94c2447126f873
Parents: d90eaf5
Author: Pavel Yaskevich xe...@apache.org
Authored: Wed Sep 5 00:22:19 2012 +0300
Committer: Pavel Yaskevich xe...@apache.org
Committed: Wed Sep 5 00:22:19 2012 +0300

--
 src/java/org/apache/cassandra/db/DefsTable.java |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/cf23bd0a/src/java/org/apache/cassandra/db/DefsTable.java
--
diff --git a/src/java/org/apache/cassandra/db/DefsTable.java 
b/src/java/org/apache/cassandra/db/DefsTable.java
index a9fac36..0c296e6 100644
--- a/src/java/org/apache/cassandra/db/DefsTable.java
+++ b/src/java/org/apache/cassandra/db/DefsTable.java
@@ -166,7 +166,7 @@ public class DefsTable
 
 private static void fixSchemaNanoTimestamp(String columnFamily) throws 
IOException
 {
-ColumnFamilyStore cfs = 
Table.open(Table.SYSTEM_TABLE).getColumnFamilyStore(columnFamily);
+ColumnFamilyStore cfs = 
Table.open(Table.SYSTEM_KS).getColumnFamilyStore(columnFamily);
 
 boolean needsCleanup = false;
 long timestamp = FBUtilities.timestampMicros();
@@ -214,7 +214,7 @@ public class DefsTable
 if (invalidSchemaRow(row))
 continue;
 
-RowMutation mutation = new RowMutation(Table.SYSTEM_TABLE, 
row.key.key);
+RowMutation mutation = new RowMutation(Table.SYSTEM_KS, 
row.key.key);
 
 for (IColumn column : row.cf.columns)
 {



[3/3] git commit: fix broken system.schema_* timestamps on system startup patch by Pavel Yaskevich; reviewed by Jonathan Ellis for CASSANDRA-4561

2012-09-04 Thread xedin
fix broken system.schema_* timestamps on system startup
patch by Pavel Yaskevich; reviewed by Jonathan Ellis for CASSANDRA-4561


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

Branch: refs/heads/trunk
Commit: 846b14019de484e9bf36e8907c48d3518f09e32f
Parents: 5df7b25
Author: Pavel Yaskevich xe...@apache.org
Authored: Wed Aug 29 14:12:03 2012 +0300
Committer: Pavel Yaskevich xe...@apache.org
Committed: Wed Sep 5 00:15:43 2012 +0300

--
 CHANGES.txt   |1 +
 src/java/org/apache/cassandra/db/DefsTable.java   |   77 +++-
 src/java/org/apache/cassandra/db/SystemTable.java |1 +
 3 files changed, 78 insertions(+), 1 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/846b1401/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 6125c9c..75e856c 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -7,6 +7,7 @@
  * Log(info) schema changes (CASSANDRA-4547)
  * Change nodetool setcachecapcity to manipulate global caches (CASSANDRA-4563)
  * (cql3) fix setting compaction strategy (CASSANDRA-4597)
+ * fix broken system.schema_* timestamps on system startup (CASSANDRA-4561)
 Merged from 1.0:
  * increase Xss to 160k to accomodate latest 1.6 JVMs (CASSANDRA-4602)
  * fix toString of hint destination tokens (CASSANDRA-4568)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/846b1401/src/java/org/apache/cassandra/db/DefsTable.java
--
diff --git a/src/java/org/apache/cassandra/db/DefsTable.java 
b/src/java/org/apache/cassandra/db/DefsTable.java
index 93f9867..2e4e5d3 100644
--- a/src/java/org/apache/cassandra/db/DefsTable.java
+++ b/src/java/org/apache/cassandra/db/DefsTable.java
@@ -21,6 +21,7 @@ package org.apache.cassandra.db;
 import java.io.IOException;
 import java.nio.ByteBuffer;
 import java.util.*;
+import java.util.concurrent.ExecutionException;
 import java.util.concurrent.Future;
 
 import org.slf4j.Logger;
@@ -152,7 +153,7 @@ public class DefsTable
 
 for (Row row : serializedSchema)
 {
-if (row.cf == null || (row.cf.isMarkedForDelete()  
row.cf.isEmpty()))
+if (invalidSchemaRow(row))
 continue;
 
 keyspaces.add(KSMetaData.fromSchema(row, 
serializedColumnFamilies(row.key)));
@@ -161,6 +162,80 @@ public class DefsTable
 return keyspaces;
 }
 
+public static void fixSchemaNanoTimestamps() throws IOException
+{
+fixSchemaNanoTimestamp(SystemTable.SCHEMA_KEYSPACES_CF);
+fixSchemaNanoTimestamp(SystemTable.SCHEMA_COLUMNFAMILIES_CF);
+fixSchemaNanoTimestamp(SystemTable.SCHEMA_COLUMNS_CF);
+}
+
+private static void fixSchemaNanoTimestamp(String columnFamily) throws 
IOException
+{
+ColumnFamilyStore cfs = 
Table.open(Table.SYSTEM_TABLE).getColumnFamilyStore(columnFamily);
+
+boolean needsCleanup = false;
+long timestamp = FBUtilities.timestampMicros();
+
+ListRow rows = SystemTable.serializedSchema(columnFamily);
+
+row_check_loop:
+for (Row row : rows)
+{
+if (invalidSchemaRow(row))
+continue;
+
+for (IColumn column : row.cf.columns)
+{
+if (column.timestamp()  timestamp)
+{
+needsCleanup = true;
+// exit the loop on first found timestamp mismatch as we 
know that it
+// wouldn't be only one column/row that we would have to 
fix anyway
+break row_check_loop;
+}
+}
+}
+
+if (!needsCleanup)
+return;
+
+logger.info(Fixing timestamps of schema ColumnFamily  + columnFamily 
+ ...);
+
+try
+{
+cfs.truncate().get();
+}
+catch (ExecutionException e)
+{
+throw new RuntimeException(e);
+}
+catch (InterruptedException e)
+{
+throw new AssertionError(e);
+}
+
+for (Row row : rows)
+{
+if (invalidSchemaRow(row))
+continue;
+
+RowMutation mutation = new RowMutation(Table.SYSTEM_TABLE, 
row.key.key);
+
+for (IColumn column : row.cf.columns)
+{
+if (column.isLive())
+mutation.add(new QueryPath(columnFamily, null, 
column.name()), column.value(), timestamp);
+}
+
+mutation.apply();
+}
+}
+
+private static 

[jira] [Created] (CASSANDRA-4616) add test to make sure KEYS indexes handle row deletions

2012-09-04 Thread Jonathan Ellis (JIRA)
Jonathan Ellis created CASSANDRA-4616:
-

 Summary: add test to make sure KEYS indexes handle row deletions
 Key: CASSANDRA-4616
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4616
 Project: Cassandra
  Issue Type: Test
Affects Versions: 1.2.0 beta 1
Reporter: Jonathan Ellis
Assignee: Sam Tunnicliffe
 Fix For: 1.2.0


pretty sure we lost this in the refactoring we did for CASSANDRA-2897

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (CASSANDRA-4559) implement token relocation

2012-09-04 Thread Eric Evans (JIRA)

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

Eric Evans commented on CASSANDRA-4559:
---

Since this is a freeze-dependency, let me provide a bit of a status update:

These patches seemed mostly stable prior to merging w/ trunk after 
CASSANDRA-4383 landed.  I don't know if the problems since are the result of a 
faulty merge, a problem with what was committed for CASSANDRA-4383, or 
something else entirely (I'm still looking into it).

I say mostly stable because occasionally one node would seem to miss the 
{{NORMAL}} sent by the destination node after a successful relocation, and so 
that nodes idea of the state of the ring would differ from the rest of the 
cluster.  I'm still looking into this, or I will be after sorting out the new 
spate of issues (see above).

Most of the challenges here have related to network concurrency, so if wish to 
test, you really need to use the shuffle utility in order to set more than one 
in motion at once.  The shuffle tool isn't quite done yet either, but (if 
interested )you can checkout at 
https://github.com/acunu/cassandra/tree/p/4443/060_shuffle_utility (which 
includes the token relocation).

 implement token relocation
 --

 Key: CASSANDRA-4559
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4559
 Project: Cassandra
  Issue Type: Sub-task
  Components: Core, Tools
Affects Versions: 1.2.0 beta 1
Reporter: Eric Evans
Assignee: Eric Evans
  Labels: vnodes
 Fix For: 1.2.0 beta 1


 Whatever the specifics of a _shuffle_ (see CASSANDRA-4443), it will be 
 necessary to relocate a range from one node to another.
 _Edit0: Linked in new patch containing tests._
 
 h3. Patches
 ||Compare||Raw diff||Description||
 |[010_refactor_range_move|https://github.com/acunu/cassandra/compare/top-bases/p/4443/010_refactor_range_move...p/4443/010_refactor_range_move]|[010_refactor_range_move.patch|https://github.com/acunu/cassandra/compare/top-bases/p/4443/010_refactor_range_move...p/4443/010_refactor_range_move.diff]|No
  Description|
 |[020_calculate_pending|https://github.com/acunu/cassandra/compare/top-bases/p/4443/020_calculate_pending...p/4443/020_calculate_pending]|[020_calculate_pending.patch|https://github.com/acunu/cassandra/compare/top-bases/p/4443/020_calculate_pending...p/4443/020_calculate_pending.diff]|No
  Description|
 |[030_relocate_token|https://github.com/acunu/cassandra/compare/top-bases/p/4443/030_relocate_token...p/4443/030_relocate_token]|[030_relocate_token.patch|https://github.com/acunu/cassandra/compare/top-bases/p/4443/030_relocate_token...p/4443/030_relocate_token.diff]|No
  Description|
 |[040_tests|https://github.com/acunu/cassandra/compare/top-bases/p/4443/040_tests...p/4443/040_tests]|[040_tests.patch|https://github.com/acunu/cassandra/compare/top-bases/p/4443/040_tests...p/4443/040_tests.diff]|No
  Description|
 
 _Note: These are branches managed with TopGit. If you are applying the patch 
 output manually, you will either need to filter the TopGit metadata files 
 (i.e. {{wget -O - url | filterdiff -x*.topdeps -x*.topmsg | patch -p1}}), 
 or remove them afterward ({{rm .topmsg .topdeps}})._

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Comment Edited] (CASSANDRA-4559) implement token relocation

2012-09-04 Thread Eric Evans (JIRA)

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

Eric Evans edited comment on CASSANDRA-4559 at 9/5/12 8:59 AM:
---

Since this is a freeze-dependency, let me provide a bit of a status update:

These patches seemed mostly stable prior to merging w/ trunk after 
CASSANDRA-4383 landed.  I don't know if the problems since are the result of a 
faulty merge, a problem with what was committed for CASSANDRA-4383, or 
something else entirely (I'm still looking into it).

I say mostly stable because occasionally one node would seem to miss the 
{{NORMAL}} sent by the destination node after a successful relocation, and so 
that nodes idea of the state of the ring would differ from the rest of the 
cluster.  I'm still looking into this, or I will be after sorting out the new 
spate of issues (see above).

Most of the challenges here have related to network concurrency, so you if wish 
to test, you really need to use the shuffle utility in order to set more than 
one in motion at once.  The shuffle tool isn't quite done yet either, but (if 
interested )you can checkout at 
https://github.com/acunu/cassandra/tree/p/4443/060_shuffle_utility (which 
includes the token relocation).

  was (Author: urandom):
Since this is a freeze-dependency, let me provide a bit of a status update:

These patches seemed mostly stable prior to merging w/ trunk after 
CASSANDRA-4383 landed.  I don't know if the problems since are the result of a 
faulty merge, a problem with what was committed for CASSANDRA-4383, or 
something else entirely (I'm still looking into it).

I say mostly stable because occasionally one node would seem to miss the 
{{NORMAL}} sent by the destination node after a successful relocation, and so 
that nodes idea of the state of the ring would differ from the rest of the 
cluster.  I'm still looking into this, or I will be after sorting out the new 
spate of issues (see above).

Most of the challenges here have related to network concurrency, so if wish to 
test, you really need to use the shuffle utility in order to set more than one 
in motion at once.  The shuffle tool isn't quite done yet either, but (if 
interested )you can checkout at 
https://github.com/acunu/cassandra/tree/p/4443/060_shuffle_utility (which 
includes the token relocation).
  
 implement token relocation
 --

 Key: CASSANDRA-4559
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4559
 Project: Cassandra
  Issue Type: Sub-task
  Components: Core, Tools
Affects Versions: 1.2.0 beta 1
Reporter: Eric Evans
Assignee: Eric Evans
  Labels: vnodes
 Fix For: 1.2.0 beta 1


 Whatever the specifics of a _shuffle_ (see CASSANDRA-4443), it will be 
 necessary to relocate a range from one node to another.
 _Edit0: Linked in new patch containing tests._
 
 h3. Patches
 ||Compare||Raw diff||Description||
 |[010_refactor_range_move|https://github.com/acunu/cassandra/compare/top-bases/p/4443/010_refactor_range_move...p/4443/010_refactor_range_move]|[010_refactor_range_move.patch|https://github.com/acunu/cassandra/compare/top-bases/p/4443/010_refactor_range_move...p/4443/010_refactor_range_move.diff]|No
  Description|
 |[020_calculate_pending|https://github.com/acunu/cassandra/compare/top-bases/p/4443/020_calculate_pending...p/4443/020_calculate_pending]|[020_calculate_pending.patch|https://github.com/acunu/cassandra/compare/top-bases/p/4443/020_calculate_pending...p/4443/020_calculate_pending.diff]|No
  Description|
 |[030_relocate_token|https://github.com/acunu/cassandra/compare/top-bases/p/4443/030_relocate_token...p/4443/030_relocate_token]|[030_relocate_token.patch|https://github.com/acunu/cassandra/compare/top-bases/p/4443/030_relocate_token...p/4443/030_relocate_token.diff]|No
  Description|
 |[040_tests|https://github.com/acunu/cassandra/compare/top-bases/p/4443/040_tests...p/4443/040_tests]|[040_tests.patch|https://github.com/acunu/cassandra/compare/top-bases/p/4443/040_tests...p/4443/040_tests.diff]|No
  Description|
 
 _Note: These are branches managed with TopGit. If you are applying the patch 
 output manually, you will either need to filter the TopGit metadata files 
 (i.e. {{wget -O - url | filterdiff -x*.topdeps -x*.topmsg | patch -p1}}), 
 or remove them afterward ({{rm .topmsg .topdeps}})._

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Comment Edited] (CASSANDRA-4559) implement token relocation

2012-09-04 Thread Eric Evans (JIRA)

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

Eric Evans edited comment on CASSANDRA-4559 at 9/5/12 9:00 AM:
---

Since this is a freeze-dependency, let me provide a bit of a status update:

These patches seemed mostly stable prior to merging w/ trunk after 
CASSANDRA-4383 landed.  I don't know if the problems since are the result of a 
faulty merge, a problem with what was committed for CASSANDRA-4383, or 
something else entirely (I'm still looking into it).

I say mostly stable because occasionally one node would seem to miss the 
{{NORMAL}} sent by the destination node after a successful relocation, and so 
that nodes idea of the state of the ring would differ from the rest of the 
cluster.  I'm still looking into this, or I will be after sorting out the new 
spate of issues (see above).

Most of the challenges here have related to network concurrency, so if you wish 
to test, you really need to use the shuffle utility in order to set more than 
one in motion at once.  The shuffle tool isn't quite done yet either, but (if 
interested )you can checkout at 
https://github.com/acunu/cassandra/tree/p/4443/060_shuffle_utility (which 
includes the token relocation).

  was (Author: urandom):
Since this is a freeze-dependency, let me provide a bit of a status update:

These patches seemed mostly stable prior to merging w/ trunk after 
CASSANDRA-4383 landed.  I don't know if the problems since are the result of a 
faulty merge, a problem with what was committed for CASSANDRA-4383, or 
something else entirely (I'm still looking into it).

I say mostly stable because occasionally one node would seem to miss the 
{{NORMAL}} sent by the destination node after a successful relocation, and so 
that nodes idea of the state of the ring would differ from the rest of the 
cluster.  I'm still looking into this, or I will be after sorting out the new 
spate of issues (see above).

Most of the challenges here have related to network concurrency, so you if wish 
to test, you really need to use the shuffle utility in order to set more than 
one in motion at once.  The shuffle tool isn't quite done yet either, but (if 
interested )you can checkout at 
https://github.com/acunu/cassandra/tree/p/4443/060_shuffle_utility (which 
includes the token relocation).
  
 implement token relocation
 --

 Key: CASSANDRA-4559
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4559
 Project: Cassandra
  Issue Type: Sub-task
  Components: Core, Tools
Affects Versions: 1.2.0 beta 1
Reporter: Eric Evans
Assignee: Eric Evans
  Labels: vnodes
 Fix For: 1.2.0 beta 1


 Whatever the specifics of a _shuffle_ (see CASSANDRA-4443), it will be 
 necessary to relocate a range from one node to another.
 _Edit0: Linked in new patch containing tests._
 
 h3. Patches
 ||Compare||Raw diff||Description||
 |[010_refactor_range_move|https://github.com/acunu/cassandra/compare/top-bases/p/4443/010_refactor_range_move...p/4443/010_refactor_range_move]|[010_refactor_range_move.patch|https://github.com/acunu/cassandra/compare/top-bases/p/4443/010_refactor_range_move...p/4443/010_refactor_range_move.diff]|No
  Description|
 |[020_calculate_pending|https://github.com/acunu/cassandra/compare/top-bases/p/4443/020_calculate_pending...p/4443/020_calculate_pending]|[020_calculate_pending.patch|https://github.com/acunu/cassandra/compare/top-bases/p/4443/020_calculate_pending...p/4443/020_calculate_pending.diff]|No
  Description|
 |[030_relocate_token|https://github.com/acunu/cassandra/compare/top-bases/p/4443/030_relocate_token...p/4443/030_relocate_token]|[030_relocate_token.patch|https://github.com/acunu/cassandra/compare/top-bases/p/4443/030_relocate_token...p/4443/030_relocate_token.diff]|No
  Description|
 |[040_tests|https://github.com/acunu/cassandra/compare/top-bases/p/4443/040_tests...p/4443/040_tests]|[040_tests.patch|https://github.com/acunu/cassandra/compare/top-bases/p/4443/040_tests...p/4443/040_tests.diff]|No
  Description|
 
 _Note: These are branches managed with TopGit. If you are applying the patch 
 output manually, you will either need to filter the TopGit metadata files 
 (i.e. {{wget -O - url | filterdiff -x*.topdeps -x*.topmsg | patch -p1}}), 
 or remove them afterward ({{rm .topmsg .topdeps}})._

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Reopened] (CASSANDRA-4383) Binary encoding of vnode tokens

2012-09-04 Thread Brandon Williams (JIRA)

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

Brandon Williams reopened CASSANDRA-4383:
-


Ok, something is up with the second trace.  Debugging this is currently very 
painful with CASSANDRA-4615 in the way but I'll get it sorted.

 Binary encoding of vnode tokens
 ---

 Key: CASSANDRA-4383
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4383
 Project: Cassandra
  Issue Type: Sub-task
Reporter: Brandon Williams
Assignee: Brandon Williams
 Fix For: 1.2.0 beta 1

 Attachments: 
 0001-Add-HOST_ID-and-TOKENS-app-states-binary-serialization.txt, 
 0002-Fix-tests.txt


 Since after CASSANDRA-4317 we can know which version a remote node is using 
 (that is, whether it is vnode-aware or not) this a good opportunity to change 
 the token encoding to binary, since with a default of 256 tokens per node 
 even a fixed-length 16 byte encoding per token provides a great deal of 
 savings in gossip traffic over a text representation.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (CASSANDRA-4615) cannot set log4j level on modules/classes

2012-09-04 Thread David Alves (JIRA)

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

David Alves commented on CASSANDRA-4615:


The way it is setup right now, in order for tracing appender to be used in 
debug level, the root logger was set to DEBUG and the other appenders were set 
to INFO. This unfortunately has the side effect of not being able to lower only 
a particular logger to debug (because the root is already at debug).

The other strategy would be to have an alternative logger for tracing, but this 
cannot be done at the conf file level only, the actual instance of Logger would 
have to be a different one. I mean instead of Logger logger = 
LoggerFactory.getLogger(CassandraServer.class); we would have to use a 
particular one, like Logger logger = LoggerFactory.getLogger(tracing-logger);.

I chose the first one because it didn't mean changing code (just the conf file).

 cannot set log4j level on modules/classes
 -

 Key: CASSANDRA-4615
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4615
 Project: Cassandra
  Issue Type: Bug
Affects Versions: 1.2.0 beta 1
Reporter: Brandon Williams
Assignee: David Alves
Priority: Minor

 For example, setting log4j.logger.org.apache.cassandra.db=DEBUG in the config 
 has no effect. Perhaps there is something else that needs to be set as well, 
 but we should at least document that there.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (CASSANDRA-4615) cannot set log4j level on modules/classes

2012-09-04 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis commented on CASSANDRA-4615:
---

I'm also not getting trace messages (e.g. from MessagingService) even when I 
set the root logger to TRACE in test/conf, btw.

 cannot set log4j level on modules/classes
 -

 Key: CASSANDRA-4615
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4615
 Project: Cassandra
  Issue Type: Bug
Affects Versions: 1.2.0 beta 1
Reporter: Brandon Williams
Assignee: David Alves
Priority: Minor

 For example, setting log4j.logger.org.apache.cassandra.db=DEBUG in the config 
 has no effect. Perhaps there is something else that needs to be set as well, 
 but we should at least document that there.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (CASSANDRA-4615) cannot set log4j level on modules/classes

2012-09-04 Thread David Alves (JIRA)

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

David Alves commented on CASSANDRA-4615:


right, you need to also up the threshold for the appender you want (probably 
the R one in this case).

I'll try and find find a better way to do that, but without actually using a 
different logger for tracing (and therefore changing quite a lot of code) it 
will probably depend on some weird hack to the logging system.

 cannot set log4j level on modules/classes
 -

 Key: CASSANDRA-4615
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4615
 Project: Cassandra
  Issue Type: Bug
Affects Versions: 1.2.0 beta 1
Reporter: Brandon Williams
Assignee: David Alves
Priority: Minor

 For example, setting log4j.logger.org.apache.cassandra.db=DEBUG in the config 
 has no effect. Perhaps there is something else that needs to be set as well, 
 but we should at least document that there.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Comment Edited] (CASSANDRA-4615) cannot set log4j level on modules/classes

2012-09-04 Thread David Alves (JIRA)

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

David Alves edited comment on CASSANDRA-4615 at 9/5/12 9:15 AM:


right, you need to also down the threshold for the appender you want (probably 
the R one in this case).

I'll try and find find a better way to do that, but without actually using a 
different logger for tracing (and therefore changing quite a lot of code) it 
will probably depend on some weird hack to the logging system.

  was (Author: dr-alves):
right, you need to also up the threshold for the appender you want 
(probably the R one in this case).

I'll try and find find a better way to do that, but without actually using a 
different logger for tracing (and therefore changing quite a lot of code) it 
will probably depend on some weird hack to the logging system.
  
 cannot set log4j level on modules/classes
 -

 Key: CASSANDRA-4615
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4615
 Project: Cassandra
  Issue Type: Bug
Affects Versions: 1.2.0 beta 1
Reporter: Brandon Williams
Assignee: David Alves
Priority: Minor

 For example, setting log4j.logger.org.apache.cassandra.db=DEBUG in the config 
 has no effect. Perhaps there is something else that needs to be set as well, 
 but we should at least document that there.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


  1   2   >