[jira] [Commented] (CASSANDRA-4754) There is an inconsistency between default configuration in cassandra.yaml and java code

2012-10-04 Thread Alexey Zotov (JIRA)

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

Alexey Zotov commented on CASSANDRA-4754:
-

Ok, thanks!

 There is an inconsistency between default configuration in cassandra.yaml and 
 java code
 ---

 Key: CASSANDRA-4754
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4754
 Project: Cassandra
  Issue Type: Bug
Affects Versions: 1.1.4
Reporter: Alexey Zotov
Assignee: Alexey Zotov
Priority: Trivial
  Labels: configurations, docs
 Fix For: 1.1.6

 Attachments: cassandra-1.1-4754_default_configs.txt


 Options max_hint_window_in_ms and in_memory_compaction_limit_in_mb have 
 different values in cassandra.yaml and in java code. I suggest to lead java 
 code values to cassandra.yaml values.

--
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


[cassandra-dbapi2] push by alek...@yeschenko.com - release 1.3.0 on 2012-10-04 01:39 GMT

2012-10-04 Thread cassandra-dbapi2 . apache-extras . org

Revision: 0477fc850d37
Author:   Aleksey Yeschenko alek...@yeschenko.com
Date: Wed Oct  3 18:19:46 2012
Log:  release 1.3.0

http://code.google.com/a/apache-extras.org/p/cassandra-dbapi2/source/detail?r=0477fc850d37

Modified:
 /CHANGES.txt
 /setup.py

===
--- /CHANGES.txtWed Sep 12 13:47:23 2012
+++ /CHANGES.txtWed Oct  3 18:19:46 2012
@@ -1,3 +1,10 @@
+1.3.0 - 2012/10/03
+ * Support passing transport instance to cql.connect()
+ * Update thrift definitions (19.28.0 - 19.34.0)
+ * Support for callbacks on native-proto events
+ * Support snappy compression if installed
+ * Set initial keyspace after connection has been finalized
+
 1.2.0 - 2012/09/12
  * Changes to SchemaDecoder interface- now decodes one value or column
metadata instance at a time
===
--- /setup.py   Wed Sep 12 13:47:23 2012
+++ /setup.py   Wed Oct  3 18:19:46 2012
@@ -20,7 +20,7 @@

 setup(
 name=cql,
-version=1.2.0,
+version=1.3.0,
 description=Cassandra Query Language driver,
  
long_description=open(abspath(join(dirname(__file__), 'README'))).read(),

 maintainer='Cassandra DBAPI-2 Driver Team',


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

2012-10-04 Thread Sylvain Lebresne (JIRA)

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

Sylvain Lebresne updated CASSANDRA-4611:


Attachment: 4611-1.1.txt

Alright, this was even slightly more painful to backport than I though but 
attaching patch for 1.1. I've ran the cql dtests and all seems to work all 
right.

 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
Assignee: Sylvain Lebresne
Priority: Minor
  Labels: cql3
 Fix For: 1.2.0 beta 1

 Attachments: 4611-1.1.txt, 4611.txt, 4611-v2.txt


 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] [Commented] (CASSANDRA-4611) Add AlterKeyspace statement

2012-10-04 Thread Pavel Yaskevich (JIRA)

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

Pavel Yaskevich commented on CASSANDRA-4611:


+1

 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
Assignee: Sylvain Lebresne
Priority: Minor
  Labels: cql3
 Fix For: 1.2.0 beta 1

 Attachments: 4611-1.1.txt, 4611.txt, 4611-v2.txt


 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] [Resolved] (CASSANDRA-4760) CQL3 equality is broken when using composites and clustering order by

2012-10-04 Thread Sylvain Lebresne (JIRA)

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

Sylvain Lebresne resolved CASSANDRA-4760.
-

Resolution: Duplicate

I'm closing this as duplicate of CASSANDRA-4759 because the patch there will 
fix that too (this is in fact the same problem).

 CQL3 equality is broken when using composites and clustering order by
 -

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


 The following query is broken when you specify the second order by
 {code}
 cqlsh:dev DROP TABLE testrev ;
 cqlsh:dev CREATE TABLE testrev (
...  key text,
...  rdate timestamp,
...  rdate2 timestamp,
...  num double,
...  PRIMARY KEY(key,rdate,rdate2)
...  ) WITH COMPACT STORAGE
...  AND CLUSTERING ORDER BY(rdate DESC, rdate2 DESC);
 cqlsh:dev INSERT INTO testrev(key,rdate,rdate2,num) VALUES 
 ('foo','2012-01-01','2012-01-01',10.5);
 cqlsh:dev select * from testrev where key='foo' and rdate = '2012-01-01';
 Bad Request: Range finish must come after start in traversal order
 Perhaps you meant to use CQL 2? Try using the -2 option when starting cqlsh.
 cqlsh:dev 
 {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] [Updated] (CASSANDRA-4759) CQL3 Predicate logic bug when using composite columns

2012-10-04 Thread Sylvain Lebresne (JIRA)

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

Sylvain Lebresne updated CASSANDRA-4759:


Attachment: 4759.txt

Seems like the fix for CASSANDRA-4716 didn't fix the whole problem. The 
(hopefully) last problem is in the handling of the compositeType 
'end-of-component'. Namely, ReversedType don't apply to that eoc so we should 
take that into account. Patch attached to fix (the patch is against 1.1 because 
this does affect 1.1). It also fixes CASSANDRA-4760 (because that was in fact 
the same problem).

 CQL3 Predicate logic bug when using composite columns
 -

 Key: CASSANDRA-4759
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4759
 Project: Cassandra
  Issue Type: Bug
Reporter: T Jake Luciani
Assignee: Sylvain Lebresne
 Attachments: 4759.txt


 Looks like a predicate logic bug that only happens when you have  2 primary 
 keys and use COMPACT STORAGE (meaning its using composite columns under the 
 hood)
 First I'll show it works with just 2 
 {code}
 cqlsh:dev CREATE TABLE testrev (
...  key text,
...  rdate timestamp,
...  num double,
...  PRIMARY KEY(key,rdate)
...  ) WITH COMPACT STORAGE
...AND CLUSTERING ORDER BY(rdate DESC);
 cqlsh:dev INSERT INTO testrev(key,rdate,num) VALUES 
 ('foo','2012-01-01',10.5);
 cqlsh:dev select * from testrev where key='foo' and rdate  '2012-01-01';
 cqlsh:dev select * from testrev where key='foo' and rdate = '2012-01-01';
  key | rdate| num
 -+--+--
  foo | 2012-01-01 00:00:00-0500 | 10.5
 {code}
 Now we create with 3 parts to the PRIMARY KEY
 {code}
 cqlsh:dev drop TABLE testrev ;
 cqlsh:dev CREATE TABLE testrev (
...  key text,
...  rdate timestamp,
...  rdate2 timestamp,
...  num double,
...  PRIMARY KEY(key,rdate,rdate2)
...  ) WITH COMPACT STORAGE
...  AND CLUSTERING ORDER BY(rdate DESC);
 cqlsh:dev INSERT INTO testrev(key,rdate,rdate2,num) VALUES 
 ('foo','2012-01-01','2012-01-01',10.5);
 cqlsh:dev select * from testrev where key='foo' and rdate  '2012-01-01';
  key | rdate| rdate2   | num
 -+--+--+--
  foo | 2012-01-01 00:00:00-0500 | 2012-01-01 00:00:00-0500 | 10.5
 cqlsh:dev select * from testrev where key='foo' and rdate = '2012-01-01';
 {code}
 The last query should return the row...

--
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 rpc_address for binary protocol and change default port

2012-10-04 Thread slebresne
Updated Branches:
  refs/heads/trunk 51e6c7c0a - e863c2b71


Use rpc_address for binary protocol and change default port

patch by slebresne; reviewed by jbellis for CASSANDRA-4751


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

Branch: refs/heads/trunk
Commit: e863c2b71cbf917dde2d0c5f236b749f0070c1dc
Parents: 51e6c7c
Author: Sylvain Lebresne sylv...@datastax.com
Authored: Thu Oct 4 11:11:29 2012 +0200
Committer: Sylvain Lebresne sylv...@datastax.com
Committed: Thu Oct 4 11:11:29 2012 +0200

--
 CHANGES.txt|2 +
 conf/cassandra.yaml|7 ++--
 src/java/org/apache/cassandra/config/Config.java   |1 -
 .../cassandra/config/DatabaseDescriptor.java   |   20 +--
 .../org/apache/cassandra/transport/Server.java |   29 +++
 5 files changed, 28 insertions(+), 31 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/e863c2b7/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index d86d890..32d76b4 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -18,6 +18,8 @@
  * Add support for batchlog in CQL3 (CASSANDRA-4545, 4738)
  * Add support for multiple column family outputs in CFOF (CASSANDRA-4208)
  * Support repairing only the local DC nodes (CASSANDRA-4747)
+ * Use rpc_address for binary protocol and change default port (CASSANRA-4751)
+
 
 1.2-beta1
  * add atomic_batch_mutate (CASSANDRA-4542, -4635)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/e863c2b7/conf/cassandra.yaml
--
diff --git a/conf/cassandra.yaml b/conf/cassandra.yaml
index cbcb7b2..f98f9f0 100644
--- a/conf/cassandra.yaml
+++ b/conf/cassandra.yaml
@@ -308,12 +308,11 @@ listen_address: localhost
 # Whether to start the native transport server.
 # Currently, only the thrift server is started by default because the native
 # transport is considered beta.
+# Please note that the address on which the native transport is bound is the
+# same as the rpc_address. The port however is different and specified below.
 start_native_transport: false
-# The address to bind the CQL native transport to. The same remarks than for
-# rpc_address applies.
-native_transport_address: localhost
 # port for the CQL native transport to listen for clients on
-native_transport_port: 8000
+native_transport_port: 9042
 # The maximum of thread handling requests. The meaning is the same than
 # rpc_max_threads. The default is unlimited.
 #native_transport_max_threads: 2048

http://git-wip-us.apache.org/repos/asf/cassandra/blob/e863c2b7/src/java/org/apache/cassandra/config/Config.java
--
diff --git a/src/java/org/apache/cassandra/config/Config.java 
b/src/java/org/apache/cassandra/config/Config.java
index 4f551ad..90746c3 100644
--- a/src/java/org/apache/cassandra/config/Config.java
+++ b/src/java/org/apache/cassandra/config/Config.java
@@ -83,7 +83,6 @@ public class Config
 public Integer rpc_recv_buff_size_in_bytes;
 
 public Boolean start_native_transport = false;
-public String native_transport_address;
 public Integer native_transport_port = 8000;
 public Integer native_transport_max_threads = Integer.MAX_VALUE;
 

http://git-wip-us.apache.org/repos/asf/cassandra/blob/e863c2b7/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
--
diff --git a/src/java/org/apache/cassandra/config/DatabaseDescriptor.java 
b/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
index 91bd9b6..cc8f07f 100644
--- a/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
+++ b/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
@@ -64,7 +64,6 @@ public class DatabaseDescriptor
 private static InetAddress listenAddress; // leave null so we can fall 
through to getLocalHost
 private static InetAddress broadcastAddress;
 private static InetAddress rpcAddress;
-private static InetAddress nativeTransportAddress;
 private static SeedProvider seedProvider;
 
 /* Hashing strategy Random or OPHF */
@@ -316,23 +315,6 @@ public class DatabaseDescriptor
 rpcAddress = FBUtilities.getLocalAddress();
 }
 
