git commit: Fix tests

2013-12-20 Thread slebresne
Updated Branches:
  refs/heads/cassandra-2.0 a462083fc - 4d36bbfbb


Fix tests


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

Branch: refs/heads/cassandra-2.0
Commit: 4d36bbfbbb1692ef6038189fdd4981f23431cef0
Parents: a462083
Author: Sylvain Lebresne sylv...@datastax.com
Authored: Fri Dec 20 09:44:38 2013 +0100
Committer: Sylvain Lebresne sylv...@datastax.com
Committed: Fri Dec 20 09:44:38 2013 +0100

--
 .../org/apache/cassandra/service/pager/AbstractQueryPager.java   | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/4d36bbfb/src/java/org/apache/cassandra/service/pager/AbstractQueryPager.java
--
diff --git 
a/src/java/org/apache/cassandra/service/pager/AbstractQueryPager.java 
b/src/java/org/apache/cassandra/service/pager/AbstractQueryPager.java
index 6047b5b..ba4d8f2 100644
--- a/src/java/org/apache/cassandra/service/pager/AbstractQueryPager.java
+++ b/src/java/org/apache/cassandra/service/pager/AbstractQueryPager.java
@@ -197,7 +197,7 @@ abstract class AbstractQueryPager implements QueryPager
 }
 
 // If there is less live data than to discard, all is discarded
-if (i = rows.size())
+if (toDiscard  0  i = rows.size())
 return Collections.RowemptyList();
 
 int count = firstCf.getColumnCount();
@@ -234,7 +234,7 @@ abstract class AbstractQueryPager implements QueryPager
 }
 
 // If there is less live data than to discard, all is discarded
-if (i  0)
+if (toDiscard  0  i  0)
 return Collections.RowemptyList();
 
 int count = lastCf.getColumnCount();



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

2013-12-20 Thread slebresne
Merge branch 'cassandra-2.0' into trunk


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

Branch: refs/heads/trunk
Commit: fb60377442b893590a663d1decd079d7dcb1f055
Parents: 1f7a5d1 4d36bbf
Author: Sylvain Lebresne sylv...@datastax.com
Authored: Fri Dec 20 09:44:58 2013 +0100
Committer: Sylvain Lebresne sylv...@datastax.com
Committed: Fri Dec 20 09:44:58 2013 +0100

--
 .../org/apache/cassandra/service/pager/AbstractQueryPager.java   | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/fb603774/src/java/org/apache/cassandra/service/pager/AbstractQueryPager.java
--



[1/2] git commit: Fix tests

2013-12-20 Thread slebresne
Updated Branches:
  refs/heads/trunk 1f7a5d194 - fb6037744


Fix tests


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

Branch: refs/heads/trunk
Commit: 4d36bbfbbb1692ef6038189fdd4981f23431cef0
Parents: a462083
Author: Sylvain Lebresne sylv...@datastax.com
Authored: Fri Dec 20 09:44:38 2013 +0100
Committer: Sylvain Lebresne sylv...@datastax.com
Committed: Fri Dec 20 09:44:38 2013 +0100

--
 .../org/apache/cassandra/service/pager/AbstractQueryPager.java   | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/4d36bbfb/src/java/org/apache/cassandra/service/pager/AbstractQueryPager.java
--
diff --git 
a/src/java/org/apache/cassandra/service/pager/AbstractQueryPager.java 
b/src/java/org/apache/cassandra/service/pager/AbstractQueryPager.java
index 6047b5b..ba4d8f2 100644
--- a/src/java/org/apache/cassandra/service/pager/AbstractQueryPager.java
+++ b/src/java/org/apache/cassandra/service/pager/AbstractQueryPager.java
@@ -197,7 +197,7 @@ abstract class AbstractQueryPager implements QueryPager
 }
 
 // If there is less live data than to discard, all is discarded
-if (i = rows.size())
+if (toDiscard  0  i = rows.size())
 return Collections.RowemptyList();
 
 int count = firstCf.getColumnCount();
@@ -234,7 +234,7 @@ abstract class AbstractQueryPager implements QueryPager
 }
 
 // If there is less live data than to discard, all is discarded
-if (i  0)
+if (toDiscard  0  i  0)
 return Collections.RowemptyList();
 
 int count = lastCf.getColumnCount();



[jira] [Commented] (CASSANDRA-4165) Generate Digest file for compressed SSTables

2013-12-20 Thread Radovan Zvoncek (JIRA)

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

Radovan Zvoncek commented on CASSANDRA-4165:


Any update on this? I have written a patch for CASSANDRA-5791 but it assumes 
having digests for compressed files available.

 Generate Digest file for compressed SSTables
 

 Key: CASSANDRA-4165
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4165
 Project: Cassandra
  Issue Type: Improvement
  Components: Core
Reporter: Marcus Eriksson
Assignee: Marcus Eriksson
Priority: Minor
  Labels: performance
 Fix For: 2.1

 Attachments: 0001-Generate-digest-for-compressed-files-as-well.patch, 
 4165-rebased.txt


 We use the generated *Digest.sha1-files to verify backups, would be nice if 
 they were generated for compressed sstables as well.



--
This message was sent by Atlassian JIRA
(v6.1.4#6159)


[jira] [Commented] (CASSANDRA-6516) Force shutdown of all repair sessions sometimes fails

2013-12-20 Thread JIRA

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

Jimmy Mårdell commented on CASSANDRA-6516:
--

In fact, the snapshotLatch in RepairJob probably ought to have a time out as 
well. Right now it can wait forever.

I would think the solution is to simply just call terminate() from 
forceShutdown? This seems to unlock the latch. Perhaps there's some drawback 
with this?


 Force shutdown of all repair sessions sometimes fails
 -

 Key: CASSANDRA-6516
 URL: https://issues.apache.org/jira/browse/CASSANDRA-6516
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Reporter: Jimmy Mårdell
Priority: Minor

 The StorageServiceMBean forceTerminateAllRepairSessions method isn't able to 
 shutdown a repair session if it's stuck waiting for snapshots from other 
 nodes.



--
This message was sent by Atlassian JIRA
(v6.1.4#6159)


[jira] [Created] (CASSANDRA-6516) Force shutdown of all repair sessions sometimes fails

2013-12-20 Thread JIRA
Jimmy Mårdell created CASSANDRA-6516:


 Summary: Force shutdown of all repair sessions sometimes fails
 Key: CASSANDRA-6516
 URL: https://issues.apache.org/jira/browse/CASSANDRA-6516
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Reporter: Jimmy Mårdell
Priority: Minor


The StorageServiceMBean forceTerminateAllRepairSessions method isn't able to 
shutdown a repair session if it's stuck waiting for snapshots from other nodes.




--
This message was sent by Atlassian JIRA
(v6.1.4#6159)


git commit: src/java/org/apache/cassandra/hadoop/pig/CqlStorage.java patch by dbrosius reviewed by slebresne for cassandra-6515

2013-12-20 Thread dbrosius
Updated Branches:
  refs/heads/trunk fb6037744 - 0d695d4d1


src/java/org/apache/cassandra/hadoop/pig/CqlStorage.java
patch by dbrosius reviewed by slebresne for cassandra-6515


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

Branch: refs/heads/trunk
Commit: 0d695d4d1eac1241fa251dc45103953aeb977ce2
Parents: fb60377
Author: Dave Brosius dbros...@mebigfatguy.com
Authored: Fri Dec 20 06:03:50 2013 -0500
Committer: Dave Brosius dbros...@mebigfatguy.com
Committed: Fri Dec 20 06:03:50 2013 -0500

--
 src/java/org/apache/cassandra/hadoop/pig/CqlStorage.java | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/0d695d4d/src/java/org/apache/cassandra/hadoop/pig/CqlStorage.java
--
diff --git a/src/java/org/apache/cassandra/hadoop/pig/CqlStorage.java 
b/src/java/org/apache/cassandra/hadoop/pig/CqlStorage.java
index 3dda264..76d8026 100644
--- a/src/java/org/apache/cassandra/hadoop/pig/CqlStorage.java
+++ b/src/java/org/apache/cassandra/hadoop/pig/CqlStorage.java
@@ -187,10 +187,11 @@ public class CqlStorage extends AbstractCassandraStorage
 {
 // standard
 MapByteBuffer,AbstractType validators = getValidatorMap(cfDef);
-if (validators.get(col.name()) == null)
+ByteBuffer cellName = col.name().toByteBuffer();
+if (validators.get(cellName) == null)
 return 
cassandraToObj(getDefaultMarshallers(cfDef).get(MarshallerType.DEFAULT_VALIDATOR),
 col.value());
 else
-return cassandraToObj(validators.get(col.name()), col.value());
+return cassandraToObj(validators.get(cellName), col.value());
 }
 
 /** set read configuration settings */



[jira] [Commented] (CASSANDRA-5701) Apache.Cassandra.Cassandra.get_count will disconnect but not throw InvalidRequestException when column family is not exist.

2013-12-20 Thread Lyuben Todorov (JIRA)

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

Lyuben Todorov commented on CASSANDRA-5701:
---

Here's the [branch|https://github.com/lyubent/cassandra/tree/5701] I think the 
problem was that the patch was added to trunk, but this branch is on 
cassandra-2.0 and should build properly. 

 Apache.Cassandra.Cassandra.get_count will disconnect but not throw 
 InvalidRequestException when column family is not exist.
 ---

 Key: CASSANDRA-5701
 URL: https://issues.apache.org/jira/browse/CASSANDRA-5701
 Project: Cassandra
  Issue Type: Bug
  Components: API
Affects Versions: 1.2.4
 Environment: cassandra server : 1.2.4
 and cassandra1.2.5 has same bug.
 client : C# client
Reporter: yuemaoxing
Assignee: Lyuben Todorov
Priority: Minor
 Fix For: 2.0.5

 Attachments: 5701_cassandra-2.0.patch

   Original Estimate: 24h
  Remaining Estimate: 24h

 When I use get_count interface which is defined in Cassandra.thrift, the 
 Cassandra Server(1.2.4) close the connection from Client when column family 
 is not exist in that keyspace but not throw InvalidRequestException. 
 It seemed the get_count method in cassandra.thrift.CassandraServer.java did 
 not validate parameters(ThriftValidation.validateColumnFamily) in this method.
 system.log:
 ERROR [RPC-Thread:3373] 2013-06-26 14:23:09,264 TNonblockingServer.java (line 
 638) Unexpected exception while invoking!
 java.lang.IllegalArgumentException: Unknown table/cf pair (Keyspace1.Standard)
   at org.apache.cassandra.db.Table.getColumnFamilyStore(Table.java:165)
   at 
 org.apache.cassandra.thrift.CassandraServer.get_count(CassandraServer.java:471)
   at 
 org.apache.cassandra.thrift.Cassandra$Processor$get_count.getResult(Cassandra.java:3381)
   at 
 org.apache.cassandra.thrift.Cassandra$Processor$get_count.getResult(Cassandra.java:3369)
   at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:32)
   at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:34)
   at 
 org.apache.thrift.server.TNonblockingServer$FrameBuffer.invoke(TNonblockingServer.java:632)
   at 
 org.apache.cassandra.thrift.CustomTHsHaServer$Invocation.run(CustomTHsHaServer.java:109)
   at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown 
 Source)
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)
 Please check this bug, thanks!



--
This message was sent by Atlassian JIRA
(v6.1.4#6159)


[jira] [Commented] (CASSANDRA-6224) CQL3 Column family / tables disappear, get unconfigured columnfamily errors

2013-12-20 Thread Lajos Bodrogi (JIRA)

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

Lajos Bodrogi commented on CASSANDRA-6224:
--

Maybe i have a related problem. (Cassandra 2.0.3, Ubuntu 12.04, Cluster of 3 
nodes)

I got the following Perl error: 
ARGH! NEW PRIMARY FAILED: OPCODE_ERROR: unconfigured columnfamily source 
8704 Protocol::CassandraCQL::Frame=SCALAR(0x10f79a0)
And one node stopped responding (the java process was still running) while the 
others in the cluster kept working.

Here are the server logs:
 INFO 12:23:26,299 flushing high-traffic column family CFS(Keyspace='vst8', 
ColumnFamily='series') (estimated 38461316 bytes)
 INFO 12:23:26,299 Enqueuing flush of 
Memtable-series@1926422961(11944355/38461316 serialized/live bytes, 230603 ops)
 INFO 12:23:26,300 Writing Memtable-series@1926422961(11944355/38461316 
serialized/live bytes, 230603 ops)
ERROR 12:23:26,511 Exception in thread Thread[FlushWriter:46,5,main]
FSWriteError in 
/var/lib/cassandra/data/vst8/series/vst8-series-tmp-jb-760-Filter.db
at 
org.apache.cassandra.io.sstable.SSTableWriter$IndexWriter.close(SSTableWriter.java:462)
at 
org.apache.cassandra.io.util.FileUtils.closeQuietly(FileUtils.java:210)
at 
org.apache.cassandra.io.sstable.SSTableWriter.abort(SSTableWriter.java:288)
at 
org.apache.cassandra.db.Memtable$FlushRunnable.writeSortedContents(Memtable.java:387)
at 
org.apache.cassandra.db.Memtable$FlushRunnable.runWith(Memtable.java:320)
at 
org.apache.cassandra.io.util.DiskAwareRunnable.runMayThrow(DiskAwareRunnable.java:48)
at 
org.apache.cassandra.utils.WrappedRunnable.run(WrappedRunnable.java:28)
at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:724)
Caused by: java.io.IOException: No space left on device
at java.io.FileOutputStream.write(Native Method)
at java.io.FileOutputStream.write(FileOutputStream.java:282)
at java.io.DataOutputStream.writeInt(DataOutputStream.java:197)
at 
org.apache.cassandra.utils.BloomFilterSerializer.serialize(BloomFilterSerializer.java:34)
at 
org.apache.cassandra.utils.Murmur3BloomFilter$Murmur3BloomFilterSerializer.serialize(Murmur3BloomFilter.java:44)
at 
org.apache.cassandra.utils.FilterFactory.serialize(FilterFactory.java:41)
at 
org.apache.cassandra.io.sstable.SSTableWriter$IndexWriter.close(SSTableWriter.java:455)
... 9 more
ERROR 12:23:26,513 Stopping gossiper
 WARN 12:23:26,513 Stopping gossip by operator request
 INFO 12:23:26,513 Announcing shutdown
ERROR 12:23:28,513 Stopping RPC server
 INFO 12:23:28,513 Stop listening to thrift clients
ERROR 12:23:28,517 Stopping native transport
 INFO 12:23:28,532 Stop listening for CQL clients

As you can see, the disk went full. 

 CQL3 Column family / tables disappear, get unconfigured columnfamily errors
 -

 Key: CASSANDRA-6224
 URL: https://issues.apache.org/jira/browse/CASSANDRA-6224
 Project: Cassandra
  Issue Type: Bug
  Components: API, Core
 Environment: Cassandra 2.0.1 Amazon AWS Ubuntu Single-node
Reporter: Constance Eustace

 We're seeing CQL3 tables seemingly arbitrarily disappear. Need to repair for 
 prod meant we reconstructed the affected schema before nodetool repairs or 
 similar attempts were done. 
 It seems to take a few days to appear. Volumes are not tremendously high 
 yet...
 Caused by: java.sql.SQLSyntaxErrorException: 
 InvalidRequestException(why:unconfigured columnfamily entity_hierarchydef)
   at 
 org.apache.cassandra.cql.jdbc.CassandraPreparedStatement.init(CassandraPreparedStatement.java:103)
  ~[cassandra-jdbc-1.2.5.jar:na]
   at 
 org.apache.cassandra.cql.jdbc.CassandraConnection.prepareStatement(CassandraConnection.java:388)
  ~[cassandra-jdbc-1.2.5.jar:na]
   at 
 org.apache.cassandra.cql.jdbc.CassandraConnection.prepareStatement(CassandraConnection.java:372)
  ~[cassandra-jdbc-1.2.5.jar:na]
   at 
 org.apache.cassandra.cql.jdbc.CassandraConnection.prepareStatement(CassandraConnection.java:50)
  ~[cassandra-jdbc-1.2.5.jar:na]
   at 
 org.apache.commons.dbcp.DelegatingConnection.prepareStatement(DelegatingConnection.java:281)
  ~[commons-dbcp-1.3.jar:1.3]
   at 
 org.apache.commons.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.prepareStatement(PoolingDataSource.java:313)
  ~[commons-dbcp-1.3.jar:1.3]
   at 
 com.bestbuy.contentsystems.cupcake.storage.cassandra.cqlentity.CQL.tool.CassPSC.createPreparedStatement(CassPSC.java:61)
  ~[ingest-storage-QA-SNAPSHOT.jar:QA-SNAPSHOT]
   at 
 

[jira] [Created] (CASSANDRA-6517) Loose of secondary index entries if nodetool cleanup called before compaction

2013-12-20 Thread Christoph Werres (JIRA)
Christoph Werres created CASSANDRA-6517:
---

 Summary: Loose of secondary index entries if nodetool cleanup 
called before compaction
 Key: CASSANDRA-6517
 URL: https://issues.apache.org/jira/browse/CASSANDRA-6517
 Project: Cassandra
  Issue Type: Bug
  Components: API
 Environment: Ubuntu 12.0.4 with 8+ GB RAM and 40GB hard disk for data 
directory.
Reporter: Christoph Werres


From time to time we had the feeling of not getting all results that should 
have been returned using secondary indexes. Now we tracked down some 
situations and found out, it happened:

1) To primary keys that were already deleted and have been re-created later on

2) After our nightly maintenance scripts were running

We can reproduce now the following szenario:

- create a row entry with an indexed column included
- query it and use the secondary index criteria - Success
- delete it, query again - entry gone as expected
- re-create it with the same key, query it - success again

Now use in exactly that sequence

nodetool cleanup
nodetool flush
nodetool compact

When issuing the query now, we don't get the result using the index. The entry 
is indeed available in it's table when I just ask for the key. Below is the 
exact copy-paste output from CQL when I reproduced the problem with an example 
entry on on of our tables.

mwerrch@mstc01401:/opt/cassandra$ current/bin/cqlsh Connected to 14-15-Cluster 
at localhost:9160.
[cqlsh 4.1.0 | Cassandra 2.0.3 | CQL spec 3.1.1 | Thrift protocol 19.38.0] Use 
HELP for help.
cqlsh use mwerrch;
cqlsh:mwerrch desc tables;

B4Container_Demo

cqlsh:mwerrch desc table B4Container_Demo;

CREATE TABLE B4Container_Demo (
  key uuid,
  archived boolean,
  bytes int,
  computer int,
  deleted boolean,
  description text,
  doarchive boolean,
  filename text,
  first boolean,
  frames int,
  ifversion int,
  imported boolean,
  jobid int,
  keepuntil bigint,
  nextchunk text,
  node int,
  recordingkey blob,
  recstart bigint,
  recstop bigint,
  simulationid bigint,
  systemstart bigint,
  systemstop bigint,
  tapelabel bigint,
  version blob,
  PRIMARY KEY (key)
) WITH COMPACT STORAGE AND
  bloom_filter_fp_chance=0.01 AND
  caching='KEYS_ONLY' AND
  comment='demo' AND
  dclocal_read_repair_chance=0.00 AND
  gc_grace_seconds=604800 AND
  index_interval=128 AND
  read_repair_chance=1.00 AND
  replicate_on_write='true' AND
  populate_io_cache_on_flush='false' AND
  default_time_to_live=0 AND
  speculative_retry='NONE' AND
  memtable_flush_period_in_ms=0 AND
  compaction={'class': 'SizeTieredCompactionStrategy'} AND
  compression={'sstable_compression': 'LZ4Compressor'};

CREATE INDEX mwerrch_Demo_computer ON B4Container_Demo (computer);

CREATE INDEX mwerrch_Demo_node ON B4Container_Demo (node);

CREATE INDEX mwerrch_Demo_recordingkey ON B4Container_Demo (recordingkey);

cqlsh:mwerrch INSERT INTO B4Container_Demo (key,computer,node) VALUES 
(78c70562-1f98-3971-9c28-2c3d8e09c10f, 50, 50); cqlsh:mwerrch select 
key,node,computer from B4Container_Demo where computer=50;

 key  | node | computer
--+--+--
 78c70562-1f98-3971-9c28-2c3d8e09c10f |   50 |   50

(1 rows)

cqlsh:mwerrch DELETE FROM B4Container_Demo WHERE 
key=78c70562-1f98-3971-9c28-2c3d8e09c10f;
cqlsh:mwerrch select key,node,computer from B4Container_Demo where 
computer=50;

(0 rows)

cqlsh:mwerrch INSERT INTO B4Container_Demo (key,computer,node) VALUES 
(78c70562-1f98-3971-9c28-2c3d8e09c10f, 50, 50); cqlsh:mwerrch select 
key,node,computer from B4Container_Demo where computer=50;

 key  | node | computer
--+--+--
 78c70562-1f98-3971-9c28-2c3d8e09c10f |   50 |   50

(1 rows)

**
Now we execute (maybe from a different shell so we don't have to close this 
session) from /opt/cassandra/current/bin directory:
./nodetool cleanup
./nodetool flush
./nodetool compact


Going back to our CQL session the result will no longer be available if queried 
via the index:
*

cqlsh:mwerrch select key,node,computer from B4Container_Demo where 
computer=50;

(0 rows)