-/* Local IP or hostname to bind RPC server to */
-if (conf.native_transport_address != null)
-{
-try
-{
-nativeTransportAddress = 

[2/2] git commit: Add AlterKeyspace statement to 1.1

2012-10-04 Thread slebresne
Add AlterKeyspace statement to 1.1

patch by slebresne; reviewed by xedin for CASSANDRA-4611


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

Branch: refs/heads/trunk
Commit: 2ce7b9b3ada14182067c934c475c6ab899086355
Parents: 59a6a5d
Author: Sylvain Lebresne sylv...@datastax.com
Authored: Thu Oct 4 11:19:21 2012 +0200
Committer: Sylvain Lebresne sylv...@datastax.com
Committed: Thu Oct 4 11:19:21 2012 +0200

--
 CHANGES.txt|1 +
 .../org/apache/cassandra/config/KSMetaData.java|8 +-
 .../org/apache/cassandra/cql/QueryProcessor.java   |3 +-
 src/java/org/apache/cassandra/cql3/CFPropDefs.java |  123 +++
 src/java/org/apache/cassandra/cql3/Cql.g   |   35 +++--
 src/java/org/apache/cassandra/cql3/KSPropDefs.java |   89 +++
 .../apache/cassandra/cql3/PropertyDefinitions.java |  122 ++
 .../cql3/statements/AlterKeyspaceStatement.java|   95 +++
 .../cql3/statements/AlterTableStatement.java   |   10 +-
 .../statements/CreateColumnFamilyStatement.java|   23 ++-
 .../cql3/statements/CreateKeyspaceStatement.java   |   31 ++---
 11 files changed, 387 insertions(+), 153 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/2ce7b9b3/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index d803c0f..cb725cc 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -16,6 +16,7 @@
  * Fix CQL3 'is reversed' logic (CASSANDRA-4716)
  * (CQL3) Don't return ReversedType in result set metadata (CASSANDRA-4717)
  * Pluggable Thrift transport factories for CLI (CASSANDRA-4609)
+ * Backport adding AlterKeyspace statement (CASSANDRA-4611)
 Merged from 1.0:
  * Switch from NBHM to CHM in MessagingService's callback map, which
prevents OOM in long-running instances (CASSANDRA-4708)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/2ce7b9b3/src/java/org/apache/cassandra/config/KSMetaData.java
--
diff --git a/src/java/org/apache/cassandra/config/KSMetaData.java 
b/src/java/org/apache/cassandra/config/KSMetaData.java
index 7b27875..a5fccc3 100644
--- a/src/java/org/apache/cassandra/config/KSMetaData.java
+++ b/src/java/org/apache/cassandra/config/KSMetaData.java
@@ -60,18 +60,18 @@ public final class KSMetaData
 }
 
 // For new user created keyspaces (through CQL)
-public static KSMetaData newKeyspace(String name, String strategyName, 
MapString, String options) throws ConfigurationException
+public static KSMetaData newKeyspace(String name, String strategyName, 
MapString, String options, boolean durableWrites) throws 
ConfigurationException
 {
 Class? extends AbstractReplicationStrategy cls = 
AbstractReplicationStrategy.getClass(strategyName);
 if (cls.equals(LocalStrategy.class))
 throw new ConfigurationException(Unable to use given strategy 
class: LocalStrategy is reserved for internal use.);
 
-return newKeyspace(name, cls, options, 
Collections.CFMetaDataemptyList());
+return newKeyspace(name, cls, options, durableWrites, 
Collections.CFMetaDataemptyList());
 }
 
-public static KSMetaData newKeyspace(String name, Class? extends 
AbstractReplicationStrategy strategyClass, MapString, String options, 
IterableCFMetaData cfDefs)
+public static KSMetaData newKeyspace(String name, Class? extends 
AbstractReplicationStrategy strategyClass, MapString, String options, 
boolean durablesWrites, IterableCFMetaData cfDefs)
 {
-return new KSMetaData(name, strategyClass, options, true, cfDefs);
+return new KSMetaData(name, strategyClass, options, durablesWrites, 
cfDefs);
 }
 
 public static KSMetaData cloneWith(KSMetaData ksm, IterableCFMetaData 
cfDefs)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/2ce7b9b3/src/java/org/apache/cassandra/cql/QueryProcessor.java
--
diff --git a/src/java/org/apache/cassandra/cql/QueryProcessor.java 
b/src/java/org/apache/cassandra/cql/QueryProcessor.java
index 4a829c6..ab1c15b 100644
--- a/src/java/org/apache/cassandra/cql/QueryProcessor.java
+++ b/src/java/org/apache/cassandra/cql/QueryProcessor.java
@@ -700,7 +700,8 @@ public class QueryProcessor
 {
 KSMetaData ksm = KSMetaData.newKeyspace(create.getName(),
 
create.getStrategyClass(),
-

[1/2] git commit: Merge commit '2ce7b9b3ada14182067c934c475c6ab899086355' into trunk

2012-10-04 Thread slebresne
Updated Branches:
  refs/heads/trunk e863c2b71 - db36acbf1


Merge commit '2ce7b9b3ada14182067c934c475c6ab899086355' into trunk


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

Branch: refs/heads/trunk
Commit: db36acbf104ef9082d98c284a4deb4786dee1300
Parents: e863c2b 2ce7b9b
Author: Sylvain Lebresne sylv...@datastax.com
Authored: Thu Oct 4 11:21:48 2012 +0200
Committer: Sylvain Lebresne sylv...@datastax.com
Committed: Thu Oct 4 11:21:48 2012 +0200

--

--




git commit: Add AlterKeyspace statement to 1.1

2012-10-04 Thread slebresne
Updated Branches:
  refs/heads/cassandra-1.1 59a6a5d82 - 2ce7b9b3a


Add AlterKeyspace statement to 1.1

patch by slebresne; reviewed by xedin for CASSANDRA-4611


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

Branch: refs/heads/cassandra-1.1
Commit: 2ce7b9b3ada14182067c934c475c6ab899086355
Parents: 59a6a5d
Author: Sylvain Lebresne sylv...@datastax.com
Authored: Thu Oct 4 11:19:21 2012 +0200
Committer: Sylvain Lebresne sylv...@datastax.com
Committed: Thu Oct 4 11:19:21 2012 +0200

--
 CHANGES.txt|1 +
 .../org/apache/cassandra/config/KSMetaData.java|8 +-
 .../org/apache/cassandra/cql/QueryProcessor.java   |3 +-
 src/java/org/apache/cassandra/cql3/CFPropDefs.java |  123 +++
 src/java/org/apache/cassandra/cql3/Cql.g   |   35 +++--
 src/java/org/apache/cassandra/cql3/KSPropDefs.java |   89 +++
 .../apache/cassandra/cql3/PropertyDefinitions.java |  122 ++
 .../cql3/statements/AlterKeyspaceStatement.java|   95 +++
 .../cql3/statements/AlterTableStatement.java   |   10 +-
 .../statements/CreateColumnFamilyStatement.java|   23 ++-
 .../cql3/statements/CreateKeyspaceStatement.java   |   31 ++---
 11 files changed, 387 insertions(+), 153 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/2ce7b9b3/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index d803c0f..cb725cc 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -16,6 +16,7 @@
  * Fix CQL3 'is reversed' logic (CASSANDRA-4716)
  * (CQL3) Don't return ReversedType in result set metadata (CASSANDRA-4717)
  * Pluggable Thrift transport factories for CLI (CASSANDRA-4609)
+ * Backport adding AlterKeyspace statement (CASSANDRA-4611)
 Merged from 1.0:
  * Switch from NBHM to CHM in MessagingService's callback map, which
prevents OOM in long-running instances (CASSANDRA-4708)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/2ce7b9b3/src/java/org/apache/cassandra/config/KSMetaData.java
--
diff --git a/src/java/org/apache/cassandra/config/KSMetaData.java 
b/src/java/org/apache/cassandra/config/KSMetaData.java
index 7b27875..a5fccc3 100644
--- a/src/java/org/apache/cassandra/config/KSMetaData.java
+++ b/src/java/org/apache/cassandra/config/KSMetaData.java
@@ -60,18 +60,18 @@ public final class KSMetaData
 }
 
 // For new user created keyspaces (through CQL)
-public static KSMetaData newKeyspace(String name, String strategyName, 
MapString, String options) throws ConfigurationException
+public static KSMetaData newKeyspace(String name, String strategyName, 
MapString, String options, boolean durableWrites) throws 
ConfigurationException
 {
 Class? extends AbstractReplicationStrategy cls = 
AbstractReplicationStrategy.getClass(strategyName);
 if (cls.equals(LocalStrategy.class))
 throw new ConfigurationException(Unable to use given strategy 
class: LocalStrategy is reserved for internal use.);
 
-return newKeyspace(name, cls, options, 
Collections.CFMetaDataemptyList());
+return newKeyspace(name, cls, options, durableWrites, 
Collections.CFMetaDataemptyList());
 }
 
-public static KSMetaData newKeyspace(String name, Class? extends 
AbstractReplicationStrategy strategyClass, MapString, String options, 
IterableCFMetaData cfDefs)
+public static KSMetaData newKeyspace(String name, Class? extends 
AbstractReplicationStrategy strategyClass, MapString, String options, 
boolean durablesWrites, IterableCFMetaData cfDefs)
 {
-return new KSMetaData(name, strategyClass, options, true, cfDefs);
+return new KSMetaData(name, strategyClass, options, durablesWrites, 
cfDefs);
 }
 
 public static KSMetaData cloneWith(KSMetaData ksm, IterableCFMetaData 
cfDefs)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/2ce7b9b3/src/java/org/apache/cassandra/cql/QueryProcessor.java
--
diff --git a/src/java/org/apache/cassandra/cql/QueryProcessor.java 
b/src/java/org/apache/cassandra/cql/QueryProcessor.java
index 4a829c6..ab1c15b 100644
--- a/src/java/org/apache/cassandra/cql/QueryProcessor.java
+++ b/src/java/org/apache/cassandra/cql/QueryProcessor.java
@@ -700,7 +700,8 @@ public class QueryProcessor
 {
 KSMetaData ksm = KSMetaData.newKeyspace(create.getName(),
 
create.getStrategyClass(),
-

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

2012-10-04 Thread Sylvain Lebresne (JIRA)

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

Sylvain Lebresne resolved CASSANDRA-4611.
-

   Resolution: Fixed
Fix Version/s: 1.1.6

Alright, backport committed. Thanks

 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
Assignee: Sylvain Lebresne
Priority: Minor
  Labels: cql3
 Fix For: 1.1.6, 1.2.0 beta 1

 Attachments: 4611-1.1.txt, 4611.txt, 4611-v2.txt


 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] [Comment Edited] (CASSANDRA-4741) Cassandra stops persisting or flushing data

2012-10-04 Thread Mauri Melato (JIRA)

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

Mauri Melato edited comment on CASSANDRA-4741 at 10/4/12 8:39 PM:
--

I could see data is actually persisted if I force flush, nodetool flush (or 
drain to shutdown).

But the system does not recover anyway. I mean I have always to force the flush 
before closing the node to get data persisted.

To quickly reproduce the bug you need -a virtual machine with winXP32,- 
Cassandra 1.1.5 and the attached directory tree to be configured into the 
cassandra.yaml.
We could actually get this issue even on a Win7 64 bit, but at that time we 
didn't get the complete dataset directories to reproduce it.

Thanks for the support.

  was (Author: mauri.melato):
I could see data is actually persisted if I force flush, nodetool flush (or 
drain to shutdown).

But the system does not recover anyway. I mean I have always to force the flush 
before closing the node to get data persisted.

To quickly reproduce the bug you need a virtual machine with winXP32, Cassandra 
1.1.5 and the attached directory tree to be configured into the cassandra.yaml.
We could actually get this issue even on a Win7 64 bit, but at that time we 
didn't get the complete dataset directories to reproduce it.

Thanks for the support.
  
 Cassandra stops persisting or flushing data
 ---

 Key: CASSANDRA-4741
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4741
 Project: Cassandra
  Issue Type: Bug
 Environment: Windows XP 32 bit
 Cassandra 1.1.4 or 1.1.5
Reporter: Mauri Melato
 Fix For: 1.1.4, 1.1.5

 Attachments: cassandra-data.minimal.zip


 Hello,
  
  we have a Cassandra instance running on a single node with Windows XP 32bit.
 After some time of normal working and some restart, Cassandra seems to stop 
 to persist data into the keyspace without raising any error.
 It's possible to update/insert rows or columns and you can query and see the 
 updated keyspace but if you stop and start Cassandra, you get a keyspace 
 'from the past', always from the same point in the past.
 We were not able to understand how to trigger this inconsistency in the first 
 place but once you get it, you can't get rid of it if not removing the data 
 directories.
 Here in attachment you can find a complete set of Cassandra data directories: 
 {code}
cassandra-data/
|-- commitlog
|-- data
`-- saved_caches
 {code}
 with which it's possible test the inconsistent scenario. 
 We tried this on another clean Win Xp 32 machine and we could get the same 
 issue from the first run.
 On a Win XP 64 and the same dir set, Cassandra didn't get into this issue, 
 but from the log we saw a difference in the disk access mode:
 * XP/64: {{DiskAccessMode 'auto' determined to be mmap, indexAccessMode is 
 mmap instead of 'standard'}}
 * XP/32: {{DiskAccessMode 'auto' determined to be standard, indexAccessMode 
 is standard}}
 Not sure this is the key factor, nevertheless in another test bed we 
 experimented the same issue even on a WinXP 64 node but we couldn't collect 
 the dataset.
 Here a short cassandra-cli history to show the issue:
 {code}
 [default@NEUTRO_Keyspace] connect 192.168.1.33/9160;
 Connected to: NEUTRO Cluster on 192.168.1.33/9160
 [default@unknown] use neutro_keyspace;
 Authenticated to keyspace: NEUTRO_Keyspace
 [default@NEUTRO_Keyspace] describe;
 Keyspace: NEUTRO_Keyspace:
   Replication Strategy: org.apache.cassandra.locator.SimpleStrategy
   Durable Writes: true
 Options: [replication_factor:1]
   Column Families:
 ColumnFamily: TaskId
   Key Validation Class: org.apache.cassandra.db.marshal.AsciiType
   Default column value validator: org.apache.cassandra.db.marshal.UTF8Type
   Columns sorted by: org.apache.cassandra.db.marshal.AsciiType
   GC grace seconds: 864000
   Compaction min/max thresholds: 4/32
   Read repair chance: 1.0
   DC Local Read repair chance: 0.0
   Replicate on write: true
   Caching: KEYS_ONLY
   Bloom Filter FP chance: default
   Built indexes: []
   Column Metadata:
 Column Name: taskId
   Validation Class: org.apache.cassandra.db.marshal.LongType
   Compaction Strategy: 
 org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy
   Compression Options:
 sstable_compression: org.apache.cassandra.io.compress.SnappyCompressor
 [default@NEUTRO_Keyspace] list TaskId;
 Using default limit of 100
 Using default column limit of 100
 ---
 RowKey: NE_MASTER_TASK_ID
 = (column=taskId, value=47, timestamp=1349090424494000)
 1 Row Returned.
 Elapsed time: 93 msec(s).
 [default@NEUTRO_Keyspace] set  

[jira] [Updated] (CASSANDRA-4741) Cassandra stops persisting or flushing data

2012-10-04 Thread Mauri Melato (JIRA)

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

Mauri Melato updated CASSANDRA-4741:


Environment: 
Linux, Windows
Cassandra 1.1.4 or 1.1.5

  was:
Windows XP 32 bit
Cassandra 1.1.4 or 1.1.5


 Cassandra stops persisting or flushing data
 ---

 Key: CASSANDRA-4741
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4741
 Project: Cassandra
  Issue Type: Bug
 Environment: Linux, Windows
 Cassandra 1.1.4 or 1.1.5
Reporter: Mauri Melato
 Fix For: 1.1.4, 1.1.5

 Attachments: cassandra-data.minimal.zip


 Hello,
  
  we have a Cassandra instance running on a single node with Windows XP 32bit.
 After some time of normal working and some restart, Cassandra seems to stop 
 to persist data into the keyspace without raising any error.
 It's possible to update/insert rows or columns and you can query and see the 
 updated keyspace but if you stop and start Cassandra, you get a keyspace 
 'from the past', always from the same point in the past.
 We were not able to understand how to trigger this inconsistency in the first 
 place but once you get it, you can't get rid of it if not removing the data 
 directories.
 Here in attachment you can find a complete set of Cassandra data directories: 
 {code}
cassandra-data/
|-- commitlog
|-- data
`-- saved_caches
 {code}
 with which it's possible test the inconsistent scenario. 
 We tried this on another clean Win Xp 32 machine and we could get the same 
 issue from the first run.
 On a Win XP 64 and the same dir set, Cassandra didn't get into this issue, 
 but from the log we saw a difference in the disk access mode:
 * XP/64: {{DiskAccessMode 'auto' determined to be mmap, indexAccessMode is 
 mmap instead of 'standard'}}
 * XP/32: {{DiskAccessMode 'auto' determined to be standard, indexAccessMode 
 is standard}}
 Not sure this is the key factor, nevertheless in another test bed we 
 experimented the same issue even on a WinXP 64 node but we couldn't collect 
 the dataset.
 Here a short cassandra-cli history to show the issue:
 {code}
 [default@NEUTRO_Keyspace] connect 192.168.1.33/9160;
 Connected to: NEUTRO Cluster on 192.168.1.33/9160
 [default@unknown] use neutro_keyspace;
 Authenticated to keyspace: NEUTRO_Keyspace
 [default@NEUTRO_Keyspace] describe;
 Keyspace: NEUTRO_Keyspace:
   Replication Strategy: org.apache.cassandra.locator.SimpleStrategy
   Durable Writes: true
 Options: [replication_factor:1]
   Column Families:
 ColumnFamily: TaskId
   Key Validation Class: org.apache.cassandra.db.marshal.AsciiType
   Default column value validator: org.apache.cassandra.db.marshal.UTF8Type
   Columns sorted by: org.apache.cassandra.db.marshal.AsciiType
   GC grace seconds: 864000
   Compaction min/max thresholds: 4/32
   Read repair chance: 1.0
   DC Local Read repair chance: 0.0
   Replicate on write: true
   Caching: KEYS_ONLY
   Bloom Filter FP chance: default
   Built indexes: []
   Column Metadata:
 Column Name: taskId
   Validation Class: org.apache.cassandra.db.marshal.LongType
   Compaction Strategy: 
 org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy
   Compression Options:
 sstable_compression: org.apache.cassandra.io.compress.SnappyCompressor
 [default@NEUTRO_Keyspace] list TaskId;
 Using default limit of 100
 Using default column limit of 100
 ---
 RowKey: NE_MASTER_TASK_ID
 = (column=taskId, value=47, timestamp=1349090424494000)
 1 Row Returned.
 Elapsed time: 93 msec(s).
 [default@NEUTRO_Keyspace] set  taskid['NE_MASTER_TASK_ID']['taskId']='55';
 Value inserted.
 Elapsed time: 31 msec(s).
 [default@NEUTRO_Keyspace] list TaskId;
 Using default limit of 100
 Using default column limit of 100
 ---
 RowKey: NE_MASTER_TASK_ID
 = (column=taskId, value=55, timestamp=1349108488164000)
 1 Row Returned.
 Elapsed time: 31 msec(s).
 {code}
 ...Stop and Start Cassandra...
 {code}
 [default@NEUTRO_Keyspace] connect 192.168.1.33/9160;
 Connected to: NEUTRO Cluster on 192.168.1.33/9160
 [default@unknown] use neutro_keyspace;
 Authenticated to keyspace: NEUTRO_Keyspace
 [default@NEUTRO_Keyspace] list TaskId;
 Using default limit of 100
 Using default column limit of 100
 ---
 RowKey: NE_MASTER_TASK_ID
 = (column=taskId, value=47, timestamp=1349090424494000)
 1 Row Returned.
 Elapsed time: 110 msec(s).
 {code}
 Thanks for your attention

--
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-4739) Prepared Statements don't support collections

2012-10-04 Thread Sylvain Lebresne (JIRA)

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

Sylvain Lebresne updated CASSANDRA-4739:


Attachment: (was: 4739.txt)

 Prepared Statements don't support collections
 -

 Key: CASSANDRA-4739
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4739
 Project: Cassandra
  Issue Type: Bug
Affects Versions: 1.2.0 beta 1
 Environment: Cassandra 937f15e1
 OS X 10.8.2
 java version 1.6.0_35
 Java(TM) SE Runtime Environment (build 1.6.0_35-b10-428-11M3811)
 Java HotSpot(TM) 64-Bit Server VM (build 20.10-b01-428, mixed mode)
Reporter: Jonathan Rudenberg
Assignee: Sylvain Lebresne
 Fix For: 1.2.0 beta 2

 Attachments: 4739.txt


 I'm putting a collection onto the wire in an EXECUTE request with exactly the 
 same bytes that Cassandra encodes the same data in a response:
 Can't apply operation on column with 
 org.apache.cassandra.db.marshal.SetType(org.apache.cassandra.db.marshal.UTF8Type)
  type
 Here's the full trace log from cassandra:
 {noformat}
 DEBUG 19:24:15,414 Received: PREPARE INSERT INTO things (id, set_text) VALUES 
 (?, ?);
 TRACE 19:24:15,414 CQL QUERY: INSERT INTO things (id, set_text) VALUES (?, ?);
 TRACE 19:24:15,415 Stored prepared statement #413587006 with 2 bind markers
 DEBUG 19:24:15,415 Responding: RESULT PREPARED 413587006 
 [id(gocql_collections, things), 
 org.apache.cassandra.db.marshal.TimeUUIDType][set_text(gocql_collections, 
 things), 
 org.apache.cassandra.db.marshal.SetType(org.apache.cassandra.db.marshal.UTF8Type)]
 DEBUG 19:24:15,416 Received: EXECUTE 413587006 with 2 values
 TRACE 19:24:15,416 [1] 'java.nio.HeapByteBuffer[pos=18 lim=34 cap=53]'
 TRACE 19:24:15,416 [2] 'java.nio.HeapByteBuffer[pos=38 lim=51 cap=53]'
 DEBUG 19:24:15,417 Responding: ERROR INVALID: Can't apply operation on column 
 with 
 org.apache.cassandra.db.marshal.SetType(org.apache.cassandra.db.marshal.UTF8Type)
  type.
 {noformat}
 The prepared statement is:
 {noformat}
 INSERT INTO things (id, set_text) VALUES (?, ?);
 {noformat}
 and the collection value ({'asdf', 'sdf'}) is encoded as:
 {noformat}
 00 02 00 04 61 73 64 66 00 03 73 64 66
 {noformat}
 which is byte-for-byte exactly the same as what I get from Cassandra off the 
 wire when I do a query for the same data.
 I already have the driver working with other queries/inserts with all other 
 types, so this is just a collection encoding problem.

--
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-4739) Prepared Statements don't support collections

2012-10-04 Thread Sylvain Lebresne (JIRA)

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

Sylvain Lebresne updated CASSANDRA-4739:


Attachment: 4739.txt

Oups, that last one is just a copy-paste type (MapType was trying to validate 
values with the keys comparator). Patch updated.

 Prepared Statements don't support collections
 -

 Key: CASSANDRA-4739
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4739
 Project: Cassandra
  Issue Type: Bug
Affects Versions: 1.2.0 beta 1
 Environment: Cassandra 937f15e1
 OS X 10.8.2
 java version 1.6.0_35
 Java(TM) SE Runtime Environment (build 1.6.0_35-b10-428-11M3811)
 Java HotSpot(TM) 64-Bit Server VM (build 20.10-b01-428, mixed mode)
Reporter: Jonathan Rudenberg
Assignee: Sylvain Lebresne
 Fix For: 1.2.0 beta 2

 Attachments: 4739.txt


 I'm putting a collection onto the wire in an EXECUTE request with exactly the 
 same bytes that Cassandra encodes the same data in a response:
 Can't apply operation on column with 
 org.apache.cassandra.db.marshal.SetType(org.apache.cassandra.db.marshal.UTF8Type)
  type
 Here's the full trace log from cassandra:
 {noformat}
 DEBUG 19:24:15,414 Received: PREPARE INSERT INTO things (id, set_text) VALUES 
 (?, ?);
 TRACE 19:24:15,414 CQL QUERY: INSERT INTO things (id, set_text) VALUES (?, ?);
 TRACE 19:24:15,415 Stored prepared statement #413587006 with 2 bind markers
 DEBUG 19:24:15,415 Responding: RESULT PREPARED 413587006 
 [id(gocql_collections, things), 
 org.apache.cassandra.db.marshal.TimeUUIDType][set_text(gocql_collections, 
 things), 
 org.apache.cassandra.db.marshal.SetType(org.apache.cassandra.db.marshal.UTF8Type)]
 DEBUG 19:24:15,416 Received: EXECUTE 413587006 with 2 values
 TRACE 19:24:15,416 [1] 'java.nio.HeapByteBuffer[pos=18 lim=34 cap=53]'
 TRACE 19:24:15,416 [2] 'java.nio.HeapByteBuffer[pos=38 lim=51 cap=53]'
 DEBUG 19:24:15,417 Responding: ERROR INVALID: Can't apply operation on column 
 with 
 org.apache.cassandra.db.marshal.SetType(org.apache.cassandra.db.marshal.UTF8Type)
  type.
 {noformat}
 The prepared statement is:
 {noformat}
 INSERT INTO things (id, set_text) VALUES (?, ?);
 {noformat}
 and the collection value ({'asdf', 'sdf'}) is encoded as:
 {noformat}
 00 02 00 04 61 73 64 66 00 03 73 64 66
 {noformat}
 which is byte-for-byte exactly the same as what I get from Cassandra off the 
 wire when I do a query for the same data.
 I already have the driver working with other queries/inserts with all other 
 types, so this is just a collection encoding problem.

--
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-4761) Batch hints delivery