--
This message was sent by Atlassian JIRA
(v6.1.4#6159)


[jira] [Commented] (CASSANDRA-6504) counters++

2013-12-20 Thread Aleksey Yeschenko (JIRA)

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

Aleksey Yeschenko commented on CASSANDRA-6504:
--

Delete doesn't commute, neither does assignment. So no assignment, and no 
reusing counter cells after deletion.

 counters++
 --

 Key: CASSANDRA-6504
 URL: https://issues.apache.org/jira/browse/CASSANDRA-6504
 Project: Cassandra
  Issue Type: Improvement
Reporter: Aleksey Yeschenko
Assignee: Aleksey Yeschenko
 Fix For: 2.1


 Continuing CASSANDRA-4775 here.
 We are changing counter write path to explicitly 
 lock-read-modify-unlock-replicate, thus getting rid of the previously used 
 'local' (deltas) and 'remote' shards distinction. Unfortunately, we can't 
 simply start using 'remote' shards exclusively, since shard merge rules 
 prioritize the 'local' shards. Which is why we are introducing the third 
 shard type - 'global', the only shard type to be used in 2.1+.
 The updated merge rules are going to look like this:
 global + global = keep the shard with the highest logical clock
 global + local or remote = keep the global one
 local + local = sum counts (and logical clock)
 local + remote = keep the local one
 remote + remote = keep the shard with highest logical clock
 This is required for backward compatibility with pre-2.1 counters. To make 
 2.0-2.1 live upgrade possible, 'global' shard merge logic will have to be 
 back ported to 2.0. 2.0 will not produce them, but will be able to understand 
 the global shards coming from the 2.1 nodes during the live upgrade. See 
 CASSANDRA-6505.
 Other changes introduced in this issue:
 1. replicate_on_write is gone. From now on we only avoid replication at RF 1.
 2. REPLICATE_ON_WRITE stage is gone
 3. counter mutations are running in their own COUNTER_MUTATION stage now
 4. counter mutations have a separate counter_write_request_timeout setting
 5. mergeAndRemoveOldShards() code is gone, for now, until/unless a better 
 solution is found
 6. we only replicate the fresh global shard now, not the complete 
 (potentially quite large) counter context
 7. to help with concurrency and reduce lock contention, we cache node's 
 global shards in a new counter cache ({cf id, partition key, cell name} - 
 {count, clock}). The cache is only used by counter writes, to help with 'hot' 
 counters being simultaneously updated.
 Improvements to be handled by separate JIRA issues:
 1. Split counter context into separate cells - one shard per cell. See 
 CASSANDRA-6506. This goes into either 2.1 or 3.0.
 Potential improvements still being debated:
 1. Coalesce the mutations in COUNTER_MUTATION stage if they share the same 
 partition key, and apply them together, to improve the locking situation when 
 updating different counter cells in one partition. See CASSANDRA-6508. Will 
 to into 2.1 or 3.0, if deemed beneficial.



--
This message was sent by Atlassian JIRA
(v6.1.4#6159)


[jira] [Commented] (CASSANDRA-6383) Secondary indexing of map keys

2013-12-20 Thread Sylvain Lebresne (JIRA)

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

Sylvain Lebresne commented on CASSANDRA-6383:
-

Btw, forgot to mention that since for a map we don't allow indexing both the 
key and value, there is the question of what to do with a CREATE INDEX IF 
EXISTS if there is an existing index on values and the new create attempts to 
create an index on keys. The current patch reject the query, because that feels 
the most reasonable thing to do, but that does mean that even with IF EXISTS a 
create index can fail, which might be annoying I suppose (not a big deal 
really, just wanted to mention it).

 Secondary indexing of map keys
 --

 Key: CASSANDRA-6383
 URL: https://issues.apache.org/jira/browse/CASSANDRA-6383
 Project: Cassandra
  Issue Type: Improvement
Reporter: Sylvain Lebresne
Assignee: Sylvain Lebresne
 Fix For: 2.1

 Attachments: 6383.txt


 CASSANDRA-4511 started adding secondary indexing for collections, but didn't 
 wired map key indexing because this requires generalizing a bit the 2ndary 
 index API to support 2 indexes on the same column. And since that's not 
 entirely related to the initial problem of CASSANDRA-4511, let's tackle this 
 last part here.
 I'll note that one other is the syntax. For selection, I propose
 {noformat}
 SELECT * FROM foo WHERE myMap CONTAINS KEY 'bar';
 {noformat}
 (but that assumes we use CONTAINS in CASSANDRA-4511, if we use IN, we'll need 
 something else)
 For declaring indexes I'm less inspired. We could have something like
 {noformat}
 CREATE INDEX ON foo(myMap KEYS)
 {noformat}
 but maybe someone has a better idea?



--
This message was sent by Atlassian JIRA
(v6.1.4#6159)


[jira] [Assigned] (CASSANDRA-6517) Loose of secondary index entries if nodetool cleanup called before compaction

2013-12-20 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis reassigned CASSANDRA-6517:
-

Assignee: Michael Shuler

Can you reproduce [~mshuler]?

 Loose of secondary index entries if nodetool cleanup called before compaction
 -

 Key: CASSANDRA-6517
 URL: https://issues.apache.org/jira/browse/CASSANDRA-6517
 Project: Cassandra
  Issue Type: Bug
  Components: API
 Environment: Ubuntu 12.0.4 with 8+ GB RAM and 40GB hard disk for data 
 directory.
Reporter: Christoph Werres
Assignee: Michael Shuler

 From time to time we had the feeling of not getting all results that should 
 have been returned using secondary indexes. Now we tracked down some 
 situations and found out, it happened:
 1) To primary keys that were already deleted and have been re-created later on
 2) After our nightly maintenance scripts were running
 We can reproduce now the following szenario:
 - create a row entry with an indexed column included
 - query it and use the secondary index criteria - Success
 - delete it, query again - entry gone as expected
 - re-create it with the same key, query it - success again
 Now use in exactly that sequence
 nodetool cleanup
 nodetool flush
 nodetool compact
 When issuing the query now, we don't get the result using the index. The 
 entry is indeed available in it's table when I just ask for the key. Below is 
 the exact copy-paste output from CQL when I reproduced the problem with an 
 example entry on on of our tables.
 mwerrch@mstc01401:/opt/cassandra$ current/bin/cqlsh Connected to 
 14-15-Cluster at localhost:9160.
 [cqlsh 4.1.0 | Cassandra 2.0.3 | CQL spec 3.1.1 | Thrift protocol 19.38.0] 
 Use HELP for help.
 cqlsh use mwerrch;
 cqlsh:mwerrch desc tables;
 B4Container_Demo
 cqlsh:mwerrch desc table B4Container_Demo;
 CREATE TABLE B4Container_Demo (
   key uuid,
   archived boolean,
   bytes int,
   computer int,
   deleted boolean,
   description text,
   doarchive boolean,
   filename text,
   first boolean,
   frames int,
   ifversion int,
   imported boolean,
   jobid int,
   keepuntil bigint,
   nextchunk text,
   node int,
   recordingkey blob,
   recstart bigint,
   recstop bigint,
   simulationid bigint,
   systemstart bigint,
   systemstop bigint,
   tapelabel bigint,
   version blob,
   PRIMARY KEY (key)
 ) WITH COMPACT STORAGE AND
   bloom_filter_fp_chance=0.01 AND
   caching='KEYS_ONLY' AND
   comment='demo' AND
   dclocal_read_repair_chance=0.00 AND
   gc_grace_seconds=604800 AND
   index_interval=128 AND
   read_repair_chance=1.00 AND
   replicate_on_write='true' AND
   populate_io_cache_on_flush='false' AND
   default_time_to_live=0 AND
   speculative_retry='NONE' AND
   memtable_flush_period_in_ms=0 AND
   compaction={'class': 'SizeTieredCompactionStrategy'} AND
   compression={'sstable_compression': 'LZ4Compressor'};
 CREATE INDEX mwerrch_Demo_computer ON B4Container_Demo (computer);
 CREATE INDEX mwerrch_Demo_node ON B4Container_Demo (node);
 CREATE INDEX mwerrch_Demo_recordingkey ON B4Container_Demo (recordingkey);
 cqlsh:mwerrch INSERT INTO B4Container_Demo (key,computer,node) VALUES 
 (78c70562-1f98-3971-9c28-2c3d8e09c10f, 50, 50); cqlsh:mwerrch select 
 key,node,computer from B4Container_Demo where computer=50;
  key  | node | computer
 --+--+--
  78c70562-1f98-3971-9c28-2c3d8e09c10f |   50 |   50
 (1 rows)
 cqlsh:mwerrch DELETE FROM B4Container_Demo WHERE 
 key=78c70562-1f98-3971-9c28-2c3d8e09c10f;
 cqlsh:mwerrch select key,node,computer from B4Container_Demo where 
 computer=50;
 (0 rows)
 cqlsh:mwerrch INSERT INTO B4Container_Demo (key,computer,node) VALUES 
 (78c70562-1f98-3971-9c28-2c3d8e09c10f, 50, 50); cqlsh:mwerrch select 
 key,node,computer from B4Container_Demo where computer=50;
  key  | node | computer
 --+--+--
  78c70562-1f98-3971-9c28-2c3d8e09c10f |   50 |   50
 (1 rows)
 **
 Now we execute (maybe from a different shell so we don't have to close this 
 session) from /opt/cassandra/current/bin directory:
 ./nodetool cleanup
 ./nodetool flush
 ./nodetool compact
 Going back to our CQL session the result will no longer be available if 
 queried via the index:
 *
 cqlsh:mwerrch select key,node,computer from B4Container_Demo where 
 computer=50;
 (0 rows)



--
This message was sent by Atlassian JIRA
(v6.1.4#6159)


[jira] [Updated] (CASSANDRA-4268) Expose full stop() operation through JMX

2013-12-20 Thread Lyuben Todorov (JIRA)

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

Lyuben Todorov updated CASSANDRA-4268:
--

Attachment: 4268-cassandra-2.0_v2.patch

Added a System.exit(0) to SS#stopDaemon and switched to using 
CassandraDaemon#deactivate (calls both {{stop()}} and {{destroy()}}). Because 
cassandra is shutting down, an exception is displayed in the nodetool, instead 
of displaying the exception (which isn't a problem as we are shutting C* down) 
it's caught and a Cassandra has shut down message is displayed. 

 Expose full stop() operation through JMX
 

 Key: CASSANDRA-4268
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4268
 Project: Cassandra
  Issue Type: Improvement
  Components: Core
Reporter: Tyler Hobbs
Assignee: Lyuben Todorov
Priority: Minor
  Labels: jmx
 Fix For: 2.0.5

 Attachments: 4268-cassandra-2.0_v2.patch, 4268_cassandra-2.0.patch


 We already expose ways to stop just the RPC server or gossip.  This would 
 fully shutdown the process.



--
This message was sent by Atlassian JIRA
(v6.1.4#6159)


[jira] [Commented] (CASSANDRA-4268) Expose full stop() operation through JMX

2013-12-20 Thread Tyler Hobbs (JIRA)

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

Tyler Hobbs commented on CASSANDRA-4268:


+1

 Expose full stop() operation through JMX
 

 Key: CASSANDRA-4268
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4268
 Project: Cassandra
  Issue Type: Improvement
  Components: Core
Reporter: Tyler Hobbs
Assignee: Lyuben Todorov
Priority: Minor
  Labels: jmx
 Fix For: 2.0.5

 Attachments: 4268-cassandra-2.0_v2.patch, 4268_cassandra-2.0.patch


 We already expose ways to stop just the RPC server or gossip.  This would 
 fully shutdown the process.



--
This message was sent by Atlassian JIRA
(v6.1.4#6159)


git commit: Fix typo

2013-12-20 Thread aleksey
Updated Branches:
  refs/heads/cassandra-1.2 a4895c551 - b97c5233e


Fix typo


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

Branch: refs/heads/cassandra-1.2
Commit: b97c5233e17b73232be3554cf06b8ae6e472b145
Parents: a4895c5
Author: Aleksey Yeschenko alek...@apache.org
Authored: Fri Dec 20 19:52:00 2013 +0300
Committer: Aleksey Yeschenko alek...@apache.org
Committed: Fri Dec 20 19:52:00 2013 +0300

--
 src/java/org/apache/cassandra/cql3/CQLStatement.java  |  2 +-
 .../org/apache/cassandra/cql3/QueryProcessor.java | 14 +++---
 .../cql3/statements/AuthenticationStatement.java  |  2 +-
 .../cql3/statements/AuthorizationStatement.java   |  2 +-
 .../cassandra/cql3/statements/BatchStatement.java |  3 +--
 .../cql3/statements/CreateColumnFamilyStatement.java  |  2 +-
 .../cassandra/cql3/statements/DeleteStatement.java|  2 +-
 .../cassandra/cql3/statements/ParsedStatement.java|  2 +-
 .../cassandra/cql3/statements/SelectStatement.java|  6 +++---
 .../cassandra/cql3/statements/UpdateStatement.java|  2 +-
 .../org/apache/cassandra/thrift/CassandraServer.java  |  2 +-
 11 files changed, 19 insertions(+), 20 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/b97c5233/src/java/org/apache/cassandra/cql3/CQLStatement.java
--
diff --git a/src/java/org/apache/cassandra/cql3/CQLStatement.java 
b/src/java/org/apache/cassandra/cql3/CQLStatement.java
index 63f9cc6..02475e9 100644
--- a/src/java/org/apache/cassandra/cql3/CQLStatement.java
+++ b/src/java/org/apache/cassandra/cql3/CQLStatement.java
@@ -31,7 +31,7 @@ public interface CQLStatement
 /**
  * Returns the number of bound terms in this statement.
  */
-public int getBoundsTerms();
+public int getBoundTerms();
 
 /**
  * Perform any access verification necessary for the statement.

http://git-wip-us.apache.org/repos/asf/cassandra/blob/b97c5233/src/java/org/apache/cassandra/cql3/QueryProcessor.java
--
diff --git a/src/java/org/apache/cassandra/cql3/QueryProcessor.java 
b/src/java/org/apache/cassandra/cql3/QueryProcessor.java
index a62b248..332aea1 100644
--- a/src/java/org/apache/cassandra/cql3/QueryProcessor.java
+++ b/src/java/org/apache/cassandra/cql3/QueryProcessor.java
@@ -153,7 +153,7 @@ public class QueryProcessor
 throws RequestExecutionException, RequestValidationException
 {
 CQLStatement prepared = getStatement(queryString, 
queryState.getClientState()).statement;
-if (prepared.getBoundsTerms()  0)
+if (prepared.getBoundTerms()  0)
 throw new InvalidRequestException(Cannot execute query with bind 
variables);
 return processStatement(prepared, cl, queryState, 
Collections.ByteBufferemptyList());
 }
@@ -220,7 +220,7 @@ public class QueryProcessor
 ParsedStatement.Prepared prepared = getStatement(queryString, 
clientState);
 ResultMessage.Prepared msg = storePreparedStatement(queryString, 
clientState.getRawKeyspace(), prepared, forThrift);
 
-int bountTerms = prepared.statement.getBoundsTerms();
+int bountTerms = prepared.statement.getBoundTerms();
 if (bountTerms  FBUtilities.MAX_UNSIGNED_SHORT)
 throw new InvalidRequestException(String.format(Too many 
markers(?). %d markers exceed the allowed maximum of %d, bountTerms, 
FBUtilities.MAX_UNSIGNED_SHORT));
 assert bountTerms == prepared.boundNames.size();
@@ -246,7 +246,7 @@ public class QueryProcessor
 thriftPreparedStatements.put(statementId, prepared.statement);
 logger.trace(String.format(Stored prepared statement #%d with %d 
bind markers,
statementId,
-   prepared.statement.getBoundsTerms()));
+   prepared.statement.getBoundTerms()));
 return ResultMessage.Prepared.forThrift(statementId, 
prepared.boundNames);
 }
 else
@@ -255,7 +255,7 @@ public class QueryProcessor
 preparedStatements.put(statementId, prepared.statement);
 logger.trace(String.format(Stored prepared statement %s with %d 
bind markers,
  statementId,
- prepared.statement.getBoundsTerms()));
+ prepared.statement.getBoundTerms()));
 return new ResultMessage.Prepared(statementId, 
prepared.boundNames);
 }
 }
@@ -264,11 +264,11 @@ public class QueryProcessor
 throws 

git commit: OCD follow up

2013-12-20 Thread aleksey
Updated Branches:
  refs/heads/cassandra-1.2 b97c5233e - 924492345


OCD follow up


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

Branch: refs/heads/cassandra-1.2
Commit: 92449234519374d49585fec3d2940c9d5e7851f4
Parents: b97c523
Author: Aleksey Yeschenko alek...@apache.org
Authored: Fri Dec 20 20:15:07 2013 +0300
Committer: Aleksey Yeschenko alek...@apache.org
Committed: Fri Dec 20 20:15:07 2013 +0300

--
 src/java/org/apache/cassandra/cql3/QueryProcessor.java | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/92449234/src/java/org/apache/cassandra/cql3/QueryProcessor.java
--
diff --git a/src/java/org/apache/cassandra/cql3/QueryProcessor.java 
b/src/java/org/apache/cassandra/cql3/QueryProcessor.java
index 332aea1..dc94a18 100644
--- a/src/java/org/apache/cassandra/cql3/QueryProcessor.java
+++ b/src/java/org/apache/cassandra/cql3/QueryProcessor.java
@@ -220,10 +220,10 @@ public class QueryProcessor
 ParsedStatement.Prepared prepared = getStatement(queryString, 
clientState);
 ResultMessage.Prepared msg = storePreparedStatement(queryString, 
clientState.getRawKeyspace(), prepared, forThrift);
 
-int bountTerms = prepared.statement.getBoundTerms();
-if (bountTerms  FBUtilities.MAX_UNSIGNED_SHORT)
-throw new InvalidRequestException(String.format(Too many 
markers(?). %d markers exceed the allowed maximum of %d, bountTerms, 
FBUtilities.MAX_UNSIGNED_SHORT));
-assert bountTerms == prepared.boundNames.size();
+int boundTerms = prepared.statement.getBoundTerms();
+if (boundTerms  FBUtilities.MAX_UNSIGNED_SHORT)
+throw new InvalidRequestException(String.format(Too many 
markers(?). %d markers exceed the allowed maximum of %d, boundTerms, 
FBUtilities.MAX_UNSIGNED_SHORT));
+assert boundTerms == prepared.boundNames.size();
 return msg;
 }
 



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

2013-12-20 Thread aleksey
Merge branch 'cassandra-1.2' into cassandra-2.0

Conflicts:
src/java/org/apache/cassandra/cql3/QueryProcessor.java
src/java/org/apache/cassandra/cql3/statements/BatchStatement.java
src/java/org/apache/cassandra/cql3/statements/CreateTableStatement.java
src/java/org/apache/cassandra/cql3/statements/DeleteStatement.java
src/java/org/apache/cassandra/cql3/statements/ParsedStatement.java
src/java/org/apache/cassandra/cql3/statements/SelectStatement.java
src/java/org/apache/cassandra/cql3/statements/UpdateStatement.java


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

Branch: refs/heads/cassandra-2.0
Commit: b1435ffd1dcdeab9f0ebc52cf1ed3cddafa13c4e
Parents: 4d36bbf b97c523
Author: Aleksey Yeschenko alek...@apache.org
Authored: Fri Dec 20 20:14:07 2013 +0300
Committer: Aleksey Yeschenko alek...@apache.org
Committed: Fri Dec 20 20:14:07 2013 +0300

--
 .../org/apache/cassandra/cql3/CQLStatement.java |  2 +-
 .../apache/cassandra/cql3/QueryProcessor.java   | 20 ++--
 .../statements/AuthenticationStatement.java |  2 +-
 .../cql3/statements/AuthorizationStatement.java |  2 +-
 .../cql3/statements/BatchStatement.java |  4 ++--
 .../cql3/statements/ModificationStatement.java  |  4 ++--
 .../cql3/statements/ParsedStatement.java|  2 +-
 .../statements/SchemaAlteringStatement.java |  2 +-
 .../cql3/statements/SelectStatement.java|  4 ++--
 .../cql3/statements/TruncateStatement.java  |  2 +-
 .../cassandra/cql3/statements/UseStatement.java |  2 +-
 .../cassandra/thrift/CassandraServer.java   |  2 +-
 .../transport/messages/BatchMessage.java|  5 ++---
 13 files changed, 26 insertions(+), 27 deletions(-)
--


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

http://git-wip-us.apache.org/repos/asf/cassandra/blob/b1435ffd/src/java/org/apache/cassandra/cql3/QueryProcessor.java
--
diff --cc src/java/org/apache/cassandra/cql3/QueryProcessor.java
index ad3c4b4,332aea1..02361a8
--- a/src/java/org/apache/cassandra/cql3/QueryProcessor.java
+++ b/src/java/org/apache/cassandra/cql3/QueryProcessor.java
@@@ -209,22 -152,10 +209,22 @@@ public class QueryProcesso
  public static ResultMessage process(String queryString, ConsistencyLevel 
cl, QueryState queryState)
  throws RequestExecutionException, RequestValidationException
  {
 +return process(queryString, queryState, new QueryOptions(cl, 
Collections.ByteBufferemptyList()));
 +}
 +
 +public static ResultMessage process(String queryString, QueryState 
queryState, QueryOptions options)
 +throws RequestExecutionException, RequestValidationException
 +{
  CQLStatement prepared = getStatement(queryString, 
queryState.getClientState()).statement;
- if (prepared.getBoundsTerms() != options.getValues().size())
 -if (prepared.getBoundTerms()  0)
 -throw new InvalidRequestException(Cannot execute query with bind 
variables);
 -return processStatement(prepared, cl, queryState, 
Collections.ByteBufferemptyList());
++if (prepared.getBoundTerms() != options.getValues().size())
 +throw new InvalidRequestException(Invalid amount of bind 
variables);
 +
 +return processStatement(prepared, queryState, options, queryString);
 +}
 +
 +public static CQLStatement parseStatement(String queryStr, QueryState 
queryState) throws RequestValidationException
 +{
 +return getStatement(queryStr, queryState.getClientState()).statement;
  }
  
  public static UntypedResultSet process(String query, ConsistencyLevel cl) 
throws RequestExecutionException
@@@ -286,20 -218,12 +286,20 @@@
  throws RequestValidationException
  {
  ParsedStatement.Prepared prepared = getStatement(queryString, 
clientState);
- int bountTerms = prepared.statement.getBoundsTerms();
- if (bountTerms  FBUtilities.MAX_UNSIGNED_SHORT)
- throw new InvalidRequestException(String.format(Too many 
markers(?). %d markers exceed the allowed maximum of %d, bountTerms, 
FBUtilities.MAX_UNSIGNED_SHORT));
- assert bountTerms == prepared.boundNames.size();
++int boundTerms = prepared.statement.getBoundTerms();
++if (boundTerms  FBUtilities.MAX_UNSIGNED_SHORT)
++throw new InvalidRequestException(String.format(Too many 
markers(?). %d markers exceed the allowed maximum of 

[1/4] git commit: Fix typo

2013-12-20 Thread aleksey
Updated Branches:
  refs/heads/cassandra-2.0 4d36bbfbb - 9c17189b7


Fix typo


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

Branch: refs/heads/cassandra-2.0
Commit: b97c5233e17b73232be3554cf06b8ae6e472b145
Parents: a4895c5
Author: Aleksey Yeschenko alek...@apache.org
Authored: Fri Dec 20 19:52:00 2013 +0300
Committer: Aleksey Yeschenko alek...@apache.org
Committed: Fri Dec 20 19:52:00 2013 +0300

--
 src/java/org/apache/cassandra/cql3/CQLStatement.java  |  2 +-
 .../org/apache/cassandra/cql3/QueryProcessor.java | 14 +++---
 .../cql3/statements/AuthenticationStatement.java  |  2 +-
 .../cql3/statements/AuthorizationStatement.java   |  2 +-
 .../cassandra/cql3/statements/BatchStatement.java |  3 +--
 .../cql3/statements/CreateColumnFamilyStatement.java  |  2 +-
 .../cassandra/cql3/statements/DeleteStatement.java|  2 +-
 .../cassandra/cql3/statements/ParsedStatement.java|  2 +-
 .../cassandra/cql3/statements/SelectStatement.java|  6 +++---
 .../cassandra/cql3/statements/UpdateStatement.java|  2 +-
 .../org/apache/cassandra/thrift/CassandraServer.java  |  2 +-
 11 files changed, 19 insertions(+), 20 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/b97c5233/src/java/org/apache/cassandra/cql3/CQLStatement.java
--
diff --git a/src/java/org/apache/cassandra/cql3/CQLStatement.java 
b/src/java/org/apache/cassandra/cql3/CQLStatement.java
index 63f9cc6..02475e9 100644
--- a/src/java/org/apache/cassandra/cql3/CQLStatement.java
+++ b/src/java/org/apache/cassandra/cql3/CQLStatement.java
@@ -31,7 +31,7 @@ public interface CQLStatement
 /**
  * Returns the number of bound terms in this statement.
  */
-public int getBoundsTerms();
+public int getBoundTerms();
 
 /**
  * Perform any access verification necessary for the statement.

http://git-wip-us.apache.org/repos/asf/cassandra/blob/b97c5233/src/java/org/apache/cassandra/cql3/QueryProcessor.java
--
diff --git a/src/java/org/apache/cassandra/cql3/QueryProcessor.java 
b/src/java/org/apache/cassandra/cql3/QueryProcessor.java
index a62b248..332aea1 100644
--- a/src/java/org/apache/cassandra/cql3/QueryProcessor.java
+++ b/src/java/org/apache/cassandra/cql3/QueryProcessor.java
@@ -153,7 +153,7 @@ public class QueryProcessor
 throws RequestExecutionException, RequestValidationException
 {
 CQLStatement prepared = getStatement(queryString, 
queryState.getClientState()).statement;
-if (prepared.getBoundsTerms()  0)
+if (prepared.getBoundTerms()  0)
 throw new InvalidRequestException(Cannot execute query with bind 
variables);
 return processStatement(prepared, cl, queryState, 
Collections.ByteBufferemptyList());
 }
@@ -220,7 +220,7 @@ public class QueryProcessor
 ParsedStatement.Prepared prepared = getStatement(queryString, 
clientState);
 ResultMessage.Prepared msg = storePreparedStatement(queryString, 
clientState.getRawKeyspace(), prepared, forThrift);
 
-int bountTerms = prepared.statement.getBoundsTerms();
+int bountTerms = prepared.statement.getBoundTerms();
 if (bountTerms  FBUtilities.MAX_UNSIGNED_SHORT)
 throw new InvalidRequestException(String.format(Too many 
markers(?). %d markers exceed the allowed maximum of %d, bountTerms, 
FBUtilities.MAX_UNSIGNED_SHORT));
 assert bountTerms == prepared.boundNames.size();
@@ -246,7 +246,7 @@ public class QueryProcessor
 thriftPreparedStatements.put(statementId, prepared.statement);
 logger.trace(String.format(Stored prepared statement #%d with %d 
bind markers,
statementId,
-   prepared.statement.getBoundsTerms()));
+   prepared.statement.getBoundTerms()));
 return ResultMessage.Prepared.forThrift(statementId, 
prepared.boundNames);
 }
 else
@@ -255,7 +255,7 @@ public class QueryProcessor
 preparedStatements.put(statementId, prepared.statement);
 logger.trace(String.format(Stored prepared statement %s with %d 
bind markers,
  statementId,
- prepared.statement.getBoundsTerms()));
+ prepared.statement.getBoundTerms()));
 return new ResultMessage.Prepared(statementId, 
prepared.boundNames);
 }
 }
@@ -264,11 +264,11 @@ public class QueryProcessor
 throws 

[3/4] git commit: OCD follow up

2013-12-20 Thread aleksey
OCD follow up


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

Branch: refs/heads/cassandra-2.0
Commit: 92449234519374d49585fec3d2940c9d5e7851f4
Parents: b97c523
Author: Aleksey Yeschenko alek...@apache.org
Authored: Fri Dec 20 20:15:07 2013 +0300
Committer: Aleksey Yeschenko alek...@apache.org
Committed: Fri Dec 20 20:15:07 2013 +0300

--
 src/java/org/apache/cassandra/cql3/QueryProcessor.java | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/92449234/src/java/org/apache/cassandra/cql3/QueryProcessor.java
--
diff --git a/src/java/org/apache/cassandra/cql3/QueryProcessor.java 
b/src/java/org/apache/cassandra/cql3/QueryProcessor.java
index 332aea1..dc94a18 100644
--- a/src/java/org/apache/cassandra/cql3/QueryProcessor.java
+++ b/src/java/org/apache/cassandra/cql3/QueryProcessor.java
@@ -220,10 +220,10 @@ public class QueryProcessor
 ParsedStatement.Prepared prepared = getStatement(queryString, 
clientState);
 ResultMessage.Prepared msg = storePreparedStatement(queryString, 
clientState.getRawKeyspace(), prepared, forThrift);
 
-int bountTerms = prepared.statement.getBoundTerms();
-if (bountTerms  FBUtilities.MAX_UNSIGNED_SHORT)
-throw new InvalidRequestException(String.format(Too many 
markers(?). %d markers exceed the allowed maximum of %d, bountTerms, 
FBUtilities.MAX_UNSIGNED_SHORT));
-assert bountTerms == prepared.boundNames.size();
+int boundTerms = prepared.statement.getBoundTerms();
+if (boundTerms  FBUtilities.MAX_UNSIGNED_SHORT)
+throw new InvalidRequestException(String.format(Too many 
markers(?). %d markers exceed the allowed maximum of %d, boundTerms, 
FBUtilities.MAX_UNSIGNED_SHORT));
+assert boundTerms == prepared.boundNames.size();
 return msg;
 }
 



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

2013-12-20 Thread aleksey
Merge branch 'cassandra-1.2' into cassandra-2.0

Conflicts:
src/java/org/apache/cassandra/cql3/QueryProcessor.java


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

Branch: refs/heads/cassandra-2.0
Commit: 9c17189b78f75b33d8c66f236da2d45840c2d30f
Parents: b1435ff 9244923
Author: Aleksey Yeschenko alek...@apache.org
Authored: Fri Dec 20 20:16:08 2013 +0300
Committer: Aleksey Yeschenko alek...@apache.org
Committed: Fri Dec 20 20:16:08 2013 +0300

--

--




[4/5] git commit: Merge branch 'cassandra-1.2' into cassandra-2.0

2013-12-20 Thread aleksey
Merge branch 'cassandra-1.2' into cassandra-2.0

Conflicts:
src/java/org/apache/cassandra/cql3/QueryProcessor.java


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

Branch: refs/heads/trunk
Commit: 9c17189b78f75b33d8c66f236da2d45840c2d30f
Parents: b1435ff 9244923
Author: Aleksey Yeschenko alek...@apache.org
Authored: Fri Dec 20 20:16:08 2013 +0300
Committer: Aleksey Yeschenko alek...@apache.org
Committed: Fri Dec 20 20:16:08 2013 +0300

--

--




[1/5] git commit: Fix typo

2013-12-20 Thread aleksey
Updated Branches:
  refs/heads/trunk 0d695d4d1 - ed6584ee1


Fix typo


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

Branch: refs/heads/trunk
Commit: b97c5233e17b73232be3554cf06b8ae6e472b145
Parents: a4895c5
Author: Aleksey Yeschenko alek...@apache.org
Authored: Fri Dec 20 19:52:00 2013 +0300
Committer: Aleksey Yeschenko alek...@apache.org
Committed: Fri Dec 20 19:52:00 2013 +0300

--
 src/java/org/apache/cassandra/cql3/CQLStatement.java  |  2 +-
 .../org/apache/cassandra/cql3/QueryProcessor.java | 14 +++---
 .../cql3/statements/AuthenticationStatement.java  |  2 +-
 .../cql3/statements/AuthorizationStatement.java   |  2 +-
 .../cassandra/cql3/statements/BatchStatement.java |  3 +--
 .../cql3/statements/CreateColumnFamilyStatement.java  |  2 +-
 .../cassandra/cql3/statements/DeleteStatement.java|  2 +-
 .../cassandra/cql3/statements/ParsedStatement.java|  2 +-
 .../cassandra/cql3/statements/SelectStatement.java|  6 +++---
 .../cassandra/cql3/statements/UpdateStatement.java|  2 +-
 .../org/apache/cassandra/thrift/CassandraServer.java  |  2 +-
 11 files changed, 19 insertions(+), 20 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/b97c5233/src/java/org/apache/cassandra/cql3/CQLStatement.java
--
diff --git a/src/java/org/apache/cassandra/cql3/CQLStatement.java 
b/src/java/org/apache/cassandra/cql3/CQLStatement.java
index 63f9cc6..02475e9 100644
--- a/src/java/org/apache/cassandra/cql3/CQLStatement.java
+++ b/src/java/org/apache/cassandra/cql3/CQLStatement.java
@@ -31,7 +31,7 @@ public interface CQLStatement
 /**
  * Returns the number of bound terms in this statement.
  */
-public int getBoundsTerms();
+public int getBoundTerms();
 
 /**
  * Perform any access verification necessary for the statement.

http://git-wip-us.apache.org/repos/asf/cassandra/blob/b97c5233/src/java/org/apache/cassandra/cql3/QueryProcessor.java
--
diff --git a/src/java/org/apache/cassandra/cql3/QueryProcessor.java 
b/src/java/org/apache/cassandra/cql3/QueryProcessor.java
index a62b248..332aea1 100644
--- a/src/java/org/apache/cassandra/cql3/QueryProcessor.java
+++ b/src/java/org/apache/cassandra/cql3/QueryProcessor.java
@@ -153,7 +153,7 @@ public class QueryProcessor
 throws RequestExecutionException, RequestValidationException
 {
 CQLStatement prepared = getStatement(queryString, 
queryState.getClientState()).statement;
-if (prepared.getBoundsTerms()  0)
+if (prepared.getBoundTerms()  0)
 throw new InvalidRequestException(Cannot execute query with bind 
variables);
 return processStatement(prepared, cl, queryState, 
Collections.ByteBufferemptyList());
 }
@@ -220,7 +220,7 @@ public class QueryProcessor
 ParsedStatement.Prepared prepared = getStatement(queryString, 
clientState);
 ResultMessage.Prepared msg = storePreparedStatement(queryString, 
clientState.getRawKeyspace(), prepared, forThrift);
 
-int bountTerms = prepared.statement.getBoundsTerms();
+int bountTerms = prepared.statement.getBoundTerms();
 if (bountTerms  FBUtilities.MAX_UNSIGNED_SHORT)
 throw new InvalidRequestException(String.format(Too many 
markers(?). %d markers exceed the allowed maximum of %d, bountTerms, 
FBUtilities.MAX_UNSIGNED_SHORT));
 assert bountTerms == prepared.boundNames.size();
@@ -246,7 +246,7 @@ public class QueryProcessor
 thriftPreparedStatements.put(statementId, prepared.statement);
 logger.trace(String.format(Stored prepared statement #%d with %d 
bind markers,
statementId,
-   prepared.statement.getBoundsTerms()));
+   prepared.statement.getBoundTerms()));
 return ResultMessage.Prepared.forThrift(statementId, 
prepared.boundNames);
 }
 else
@@ -255,7 +255,7 @@ public class QueryProcessor
 preparedStatements.put(statementId, prepared.statement);
 logger.trace(String.format(Stored prepared statement %s with %d 
bind markers,
  statementId,
- prepared.statement.getBoundsTerms()));
+ prepared.statement.getBoundTerms()));
 return new ResultMessage.Prepared(statementId, 
prepared.boundNames);
 }
 }
@@ -264,11 +264,11 @@ public class QueryProcessor
 throws 

[3/5] git commit: OCD follow up

2013-12-20 Thread aleksey
OCD follow up


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

Branch: refs/heads/trunk
Commit: 92449234519374d49585fec3d2940c9d5e7851f4
Parents: b97c523
Author: Aleksey Yeschenko alek...@apache.org
Authored: Fri Dec 20 20:15:07 2013 +0300
Committer: Aleksey Yeschenko alek...@apache.org
Committed: Fri Dec 20 20:15:07 2013 +0300

--
 src/java/org/apache/cassandra/cql3/QueryProcessor.java | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/92449234/src/java/org/apache/cassandra/cql3/QueryProcessor.java
--
diff --git a/src/java/org/apache/cassandra/cql3/QueryProcessor.java 
b/src/java/org/apache/cassandra/cql3/QueryProcessor.java
index 332aea1..dc94a18 100644
--- a/src/java/org/apache/cassandra/cql3/QueryProcessor.java
+++ b/src/java/org/apache/cassandra/cql3/QueryProcessor.java
@@ -220,10 +220,10 @@ public class QueryProcessor
 ParsedStatement.Prepared prepared = getStatement(queryString, 
clientState);
 ResultMessage.Prepared msg = storePreparedStatement(queryString, 
clientState.getRawKeyspace(), prepared, forThrift);
 
-int bountTerms = prepared.statement.getBoundTerms();
-if (bountTerms  FBUtilities.MAX_UNSIGNED_SHORT)
-throw new InvalidRequestException(String.format(Too many 
markers(?). %d markers exceed the allowed maximum of %d, bountTerms, 
FBUtilities.MAX_UNSIGNED_SHORT));
-assert bountTerms == prepared.boundNames.size();
+int boundTerms = prepared.statement.getBoundTerms();
+if (boundTerms  FBUtilities.MAX_UNSIGNED_SHORT)
+throw new InvalidRequestException(String.format(Too many 
markers(?). %d markers exceed the allowed maximum of %d, boundTerms, 
FBUtilities.MAX_UNSIGNED_SHORT));
+assert boundTerms == prepared.boundNames.size();
 return msg;
 }
 



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

2013-12-20 Thread aleksey
Merge branch 'cassandra-2.0' 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/ed6584ee
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/ed6584ee
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/ed6584ee

Branch: refs/heads/trunk
Commit: ed6584ee1609aaac3702f1f20fe694e0565e8571
Parents: 0d695d4 9c17189
Author: Aleksey Yeschenko alek...@apache.org
Authored: Fri Dec 20 20:19:43 2013 +0300
Committer: Aleksey Yeschenko alek...@apache.org
Committed: Fri Dec 20 20:19:43 2013 +0300

--
 .../org/apache/cassandra/cql3/CQLStatement.java |  2 +-
 .../apache/cassandra/cql3/QueryProcessor.java   | 20 ++--
 .../statements/AuthenticationStatement.java |  2 +-
 .../cql3/statements/AuthorizationStatement.java |  2 +-
 .../cql3/statements/BatchStatement.java |  4 ++--
 .../cql3/statements/ModificationStatement.java  |  4 ++--
 .../cql3/statements/ParsedStatement.java|  2 +-
 .../statements/SchemaAlteringStatement.java |  2 +-
 .../cql3/statements/SelectStatement.java|  4 ++--
 .../cql3/statements/TruncateStatement.java  |  2 +-
 .../cassandra/cql3/statements/UseStatement.java |  2 +-
 .../cassandra/thrift/CassandraServer.java   |  2 +-
 .../transport/messages/BatchMessage.java|  5 ++---
 13 files changed, 26 insertions(+), 27 deletions(-)
--


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

http://git-wip-us.apache.org/repos/asf/cassandra/blob/ed6584ee/src/java/org/apache/cassandra/cql3/statements/ModificationStatement.java
--
diff --cc 
src/java/org/apache/cassandra/cql3/statements/ModificationStatement.java
index 2574f73,9e0fd62..a396ef4
--- a/src/java/org/apache/cassandra/cql3/statements/ModificationStatement.java
+++ b/src/java/org/apache/cassandra/cql3/statements/ModificationStatement.java
@@@ -72,9 -70,9 +72,9 @@@ public abstract class ModificationState
  }
  
  public abstract boolean requireFullClusteringKey();
 -public abstract ColumnFamily updateForKey(ByteBuffer key, 
ColumnNameBuilder builder, UpdateParameters params) throws 
InvalidRequestException;
 +public abstract ColumnFamily updateForKey(ByteBuffer key, Composite 
prefix, UpdateParameters params) throws InvalidRequestException;
  
- public int getBoundsTerms()
+ public int getBoundTerms()
  {
  return boundTerms;
  }

http://git-wip-us.apache.org/repos/asf/cassandra/blob/ed6584ee/src/java/org/apache/cassandra/cql3/statements/SelectStatement.java
--
diff --cc src/java/org/apache/cassandra/cql3/statements/SelectStatement.java
index b29a044,133444a..b3f10c6
--- a/src/java/org/apache/cassandra/cql3/statements/SelectStatement.java
+++ b/src/java/org/apache/cassandra/cql3/statements/SelectStatement.java
@@@ -112,10 -112,10 +112,10 @@@ public class SelectStatement implement
  
  public long measureForPreparedCache(MemoryMeter meter)
  {
 -return meter.measureDeep(this) - meter.measureDeep(cfDef);
 +return meter.measureDeep(this) - meter.measureDeep(cfm);
  }
  
- public int getBoundsTerms()
+ public int getBoundTerms()
  {
  return boundTerms;
  }
@@@ -1027,7 -1067,9 +1027,7 @@@
  {
  CFMetaData cfm = 
ThriftValidation.validateColumnFamily(keyspace(), columnFamily());
  
- VariableSpecifications names = getBoundsVariables();
 -CFDefinition cfDef = cfm.getCfDef();
 -
+ VariableSpecifications names = getBoundVariables();
  
  // Select clause
  if (parameters.isCount  !selectClause.isEmpty())

http://git-wip-us.apache.org/repos/asf/cassandra/blob/ed6584ee/src/java/org/apache/cassandra/thrift/CassandraServer.java
--



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

2013-12-20 Thread aleksey
Merge branch 'cassandra-1.2' into cassandra-2.0

Conflicts:
src/java/org/apache/cassandra/cql3/QueryProcessor.java
src/java/org/apache/cassandra/cql3/statements/BatchStatement.java
src/java/org/apache/cassandra/cql3/statements/CreateTableStatement.java
src/java/org/apache/cassandra/cql3/statements/DeleteStatement.java
src/java/org/apache/cassandra/cql3/statements/ParsedStatement.java
src/java/org/apache/cassandra/cql3/statements/SelectStatement.java
src/java/org/apache/cassandra/cql3/statements/UpdateStatement.java


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

Branch: refs/heads/trunk
Commit: b1435ffd1dcdeab9f0ebc52cf1ed3cddafa13c4e
Parents: 4d36bbf b97c523
Author: Aleksey Yeschenko alek...@apache.org
Authored: Fri Dec 20 20:14:07 2013 +0300
Committer: Aleksey Yeschenko alek...@apache.org
Committed: Fri Dec 20 20:14:07 2013 +0300

--
 .../org/apache/cassandra/cql3/CQLStatement.java |  2 +-
 .../apache/cassandra/cql3/QueryProcessor.java   | 20 ++--
 .../statements/AuthenticationStatement.java |  2 +-
 .../cql3/statements/AuthorizationStatement.java |  2 +-
 .../cql3/statements/BatchStatement.java |  4 ++--
 .../cql3/statements/ModificationStatement.java  |  4 ++--
 .../cql3/statements/ParsedStatement.java|  2 +-
 .../statements/SchemaAlteringStatement.java |  2 +-
 .../cql3/statements/SelectStatement.java|  4 ++--
 .../cql3/statements/TruncateStatement.java  |  2 +-
 .../cassandra/cql3/statements/UseStatement.java |  2 +-
 .../cassandra/thrift/CassandraServer.java   |  2 +-
 .../transport/messages/BatchMessage.java|  5 ++---
 13 files changed, 26 insertions(+), 27 deletions(-)
--


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

http://git-wip-us.apache.org/repos/asf/cassandra/blob/b1435ffd/src/java/org/apache/cassandra/cql3/QueryProcessor.java
--
diff --cc src/java/org/apache/cassandra/cql3/QueryProcessor.java
index ad3c4b4,332aea1..02361a8
--- a/src/java/org/apache/cassandra/cql3/QueryProcessor.java
+++ b/src/java/org/apache/cassandra/cql3/QueryProcessor.java
@@@ -209,22 -152,10 +209,22 @@@ public class QueryProcesso
  public static ResultMessage process(String queryString, ConsistencyLevel 
cl, QueryState queryState)
  throws RequestExecutionException, RequestValidationException
  {
 +return process(queryString, queryState, new QueryOptions(cl, 
Collections.ByteBufferemptyList()));
 +}
 +
 +public static ResultMessage process(String queryString, QueryState 
queryState, QueryOptions options)
 +throws RequestExecutionException, RequestValidationException
 +{
  CQLStatement prepared = getStatement(queryString, 
queryState.getClientState()).statement;
- if (prepared.getBoundsTerms() != options.getValues().size())
 -if (prepared.getBoundTerms()  0)
 -throw new InvalidRequestException(Cannot execute query with bind 
variables);
 -return processStatement(prepared, cl, queryState, 
Collections.ByteBufferemptyList());
++if (prepared.getBoundTerms() != options.getValues().size())
 +throw new InvalidRequestException(Invalid amount of bind 
variables);
 +
 +return processStatement(prepared, queryState, options, queryString);
 +}
 +
 +public static CQLStatement parseStatement(String queryStr, QueryState 
queryState) throws RequestValidationException
 +{
 +return getStatement(queryStr, queryState.getClientState()).statement;
  }
  
  public static UntypedResultSet process(String query, ConsistencyLevel cl) 
throws RequestExecutionException
@@@ -286,20 -218,12 +286,20 @@@
  throws RequestValidationException
  {
  ParsedStatement.Prepared prepared = getStatement(queryString, 
clientState);
- int bountTerms = prepared.statement.getBoundsTerms();
- if (bountTerms  FBUtilities.MAX_UNSIGNED_SHORT)
- throw new InvalidRequestException(String.format(Too many 
markers(?). %d markers exceed the allowed maximum of %d, bountTerms, 
FBUtilities.MAX_UNSIGNED_SHORT));
- assert bountTerms == prepared.boundNames.size();
++int boundTerms = prepared.statement.getBoundTerms();
++if (boundTerms  FBUtilities.MAX_UNSIGNED_SHORT)
++throw new InvalidRequestException(String.format(Too many 
markers(?). %d markers exceed the allowed maximum of %d, 

[jira] [Commented] (CASSANDRA-6517) Loose of secondary index entries if nodetool cleanup called before compaction

2013-12-20 Thread Michael Shuler (JIRA)

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

Michael Shuler commented on CASSANDRA-6517:
---

Thanks for the extra details, Christoph - I will see if I can reproduce.


 Loose of secondary index entries if nodetool cleanup called before compaction
 -

 Key: CASSANDRA-6517
 URL: https://issues.apache.org/jira/browse/CASSANDRA-6517
 Project: Cassandra
  Issue Type: Bug
  Components: API
 Environment: Ubuntu 12.0.4 with 8+ GB RAM and 40GB hard disk for data 
 directory.
Reporter: Christoph Werres
Assignee: Michael Shuler

 From time to time we had the feeling of not getting all results that should 
 have been returned using secondary indexes. Now we tracked down some 
 situations and found out, it happened:
 1) To primary keys that were already deleted and have been re-created later on
 2) After our nightly maintenance scripts were running
 We can reproduce now the following szenario:
 - create a row entry with an indexed column included
 - query it and use the secondary index criteria - Success
 - delete it, query again - entry gone as expected
 - re-create it with the same key, query it - success again
 Now use in exactly that sequence
 nodetool cleanup
 nodetool flush
 nodetool compact
 When issuing the query now, we don't get the result using the index. The 
 entry is indeed available in it's table when I just ask for the key. Below is 
 the exact copy-paste output from CQL when I reproduced the problem with an 
 example entry on on of our tables.
 mwerrch@mstc01401:/opt/cassandra$ current/bin/cqlsh Connected to 
 14-15-Cluster at localhost:9160.
 [cqlsh 4.1.0 | Cassandra 2.0.3 | CQL spec 3.1.1 | Thrift protocol 19.38.0] 
 Use HELP for help.
 cqlsh use mwerrch;
 cqlsh:mwerrch desc tables;
 B4Container_Demo
 cqlsh:mwerrch desc table B4Container_Demo;
 CREATE TABLE B4Container_Demo (
   key uuid,
   archived boolean,
   bytes int,
   computer int,
   deleted boolean,
   description text,
   doarchive boolean,
   filename text,
   first boolean,
   frames int,
   ifversion int,
   imported boolean,
   jobid int,
   keepuntil bigint,
   nextchunk text,
   node int,
   recordingkey blob,
   recstart bigint,
   recstop bigint,
   simulationid bigint,
   systemstart bigint,
   systemstop bigint,
   tapelabel bigint,
   version blob,
   PRIMARY KEY (key)
 ) WITH COMPACT STORAGE AND
   bloom_filter_fp_chance=0.01 AND
   caching='KEYS_ONLY' AND
   comment='demo' AND
   dclocal_read_repair_chance=0.00 AND
   gc_grace_seconds=604800 AND
   index_interval=128 AND
   read_repair_chance=1.00 AND
   replicate_on_write='true' AND
   populate_io_cache_on_flush='false' AND
   default_time_to_live=0 AND
   speculative_retry='NONE' AND
   memtable_flush_period_in_ms=0 AND
   compaction={'class': 'SizeTieredCompactionStrategy'} AND
   compression={'sstable_compression': 'LZ4Compressor'};
 CREATE INDEX mwerrch_Demo_computer ON B4Container_Demo (computer);
 CREATE INDEX mwerrch_Demo_node ON B4Container_Demo (node);
 CREATE INDEX mwerrch_Demo_recordingkey ON B4Container_Demo (recordingkey);
 cqlsh:mwerrch INSERT INTO B4Container_Demo (key,computer,node) VALUES 
 (78c70562-1f98-3971-9c28-2c3d8e09c10f, 50, 50); cqlsh:mwerrch select 
 key,node,computer from B4Container_Demo where computer=50;
  key  | node | computer
 --+--+--
  78c70562-1f98-3971-9c28-2c3d8e09c10f |   50 |   50
 (1 rows)
 cqlsh:mwerrch DELETE FROM B4Container_Demo WHERE 
 key=78c70562-1f98-3971-9c28-2c3d8e09c10f;
 cqlsh:mwerrch select key,node,computer from B4Container_Demo where 
 computer=50;
 (0 rows)
 cqlsh:mwerrch INSERT INTO B4Container_Demo (key,computer,node) VALUES 
 (78c70562-1f98-3971-9c28-2c3d8e09c10f, 50, 50); cqlsh:mwerrch select 
 key,node,computer from B4Container_Demo where computer=50;
  key  | node | computer
 --+--+--
  78c70562-1f98-3971-9c28-2c3d8e09c10f |   50 |   50
 (1 rows)
 **
 Now we execute (maybe from a different shell so we don't have to close this 
 session) from /opt/cassandra/current/bin directory:
 ./nodetool cleanup
 ./nodetool flush
 ./nodetool compact
 Going back to our CQL session the result will no longer be available if 
 queried via the index:
 *
 cqlsh:mwerrch select key,node,computer from B4Container_Demo where 
 computer=50;
 (0 rows)



--
This message was sent by Atlassian JIRA
(v6.1.4#6159)


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

2013-12-20 Thread slebresne
Author: slebresne
Date: Fri Dec 20 19:02:11 2013
New Revision: 1552784

URL: http://svn.apache.org/r1552784
Log:
Update website for 1.2.13

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=1552784r1=1552783r2=1552784view=diff
==
--- cassandra/site/publish/download/index.html (original)
+++ cassandra/site/publish/download/index.html Fri Dec 20 19:02:11 2013
@@ -102,16 +102,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.2 branch is 1.2.12 (released on
-  2013-11-25).
+  1.2 branch is 1.2.13 (released on
+  2013-12-20).
   /p
 
   ul
 li
-a class=filename 
href=http://www.apache.org/dyn/closer.cgi?path=/cassandra/1.2.12/apache-cassandra-1.2.12-bin.tar.gz;apache-cassandra-1.2.12-bin.tar.gz/a
-[a 
href=http://www.apache.org/dist/cassandra/1.2.12/apache-cassandra-1.2.12-bin.tar.gz.asc;PGP/a]
-[a 
href=http://www.apache.org/dist/cassandra/1.2.12/apache-cassandra-1.2.12-bin.tar.gz.md5;MD5/a]
-[a 
href=http://www.apache.org/dist/cassandra/1.2.12/apache-cassandra-1.2.12-bin.tar.gz.sha1;SHA1/a]
+a class=filename 
href=http://www.apache.org/dyn/closer.cgi?path=/cassandra/1.2.13/apache-cassandra-1.2.13-bin.tar.gz;apache-cassandra-1.2.13-bin.tar.gz/a
+[a 
href=http://www.apache.org/dist/cassandra/1.2.13/apache-cassandra-1.2.13-bin.tar.gz.asc;PGP/a]
+[a 
href=http://www.apache.org/dist/cassandra/1.2.13/apache-cassandra-1.2.13-bin.tar.gz.md5;MD5/a]
+[a 
href=http://www.apache.org/dist/cassandra/1.2.13/apache-cassandra-1.2.13-bin.tar.gz.sha1;SHA1/a]
 /li
   /ul
   
@@ -154,10 +154,10 @@
 /li
   
 li
-a class=filename 
href=http://www.apache.org/dyn/closer.cgi?path=/cassandra/1.2.12/apache-cassandra-1.2.12-src.tar.gz;apache-cassandra-1.2.12-src.tar.gz/a
-[a 
href=http://www.apache.org/dist/cassandra/1.2.12/apache-cassandra-1.2.12-src.tar.gz.asc;PGP/a]
-[a 
href=http://www.apache.org/dist/cassandra/1.2.12/apache-cassandra-1.2.12-src.tar.gz.md5;MD5/a]
-[a 
href=http://www.apache.org/dist/cassandra/1.2.12/apache-cassandra-1.2.12-src.tar.gz.sha1;SHA1/a]
+a class=filename 
href=http://www.apache.org/dyn/closer.cgi?path=/cassandra/1.2.13/apache-cassandra-1.2.13-src.tar.gz;apache-cassandra-1.2.13-src.tar.gz/a
+[a 
href=http://www.apache.org/dist/cassandra/1.2.13/apache-cassandra-1.2.13-src.tar.gz.asc;PGP/a]
+[a 
href=http://www.apache.org/dist/cassandra/1.2.13/apache-cassandra-1.2.13-src.tar.gz.md5;MD5/a]
+[a 
href=http://www.apache.org/dist/cassandra/1.2.13/apache-cassandra-1.2.13-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=1552784r1=1552783r2=1552784view=diff
==
--- cassandra/site/src/settings.py (original)
+++ cassandra/site/src/settings.py Fri Dec 20 19:02:11 2013
@@ -92,8 +92,8 @@ SITE_POST_PROCESSORS = {
 }
 
 class CassandraDef(object):
-oldstable_version = '1.2.12'
-oldstable_release_date = '2013-11-25'
+oldstable_version = '1.2.13'
+oldstable_release_date = '2013-12-20'
 oldstable_exists = True
 veryoldstable_version = '1.1.12'
 veryoldstable_release_date = '2013-05-27'




[jira] [Commented] (CASSANDRA-4687) Exception: DecoratedKey(xxx, yyy) != DecoratedKey(zzz, kkk)

2013-12-20 Thread Jacek Furmankiewicz (JIRA)

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

Jacek Furmankiewicz commented on CASSANDRA-4687:


Hi Pavel, I took a stock 1.1.12 install, removed the 
apache-cassandra-1.1.12.jar from the /lib folder and replaced it with your 
apache-cassandra-1.2.13-SNAPSHOT.jar.

When I try to run bin/cassandra I get

Error: Could not find or load main class 
org.apache.cassandra.thrift.CassandraDaemon

Is there something else I need to do in order to integrate your JAR into a 
stock 1.1.12 install?

 Exception: DecoratedKey(xxx, yyy) != DecoratedKey(zzz, kkk)
 ---

 Key: CASSANDRA-4687
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4687
 Project: Cassandra
  Issue Type: Bug
  Components: Core
 Environment: CentOS 6.3 64-bit, Oracle JRE 1.6.0.33 64-bit, single 
 node cluster
Reporter: Leonid Shalupov
Priority: Minor
 Attachments: 4687-debugging.txt, 
 apache-cassandra-1.2.13-SNAPSHOT.jar, guava-backed-cache.patch


 Under heavy write load sometimes cassandra fails with assertion error.
 git bisect leads to commit 295aedb278e7a495213241b66bc46d763fd4ce66.
 works fine if global key/row caches disabled in code.
 {quote}
 java.lang.AssertionError: DecoratedKey(xxx, yyy) != DecoratedKey(zzz, kkk) in 
 /var/lib/cassandra/data/...-he-1-Data.db
   at 
 org.apache.cassandra.db.columniterator.SSTableSliceIterator.init(SSTableSliceIterator.java:60)
   at 
 org.apache.cassandra.db.filter.SliceQueryFilter.getSSTableColumnIterator(SliceQueryFilter.java:67)
   at 
 org.apache.cassandra.db.filter.QueryFilter.getSSTableColumnIterator(QueryFilter.java:79)
   at 
 org.apache.cassandra.db.CollationController.collectAllData(CollationController.java:256)
   at 
 org.apache.cassandra.db.CollationController.getTopLevelColumns(CollationController.java:64)
   at 
 org.apache.cassandra.db.ColumnFamilyStore.getTopLevelColumns(ColumnFamilyStore.java:1345)
   at 
 org.apache.cassandra.db.ColumnFamilyStore.getColumnFamily(ColumnFamilyStore.java:1207)
   at 
 org.apache.cassandra.db.ColumnFamilyStore.getColumnFamily(ColumnFamilyStore.java:1142)
   at org.apache.cassandra.db.Table.getRow(Table.java:378)
   at 
 org.apache.cassandra.db.SliceFromReadCommand.getRow(SliceFromReadCommand.java:69)
   at 
 org.apache.cassandra.service.StorageProxy$LocalReadRunnable.runMayThrow(StorageProxy.java:819)
   at 
 org.apache.cassandra.service.StorageProxy$DroppableRunnable.run(StorageProxy.java:1253)
   at 
 java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
   at 
 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
   at java.lang.Thread.run(Thread.java:662)
 {quote}



--
This message was sent by Atlassian JIRA
(v6.1.4#6159)


[jira] [Commented] (CASSANDRA-4687) Exception: DecoratedKey(xxx, yyy) != DecoratedKey(zzz, kkk)

2013-12-20 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis commented on CASSANDRA-4687:
---

Yes.

 Exception: DecoratedKey(xxx, yyy) != DecoratedKey(zzz, kkk)
 ---

 Key: CASSANDRA-4687
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4687
 Project: Cassandra
  Issue Type: Bug
  Components: Core
 Environment: CentOS 6.3 64-bit, Oracle JRE 1.6.0.33 64-bit, single 
 node cluster
Reporter: Leonid Shalupov
Priority: Minor
 Attachments: 4687-debugging.txt, 
 apache-cassandra-1.2.13-SNAPSHOT.jar, guava-backed-cache.patch


 Under heavy write load sometimes cassandra fails with assertion error.
 git bisect leads to commit 295aedb278e7a495213241b66bc46d763fd4ce66.
 works fine if global key/row caches disabled in code.
 {quote}
 java.lang.AssertionError: DecoratedKey(xxx, yyy) != DecoratedKey(zzz, kkk) in 
 /var/lib/cassandra/data/...-he-1-Data.db
   at 
 org.apache.cassandra.db.columniterator.SSTableSliceIterator.init(SSTableSliceIterator.java:60)
   at 
 org.apache.cassandra.db.filter.SliceQueryFilter.getSSTableColumnIterator(SliceQueryFilter.java:67)
   at 
 org.apache.cassandra.db.filter.QueryFilter.getSSTableColumnIterator(QueryFilter.java:79)
   at 
 org.apache.cassandra.db.CollationController.collectAllData(CollationController.java:256)
   at 
 org.apache.cassandra.db.CollationController.getTopLevelColumns(CollationController.java:64)
   at 
 org.apache.cassandra.db.ColumnFamilyStore.getTopLevelColumns(ColumnFamilyStore.java:1345)
   at 
 org.apache.cassandra.db.ColumnFamilyStore.getColumnFamily(ColumnFamilyStore.java:1207)
   at 
 org.apache.cassandra.db.ColumnFamilyStore.getColumnFamily(ColumnFamilyStore.java:1142)
   at org.apache.cassandra.db.Table.getRow(Table.java:378)
   at 
 org.apache.cassandra.db.SliceFromReadCommand.getRow(SliceFromReadCommand.java:69)
   at 
 org.apache.cassandra.service.StorageProxy$LocalReadRunnable.runMayThrow(StorageProxy.java:819)
   at 
 org.apache.cassandra.service.StorageProxy$DroppableRunnable.run(StorageProxy.java:1253)
   at 
 java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
   at 
 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
   at java.lang.Thread.run(Thread.java:662)
 {quote}



--
This message was sent by Atlassian JIRA
(v6.1.4#6159)


[jira] [Created] (CASSANDRA-6518) Add in forgotten MX4J variables to cassandra-env.sh

2013-12-20 Thread Lewis John McGibbney (JIRA)
Lewis John McGibbney created CASSANDRA-6518:
---

 Summary: Add in forgotten MX4J variables to cassandra-env.sh
 Key: CASSANDRA-6518
 URL: https://issues.apache.org/jira/browse/CASSANDRA-6518
 Project: Cassandra
  Issue Type: Improvement
  Components: Config
Reporter: Lewis John McGibbney
Priority: Trivial
 Fix For: 2.1


It seems that a small patch has been forgotten regarding adding certain MX4J 
configuration variables to cassandra-env.sh. This issue will simply add them so 
folks can easily tweak to suit their setUp. 



--
This message was sent by Atlassian JIRA
(v6.1.4#6159)


[jira] [Commented] (CASSANDRA-4687) Exception: DecoratedKey(xxx, yyy) != DecoratedKey(zzz, kkk)

2013-12-20 Thread Jacek Furmankiewicz (JIRA)

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

Jacek Furmankiewicz commented on CASSANDRA-4687:


?

 Exception: DecoratedKey(xxx, yyy) != DecoratedKey(zzz, kkk)
 ---

 Key: CASSANDRA-4687
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4687
 Project: Cassandra
  Issue Type: Bug
  Components: Core
 Environment: CentOS 6.3 64-bit, Oracle JRE 1.6.0.33 64-bit, single 
 node cluster
Reporter: Leonid Shalupov
Priority: Minor
 Attachments: 4687-debugging.txt, 
 apache-cassandra-1.2.13-SNAPSHOT.jar, guava-backed-cache.patch


 Under heavy write load sometimes cassandra fails with assertion error.
 git bisect leads to commit 295aedb278e7a495213241b66bc46d763fd4ce66.
 works fine if global key/row caches disabled in code.
 {quote}
 java.lang.AssertionError: DecoratedKey(xxx, yyy) != DecoratedKey(zzz, kkk) in 
 /var/lib/cassandra/data/...-he-1-Data.db
   at 
 org.apache.cassandra.db.columniterator.SSTableSliceIterator.init(SSTableSliceIterator.java:60)
   at 
 org.apache.cassandra.db.filter.SliceQueryFilter.getSSTableColumnIterator(SliceQueryFilter.java:67)
   at 
 org.apache.cassandra.db.filter.QueryFilter.getSSTableColumnIterator(QueryFilter.java:79)
   at 
 org.apache.cassandra.db.CollationController.collectAllData(CollationController.java:256)
   at 
 org.apache.cassandra.db.CollationController.getTopLevelColumns(CollationController.java:64)
   at 
 org.apache.cassandra.db.ColumnFamilyStore.getTopLevelColumns(ColumnFamilyStore.java:1345)
   at 
 org.apache.cassandra.db.ColumnFamilyStore.getColumnFamily(ColumnFamilyStore.java:1207)
   at 
 org.apache.cassandra.db.ColumnFamilyStore.getColumnFamily(ColumnFamilyStore.java:1142)
   at org.apache.cassandra.db.Table.getRow(Table.java:378)
   at 
 org.apache.cassandra.db.SliceFromReadCommand.getRow(SliceFromReadCommand.java:69)
   at 
 org.apache.cassandra.service.StorageProxy$LocalReadRunnable.runMayThrow(StorageProxy.java:819)
   at 
 org.apache.cassandra.service.StorageProxy$DroppableRunnable.run(StorageProxy.java:1253)
   at 
 java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
   at 
 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
   at java.lang.Thread.run(Thread.java:662)
 {quote}



--
This message was sent by Atlassian JIRA
(v6.1.4#6159)


[jira] [Commented] (CASSANDRA-4687) Exception: DecoratedKey(xxx, yyy) != DecoratedKey(zzz, kkk)

2013-12-20 Thread Pavel Yaskevich (JIRA)

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

Pavel Yaskevich commented on CASSANDRA-4687:


How about you take a 1.2 install and replace the jar there?

 Exception: DecoratedKey(xxx, yyy) != DecoratedKey(zzz, kkk)
 ---

 Key: CASSANDRA-4687
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4687
 Project: Cassandra
  Issue Type: Bug
  Components: Core
 Environment: CentOS 6.3 64-bit, Oracle JRE 1.6.0.33 64-bit, single 
 node cluster
Reporter: Leonid Shalupov
Priority: Minor
 Attachments: 4687-debugging.txt, 
 apache-cassandra-1.2.13-SNAPSHOT.jar, guava-backed-cache.patch


 Under heavy write load sometimes cassandra fails with assertion error.
 git bisect leads to commit 295aedb278e7a495213241b66bc46d763fd4ce66.
 works fine if global key/row caches disabled in code.
 {quote}
 java.lang.AssertionError: DecoratedKey(xxx, yyy) != DecoratedKey(zzz, kkk) in 
 /var/lib/cassandra/data/...-he-1-Data.db
   at 
 org.apache.cassandra.db.columniterator.SSTableSliceIterator.init(SSTableSliceIterator.java:60)
   at 
 org.apache.cassandra.db.filter.SliceQueryFilter.getSSTableColumnIterator(SliceQueryFilter.java:67)
   at 
 org.apache.cassandra.db.filter.QueryFilter.getSSTableColumnIterator(QueryFilter.java:79)
   at 
 org.apache.cassandra.db.CollationController.collectAllData(CollationController.java:256)
   at 
 org.apache.cassandra.db.CollationController.getTopLevelColumns(CollationController.java:64)
   at 
 org.apache.cassandra.db.ColumnFamilyStore.getTopLevelColumns(ColumnFamilyStore.java:1345)
   at 
 org.apache.cassandra.db.ColumnFamilyStore.getColumnFamily(ColumnFamilyStore.java:1207)
   at 
 org.apache.cassandra.db.ColumnFamilyStore.getColumnFamily(ColumnFamilyStore.java:1142)
   at org.apache.cassandra.db.Table.getRow(Table.java:378)
   at 
 org.apache.cassandra.db.SliceFromReadCommand.getRow(SliceFromReadCommand.java:69)
   at 
 org.apache.cassandra.service.StorageProxy$LocalReadRunnable.runMayThrow(StorageProxy.java:819)
   at 
 org.apache.cassandra.service.StorageProxy$DroppableRunnable.run(StorageProxy.java:1253)
   at 
 java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
   at 
 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
   at java.lang.Thread.run(Thread.java:662)
 {quote}



--
This message was sent by Atlassian JIRA
(v6.1.4#6159)


[jira] [Updated] (CASSANDRA-6518) Add in forgotten MX4J variables to cassandra-env.sh

2013-12-20 Thread Lewis John McGibbney (JIRA)

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

Lewis John McGibbney updated CASSANDRA-6518:


Attachment: CASSANDRA-6518.patch

Patch for trunk which I hope applies there. 
Very simple.

 Add in forgotten MX4J variables to cassandra-env.sh
 ---

 Key: CASSANDRA-6518
 URL: https://issues.apache.org/jira/browse/CASSANDRA-6518
 Project: Cassandra
  Issue Type: Improvement
  Components: Config
Reporter: Lewis John McGibbney
Priority: Trivial
 Fix For: 2.1

 Attachments: CASSANDRA-6518.patch


 It seems that a small patch has been forgotten regarding adding certain MX4J 
 configuration variables to cassandra-env.sh. This issue will simply add them 
 so folks can easily tweak to suit their setUp. 



--
This message was sent by Atlassian JIRA
(v6.1.4#6159)


[jira] [Commented] (CASSANDRA-4687) Exception: DecoratedKey(xxx, yyy) != DecoratedKey(zzz, kkk)

2013-12-20 Thread Jacek Furmankiewicz (JIRA)

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

Jacek Furmankiewicz commented on CASSANDRA-4687:


That is what I did. Downloaded 1.1.12 directly from the Apache site. Removed 
the 1.1.2 jar from /lib and replaced it with your 1.1.3-SNAPSHOT jar.

This is what the /lib folder looks now:

ls -al
total 11908
drwxr-xr-x 3 jacekf jacekf4096 Dec 20 13:32 .
drwxr-xr-x 9 jacekf jacekf4096 Dec 20 13:31 ..
-rw-r--r-- 1 jacekf jacekf 1928009 May 23  2013 antlr-3.2.jar
-rw--- 1 jacekf jacekf 3143109 Dec 20 13:31 
apache-cassandra-1.2.13-SNAPSHOT.jar
-rw-r--r-- 1 jacekf jacekf   35719 May 23  2013 
apache-cassandra-clientutil-1.1.12.jar
-rw-r--r-- 1 jacekf jacekf  976978 May 23  2013 
apache-cassandra-thrift-1.1.12.jar
-rw-r--r-- 1 jacekf jacekf  596381 May 23  2013 avro-1.4.0-fixes.jar
-rw-r--r-- 1 jacekf jacekf  276425 May 23  2013 avro-1.4.0-sources-fixes.jar
-rw-r--r-- 1 jacekf jacekf   36174 May 23  2013 commons-cli-1.1.jar
-rw-r--r-- 1 jacekf jacekf   30085 May 23  2013 commons-codec-1.2.jar
-rw-r--r-- 1 jacekf jacekf  261809 May 23  2013 commons-lang-2.4.jar
-rw-r--r-- 1 jacekf jacekf   25490 May 23  2013 compress-lzf-0.8.4.jar
-rw-r--r-- 1 jacekf jacekf   54345 May 23  2013 
concurrentlinkedhashmap-lru-1.3.jar
-rw-r--r-- 1 jacekf jacekf   91982 May 23  2013 cql-internal-only-1.4.0.zip
-rw-r--r-- 1 jacekf jacekf 1112253 May 23  2013 guava-r08.jar
-rw-r--r-- 1 jacekf jacekf   96046 May 23  2013 high-scale-lib-1.1.2.jar
-rw-r--r-- 1 jacekf jacekf  228286 May 23  2013 jackson-core-asl-1.9.2.jar
-rw-r--r-- 1 jacekf jacekf  765648 May 23  2013 jackson-mapper-asl-1.9.2.jar
-rw-r--r-- 1 jacekf jacekf5792 May 23  2013 jamm-0.2.5.jar
-rw-r--r-- 1 jacekf jacekf   87325 May 23  2013 jline-0.9.94.jar
-rw-r--r-- 1 jacekf jacekf   16046 May 23  2013 json-simple-1.1.jar
-rw-r--r-- 1 jacekf jacekf  301547 May 23  2013 libthrift-0.7.0.jar
drwxr-xr-x 2 jacekf jacekf4096 Dec 20 13:31 licenses
-rw-r--r-- 1 jacekf jacekf  481534 May 23  2013 log4j-1.2.16.jar
-rw-r--r-- 1 jacekf jacekf   80800 May 23  2013 metrics-core-2.0.3.jar
-rw-r--r-- 1 jacekf jacekf  134133 May 23  2013 servlet-api-2.5-20081211.jar
-rw-r--r-- 1 jacekf jacekf   25496 May 23  2013 slf4j-api-1.6.1.jar
-rw-r--r-- 1 jacekf jacekf9753 May 23  2013 slf4j-log4j12-1.6.1.jar
-rw-r--r-- 1 jacekf jacekf  232121 May 23  2013 snakeyaml-1.6.jar
-rw-r--r-- 1 jacekf jacekf  995967 May 23  2013 snappy-java-1.0.4.1.jar
-rw-r--r-- 1 jacekf jacekf   55066 May 23  2013 snaptree-0.1.jar
-rw-r--r-- 1 jacekf jacekf   42854 May 23  2013 
thrift-python-internal-only-0.7.0.zip


 Exception: DecoratedKey(xxx, yyy) != DecoratedKey(zzz, kkk)
 ---

 Key: CASSANDRA-4687
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4687
 Project: Cassandra
  Issue Type: Bug
  Components: Core
 Environment: CentOS 6.3 64-bit, Oracle JRE 1.6.0.33 64-bit, single 
 node cluster
Reporter: Leonid Shalupov
Priority: Minor
 Attachments: 4687-debugging.txt, 
 apache-cassandra-1.2.13-SNAPSHOT.jar, guava-backed-cache.patch


 Under heavy write load sometimes cassandra fails with assertion error.
 git bisect leads to commit 295aedb278e7a495213241b66bc46d763fd4ce66.
 works fine if global key/row caches disabled in code.
 {quote}
 java.lang.AssertionError: DecoratedKey(xxx, yyy) != DecoratedKey(zzz, kkk) in 
 /var/lib/cassandra/data/...-he-1-Data.db
   at 
 org.apache.cassandra.db.columniterator.SSTableSliceIterator.init(SSTableSliceIterator.java:60)
   at 
 org.apache.cassandra.db.filter.SliceQueryFilter.getSSTableColumnIterator(SliceQueryFilter.java:67)
   at 
 org.apache.cassandra.db.filter.QueryFilter.getSSTableColumnIterator(QueryFilter.java:79)
   at 
 org.apache.cassandra.db.CollationController.collectAllData(CollationController.java:256)
   at 
 org.apache.cassandra.db.CollationController.getTopLevelColumns(CollationController.java:64)
   at 
 org.apache.cassandra.db.ColumnFamilyStore.getTopLevelColumns(ColumnFamilyStore.java:1345)
   at 
 org.apache.cassandra.db.ColumnFamilyStore.getColumnFamily(ColumnFamilyStore.java:1207)
   at 
 org.apache.cassandra.db.ColumnFamilyStore.getColumnFamily(ColumnFamilyStore.java:1142)
   at org.apache.cassandra.db.Table.getRow(Table.java:378)
   at 
 org.apache.cassandra.db.SliceFromReadCommand.getRow(SliceFromReadCommand.java:69)
   at 
 org.apache.cassandra.service.StorageProxy$LocalReadRunnable.runMayThrow(StorageProxy.java:819)
   at 
 org.apache.cassandra.service.StorageProxy$DroppableRunnable.run(StorageProxy.java:1253)
   at 
 java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
   at 
 

[jira] [Commented] (CASSANDRA-4687) Exception: DecoratedKey(xxx, yyy) != DecoratedKey(zzz, kkk)

2013-12-20 Thread Jacek Furmankiewicz (JIRA)

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

Jacek Furmankiewicz commented on CASSANDRA-4687:


Ah sorry, we had a misunderstanding. I cannot take the 1.2 version. We need a 
1.1 version.

If you recall, we cannot run 1.2 on CentOS5 due to glibc issues. Client is also 
on 1.1 and in the short term is not interested in upgrading a production system 
to 1.2, so it would be a very hard sell.

That is why if we want to ask them to help us to reproduce the issue, we need 
to be able to do it with a 1.1 version.




 Exception: DecoratedKey(xxx, yyy) != DecoratedKey(zzz, kkk)
 ---

 Key: CASSANDRA-4687
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4687
 Project: Cassandra
  Issue Type: Bug
  Components: Core
 Environment: CentOS 6.3 64-bit, Oracle JRE 1.6.0.33 64-bit, single 
 node cluster
Reporter: Leonid Shalupov
Priority: Minor
 Attachments: 4687-debugging.txt, 
 apache-cassandra-1.2.13-SNAPSHOT.jar, guava-backed-cache.patch


 Under heavy write load sometimes cassandra fails with assertion error.
 git bisect leads to commit 295aedb278e7a495213241b66bc46d763fd4ce66.
 works fine if global key/row caches disabled in code.
 {quote}
 java.lang.AssertionError: DecoratedKey(xxx, yyy) != DecoratedKey(zzz, kkk) in 
 /var/lib/cassandra/data/...-he-1-Data.db
   at 
 org.apache.cassandra.db.columniterator.SSTableSliceIterator.init(SSTableSliceIterator.java:60)
   at 
 org.apache.cassandra.db.filter.SliceQueryFilter.getSSTableColumnIterator(SliceQueryFilter.java:67)
   at 
 org.apache.cassandra.db.filter.QueryFilter.getSSTableColumnIterator(QueryFilter.java:79)
   at 
 org.apache.cassandra.db.CollationController.collectAllData(CollationController.java:256)
   at 
 org.apache.cassandra.db.CollationController.getTopLevelColumns(CollationController.java:64)
   at 
 org.apache.cassandra.db.ColumnFamilyStore.getTopLevelColumns(ColumnFamilyStore.java:1345)
   at 
 org.apache.cassandra.db.ColumnFamilyStore.getColumnFamily(ColumnFamilyStore.java:1207)
   at 
 org.apache.cassandra.db.ColumnFamilyStore.getColumnFamily(ColumnFamilyStore.java:1142)
   at org.apache.cassandra.db.Table.getRow(Table.java:378)
   at 
 org.apache.cassandra.db.SliceFromReadCommand.getRow(SliceFromReadCommand.java:69)
   at 
 org.apache.cassandra.service.StorageProxy$LocalReadRunnable.runMayThrow(StorageProxy.java:819)
   at 
 org.apache.cassandra.service.StorageProxy$DroppableRunnable.run(StorageProxy.java:1253)
   at 
 java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
   at 
 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
   at java.lang.Thread.run(Thread.java:662)
 {quote}



--
This message was sent by Atlassian JIRA
(v6.1.4#6159)


[jira] [Commented] (CASSANDRA-4687) Exception: DecoratedKey(xxx, yyy) != DecoratedKey(zzz, kkk)

2013-12-20 Thread Jacek Furmankiewicz (JIRA)

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

Jacek Furmankiewicz commented on CASSANDRA-4687:


yes, sorry for the mistake. I was under the impression we could get a 
customized 1.1 version

 Exception: DecoratedKey(xxx, yyy) != DecoratedKey(zzz, kkk)
 ---

 Key: CASSANDRA-4687
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4687
 Project: Cassandra
  Issue Type: Bug
  Components: Core
 Environment: CentOS 6.3 64-bit, Oracle JRE 1.6.0.33 64-bit, single 
 node cluster
Reporter: Leonid Shalupov
Priority: Minor
 Attachments: 4687-debugging.txt, 
 apache-cassandra-1.2.13-SNAPSHOT.jar, guava-backed-cache.patch


 Under heavy write load sometimes cassandra fails with assertion error.
 git bisect leads to commit 295aedb278e7a495213241b66bc46d763fd4ce66.
 works fine if global key/row caches disabled in code.
 {quote}
 java.lang.AssertionError: DecoratedKey(xxx, yyy) != DecoratedKey(zzz, kkk) in 
 /var/lib/cassandra/data/...-he-1-Data.db
   at 
 org.apache.cassandra.db.columniterator.SSTableSliceIterator.init(SSTableSliceIterator.java:60)
   at 
 org.apache.cassandra.db.filter.SliceQueryFilter.getSSTableColumnIterator(SliceQueryFilter.java:67)
   at 
 org.apache.cassandra.db.filter.QueryFilter.getSSTableColumnIterator(QueryFilter.java:79)
   at 
 org.apache.cassandra.db.CollationController.collectAllData(CollationController.java:256)
   at 
 org.apache.cassandra.db.CollationController.getTopLevelColumns(CollationController.java:64)
   at 
 org.apache.cassandra.db.ColumnFamilyStore.getTopLevelColumns(ColumnFamilyStore.java:1345)
   at 
 org.apache.cassandra.db.ColumnFamilyStore.getColumnFamily(ColumnFamilyStore.java:1207)
   at 
 org.apache.cassandra.db.ColumnFamilyStore.getColumnFamily(ColumnFamilyStore.java:1142)
   at org.apache.cassandra.db.Table.getRow(Table.java:378)
   at 
 org.apache.cassandra.db.SliceFromReadCommand.getRow(SliceFromReadCommand.java:69)
   at 
 org.apache.cassandra.service.StorageProxy$LocalReadRunnable.runMayThrow(StorageProxy.java:819)
   at 
 org.apache.cassandra.service.StorageProxy$DroppableRunnable.run(StorageProxy.java:1253)
   at 
 java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
   at 
 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
   at java.lang.Thread.run(Thread.java:662)
 {quote}



--
This message was sent by Atlassian JIRA
(v6.1.4#6159)


[jira] [Commented] (CASSANDRA-4687) Exception: DecoratedKey(xxx, yyy) != DecoratedKey(zzz, kkk)

2013-12-20 Thread Pavel Yaskevich (JIRA)

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

Pavel Yaskevich commented on CASSANDRA-4687:


Well, the version is 1.*2*.13 :)

 Exception: DecoratedKey(xxx, yyy) != DecoratedKey(zzz, kkk)
 ---

 Key: CASSANDRA-4687
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4687
 Project: Cassandra
  Issue Type: Bug
  Components: Core
 Environment: CentOS 6.3 64-bit, Oracle JRE 1.6.0.33 64-bit, single 
 node cluster
Reporter: Leonid Shalupov
Priority: Minor
 Attachments: 4687-debugging.txt, 
 apache-cassandra-1.2.13-SNAPSHOT.jar, guava-backed-cache.patch


 Under heavy write load sometimes cassandra fails with assertion error.
 git bisect leads to commit 295aedb278e7a495213241b66bc46d763fd4ce66.
 works fine if global key/row caches disabled in code.
 {quote}
 java.lang.AssertionError: DecoratedKey(xxx, yyy) != DecoratedKey(zzz, kkk) in 
 /var/lib/cassandra/data/...-he-1-Data.db
   at 
 org.apache.cassandra.db.columniterator.SSTableSliceIterator.init(SSTableSliceIterator.java:60)
   at 
 org.apache.cassandra.db.filter.SliceQueryFilter.getSSTableColumnIterator(SliceQueryFilter.java:67)
   at 
 org.apache.cassandra.db.filter.QueryFilter.getSSTableColumnIterator(QueryFilter.java:79)
   at 
 org.apache.cassandra.db.CollationController.collectAllData(CollationController.java:256)
   at 
 org.apache.cassandra.db.CollationController.getTopLevelColumns(CollationController.java:64)
   at 
 org.apache.cassandra.db.ColumnFamilyStore.getTopLevelColumns(ColumnFamilyStore.java:1345)
   at 
 org.apache.cassandra.db.ColumnFamilyStore.getColumnFamily(ColumnFamilyStore.java:1207)
   at 
 org.apache.cassandra.db.ColumnFamilyStore.getColumnFamily(ColumnFamilyStore.java:1142)
   at org.apache.cassandra.db.Table.getRow(Table.java:378)
   at 
 org.apache.cassandra.db.SliceFromReadCommand.getRow(SliceFromReadCommand.java:69)
   at 
 org.apache.cassandra.service.StorageProxy$LocalReadRunnable.runMayThrow(StorageProxy.java:819)
   at 
 org.apache.cassandra.service.StorageProxy$DroppableRunnable.run(StorageProxy.java:1253)
   at 
 java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
   at 
 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
   at java.lang.Thread.run(Thread.java:662)
 {quote}



--
This message was sent by Atlassian JIRA
(v6.1.4#6159)


[jira] [Comment Edited] (CASSANDRA-4687) Exception: DecoratedKey(xxx, yyy) != DecoratedKey(zzz, kkk)

2013-12-20 Thread Jacek Furmankiewicz (JIRA)

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

Jacek Furmankiewicz edited comment on CASSANDRA-4687 at 12/20/13 8:01 PM:
--

Ah sorry, we had a misunderstanding. I cannot take the 1.2 version. We need a 
1.1 version.

If you recall, we cannot run 1.2 on RHEL5 due to glibc issues. Client is also 
on 1.1 and in the short term is not interested in upgrading a production system 
to 1.2, so it would be a very hard sell.

That is why if we want to ask them to help us to reproduce the issue, we need 
to be able to do it with a 1.1 version.





was (Author: jfurmankiewicz):
Ah sorry, we had a misunderstanding. I cannot take the 1.2 version. We need a 
1.1 version.

If you recall, we cannot run 1.2 on CentOS5 due to glibc issues. Client is also 
on 1.1 and in the short term is not interested in upgrading a production system 
to 1.2, so it would be a very hard sell.

That is why if we want to ask them to help us to reproduce the issue, we need 
to be able to do it with a 1.1 version.




 Exception: DecoratedKey(xxx, yyy) != DecoratedKey(zzz, kkk)
 ---

 Key: CASSANDRA-4687
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4687
 Project: Cassandra
  Issue Type: Bug
  Components: Core
 Environment: CentOS 6.3 64-bit, Oracle JRE 1.6.0.33 64-bit, single 
 node cluster
Reporter: Leonid Shalupov
Priority: Minor
 Attachments: 4687-debugging.txt, 
 apache-cassandra-1.2.13-SNAPSHOT.jar, guava-backed-cache.patch


 Under heavy write load sometimes cassandra fails with assertion error.
 git bisect leads to commit 295aedb278e7a495213241b66bc46d763fd4ce66.
 works fine if global key/row caches disabled in code.
 {quote}
 java.lang.AssertionError: DecoratedKey(xxx, yyy) != DecoratedKey(zzz, kkk) in 
 /var/lib/cassandra/data/...-he-1-Data.db
   at 
 org.apache.cassandra.db.columniterator.SSTableSliceIterator.init(SSTableSliceIterator.java:60)
   at 
 org.apache.cassandra.db.filter.SliceQueryFilter.getSSTableColumnIterator(SliceQueryFilter.java:67)
   at 
 org.apache.cassandra.db.filter.QueryFilter.getSSTableColumnIterator(QueryFilter.java:79)
   at 
 org.apache.cassandra.db.CollationController.collectAllData(CollationController.java:256)
   at 
 org.apache.cassandra.db.CollationController.getTopLevelColumns(CollationController.java:64)
   at 
 org.apache.cassandra.db.ColumnFamilyStore.getTopLevelColumns(ColumnFamilyStore.java:1345)
   at 
 org.apache.cassandra.db.ColumnFamilyStore.getColumnFamily(ColumnFamilyStore.java:1207)
   at 
 org.apache.cassandra.db.ColumnFamilyStore.getColumnFamily(ColumnFamilyStore.java:1142)
   at org.apache.cassandra.db.Table.getRow(Table.java:378)
   at 
 org.apache.cassandra.db.SliceFromReadCommand.getRow(SliceFromReadCommand.java:69)
   at 
 org.apache.cassandra.service.StorageProxy$LocalReadRunnable.runMayThrow(StorageProxy.java:819)
   at 
 org.apache.cassandra.service.StorageProxy$DroppableRunnable.run(StorageProxy.java:1253)
   at 
 java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
   at 
 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
   at java.lang.Thread.run(Thread.java:662)
 {quote}



--
This message was sent by Atlassian JIRA
(v6.1.4#6159)


[jira] [Commented] (CASSANDRA-4687) Exception: DecoratedKey(xxx, yyy) != DecoratedKey(zzz, kkk)

2013-12-20 Thread Jacek Furmankiewicz (JIRA)

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

Jacek Furmankiewicz commented on CASSANDRA-4687:


if you can give me a customized 1.2 version that starts on a stock RHEL5 (i.e. 
bypasses the glibc issues in libsnappy) then we could try just in a test 
environment with 1.2.
But it all hinges on getting 1.2 running on RHEL5

 Exception: DecoratedKey(xxx, yyy) != DecoratedKey(zzz, kkk)
 ---

 Key: CASSANDRA-4687
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4687
 Project: Cassandra
  Issue Type: Bug
  Components: Core
 Environment: CentOS 6.3 64-bit, Oracle JRE 1.6.0.33 64-bit, single 
 node cluster
Reporter: Leonid Shalupov
Priority: Minor
 Attachments: 4687-debugging.txt, 
 apache-cassandra-1.2.13-SNAPSHOT.jar, guava-backed-cache.patch


 Under heavy write load sometimes cassandra fails with assertion error.
 git bisect leads to commit 295aedb278e7a495213241b66bc46d763fd4ce66.
 works fine if global key/row caches disabled in code.
 {quote}
 java.lang.AssertionError: DecoratedKey(xxx, yyy) != DecoratedKey(zzz, kkk) in 
 /var/lib/cassandra/data/...-he-1-Data.db
   at 
 org.apache.cassandra.db.columniterator.SSTableSliceIterator.init(SSTableSliceIterator.java:60)
   at 
 org.apache.cassandra.db.filter.SliceQueryFilter.getSSTableColumnIterator(SliceQueryFilter.java:67)
   at 
 org.apache.cassandra.db.filter.QueryFilter.getSSTableColumnIterator(QueryFilter.java:79)
   at 
 org.apache.cassandra.db.CollationController.collectAllData(CollationController.java:256)
   at 
 org.apache.cassandra.db.CollationController.getTopLevelColumns(CollationController.java:64)
   at 
 org.apache.cassandra.db.ColumnFamilyStore.getTopLevelColumns(ColumnFamilyStore.java:1345)
   at 
 org.apache.cassandra.db.ColumnFamilyStore.getColumnFamily(ColumnFamilyStore.java:1207)
   at 
 org.apache.cassandra.db.ColumnFamilyStore.getColumnFamily(ColumnFamilyStore.java:1142)
   at org.apache.cassandra.db.Table.getRow(Table.java:378)
   at 
 org.apache.cassandra.db.SliceFromReadCommand.getRow(SliceFromReadCommand.java:69)
   at 
 org.apache.cassandra.service.StorageProxy$LocalReadRunnable.runMayThrow(StorageProxy.java:819)
   at 
 org.apache.cassandra.service.StorageProxy$DroppableRunnable.run(StorageProxy.java:1253)
   at 
 java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
   at 
 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
   at java.lang.Thread.run(Thread.java:662)
 {quote}



--
This message was sent by Atlassian JIRA
(v6.1.4#6159)


[jira] [Commented] (CASSANDRA-4687) Exception: DecoratedKey(xxx, yyy) != DecoratedKey(zzz, kkk)

2013-12-20 Thread Pavel Yaskevich (JIRA)

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

Pavel Yaskevich commented on CASSANDRA-4687:


Just replace the jar in latest 1.2 release with what I have attached and do 
what Jonathan suggested:
bq. 1.2 will run on RHEL5 if you replace the snappy-1.0.5 jar with the 
snappy-1.0.4 jar from C* 1.1.

 Exception: DecoratedKey(xxx, yyy) != DecoratedKey(zzz, kkk)
 ---

 Key: CASSANDRA-4687
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4687
 Project: Cassandra
  Issue Type: Bug
  Components: Core
 Environment: CentOS 6.3 64-bit, Oracle JRE 1.6.0.33 64-bit, single 
 node cluster
Reporter: Leonid Shalupov
Priority: Minor
 Attachments: 4687-debugging.txt, 
 apache-cassandra-1.2.13-SNAPSHOT.jar, guava-backed-cache.patch


 Under heavy write load sometimes cassandra fails with assertion error.
 git bisect leads to commit 295aedb278e7a495213241b66bc46d763fd4ce66.
 works fine if global key/row caches disabled in code.
 {quote}
 java.lang.AssertionError: DecoratedKey(xxx, yyy) != DecoratedKey(zzz, kkk) in 
 /var/lib/cassandra/data/...-he-1-Data.db
   at 
 org.apache.cassandra.db.columniterator.SSTableSliceIterator.init(SSTableSliceIterator.java:60)
   at 
 org.apache.cassandra.db.filter.SliceQueryFilter.getSSTableColumnIterator(SliceQueryFilter.java:67)
   at 
 org.apache.cassandra.db.filter.QueryFilter.getSSTableColumnIterator(QueryFilter.java:79)
   at 
 org.apache.cassandra.db.CollationController.collectAllData(CollationController.java:256)
   at 
 org.apache.cassandra.db.CollationController.getTopLevelColumns(CollationController.java:64)
   at 
 org.apache.cassandra.db.ColumnFamilyStore.getTopLevelColumns(ColumnFamilyStore.java:1345)
   at 
 org.apache.cassandra.db.ColumnFamilyStore.getColumnFamily(ColumnFamilyStore.java:1207)
   at 
 org.apache.cassandra.db.ColumnFamilyStore.getColumnFamily(ColumnFamilyStore.java:1142)
   at org.apache.cassandra.db.Table.getRow(Table.java:378)
   at 
 org.apache.cassandra.db.SliceFromReadCommand.getRow(SliceFromReadCommand.java:69)
   at 
 org.apache.cassandra.service.StorageProxy$LocalReadRunnable.runMayThrow(StorageProxy.java:819)
   at 
 org.apache.cassandra.service.StorageProxy$DroppableRunnable.run(StorageProxy.java:1253)
   at 
 java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
   at 
 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
   at java.lang.Thread.run(Thread.java:662)
 {quote}



--
This message was sent by Atlassian JIRA
(v6.1.4#6159)


[jira] [Commented] (CASSANDRA-4687) Exception: DecoratedKey(xxx, yyy) != DecoratedKey(zzz, kkk)

2013-12-20 Thread Jacek Furmankiewicz (JIRA)

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

Jacek Furmankiewicz commented on CASSANDRA-4687:


OK, will do, thanks. Hopefully we should be able to try it in the customer's 
test environment next week, I will keep you posted if we find anything

 Exception: DecoratedKey(xxx, yyy) != DecoratedKey(zzz, kkk)
 ---

 Key: CASSANDRA-4687
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4687
 Project: Cassandra
  Issue Type: Bug
  Components: Core
 Environment: CentOS 6.3 64-bit, Oracle JRE 1.6.0.33 64-bit, single 
 node cluster
Reporter: Leonid Shalupov
Priority: Minor
 Attachments: 4687-debugging.txt, 
 apache-cassandra-1.2.13-SNAPSHOT.jar, guava-backed-cache.patch


 Under heavy write load sometimes cassandra fails with assertion error.
 git bisect leads to commit 295aedb278e7a495213241b66bc46d763fd4ce66.
 works fine if global key/row caches disabled in code.
 {quote}
 java.lang.AssertionError: DecoratedKey(xxx, yyy) != DecoratedKey(zzz, kkk) in 
 /var/lib/cassandra/data/...-he-1-Data.db
   at 
 org.apache.cassandra.db.columniterator.SSTableSliceIterator.init(SSTableSliceIterator.java:60)
   at 
 org.apache.cassandra.db.filter.SliceQueryFilter.getSSTableColumnIterator(SliceQueryFilter.java:67)
   at 
 org.apache.cassandra.db.filter.QueryFilter.getSSTableColumnIterator(QueryFilter.java:79)
   at 
 org.apache.cassandra.db.CollationController.collectAllData(CollationController.java:256)
   at 
 org.apache.cassandra.db.CollationController.getTopLevelColumns(CollationController.java:64)
   at 
 org.apache.cassandra.db.ColumnFamilyStore.getTopLevelColumns(ColumnFamilyStore.java:1345)
   at 
 org.apache.cassandra.db.ColumnFamilyStore.getColumnFamily(ColumnFamilyStore.java:1207)
   at 
 org.apache.cassandra.db.ColumnFamilyStore.getColumnFamily(ColumnFamilyStore.java:1142)
   at org.apache.cassandra.db.Table.getRow(Table.java:378)
   at 
 org.apache.cassandra.db.SliceFromReadCommand.getRow(SliceFromReadCommand.java:69)
   at 
 org.apache.cassandra.service.StorageProxy$LocalReadRunnable.runMayThrow(StorageProxy.java:819)
   at 
 org.apache.cassandra.service.StorageProxy$DroppableRunnable.run(StorageProxy.java:1253)
   at 
 java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
   at 
 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
   at java.lang.Thread.run(Thread.java:662)
 {quote}



--
This message was sent by Atlassian JIRA
(v6.1.4#6159)


git commit: Ninja-fix typo in Tracing

2013-12-20 Thread slebresne
Updated Branches:
  refs/heads/trunk ed6584ee1 - 4fb06b33d


Ninja-fix typo in Tracing


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

Branch: refs/heads/trunk
Commit: 4fb06b33d4fb742ce0aeb3fe569d7d513314311f
Parents: ed6584e
Author: Sylvain Lebresne sylv...@datastax.com
Authored: Fri Dec 20 21:14:09 2013 +0100
Committer: Sylvain Lebresne sylv...@datastax.com
Committed: Fri Dec 20 21:14:09 2013 +0100

--
 src/java/org/apache/cassandra/tracing/Tracing.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/4fb06b33/src/java/org/apache/cassandra/tracing/Tracing.java
--
diff --git a/src/java/org/apache/cassandra/tracing/Tracing.java 
b/src/java/org/apache/cassandra/tracing/Tracing.java
index 963ee0c..42ce12b 100644
--- a/src/java/org/apache/cassandra/tracing/Tracing.java
+++ b/src/java/org/apache/cassandra/tracing/Tracing.java
@@ -100,8 +100,8 @@ public class Tracing
 {
 for (Map.EntryString, String entry : rawPayload.entrySet())
 {
-cf.addColumn(new ExpiringCell(buildName(cf.metadata(), 
parameters, entry.getKey()),
-bytes(entry.getValue()), 
System.currentTimeMillis(), TTL));
+cf.addColumn(new 
ExpiringCell(buildName(CFMetaData.TraceSessionsCf, parameters, 
entry.getKey()),
+  bytes(entry.getValue()), 
System.currentTimeMillis(), TTL));
 }
 }
 



[jira] [Commented] (CASSANDRA-4687) Exception: DecoratedKey(xxx, yyy) != DecoratedKey(zzz, kkk)

2013-12-20 Thread Pavel Yaskevich (JIRA)

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

Pavel Yaskevich commented on CASSANDRA-4687:


Thanks!

 Exception: DecoratedKey(xxx, yyy) != DecoratedKey(zzz, kkk)
 ---

 Key: CASSANDRA-4687
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4687
 Project: Cassandra
  Issue Type: Bug
  Components: Core
 Environment: CentOS 6.3 64-bit, Oracle JRE 1.6.0.33 64-bit, single 
 node cluster
Reporter: Leonid Shalupov
Priority: Minor
 Attachments: 4687-debugging.txt, 
 apache-cassandra-1.2.13-SNAPSHOT.jar, guava-backed-cache.patch


 Under heavy write load sometimes cassandra fails with assertion error.
 git bisect leads to commit 295aedb278e7a495213241b66bc46d763fd4ce66.
 works fine if global key/row caches disabled in code.
 {quote}
 java.lang.AssertionError: DecoratedKey(xxx, yyy) != DecoratedKey(zzz, kkk) in 
 /var/lib/cassandra/data/...-he-1-Data.db
   at 
 org.apache.cassandra.db.columniterator.SSTableSliceIterator.init(SSTableSliceIterator.java:60)
   at 
 org.apache.cassandra.db.filter.SliceQueryFilter.getSSTableColumnIterator(SliceQueryFilter.java:67)
   at 
 org.apache.cassandra.db.filter.QueryFilter.getSSTableColumnIterator(QueryFilter.java:79)
   at 
 org.apache.cassandra.db.CollationController.collectAllData(CollationController.java:256)
   at 
 org.apache.cassandra.db.CollationController.getTopLevelColumns(CollationController.java:64)
   at 
 org.apache.cassandra.db.ColumnFamilyStore.getTopLevelColumns(ColumnFamilyStore.java:1345)
   at 
 org.apache.cassandra.db.ColumnFamilyStore.getColumnFamily(ColumnFamilyStore.java:1207)
   at 
 org.apache.cassandra.db.ColumnFamilyStore.getColumnFamily(ColumnFamilyStore.java:1142)
   at org.apache.cassandra.db.Table.getRow(Table.java:378)
   at 
 org.apache.cassandra.db.SliceFromReadCommand.getRow(SliceFromReadCommand.java:69)
   at 
 org.apache.cassandra.service.StorageProxy$LocalReadRunnable.runMayThrow(StorageProxy.java:819)
   at 
 org.apache.cassandra.service.StorageProxy$DroppableRunnable.run(StorageProxy.java:1253)
   at 
 java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
   at 
 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
   at java.lang.Thread.run(Thread.java:662)
 {quote}



--
This message was sent by Atlassian JIRA
(v6.1.4#6159)


[jira] [Commented] (CASSANDRA-4687) Exception: DecoratedKey(xxx, yyy) != DecoratedKey(zzz, kkk)

2013-12-20 Thread Jacek Furmankiewicz (JIRA)

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

Jacek Furmankiewicz commented on CASSANDRA-4687:


BTW, is there any particular reason why you upgraded snappy? if there are no 
particularly important features, maybe it would be worth rolling it back for 
the 1.2 releases. 

The benefits of that minor change do not seem to be worth losing the ability to 
run 1.2 on a stock RHEL5, which is still very common on production systems.

 Exception: DecoratedKey(xxx, yyy) != DecoratedKey(zzz, kkk)
 ---

 Key: CASSANDRA-4687
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4687
 Project: Cassandra
  Issue Type: Bug
  Components: Core
 Environment: CentOS 6.3 64-bit, Oracle JRE 1.6.0.33 64-bit, single 
 node cluster
Reporter: Leonid Shalupov
Priority: Minor
 Attachments: 4687-debugging.txt, 
 apache-cassandra-1.2.13-SNAPSHOT.jar, guava-backed-cache.patch


 Under heavy write load sometimes cassandra fails with assertion error.
 git bisect leads to commit 295aedb278e7a495213241b66bc46d763fd4ce66.
 works fine if global key/row caches disabled in code.
 {quote}
 java.lang.AssertionError: DecoratedKey(xxx, yyy) != DecoratedKey(zzz, kkk) in 
 /var/lib/cassandra/data/...-he-1-Data.db
   at 
 org.apache.cassandra.db.columniterator.SSTableSliceIterator.init(SSTableSliceIterator.java:60)
   at 
 org.apache.cassandra.db.filter.SliceQueryFilter.getSSTableColumnIterator(SliceQueryFilter.java:67)
   at 
 org.apache.cassandra.db.filter.QueryFilter.getSSTableColumnIterator(QueryFilter.java:79)
   at 
 org.apache.cassandra.db.CollationController.collectAllData(CollationController.java:256)
   at 
 org.apache.cassandra.db.CollationController.getTopLevelColumns(CollationController.java:64)
   at 
 org.apache.cassandra.db.ColumnFamilyStore.getTopLevelColumns(ColumnFamilyStore.java:1345)
   at 
 org.apache.cassandra.db.ColumnFamilyStore.getColumnFamily(ColumnFamilyStore.java:1207)
   at 
 org.apache.cassandra.db.ColumnFamilyStore.getColumnFamily(ColumnFamilyStore.java:1142)
   at org.apache.cassandra.db.Table.getRow(Table.java:378)
   at 
 org.apache.cassandra.db.SliceFromReadCommand.getRow(SliceFromReadCommand.java:69)
   at 
 org.apache.cassandra.service.StorageProxy$LocalReadRunnable.runMayThrow(StorageProxy.java:819)
   at 
 org.apache.cassandra.service.StorageProxy$DroppableRunnable.run(StorageProxy.java:1253)
   at 
 java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
   at 
 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
   at java.lang.Thread.run(Thread.java:662)
 {quote}



--
This message was sent by Atlassian JIRA
(v6.1.4#6159)


[2/2] git commit: Add cardinality estimator for key count estimation

2013-12-20 Thread yukim
Add cardinality estimator for key count estimation

patch by yukim; reviewed by jbellis for CASSANDRA-5906


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

Branch: refs/heads/trunk
Commit: 642ce366d9cfd1b739719af4c8a4d884f3cb95cd
Parents: 4fb06b3
Author: Yuki Morishita yu...@apache.org
Authored: Fri Dec 20 13:57:28 2013 -0600
Committer: Yuki Morishita yu...@apache.org
Committed: Fri Dec 20 14:14:46 2013 -0600

--
 CHANGES.txt |   1 +
 lib/licenses/stream-2.5.1.txt   | 202 +++
 lib/stream-2.5.1.jar| Bin 0 - 152692 bytes
 .../db/compaction/CompactionManager.java|   2 +-
 .../cassandra/db/compaction/CompactionTask.java |   2 +-
 .../cassandra/db/compaction/Scrubber.java   |   2 +-
 .../cassandra/db/compaction/Upgrader.java   |   2 +-
 .../cassandra/io/sstable/SSTableReader.java |  76 +--
 .../cassandra/io/sstable/SSTableWriter.java |   1 +
 .../io/sstable/metadata/CompactionMetadata.java |  15 +-
 .../metadata/LegacyMetadataSerializer.java  |   2 +-
 .../io/sstable/metadata/MetadataCollector.java  |  18 +-
 .../cassandra/tools/SSTableMetadataViewer.java  |   5 +
 13 files changed, 307 insertions(+), 21 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/642ce366/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index c368787..ac6c53a 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -18,6 +18,7 @@
  * SSTable metadata(Stats.db) format change (CASSANDRA-6356)
  * Push composites support in the storage engine (CASSANDRA-5417)
  * Add snapshot space used to cfstats (CASSANDRA-6231)
+ * Add cardinality estimator for key count estimation (CASSANDRA-5906)
 
 
 2.0.4

http://git-wip-us.apache.org/repos/asf/cassandra/blob/642ce366/lib/licenses/stream-2.5.1.txt
--
diff --git a/lib/licenses/stream-2.5.1.txt b/lib/licenses/stream-2.5.1.txt
new file mode 100644
index 000..c8dc677
--- /dev/null
+++ b/lib/licenses/stream-2.5.1.txt
@@ -0,0 +1,202 @@
+
+ Apache License
+   Version 2.0, January 2004
+http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+  License shall mean the terms and conditions for use, reproduction,
+  and distribution as defined by Sections 1 through 9 of this document.
+
+  Licensor shall mean the copyright owner or entity authorized by
+  the copyright owner that is granting the License.
+
+  Legal Entity shall mean the union of the acting entity and all
+  other entities that control, are controlled by, or are under common
+  control with that entity. For the purposes of this definition,
+  control means (i) the power, direct or indirect, to cause the
+  direction or management of such entity, whether by contract or
+  otherwise, or (ii) ownership of fifty percent (50%) or more of the
+  outstanding shares, or (iii) beneficial ownership of such entity.
+
+  You (or Your) shall mean an individual or Legal Entity
+  exercising permissions granted by this License.
+
+  Source form shall mean the preferred form for making modifications,
+  including but not limited to software source code, documentation
+  source, and configuration files.
+
+  Object form shall mean any form resulting from mechanical
+  transformation or translation of a Source form, including but
+  not limited to compiled object code, generated documentation,
+  and conversions to other media types.
+
+  Work shall mean the work of authorship, whether in Source or
+  Object form, made available under the License, as indicated by a
+  copyright notice that is included in or attached to the work
+  (an example is provided in the Appendix below).
+
+  Derivative Works shall mean any work, whether in Source or Object
+  form, that is based on (or derived from) the Work and for which the
+  editorial revisions, annotations, elaborations, or other modifications
+  represent, as a whole, an original work of authorship. For the purposes
+  of this License, Derivative Works shall not include works that remain
+  separable from, or merely link (or bind by name) to the interfaces of,
+  the Work and Derivative Works thereof.
+
+  Contribution shall mean any work of authorship, including
+  the original version of the Work and any 

[1/2] git commit: cosmetic change

2013-12-20 Thread yukim
Updated Branches:
  refs/heads/trunk 4fb06b33d - 388cbfae0


cosmetic change


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

Branch: refs/heads/trunk
Commit: 388cbfae0c08cb1664bed52b044062ff5d6db617
Parents: 642ce36
Author: Yuki Morishita yu...@apache.org
Authored: Fri Dec 20 14:14:36 2013 -0600
Committer: Yuki Morishita yu...@apache.org
Committed: Fri Dec 20 14:14:46 2013 -0600

--
 .../cassandra/db/compaction/CompactionTask.java | 32 +++-
 1 file changed, 18 insertions(+), 14 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/388cbfae/src/java/org/apache/cassandra/db/compaction/CompactionTask.java
--
diff --git a/src/java/org/apache/cassandra/db/compaction/CompactionTask.java 
b/src/java/org/apache/cassandra/db/compaction/CompactionTask.java
index 61f98f0..cb0dcd5 100644
--- a/src/java/org/apache/cassandra/db/compaction/CompactionTask.java
+++ b/src/java/org/apache/cassandra/db/compaction/CompactionTask.java
@@ -29,9 +29,14 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 import org.apache.cassandra.config.DatabaseDescriptor;
-import org.apache.cassandra.db.*;
+import org.apache.cassandra.db.ColumnFamilyStore;
+import org.apache.cassandra.db.DecoratedKey;
+import org.apache.cassandra.db.RowIndexEntry;
+import org.apache.cassandra.db.SystemKeyspace;
 import 
org.apache.cassandra.db.compaction.CompactionManager.CompactionExecutorStatsCollector;
-import org.apache.cassandra.io.sstable.*;
+import org.apache.cassandra.io.sstable.Descriptor;
+import org.apache.cassandra.io.sstable.SSTableReader;
+import org.apache.cassandra.io.sstable.SSTableWriter;
 import org.apache.cassandra.io.sstable.metadata.MetadataCollector;
 import org.apache.cassandra.utils.CloseableIterator;
 
@@ -116,24 +121,22 @@ public class CompactionTask extends AbstractCompactionTask
 logger.info(Compacting {}, toCompact);
 
 long start = System.nanoTime();
-long totalkeysWritten = 0;
-
+long totalKeysWritten = 0;
 long estimatedTotalKeys = Math.max(cfs.metadata.getIndexInterval(), 
SSTableReader.getApproximateKeyCount(actuallyCompact));
 long estimatedSSTables = Math.max(1, 
SSTableReader.getTotalBytes(actuallyCompact) / strategy.getMaxSSTableBytes());
 long keysPerSSTable = (long) Math.ceil((double) estimatedTotalKeys / 
estimatedSSTables);
-if (logger.isDebugEnabled())
-logger.debug(Expected bloom filter size : {}, keysPerSSTable);
+logger.debug(Expected bloom filter size : {}, keysPerSSTable);
 
 AbstractCompactionIterable ci = new CompactionIterable(compactionType, 
strategy.getScanners(actuallyCompact), controller);
 CloseableIteratorAbstractCompactedRow iter = ci.iterator();
-MapDecoratedKey, RowIndexEntry cachedKeys = new 
HashMapDecoratedKey, RowIndexEntry();
+MapDecoratedKey, RowIndexEntry cachedKeys = new HashMap();
 
 // we can't preheat until the tracker has been set. This doesn't 
happen until we tell the cfs to
 // replace the old entries.  Track entries to preheat here until then.
-MapDescriptor, MapDecoratedKey, RowIndexEntry cachedKeyMap =  new 
HashMapDescriptor, MapDecoratedKey, RowIndexEntry();
+MapDescriptor, MapDecoratedKey, RowIndexEntry cachedKeyMap =  new 
HashMap();
 
-CollectionSSTableReader sstables = new ArrayListSSTableReader();
-CollectionSSTableWriter writers = new ArrayListSSTableWriter();
+CollectionSSTableReader sstables = new ArrayList();
+CollectionSSTableWriter writers = new ArrayList();
 
 if (collector != null)
 collector.beginCompaction(ci);
@@ -164,7 +167,7 @@ public class CompactionTask extends AbstractCompactionTask
 continue;
 }
 
-totalkeysWritten++;
+totalKeysWritten++;
 
 if (DatabaseDescriptor.getPreheatKeyCache())
 {
@@ -184,7 +187,7 @@ public class CompactionTask extends AbstractCompactionTask
 cachedKeyMap.put(writer.descriptor.asTemporary(false), 
cachedKeys);
 writer = createCompactionWriter(sstableDirectory, 
keysPerSSTable);
 writers.add(writer);
-cachedKeys = new HashMapDecoratedKey, RowIndexEntry();
+cachedKeys = new HashMap();
 }
 }
 
@@ -257,7 +260,7 @@ public class CompactionTask extends AbstractCompactionTask
 long totalSourceRows = 0;
 long[] counts = 

[jira] [Commented] (CASSANDRA-6477) Partitioned indexes

2013-12-20 Thread Aleksey Yeschenko (JIRA)

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

Aleksey Yeschenko commented on CASSANDRA-6477:
--

For the record, I think we should leave it to people's client code. We don't 
need more complexity on our read/write paths when this can be done client-side.

 Partitioned indexes
 ---

 Key: CASSANDRA-6477
 URL: https://issues.apache.org/jira/browse/CASSANDRA-6477
 Project: Cassandra
  Issue Type: New Feature
  Components: API, Core
Reporter: Jonathan Ellis
 Fix For: 3.0


 Local indexes are suitable for low-cardinality data, where spreading the 
 index across the cluster is a Good Thing.  However, for high-cardinality 
 data, local indexes require querying most nodes in the cluster even if only a 
 handful of rows is returned.



--
This message was sent by Atlassian JIRA
(v6.1.4#6159)


[2/3] git commit: add IRE for invalid CF supplied to get_count patch by Lyuben Todorov; reviewed by jbellis for CASSANDRA-5701

2013-12-20 Thread jbellis
add IRE for invalid CF supplied to get_count
patch by Lyuben Todorov; reviewed by jbellis for CASSANDRA-5701


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

Branch: refs/heads/trunk
Commit: 7bf14648ee6ed344acc0afe68e23d0b484826b24
Parents: 9c17189
Author: lyubent ltodo...@dundee.ac.uk
Authored: Fri Dec 20 13:11:31 2013 +0200
Committer: Jonathan Ellis jbel...@apache.org
Committed: Fri Dec 20 14:39:36 2013 -0600

--
 CHANGES.txt   | 1 +
 src/java/org/apache/cassandra/thrift/CassandraServer.java | 5 +
 2 files changed, 6 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/7bf14648/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 60f86c3..67036c5 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.0.4
+ * add IRE for invalid CF supplied to get_count (CASSANDRA-5701)
  * add client encryption support to sstableloader (CASSANDRA-6378)
  * Fix accept() loop for SSL sockets post-shutdown (CASSANDRA-6468)
  * Fix size-tiered compaction in LCS L0 (CASSANDRA-6496)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/7bf14648/src/java/org/apache/cassandra/thrift/CassandraServer.java
--
diff --git a/src/java/org/apache/cassandra/thrift/CassandraServer.java 
b/src/java/org/apache/cassandra/thrift/CassandraServer.java
index 07c271b..beaae78 100644
--- a/src/java/org/apache/cassandra/thrift/CassandraServer.java
+++ b/src/java/org/apache/cassandra/thrift/CassandraServer.java
@@ -561,6 +561,11 @@ public class CassandraServer implements Cassandra.Iface
   pageSize,
   timestamp);
 }
+catch (IllegalArgumentException e)
+{
+// CASSANDRA-5701
+throw new InvalidRequestException(e.getMessage());
+}
 catch (RequestExecutionException e)
 {
 throw ThriftConversion.rethrow(e);



[1/3] git commit: add IRE for invalid CF supplied to get_count patch by Lyuben Todorov; reviewed by jbellis for CASSANDRA-5701

2013-12-20 Thread jbellis
Updated Branches:
  refs/heads/cassandra-2.0 9c17189b7 - 7bf14648e
  refs/heads/trunk 388cbfae0 - 8614bea29


add IRE for invalid CF supplied to get_count
patch by Lyuben Todorov; reviewed by jbellis for CASSANDRA-5701


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

Branch: refs/heads/cassandra-2.0
Commit: 7bf14648ee6ed344acc0afe68e23d0b484826b24
Parents: 9c17189
Author: lyubent ltodo...@dundee.ac.uk
Authored: Fri Dec 20 13:11:31 2013 +0200
Committer: Jonathan Ellis jbel...@apache.org
Committed: Fri Dec 20 14:39:36 2013 -0600

--
 CHANGES.txt   | 1 +
 src/java/org/apache/cassandra/thrift/CassandraServer.java | 5 +
 2 files changed, 6 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/7bf14648/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 60f86c3..67036c5 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.0.4
+ * add IRE for invalid CF supplied to get_count (CASSANDRA-5701)
  * add client encryption support to sstableloader (CASSANDRA-6378)
  * Fix accept() loop for SSL sockets post-shutdown (CASSANDRA-6468)
  * Fix size-tiered compaction in LCS L0 (CASSANDRA-6496)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/7bf14648/src/java/org/apache/cassandra/thrift/CassandraServer.java
--
diff --git a/src/java/org/apache/cassandra/thrift/CassandraServer.java 
b/src/java/org/apache/cassandra/thrift/CassandraServer.java
index 07c271b..beaae78 100644
--- a/src/java/org/apache/cassandra/thrift/CassandraServer.java
+++ b/src/java/org/apache/cassandra/thrift/CassandraServer.java
@@ -561,6 +561,11 @@ public class CassandraServer implements Cassandra.Iface
   pageSize,
   timestamp);
 }
+catch (IllegalArgumentException e)
+{
+// CASSANDRA-5701
+throw new InvalidRequestException(e.getMessage());
+}
 catch (RequestExecutionException e)
 {
 throw ThriftConversion.rethrow(e);



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

2013-12-20 Thread jbellis
Merge branch 'cassandra-2.0' into trunk


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

Branch: refs/heads/trunk
Commit: 8614bea2994501d4527307072e2ff3c46aa68d97
Parents: 388cbfa 7bf1464
Author: Jonathan Ellis jbel...@apache.org
Authored: Fri Dec 20 14:39:48 2013 -0600
Committer: Jonathan Ellis jbel...@apache.org
Committed: Fri Dec 20 14:39:48 2013 -0600

--
 CHANGES.txt   | 1 +
 src/java/org/apache/cassandra/thrift/CassandraServer.java | 5 +
 2 files changed, 6 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/8614bea2/CHANGES.txt
--
diff --cc CHANGES.txt
index ac6c53a,67036c5..384e32d
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,27 -1,5 +1,28 @@@
 +2.1
 + * Multithreaded commitlog (CASSANDRA-3578)
 + * allocate fixed index summary memory pool and resample cold index summaries 
 +   to use less memory (CASSANDRA-5519)
 + * Removed multithreaded compaction (CASSANDRA-6142)
 + * Parallelize fetching rows for low-cardinality indexes (CASSANDRA-1337)
 + * change logging from log4j to logback (CASSANDRA-5883)
 + * switch to LZ4 compression for internode communication (CASSANDRA-5887)
 + * Stop using Thrift-generated Index* classes internally (CASSANDRA-5971)
 + * Remove 1.2 network compatibility code (CASSANDRA-5960)
 + * Remove leveled json manifest migration code (CASSANDRA-5996)
 + * Remove CFDefinition (CASSANDRA-6253)
 + * Use AtomicIntegerFieldUpdater in RefCountedMemory (CASSANDRA-6278)
 + * User-defined types for CQL3 (CASSANDRA-5590)
 + * Use of o.a.c.metrics in nodetool (CASSANDRA-5871, 6406)
 + * Batch read from OTC's queue and cleanup (CASSANDRA-1632)
 + * Secondary index support for collections (CASSANDRA-4511)
 + * SSTable metadata(Stats.db) format change (CASSANDRA-6356)
 + * Push composites support in the storage engine (CASSANDRA-5417)
 + * Add snapshot space used to cfstats (CASSANDRA-6231)
 + * Add cardinality estimator for key count estimation (CASSANDRA-5906)
 +
 +
  2.0.4
+  * add IRE for invalid CF supplied to get_count (CASSANDRA-5701)
   * add client encryption support to sstableloader (CASSANDRA-6378)
   * Fix accept() loop for SSL sockets post-shutdown (CASSANDRA-6468)
   * Fix size-tiered compaction in LCS L0 (CASSANDRA-6496)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/8614bea2/src/java/org/apache/cassandra/thrift/CassandraServer.java
--



[jira] [Commented] (CASSANDRA-6516) Force shutdown of all repair sessions sometimes fails

2013-12-20 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis commented on CASSANDRA-6516:
---

/cc [~yukim]

 Force shutdown of all repair sessions sometimes fails
 -

 Key: CASSANDRA-6516
 URL: https://issues.apache.org/jira/browse/CASSANDRA-6516
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Reporter: Jimmy Mårdell
Priority: Minor

 The StorageServiceMBean forceTerminateAllRepairSessions method isn't able to 
 shutdown a repair session if it's stuck waiting for snapshots from other 
 nodes.



--
This message was sent by Atlassian JIRA
(v6.1.4#6159)


[jira] [Updated] (CASSANDRA-4165) Generate Digest file for compressed SSTables

2013-12-20 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis updated CASSANDRA-4165:
--

Assignee: (was: Marcus Eriksson)

No update.  Feel free to pick it up.

 Generate Digest file for compressed SSTables
 

 Key: CASSANDRA-4165
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4165
 Project: Cassandra
  Issue Type: Improvement
  Components: Core
Reporter: Marcus Eriksson
Priority: Minor
  Labels: performance
 Fix For: 2.1

 Attachments: 0001-Generate-digest-for-compressed-files-as-well.patch, 
 4165-rebased.txt


 We use the generated *Digest.sha1-files to verify backups, would be nice if 
 they were generated for compressed sstables as well.



--
This message was sent by Atlassian JIRA
(v6.1.4#6159)


git commit: Fix AbstractCellName.makeCellName for collections

2013-12-20 Thread slebresne
Updated Branches:
  refs/heads/trunk 8614bea29 - 486f0792d


Fix AbstractCellName.makeCellName for collections


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

Branch: refs/heads/trunk
Commit: 486f0792d43f03c059f4d2dc501db8b8183c4ea2
Parents: 8614bea
Author: Sylvain Lebresne sylv...@datastax.com
Authored: Fri Dec 20 21:49:51 2013 +0100
Committer: Sylvain Lebresne sylv...@datastax.com
Committed: Fri Dec 20 21:50:19 2013 +0100

--
 .../db/composites/AbstractCellNameType.java | 16 +++-
 1 file changed, 15 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/486f0792/src/java/org/apache/cassandra/db/composites/AbstractCellNameType.java
--
diff --git 
a/src/java/org/apache/cassandra/db/composites/AbstractCellNameType.java 
b/src/java/org/apache/cassandra/db/composites/AbstractCellNameType.java
index 2ca3b33..83030a6 100644
--- a/src/java/org/apache/cassandra/db/composites/AbstractCellNameType.java
+++ b/src/java/org/apache/cassandra/db/composites/AbstractCellNameType.java
@@ -209,7 +209,21 @@ public abstract class AbstractCellNameType extends 
AbstractCType implements Cell
 for (int i = 0; i  components.length; i++)
 {
 Object c = components[i];
-rawComponents[i] = c instanceof ByteBuffer ? (ByteBuffer)c : 
((AbstractType)subtype(i)).decompose(c);
+if (c instanceof ByteBuffer)
+{
+rawComponents[i] = (ByteBuffer)c;
+}
+else
+{
+AbstractType? type = (AbstractType)subtype(i);
+// If it's a collection type, we need to find the right 
collection and use the key comparator (since we're building a cell name)
+if (type instanceof ColumnToCollectionType)
+{
+assert i  0;
+type = 
((ColumnToCollectionType)type).defined.get(rawComponents[i-1]).nameComparator();
+}
+rawComponents[i] = ((AbstractType)type).decompose(c);
+}
 }
 return makeCellName(rawComponents);
 }



[jira] [Commented] (CASSANDRA-6477) Partitioned indexes

2013-12-20 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis commented on CASSANDRA-6477:
---

The counterpoint is that we shouldn't require ~12 client codebases (if done by 
the driver) or 1000s (if done by app code) to invent this instead of the server.

 Partitioned indexes
 ---

 Key: CASSANDRA-6477
 URL: https://issues.apache.org/jira/browse/CASSANDRA-6477
 Project: Cassandra
  Issue Type: New Feature
  Components: API, Core
Reporter: Jonathan Ellis
 Fix For: 3.0


 Local indexes are suitable for low-cardinality data, where spreading the 
 index across the cluster is a Good Thing.  However, for high-cardinality 
 data, local indexes require querying most nodes in the cluster even if only a 
 handful of rows is returned.



--
This message was sent by Atlassian JIRA
(v6.1.4#6159)


git commit: add StorageService.stopDaemon patch by Lyuben Todorov; reviewed by Tyler Hobbs for CASSANDRA-4268

2013-12-20 Thread jbellis
Updated Branches:
  refs/heads/cassandra-2.0 7bf14648e - 142e13f34


add StorageService.stopDaemon
patch by Lyuben Todorov; reviewed by Tyler Hobbs for CASSANDRA-4268


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

Branch: refs/heads/cassandra-2.0
Commit: 142e13f34031167cae61991de468613d905eb76f
Parents: 7bf1464
Author: Jonathan Ellis jbel...@apache.org
Authored: Fri Dec 20 15:23:36 2013 -0600
Committer: Jonathan Ellis jbel...@apache.org
Committed: Fri Dec 20 15:23:36 2013 -0600

--
 CHANGES.txt | 1 +
 src/java/org/apache/cassandra/service/StorageService.java   | 9 +
 .../org/apache/cassandra/service/StorageServiceMBean.java   | 3 +++
 src/java/org/apache/cassandra/tools/NodeCmd.java| 7 +++
 src/java/org/apache/cassandra/tools/NodeProbe.java  | 5 +
 5 files changed, 25 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/142e13f3/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 67036c5..916ed7d 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.0.4
+ * add StorageService.stopDaemon() (CASSANDRA-4268)
  * add IRE for invalid CF supplied to get_count (CASSANDRA-5701)
  * add client encryption support to sstableloader (CASSANDRA-6378)
  * Fix accept() loop for SSL sockets post-shutdown (CASSANDRA-6468)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/142e13f3/src/java/org/apache/cassandra/service/StorageService.java
--
diff --git a/src/java/org/apache/cassandra/service/StorageService.java 
b/src/java/org/apache/cassandra/service/StorageService.java
index c341684..cca7b00 100644
--- a/src/java/org/apache/cassandra/service/StorageService.java
+++ b/src/java/org/apache/cassandra/service/StorageService.java
@@ -380,6 +380,15 @@ public class StorageService extends 
NotificationBroadcasterSupport implements IE
 return initialized;
 }
 
+public void stopDaemon()
+{
+if (daemon == null)
+throw new IllegalStateException(No configured daemon);
+daemon.deactivate();
+// completely shut down cassandra
+System.exit(0);
+}
+
 public synchronized CollectionToken prepareReplacementInfo() throws 
ConfigurationException
 {
 logger.info(Gathering node replacement information for {}, 
DatabaseDescriptor.getReplaceAddress());

http://git-wip-us.apache.org/repos/asf/cassandra/blob/142e13f3/src/java/org/apache/cassandra/service/StorageServiceMBean.java
--
diff --git a/src/java/org/apache/cassandra/service/StorageServiceMBean.java 
b/src/java/org/apache/cassandra/service/StorageServiceMBean.java
index be1b0aa..df85901 100644
--- a/src/java/org/apache/cassandra/service/StorageServiceMBean.java
+++ b/src/java/org/apache/cassandra/service/StorageServiceMBean.java
@@ -395,6 +395,9 @@ public interface StorageServiceMBean extends 
NotificationEmitter
 // allows a user to recover a forcibly 'killed' node
 public void startGossiping();
 
+// allows a user to forcibly completely stop cassandra
+public void stopDaemon();
+
 // to determine if gossip is disabled
 public boolean isInitialized();
 

http://git-wip-us.apache.org/repos/asf/cassandra/blob/142e13f3/src/java/org/apache/cassandra/tools/NodeCmd.java
--
diff --git a/src/java/org/apache/cassandra/tools/NodeCmd.java 
b/src/java/org/apache/cassandra/tools/NodeCmd.java
index 5c071b6..c32539f 100644
--- a/src/java/org/apache/cassandra/tools/NodeCmd.java
+++ b/src/java/org/apache/cassandra/tools/NodeCmd.java
@@ -162,6 +162,7 @@ public class NodeCmd
 STATUSBINARY,
 STATUSTHRIFT,
 STOP,
+STOPDAEMON,
 TPSTATS,
 UPGRADESSTABLES,
 VERSION,
@@ -1288,6 +1289,12 @@ public class NodeCmd
 probe.stop(arguments[0].toUpperCase());
 break;
 
+case STOPDAEMON:
+if (arguments.length != 0) { badUse(stopdaemon does not 
take arguments.); }
+try { probe.stopCassandraDaemon(); }
+catch (Throwable t) { System.out.println(Cassandra has 
shut down.\n); }
+break;
+
 case DESCRIBERING :
 if (arguments.length != 1) { badUse(Missing keyspace 
argument for describering.); }
 nodeCmd.printDescribeRing(arguments[0], 

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

2013-12-20 Thread jbellis
Merge branch 'cassandra-2.0' into trunk


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

Branch: refs/heads/trunk
Commit: 49c5ed271b1c2f4924a31306af49c30876698f4c
Parents: 486f079 142e13f
Author: Jonathan Ellis jbel...@apache.org
Authored: Fri Dec 20 15:24:24 2013 -0600
Committer: Jonathan Ellis jbel...@apache.org
Committed: Fri Dec 20 15:24:24 2013 -0600

--
 CHANGES.txt | 1 +
 src/java/org/apache/cassandra/service/StorageService.java   | 9 +
 .../org/apache/cassandra/service/StorageServiceMBean.java   | 3 +++
 src/java/org/apache/cassandra/tools/NodeCmd.java| 7 +++
 src/java/org/apache/cassandra/tools/NodeProbe.java  | 5 +
 5 files changed, 25 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/49c5ed27/CHANGES.txt
--
diff --cc CHANGES.txt
index 384e32d,916ed7d..c9dcc18
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,27 -1,5 +1,28 @@@
 +2.1
 + * Multithreaded commitlog (CASSANDRA-3578)
 + * allocate fixed index summary memory pool and resample cold index summaries 
 +   to use less memory (CASSANDRA-5519)
 + * Removed multithreaded compaction (CASSANDRA-6142)
 + * Parallelize fetching rows for low-cardinality indexes (CASSANDRA-1337)
 + * change logging from log4j to logback (CASSANDRA-5883)
 + * switch to LZ4 compression for internode communication (CASSANDRA-5887)
 + * Stop using Thrift-generated Index* classes internally (CASSANDRA-5971)
 + * Remove 1.2 network compatibility code (CASSANDRA-5960)
 + * Remove leveled json manifest migration code (CASSANDRA-5996)
 + * Remove CFDefinition (CASSANDRA-6253)
 + * Use AtomicIntegerFieldUpdater in RefCountedMemory (CASSANDRA-6278)
 + * User-defined types for CQL3 (CASSANDRA-5590)
 + * Use of o.a.c.metrics in nodetool (CASSANDRA-5871, 6406)
 + * Batch read from OTC's queue and cleanup (CASSANDRA-1632)
 + * Secondary index support for collections (CASSANDRA-4511)
 + * SSTable metadata(Stats.db) format change (CASSANDRA-6356)
 + * Push composites support in the storage engine (CASSANDRA-5417)
 + * Add snapshot space used to cfstats (CASSANDRA-6231)
 + * Add cardinality estimator for key count estimation (CASSANDRA-5906)
 +
 +
  2.0.4
+  * add StorageService.stopDaemon() (CASSANDRA-4268)
   * add IRE for invalid CF supplied to get_count (CASSANDRA-5701)
   * add client encryption support to sstableloader (CASSANDRA-6378)
   * Fix accept() loop for SSL sockets post-shutdown (CASSANDRA-6468)

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

http://git-wip-us.apache.org/repos/asf/cassandra/blob/49c5ed27/src/java/org/apache/cassandra/service/StorageServiceMBean.java
--

http://git-wip-us.apache.org/repos/asf/cassandra/blob/49c5ed27/src/java/org/apache/cassandra/tools/NodeCmd.java
--

http://git-wip-us.apache.org/repos/asf/cassandra/blob/49c5ed27/src/java/org/apache/cassandra/tools/NodeProbe.java
--



[1/2] git commit: add StorageService.stopDaemon patch by Lyuben Todorov; reviewed by Tyler Hobbs for CASSANDRA-4268

2013-12-20 Thread jbellis
Updated Branches:
  refs/heads/trunk 486f0792d - 49c5ed271


add StorageService.stopDaemon
patch by Lyuben Todorov; reviewed by Tyler Hobbs for CASSANDRA-4268


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

Branch: refs/heads/trunk
Commit: 142e13f34031167cae61991de468613d905eb76f
Parents: 7bf1464
Author: Jonathan Ellis jbel...@apache.org
Authored: Fri Dec 20 15:23:36 2013 -0600
Committer: Jonathan Ellis jbel...@apache.org
Committed: Fri Dec 20 15:23:36 2013 -0600

--
 CHANGES.txt | 1 +
 src/java/org/apache/cassandra/service/StorageService.java   | 9 +
 .../org/apache/cassandra/service/StorageServiceMBean.java   | 3 +++
 src/java/org/apache/cassandra/tools/NodeCmd.java| 7 +++
 src/java/org/apache/cassandra/tools/NodeProbe.java  | 5 +
 5 files changed, 25 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/142e13f3/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 67036c5..916ed7d 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.0.4
+ * add StorageService.stopDaemon() (CASSANDRA-4268)
  * add IRE for invalid CF supplied to get_count (CASSANDRA-5701)
  * add client encryption support to sstableloader (CASSANDRA-6378)
  * Fix accept() loop for SSL sockets post-shutdown (CASSANDRA-6468)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/142e13f3/src/java/org/apache/cassandra/service/StorageService.java
--
diff --git a/src/java/org/apache/cassandra/service/StorageService.java 
b/src/java/org/apache/cassandra/service/StorageService.java
index c341684..cca7b00 100644
--- a/src/java/org/apache/cassandra/service/StorageService.java
+++ b/src/java/org/apache/cassandra/service/StorageService.java
@@ -380,6 +380,15 @@ public class StorageService extends 
NotificationBroadcasterSupport implements IE
 return initialized;
 }
 
+public void stopDaemon()
+{
+if (daemon == null)
+throw new IllegalStateException(No configured daemon);
+daemon.deactivate();
+// completely shut down cassandra
+System.exit(0);
+}
+
 public synchronized CollectionToken prepareReplacementInfo() throws 
ConfigurationException
 {
 logger.info(Gathering node replacement information for {}, 
DatabaseDescriptor.getReplaceAddress());

http://git-wip-us.apache.org/repos/asf/cassandra/blob/142e13f3/src/java/org/apache/cassandra/service/StorageServiceMBean.java
--
diff --git a/src/java/org/apache/cassandra/service/StorageServiceMBean.java 
b/src/java/org/apache/cassandra/service/StorageServiceMBean.java
index be1b0aa..df85901 100644
--- a/src/java/org/apache/cassandra/service/StorageServiceMBean.java
+++ b/src/java/org/apache/cassandra/service/StorageServiceMBean.java
@@ -395,6 +395,9 @@ public interface StorageServiceMBean extends 
NotificationEmitter
 // allows a user to recover a forcibly 'killed' node
 public void startGossiping();
 
+// allows a user to forcibly completely stop cassandra
+public void stopDaemon();
+
 // to determine if gossip is disabled
 public boolean isInitialized();
 

http://git-wip-us.apache.org/repos/asf/cassandra/blob/142e13f3/src/java/org/apache/cassandra/tools/NodeCmd.java
--
diff --git a/src/java/org/apache/cassandra/tools/NodeCmd.java 
b/src/java/org/apache/cassandra/tools/NodeCmd.java
index 5c071b6..c32539f 100644
--- a/src/java/org/apache/cassandra/tools/NodeCmd.java
+++ b/src/java/org/apache/cassandra/tools/NodeCmd.java
@@ -162,6 +162,7 @@ public class NodeCmd
 STATUSBINARY,
 STATUSTHRIFT,
 STOP,
+STOPDAEMON,
 TPSTATS,
 UPGRADESSTABLES,
 VERSION,
@@ -1288,6 +1289,12 @@ public class NodeCmd
 probe.stop(arguments[0].toUpperCase());
 break;
 
+case STOPDAEMON:
+if (arguments.length != 0) { badUse(stopdaemon does not 
take arguments.); }
+try { probe.stopCassandraDaemon(); }
+catch (Throwable t) { System.out.println(Cassandra has 
shut down.\n); }
+break;
+
 case DESCRIBERING :
 if (arguments.length != 1) { badUse(Missing keyspace 
argument for describering.); }
 nodeCmd.printDescribeRing(arguments[0], System.out);


[jira] [Resolved] (CASSANDRA-4268) Expose full stop() operation through JMX

2013-12-20 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis resolved CASSANDRA-4268.
---

Resolution: Fixed

committed

 Expose full stop() operation through JMX
 

 Key: CASSANDRA-4268
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4268
 Project: Cassandra
  Issue Type: Improvement
  Components: Core
Reporter: Tyler Hobbs
Assignee: Lyuben Todorov
Priority: Minor
  Labels: jmx
 Fix For: 2.0.5

 Attachments: 4268-cassandra-2.0_v2.patch, 4268_cassandra-2.0.patch


 We already expose ways to stop just the RPC server or gossip.  This would 
 fully shutdown the process.



--
This message was sent by Atlassian JIRA
(v6.1.4#6159)


[jira] [Commented] (CASSANDRA-6504) counters++

2013-12-20 Thread Aleksey Yeschenko (JIRA)

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

Aleksey Yeschenko commented on CASSANDRA-6504:
--

The work-in-progress branch, without CASSANDRA-6506 and CASSANDRA-6508 in it: 
https://github.com/iamaleksey/cassandra/commits/6504

 counters++
 --

 Key: CASSANDRA-6504
 URL: https://issues.apache.org/jira/browse/CASSANDRA-6504
 Project: Cassandra
  Issue Type: Improvement
Reporter: Aleksey Yeschenko
Assignee: Aleksey Yeschenko
 Fix For: 2.1


 Continuing CASSANDRA-4775 here.
 We are changing counter write path to explicitly 
 lock-read-modify-unlock-replicate, thus getting rid of the previously used 
 'local' (deltas) and 'remote' shards distinction. Unfortunately, we can't 
 simply start using 'remote' shards exclusively, since shard merge rules 
 prioritize the 'local' shards. Which is why we are introducing the third 
 shard type - 'global', the only shard type to be used in 2.1+.
 The updated merge rules are going to look like this:
 global + global = keep the shard with the highest logical clock
 global + local or remote = keep the global one
 local + local = sum counts (and logical clock)
 local + remote = keep the local one
 remote + remote = keep the shard with highest logical clock
 This is required for backward compatibility with pre-2.1 counters. To make 
 2.0-2.1 live upgrade possible, 'global' shard merge logic will have to be 
 back ported to 2.0. 2.0 will not produce them, but will be able to understand 
 the global shards coming from the 2.1 nodes during the live upgrade. See 
 CASSANDRA-6505.
 Other changes introduced in this issue:
 1. replicate_on_write is gone. From now on we only avoid replication at RF 1.
 2. REPLICATE_ON_WRITE stage is gone
 3. counter mutations are running in their own COUNTER_MUTATION stage now
 4. counter mutations have a separate counter_write_request_timeout setting
 5. mergeAndRemoveOldShards() code is gone, for now, until/unless a better 
 solution is found
 6. we only replicate the fresh global shard now, not the complete 
 (potentially quite large) counter context
 7. to help with concurrency and reduce lock contention, we cache node's 
 global shards in a new counter cache ({cf id, partition key, cell name} - 
 {count, clock}). The cache is only used by counter writes, to help with 'hot' 
 counters being simultaneously updated.
 Improvements to be handled by separate JIRA issues:
 1. Split counter context into separate cells - one shard per cell. See 
 CASSANDRA-6506. This goes into either 2.1 or 3.0.
 Potential improvements still being debated:
 1. Coalesce the mutations in COUNTER_MUTATION stage if they share the same 
 partition key, and apply them together, to improve the locking situation when 
 updating different counter cells in one partition. See CASSANDRA-6508. Will 
 to into 2.1 or 3.0, if deemed beneficial.



--
This message was sent by Atlassian JIRA
(v6.1.4#6159)


[Cassandra Wiki] Update of Operations by mkjellman

2013-12-20 Thread Apache Wiki
Dear Wiki user,

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

The Operations page has been changed by mkjellman:
https://wiki.apache.org/cassandra/Operations?action=diffrev1=110rev2=111

  
  === Replacing a Dead Node ===
   For versions 1.2.0 and above 
- Token replace (introduced in CASSANDRA-957) does not work in 1.2.0 and above 
and should not be used while replacing a dead node. When dealing with node 
failure, use `nodetool` with the `removetoken` argument to remove the dead node 
from the ring. Once that process is complete, then bootstrap the new node back 
into the cluster.
+ Token replace (introduced in CASSANDRA-957) does not work in 1.2.0 and above 
and should not be used while replacing a dead node. When dealing with node 
failure, use `nodetool` with the `removenode` argument to remove the dead node 
from the ring. Once that process is complete (it involves streaming data that 
node contained from other nodes so this process can take a while, use nodetool 
netstats to monitor the progress of the streaming operation on other nodes), 
then bootstrap the new rebuilt node back into the cluster.
  
   For versions 1.1.11 and older 
  Since Cassandra 1.0 we can replace a dead node with a new one using the 
property cassandra.replace_token=Token, This property can be set using -D 
option while starting cassandra demon process.


[jira] [Commented] (CASSANDRA-6516) Force shutdown of all repair sessions sometimes fails

2013-12-20 Thread Yuki Morishita (JIRA)

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

Yuki Morishita commented on CASSANDRA-6516:
---

[~yarin] yeah, calling terminate() from forceShutdown() is needed.

We can set timeout on latch, though that does not solve the problem completely. 
Repair session still hang until you force shutdown.

Snapshot hang is caused by CASSANDRA-6415, and I'm thinking of removing 
(almost) all locks and latches in CASSANDRA-6455.

 Force shutdown of all repair sessions sometimes fails
 -

 Key: CASSANDRA-6516
 URL: https://issues.apache.org/jira/browse/CASSANDRA-6516
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Reporter: Jimmy Mårdell
Priority: Minor

 The StorageServiceMBean forceTerminateAllRepairSessions method isn't able to 
 shutdown a repair session if it's stuck waiting for snapshots from other 
 nodes.



--
This message was sent by Atlassian JIRA
(v6.1.4#6159)


[jira] [Created] (CASSANDRA-6519) cqlsh hangs indefinitely when dropping table

2013-12-20 Thread Russ Hatch (JIRA)
Russ Hatch created CASSANDRA-6519:
-

 Summary: cqlsh hangs indefinitely when dropping table
 Key: CASSANDRA-6519
 URL: https://issues.apache.org/jira/browse/CASSANDRA-6519
 Project: Cassandra
  Issue Type: Bug
  Components: API
 Environment: C* from trunk -- cassandra-2.0.3-709-g486f079
java 1.7.0_45 (on linux 64 bit)
[cqlsh 4.1.0 | Cassandra 2.1-SNAPSHOT | CQL spec 3.1.1 | Thrift protocol 
19.39.0]

3 node cluster built on my machine using ccm
Reporter: Russ Hatch
Assignee: Russ Hatch


Using ccqlsh, I issue a drop statement for a table and it hangs indefinitely 
(running cassandra-2.0.3-709-g486f079 from trunk).

Here's the statement:
cqlsh:taskapp drop table user_task;

Here's the full setup I used:
{noformat}
ccm create test_cluster
ccm populate -n 3
ccm start
ccm node1 cqlsh

CREATE KEYSPACE taskapp WITH replication = {
  'class': 'SimpleStrategy',
  'replication_factor': '3'
};

use taskapp;

create table user (
user_id timeuuid PRIMARY KEY,
first_name text,
last_name text,
email text
);

create table user_task (
task_id timeuuid PRIMARY KEY,
user_id timeuuid,
task_order int,
task_description text,
is_complete boolean,
is_top_level boolean,
subtask_ids listtimeuuid
);
{noformat}
and then the statement which hangs:
drop table user_task;

I also checked that all 3 nodes have the same schema version uuid, using these 
queries someone shared with me:
{noformat}
cqlsh:taskapp SELECT rpc_address, schema_version FROM system.peers
   ... ;

 rpc_address | schema_version
-+--
   127.0.0.3 | 6e782241-91e9-3cfa-88c0-88f445a573c1
   127.0.0.2 | 6e782241-91e9-3cfa-88c0-88f445a573c1

(2 rows)

cqlsh:taskapp SELECT schema_version FROM system.local WHERE key='local';

 schema_version
--
 6e782241-91e9-3cfa-88c0-88f445a573c1

(1 rows)
{noformat}

I checked the logs for all 3 nodes, which I think were normal. Node1 (used in 
the cqlsh session) showed this message:
{noformat}
INFO  [Thrift:3] 2013-12-20 14:29:23,200 MigrationManager.java:289 - Drop 
ColumnFamily 'taskapp/user_task'
{noformat}
The other node logs showed no activity that looked related to the attempted 
drop statement.



--
This message was sent by Atlassian JIRA
(v6.1.4#6159)


[jira] [Created] (CASSANDRA-6520) cqlsh disconnects active node when dropping column

2013-12-20 Thread Russ Hatch (JIRA)
Russ Hatch created CASSANDRA-6520:
-

 Summary: cqlsh disconnects active node when dropping column
 Key: CASSANDRA-6520
 URL: https://issues.apache.org/jira/browse/CASSANDRA-6520
 Project: Cassandra
  Issue Type: Bug
  Components: API
 Environment: C* from trunk -- cassandra-2.0.3-709-g486f079
java 1.7.0_45 (on linux 64 bit)
[cqlsh 4.1.0 | Cassandra 2.1-SNAPSHOT | CQL spec 3.1.1 | Thrift protocol 
19.39.0]

3 node cluster built on my machine using ccm
Reporter: Russ Hatch
Assignee: Russ Hatch


Using ccqlsh, I issue a drop statement for a table and it hangs indefinitely 
(running cassandra-2.0.3-709-g486f079 from trunk).

Here's the statement:
cqlsh:taskapp drop table user_task;

Here's the full setup I used:
{noformat}
ccm create test_cluster
ccm populate -n 3
ccm start
ccm node1 cqlsh

CREATE KEYSPACE taskapp WITH replication = {
  'class': 'SimpleStrategy',
  'replication_factor': '3'
};

use taskapp;

create table user (
user_id timeuuid PRIMARY KEY,
first_name text,
last_name text,
email text
);

create table user_task (
task_id timeuuid PRIMARY KEY,
user_id timeuuid,
task_order int,
task_description text,
is_complete boolean,
is_top_level boolean,
subtask_ids listtimeuuid
);
{noformat}
and then the statement which hangs:
drop table user_task;

I also checked that all 3 nodes have the same schema version uuid, using these 
queries someone shared with me:
{noformat}
cqlsh:taskapp SELECT rpc_address, schema_version FROM system.peers
   ... ;

 rpc_address | schema_version
-+--
   127.0.0.3 | 6e782241-91e9-3cfa-88c0-88f445a573c1
   127.0.0.2 | 6e782241-91e9-3cfa-88c0-88f445a573c1

(2 rows)

cqlsh:taskapp SELECT schema_version FROM system.local WHERE key='local';

 schema_version
--
 6e782241-91e9-3cfa-88c0-88f445a573c1

(1 rows)
{noformat}

I checked the logs for all 3 nodes, which I think were normal. Node1 (used in 
the cqlsh session) showed this message:
{noformat}
INFO  [Thrift:3] 2013-12-20 14:29:23,200 MigrationManager.java:289 - Drop 
ColumnFamily 'taskapp/user_task'
{noformat}
The other node logs showed no activity that looked related to the attempted 
drop statement.



--
This message was sent by Atlassian JIRA
(v6.1.4#6159)


[jira] [Updated] (CASSANDRA-6520) cqlsh disconnects active node when dropping column

2013-12-20 Thread Russ Hatch (JIRA)

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

Russ Hatch updated CASSANDRA-6520:
--

Description: 
Using ccqlsh, I issue a statement to drop a column from a table, and the 
session appears to disconnect.

The statement was:
{noformat}
cqlsh:taskapp alter table user_task drop task_order;
{noformat}
Here's the full setup I used:
{noformat}
ccm create test_cluster
ccm populate -n 3
ccm start
ccm node1 cqlsh

CREATE KEYSPACE taskapp WITH replication = {
  'class': 'SimpleStrategy',
  'replication_factor': '3'
};

use taskapp;

create table user (
user_id timeuuid PRIMARY KEY,
first_name text,
last_name text,
email text
);

create table user_task (
task_id timeuuid PRIMARY KEY,
user_id timeuuid,
task_order int,
task_description text,
is_complete boolean,
is_top_level boolean,
subtask_ids listtimeuuid
);
{noformat}
and then the statement which triggers the disconnect:
{noformat}
cqlsh:taskapp alter table user_task drop task_order;
TSocket read 0 bytes
TSocket read 0 bytes
cqlsh:taskapp describe table user_task;

[Errno 32] Broken pipe
{noformat}

The log for the active node shows this INFO, followed immediately by an 
exception (included below). The other nodes show no relevant messages:
{noformat}
INFO  [Thrift:4] 2013-12-20 16:04:58,668 MigrationManager.java:263 - Update 
ColumnFamily 'taskapp/user_task' From 
org.apache.cassandra.config.CFMetaData@15e4ed88[cfId=df7153ac-c309-3bd2-92c2-e05bb53153fb,ksName=taskapp,cfName=user_task,cfType=Standard,comparator=org.apache.cassandra.db.marshal.CompositeType(org.apache.cassandra.db.marshal.UTF8Type,org.apache.cassandra.db.marshal.ColumnToCollectionType(7375627461736b5f696473:org.apache.cassandra.db.marshal.ListType(org.apache.cassandra.db.marshal.TimeUUIDType))),comment=,readRepairChance=0.1,dclocalReadRepairChance=0.0,replicateOnWrite=true,gcGraceSeconds=864000,defaultValidator=org.apache.cassandra.db.marshal.BytesType,keyValidator=org.apache.cassandra.db.marshal.TimeUUIDType,minCompactionThreshold=4,maxCompactionThreshold=32,columnMetadata={java.nio.HeapByteBuffer[pos=0
 lim=11 cap=11]=ColumnDefinition{name=subtask_ids, 
type=org.apache.cassandra.db.marshal.ListType(org.apache.cassandra.db.marshal.TimeUUIDType),
 kind=REGULAR, componentIndex=0, indexName=null, indexType=null}, 
java.nio.HeapByteBuffer[pos=0 lim=11 cap=11]=ColumnDefinition{name=is_complete, 
type=org.apache.cassandra.db.marshal.BooleanType, kind=REGULAR, 
componentIndex=0, indexName=null, indexType=null}, 
java.nio.HeapByteBuffer[pos=0 lim=12 
cap=12]=ColumnDefinition{name=is_top_level, 
type=org.apache.cassandra.db.marshal.BooleanType, kind=REGULAR, 
componentIndex=0, indexName=null, indexType=null}, 
java.nio.HeapByteBuffer[pos=0 lim=7 cap=7]=ColumnDefinition{name=task_id, 
type=org.apache.cassandra.db.marshal.TimeUUIDType, kind=PARTITION_KEY, 
componentIndex=null, indexName=null, indexType=null}, 
java.nio.HeapByteBuffer[pos=0 lim=10 cap=10]=ColumnDefinition{name=task_order, 
type=org.apache.cassandra.db.marshal.Int32Type, kind=REGULAR, componentIndex=0, 
indexName=null, indexType=null}, java.nio.HeapByteBuffer[pos=0 lim=7 
cap=7]=ColumnDefinition{name=user_id, 
type=org.apache.cassandra.db.marshal.TimeUUIDType, kind=REGULAR, 
componentIndex=0, indexName=null, indexType=null}, 
java.nio.HeapByteBuffer[pos=0 lim=16 
cap=16]=ColumnDefinition{name=task_description, 
type=org.apache.cassandra.db.marshal.UTF8Type, kind=REGULAR, componentIndex=0, 
indexName=null, indexType=null}},compactionStrategyClass=class 
org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy,compactionStrategyOptions={},compressionOptions={sstable_compression=org.apache.cassandra.io.compress.LZ4Compressor},bloomFilterFpChance=0.01,memtable_flush_period_in_ms=0,caching=KEYS_ONLY,defaultTimeToLive=0,speculative_retry=99.0PERCENTILE,indexInterval=128,populateIoCacheOnFlush=false,droppedColumns={},triggers={}]
 To 
org.apache.cassandra.config.CFMetaData@3568f812[cfId=df7153ac-c309-3bd2-92c2-e05bb53153fb,ksName=taskapp,cfName=user_task,cfType=Standard,comparator=org.apache.cassandra.db.marshal.CompositeType(org.apache.cassandra.db.marshal.UTF8Type,org.apache.cassandra.db.marshal.ColumnToCollectionType(7375627461736b5f696473:org.apache.cassandra.db.marshal.ListType(org.apache.cassandra.db.marshal.TimeUUIDType))),comment=,readRepairChance=0.1,dclocalReadRepairChance=0.0,replicateOnWrite=true,gcGraceSeconds=864000,defaultValidator=org.apache.cassandra.db.marshal.BytesType,keyValidator=org.apache.cassandra.db.marshal.TimeUUIDType,minCompactionThreshold=4,maxCompactionThreshold=32,columnMetadata={java.nio.HeapByteBuffer[pos=0
 lim=11 cap=11]=ColumnDefinition{name=subtask_ids, 
type=org.apache.cassandra.db.marshal.ListType(org.apache.cassandra.db.marshal.TimeUUIDType),
 kind=REGULAR, componentIndex=0, indexName=null, indexType=null}, 
java.nio.HeapByteBuffer[pos=0 

[jira] [Assigned] (CASSANDRA-6520) cqlsh disconnects active node when dropping column

2013-12-20 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis reassigned CASSANDRA-6520:
-

Assignee: Sylvain Lebresne  (was: Russ Hatch)

 cqlsh disconnects active node when dropping column
 --

 Key: CASSANDRA-6520
 URL: https://issues.apache.org/jira/browse/CASSANDRA-6520
 Project: Cassandra
  Issue Type: Bug
  Components: API
 Environment: C* from trunk -- cassandra-2.0.3-709-g486f079
 java 1.7.0_45 (on linux 64 bit)
 [cqlsh 4.1.0 | Cassandra 2.1-SNAPSHOT | CQL spec 3.1.1 | Thrift protocol 
 19.39.0]
 3 node cluster built on my machine using ccm
Reporter: Russ Hatch
Assignee: Sylvain Lebresne

 Using ccqlsh, I issue a statement to drop a column from a table, and the 
 session appears to disconnect.
 The statement was:
 {noformat}
 cqlsh:taskapp alter table user_task drop task_order;
 {noformat}
 Here's the full setup I used:
 {noformat}
 ccm create test_cluster
 ccm populate -n 3
 ccm start
 ccm node1 cqlsh
 CREATE KEYSPACE taskapp WITH replication = {
   'class': 'SimpleStrategy',
   'replication_factor': '3'
 };
 use taskapp;
 create table user (
 user_id timeuuid PRIMARY KEY,
 first_name text,
 last_name text,
 email text
 );
 create table user_task (
 task_id timeuuid PRIMARY KEY,
 user_id timeuuid,
 task_order int,
 task_description text,
 is_complete boolean,
 is_top_level boolean,
 subtask_ids listtimeuuid
 );
 {noformat}
 and then the statement which triggers the disconnect:
 {noformat}
 cqlsh:taskapp alter table user_task drop task_order;
 TSocket read 0 bytes
 TSocket read 0 bytes
 cqlsh:taskapp describe table user_task;
 [Errno 32] Broken pipe
 {noformat}
 The log for the active node shows this INFO, followed immediately by an 
 exception (included below). The other nodes show no relevant messages:
 {noformat}
 INFO  [Thrift:4] 2013-12-20 16:04:58,668 MigrationManager.java:263 - Update 
 ColumnFamily 'taskapp/user_task' From 
 org.apache.cassandra.config.CFMetaData@15e4ed88[cfId=df7153ac-c309-3bd2-92c2-e05bb53153fb,ksName=taskapp,cfName=user_task,cfType=Standard,comparator=org.apache.cassandra.db.marshal.CompositeType(org.apache.cassandra.db.marshal.UTF8Type,org.apache.cassandra.db.marshal.ColumnToCollectionType(7375627461736b5f696473:org.apache.cassandra.db.marshal.ListType(org.apache.cassandra.db.marshal.TimeUUIDType))),comment=,readRepairChance=0.1,dclocalReadRepairChance=0.0,replicateOnWrite=true,gcGraceSeconds=864000,defaultValidator=org.apache.cassandra.db.marshal.BytesType,keyValidator=org.apache.cassandra.db.marshal.TimeUUIDType,minCompactionThreshold=4,maxCompactionThreshold=32,columnMetadata={java.nio.HeapByteBuffer[pos=0
  lim=11 cap=11]=ColumnDefinition{name=subtask_ids, 
 type=org.apache.cassandra.db.marshal.ListType(org.apache.cassandra.db.marshal.TimeUUIDType),
  kind=REGULAR, componentIndex=0, indexName=null, indexType=null}, 
 java.nio.HeapByteBuffer[pos=0 lim=11 
 cap=11]=ColumnDefinition{name=is_complete, 
 type=org.apache.cassandra.db.marshal.BooleanType, kind=REGULAR, 
 componentIndex=0, indexName=null, indexType=null}, 
 java.nio.HeapByteBuffer[pos=0 lim=12 
 cap=12]=ColumnDefinition{name=is_top_level, 
 type=org.apache.cassandra.db.marshal.BooleanType, kind=REGULAR, 
 componentIndex=0, indexName=null, indexType=null}, 
 java.nio.HeapByteBuffer[pos=0 lim=7 cap=7]=ColumnDefinition{name=task_id, 
 type=org.apache.cassandra.db.marshal.TimeUUIDType, kind=PARTITION_KEY, 
 componentIndex=null, indexName=null, indexType=null}, 
 java.nio.HeapByteBuffer[pos=0 lim=10 
 cap=10]=ColumnDefinition{name=task_order, 
 type=org.apache.cassandra.db.marshal.Int32Type, kind=REGULAR, 
 componentIndex=0, indexName=null, indexType=null}, 
 java.nio.HeapByteBuffer[pos=0 lim=7 cap=7]=ColumnDefinition{name=user_id, 
 type=org.apache.cassandra.db.marshal.TimeUUIDType, kind=REGULAR, 
 componentIndex=0, indexName=null, indexType=null}, 
 java.nio.HeapByteBuffer[pos=0 lim=16 
 cap=16]=ColumnDefinition{name=task_description, 
 type=org.apache.cassandra.db.marshal.UTF8Type, kind=REGULAR, 
 componentIndex=0, indexName=null, 
 indexType=null}},compactionStrategyClass=class 
 org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy,compactionStrategyOptions={},compressionOptions={sstable_compression=org.apache.cassandra.io.compress.LZ4Compressor},bloomFilterFpChance=0.01,memtable_flush_period_in_ms=0,caching=KEYS_ONLY,defaultTimeToLive=0,speculative_retry=99.0PERCENTILE,indexInterval=128,populateIoCacheOnFlush=false,droppedColumns={},triggers={}]
  To 
 

[jira] [Resolved] (CASSANDRA-6519) cqlsh hangs indefinitely when dropping table

2013-12-20 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis resolved CASSANDRA-6519.
---

Resolution: Duplicate

 cqlsh hangs indefinitely when dropping table
 

 Key: CASSANDRA-6519
 URL: https://issues.apache.org/jira/browse/CASSANDRA-6519
 Project: Cassandra
  Issue Type: Bug
  Components: API
 Environment: C* from trunk -- cassandra-2.0.3-709-g486f079
 java 1.7.0_45 (on linux 64 bit)
 [cqlsh 4.1.0 | Cassandra 2.1-SNAPSHOT | CQL spec 3.1.1 | Thrift protocol 
 19.39.0]
 3 node cluster built on my machine using ccm
Reporter: Russ Hatch
Assignee: Russ Hatch

 Using ccqlsh, I issue a drop statement for a table and it hangs indefinitely 
 (running cassandra-2.0.3-709-g486f079 from trunk).
 Here's the statement:
 cqlsh:taskapp drop table user_task;
 Here's the full setup I used:
 {noformat}
 ccm create test_cluster
 ccm populate -n 3
 ccm start
 ccm node1 cqlsh
 CREATE KEYSPACE taskapp WITH replication = {
   'class': 'SimpleStrategy',
   'replication_factor': '3'
 };
 use taskapp;
 create table user (
 user_id timeuuid PRIMARY KEY,
 first_name text,
 last_name text,
 email text
 );
 create table user_task (
 task_id timeuuid PRIMARY KEY,
 user_id timeuuid,
 task_order int,
 task_description text,
 is_complete boolean,
 is_top_level boolean,
 subtask_ids listtimeuuid
 );
 {noformat}
 and then the statement which hangs:
 drop table user_task;
 I also checked that all 3 nodes have the same schema version uuid, using 
 these queries someone shared with me:
 {noformat}
 cqlsh:taskapp SELECT rpc_address, schema_version FROM system.peers
... ;
  rpc_address | schema_version
 -+--
127.0.0.3 | 6e782241-91e9-3cfa-88c0-88f445a573c1
127.0.0.2 | 6e782241-91e9-3cfa-88c0-88f445a573c1
 (2 rows)
 cqlsh:taskapp SELECT schema_version FROM system.local WHERE key='local';
  schema_version
 --
  6e782241-91e9-3cfa-88c0-88f445a573c1
 (1 rows)
 {noformat}
 I checked the logs for all 3 nodes, which I think were normal. Node1 (used in 
 the cqlsh session) showed this message:
 {noformat}
 INFO  [Thrift:3] 2013-12-20 14:29:23,200 MigrationManager.java:289 - Drop 
 ColumnFamily 'taskapp/user_task'
 {noformat}
 The other node logs showed no activity that looked related to the attempted 
 drop statement.



--
This message was sent by Atlassian JIRA
(v6.1.4#6159)


[jira] [Updated] (CASSANDRA-6418) auto_snapshots are not removable via 'nodetool clearsnapshot'

2013-12-20 Thread Mikhail Stepura (JIRA)

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

Mikhail Stepura updated CASSANDRA-6418:
---

Attachment: CASSANDRA-2.0-6418_v4.patch

Looking at that duplicated code in {{getKSDirectories}} and {{getCFDirectory}}, 
and in {{getCFDirectory}} and {{Directories}}'s constructor, it occured to me 
that we don't need to call {{getCFDirectory}} in a static context. The only 
place it's used is {{doValidationCompaction}} where we always have a reference 
to CFS.

I'm attaching V4 of the patch. [~lyubent] what do you think?

 auto_snapshots are not removable via 'nodetool clearsnapshot'
 -

 Key: CASSANDRA-6418
 URL: https://issues.apache.org/jira/browse/CASSANDRA-6418
 Project: Cassandra
  Issue Type: Bug
  Components: Tools
 Environment: auto_snapshot: true
Reporter: J. Ryan Earl
Assignee: Lyuben Todorov
Priority: Minor
 Fix For: 2.0.5

 Attachments: 6418_cassandra-2.0.patch, 6418_v2.patch, 
 6418_v3_cassandra-2.0.patch, CASSANDRA-2.0-6418_v4.patch


 Snapshots of deleted CFs created via the auto_snapshot configuration 
 parameter appear to not be tracked.  The result is that 'nodetool 
 clearsnapshot keyspace with deleted CFs' does nothing, and short of 
 manually removing the files from the filesystem, deleted CFs remain 
 indefinitely taking up space.
 I'm not sure if this is intended, but it seems pretty counter-intuitive.  I 
 haven't found any documentation that indicates auto_snapshots would be 
 ignored by 'nodetool clearsnapshot'.



--
This message was sent by Atlassian JIRA
(v6.1.4#6159)


[jira] [Commented] (CASSANDRA-5633) CQL support for updating multiple rows in a partition using CAS

2013-12-20 Thread Alex P (JIRA)

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

Alex P commented on CASSANDRA-5633:
---

Some extensions of SQL (T-SQL, PLSQL) support {{IF ELSE}} statements. So 
another way to do this could be:

{code}
IF (condition) THEN
BEGIN BATCH
APPLY BATCH
{code}

The only advantages of this approach would be:

1. a structure that is familiar
2. is just an extension of the current {{BATCH}} 

 CQL support for updating multiple rows in a partition using CAS
 ---

 Key: CASSANDRA-5633
 URL: https://issues.apache.org/jira/browse/CASSANDRA-5633
 Project: Cassandra
  Issue Type: Improvement
Affects Versions: 2.0 beta 1
Reporter: sankalp kohli
Assignee: Sylvain Lebresne
Priority: Minor
  Labels: cql3
 Fix For: 2.0.4


 This is currently supported via Thrift but not via CQL. 



--
This message was sent by Atlassian JIRA
(v6.1.4#6159)


[jira] [Updated] (CASSANDRA-6063) Rename internal classes and interfaces to represent the modern Cassandra terminology

2013-12-20 Thread Aleksey Yeschenko (JIRA)

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

Aleksey Yeschenko updated CASSANDRA-6063:
-

Fix Version/s: (was: 3.0)
   2.1

 Rename internal classes and interfaces to represent the modern Cassandra 
 terminology
 

 Key: CASSANDRA-6063
 URL: https://issues.apache.org/jira/browse/CASSANDRA-6063
 Project: Cassandra
  Issue Type: Improvement
Reporter: Aleksey Yeschenko
Priority: Minor
 Fix For: 2.1


 Some of the class names we are using aren't exactly clear to the newcomers. 
 We've already gone through the Table-Keyspace renaming, but it's not enough.
 Other things to consider:
 - ColumnFamilyStore - Table
 - -Column - Cell (where appropriate)- done in 
 e50d6af12fabac98e3cb4bd589e2b92212b041f4
 - ColumnFamily - CellFormation (CellGroup, something different?)
 - Row - Partition (where appropriate)
 - RowMutation - PartitionMutation



--
This message was sent by Atlassian JIRA
(v6.1.4#6159)


[jira] [Updated] (CASSANDRA-6063) Rename internal classes and interfaces to represent the modern Cassandra terminology

2013-12-20 Thread Aleksey Yeschenko (JIRA)

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

Aleksey Yeschenko updated CASSANDRA-6063:
-

Description: 
Some of the class names we are using aren't exactly clear to the newcomers. 
We've already gone through the Table-Keyspace renaming, but it's not enough.

Other things to consider:

- ColumnFamilyStore - Table
- -Column - Cell (where appropriate)- done in 
e50d6af12fabac98e3cb4bd589e2b92212b041f4
- ColumnFamily - CellFormation (CellGroup, something different?)
- Row - Partition (where appropriate)
- RowMutation - PartitionMutation


  was:
Some of the class names we are using aren't exactly clear to the newcomers. 
We've already gone through the Table-Keyspace renaming, but it's not enough.

Other things to consider:

- ColumnFamilyStore - Table
- Column - Cell (where appropriate)
- ColumnFamily - CellFormation (CellGroup, something different?)
- Row - Partition (where appropriate)
- RowMutation - PartitionMutation



 Rename internal classes and interfaces to represent the modern Cassandra 
 terminology
 

 Key: CASSANDRA-6063
 URL: https://issues.apache.org/jira/browse/CASSANDRA-6063
 Project: Cassandra
  Issue Type: Improvement
Reporter: Aleksey Yeschenko
Priority: Minor
 Fix For: 2.1


 Some of the class names we are using aren't exactly clear to the newcomers. 
 We've already gone through the Table-Keyspace renaming, but it's not enough.
 Other things to consider:
 - ColumnFamilyStore - Table
 - -Column - Cell (where appropriate)- done in 
 e50d6af12fabac98e3cb4bd589e2b92212b041f4
 - ColumnFamily - CellFormation (CellGroup, something different?)
 - Row - Partition (where appropriate)
 - RowMutation - PartitionMutation



--
This message was sent by Atlassian JIRA
(v6.1.4#6159)


[jira] [Updated] (CASSANDRA-6418) auto_snapshots are not removable via 'nodetool clearsnapshot'

2013-12-20 Thread Lyuben Todorov (JIRA)

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

Lyuben Todorov updated CASSANDRA-6418:
--

Attachment: 6418_cassandra-2.0_v5.patch

LGTM, attaching v5 which adds a space to the for statement in 
{{Directories#getKSChildDirectories}}... ocd ftw.

 auto_snapshots are not removable via 'nodetool clearsnapshot'
 -

 Key: CASSANDRA-6418
 URL: https://issues.apache.org/jira/browse/CASSANDRA-6418
 Project: Cassandra
  Issue Type: Bug
  Components: Tools
 Environment: auto_snapshot: true
Reporter: J. Ryan Earl
Assignee: Lyuben Todorov
Priority: Minor
 Fix For: 2.0.5

 Attachments: 6418_cassandra-2.0.patch, 6418_cassandra-2.0_v5.patch, 
 6418_v2.patch, 6418_v3_cassandra-2.0.patch, CASSANDRA-2.0-6418_v4.patch


 Snapshots of deleted CFs created via the auto_snapshot configuration 
 parameter appear to not be tracked.  The result is that 'nodetool 
 clearsnapshot keyspace with deleted CFs' does nothing, and short of 
 manually removing the files from the filesystem, deleted CFs remain 
 indefinitely taking up space.
 I'm not sure if this is intended, but it seems pretty counter-intuitive.  I 
 haven't found any documentation that indicates auto_snapshots would be 
 ignored by 'nodetool clearsnapshot'.



--
This message was sent by Atlassian JIRA
(v6.1.4#6159)


[jira] [Commented] (CASSANDRA-6418) auto_snapshots are not removable via 'nodetool clearsnapshot'

2013-12-20 Thread Mikhail Stepura (JIRA)

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

Mikhail Stepura commented on CASSANDRA-6418:


+1

 auto_snapshots are not removable via 'nodetool clearsnapshot'
 -

 Key: CASSANDRA-6418
 URL: https://issues.apache.org/jira/browse/CASSANDRA-6418
 Project: Cassandra
  Issue Type: Bug
  Components: Tools
 Environment: auto_snapshot: true
Reporter: J. Ryan Earl
Assignee: Lyuben Todorov
Priority: Minor
 Fix For: 2.0.5

 Attachments: 6418_cassandra-2.0.patch, 6418_cassandra-2.0_v5.patch, 
 6418_v2.patch, 6418_v3_cassandra-2.0.patch, CASSANDRA-2.0-6418_v4.patch


 Snapshots of deleted CFs created via the auto_snapshot configuration 
 parameter appear to not be tracked.  The result is that 'nodetool 
 clearsnapshot keyspace with deleted CFs' does nothing, and short of 
 manually removing the files from the filesystem, deleted CFs remain 
 indefinitely taking up space.
 I'm not sure if this is intended, but it seems pretty counter-intuitive.  I 
 haven't found any documentation that indicates auto_snapshots would be 
 ignored by 'nodetool clearsnapshot'.



--
This message was sent by Atlassian JIRA
(v6.1.4#6159)


git commit: asserting that an auto-boxed primitive is not null is pointless

2013-12-20 Thread dbrosius
Updated Branches:
  refs/heads/trunk 49c5ed271 - b34ed0db5


asserting that an auto-boxed primitive is not null is pointless


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

Branch: refs/heads/trunk
Commit: b34ed0db535068525e59f5c3ec20e2c29155467b
Parents: 49c5ed2
Author: Dave Brosius dbros...@mebigfatguy.com
Authored: Fri Dec 20 21:56:15 2013 -0500
Committer: Dave Brosius dbros...@mebigfatguy.com
Committed: Fri Dec 20 21:56:15 2013 -0500

--
 .../org/apache/cassandra/io/sstable/IndexSummaryManagerTest.java| 1 -
 1 file changed, 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/b34ed0db/test/unit/org/apache/cassandra/io/sstable/IndexSummaryManagerTest.java
--
diff --git 
a/test/unit/org/apache/cassandra/io/sstable/IndexSummaryManagerTest.java 
b/test/unit/org/apache/cassandra/io/sstable/IndexSummaryManagerTest.java
index 385c06b..1c86216 100644
--- a/test/unit/org/apache/cassandra/io/sstable/IndexSummaryManagerTest.java
+++ b/test/unit/org/apache/cassandra/io/sstable/IndexSummaryManagerTest.java
@@ -273,7 +273,6 @@ public class IndexSummaryManagerTest extends SchemaLoader
 IndexSummaryManager manager = IndexSummaryManager.instance;
 
 // resize interval
-assertNotNull(manager.getResizeIntervalInMinutes());
 manager.setResizeIntervalInMinutes(-1);
 assertNull(manager.getTimeToNextResize(TimeUnit.MINUTES));
 



[jira] [Updated] (CASSANDRA-6520) cqlsh disconnects active node when dropping column

2013-12-20 Thread Mikhail Stepura (JIRA)

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

Mikhail Stepura updated CASSANDRA-6520:
---

Attachment: trunk-6520.patch

I guess we should use {{valueComparator}} for collection types in this case. 
Patch attached

 cqlsh disconnects active node when dropping column
 --

 Key: CASSANDRA-6520
 URL: https://issues.apache.org/jira/browse/CASSANDRA-6520
 Project: Cassandra
  Issue Type: Bug
  Components: API
 Environment: C* from trunk -- cassandra-2.0.3-709-g486f079
 java 1.7.0_45 (on linux 64 bit)
 [cqlsh 4.1.0 | Cassandra 2.1-SNAPSHOT | CQL spec 3.1.1 | Thrift protocol 
 19.39.0]
 3 node cluster built on my machine using ccm
Reporter: Russ Hatch
Assignee: Sylvain Lebresne
 Attachments: trunk-6520.patch


 Using ccqlsh, I issue a statement to drop a column from a table, and the 
 session appears to disconnect.
 The statement was:
 {noformat}
 cqlsh:taskapp alter table user_task drop task_order;
 {noformat}
 Here's the full setup I used:
 {noformat}
 ccm create test_cluster
 ccm populate -n 3
 ccm start
 ccm node1 cqlsh
 CREATE KEYSPACE taskapp WITH replication = {
   'class': 'SimpleStrategy',
   'replication_factor': '3'
 };
 use taskapp;
 create table user (
 user_id timeuuid PRIMARY KEY,
 first_name text,
 last_name text,
 email text
 );
 create table user_task (
 task_id timeuuid PRIMARY KEY,
 user_id timeuuid,
 task_order int,
 task_description text,
 is_complete boolean,
 is_top_level boolean,
 subtask_ids listtimeuuid
 );
 {noformat}
 and then the statement which triggers the disconnect:
 {noformat}
 cqlsh:taskapp alter table user_task drop task_order;
 TSocket read 0 bytes
 TSocket read 0 bytes
 cqlsh:taskapp describe table user_task;
 [Errno 32] Broken pipe
 {noformat}
 The log for the active node shows this INFO, followed immediately by an 
 exception (included below). The other nodes show no relevant messages:
 {noformat}
 INFO  [Thrift:4] 2013-12-20 16:04:58,668 MigrationManager.java:263 - Update 
 ColumnFamily 'taskapp/user_task' From 
 org.apache.cassandra.config.CFMetaData@15e4ed88[cfId=df7153ac-c309-3bd2-92c2-e05bb53153fb,ksName=taskapp,cfName=user_task,cfType=Standard,comparator=org.apache.cassandra.db.marshal.CompositeType(org.apache.cassandra.db.marshal.UTF8Type,org.apache.cassandra.db.marshal.ColumnToCollectionType(7375627461736b5f696473:org.apache.cassandra.db.marshal.ListType(org.apache.cassandra.db.marshal.TimeUUIDType))),comment=,readRepairChance=0.1,dclocalReadRepairChance=0.0,replicateOnWrite=true,gcGraceSeconds=864000,defaultValidator=org.apache.cassandra.db.marshal.BytesType,keyValidator=org.apache.cassandra.db.marshal.TimeUUIDType,minCompactionThreshold=4,maxCompactionThreshold=32,columnMetadata={java.nio.HeapByteBuffer[pos=0
  lim=11 cap=11]=ColumnDefinition{name=subtask_ids, 
 type=org.apache.cassandra.db.marshal.ListType(org.apache.cassandra.db.marshal.TimeUUIDType),
  kind=REGULAR, componentIndex=0, indexName=null, indexType=null}, 
 java.nio.HeapByteBuffer[pos=0 lim=11 
 cap=11]=ColumnDefinition{name=is_complete, 
 type=org.apache.cassandra.db.marshal.BooleanType, kind=REGULAR, 
 componentIndex=0, indexName=null, indexType=null}, 
 java.nio.HeapByteBuffer[pos=0 lim=12 
 cap=12]=ColumnDefinition{name=is_top_level, 
 type=org.apache.cassandra.db.marshal.BooleanType, kind=REGULAR, 
 componentIndex=0, indexName=null, indexType=null}, 
 java.nio.HeapByteBuffer[pos=0 lim=7 cap=7]=ColumnDefinition{name=task_id, 
 type=org.apache.cassandra.db.marshal.TimeUUIDType, kind=PARTITION_KEY, 
 componentIndex=null, indexName=null, indexType=null}, 
 java.nio.HeapByteBuffer[pos=0 lim=10 
 cap=10]=ColumnDefinition{name=task_order, 
 type=org.apache.cassandra.db.marshal.Int32Type, kind=REGULAR, 
 componentIndex=0, indexName=null, indexType=null}, 
 java.nio.HeapByteBuffer[pos=0 lim=7 cap=7]=ColumnDefinition{name=user_id, 
 type=org.apache.cassandra.db.marshal.TimeUUIDType, kind=REGULAR, 
 componentIndex=0, indexName=null, indexType=null}, 
 java.nio.HeapByteBuffer[pos=0 lim=16 
 cap=16]=ColumnDefinition{name=task_description, 
 type=org.apache.cassandra.db.marshal.UTF8Type, kind=REGULAR, 
 componentIndex=0, indexName=null, 
 indexType=null}},compactionStrategyClass=class 
 org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy,compactionStrategyOptions={},compressionOptions={sstable_compression=org.apache.cassandra.io.compress.LZ4Compressor},bloomFilterFpChance=0.01,memtable_flush_period_in_ms=0,caching=KEYS_ONLY,defaultTimeToLive=0,speculative_retry=99.0PERCENTILE,indexInterval=128,populateIoCacheOnFlush=false,droppedColumns={},triggers={}]
  To 
 

[jira] [Updated] (CASSANDRA-6520) cqlsh disconnects active node when dropping column

2013-12-20 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis updated CASSANDRA-6520:
--

Reviewer: Aleksey Yeschenko
Assignee: Mikhail Stepura  (was: Sylvain Lebresne)

 cqlsh disconnects active node when dropping column
 --

 Key: CASSANDRA-6520
 URL: https://issues.apache.org/jira/browse/CASSANDRA-6520
 Project: Cassandra
  Issue Type: Bug
  Components: API
 Environment: C* from trunk -- cassandra-2.0.3-709-g486f079
 java 1.7.0_45 (on linux 64 bit)
 [cqlsh 4.1.0 | Cassandra 2.1-SNAPSHOT | CQL spec 3.1.1 | Thrift protocol 
 19.39.0]
 3 node cluster built on my machine using ccm
Reporter: Russ Hatch
Assignee: Mikhail Stepura
 Attachments: trunk-6520.patch


 Using ccqlsh, I issue a statement to drop a column from a table, and the 
 session appears to disconnect.
 The statement was:
 {noformat}
 cqlsh:taskapp alter table user_task drop task_order;
 {noformat}
 Here's the full setup I used:
 {noformat}
 ccm create test_cluster
 ccm populate -n 3
 ccm start
 ccm node1 cqlsh
 CREATE KEYSPACE taskapp WITH replication = {
   'class': 'SimpleStrategy',
   'replication_factor': '3'
 };
 use taskapp;
 create table user (
 user_id timeuuid PRIMARY KEY,
 first_name text,
 last_name text,
 email text
 );
 create table user_task (
 task_id timeuuid PRIMARY KEY,
 user_id timeuuid,
 task_order int,
 task_description text,
 is_complete boolean,
 is_top_level boolean,
 subtask_ids listtimeuuid
 );
 {noformat}
 and then the statement which triggers the disconnect:
 {noformat}
 cqlsh:taskapp alter table user_task drop task_order;
 TSocket read 0 bytes
 TSocket read 0 bytes
 cqlsh:taskapp describe table user_task;
 [Errno 32] Broken pipe
 {noformat}
 The log for the active node shows this INFO, followed immediately by an 
 exception (included below). The other nodes show no relevant messages:
 {noformat}
 INFO  [Thrift:4] 2013-12-20 16:04:58,668 MigrationManager.java:263 - Update 
 ColumnFamily 'taskapp/user_task' From 
 org.apache.cassandra.config.CFMetaData@15e4ed88[cfId=df7153ac-c309-3bd2-92c2-e05bb53153fb,ksName=taskapp,cfName=user_task,cfType=Standard,comparator=org.apache.cassandra.db.marshal.CompositeType(org.apache.cassandra.db.marshal.UTF8Type,org.apache.cassandra.db.marshal.ColumnToCollectionType(7375627461736b5f696473:org.apache.cassandra.db.marshal.ListType(org.apache.cassandra.db.marshal.TimeUUIDType))),comment=,readRepairChance=0.1,dclocalReadRepairChance=0.0,replicateOnWrite=true,gcGraceSeconds=864000,defaultValidator=org.apache.cassandra.db.marshal.BytesType,keyValidator=org.apache.cassandra.db.marshal.TimeUUIDType,minCompactionThreshold=4,maxCompactionThreshold=32,columnMetadata={java.nio.HeapByteBuffer[pos=0
  lim=11 cap=11]=ColumnDefinition{name=subtask_ids, 
 type=org.apache.cassandra.db.marshal.ListType(org.apache.cassandra.db.marshal.TimeUUIDType),
  kind=REGULAR, componentIndex=0, indexName=null, indexType=null}, 
 java.nio.HeapByteBuffer[pos=0 lim=11 
 cap=11]=ColumnDefinition{name=is_complete, 
 type=org.apache.cassandra.db.marshal.BooleanType, kind=REGULAR, 
 componentIndex=0, indexName=null, indexType=null}, 
 java.nio.HeapByteBuffer[pos=0 lim=12 
 cap=12]=ColumnDefinition{name=is_top_level, 
 type=org.apache.cassandra.db.marshal.BooleanType, kind=REGULAR, 
 componentIndex=0, indexName=null, indexType=null}, 
 java.nio.HeapByteBuffer[pos=0 lim=7 cap=7]=ColumnDefinition{name=task_id, 
 type=org.apache.cassandra.db.marshal.TimeUUIDType, kind=PARTITION_KEY, 
 componentIndex=null, indexName=null, indexType=null}, 
 java.nio.HeapByteBuffer[pos=0 lim=10 
 cap=10]=ColumnDefinition{name=task_order, 
 type=org.apache.cassandra.db.marshal.Int32Type, kind=REGULAR, 
 componentIndex=0, indexName=null, indexType=null}, 
 java.nio.HeapByteBuffer[pos=0 lim=7 cap=7]=ColumnDefinition{name=user_id, 
 type=org.apache.cassandra.db.marshal.TimeUUIDType, kind=REGULAR, 
 componentIndex=0, indexName=null, indexType=null}, 
 java.nio.HeapByteBuffer[pos=0 lim=16 
 cap=16]=ColumnDefinition{name=task_description, 
 type=org.apache.cassandra.db.marshal.UTF8Type, kind=REGULAR, 
 componentIndex=0, indexName=null, 
 indexType=null}},compactionStrategyClass=class 
 org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy,compactionStrategyOptions={},compressionOptions={sstable_compression=org.apache.cassandra.io.compress.LZ4Compressor},bloomFilterFpChance=0.01,memtable_flush_period_in_ms=0,caching=KEYS_ONLY,defaultTimeToLive=0,speculative_retry=99.0PERCENTILE,indexInterval=128,populateIoCacheOnFlush=false,droppedColumns={},triggers={}]
  To 
 

[2/3] git commit: Allow removing snapshots of no-longer-existing CFs patch by Lyuben Todorov and Mikhail Stepura for CASSANDRA-6418

2013-12-20 Thread jbellis
Allow removing snapshots of no-longer-existing CFs
patch by Lyuben Todorov and Mikhail Stepura for CASSANDRA-6418


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

Branch: refs/heads/trunk
Commit: b5c9b498fec1b71bc51afb3e45f828f4014baaff
Parents: 142e13f
Author: Jonathan Ellis jbel...@apache.org
Authored: Sat Dec 21 00:36:30 2013 -0600
Committer: Jonathan Ellis jbel...@apache.org
Committed: Sat Dec 21 00:36:30 2013 -0600

--
 CHANGES.txt |  1 +
 .../apache/cassandra/db/ColumnFamilyStore.java  |  9 +-
 .../org/apache/cassandra/db/Directories.java| 34 ++--
 src/java/org/apache/cassandra/db/Keyspace.java  |  6 ++--
 4 files changed, 43 insertions(+), 7 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/b5c9b498/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 916ed7d..b80c821 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.0.4
+ * Allow removing snapshots of no-longer-existing CFs (CASSANDRA-6418)
  * add StorageService.stopDaemon() (CASSANDRA-4268)
  * add IRE for invalid CF supplied to get_count (CASSANDRA-5701)
  * add client encryption support to sstableloader (CASSANDRA-6378)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/b5c9b498/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
--
diff --git a/src/java/org/apache/cassandra/db/ColumnFamilyStore.java 
b/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
index d585407..a04c9e2 100644
--- a/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
+++ b/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
@@ -1825,9 +1825,16 @@ public class ColumnFamilyStore implements 
ColumnFamilyStoreMBean
 return directories.snapshotCreationTime(snapshotName);
 }
 
+/**
+ * Clear all the snapshots for a given column family.
+ *
+ * @param snapshotName the user supplied snapshot name. If left empty,
+ * all the snapshots will be cleaned.
+ */
 public void clearSnapshot(String snapshotName)
 {
-directories.clearSnapshot(snapshotName);
+ListFile snapshotDirs = directories.getCFDirectories();
+Directories.clearSnapshot(snapshotName, snapshotDirs);
 }
 
 public boolean hasUnreclaimedSpace()

http://git-wip-us.apache.org/repos/asf/cassandra/blob/b5c9b498/src/java/org/apache/cassandra/db/Directories.java
--
diff --git a/src/java/org/apache/cassandra/db/Directories.java 
b/src/java/org/apache/cassandra/db/Directories.java
index b006c71..2db4d9b 100644
--- a/src/java/org/apache/cassandra/db/Directories.java
+++ b/src/java/org/apache/cassandra/db/Directories.java
@@ -402,11 +402,11 @@ public class Directories
 return false;
 }
 
-public void clearSnapshot(String snapshotName)
+public static void clearSnapshot(String snapshotName, ListFile 
snapshotDirectories)
 {
 // If snapshotName is empty or null, we will delete the entire 
snapshot directory
 String tag = snapshotName == null ?  : snapshotName;
-for (File dir : sstableDirectories)
+for (File dir : snapshotDirectories)
 {
 File snapshotDir = new File(dir, join(SNAPSHOT_SUBDIR, tag));
 if (snapshotDir.exists())
@@ -430,6 +430,36 @@ public class Directories
 throw new RuntimeException(Snapshot  + snapshotName +  doesn't 
exist);
 }
 
+// Recursively finds all the sub directories in the KS directory.
+public static ListFile getKSChildDirectories(String ksName)
+{
+ListFile result = new ArrayListFile();
+for (DataDirectory dataDirectory : dataFileLocations)
+{
+File ksDir = new File(dataDirectory.location, ksName);
+File[] cfDirs = ksDir.listFiles();
+if (cfDirs == null)
+continue;
+for (File cfDir : cfDirs)
+{
+if (cfDir.isDirectory())
+result.add(cfDir);
+}
+}
+return result;
+}
+
+public ListFile getCFDirectories()
+{
+ListFile result = new ArrayListFile();
+for (File dataDirectory : sstableDirectories)
+{
+if (dataDirectory.isDirectory())
+result.add(dataDirectory);
+}
+return result;
+}
+
 private static File getOrCreate(File base, String... subdirs)
 {
 File dir = subdirs == null 

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

2013-12-20 Thread jbellis
Merge branch 'cassandra-2.0' into trunk


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

Branch: refs/heads/trunk
Commit: d7536612f3d828e9132a8cdc32732ec8516ac991
Parents: b34ed0d b5c9b49
Author: Jonathan Ellis jbel...@apache.org
Authored: Sat Dec 21 00:36:35 2013 -0600
Committer: Jonathan Ellis jbel...@apache.org
Committed: Sat Dec 21 00:36:35 2013 -0600

--
 CHANGES.txt |  1 +
 .../apache/cassandra/db/ColumnFamilyStore.java  |  9 +-
 .../org/apache/cassandra/db/Directories.java| 34 ++--
 src/java/org/apache/cassandra/db/Keyspace.java  |  6 ++--
 4 files changed, 43 insertions(+), 7 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/d7536612/CHANGES.txt
--
diff --cc CHANGES.txt
index c9dcc18,b80c821..8c698cd
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,27 -1,5 +1,28 @@@
 +2.1
 + * Multithreaded commitlog (CASSANDRA-3578)
 + * allocate fixed index summary memory pool and resample cold index summaries 
 +   to use less memory (CASSANDRA-5519)
 + * Removed multithreaded compaction (CASSANDRA-6142)
 + * Parallelize fetching rows for low-cardinality indexes (CASSANDRA-1337)
 + * change logging from log4j to logback (CASSANDRA-5883)
 + * switch to LZ4 compression for internode communication (CASSANDRA-5887)
 + * Stop using Thrift-generated Index* classes internally (CASSANDRA-5971)
 + * Remove 1.2 network compatibility code (CASSANDRA-5960)
 + * Remove leveled json manifest migration code (CASSANDRA-5996)
 + * Remove CFDefinition (CASSANDRA-6253)
 + * Use AtomicIntegerFieldUpdater in RefCountedMemory (CASSANDRA-6278)
 + * User-defined types for CQL3 (CASSANDRA-5590)
 + * Use of o.a.c.metrics in nodetool (CASSANDRA-5871, 6406)
 + * Batch read from OTC's queue and cleanup (CASSANDRA-1632)
 + * Secondary index support for collections (CASSANDRA-4511)
 + * SSTable metadata(Stats.db) format change (CASSANDRA-6356)
 + * Push composites support in the storage engine (CASSANDRA-5417)
 + * Add snapshot space used to cfstats (CASSANDRA-6231)
 + * Add cardinality estimator for key count estimation (CASSANDRA-5906)
 +
 +
  2.0.4
+  * Allow removing snapshots of no-longer-existing CFs (CASSANDRA-6418)
   * add StorageService.stopDaemon() (CASSANDRA-4268)
   * add IRE for invalid CF supplied to get_count (CASSANDRA-5701)
   * add client encryption support to sstableloader (CASSANDRA-6378)

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

http://git-wip-us.apache.org/repos/asf/cassandra/blob/d7536612/src/java/org/apache/cassandra/db/Directories.java
--
diff --cc src/java/org/apache/cassandra/db/Directories.java
index 81d15d1,2db4d9b..6f00d6d
--- a/src/java/org/apache/cassandra/db/Directories.java
+++ b/src/java/org/apache/cassandra/db/Directories.java
@@@ -483,38 -429,37 +483,68 @@@ public class Directorie
  }
  throw new RuntimeException(Snapshot  + snapshotName +  doesn't 
exist);
  }
 +
 +public long trueSnapshotsSize()
 +{
 +long result = 0L;
 +for (File dir : sstableDirectories)
 +result += getTrueAllocatedSizeIn(new File(dir, 
join(SNAPSHOT_SUBDIR)));
 +return result;
 +}
 +
 +private String getSSTablePrefix()
 +{
 +return keyspacename + Component.separator + cfname + 
Component.separator;
 +}
 +
 +public long getTrueAllocatedSizeIn(File input)
 +{
 +if (!input.isDirectory())
 +return 0;
 +
 +TrueFilesSizeVisitor visitor = new TrueFilesSizeVisitor();
 +try
 +{
 +Files.walkFileTree(input.toPath(), visitor);
 +}
 +catch (IOException e)
 +{
 +logger.error(Could not calculate the size of {}. {}, input, e);
 +}
 +
 +return visitor.getAllocatedSize();
 +}
  
+ // Recursively finds all the sub directories in the KS directory.
+ public static ListFile getKSChildDirectories(String ksName)
+ {
+ ListFile result = new ArrayListFile();
+ for (DataDirectory dataDirectory : dataFileLocations)
+ {
+ File ksDir = new File(dataDirectory.location, ksName);
+ File[] cfDirs = ksDir.listFiles();
+ if (cfDirs == null)
+ continue;
+ for (File cfDir : cfDirs)
+ {
+ if (cfDir.isDirectory())