2012-10-04 Thread Alexey Zotov (JIRA)
Alexey Zotov created CASSANDRA-4761:
---

 Summary: Batch hints delivery
 Key: CASSANDRA-4761
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4761
 Project: Cassandra
  Issue Type: Improvement
  Components: Core
Affects Versions: 1.1.2
Reporter: Alexey Zotov
Assignee: Alexey Zotov


Hints delivery to remote DC can take a long time (currently we have 70 ms for 
each hint). In our estimates 700 MB of data will be transmitting to remote DC 
more than one day (in our case), it's unacceptable for us. We suggest to enter 
hint's delivery using batch operations. 

What do you think about it? Is there some facts that won't allow to implement 
that mechanism?

I'll try to implement it if you approve and clarify right way.


--
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-4752) Drop keyspace causes schema disagreement

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

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

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

Verified Jonathans fix +1

 Drop keyspace causes schema disagreement 
 -

 Key: CASSANDRA-4752
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4752
 Project: Cassandra
  Issue Type: Bug
Affects Versions: 1.1.6
Reporter: Sam Tunnicliffe
Assignee: Sam Tunnicliffe
 Attachments: 0001-CASSANDRA-4752.txt, 4752-v2.txt


 The fix for CASSANDRA-4698 introduced a bug whereby when drop keyspace is 
 issued a schema disagreement immediately occurs. This seems to be because the 
 {code}ColumnFamily cf = 
 ColumnFamily.create(modification.getValue().metadata());{code}
 in {{RowMutation.deserializeFixingTimestamps}} does not preserve deletion 
 info for the cf in the modification. In most cases, this doesn't cause a 
 problem, but for a drop keyspace modification, there are no columns in the 
 cf, so the deletion info is effectively lost leading to an incorrect digest 
 being created and ultimately a schema disagreement.
 Replacing the {{create}} with {{cloneMeShallow}} does preserve the deletion 
 info and avoids the schema disagreement issue.

--
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-4761) Batch hints delivery

2012-10-04 Thread Alexey Zotov (JIRA)

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

Alexey Zotov updated CASSANDRA-4761:


Description: 
Hints delivery to remote DC can take a long time (currently we have 70 ms for 
each hint). In our estimates 700 MB of data (stored hints) will be transmitting 
to remote DC more than one day (in our case), it's unacceptable for us. We 
suggest to enter hints delivery using batch operations. 

What do you think about it? Is there some facts that won't allow to implement 
that mechanism?

I'll try to implement it if you approve and clarify right way.


  was:
Hints delivery to remote DC can take a long time (currently we have 70 ms for 
each hint). In our estimates 700 MB of data will be transmitting to remote DC 
more than one day (in our case), it's unacceptable for us. We suggest to enter 
hint's delivery using batch operations. 

What do you think about it? Is there some facts that won't allow to implement 
that mechanism?

I'll try to implement it if you approve and clarify right way.



 Batch hints delivery
 

 Key: CASSANDRA-4761
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4761
 Project: Cassandra
  Issue Type: Improvement
  Components: Core
Affects Versions: 1.1.2
Reporter: Alexey Zotov
Assignee: Alexey Zotov
  Labels: hintedhandoff

 Hints delivery to remote DC can take a long time (currently we have 70 ms for 
 each hint). In our estimates 700 MB of data (stored hints) will be 
 transmitting to remote DC more than one day (in our case), it's unacceptable 
 for us. We suggest to enter hints delivery using batch operations. 
 What do you think about it? Is there some facts that won't allow to implement 
 that mechanism?
 I'll try to implement it if you approve and clarify right way.

--
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-10-04 Thread Aleksey Yeschenko (JIRA)

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

Aleksey Yeschenko updated CASSANDRA-4610:
-

Attachment: CASSANDRA-4610-1.1-v3.txt

 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
Assignee: Aleksey Yeschenko
 Attachments: CASSANDRA-4610-1.1-v3.txt, CASSANDRA-4610-1.1-v3.txt, 
 CASSANDRA-4610-1.2-v3.txt, cql-internal-only-1.0.10-4610.zip, 
 cql-internal-only-1.3.0.zip




--
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-10-04 Thread Brandon Williams (JIRA)

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

Brandon Williams updated CASSANDRA-4610:


Attachment: (was: CASSANDRA-4610-1.1-v3.txt)

 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
Assignee: Aleksey Yeschenko
 Attachments: CASSANDRA-4610-1.1-v3.txt, CASSANDRA-4610-1.2-v3.txt, 
 cql-internal-only-1.0.10-4610.zip, cql-internal-only-1.3.0.zip




--
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-4759) CQL3 Predicate logic bug when using composite columns

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

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

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

Tested +1

 CQL3 Predicate logic bug when using composite columns
 -

 Key: CASSANDRA-4759
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4759
 Project: Cassandra
  Issue Type: Bug
Reporter: T Jake Luciani
Assignee: Sylvain Lebresne
  Labels: cql3
 Fix For: 1.1.6

 Attachments: 4759.txt


 Looks like a predicate logic bug that only happens when you have  2 primary 
 keys and use COMPACT STORAGE (meaning its using composite columns under the 
 hood)
 First I'll show it works with just 2 
 {code}
 cqlsh:dev CREATE TABLE testrev (
...  key text,
...  rdate timestamp,
...  num double,
...  PRIMARY KEY(key,rdate)
...  ) WITH COMPACT STORAGE
...AND CLUSTERING ORDER BY(rdate DESC);
 cqlsh:dev INSERT INTO testrev(key,rdate,num) VALUES 
 ('foo','2012-01-01',10.5);
 cqlsh:dev select * from testrev where key='foo' and rdate  '2012-01-01';
 cqlsh:dev select * from testrev where key='foo' and rdate = '2012-01-01';
  key | rdate| num
 -+--+--
  foo | 2012-01-01 00:00:00-0500 | 10.5
 {code}
 Now we create with 3 parts to the PRIMARY KEY
 {code}
 cqlsh:dev drop TABLE testrev ;
 cqlsh:dev CREATE TABLE testrev (
...  key text,
...  rdate timestamp,
...  rdate2 timestamp,
...  num double,
...  PRIMARY KEY(key,rdate,rdate2)
...  ) WITH COMPACT STORAGE
...  AND CLUSTERING ORDER BY(rdate DESC);
 cqlsh:dev INSERT INTO testrev(key,rdate,rdate2,num) VALUES 
 ('foo','2012-01-01','2012-01-01',10.5);
 cqlsh:dev select * from testrev where key='foo' and rdate  '2012-01-01';
  key | rdate| rdate2   | num
 -+--+--+--
  foo | 2012-01-01 00:00:00-0500 | 2012-01-01 00:00:00-0500 | 10.5
 cqlsh:dev select * from testrev where key='foo' and rdate = '2012-01-01';
 {code}
 The last query should return the row...

--
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: CQL3 Predicate logic bug when using composite columns

2012-10-04 Thread slebresne
Updated Branches:
  refs/heads/cassandra-1.1 2ce7b9b3a - eff4b6866


CQL3 Predicate logic bug when using composite columns

patch by slebresne; reviewed by tjake for CASSANDRA-4759


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

Branch: refs/heads/cassandra-1.1
Commit: eff4b686653fb15593c7fecd2033f60b65c9ee8f
Parents: 2ce7b9b
Author: Sylvain Lebresne sylv...@datastax.com
Authored: Thu Oct 4 17:00:38 2012 +0200
Committer: Sylvain Lebresne sylv...@datastax.com
Committed: Thu Oct 4 17:00:38 2012 +0200

--
 CHANGES.txt|2 +-
 .../cassandra/cql3/statements/SelectStatement.java |   21 +-
 2 files changed, 14 insertions(+), 9 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/eff4b686/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index cb725cc..c0a252e 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -13,7 +13,7 @@
  * fix re-created keyspace disappering after 1.1.5 upgrade (CASSANDRA-4698)
  * (CLI) display elapsed time in 2 fraction digits (CASSANDRA-3460)
  * add authentication support to sstableloader (CASSANDRA-4712)
- * Fix CQL3 'is reversed' logic (CASSANDRA-4716)
+ * Fix CQL3 'is reversed' logic (CASSANDRA-4716, 4759)
  * (CQL3) Don't return ReversedType in result set metadata (CASSANDRA-4717)
  * Pluggable Thrift transport factories for CLI (CASSANDRA-4609)
  * Backport adding AlterKeyspace statement (CASSANDRA-4611)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/eff4b686/src/java/org/apache/cassandra/cql3/statements/SelectStatement.java
--
diff --git a/src/java/org/apache/cassandra/cql3/statements/SelectStatement.java 
b/src/java/org/apache/cassandra/cql3/statements/SelectStatement.java
index d288294..92a8d67 100644
--- a/src/java/org/apache/cassandra/cql3/statements/SelectStatement.java
+++ b/src/java/org/apache/cassandra/cql3/statements/SelectStatement.java
@@ -334,8 +334,8 @@ public class SelectStatement implements CQLStatement
 if (isColumnRange())
 {
 SliceRange sliceRange = new SliceRange();
-sliceRange.start = getRequestedBound(isReversed ? Bound.END : 
Bound.START, variables);
-sliceRange.finish = getRequestedBound(isReversed ? Bound.START : 
Bound.END, variables);
+sliceRange.start = getRequestedBound(Bound.START, variables);
+sliceRange.finish = getRequestedBound(Bound.END, variables);
 sliceRange.reversed = isReversed;
 sliceRange.count = -1; // We use this for range slices, where the 
count is ignored in favor of the global column count
 thriftSlicePredicate.slice_range = sliceRange;
@@ -495,6 +495,11 @@ public class SelectStatement implements CQLStatement
 {
 assert isColumnRange();
 
+// The end-of-component of composite doesn't depend on whether the
+// component type is reversed or not (i.e. the ReversedType is applied
+// to the component comparator but not to the end-of-component itself),
+// it only depends on whether the slice is reversed
+Bound eocBound = isReversed ? Bound.reverse(bound) : bound;
 ColumnNameBuilder builder = cfDef.getColumnNameBuilder();
 for (CFDefinition.Name name : cfDef.columns.values())
 {
@@ -508,7 +513,7 @@ public class SelectStatement implements CQLStatement
 // There wasn't any non EQ relation on that key, we select all 
records having the preceding component as prefix.
 // For composites, if there was preceding component and we're 
computing the end, we must change the last component
 // End-Of-Component, otherwise we would be selecting only one 
record.
-if (builder.componentCount()  0  b == Bound.END)
+if (builder.componentCount()  0  eocBound == Bound.END)
 return builder.buildAsEndOfRange();
 else
 return builder.build();
@@ -523,7 +528,7 @@ public class SelectStatement implements CQLStatement
 {
 Term t = r.bound(b);
 assert t != null;
-return builder.add(t, r.getRelation(b), variables).build();
+return builder.add(t, r.getRelation(eocBound, b), 
variables).build();
 }
 }
 // Means no relation at all or everything was an equal
@@ -1283,14 +1288,14 @@ public class SelectStatement implements CQLStatement
 return bounds[b.idx] == null || 

[2/2] git commit: CQL3 Predicate logic bug when using composite columns

2012-10-04 Thread slebresne
CQL3 Predicate logic bug when using composite columns

patch by slebresne; reviewed by tjake for CASSANDRA-4759


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

Branch: refs/heads/trunk
Commit: eff4b686653fb15593c7fecd2033f60b65c9ee8f
Parents: 2ce7b9b
Author: Sylvain Lebresne sylv...@datastax.com
Authored: Thu Oct 4 17:00:38 2012 +0200
Committer: Sylvain Lebresne sylv...@datastax.com
Committed: Thu Oct 4 17:00:38 2012 +0200

--
 CHANGES.txt|2 +-
 .../cassandra/cql3/statements/SelectStatement.java |   21 +-
 2 files changed, 14 insertions(+), 9 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/eff4b686/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index cb725cc..c0a252e 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -13,7 +13,7 @@
  * fix re-created keyspace disappering after 1.1.5 upgrade (CASSANDRA-4698)
  * (CLI) display elapsed time in 2 fraction digits (CASSANDRA-3460)
  * add authentication support to sstableloader (CASSANDRA-4712)
- * Fix CQL3 'is reversed' logic (CASSANDRA-4716)
+ * Fix CQL3 'is reversed' logic (CASSANDRA-4716, 4759)
  * (CQL3) Don't return ReversedType in result set metadata (CASSANDRA-4717)
  * Pluggable Thrift transport factories for CLI (CASSANDRA-4609)
  * Backport adding AlterKeyspace statement (CASSANDRA-4611)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/eff4b686/src/java/org/apache/cassandra/cql3/statements/SelectStatement.java
--
diff --git a/src/java/org/apache/cassandra/cql3/statements/SelectStatement.java 
b/src/java/org/apache/cassandra/cql3/statements/SelectStatement.java
index d288294..92a8d67 100644
--- a/src/java/org/apache/cassandra/cql3/statements/SelectStatement.java
+++ b/src/java/org/apache/cassandra/cql3/statements/SelectStatement.java
@@ -334,8 +334,8 @@ public class SelectStatement implements CQLStatement
 if (isColumnRange())
 {
 SliceRange sliceRange = new SliceRange();
-sliceRange.start = getRequestedBound(isReversed ? Bound.END : 
Bound.START, variables);
-sliceRange.finish = getRequestedBound(isReversed ? Bound.START : 
Bound.END, variables);
+sliceRange.start = getRequestedBound(Bound.START, variables);
+sliceRange.finish = getRequestedBound(Bound.END, variables);
 sliceRange.reversed = isReversed;
 sliceRange.count = -1; // We use this for range slices, where the 
count is ignored in favor of the global column count
 thriftSlicePredicate.slice_range = sliceRange;
@@ -495,6 +495,11 @@ public class SelectStatement implements CQLStatement
 {
 assert isColumnRange();
 
+// The end-of-component of composite doesn't depend on whether the
+// component type is reversed or not (i.e. the ReversedType is applied
+// to the component comparator but not to the end-of-component itself),
+// it only depends on whether the slice is reversed
+Bound eocBound = isReversed ? Bound.reverse(bound) : bound;
 ColumnNameBuilder builder = cfDef.getColumnNameBuilder();
 for (CFDefinition.Name name : cfDef.columns.values())
 {
@@ -508,7 +513,7 @@ public class SelectStatement implements CQLStatement
 // There wasn't any non EQ relation on that key, we select all 
records having the preceding component as prefix.
 // For composites, if there was preceding component and we're 
computing the end, we must change the last component
 // End-Of-Component, otherwise we would be selecting only one 
record.
-if (builder.componentCount()  0  b == Bound.END)
+if (builder.componentCount()  0  eocBound == Bound.END)
 return builder.buildAsEndOfRange();
 else
 return builder.build();
@@ -523,7 +528,7 @@ public class SelectStatement implements CQLStatement
 {
 Term t = r.bound(b);
 assert t != null;
-return builder.add(t, r.getRelation(b), variables).build();
+return builder.add(t, r.getRelation(eocBound, b), 
variables).build();
 }
 }
 // Means no relation at all or everything was an equal
@@ -1283,14 +1288,14 @@ public class SelectStatement implements CQLStatement
 return bounds[b.idx] == null || boundInclusive[b.idx];
 }
 
-public Relation.Type 

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

2012-10-04 Thread slebresne
Updated Branches:
  refs/heads/trunk db36acbf1 - 038aa6bca


Merge branch 'cassandra-1.1' into trunk

Conflicts:
src/java/org/apache/cassandra/cql3/statements/SelectStatement.java


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

Branch: refs/heads/trunk
Commit: 038aa6bca3d1857d929764e18be71d19e6573bdc
Parents: db36acb eff4b68
Author: Sylvain Lebresne sylv...@datastax.com
Authored: Thu Oct 4 17:03:34 2012 +0200
Committer: Sylvain Lebresne sylv...@datastax.com
Committed: Thu Oct 4 17:03:34 2012 +0200

--
 CHANGES.txt|2 +-
 .../cassandra/cql3/statements/SelectStatement.java |   17 +-
 2 files changed, 12 insertions(+), 7 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/038aa6bc/CHANGES.txt
--
diff --cc CHANGES.txt
index 32d76b4,c0a252e..85ca018
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -105,9 -13,10 +105,9 @@@
   * fix re-created keyspace disappering after 1.1.5 upgrade (CASSANDRA-4698)
   * (CLI) display elapsed time in 2 fraction digits (CASSANDRA-3460)
   * add authentication support to sstableloader (CASSANDRA-4712)
-  * Fix CQL3 'is reversed' logic (CASSANDRA-4716)
+  * Fix CQL3 'is reversed' logic (CASSANDRA-4716, 4759)
   * (CQL3) Don't return ReversedType in result set metadata (CASSANDRA-4717)
   * Pluggable Thrift transport factories for CLI (CASSANDRA-4609)
 - * Backport adding AlterKeyspace statement (CASSANDRA-4611)
  Merged from 1.0:
   * Switch from NBHM to CHM in MessagingService's callback map, which
 prevents OOM in long-running instances (CASSANDRA-4708)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/038aa6bc/src/java/org/apache/cassandra/cql3/statements/SelectStatement.java
--
diff --cc src/java/org/apache/cassandra/cql3/statements/SelectStatement.java
index 08b8211,92a8d67..301c7c4
--- a/src/java/org/apache/cassandra/cql3/statements/SelectStatement.java
+++ b/src/java/org/apache/cassandra/cql3/statements/SelectStatement.java
@@@ -499,8 -491,16 +499,13 @@@ public class SelectStatement implement
  }
  }
  
 -private ByteBuffer getRequestedBound(Bound bound, ListByteBuffer 
variables) throws InvalidRequestException
 +private ByteBuffer buildBound(Bound bound, Restriction[] restrictions, 
ColumnNameBuilder builder, ListByteBuffer variables) throws 
InvalidRequestException
  {
 -assert isColumnRange();
 -
+ // The end-of-component of composite doesn't depend on whether the
+ // component type is reversed or not (i.e. the ReversedType is applied
+ // to the component comparator but not to the end-of-component 
itself),
+ // it only depends on whether the slice is reversed
+ Bound eocBound = isReversed ? Bound.reverse(bound) : bound;
 -ColumnNameBuilder builder = cfDef.getColumnNameBuilder();
  for (CFDefinition.Name name : cfDef.columns.values())
  {
  // In a restriction, we always have Bound.START  Bound.END for 
the base comparator.



[jira] [Created] (CASSANDRA-4762) Support multiple OR clauses for CQL3 Compact storage

2012-10-04 Thread T Jake Luciani (JIRA)
T Jake Luciani created CASSANDRA-4762:
-

 Summary: Support multiple OR clauses for CQL3 Compact storage
 Key: CASSANDRA-4762
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4762
 Project: Cassandra
  Issue Type: Improvement
  Components: Core
Reporter: T Jake Luciani
 Fix For: 1.2.0


Given CASSANDRA-3885

It seems it should be possible to store multiple ranges for many predicates 
even the inner parts of a composite column.

They could be expressed as a expanded set of filter queries.


example:

{code}
CREATE TABLE test (
   name text,
   tdate timestamp,
   tdate2 timestamp,
   tdate3 timestamp,
   num double,
   PRIMARY KEY(key,tdate,tdate2,tdate3)
 ) WITH COMPACT STORAGE;

SELECT * FROM test WHERE 
  name IN ('a','b') and
  tdate IN ('2010-01-01','2011-01-01') and
  tdate2 IN ('2010-01-01','2011-01-01') and
  tdate3 IN ('2010-01-01','2011-01-01') and
  num  1.0

{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


[2/3] git commit: cqlsh: add thrift transport factory imeplementation Patch by Aleksey Yeschenko, reviewed brandonwilliams

2012-10-04 Thread brandonwilliams
cqlsh: add thrift transport factory imeplementation
Patch by Aleksey Yeschenko, reviewed brandonwilliams


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

Branch: refs/heads/trunk
Commit: 1c2922c22366e08a01b0c3852c10bd4260c09de0
Parents: 038aa6b
Author: Brandon Williams brandonwilli...@apache.org
Authored: Thu Oct 4 09:50:05 2012 -0500
Committer: Brandon Williams brandonwilli...@apache.org
Committed: Thu Oct 4 10:04:43 2012 -0500

--
 bin/cqlsh   |   43 ++---
 lib/cql-internal-only-1.2.0.zip |  Bin 83243 - 0 bytes
 lib/cql-internal-only-1.3.0.zip |  Bin 0 - 90260 bytes
 pylib/cqlshlib/tfactory.py  |   32 +
 4 files changed, 66 insertions(+), 9 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/1c2922c2/bin/cqlsh
--
diff --git a/bin/cqlsh b/bin/cqlsh
index 2ac95b2..0cc50c2 100755
--- a/bin/cqlsh
+++ b/bin/cqlsh
@@ -32,7 +32,7 @@ exit 1
 from __future__ import with_statement
 
 description = CQL Shell for Apache Cassandra
-version = 2.2.0
+version = 2.3.0
 
 from StringIO import StringIO
 from itertools import groupby
@@ -115,6 +115,7 @@ HISTORY = os.path.expanduser(os.path.join('~', 
'.cqlsh_history'))
 DEFAULT_HOST = 'localhost'
 DEFAULT_PORT = 9160
 DEFAULT_CQLVER = '3'
+DEFAULT_TRANSPORT_FACTORY = 'cqlshlib.tfactory.regular_transport_factory'
 
 epilog = Connects to %(DEFAULT_HOST)s:%(DEFAULT_PORT)d by default. These
 defaults can be changed by setting $CQLSH_HOST and/or $CQLSH_PORT. When a
@@ -131,8 +132,9 @@ parser.add_option(--no-color, action='store_false', 
dest='color',
 parser.add_option(-u, --username, help=Authenticate as user.)
 parser.add_option(-p, --password, help=Authenticate using password.)
 parser.add_option('-k', '--keyspace', help='Authenticate to the given 
keyspace.')
-parser.add_option(-f, --file,
-  help=Execute commands from FILE, then exit)
+parser.add_option(-f, --file, help=Execute commands from FILE, then exit)
+parser.add_option(-t, --transport-factory,
+  help=Use the provided Thrift transport factory function.)
 parser.add_option('--debug', action='store_true',
   help='Show additional debugging information')
 parser.add_option('--cqlversion', default=DEFAULT_CQLVER,
@@ -413,19 +415,22 @@ class Shell(cmd.Cmd):
 csv_dialect_defaults = dict(delimiter=',', doublequote=False,
 escapechar='\\', quotechar='')
 
-def __init__(self, hostname, port, color=False, username=None,
- password=None, encoding=None, stdin=None, tty=True,
+def __init__(self, hostname, port, transport_factory, color=False,
+ username=None, password=None, encoding=None, stdin=None, 
tty=True,
  completekey='tab', use_conn=None, cqlver=None, keyspace=None):
 cmd.Cmd.__init__(self, completekey=completekey)
 self.hostname = hostname
 self.port = port
+self.transport_factory = transport_factory
 self.username = username
 self.password = password
 self.keyspace = keyspace
 if use_conn is not None:
 self.conn = use_conn
 else:
-self.conn = cql.connect(hostname, port, user=username, 
password=password)
+transport = transport_factory(hostname, port, os.environ, 
CONFIG_FILE)
+self.conn = cql.connect(hostname, port, user=username, 
password=password,
+transport=transport)
 self.set_expanded_cql_version(cqlver)
 # we could set the keyspace through cql.connect(), but as of 
1.0.10,
 # it doesn't quote the keyspace for USE :(
@@ -1680,9 +1685,9 @@ class Shell(cmd.Cmd):
 except IOError, e:
 self.printerr('Could not open %r: %s' % (fname, e))
 return
-subshell = Shell(self.hostname, self.port, color=self.color,
- encoding=self.encoding, stdin=f, tty=False,
- use_conn=self.conn, cqlver=self.cql_version)
+subshell = Shell(self.hostname, self.port, self.transport_factory,
+ color=self.color, encoding=self.encoding, stdin=f,
+ tty=False, use_conn=self.conn, 
cqlver=self.cql_version)
 subshell.cmdloop()
 f.close()
 
@@ -2513,6 +2518,21 @@ def should_use_color():
 pass
 return True
 
+def load_factory(name):
+
+Attempts to load a transport factory function given its fully qualified
+name, e.g. 

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

2012-10-04 Thread brandonwilliams
Updated Branches:
  refs/heads/trunk 038aa6bca - 780ccc8ba


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/780ccc8b
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/780ccc8b
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/780ccc8b

Branch: refs/heads/trunk
Commit: 780ccc8baef1ed9467d54d46e0c17eebcfeba003
Parents: 1c2922c 51e4b7a
Author: Brandon Williams brandonwilli...@apache.org
Authored: Thu Oct 4 10:06:28 2012 -0500
Committer: Brandon Williams brandonwilli...@apache.org
Committed: Thu Oct 4 10:06:28 2012 -0500

--

--




[3/3] git commit: cqlsh: add thrift transport factory Patch by Aleksey Yeschenko, reviewed by brandonwilliams for CASSANDRA-4610

2012-10-04 Thread brandonwilliams
cqlsh: add thrift transport factory
Patch by Aleksey Yeschenko, reviewed by brandonwilliams for
CASSANDRA-4610


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

Branch: refs/heads/trunk
Commit: 51e4b7adf1dc8ec9ed1c297d9c1362d260a72810
Parents: 2ce7b9b
Author: Brandon Williams brandonwilli...@apache.org
Authored: Thu Oct 4 09:45:29 2012 -0500
Committer: Brandon Williams brandonwilli...@apache.org
Committed: Thu Oct 4 09:45:29 2012 -0500

--
 bin/cqlsh |   43 ++--
 lib/cql-internal-only-1.0.10-4610.zip |  Bin 0 - 70392 bytes
 lib/cql-internal-only-1.0.10.zip  |  Bin 68142 - 0 bytes
 pylib/cqlshlib/tfactory.py|   32 
 4 files changed, 66 insertions(+), 9 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/51e4b7ad/bin/cqlsh
--
diff --git a/bin/cqlsh b/bin/cqlsh
index f984618..c242cf9 100755
--- a/bin/cqlsh
+++ b/bin/cqlsh
@@ -32,7 +32,7 @@ exit 1
 from __future__ import with_statement
 
 description = CQL Shell for Apache Cassandra
-version = 2.2.0
+version = 2.3.0
 
 from StringIO import StringIO
 from itertools import groupby
@@ -112,6 +112,7 @@ HISTORY = os.path.expanduser(os.path.join('~', 
'.cqlsh_history'))
 DEFAULT_HOST = 'localhost'
 DEFAULT_PORT = 9160
 DEFAULT_CQLVER = '2'
+DEFAULT_TRANSPORT_FACTORY = 'cqlshlib.tfactory.regular_transport_factory'
 
 epilog = Connects to %(DEFAULT_HOST)s:%(DEFAULT_PORT)d by default. These
 defaults can be changed by setting $CQLSH_HOST and/or $CQLSH_PORT. When a
@@ -128,8 +129,9 @@ parser.add_option(--no-color, action='store_false', 
dest='color',
 parser.add_option(-u, --username, help=Authenticate as user.)
 parser.add_option(-p, --password, help=Authenticate using password.)
 parser.add_option('-k', '--keyspace', help='Authenticate to the given 
keyspace.')
-parser.add_option(-f, --file,
-  help=Execute commands from FILE, then exit)
+parser.add_option(-f, --file, help=Execute commands from FILE, then exit)
+parser.add_option(-t, --transport-factory,
+  help=Use the provided Thrift transport factory function.)
 parser.add_option('--debug', action='store_true',
   help='Show additional debugging information')
 parser.add_option('--cqlversion', default=DEFAULT_CQLVER,
@@ -557,19 +559,22 @@ class Shell(cmd.Cmd):
 csv_dialect_defaults = dict(delimiter=',', doublequote=False,
 escapechar='\\', quotechar='')
 
-def __init__(self, hostname, port, color=False, username=None,
- password=None, encoding=None, stdin=None, tty=True,
+def __init__(self, hostname, port, transport_factory, color=False,
+ username=None, password=None, encoding=None, stdin=None, 
tty=True,
  completekey='tab', use_conn=None, cqlver=None, keyspace=None):
 cmd.Cmd.__init__(self, completekey=completekey)
 self.hostname = hostname
 self.port = port
+self.transport_factory = transport_factory
 self.username = username
 self.password = password
 self.keyspace = keyspace
 if use_conn is not None:
 self.conn = use_conn
 else:
-self.conn = cql.connect(hostname, port, user=username, 
password=password)
+transport = transport_factory(hostname, port, os.environ, 
CONFIG_FILE)
+self.conn = cql.connect(hostname, port, user=username, 
password=password,
+transport=transport)
 self.set_expanded_cql_version(cqlver)
 # we could set the keyspace through cql.connect(), but as of 
1.0.10,
 # it doesn't quote the keyspace for USE :(
@@ -1794,9 +1799,9 @@ class Shell(cmd.Cmd):
 except IOError, e:
 self.printerr('Could not open %r: %s' % (fname, e))
 return
-subshell = Shell(self.hostname, self.port, color=self.color,
- encoding=self.encoding, stdin=f, tty=False,
- use_conn=self.conn, cqlver=self.cql_version)
+subshell = Shell(self.hostname, self.port, self.transport_factory,
+ color=self.color, encoding=self.encoding, stdin=f,
+ tty=False, use_conn=self.conn, 
cqlver=self.cql_version)
 subshell.cmdloop()
 f.close()
 
@@ -2627,6 +2632,21 @@ def should_use_color():
 pass
 return True
 
+def load_factory(name):
+
+Attempts to load a transport factory function given its fully qualified
+

git commit: cqlsh: add thrift transport factory Patch by Aleksey Yeschenko, reviewed by brandonwilliams for CASSANDRA-4610

2012-10-04 Thread brandonwilliams
Updated Branches:
  refs/heads/cassandra-1.1 eff4b6866 - 3f31642c3


cqlsh: add thrift transport factory
Patch by Aleksey Yeschenko, reviewed by brandonwilliams for
CASSANDRA-4610


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

Branch: refs/heads/cassandra-1.1
Commit: 3f31642c39b458ee221e2e1194f3f550555c7688
Parents: eff4b68
Author: Brandon Williams brandonwilli...@apache.org
Authored: Thu Oct 4 09:45:29 2012 -0500
Committer: Brandon Williams brandonwilli...@apache.org
Committed: Thu Oct 4 10:08:35 2012 -0500

--
 bin/cqlsh |   43 ++--
 lib/cql-internal-only-1.0.10-4610.zip |  Bin 0 - 70392 bytes
 lib/cql-internal-only-1.0.10.zip  |  Bin 68142 - 0 bytes
 pylib/cqlshlib/tfactory.py|   32 
 4 files changed, 66 insertions(+), 9 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/3f31642c/bin/cqlsh
--
diff --git a/bin/cqlsh b/bin/cqlsh
index f984618..c242cf9 100755
--- a/bin/cqlsh
+++ b/bin/cqlsh
@@ -32,7 +32,7 @@ exit 1
 from __future__ import with_statement
 
 description = CQL Shell for Apache Cassandra
-version = 2.2.0
+version = 2.3.0
 
 from StringIO import StringIO
 from itertools import groupby
@@ -112,6 +112,7 @@ HISTORY = os.path.expanduser(os.path.join('~', 
'.cqlsh_history'))
 DEFAULT_HOST = 'localhost'
 DEFAULT_PORT = 9160
 DEFAULT_CQLVER = '2'
+DEFAULT_TRANSPORT_FACTORY = 'cqlshlib.tfactory.regular_transport_factory'
 
 epilog = Connects to %(DEFAULT_HOST)s:%(DEFAULT_PORT)d by default. These
 defaults can be changed by setting $CQLSH_HOST and/or $CQLSH_PORT. When a
@@ -128,8 +129,9 @@ parser.add_option(--no-color, action='store_false', 
dest='color',
 parser.add_option(-u, --username, help=Authenticate as user.)
 parser.add_option(-p, --password, help=Authenticate using password.)
 parser.add_option('-k', '--keyspace', help='Authenticate to the given 
keyspace.')
-parser.add_option(-f, --file,
-  help=Execute commands from FILE, then exit)
+parser.add_option(-f, --file, help=Execute commands from FILE, then exit)
+parser.add_option(-t, --transport-factory,
+  help=Use the provided Thrift transport factory function.)
 parser.add_option('--debug', action='store_true',
   help='Show additional debugging information')
 parser.add_option('--cqlversion', default=DEFAULT_CQLVER,
@@ -557,19 +559,22 @@ class Shell(cmd.Cmd):
 csv_dialect_defaults = dict(delimiter=',', doublequote=False,
 escapechar='\\', quotechar='')
 
-def __init__(self, hostname, port, color=False, username=None,
- password=None, encoding=None, stdin=None, tty=True,
+def __init__(self, hostname, port, transport_factory, color=False,
+ username=None, password=None, encoding=None, stdin=None, 
tty=True,
  completekey='tab', use_conn=None, cqlver=None, keyspace=None):
 cmd.Cmd.__init__(self, completekey=completekey)
 self.hostname = hostname
 self.port = port
+self.transport_factory = transport_factory
 self.username = username
 self.password = password
 self.keyspace = keyspace
 if use_conn is not None:
 self.conn = use_conn
 else:
-self.conn = cql.connect(hostname, port, user=username, 
password=password)
+transport = transport_factory(hostname, port, os.environ, 
CONFIG_FILE)
+self.conn = cql.connect(hostname, port, user=username, 
password=password,
+transport=transport)
 self.set_expanded_cql_version(cqlver)
 # we could set the keyspace through cql.connect(), but as of 
1.0.10,
 # it doesn't quote the keyspace for USE :(
@@ -1794,9 +1799,9 @@ class Shell(cmd.Cmd):
 except IOError, e:
 self.printerr('Could not open %r: %s' % (fname, e))
 return
-subshell = Shell(self.hostname, self.port, color=self.color,
- encoding=self.encoding, stdin=f, tty=False,
- use_conn=self.conn, cqlver=self.cql_version)
+subshell = Shell(self.hostname, self.port, self.transport_factory,
+ color=self.color, encoding=self.encoding, stdin=f,
+ tty=False, use_conn=self.conn, 
cqlver=self.cql_version)
 subshell.cmdloop()
 f.close()
 
@@ -2627,6 +2632,21 @@ def should_use_color():
 pass
 return True
 
+def load_factory(name):
+
+

[jira] [Commented] (CASSANDRA-4752) Drop keyspace causes schema disagreement

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

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

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

Verified Jonathans fix +1

 Drop keyspace causes schema disagreement 
 -

 Key: CASSANDRA-4752
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4752
 Project: Cassandra
  Issue Type: Bug
Affects Versions: 1.1.6
Reporter: Sam Tunnicliffe
Assignee: Sam Tunnicliffe
 Attachments: 0001-CASSANDRA-4752.txt, 4752-v2.txt


 The fix for CASSANDRA-4698 introduced a bug whereby when drop keyspace is 
 issued a schema disagreement immediately occurs. This seems to be because the 
 {code}ColumnFamily cf = 
 ColumnFamily.create(modification.getValue().metadata());{code}
 in {{RowMutation.deserializeFixingTimestamps}} does not preserve deletion 
 info for the cf in the modification. In most cases, this doesn't cause a 
 problem, but for a drop keyspace modification, there are no columns in the 
 cf, so the deletion info is effectively lost leading to an incorrect digest 
 being created and ultimately a schema disagreement.
 Replacing the {{create}} with {{cloneMeShallow}} does preserve the deletion 
 info and avoids the schema disagreement issue.

--
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-4752) Drop keyspace causes schema disagreement

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

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

T Jake Luciani updated CASSANDRA-4752:
--

Comment: was deleted

(was: Verified Jonathans fix +1)

 Drop keyspace causes schema disagreement 
 -

 Key: CASSANDRA-4752
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4752
 Project: Cassandra
  Issue Type: Bug
Affects Versions: 1.1.6
Reporter: Sam Tunnicliffe
Assignee: Sam Tunnicliffe
 Attachments: 0001-CASSANDRA-4752.txt, 4752-v2.txt


 The fix for CASSANDRA-4698 introduced a bug whereby when drop keyspace is 
 issued a schema disagreement immediately occurs. This seems to be because the 
 {code}ColumnFamily cf = 
 ColumnFamily.create(modification.getValue().metadata());{code}
 in {{RowMutation.deserializeFixingTimestamps}} does not preserve deletion 
 info for the cf in the modification. In most cases, this doesn't cause a 
 problem, but for a drop keyspace modification, there are no columns in the 
 cf, so the deletion info is effectively lost leading to an incorrect digest 
 being created and ultimately a schema disagreement.
 Replacing the {{create}} with {{cloneMeShallow}} does preserve the deletion 
 info and avoids the schema disagreement issue.

--
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 Push Summary

2012-10-04 Thread slebresne
Updated Tags:  refs/tags/cassandra-1.0.12 [created] fcfd88b7e


Git Push Summary

2012-10-04 Thread slebresne
Updated Tags:  refs/tags/1.0.12-tentative [deleted] 373e5b0d5


[jira] [Commented] (CASSANDRA-4762) Support multiple OR clauses for CQL3 Compact storage

2012-10-04 Thread Sylvain Lebresne (JIRA)

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

Sylvain Lebresne commented on CASSANDRA-4762:
-

Agreed, though I suppose for the query you meant something like:
{noformat}
SELECT * FROM test WHERE 
  name IN ('a','b') and
  tdate IN ('2010-01-01','2011-01-01') and
  tdate2 IN ('2010-01-01','2011-01-01') and
  tdate3  '2010-01-01'
{noformat}
Otherwise, it's more a 2ndary index query is that doesn't have much to do with 
CASSANDRA-3885.

Also, there is no reason to make that work only for compact storage.

 Support multiple OR clauses for CQL3 Compact storage
 

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


 Given CASSANDRA-3885
 It seems it should be possible to store multiple ranges for many predicates 
 even the inner parts of a composite column.
 They could be expressed as a expanded set of filter queries.
 example:
 {code}
 CREATE TABLE test (
name text,
tdate timestamp,
tdate2 timestamp,
tdate3 timestamp,
num double,
PRIMARY KEY(key,tdate,tdate2,tdate3)
  ) WITH COMPACT STORAGE;
 SELECT * FROM test WHERE 
   name IN ('a','b') and
   tdate IN ('2010-01-01','2011-01-01') and
   tdate2 IN ('2010-01-01','2011-01-01') and
   tdate3 IN ('2010-01-01','2011-01-01') and
   num  1.0
 {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


[2/4] git commit: Avoid discarding dropped ks deletion timestamp patch by Sam Tunnicliffe and jbellis; reviewed by tjake for CASSANDRA-4752

2012-10-04 Thread jbellis
Avoid discarding dropped ks deletion timestamp
patch by Sam Tunnicliffe and jbellis; reviewed by tjake for CASSANDRA-4752


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

Branch: refs/heads/cassandra-1.1
Commit: 0d44159e63a2f5b56d621ba71a2f3fadd7f5a301
Parents: 3f31642
Author: Jonathan Ellis jbel...@apache.org
Authored: Thu Oct 4 10:28:52 2012 -0500
Committer: Jonathan Ellis jbel...@apache.org
Committed: Thu Oct 4 10:28:52 2012 -0500

--
 CHANGES.txt   |3 ++-
 src/java/org/apache/cassandra/db/RowMutation.java |9 +
 2 files changed, 7 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/0d44159e/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index c0a252e..218c320 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -10,7 +10,8 @@
  * Automatic fixing of overlapping leveled sstables (CASSANDRA-4644)
  * fix error when using ORDER BY with extended selections (CASSANDRA-4689)
  * (CQL3) Fix validation for IN queries for non-PK cols (CASSANDRA-4709)
- * fix re-created keyspace disappering after 1.1.5 upgrade (CASSANDRA-4698)
+ * fix re-created keyspace disappering after 1.1.5 upgrade 
+   (CASSANDRA-4698, 4752)
  * (CLI) display elapsed time in 2 fraction digits (CASSANDRA-3460)
  * add authentication support to sstableloader (CASSANDRA-4712)
  * Fix CQL3 'is reversed' logic (CASSANDRA-4716, 4759)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/0d44159e/src/java/org/apache/cassandra/db/RowMutation.java
--
diff --git a/src/java/org/apache/cassandra/db/RowMutation.java 
b/src/java/org/apache/cassandra/db/RowMutation.java
index 51dac68..3a05df9 100644
--- a/src/java/org/apache/cassandra/db/RowMutation.java
+++ b/src/java/org/apache/cassandra/db/RowMutation.java
@@ -462,12 +462,13 @@ public class RowMutation implements IMutation, 
MessageProducer
 
 for (Map.EntryInteger, ColumnFamily modification : 
mutation.modifications_.entrySet())
 {
-ColumnFamily cf = 
ColumnFamily.create(modification.getValue().metadata());
+ColumnFamily cfOld = modification.getValue();
+ColumnFamily cf = ColumnFamily.create(cfOld.metadata());
 
-if (cf.isMarkedForDelete())
-cf.delete(cf.getLocalDeletionTime(), 
cf.getMarkedForDeleteAt()  now ? now : cf.getMarkedForDeleteAt());
+if (cfOld.isMarkedForDelete())
+cf.delete(cfOld.getLocalDeletionTime(), 
cfOld.getMarkedForDeleteAt()  now ? now : cfOld.getMarkedForDeleteAt());
 
-for (IColumn column : modification.getValue().columns)
+for (IColumn column : cfOld.columns)
 {
 // don't clone if column already has a correct timestamp
 if (column.timestamp() = now)



[3/4] git commit: Avoid discarding dropped ks deletion timestamp patch by Sam Tunnicliffe and jbellis; reviewed by tjake for CASSANDRA-4752

2012-10-04 Thread jbellis
Avoid discarding dropped ks deletion timestamp
patch by Sam Tunnicliffe and jbellis; reviewed by tjake for CASSANDRA-4752


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

Branch: refs/heads/trunk
Commit: 0d44159e63a2f5b56d621ba71a2f3fadd7f5a301
Parents: 3f31642
Author: Jonathan Ellis jbel...@apache.org
Authored: Thu Oct 4 10:28:52 2012 -0500
Committer: Jonathan Ellis jbel...@apache.org
Committed: Thu Oct 4 10:28:52 2012 -0500

--
 CHANGES.txt   |3 ++-
 src/java/org/apache/cassandra/db/RowMutation.java |9 +
 2 files changed, 7 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/0d44159e/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index c0a252e..218c320 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -10,7 +10,8 @@
  * Automatic fixing of overlapping leveled sstables (CASSANDRA-4644)
  * fix error when using ORDER BY with extended selections (CASSANDRA-4689)
  * (CQL3) Fix validation for IN queries for non-PK cols (CASSANDRA-4709)
- * fix re-created keyspace disappering after 1.1.5 upgrade (CASSANDRA-4698)
+ * fix re-created keyspace disappering after 1.1.5 upgrade 
+   (CASSANDRA-4698, 4752)
  * (CLI) display elapsed time in 2 fraction digits (CASSANDRA-3460)
  * add authentication support to sstableloader (CASSANDRA-4712)
  * Fix CQL3 'is reversed' logic (CASSANDRA-4716, 4759)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/0d44159e/src/java/org/apache/cassandra/db/RowMutation.java
--
diff --git a/src/java/org/apache/cassandra/db/RowMutation.java 
b/src/java/org/apache/cassandra/db/RowMutation.java
index 51dac68..3a05df9 100644
--- a/src/java/org/apache/cassandra/db/RowMutation.java
+++ b/src/java/org/apache/cassandra/db/RowMutation.java
@@ -462,12 +462,13 @@ public class RowMutation implements IMutation, 
MessageProducer
 
 for (Map.EntryInteger, ColumnFamily modification : 
mutation.modifications_.entrySet())
 {
-ColumnFamily cf = 
ColumnFamily.create(modification.getValue().metadata());
+ColumnFamily cfOld = modification.getValue();
+ColumnFamily cf = ColumnFamily.create(cfOld.metadata());
 
-if (cf.isMarkedForDelete())
-cf.delete(cf.getLocalDeletionTime(), 
cf.getMarkedForDeleteAt()  now ? now : cf.getMarkedForDeleteAt());
+if (cfOld.isMarkedForDelete())
+cf.delete(cfOld.getLocalDeletionTime(), 
cfOld.getMarkedForDeleteAt()  now ? now : cfOld.getMarkedForDeleteAt());
 
-for (IColumn column : modification.getValue().columns)
+for (IColumn column : cfOld.columns)
 {
 // don't clone if column already has a correct timestamp
 if (column.timestamp() = now)



[1/4] git commit: merge from 1.1

2012-10-04 Thread jbellis
Updated Branches:
  refs/heads/cassandra-1.1 3f31642c3 - 0d44159e6
  refs/heads/trunk 780ccc8ba - b07e53cfb


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

Branch: refs/heads/trunk
Commit: b07e53cfb95c3a28727744699edc333cdab325c3
Parents: 780ccc8 0d44159
Author: Jonathan Ellis jbel...@apache.org
Authored: Thu Oct 4 10:35:07 2012 -0500
Committer: Jonathan Ellis jbel...@apache.org
Committed: Thu Oct 4 10:35:07 2012 -0500

--
 CHANGES.txt   |3 ++-
 src/java/org/apache/cassandra/db/RowMutation.java |   13 +++--
 2 files changed, 9 insertions(+), 7 deletions(-)
--


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

http://git-wip-us.apache.org/repos/asf/cassandra/blob/b07e53cf/src/java/org/apache/cassandra/db/RowMutation.java
--
diff --cc src/java/org/apache/cassandra/db/RowMutation.java
index 1a5f871,3a05df9..c37bcfb
--- a/src/java/org/apache/cassandra/db/RowMutation.java
+++ b/src/java/org/apache/cassandra/db/RowMutation.java
@@@ -431,20 -458,17 +431,21 @@@ public class RowMutation implements IMu
  RowMutation mutation = deserialize(dis, version);
  
  long now = FBUtilities.timestampMicros();
 -MapInteger, ColumnFamily fixedModifications = new 
HashMapInteger, ColumnFamily();
 +MapUUID, ColumnFamily fixedModifications = new HashMapUUID, 
ColumnFamily();
  
 -for (Map.EntryInteger, ColumnFamily modification : 
mutation.modifications_.entrySet())
 +for (Map.EntryUUID, ColumnFamily modification : 
mutation.modifications.entrySet())
  {
- ColumnFamily cf = 
ColumnFamily.create(modification.getValue().metadata());
+ ColumnFamily cfOld = modification.getValue();
+ ColumnFamily cf = ColumnFamily.create(cfOld.metadata());
  
- if (cf.isMarkedForDelete())
+ if (cfOld.isMarkedForDelete())
 -cf.delete(cfOld.getLocalDeletionTime(), 
cfOld.getMarkedForDeleteAt()  now ? now : cfOld.getMarkedForDeleteAt());
 +{
- DeletionTime delTime = 
cf.deletionInfo().getTopLevelDeletion();
- cf.delete(new DeletionInfo(delTime.markedForDeleteAt  
now ? now : delTime.markedForDeleteAt,
-delTime.localDeletionTime));
++DeletionTime dt = 
cfOld.deletionInfo().getTopLevelDeletion();
++cf.delete(new DeletionInfo(dt.markedForDeleteAt  now ? 
now : dt.markedForDeleteAt,
++   dt.localDeletionTime));
 +}
  
- for (IColumn column : modification.getValue().columns)
+ for (IColumn column : cfOld.columns)
  {
  // don't clone if column already has a correct timestamp
  if (column.timestamp() = now)



[jira] [Commented] (CASSANDRA-4761) Batch hints delivery

2012-10-04 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis commented on CASSANDRA-4761:
---

I don't think they are very similar.  4047 is about how can I hint an entire 
sstable, and this is about how can I optimize hint delivery over the WAN.

Personally I don't think you'd be well-served by writing out sstables locally 
for hints and streaming them over.  Easier and more effective to make hint 
delivery asynchronous -- instead of waiting for each hint to be acked before 
sending another, send hints continuously (until throttled) and create callbacks 
to delete successfully delivered ones.

 Batch hints delivery
 

 Key: CASSANDRA-4761
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4761
 Project: Cassandra
  Issue Type: Improvement
  Components: Core
Affects Versions: 1.1.2
Reporter: Alexey Zotov
Assignee: Alexey Zotov
  Labels: hintedhandoff

 Hints delivery to remote DC can take a long time (currently we have 70 ms for 
 each hint). In our estimates 700 MB of data (stored hints) will be 
 transmitting to remote DC more than one day (in our case), it's unacceptable 
 for us. We suggest to enter hints delivery using batch operations. 
 What do you think about it? Is there some facts that won't allow to implement 
 that mechanism?
 I'll try to implement it if you approve and clarify right way.

--
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-4762) Support multiple OR clauses for CQL3 Compact storage

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

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

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

right

 Support multiple OR clauses for CQL3 Compact storage
 

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


 Given CASSANDRA-3885
 It seems it should be possible to store multiple ranges for many predicates 
 even the inner parts of a composite column.
 They could be expressed as a expanded set of filter queries.
 example:
 {code}
 CREATE TABLE test (
name text,
tdate timestamp,
tdate2 timestamp,
tdate3 timestamp,
num double,
PRIMARY KEY(key,tdate,tdate2,tdate3)
  ) WITH COMPACT STORAGE;
 SELECT * FROM test WHERE 
   name IN ('a','b') and
   tdate IN ('2010-01-01','2011-01-01') and
   tdate2 IN ('2010-01-01','2011-01-01') and
   tdate3 IN ('2010-01-01','2011-01-01') and
   num  1.0
 {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


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

2012-10-04 Thread slebresne
Author: slebresne
Date: Thu Oct  4 16:04:42 2012
New Revision: 1394125

URL: http://svn.apache.org/viewvc?rev=1394125view=rev
Log:
Update website for 1.0.12 release

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

Modified: cassandra/site/publish/download/index.html
URL: 
http://svn.apache.org/viewvc/cassandra/site/publish/download/index.html?rev=1394125r1=1394124r2=1394125view=diff
==
--- cassandra/site/publish/download/index.html (original)
+++ cassandra/site/publish/download/index.html Thu Oct  4 16:04:42 2012
@@ -127,16 +127,16 @@
   p
   Previous stable branches of Cassandra continue to see periodic maintenance
   for some time after a new major release is made. The lastest release on the
-  1.0 branch is 1.0.11 (released on
-  2012-07-31).
+  1.0 branch is 1.0.12 (released on
+  2012-10-04).
   /p
 
   ul
 li
-a class=filename 
href=http://www.apache.org/dyn/closer.cgi?path=/cassandra/1.0.11/apache-cassandra-1.0.11-bin.tar.gz;apache-cassandra-1.0.11-bin.tar.gz/a
-[a 
href=http://www.apache.org/dist/cassandra/1.0.11/apache-cassandra-1.0.11-bin.tar.gz.asc;PGP/a]
-[a 
href=http://www.apache.org/dist/cassandra/1.0.11/apache-cassandra-1.0.11-bin.tar.gz.md5;MD5/a]
-[a 
href=http://www.apache.org/dist/cassandra/1.0.11/apache-cassandra-1.0.11-bin.tar.gz.sha1;SHA1/a]
+a class=filename 
href=http://www.apache.org/dyn/closer.cgi?path=/cassandra/1.0.12/apache-cassandra-1.0.12-bin.tar.gz;apache-cassandra-1.0.12-bin.tar.gz/a
+[a 
href=http://www.apache.org/dist/cassandra/1.0.12/apache-cassandra-1.0.12-bin.tar.gz.asc;PGP/a]
+[a 
href=http://www.apache.org/dist/cassandra/1.0.12/apache-cassandra-1.0.12-bin.tar.gz.md5;MD5/a]
+[a 
href=http://www.apache.org/dist/cassandra/1.0.12/apache-cassandra-1.0.12-bin.tar.gz.sha1;SHA1/a]
 /li
   /ul
   
@@ -179,10 +179,10 @@
 /li
   
 li
-a class=filename 
href=http://www.apache.org/dyn/closer.cgi?path=/cassandra/1.0.11/apache-cassandra-1.0.11-src.tar.gz;apache-cassandra-1.0.11-src.tar.gz/a
-[a 
href=http://www.apache.org/dist/cassandra/1.0.11/apache-cassandra-1.0.11-src.tar.gz.asc;PGP/a]
-[a 
href=http://www.apache.org/dist/cassandra/1.0.11/apache-cassandra-1.0.11-src.tar.gz.md5;MD5/a]
-[a 
href=http://www.apache.org/dist/cassandra/1.0.11/apache-cassandra-1.0.11-src.tar.gz.sha1;SHA1/a]
+a class=filename 
href=http://www.apache.org/dyn/closer.cgi?path=/cassandra/1.0.12/apache-cassandra-1.0.12-src.tar.gz;apache-cassandra-1.0.12-src.tar.gz/a
+[a 
href=http://www.apache.org/dist/cassandra/1.0.12/apache-cassandra-1.0.12-src.tar.gz.asc;PGP/a]
+[a 
href=http://www.apache.org/dist/cassandra/1.0.12/apache-cassandra-1.0.12-src.tar.gz.md5;MD5/a]
+[a 
href=http://www.apache.org/dist/cassandra/1.0.12/apache-cassandra-1.0.12-src.tar.gz.sha1;SHA1/a]
 /li
   
   

Modified: cassandra/site/src/settings.py
URL: 
http://svn.apache.org/viewvc/cassandra/site/src/settings.py?rev=1394125r1=1394124r2=1394125view=diff
==
--- cassandra/site/src/settings.py (original)
+++ cassandra/site/src/settings.py Thu Oct  4 16:04:42 2012
@@ -92,8 +92,8 @@ SITE_POST_PROCESSORS = {
 }
 
 class CassandraDef(object):
-oldstable_version = '1.0.11'
-oldstable_release_date = '2012-07-31'
+oldstable_version = '1.0.12'
+oldstable_release_date = '2012-10-04'
 oldstable_exists = True
 veryoldstable_version = '0.8.10'
 veryoldstable_release_date = '2012-02-13'




[jira] [Created] (CASSANDRA-4763) SSTableLoader shouldn't get keyspace from path

2012-10-04 Thread Nick Bailey (JIRA)
Nick Bailey created CASSANDRA-4763:
--

 Summary: SSTableLoader shouldn't get keyspace from path
 Key: CASSANDRA-4763
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4763
 Project: Cassandra
  Issue Type: Bug
  Components: Tools
Affects Versions: 1.2.0 beta 1
Reporter: Nick Bailey
Priority: Minor


SSTableLoader currently gets the keyspace it is going to load to from the path 
of the directoy of sstables it is loading. This isn't really documented (or I 
didn't see it), but also isn't really a good way of doing it in general.

{noformat}
this.keyspace = directory.getParentFile().getName();
{noformat}

We should probably just let users pass the name in. If you are loading a 
snapshot the file names will have the keyspace which is slightly better but 
people manually creating their own sstables might not format them the same.



--
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-4667) optimize memtable deletions for batchlog

2012-10-04 Thread Aleksey Yeschenko (JIRA)

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

Aleksey Yeschenko reopened CASSANDRA-4667:
--


SSTableWriter.closeAndOpenReader() throws NPE if nothing gets written

 optimize memtable deletions for batchlog
 

 Key: CASSANDRA-4667
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4667
 Project: Cassandra
  Issue Type: Sub-task
Reporter: Aleksey Yeschenko
Assignee: Aleksey Yeschenko
 Fix For: 1.2.0 beta 2

 Attachments: CASSANDRA-4667-v1.1.patch, CASSANDRA-4667-v2.patch, 
 CASSANDRA-4667-v3.txt, CASSANDRA-4667-v4.txt


 Batchlog writes with the same key are never retried. This means that if a 
 batchlog row is in the memtable, it can't be in any of the sstables, ever. In 
 such cases we don't need to write a tombstone to disk. We can purge the row 
 completely from the memtable and only write a tombstone if the row had been 
 flushed already (if it's not in the memtable then it must be in one of the 
 sstables).

--
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-4351) Consider storing more informations on peers in system tables

2012-10-04 Thread Sylvain Lebresne (JIRA)

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

Sylvain Lebresne updated CASSANDRA-4351:


Attachment: 0002-Save-tokens-as-strings.txt
0001-4351.txt

Attaching a patch for this. It pretty much change the peers table to look like 
what's described above. It also change the local table to use an actual set 
instead of some hand-made serialization of the tokens.

I'm also attaching a second patch to write tokens as string instead of bytes. 
The pros being that if we do that, the output of reading the local and peers 
table is more readable (and I don't think the slightly higher space on the disk 
matter). That being said, if people really prefer keeping them as blob, I won't 
insist too much.

 Consider storing more informations on peers in system tables 
 -

 Key: CASSANDRA-4351
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4351
 Project: Cassandra
  Issue Type: Improvement
  Components: Core
Reporter: Sylvain Lebresne
Priority: Minor
 Fix For: 1.2.0 beta 2

 Attachments: 0001-4351.txt, 0002-Save-tokens-as-strings.txt


 Currently, the only thing we keep in system tables about other peers is their 
 token and IP addresses. We should probably also record the new ring_id, but 
 since CASSANDRA-4018 makes system table easily queriable, may it could be 
 worth adding some more information (basically most of what we gossip could be 
 a candidate (schema UUID, status, C* version, ...)) as a simple way to expose 
 the ring state to users (even if it's just a view of the ring state from 
 one specific node I believe it's still nice).
 Of course that means storing information that may not be absolutely needed by 
 the server, but I'm not sure there is much harm to that.
 Note that doing this cleanly may require changing the schema of current 
 system tables but as long as we do that in the 1.2 timeframe it's ok (since 
 the concerned system table 'local' and 'peers' are news anyway).

--
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-4351) Consider storing more informations on peers in system tables

2012-10-04 Thread Sylvain Lebresne (JIRA)

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

Sylvain Lebresne updated CASSANDRA-4351:


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

 Consider storing more informations on peers in system tables 
 -

 Key: CASSANDRA-4351
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4351
 Project: Cassandra
  Issue Type: Improvement
  Components: Core
Reporter: Sylvain Lebresne
Priority: Minor
 Fix For: 1.2.0 beta 2

 Attachments: 0001-4351.txt, 0002-Save-tokens-as-strings.txt


 Currently, the only thing we keep in system tables about other peers is their 
 token and IP addresses. We should probably also record the new ring_id, but 
 since CASSANDRA-4018 makes system table easily queriable, may it could be 
 worth adding some more information (basically most of what we gossip could be 
 a candidate (schema UUID, status, C* version, ...)) as a simple way to expose 
 the ring state to users (even if it's just a view of the ring state from 
 one specific node I believe it's still nice).
 Of course that means storing information that may not be absolutely needed by 
 the server, but I'm not sure there is much harm to that.
 Note that doing this cleanly may require changing the schema of current 
 system tables but as long as we do that in the 1.2 timeframe it's ok (since 
 the concerned system table 'local' and 'peers' are news anyway).

--
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-4763) SSTableLoader shouldn't get keyspace from path

2012-10-04 Thread Sylvain Lebresne (JIRA)

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

Sylvain Lebresne commented on CASSANDRA-4763:
-

Just to add context, this was done initially because it was pretty hard to do 
otherwise due to the hard-coded way sstables names were parsed. This was 
changed in 1.1 however, so we should be able to do that easily now.

 SSTableLoader shouldn't get keyspace from path
 --

 Key: CASSANDRA-4763
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4763
 Project: Cassandra
  Issue Type: Bug
  Components: Tools
Affects Versions: 1.2.0 beta 1
Reporter: Nick Bailey
Priority: Minor

 SSTableLoader currently gets the keyspace it is going to load to from the 
 path of the directoy of sstables it is loading. This isn't really documented 
 (or I didn't see it), but also isn't really a good way of doing it in general.
 {noformat}
 this.keyspace = directory.getParentFile().getName();
 {noformat}
 We should probably just let users pass the name in. If you are loading a 
 snapshot the file names will have the keyspace which is slightly better but 
 people manually creating their own sstables might not format them the same.

--
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-4764) Bulk Loading should run in STREAM_STAGE

2012-10-04 Thread Nick Bailey (JIRA)
Nick Bailey created CASSANDRA-4764:
--

 Summary: Bulk Loading should run in STREAM_STAGE
 Key: CASSANDRA-4764
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4764
 Project: Cassandra
  Issue Type: Bug
Affects Versions: 1.2.0 beta 1
Reporter: Nick Bailey
Priority: Minor


Currently it appears as though bulk loading operations don't run in any stage. 
Seems like they should be running in STREAM_STAGE.

--
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-4739) Prepared Statements don't support collections

2012-10-04 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis commented on CASSANDRA-4739:
---

+1, although it seems weird to have partly-prepared statements to me.  Weird in 
the I hope this doesn't get a lot more complicated and cause us grief in the 
future kind of way. :)

 Prepared Statements don't support collections
 -

 Key: CASSANDRA-4739
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4739
 Project: Cassandra
  Issue Type: Bug
Affects Versions: 1.2.0 beta 1
 Environment: Cassandra 937f15e1
 OS X 10.8.2
 java version 1.6.0_35
 Java(TM) SE Runtime Environment (build 1.6.0_35-b10-428-11M3811)
 Java HotSpot(TM) 64-Bit Server VM (build 20.10-b01-428, mixed mode)
Reporter: Jonathan Rudenberg
Assignee: Sylvain Lebresne
 Fix For: 1.2.0 beta 2

 Attachments: 4739.txt


 I'm putting a collection onto the wire in an EXECUTE request with exactly the 
 same bytes that Cassandra encodes the same data in a response:
 Can't apply operation on column with 
 org.apache.cassandra.db.marshal.SetType(org.apache.cassandra.db.marshal.UTF8Type)
  type
 Here's the full trace log from cassandra:
 {noformat}
 DEBUG 19:24:15,414 Received: PREPARE INSERT INTO things (id, set_text) VALUES 
 (?, ?);
 TRACE 19:24:15,414 CQL QUERY: INSERT INTO things (id, set_text) VALUES (?, ?);
 TRACE 19:24:15,415 Stored prepared statement #413587006 with 2 bind markers
 DEBUG 19:24:15,415 Responding: RESULT PREPARED 413587006 
 [id(gocql_collections, things), 
 org.apache.cassandra.db.marshal.TimeUUIDType][set_text(gocql_collections, 
 things), 
 org.apache.cassandra.db.marshal.SetType(org.apache.cassandra.db.marshal.UTF8Type)]
 DEBUG 19:24:15,416 Received: EXECUTE 413587006 with 2 values
 TRACE 19:24:15,416 [1] 'java.nio.HeapByteBuffer[pos=18 lim=34 cap=53]'
 TRACE 19:24:15,416 [2] 'java.nio.HeapByteBuffer[pos=38 lim=51 cap=53]'
 DEBUG 19:24:15,417 Responding: ERROR INVALID: Can't apply operation on column 
 with 
 org.apache.cassandra.db.marshal.SetType(org.apache.cassandra.db.marshal.UTF8Type)
  type.
 {noformat}
 The prepared statement is:
 {noformat}
 INSERT INTO things (id, set_text) VALUES (?, ?);
 {noformat}
 and the collection value ({'asdf', 'sdf'}) is encoded as:
 {noformat}
 00 02 00 04 61 73 64 66 00 03 73 64 66
 {noformat}
 which is byte-for-byte exactly the same as what I get from Cassandra off the 
 wire when I do a query for the same data.
 I already have the driver working with other queries/inserts with all other 
 types, so this is just a collection encoding problem.

--
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: improve use of generics

2012-10-04 Thread jbellis
Updated Branches:
  refs/heads/trunk b07e53cfb - d54a93f2d


improve use of generics


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

Branch: refs/heads/trunk
Commit: d54a93f2d4696e146ef7b58cf81c40a66443058d
Parents: b07e53c
Author: Jonathan Ellis jbel...@apache.org
Authored: Thu Oct 4 12:53:19 2012 -0500
Committer: Jonathan Ellis jbel...@apache.org
Committed: Thu Oct 4 12:53:19 2012 -0500

--
 .../org/apache/cassandra/db/marshal/ListType.java  |4 ++--
 .../org/apache/cassandra/db/marshal/MapType.java   |4 ++--
 .../org/apache/cassandra/db/marshal/SetType.java   |6 +++---
 3 files changed, 7 insertions(+), 7 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/d54a93f2/src/java/org/apache/cassandra/db/marshal/ListType.java
--
diff --git a/src/java/org/apache/cassandra/db/marshal/ListType.java 
b/src/java/org/apache/cassandra/db/marshal/ListType.java
index c7b6817..7ee5e79 100644
--- a/src/java/org/apache/cassandra/db/marshal/ListType.java
+++ b/src/java/org/apache/cassandra/db/marshal/ListType.java
@@ -45,10 +45,10 @@ public class ListTypeT extends CollectionTypeListT
 
 public static synchronized T ListTypeT getInstance(AbstractTypeT 
elements)
 {
-ListType t = instances.get(elements);
+ListTypeT t = instances.get(elements);
 if (t == null)
 {
-t = new ListType(elements);
+t = new ListTypeT(elements);
 instances.put(elements, t);
 }
 return t;

http://git-wip-us.apache.org/repos/asf/cassandra/blob/d54a93f2/src/java/org/apache/cassandra/db/marshal/MapType.java
--
diff --git a/src/java/org/apache/cassandra/db/marshal/MapType.java 
b/src/java/org/apache/cassandra/db/marshal/MapType.java
index 54c130e..8e0b161 100644
--- a/src/java/org/apache/cassandra/db/marshal/MapType.java
+++ b/src/java/org/apache/cassandra/db/marshal/MapType.java
@@ -47,10 +47,10 @@ public class MapTypeK, V extends CollectionTypeMapK, V
 public static synchronized K, V MapTypeK, V 
getInstance(AbstractTypeK keys, AbstractTypeV values)
 {
 PairAbstractType?, AbstractType? p = Pair.AbstractType?, 
AbstractType?create(keys, values);
-MapType t = instances.get(p);
+MapTypeK, V t = instances.get(p);
 if (t == null)
 {
-t = new MapType(keys, values);
+t = new MapTypeK, V(keys, values);
 instances.put(p, t);
 }
 return t;

http://git-wip-us.apache.org/repos/asf/cassandra/blob/d54a93f2/src/java/org/apache/cassandra/db/marshal/SetType.java
--
diff --git a/src/java/org/apache/cassandra/db/marshal/SetType.java 
b/src/java/org/apache/cassandra/db/marshal/SetType.java
index 45b6e54..724754f 100644
--- a/src/java/org/apache/cassandra/db/marshal/SetType.java
+++ b/src/java/org/apache/cassandra/db/marshal/SetType.java
@@ -43,12 +43,12 @@ public class SetTypeT extends CollectionTypeSetT
 return getInstance(l.get(0));
 }
 
-public static synchronized T SetType getInstance(AbstractTypeT 
elements)
+public static synchronized T SetTypeT getInstance(AbstractTypeT 
elements)
 {
-SetType t = instances.get(elements);
+SetTypeT t = instances.get(elements);
 if (t == null)
 {
-t = new SetType(elements);
+t = new SetTypeT(elements);
 instances.put(elements, t);
 }
 return t;



[jira] [Commented] (CASSANDRA-4763) SSTableLoader shouldn't get keyspace from path

2012-10-04 Thread Nick Bailey (JIRA)

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

Nick Bailey commented on CASSANDRA-4763:


I didn't notice before but it looks like we require sstable files to be named 
according to the convention cassandra is using? If that is true, then yeah 
getting the keyspace name from the actual sstable file name is probably the 
right approach here.

 SSTableLoader shouldn't get keyspace from path
 --

 Key: CASSANDRA-4763
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4763
 Project: Cassandra
  Issue Type: Bug
  Components: Tools
Affects Versions: 1.2.0 beta 1
Reporter: Nick Bailey
Priority: Minor

 SSTableLoader currently gets the keyspace it is going to load to from the 
 path of the directoy of sstables it is loading. This isn't really documented 
 (or I didn't see it), but also isn't really a good way of doing it in general.
 {noformat}
 this.keyspace = directory.getParentFile().getName();
 {noformat}
 We should probably just let users pass the name in. If you are loading a 
 snapshot the file names will have the keyspace which is slightly better but 
 people manually creating their own sstables might not format them the same.

--
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-4765) StackOverflowError in CompactionExecutor thread

2012-10-04 Thread Ahmed Bashir (JIRA)
Ahmed Bashir created CASSANDRA-4765:
---

 Summary: StackOverflowError in CompactionExecutor thread
 Key: CASSANDRA-4765
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4765
 Project: Cassandra
  Issue Type: Bug
Affects Versions: 1.1.4
Reporter: Ahmed Bashir


Seeing the following error:


Exception in thread Thread[CompactionExecutor:21,1,RMI Runtime]
java.lang.StackOverflowError
at com.google.common.collect.Sets$1.iterator(Sets.java:578)
at com.google.common.collect.Sets$1.iterator(Sets.java:578)
at com.google.common.collect.Sets$1.iterator(Sets.java:578)
at com.google.common.collect.Sets$1.iterator(Sets.java:578)
at com.google.common.collect.Sets$1.iterator(Sets.java:578)
at com.google.common.collect.Sets$1.iterator(Sets.java:578)
at com.google.common.collect.Sets$1.iterator(Sets.java:578)
at com.google.common.collect.Sets$1.iterator(Sets.java:578)
at com.google.common.collect.Sets$1.iterator(Sets.java:578)
at com.google.common.collect.Sets$1.iterator(Sets.java:578)
at com.google.common.collect.Sets$1.iterator(Sets.java:578)
at com.google.common.collect.Sets$1.iterator(Sets.java:578)
at com.google.common.collect.Sets$1.iterator(Sets.java:578)
at com.google.common.collect.Sets$1.iterator(Sets.java:578)

We are seeing SSTable ID's in L0 corresponding to nonexistent SSTables; this 
may be the cause

--
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-4765) StackOverflowError in CompactionExecutor thread

2012-10-04 Thread Brandon Williams (JIRA)

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

Brandon Williams commented on CASSANDRA-4765:
-

Which java version is this on?  You might be able to increase the Xss flag as a 
workaround.

 StackOverflowError in CompactionExecutor thread
 ---

 Key: CASSANDRA-4765
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4765
 Project: Cassandra
  Issue Type: Bug
Affects Versions: 1.1.4
Reporter: Ahmed Bashir

 Seeing the following error:
 Exception in thread Thread[CompactionExecutor:21,1,RMI Runtime]
 java.lang.StackOverflowError
 at com.google.common.collect.Sets$1.iterator(Sets.java:578)
 at com.google.common.collect.Sets$1.iterator(Sets.java:578)
 at com.google.common.collect.Sets$1.iterator(Sets.java:578)
 at com.google.common.collect.Sets$1.iterator(Sets.java:578)
 at com.google.common.collect.Sets$1.iterator(Sets.java:578)
 at com.google.common.collect.Sets$1.iterator(Sets.java:578)
 at com.google.common.collect.Sets$1.iterator(Sets.java:578)
 at com.google.common.collect.Sets$1.iterator(Sets.java:578)
 at com.google.common.collect.Sets$1.iterator(Sets.java:578)
 at com.google.common.collect.Sets$1.iterator(Sets.java:578)
 at com.google.common.collect.Sets$1.iterator(Sets.java:578)
 at com.google.common.collect.Sets$1.iterator(Sets.java:578)
 at com.google.common.collect.Sets$1.iterator(Sets.java:578)
 at com.google.common.collect.Sets$1.iterator(Sets.java:578)
 We are seeing SSTable ID's in L0 corresponding to nonexistent SSTables; this 
 may be the cause

--
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-4765) StackOverflowError in CompactionExecutor thread

2012-10-04 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis commented on CASSANDRA-4765:
---

This is from the SetView returned by Sets.union:

{code}
. @Override public IteratorE iterator() {
return Iterators.unmodifiableIterator(
Iterators.concat(set1.iterator(), set2minus1.iterator()));
  }
{code}

I don't think we're taking 100s of unions so increasing Xss is unlikely to help.

 StackOverflowError in CompactionExecutor thread
 ---

 Key: CASSANDRA-4765
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4765
 Project: Cassandra
  Issue Type: Bug
Affects Versions: 1.1.4
Reporter: Ahmed Bashir

 Seeing the following error:
 Exception in thread Thread[CompactionExecutor:21,1,RMI Runtime]
 java.lang.StackOverflowError
 at com.google.common.collect.Sets$1.iterator(Sets.java:578)
 at com.google.common.collect.Sets$1.iterator(Sets.java:578)
 at com.google.common.collect.Sets$1.iterator(Sets.java:578)
 at com.google.common.collect.Sets$1.iterator(Sets.java:578)
 at com.google.common.collect.Sets$1.iterator(Sets.java:578)
 at com.google.common.collect.Sets$1.iterator(Sets.java:578)
 at com.google.common.collect.Sets$1.iterator(Sets.java:578)
 at com.google.common.collect.Sets$1.iterator(Sets.java:578)
 at com.google.common.collect.Sets$1.iterator(Sets.java:578)
 at com.google.common.collect.Sets$1.iterator(Sets.java:578)
 at com.google.common.collect.Sets$1.iterator(Sets.java:578)
 at com.google.common.collect.Sets$1.iterator(Sets.java:578)
 at com.google.common.collect.Sets$1.iterator(Sets.java:578)
 at com.google.common.collect.Sets$1.iterator(Sets.java:578)
 We are seeing SSTable ID's in L0 corresponding to nonexistent SSTables; this 
 may be the cause

--
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-4765) StackOverflowError in CompactionExecutor thread

2012-10-04 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis updated CASSANDRA-4765:
--

Attachment: 4765.txt

Actually we do take union in a loop in getOverlappingSSTables.  Give this patch 
a try.

 StackOverflowError in CompactionExecutor thread
 ---

 Key: CASSANDRA-4765
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4765
 Project: Cassandra
  Issue Type: Bug
Affects Versions: 1.1.4
Reporter: Ahmed Bashir
 Attachments: 4765.txt


 Seeing the following error:
 Exception in thread Thread[CompactionExecutor:21,1,RMI Runtime]
 java.lang.StackOverflowError
 at com.google.common.collect.Sets$1.iterator(Sets.java:578)
 at com.google.common.collect.Sets$1.iterator(Sets.java:578)
 at com.google.common.collect.Sets$1.iterator(Sets.java:578)
 at com.google.common.collect.Sets$1.iterator(Sets.java:578)
 at com.google.common.collect.Sets$1.iterator(Sets.java:578)
 at com.google.common.collect.Sets$1.iterator(Sets.java:578)
 at com.google.common.collect.Sets$1.iterator(Sets.java:578)
 at com.google.common.collect.Sets$1.iterator(Sets.java:578)
 at com.google.common.collect.Sets$1.iterator(Sets.java:578)
 at com.google.common.collect.Sets$1.iterator(Sets.java:578)
 at com.google.common.collect.Sets$1.iterator(Sets.java:578)
 at com.google.common.collect.Sets$1.iterator(Sets.java:578)
 at com.google.common.collect.Sets$1.iterator(Sets.java:578)
 at com.google.common.collect.Sets$1.iterator(Sets.java:578)
 We are seeing SSTable ID's in L0 corresponding to nonexistent SSTables; this 
 may be the cause

--
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-4698) Keyspace disappears when upgrading node from cassandra-1.1.1 to cassandra-1.1.5

2012-10-04 Thread Sven Delmas (JIRA)

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

Sven Delmas commented on CASSANDRA-4698:


* In 1.1.1, show keyspaces to get schema definitions
* Upgrade to 1.1.5
* Do not run nodetool scrub
* Check keyspaces. If any are missing, recreate table definitions:
  * Shutdown cluster
  * rm data/system/system_schema*
  * Restart cluster
  * Run CREATE KEYSPACE + CREATE TABLE for missing keyspaces

 Keyspace disappears when upgrading node from cassandra-1.1.1 to 
 cassandra-1.1.5
 ---

 Key: CASSANDRA-4698
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4698
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Affects Versions: 1.1.5
 Environment: ubuntu. JNA not installed.
Reporter: Tyler Patterson
Assignee: Pavel Yaskevich
 Fix For: 1.1.6

 Attachments: CASSANDRA-4698.patch, start_1.1.1_system.log, 
 start_1.1.5_system.log


 Here is how I got the problem to happen:
 1. Get this zipped data directory (about 33Mb):
   scp cass@50.57.69.32:/home/cass/cassandra.zip ./ (password cass)
 2. Unzip it in /var/lib/
 3. clone the cassandra git repo
 4. git checkout cassandra-1.1.1; ant jar;
 5. bin/cassandra 
 6. Run cqlsh -3, then DESC COLUMNFAMILIES; Note the presence of Keyspace 
 performance_tests
 7. pkill -f cassandra; git checkout cassandra-1.1.5; ant realclean; ant jar;
 8. bin/cassandra
 9. Run cqlsh -3, then DESC COLUMNFAMILIES; Note that there is no 
 performance_tests keyspace

--
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-4698) Keyspace disappears when upgrading node from cassandra-1.1.1 to cassandra-1.1.5

2012-10-04 Thread Sven Delmas (JIRA)

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

Sven Delmas edited comment on CASSANDRA-4698 at 10/5/12 7:05 AM:
-

* In 1.1.1, show keyspaces to get schema definitions
* Upgrade to 1.1.5
* Do not run nodetool scrub
* Check keyspaces. If any are missing, recreate table definitions:
** Shutdown cluster
** rm data/system/system_schema*
** Restart cluster
** Run CREATE KEYSPACE + CREATE TABLE for missing keyspaces

  was (Author: sdelmas):
* In 1.1.1, show keyspaces to get schema definitions
* Upgrade to 1.1.5
* Do not run nodetool scrub
* Check keyspaces. If any are missing, recreate table definitions:
  * Shutdown cluster
  * rm data/system/system_schema*
  * Restart cluster
  * Run CREATE KEYSPACE + CREATE TABLE for missing keyspaces
  
 Keyspace disappears when upgrading node from cassandra-1.1.1 to 
 cassandra-1.1.5
 ---

 Key: CASSANDRA-4698
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4698
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Affects Versions: 1.1.5
 Environment: ubuntu. JNA not installed.
Reporter: Tyler Patterson
Assignee: Pavel Yaskevich
 Fix For: 1.1.6

 Attachments: CASSANDRA-4698.patch, start_1.1.1_system.log, 
 start_1.1.5_system.log


 Here is how I got the problem to happen:
 1. Get this zipped data directory (about 33Mb):
   scp cass@50.57.69.32:/home/cass/cassandra.zip ./ (password cass)
 2. Unzip it in /var/lib/
 3. clone the cassandra git repo
 4. git checkout cassandra-1.1.1; ant jar;
 5. bin/cassandra 
 6. Run cqlsh -3, then DESC COLUMNFAMILIES; Note the presence of Keyspace 
 performance_tests
 7. pkill -f cassandra; git checkout cassandra-1.1.5; ant realclean; ant jar;
 8. bin/cassandra
 9. Run cqlsh -3, then DESC COLUMNFAMILIES; Note that there is no 
 performance_tests keyspace

--
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-4698) Keyspace disappears when upgrading node from cassandra-1.1.1 to cassandra-1.1.5

2012-10-04 Thread Sven Delmas (JIRA)

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

Sven Delmas edited comment on CASSANDRA-4698 at 10/5/12 7:11 AM:
-

So the final/approved workaround to be documented is:

Before performing an upgrade, please perform a show keyspaces to get the 
current schema definitions. We recommend this as a best practice.

After the upgrade is complete, rerun the show keyspaces and check for any 
drastic changes in the keyspace list.

Should there be keyspaces that disappear during the upgrade, please follow 
these steps:

* In 1.1.1, show keyspaces to get schema definitions
* Upgrade to 1.1.5
* Do not run nodetool scrub
* Check keyspaces. If any are missing, recreate table definitions:
** Shutdown cluster
** rm data/system/system_schema*
** Restart cluster
** Run CREATE KEYSPACE + CREATE TABLE for missing keyspaces

  was (Author: sdelmas):
* In 1.1.1, show keyspaces to get schema definitions
* Upgrade to 1.1.5
* Do not run nodetool scrub
* Check keyspaces. If any are missing, recreate table definitions:
** Shutdown cluster
** rm data/system/system_schema*
** Restart cluster
** Run CREATE KEYSPACE + CREATE TABLE for missing keyspaces
  
 Keyspace disappears when upgrading node from cassandra-1.1.1 to 
 cassandra-1.1.5
 ---

 Key: CASSANDRA-4698
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4698
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Affects Versions: 1.1.5
 Environment: ubuntu. JNA not installed.
Reporter: Tyler Patterson
Assignee: Pavel Yaskevich
 Fix For: 1.1.6

 Attachments: CASSANDRA-4698.patch, start_1.1.1_system.log, 
 start_1.1.5_system.log


 Here is how I got the problem to happen:
 1. Get this zipped data directory (about 33Mb):
   scp cass@50.57.69.32:/home/cass/cassandra.zip ./ (password cass)
 2. Unzip it in /var/lib/
 3. clone the cassandra git repo
 4. git checkout cassandra-1.1.1; ant jar;
 5. bin/cassandra 
 6. Run cqlsh -3, then DESC COLUMNFAMILIES; Note the presence of Keyspace 
 performance_tests
 7. pkill -f cassandra; git checkout cassandra-1.1.5; ant realclean; ant jar;
 8. bin/cassandra
 9. Run cqlsh -3, then DESC COLUMNFAMILIES; Note that there is no 
 performance_tests keyspace

--
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-4698) Keyspace disappears when upgrading node from cassandra-1.1.1 to cassandra-1.1.5

2012-10-04 Thread Sven Delmas (JIRA)

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

Sven Delmas updated CASSANDRA-4698:
---

Comment: was deleted

(was: So the final/approved workaround to be documented is:

Before performing an upgrade, please perform a show keyspaces to get the 
current schema definitions. We recommend this as a best practice.

After the upgrade is complete, rerun the show keyspaces and check for any 
drastic changes in the keyspace list.

Should there be keyspaces that disappear during the upgrade, please follow 
these steps:

* In 1.1.1, show keyspaces to get schema definitions
* Upgrade to 1.1.5
* Do not run nodetool scrub
* Check keyspaces. If any are missing, recreate table definitions:
** Shutdown cluster
** rm data/system/system_schema*
** Restart cluster
** Run CREATE KEYSPACE + CREATE TABLE for missing keyspaces)

 Keyspace disappears when upgrading node from cassandra-1.1.1 to 
 cassandra-1.1.5
 ---

 Key: CASSANDRA-4698
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4698
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Affects Versions: 1.1.5
 Environment: ubuntu. JNA not installed.
Reporter: Tyler Patterson
Assignee: Pavel Yaskevich
 Fix For: 1.1.6

 Attachments: CASSANDRA-4698.patch, start_1.1.1_system.log, 
 start_1.1.5_system.log


 Here is how I got the problem to happen:
 1. Get this zipped data directory (about 33Mb):
   scp cass@50.57.69.32:/home/cass/cassandra.zip ./ (password cass)
 2. Unzip it in /var/lib/
 3. clone the cassandra git repo
 4. git checkout cassandra-1.1.1; ant jar;
 5. bin/cassandra 
 6. Run cqlsh -3, then DESC COLUMNFAMILIES; Note the presence of Keyspace 
 performance_tests
 7. pkill -f cassandra; git checkout cassandra-1.1.5; ant realclean; ant jar;
 8. bin/cassandra
 9. Run cqlsh -3, then DESC COLUMNFAMILIES; Note that there is no 
 performance_tests keyspace

--
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-4766) ReverseCompaction

2012-10-04 Thread Edward Capriolo (JIRA)
Edward Capriolo created CASSANDRA-4766:
--

 Summary: ReverseCompaction
 Key: CASSANDRA-4766
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4766
 Project: Cassandra
  Issue Type: Bug
Reporter: Edward Capriolo


Sometimes you run into a situation where your sized tiered SSTables get to be a 
funky size. Maybe a repair starts this or you were forced into a compaction. In 
any case we should be able to anti-compact a table, since anti-compact is a bad 
word lets call this reverse compact. This could be done online or offline. 
Closely related is SSTables cound have a max size. Leveled is not right for 
everyone.

--
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-4764) Bulk Loading should run in STREAM_STAGE

2012-10-04 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis updated CASSANDRA-4764:
--

 Reviewer: yukim
Affects Version/s: (was: 1.2.0 beta 1)
   1.1.0
Fix Version/s: 1.2.0 beta 2
 Assignee: Jonathan Ellis
   Labels: streaming  (was: )

 Bulk Loading should run in STREAM_STAGE
 ---

 Key: CASSANDRA-4764
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4764
 Project: Cassandra
  Issue Type: Bug
Affects Versions: 1.1.0
Reporter: Nick Bailey
Assignee: Jonathan Ellis
Priority: Minor
  Labels: streaming
 Fix For: 1.2.0 beta 2

 Attachments: 4764.txt


 Currently it appears as though bulk loading operations don't run in any 
 stage. Seems like they should be running in STREAM_STAGE.

--
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-4764) Bulk Loading should run in STREAM_STAGE

2012-10-04 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis updated CASSANDRA-4764:
--

Attachment: 4764.txt

Looks like post-CASSANDRA-3494 Stage.STREAM is obsolete, since MessagingService 
has a per-target Executor for streams.  Patch attached to clean out the 
vestiges.

 Bulk Loading should run in STREAM_STAGE
 ---

 Key: CASSANDRA-4764
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4764
 Project: Cassandra
  Issue Type: Bug
Affects Versions: 1.2.0 beta 1
Reporter: Nick Bailey
Priority: Minor
 Attachments: 4764.txt


 Currently it appears as though bulk loading operations don't run in any 
 stage. Seems like they should be running in STREAM_STAGE.

--
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-4766) ReverseCompaction

2012-10-04 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis updated CASSANDRA-4766:
--

  Priority: Minor  (was: Major)
Issue Type: New Feature  (was: Bug)

 ReverseCompaction
 -

 Key: CASSANDRA-4766
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4766
 Project: Cassandra
  Issue Type: New Feature
Reporter: Edward Capriolo
Priority: Minor

 Sometimes you run into a situation where your sized tiered SSTables get to be 
 a funky size. Maybe a repair starts this or you were forced into a 
 compaction. In any case we should be able to anti-compact a table, since 
 anti-compact is a bad word lets call this reverse compact. This could be done 
 online or offline. Closely related is SSTables cound have a max size. Leveled 
 is not right for everyone.

--
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-4765) StackOverflowError in CompactionExecutor thread

2012-10-04 Thread Ahmed Bashir (JIRA)

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

Ahmed Bashir updated CASSANDRA-4765:


Description: 
Seeing the following error:


Exception in thread Thread[CompactionExecutor:21,1,RMI Runtime]
java.lang.StackOverflowError
at com.google.common.collect.Sets$1.iterator(Sets.java:578)
at com.google.common.collect.Sets$1.iterator(Sets.java:578)
at com.google.common.collect.Sets$1.iterator(Sets.java:578)
at com.google.common.collect.Sets$1.iterator(Sets.java:578)
at com.google.common.collect.Sets$1.iterator(Sets.java:578)
at com.google.common.collect.Sets$1.iterator(Sets.java:578)
at com.google.common.collect.Sets$1.iterator(Sets.java:578)
at com.google.common.collect.Sets$1.iterator(Sets.java:578)
at com.google.common.collect.Sets$1.iterator(Sets.java:578)
at com.google.common.collect.Sets$1.iterator(Sets.java:578)
at com.google.common.collect.Sets$1.iterator(Sets.java:578)
at com.google.common.collect.Sets$1.iterator(Sets.java:578)
at com.google.common.collect.Sets$1.iterator(Sets.java:578)
at com.google.common.collect.Sets$1.iterator(Sets.java:578)



  was:
Seeing the following error:


Exception in thread Thread[CompactionExecutor:21,1,RMI Runtime]
java.lang.StackOverflowError
at com.google.common.collect.Sets$1.iterator(Sets.java:578)
at com.google.common.collect.Sets$1.iterator(Sets.java:578)
at com.google.common.collect.Sets$1.iterator(Sets.java:578)
at com.google.common.collect.Sets$1.iterator(Sets.java:578)
at com.google.common.collect.Sets$1.iterator(Sets.java:578)
at com.google.common.collect.Sets$1.iterator(Sets.java:578)
at com.google.common.collect.Sets$1.iterator(Sets.java:578)
at com.google.common.collect.Sets$1.iterator(Sets.java:578)
at com.google.common.collect.Sets$1.iterator(Sets.java:578)
at com.google.common.collect.Sets$1.iterator(Sets.java:578)
at com.google.common.collect.Sets$1.iterator(Sets.java:578)
at com.google.common.collect.Sets$1.iterator(Sets.java:578)
at com.google.common.collect.Sets$1.iterator(Sets.java:578)
at com.google.common.collect.Sets$1.iterator(Sets.java:578)

We are seeing SSTable ID's in L0 corresponding to nonexistent SSTables; this 
may be the cause


 StackOverflowError in CompactionExecutor thread
 ---

 Key: CASSANDRA-4765
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4765
 Project: Cassandra
  Issue Type: Bug
Affects Versions: 1.1.4
Reporter: Ahmed Bashir
 Attachments: 4765.txt


 Seeing the following error:
 Exception in thread Thread[CompactionExecutor:21,1,RMI Runtime]
 java.lang.StackOverflowError
 at com.google.common.collect.Sets$1.iterator(Sets.java:578)
 at com.google.common.collect.Sets$1.iterator(Sets.java:578)
 at com.google.common.collect.Sets$1.iterator(Sets.java:578)
 at com.google.common.collect.Sets$1.iterator(Sets.java:578)
 at com.google.common.collect.Sets$1.iterator(Sets.java:578)
 at com.google.common.collect.Sets$1.iterator(Sets.java:578)
 at com.google.common.collect.Sets$1.iterator(Sets.java:578)
 at com.google.common.collect.Sets$1.iterator(Sets.java:578)
 at com.google.common.collect.Sets$1.iterator(Sets.java:578)
 at com.google.common.collect.Sets$1.iterator(Sets.java:578)
 at com.google.common.collect.Sets$1.iterator(Sets.java:578)
 at com.google.common.collect.Sets$1.iterator(Sets.java:578)
 at com.google.common.collect.Sets$1.iterator(Sets.java:578)
 at com.google.common.collect.Sets$1.iterator(Sets.java:578)

--
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-4684) Binary protocol: inform clients of schema changes

2012-10-04 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis commented on CASSANDRA-4684:
---

I'm 99% sure that libpq doesn't push schema changes back to clients so I'm 
skeptical that eclipse tools etc are proof that we need it.

 Binary protocol: inform clients of schema changes
 -

 Key: CASSANDRA-4684
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4684
 Project: Cassandra
  Issue Type: Improvement
Affects Versions: 1.2.0 beta 1
Reporter: Sylvain Lebresne
Assignee: Sylvain Lebresne
Priority: Minor
 Fix For: 1.2.0 beta 2

 Attachments: 0001-Return-schema-change-infos.txt, 
 0002-Add-migration-events.txt


 It would be nice to inform clients when a schema change occurs as this would 
 allow said client to maintain the current state of the schema, which might be 
 useful/desirable. To allow that, we can:
 # return that a query has changed the schema (instead of simply a 'void' 
 return), in the same spirit than CASSANDRA-3707.
 # add events notification on schema change.
 Just to be clear, the goal is only to inform that a change has occured, the 
 client would still have to query the system table to know the exact content 
 of the change, but at least it'll know when to do such query.

--
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-4764) Bulk Loading should run in STREAM_STAGE

2012-10-04 Thread Nick Bailey (JIRA)

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

Nick Bailey commented on CASSANDRA-4764:


So the reason i noticed this is because we bulk loads weren't showing up in the 
stream stage mbean. It sounds like nothing will show up there though. Removing 
the stage is good so that the mbean doesn't show up at all anymore but should 
we make a ticket to expose similar stats from messaging service?

I guess the only thing that mbean provided that the streaming service mbean 
doesn't is completed tasks. So maybe just add a counter there?

 Bulk Loading should run in STREAM_STAGE
 ---

 Key: CASSANDRA-4764
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4764
 Project: Cassandra
  Issue Type: Bug
Affects Versions: 1.1.0
Reporter: Nick Bailey
Assignee: Jonathan Ellis
Priority: Minor
  Labels: streaming
 Fix For: 1.2.0 beta 2

 Attachments: 4764.txt


 Currently it appears as though bulk loading operations don't run in any 
 stage. Seems like they should be running in STREAM_STAGE.

--
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-4764) Bulk Loading should run in STREAM_STAGE

2012-10-04 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis commented on CASSANDRA-4764:
---

Do we need it?  Would we count sessions or files or ranges?

 Bulk Loading should run in STREAM_STAGE
 ---

 Key: CASSANDRA-4764
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4764
 Project: Cassandra
  Issue Type: Bug
Affects Versions: 1.1.0
Reporter: Nick Bailey
Assignee: Jonathan Ellis
Priority: Minor
  Labels: streaming
 Fix For: 1.2.0 beta 2

 Attachments: 4764.txt


 Currently it appears as though bulk loading operations don't run in any 
 stage. Seems like they should be running in STREAM_STAGE.

--
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-4351) Consider storing more informations on peers in system tables

2012-10-04 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis commented on CASSANDRA-4351:
---

+1 on 0001.

For 0002 ... what if instead we change LongToken (the default on 1.2 and what 
people should be using) to/fromString to hex-encode with a constant width, 
the way CASSANDRA-4550 wanted?  Of course then we'd need to switch it to 
unsigned comparison to be consistent with what the hex implies.  Dunno, maybe 
it's not worth the trouble.

 Consider storing more informations on peers in system tables 
 -

 Key: CASSANDRA-4351
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4351
 Project: Cassandra
  Issue Type: Improvement
  Components: Core
Reporter: Sylvain Lebresne
Priority: Minor
 Fix For: 1.2.0 beta 2

 Attachments: 0001-4351.txt, 0002-Save-tokens-as-strings.txt


 Currently, the only thing we keep in system tables about other peers is their 
 token and IP addresses. We should probably also record the new ring_id, but 
 since CASSANDRA-4018 makes system table easily queriable, may it could be 
 worth adding some more information (basically most of what we gossip could be 
 a candidate (schema UUID, status, C* version, ...)) as a simple way to expose 
 the ring state to users (even if it's just a view of the ring state from 
 one specific node I believe it's still nice).
 Of course that means storing information that may not be absolutely needed by 
 the server, but I'm not sure there is much harm to that.
 Note that doing this cleanly may require changing the schema of current 
 system tables but as long as we do that in the 1.2 timeframe it's ok (since 
 the concerned system table 'local' and 'peers' are news anyway).

--
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-4764) Bulk Loading should run in STREAM_STAGE

2012-10-04 Thread Nick Bailey (JIRA)

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

Nick Bailey commented on CASSANDRA-4764:


Well just the number of completed tasks probably isn't particularly useful you 
are right.

I feel like we need some additional tracking around streaming though. Currently 
if streaming fails mid stream for bootstrap or move or decom and the like there 
isn't necessarily any indication that something went wrong unless you examine 
the logs. So more useful woud be successful count and failed count on a per 
session basis or something like that.

That is perhaps best decided in a different ticket though.

 Bulk Loading should run in STREAM_STAGE
 ---

 Key: CASSANDRA-4764
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4764
 Project: Cassandra
  Issue Type: Bug
Affects Versions: 1.1.0
Reporter: Nick Bailey
Assignee: Jonathan Ellis
Priority: Minor
  Labels: streaming
 Fix For: 1.2.0 beta 2

 Attachments: 4764.txt


 Currently it appears as though bulk loading operations don't run in any 
 stage. Seems like they should be running in STREAM_STAGE.

--
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-4764) Bulk Loading should run in STREAM_STAGE

2012-10-04 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis commented on CASSANDRA-4764:
---

Yeah, it sounds like we're not really sure what we need.  Maybe just return 
session id to the user so they can ask hey, how's session X doing?

 Bulk Loading should run in STREAM_STAGE
 ---

 Key: CASSANDRA-4764
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4764
 Project: Cassandra
  Issue Type: Bug
Affects Versions: 1.1.0
Reporter: Nick Bailey
Assignee: Jonathan Ellis
Priority: Minor
  Labels: streaming
 Fix For: 1.2.0 beta 2

 Attachments: 4764.txt


 Currently it appears as though bulk loading operations don't run in any 
 stage. Seems like they should be running in STREAM_STAGE.

--
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-4767) Need some indication of node repair success or failure

2012-10-04 Thread Ahmed Bashir (JIRA)
Ahmed Bashir created CASSANDRA-4767:
---

 Summary: Need some indication of node repair success or failure
 Key: CASSANDRA-4767
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4767
 Project: Cassandra
  Issue Type: Improvement
Affects Versions: 1.1.4
Reporter: Ahmed Bashir


We are currently verifying node repair status via basic log analysis.  In order 
to automatically track the status of periodic node repair jobs, it would be 
better to have an indicator (through JMX perhaps).

--
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