[jira] [Resolved] (CASSANDRA-5751) Columns defined as datatype counter will become 'null' after deletion

2013-07-15 Thread Sylvain Lebresne (JIRA)

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

Sylvain Lebresne resolved CASSANDRA-5751.
-

Resolution: Won't Fix

Quoting http://wiki.apache.org/cassandra/Counters (parts about the technical 
limitation):
{noformat}
Counter removal is intrinsically limited. For instance, if you issue very 
quickly the sequence increment, remove, increment it is possible for the 
removal to be lost (if for some reason the remove happens to be the last 
received messages). Hence, removal of counters is provided for definitive 
removal only, that is when the deleted counter is not increment afterwards. 
This holds for row deletion too: if you delete a row of counters, incrementing 
any counter in that row (that existed before the deletion) will result in an 
undetermined behavior. Note that if you need to reset a counter, one option 
(that is unfortunately not concurrent safe) could be to read its value and add 
-value.
{noformat}

So, we know re-incrementing after a deletion doesn't work as it should, but we 
don't know how to fix it with the current counter design.

 Columns defined as datatype counter will become 'null' after deletion
 -

 Key: CASSANDRA-5751
 URL: https://issues.apache.org/jira/browse/CASSANDRA-5751
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Affects Versions: 1.2.4, 1.2.6
Reporter: Yangyi Chen
Priority: Minor

 The following statements should reproduce the problem:
 CREATE TABLE ctrtest (a varchar, ctr counter, PRIMARY KEY(a) );
 update ctrtest set ctr=ctr+1 where a='a';
 delete from ctrtest where a='a';
 update ctrtest set ctr=ctr+1 where a='a'; 
 select * from ctrtest ;
  a | ctr
 ---+--
  a | null

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


git commit: Fix unit tests

2013-07-15 Thread slebresne
Updated Branches:
  refs/heads/trunk 663bdfbd6 - 20c0baf08


Fix unit tests


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

Branch: refs/heads/trunk
Commit: 20c0baf08565fbae1b6fb52f80155039a847f93a
Parents: 663bdfb
Author: Sylvain Lebresne sylv...@datastax.com
Authored: Mon Jul 15 09:45:54 2013 +0200
Committer: Sylvain Lebresne sylv...@datastax.com
Committed: Mon Jul 15 09:45:54 2013 +0200

--
 src/java/org/apache/cassandra/serializers/TimeUUIDSerializer.java  | 2 ++
 test/unit/org/apache/cassandra/db/marshal/CompositeTypeTest.java   | 2 +-
 .../org/apache/cassandra/db/marshal/DynamicCompositeTypeTest.java  | 2 +-
 3 files changed, 4 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/20c0baf0/src/java/org/apache/cassandra/serializers/TimeUUIDSerializer.java
--
diff --git a/src/java/org/apache/cassandra/serializers/TimeUUIDSerializer.java 
b/src/java/org/apache/cassandra/serializers/TimeUUIDSerializer.java
index 22750be..dc5dad0 100644
--- a/src/java/org/apache/cassandra/serializers/TimeUUIDSerializer.java
+++ b/src/java/org/apache/cassandra/serializers/TimeUUIDSerializer.java
@@ -22,6 +22,8 @@ import java.nio.ByteBuffer;
 
 public class TimeUUIDSerializer extends UUIDSerializer
 {
+public static final TimeUUIDSerializer instance = new TimeUUIDSerializer();
+
 @Override
 public void validate(ByteBuffer bytes) throws MarshalException
 {

http://git-wip-us.apache.org/repos/asf/cassandra/blob/20c0baf0/test/unit/org/apache/cassandra/db/marshal/CompositeTypeTest.java
--
diff --git a/test/unit/org/apache/cassandra/db/marshal/CompositeTypeTest.java 
b/test/unit/org/apache/cassandra/db/marshal/CompositeTypeTest.java
index afb3913..1039fb6 100644
--- a/test/unit/org/apache/cassandra/db/marshal/CompositeTypeTest.java
+++ b/test/unit/org/apache/cassandra/db/marshal/CompositeTypeTest.java
@@ -145,7 +145,7 @@ public class CompositeTypeTest extends SchemaLoader
 }
 catch (MarshalException e)
 {
-assert e.toString().contains(TimeUUID should be 16 or 0 bytes);
+assert e.toString().contains(should be 16 or 0 bytes);
 }
 
 key = createCompositeKey(test1, UUID.randomUUID(), 42, false);

http://git-wip-us.apache.org/repos/asf/cassandra/blob/20c0baf0/test/unit/org/apache/cassandra/db/marshal/DynamicCompositeTypeTest.java
--
diff --git 
a/test/unit/org/apache/cassandra/db/marshal/DynamicCompositeTypeTest.java 
b/test/unit/org/apache/cassandra/db/marshal/DynamicCompositeTypeTest.java
index e959b5f..f8e2fb6 100644
--- a/test/unit/org/apache/cassandra/db/marshal/DynamicCompositeTypeTest.java
+++ b/test/unit/org/apache/cassandra/db/marshal/DynamicCompositeTypeTest.java
@@ -144,7 +144,7 @@ public class DynamicCompositeTypeTest extends SchemaLoader
 }
 catch (MarshalException e)
 {
-assert e.toString().contains(TimeUUID should be 16 or 0 bytes);
+assert e.toString().contains(should be 16 or 0 bytes);
 }
 
 key = createDynamicCompositeKey(test1, UUID.randomUUID(), 42, false);



git commit: Fix potential index out of bound error in RangeTombstoneList (+test)

2013-07-15 Thread slebresne
Updated Branches:
  refs/heads/cassandra-1.2 fa327aa69 - f5b224cf9


Fix potential index out of bound error in RangeTombstoneList (+test)


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

Branch: refs/heads/cassandra-1.2
Commit: f5b224cf9aa0f319d51078ef4b78d55e36613963
Parents: fa327aa
Author: Sylvain Lebresne sylv...@datastax.com
Authored: Mon Jul 15 10:33:34 2013 +0200
Committer: Sylvain Lebresne sylv...@datastax.com
Committed: Mon Jul 15 10:33:34 2013 +0200

--
 .../apache/cassandra/db/RangeTombstoneList.java | 13 +++
 .../cassandra/db/RangeTombstoneListTest.java| 37 
 2 files changed, 44 insertions(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/f5b224cf/src/java/org/apache/cassandra/db/RangeTombstoneList.java
--
diff --git a/src/java/org/apache/cassandra/db/RangeTombstoneList.java 
b/src/java/org/apache/cassandra/db/RangeTombstoneList.java
index 0a761cd..e7ec119 100644
--- a/src/java/org/apache/cassandra/db/RangeTombstoneList.java
+++ b/src/java/org/apache/cassandra/db/RangeTombstoneList.java
@@ -201,8 +201,9 @@ public class RangeTombstoneList implements 
IterableRangeTombstone
 i++;
 }
 }
+// Addds the remaining ones from tombstones if any (not that 
insertFrom will increment size if relevant).
 for (; j  tombstones.size; j++)
-insertFrom((i++) - 1, tombstones.starts[j], 
tombstones.ends[j], tombstones.markedAts[j], tombstones.delTimes[j]);
+insertFrom(size - 1, tombstones.starts[j], tombstones.ends[j], 
tombstones.markedAts[j], tombstones.delTimes[j]);
 }
 }
 
@@ -374,7 +375,7 @@ public class RangeTombstoneList implements 
IterableRangeTombstone
 /*
  * Inserts a new element whose start should be inserted at index i. This 
method
  * assumes that:
- *   - starts[i] = start.
+ *   - starts[i] = start
  *   - start  starts[i+1] or there is no i+1 element.
  */
 private void insertFrom(int i, ByteBuffer start, ByteBuffer end, long 
markedAt, int delTime)
@@ -388,12 +389,12 @@ public class RangeTombstoneList implements 
IterableRangeTombstone
 /*
  * We have elt(i) = [s_i, e_i]@t_i and want to insert X = [s, e]@t, 
knowing that s_i  s  s_i+1.
  * We can have 3 cases:
- *  - s = e_i  e = e_i: we're fully contained in i.
- *  - s = e_i  e  e_i: we rewrite X to X1=[s, e_i]@t + X2=[e_i, 
e]@t. X1 is fully contained
+ *  - s  e_i  e = e_i: we're fully contained in i.
+ *  - s  e_i  e  e_i: we rewrite X to X1=[s, e_i]@t + X2=[e_i, 
e]@t. X1 is fully contained
  * in i and X2 is the insertAfter() case for i.
- *  - s  e_i: we're in the insertAfter() case for i.
+ *  - s = e_i: we're in the insertAfter() case for i.
  */
-if (comparator.compare(start, ends[i]) = 0)
+if (comparator.compare(start, ends[i])  0)
 {
 if (comparator.compare(end, ends[i]) = 0)
 {

http://git-wip-us.apache.org/repos/asf/cassandra/blob/f5b224cf/test/unit/org/apache/cassandra/db/RangeTombstoneListTest.java
--
diff --git a/test/unit/org/apache/cassandra/db/RangeTombstoneListTest.java 
b/test/unit/org/apache/cassandra/db/RangeTombstoneListTest.java
index 39f9e6c..67e3623 100644
--- a/test/unit/org/apache/cassandra/db/RangeTombstoneListTest.java
+++ b/test/unit/org/apache/cassandra/db/RangeTombstoneListTest.java
@@ -205,6 +205,43 @@ public class RangeTombstoneListTest
 }
 
 @Test
+public void addAllSequentialTest()
+{
+RangeTombstoneList l1 = new RangeTombstoneList(cmp, 0);
+l1.add(rt(3, 5, 2));
+
+RangeTombstoneList l2 = new RangeTombstoneList(cmp, 0);
+l2.add(rt(5, 7, 7));
+
+l1.addAll(l2);
+
+IteratorRangeTombstone iter = l1.iterator();
+assertRT(rt(3, 5, 2), iter.next());
+assertRT(rt(5, 7, 7), iter.next());
+
+assert !iter.hasNext();
+}
+
+@Test
+public void addAllIncludedTest()
+{
+RangeTombstoneList l1 = new RangeTombstoneList(cmp, 0);
+l1.add(rt(3, 10, 5));
+
+RangeTombstoneList l2 = new RangeTombstoneList(cmp, 0);
+l2.add(rt(4, 5, 2));
+l2.add(rt(5, 7, 3));
+l2.add(rt(7, 9, 4));
+
+l1.addAll(l2);
+
+IteratorRangeTombstone iter = l1.iterator();
+assertRT(rt(3, 10, 5), iter.next());
+
+assert !iter.hasNext();
+}

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

2013-07-15 Thread slebresne
Merge branch 'cassandra-1.2' into trunk


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

Branch: refs/heads/trunk
Commit: 4df6c287506b3d4f1628140fbcbb754cb445549e
Parents: 20c0baf f5b224c
Author: Sylvain Lebresne sylv...@datastax.com
Authored: Mon Jul 15 10:33:51 2013 +0200
Committer: Sylvain Lebresne sylv...@datastax.com
Committed: Mon Jul 15 10:33:51 2013 +0200

--
 .../apache/cassandra/db/RangeTombstoneList.java | 13 +++
 .../cassandra/db/RangeTombstoneListTest.java| 37 
 2 files changed, 44 insertions(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/4df6c287/src/java/org/apache/cassandra/db/RangeTombstoneList.java
--



[1/2] git commit: Fix potential index out of bound error in RangeTombstoneList (+test)

2013-07-15 Thread slebresne
Updated Branches:
  refs/heads/trunk 20c0baf08 - 4df6c2875


Fix potential index out of bound error in RangeTombstoneList (+test)


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

Branch: refs/heads/trunk
Commit: f5b224cf9aa0f319d51078ef4b78d55e36613963
Parents: fa327aa
Author: Sylvain Lebresne sylv...@datastax.com
Authored: Mon Jul 15 10:33:34 2013 +0200
Committer: Sylvain Lebresne sylv...@datastax.com
Committed: Mon Jul 15 10:33:34 2013 +0200

--
 .../apache/cassandra/db/RangeTombstoneList.java | 13 +++
 .../cassandra/db/RangeTombstoneListTest.java| 37 
 2 files changed, 44 insertions(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/f5b224cf/src/java/org/apache/cassandra/db/RangeTombstoneList.java
--
diff --git a/src/java/org/apache/cassandra/db/RangeTombstoneList.java 
b/src/java/org/apache/cassandra/db/RangeTombstoneList.java
index 0a761cd..e7ec119 100644
--- a/src/java/org/apache/cassandra/db/RangeTombstoneList.java
+++ b/src/java/org/apache/cassandra/db/RangeTombstoneList.java
@@ -201,8 +201,9 @@ public class RangeTombstoneList implements 
IterableRangeTombstone
 i++;
 }
 }
+// Addds the remaining ones from tombstones if any (not that 
insertFrom will increment size if relevant).
 for (; j  tombstones.size; j++)
-insertFrom((i++) - 1, tombstones.starts[j], 
tombstones.ends[j], tombstones.markedAts[j], tombstones.delTimes[j]);
+insertFrom(size - 1, tombstones.starts[j], tombstones.ends[j], 
tombstones.markedAts[j], tombstones.delTimes[j]);
 }
 }
 
@@ -374,7 +375,7 @@ public class RangeTombstoneList implements 
IterableRangeTombstone
 /*
  * Inserts a new element whose start should be inserted at index i. This 
method
  * assumes that:
- *   - starts[i] = start.
+ *   - starts[i] = start
  *   - start  starts[i+1] or there is no i+1 element.
  */
 private void insertFrom(int i, ByteBuffer start, ByteBuffer end, long 
markedAt, int delTime)
@@ -388,12 +389,12 @@ public class RangeTombstoneList implements 
IterableRangeTombstone
 /*
  * We have elt(i) = [s_i, e_i]@t_i and want to insert X = [s, e]@t, 
knowing that s_i  s  s_i+1.
  * We can have 3 cases:
- *  - s = e_i  e = e_i: we're fully contained in i.
- *  - s = e_i  e  e_i: we rewrite X to X1=[s, e_i]@t + X2=[e_i, 
e]@t. X1 is fully contained
+ *  - s  e_i  e = e_i: we're fully contained in i.
+ *  - s  e_i  e  e_i: we rewrite X to X1=[s, e_i]@t + X2=[e_i, 
e]@t. X1 is fully contained
  * in i and X2 is the insertAfter() case for i.
- *  - s  e_i: we're in the insertAfter() case for i.
+ *  - s = e_i: we're in the insertAfter() case for i.
  */
-if (comparator.compare(start, ends[i]) = 0)
+if (comparator.compare(start, ends[i])  0)
 {
 if (comparator.compare(end, ends[i]) = 0)
 {

http://git-wip-us.apache.org/repos/asf/cassandra/blob/f5b224cf/test/unit/org/apache/cassandra/db/RangeTombstoneListTest.java
--
diff --git a/test/unit/org/apache/cassandra/db/RangeTombstoneListTest.java 
b/test/unit/org/apache/cassandra/db/RangeTombstoneListTest.java
index 39f9e6c..67e3623 100644
--- a/test/unit/org/apache/cassandra/db/RangeTombstoneListTest.java
+++ b/test/unit/org/apache/cassandra/db/RangeTombstoneListTest.java
@@ -205,6 +205,43 @@ public class RangeTombstoneListTest
 }
 
 @Test
+public void addAllSequentialTest()
+{
+RangeTombstoneList l1 = new RangeTombstoneList(cmp, 0);
+l1.add(rt(3, 5, 2));
+
+RangeTombstoneList l2 = new RangeTombstoneList(cmp, 0);
+l2.add(rt(5, 7, 7));
+
+l1.addAll(l2);
+
+IteratorRangeTombstone iter = l1.iterator();
+assertRT(rt(3, 5, 2), iter.next());
+assertRT(rt(5, 7, 7), iter.next());
+
+assert !iter.hasNext();
+}
+
+@Test
+public void addAllIncludedTest()
+{
+RangeTombstoneList l1 = new RangeTombstoneList(cmp, 0);
+l1.add(rt(3, 10, 5));
+
+RangeTombstoneList l2 = new RangeTombstoneList(cmp, 0);
+l2.add(rt(4, 5, 2));
+l2.add(rt(5, 7, 3));
+l2.add(rt(7, 9, 4));
+
+l1.addAll(l2);
+
+IteratorRangeTombstone iter = l1.iterator();
+assertRT(rt(3, 10, 5), iter.next());
+
+assert !iter.hasNext();
+}
+
+@Test
   

git commit: cqlsh: add missing table options to DESCRIBE output

2013-07-15 Thread aleksey
Updated Branches:
  refs/heads/trunk 4df6c2875 - 62b90340d


cqlsh: add missing table options to DESCRIBE output

patch by Aleksey Yeschenko; reviewed by Brandon Williams for
CASSANDRA-5749


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

Branch: refs/heads/trunk
Commit: 62b90340d6f3a538acb33f693c4177e5c7870d9b
Parents: 4df6c28
Author: Aleksey Yeschenko alek...@apache.org
Authored: Mon Jul 15 13:48:09 2013 +0300
Committer: Aleksey Yeschenko alek...@apache.org
Committed: Mon Jul 15 13:48:09 2013 +0300

--
 CHANGES.txt  | 1 +
 pylib/cqlshlib/cql3handling.py   | 3 +++
 pylib/cqlshlib/test/test_cqlsh_output.py | 3 +++
 3 files changed, 7 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/62b90340/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 21f8e3a..a0d6793 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -4,6 +4,7 @@
  * Remove unimplemented cli option schema-mwt (CASSANDRA-5754)
  * Support range tombstones in thrift (CASSANDRA-5435)
  * Normalize table-manipulating CQL3 statements' class names (CASSANDRA-5759)
+ * cqlsh: add missing table options to DESCRIBE output (CASSANDRA-5749)
 
 2.0.0-beta1
  * Removed on-heap row cache (CASSANDRA-5348)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/62b90340/pylib/cqlshlib/cql3handling.py
--
diff --git a/pylib/cqlshlib/cql3handling.py b/pylib/cqlshlib/cql3handling.py
index aa68984..5fcca6f 100644
--- a/pylib/cqlshlib/cql3handling.py
+++ b/pylib/cqlshlib/cql3handling.py
@@ -70,6 +70,9 @@ class Cql3ParsingRuleSet(CqlParsingRuleSet):
 ('read_repair_chance', None),
 ('replicate_on_write', None),
 ('populate_io_cache_on_flush', None),
+('default_time_to_live', None),
+('speculative_retry', None),
+('memtable_flush_period_in_ms', None),
 )
 
 columnfamily_layout_map_options = (

http://git-wip-us.apache.org/repos/asf/cassandra/blob/62b90340/pylib/cqlshlib/test/test_cqlsh_output.py
--
diff --git a/pylib/cqlshlib/test/test_cqlsh_output.py 
b/pylib/cqlshlib/test/test_cqlsh_output.py
index aa92a7f..8aef154 100644
--- a/pylib/cqlshlib/test/test_cqlsh_output.py
+++ b/pylib/cqlshlib/test/test_cqlsh_output.py
@@ -662,6 +662,9 @@ class TestCqlshOutput(BaseTestCase):
   read_repair_chance=0.10 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'};
 



[jira] [Created] (CASSANDRA-5761) Issue with secondary index sstable.

2013-07-15 Thread Andriy Yevsyukov (JIRA)
Andriy Yevsyukov created CASSANDRA-5761:
---

 Summary: Issue with secondary index sstable.
 Key: CASSANDRA-5761
 URL: https://issues.apache.org/jira/browse/CASSANDRA-5761
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Affects Versions: 1.2.5
Reporter: Andriy Yevsyukov


With Cassandra 1.2.5 having issue very similar to 
[CASSANDRA-5225|https://issues.apache.org/jira/browse/CASSANDRA-5225] but for 
secondary index sstable. Every query that uses this index fails in Hector with 
ConnectionTimeout but cassandra log says that reason is:
{noformat}
ERROR [ReadStage:55803] 2013-07-15 12:11:35,392 CassandraDaemon.java (line 175) 
Exception in thread Thread[ReadStage:55803,5,main]
java.lang.RuntimeException: 
org.apache.cassandra.io.sstable.CorruptSSTableException: 
org.apache.cassandra.db.ColumnSerializer$CorruptColumnException: invalid column 
name length 0 
(/data/cassandra/data/betting/events/betting-events.events_sport_type_idx-ic-1-Data.db,
 19658 bytes remaining)
at 
org.apache.cassandra.service.StorageProxy$DroppableRunnable.run(StorageProxy.java:1582)
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)
Caused by: org.apache.cassandra.io.sstable.CorruptSSTableException: 
org.apache.cassandra.db.ColumnSerializer$CorruptColumnException: invalid column 
name length 0 
(/data/cassandra/data/betting/events/betting-events.events_sport_type_idx-ic-1-Data.db,
 19658 bytes remaining)
at 
org.apache.cassandra.db.columniterator.SimpleSliceReader.computeNext(SimpleSliceReader.java:108)
at 
org.apache.cassandra.db.columniterator.SimpleSliceReader.computeNext(SimpleSliceReader.java:39)
at 
com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:143)
at 
com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:138)
at 
org.apache.cassandra.db.columniterator.SSTableSliceIterator.hasNext(SSTableSliceIterator.java:90)
at 
org.apache.cassandra.db.filter.QueryFilter$2.getNext(QueryFilter.java:171)
at 
org.apache.cassandra.db.filter.QueryFilter$2.hasNext(QueryFilter.java:154)
at 
org.apache.cassandra.utils.MergeIterator$Candidate.advance(MergeIterator.java:143)
at 
org.apache.cassandra.utils.MergeIterator$ManyToOne.init(MergeIterator.java:86)
at org.apache.cassandra.utils.MergeIterator.get(MergeIterator.java:45)
at 
org.apache.cassandra.db.filter.QueryFilter.collateColumns(QueryFilter.java:134)
at 
org.apache.cassandra.db.filter.QueryFilter.collateOnDiskAtom(QueryFilter.java:84)
at 
org.apache.cassandra.db.CollationController.collectAllData(CollationController.java:293)
at 
org.apache.cassandra.db.CollationController.getTopLevelColumns(CollationController.java:65)
at 
org.apache.cassandra.db.ColumnFamilyStore.getTopLevelColumns(ColumnFamilyStore.java:1357)
at 
org.apache.cassandra.db.ColumnFamilyStore.getColumnFamily(ColumnFamilyStore.java:1214)
at 
org.apache.cassandra.db.ColumnFamilyStore.getColumnFamily(ColumnFamilyStore.java:1126)
at 
org.apache.cassandra.db.index.keys.KeysSearcher$1.computeNext(KeysSearcher.java:140)
at 
org.apache.cassandra.db.index.keys.KeysSearcher$1.computeNext(KeysSearcher.java:109)
at 
com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:143)
at 
com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:138)
at 
org.apache.cassandra.db.ColumnFamilyStore.filter(ColumnFamilyStore.java:1466)
at 
org.apache.cassandra.db.index.keys.KeysSearcher.search(KeysSearcher.java:82)
at 
org.apache.cassandra.db.index.SecondaryIndexManager.search(SecondaryIndexManager.java:548)
at 
org.apache.cassandra.db.ColumnFamilyStore.search(ColumnFamilyStore.java:1454)
at 
org.apache.cassandra.service.RangeSliceVerbHandler.executeLocally(RangeSliceVerbHandler.java:44)
at 
org.apache.cassandra.service.StorageProxy$LocalRangeSliceRunnable.runMayThrow(StorageProxy.java:1076)
at 
org.apache.cassandra.service.StorageProxy$DroppableRunnable.run(StorageProxy.java:1578)
... 3 more
Caused by: org.apache.cassandra.db.ColumnSerializer$CorruptColumnException: 
invalid column name length 0 
(/data/cassandra/data/betting/events/betting-events.events_sport_type_idx-ic-1-Data.db,
 19658 bytes remaining)
at 
org.apache.cassandra.db.ColumnSerializer$CorruptColumnException.create(ColumnSerializer.java:148)
at 
org.apache.cassandra.db.RangeTombstone$Serializer.deserializeBody(RangeTombstone.java:279)
at 

[jira] [Updated] (CASSANDRA-5761) Issue with secondary index sstable.

2013-07-15 Thread Andriy Yevsyukov (JIRA)

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

Andriy Yevsyukov updated CASSANDRA-5761:


Priority: Critical  (was: Major)

 Issue with secondary index sstable.
 ---

 Key: CASSANDRA-5761
 URL: https://issues.apache.org/jira/browse/CASSANDRA-5761
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Affects Versions: 1.2.5
Reporter: Andriy Yevsyukov
Priority: Critical

 With Cassandra 1.2.5 having issue very similar to 
 [CASSANDRA-5225|https://issues.apache.org/jira/browse/CASSANDRA-5225] but for 
 secondary index sstable. Every query that uses this index fails in Hector 
 with ConnectionTimeout but cassandra log says that reason is:
 {noformat}
 ERROR [ReadStage:55803] 2013-07-15 12:11:35,392 CassandraDaemon.java (line 
 175) Exception in thread Thread[ReadStage:55803,5,main]
 java.lang.RuntimeException: 
 org.apache.cassandra.io.sstable.CorruptSSTableException: 
 org.apache.cassandra.db.ColumnSerializer$CorruptColumnException: invalid 
 column name length 0 
 (/data/cassandra/data/betting/events/betting-events.events_sport_type_idx-ic-1-Data.db,
  19658 bytes remaining)
   at 
 org.apache.cassandra.service.StorageProxy$DroppableRunnable.run(StorageProxy.java:1582)
   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)
 Caused by: org.apache.cassandra.io.sstable.CorruptSSTableException: 
 org.apache.cassandra.db.ColumnSerializer$CorruptColumnException: invalid 
 column name length 0 
 (/data/cassandra/data/betting/events/betting-events.events_sport_type_idx-ic-1-Data.db,
  19658 bytes remaining)
   at 
 org.apache.cassandra.db.columniterator.SimpleSliceReader.computeNext(SimpleSliceReader.java:108)
   at 
 org.apache.cassandra.db.columniterator.SimpleSliceReader.computeNext(SimpleSliceReader.java:39)
   at 
 com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:143)
   at 
 com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:138)
   at 
 org.apache.cassandra.db.columniterator.SSTableSliceIterator.hasNext(SSTableSliceIterator.java:90)
   at 
 org.apache.cassandra.db.filter.QueryFilter$2.getNext(QueryFilter.java:171)
   at 
 org.apache.cassandra.db.filter.QueryFilter$2.hasNext(QueryFilter.java:154)
   at 
 org.apache.cassandra.utils.MergeIterator$Candidate.advance(MergeIterator.java:143)
   at 
 org.apache.cassandra.utils.MergeIterator$ManyToOne.init(MergeIterator.java:86)
   at org.apache.cassandra.utils.MergeIterator.get(MergeIterator.java:45)
   at 
 org.apache.cassandra.db.filter.QueryFilter.collateColumns(QueryFilter.java:134)
   at 
 org.apache.cassandra.db.filter.QueryFilter.collateOnDiskAtom(QueryFilter.java:84)
   at 
 org.apache.cassandra.db.CollationController.collectAllData(CollationController.java:293)
   at 
 org.apache.cassandra.db.CollationController.getTopLevelColumns(CollationController.java:65)
   at 
 org.apache.cassandra.db.ColumnFamilyStore.getTopLevelColumns(ColumnFamilyStore.java:1357)
   at 
 org.apache.cassandra.db.ColumnFamilyStore.getColumnFamily(ColumnFamilyStore.java:1214)
   at 
 org.apache.cassandra.db.ColumnFamilyStore.getColumnFamily(ColumnFamilyStore.java:1126)
   at 
 org.apache.cassandra.db.index.keys.KeysSearcher$1.computeNext(KeysSearcher.java:140)
   at 
 org.apache.cassandra.db.index.keys.KeysSearcher$1.computeNext(KeysSearcher.java:109)
   at 
 com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:143)
   at 
 com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:138)
   at 
 org.apache.cassandra.db.ColumnFamilyStore.filter(ColumnFamilyStore.java:1466)
   at 
 org.apache.cassandra.db.index.keys.KeysSearcher.search(KeysSearcher.java:82)
   at 
 org.apache.cassandra.db.index.SecondaryIndexManager.search(SecondaryIndexManager.java:548)
   at 
 org.apache.cassandra.db.ColumnFamilyStore.search(ColumnFamilyStore.java:1454)
   at 
 org.apache.cassandra.service.RangeSliceVerbHandler.executeLocally(RangeSliceVerbHandler.java:44)
   at 
 org.apache.cassandra.service.StorageProxy$LocalRangeSliceRunnable.runMayThrow(StorageProxy.java:1076)
   at 
 org.apache.cassandra.service.StorageProxy$DroppableRunnable.run(StorageProxy.java:1578)
   ... 3 more
 Caused by: org.apache.cassandra.db.ColumnSerializer$CorruptColumnException: 
 invalid column name length 0 
 (/data/cassandra/data/betting/events/betting-events.events_sport_type_idx-ic-1-Data.db,
  19658 bytes remaining)
   at 
 

[jira] [Commented] (CASSANDRA-5748) When flushing, nodes spent almost 100% in AbstractCompositeType.compare

2013-07-15 Thread Chris Eineke (JIRA)

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

Chris Eineke commented on CASSANDRA-5748:
-

Sylvain,

Thank you for your response. That's great to hear! Is there a anticipated 
release date yet?

 When flushing, nodes spent almost 100% in AbstractCompositeType.compare
 ---

 Key: CASSANDRA-5748
 URL: https://issues.apache.org/jira/browse/CASSANDRA-5748
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Affects Versions: 1.2.5, 1.2.6
 Environment: Apache Cassandra v1.2.6
 4-node cluster, mostly the same hardware
 # java -version
 java version 1.6.0_37
 Java(TM) SE Runtime Environment (build 1.6.0_37-b06)
 Java HotSpot(TM) 64-Bit Server VM (build 20.12-b01, mixed mode)
Reporter: Chris Eineke
Priority: Critical
 Attachments: thread_dump


 We're pretty heavy users of CQL3 and CQL3 collection types. Occasionally, 
 some nodes of the cluster will become extremely sluggish and the cluster as a 
 whole starts to become unresponsive, reads will time out, and nodes will drop 
 mutation messages. This happens when nodes flush Memtables to disk (based on 
 my tail of the system.log on each node).
 I'm a curious guy, so I attached jvisualvm (v1.3.3) to the JVMs that were 
 having this problem. These nodes are spending up to 98% of CPU in 
 org.apache.cassandra.db.marshal.AbstractCompositeType.compare(AbstractCompositeType.java:78).
  I will attach a thread dump.
 Thi is causing us quite a headache, because we're unable to figure what would 
 be causing this. We tried tuning several configuration settings (column cache 
 size, row key cache size), but the cluster exhibits the same issues even with 
 the default configuration (except for a modified num_tokens and 
 listen_address).

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


[jira] [Created] (CASSANDRA-5762) Lost row marker after TTL expires

2013-07-15 Thread Taner Catakli (JIRA)
Taner Catakli created CASSANDRA-5762:


 Summary: Lost row marker after TTL expires
 Key: CASSANDRA-5762
 URL: https://issues.apache.org/jira/browse/CASSANDRA-5762
 Project: Cassandra
  Issue Type: Bug
Affects Versions: 1.2.6
 Environment: Ubuntu 12.04
Reporter: Taner Catakli
Priority: Critical


I have the following table

cqlsh:loginproject DESCRIBE TABLE gameservers;
 
CREATE TABLE gameservers (
  address inet PRIMARY KEY,
  last_update timestamp,
  regions blob,
  server_status boolean
) WITH
  bloom_filter_fp_chance=0.01 AND
  caching='KEYS_ONLY' AND
  comment='' AND
  dclocal_read_repair_chance=0.00 AND
  gc_grace_seconds=864000 AND
  read_repair_chance=0.10 AND
  replicate_on_write='true' AND
  populate_io_cache_on_flush='false' AND
  compaction={'class': 'SizeTieredCompactionStrategy'} AND
  compression={'sstable_compression': 'SnappyCompressor'};



after inserting a row and executing the following command:
UPDATE gameservers USING TTL 10 SET server_status = true WHERE address = 
'192.168.0.100'

after waiting for the ttl to expire, the row will lose its rowmarker making 
select address from gameservers returning 0 results although there are some.

in cassandra-cli the table looks like this:
[default@loginproject] list gameservers;
Using default limit of 100
Using default cell limit of 100
---
RowKey: 192.168.0.100
= (name=last_update, value=0017, timestamp=1373884433543000)
= (name=regions, value=truncated, timestamp=1373883701652000)

1 Row Returned.
Elapsed time: 345 msec(s).
[default@loginproject]




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


[jira] [Assigned] (CASSANDRA-5757) assertionError in repair

2013-07-15 Thread Sylvain Lebresne (JIRA)

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

Sylvain Lebresne reassigned CASSANDRA-5757:
---

Assignee: Sylvain Lebresne

 assertionError in repair
 

 Key: CASSANDRA-5757
 URL: https://issues.apache.org/jira/browse/CASSANDRA-5757
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Affects Versions: 2.0 beta 1
Reporter: Radim Kolar
Assignee: Sylvain Lebresne

 i increased replication factor and run repair, some token ranges were 
 repaired okay, but one failed with:
  INFO 13:03:52,234 [repair #dd7937a0-ebab-11e2-ba07-c38e7fba9d51] session 
 completed successfully
 ERROR 13:03:52,343 Exception in thread Thread[ValidationExecutor:2,1,main]
 java.lang.AssertionError: (max(9099058114996150811),max(-5486100704702537010)]
 at org.apache.cassandra.db.DataRange.init(DataRange.java:50)
 at org.apache.cassandra.db.DataRange.forKeyRange(DataRange.java:74)
 at 
 org.apache.cassandra.io.sstable.SSTableReader.getScanner(SSTableReade
 r.java:1033)
 at 
 org.apache.cassandra.db.compaction.AbstractCompactionStrategy.getScan
 ners(AbstractCompactionStrategy.java:214)
 at 
 org.apache.cassandra.db.compaction.CompactionManager$ValidationCompac
 tionIterable.init(CompactionManager.java:751)
 at 
 org.apache.cassandra.db.compaction.CompactionManager.doValidationComp
 action(CompactionManager.java:657)

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


[jira] [Assigned] (CASSANDRA-5762) Lost row marker after TTL expires

2013-07-15 Thread Sylvain Lebresne (JIRA)

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

Sylvain Lebresne reassigned CASSANDRA-5762:
---

Assignee: Sylvain Lebresne

 Lost row marker after TTL expires
 -

 Key: CASSANDRA-5762
 URL: https://issues.apache.org/jira/browse/CASSANDRA-5762
 Project: Cassandra
  Issue Type: Bug
Affects Versions: 1.2.6
 Environment: Ubuntu 12.04
Reporter: Taner Catakli
Assignee: Sylvain Lebresne
Priority: Critical

 I have the following table
 cqlsh:loginproject DESCRIBE TABLE gameservers;
  
 CREATE TABLE gameservers (
   address inet PRIMARY KEY,
   last_update timestamp,
   regions blob,
   server_status boolean
 ) WITH
   bloom_filter_fp_chance=0.01 AND
   caching='KEYS_ONLY' AND
   comment='' AND
   dclocal_read_repair_chance=0.00 AND
   gc_grace_seconds=864000 AND
   read_repair_chance=0.10 AND
   replicate_on_write='true' AND
   populate_io_cache_on_flush='false' AND
   compaction={'class': 'SizeTieredCompactionStrategy'} AND
   compression={'sstable_compression': 'SnappyCompressor'};
 after inserting a row and executing the following command:
 UPDATE gameservers USING TTL 10 SET server_status = true WHERE address = 
 '192.168.0.100'
 after waiting for the ttl to expire, the row will lose its rowmarker making 
 select address from gameservers returning 0 results although there are some.
 in cassandra-cli the table looks like this:
 [default@loginproject] list gameservers;
 Using default limit of 100
 Using default cell limit of 100
 ---
 RowKey: 192.168.0.100
 = (name=last_update, value=0017, timestamp=1373884433543000)
 = (name=regions, value=truncated, timestamp=1373883701652000)
 1 Row Returned.
 Elapsed time: 345 msec(s).
 [default@loginproject]

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


[jira] [Commented] (CASSANDRA-5762) Lost row marker after TTL expires

2013-07-15 Thread Sylvain Lebresne (JIRA)

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

Sylvain Lebresne commented on CASSANDRA-5762:
-

This is a rather annoying problem. To sum it up, if you TTL one column, the row 
marker is ttled too, because we have no way to know that this is not the last 
live column in that CQL3 row, but then if there was other non-ttled columns, 
they will survive the death of the row marker which breaks the invariant that a 
live row always has a row marker.

Tbh, I have a hard time coming with a way to fix this. And so the only 
workaround that comes to mind would be disallow setting a TTL on an individual 
columns. That is, you'd have to update all columns of the row to be able to use 
a TTL, which I hate because 1) it'll look random syntax wise and 2) I'm 
convinced that being able to TTL individual columns in a row is useful.

 Lost row marker after TTL expires
 -

 Key: CASSANDRA-5762
 URL: https://issues.apache.org/jira/browse/CASSANDRA-5762
 Project: Cassandra
  Issue Type: Bug
Affects Versions: 1.2.6
 Environment: Ubuntu 12.04
Reporter: Taner Catakli
Assignee: Sylvain Lebresne
Priority: Critical

 I have the following table
 cqlsh:loginproject DESCRIBE TABLE gameservers;
  
 CREATE TABLE gameservers (
   address inet PRIMARY KEY,
   last_update timestamp,
   regions blob,
   server_status boolean
 ) WITH
   bloom_filter_fp_chance=0.01 AND
   caching='KEYS_ONLY' AND
   comment='' AND
   dclocal_read_repair_chance=0.00 AND
   gc_grace_seconds=864000 AND
   read_repair_chance=0.10 AND
   replicate_on_write='true' AND
   populate_io_cache_on_flush='false' AND
   compaction={'class': 'SizeTieredCompactionStrategy'} AND
   compression={'sstable_compression': 'SnappyCompressor'};
 after inserting a row and executing the following command:
 UPDATE gameservers USING TTL 10 SET server_status = true WHERE address = 
 '192.168.0.100'
 after waiting for the ttl to expire, the row will lose its rowmarker making 
 select address from gameservers returning 0 results although there are some.
 in cassandra-cli the table looks like this:
 [default@loginproject] list gameservers;
 Using default limit of 100
 Using default cell limit of 100
 ---
 RowKey: 192.168.0.100
 = (name=last_update, value=0017, timestamp=1373884433543000)
 = (name=regions, value=truncated, timestamp=1373883701652000)
 1 Row Returned.
 Elapsed time: 345 msec(s).
 [default@loginproject]

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


[jira] [Commented] (CASSANDRA-5760) cqlsh DESCRIBE should properly describe CUSTOM secondary indexes

2013-07-15 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis commented on CASSANDRA-5760:
---

+1

 cqlsh DESCRIBE should properly describe CUSTOM secondary indexes
 

 Key: CASSANDRA-5760
 URL: https://issues.apache.org/jira/browse/CASSANDRA-5760
 Project: Cassandra
  Issue Type: Bug
Affects Versions: 1.2.6
Reporter: Aleksey Yeschenko
Assignee: Aleksey Yeschenko
Priority: Minor
  Labels: cqlsh, describe
 Fix For: 1.2.7

 Attachments: 5760.txt


 CASSANDRA-5484 and then CASSANDRA-5639 added CREATE CUSTOM INDEX support to 
 CQL3, but cqlsh hasn't been updated to describe such indexes properly.

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


git commit: cqlsh: handle CUSTOM 2i in DESCRIBE output

2013-07-15 Thread aleksey
Updated Branches:
  refs/heads/cassandra-1.2 f5b224cf9 - f79a2d3a6


cqlsh: handle CUSTOM 2i in DESCRIBE output

patch by Aleksey Yeschenko; reviewed by Jonathan Ellis for
CASSANDRA-5760


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

Branch: refs/heads/cassandra-1.2
Commit: f79a2d3a6f982c25ecf79010a6e1d9b538462600
Parents: f5b224c
Author: Aleksey Yeschenko alek...@apache.org
Authored: Mon Jul 15 18:35:33 2013 +0300
Committer: Aleksey Yeschenko alek...@apache.org
Committed: Mon Jul 15 18:35:33 2013 +0300

--
 CHANGES.txt|  1 +
 bin/cqlsh  | 14 ++
 pylib/cqlshlib/cql3handling.py |  5 +
 3 files changed, 16 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/f79a2d3a/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 0253d13..5cec576 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -14,6 +14,7 @@
  * Expose native protocol server status in nodetool info (CASSANDRA-5735)
  * Fix pathetic performance of range tombstones (CASSANDRA-5677)
  * Fix querying with an empty (impossible) range (CASSANDRA-5573)
+ * cqlsh: handle CUSTOM 2i in DESCRIBE output (CASSANDRA-5760)
 
 
 1.2.6

http://git-wip-us.apache.org/repos/asf/cassandra/blob/f79a2d3a/bin/cqlsh
--
diff --git a/bin/cqlsh b/bin/cqlsh
index 999d1d1..62b5500 100755
--- a/bin/cqlsh
+++ b/bin/cqlsh
@@ -32,7 +32,7 @@ exit 1
 from __future__ import with_statement
 
 description = CQL Shell for Apache Cassandra
-version = 3.1.2
+version = 3.1.3
 
 from StringIO import StringIO
 from itertools import groupby
@@ -1447,9 +1447,15 @@ class Shell(cmd.Cmd):
 
 for col in indexed_columns:
 out.write('\n')
-# guess CQL can't represent index_type or index_options
-out.write('CREATE INDEX %s ON %s (%s);\n'
- % (col.index_name, cfname, 
self.cql_protect_name(col.name)))
+if col.index_type != 'CUSTOM':
+out.write('CREATE INDEX %s ON %s (%s);\n'
+ % (col.index_name, cfname, 
self.cql_protect_name(col.name)))
+else:
+out.write(CREATE CUSTOM INDEX %s ON %s (%s) USING '%s';\n
+ % (col.index_name,
+cfname,
+self.cql_protect_name(col.name),
+col.index_options[u'class_name']))
 
 def describe_keyspaces(self):
 print

http://git-wip-us.apache.org/repos/asf/cassandra/blob/f79a2d3a/pylib/cqlshlib/cql3handling.py
--
diff --git a/pylib/cqlshlib/cql3handling.py b/pylib/cqlshlib/cql3handling.py
index 92701d6..c83c94d 100644
--- a/pylib/cqlshlib/cql3handling.py
+++ b/pylib/cqlshlib/cql3handling.py
@@ -1395,6 +1395,8 @@ CqlRuleSet.append_rules(syntax_rules)
 
 class CqlColumnDef:
 index_name = None
+index_type = None
+index_options = {}
 
 def __init__(self, name, cqltype):
 self.name = name
@@ -1409,6 +1411,9 @@ class CqlColumnDef:
 colname = layout[u'column']
 c = cls(colname, lookup_casstype(layout[u'validator']))
 c.index_name = layout[u'index_name']
+c.index_type = layout[u'index_type']
+if c.index_type == 'CUSTOM':
+c.index_options = json.loads(layout[u'index_options'])
 return c
 
 def __str__(self):



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

2013-07-15 Thread aleksey
Merge branch 'cassandra-1.2' into trunk

Conflicts:
bin/cqlsh


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

Branch: refs/heads/trunk
Commit: 3828cc519593af38b1f5a022b57109dcc28c7d52
Parents: 62b9034 f79a2d3
Author: Aleksey Yeschenko alek...@apache.org
Authored: Mon Jul 15 18:38:16 2013 +0300
Committer: Aleksey Yeschenko alek...@apache.org
Committed: Mon Jul 15 18:38:16 2013 +0300

--
 CHANGES.txt|  1 +
 bin/cqlsh  | 12 +---
 pylib/cqlshlib/cql3handling.py |  5 +
 3 files changed, 15 insertions(+), 3 deletions(-)
--


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

http://git-wip-us.apache.org/repos/asf/cassandra/blob/3828cc51/bin/cqlsh
--

http://git-wip-us.apache.org/repos/asf/cassandra/blob/3828cc51/pylib/cqlshlib/cql3handling.py
--



[1/2] git commit: cqlsh: handle CUSTOM 2i in DESCRIBE output

2013-07-15 Thread aleksey
Updated Branches:
  refs/heads/trunk 62b90340d - 3828cc519


cqlsh: handle CUSTOM 2i in DESCRIBE output

patch by Aleksey Yeschenko; reviewed by Jonathan Ellis for
CASSANDRA-5760


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

Branch: refs/heads/trunk
Commit: f79a2d3a6f982c25ecf79010a6e1d9b538462600
Parents: f5b224c
Author: Aleksey Yeschenko alek...@apache.org
Authored: Mon Jul 15 18:35:33 2013 +0300
Committer: Aleksey Yeschenko alek...@apache.org
Committed: Mon Jul 15 18:35:33 2013 +0300

--
 CHANGES.txt|  1 +
 bin/cqlsh  | 14 ++
 pylib/cqlshlib/cql3handling.py |  5 +
 3 files changed, 16 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/f79a2d3a/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 0253d13..5cec576 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -14,6 +14,7 @@
  * Expose native protocol server status in nodetool info (CASSANDRA-5735)
  * Fix pathetic performance of range tombstones (CASSANDRA-5677)
  * Fix querying with an empty (impossible) range (CASSANDRA-5573)
+ * cqlsh: handle CUSTOM 2i in DESCRIBE output (CASSANDRA-5760)
 
 
 1.2.6

http://git-wip-us.apache.org/repos/asf/cassandra/blob/f79a2d3a/bin/cqlsh
--
diff --git a/bin/cqlsh b/bin/cqlsh
index 999d1d1..62b5500 100755
--- a/bin/cqlsh
+++ b/bin/cqlsh
@@ -32,7 +32,7 @@ exit 1
 from __future__ import with_statement
 
 description = CQL Shell for Apache Cassandra
-version = 3.1.2
+version = 3.1.3
 
 from StringIO import StringIO
 from itertools import groupby
@@ -1447,9 +1447,15 @@ class Shell(cmd.Cmd):
 
 for col in indexed_columns:
 out.write('\n')
-# guess CQL can't represent index_type or index_options
-out.write('CREATE INDEX %s ON %s (%s);\n'
- % (col.index_name, cfname, 
self.cql_protect_name(col.name)))
+if col.index_type != 'CUSTOM':
+out.write('CREATE INDEX %s ON %s (%s);\n'
+ % (col.index_name, cfname, 
self.cql_protect_name(col.name)))
+else:
+out.write(CREATE CUSTOM INDEX %s ON %s (%s) USING '%s';\n
+ % (col.index_name,
+cfname,
+self.cql_protect_name(col.name),
+col.index_options[u'class_name']))
 
 def describe_keyspaces(self):
 print

http://git-wip-us.apache.org/repos/asf/cassandra/blob/f79a2d3a/pylib/cqlshlib/cql3handling.py
--
diff --git a/pylib/cqlshlib/cql3handling.py b/pylib/cqlshlib/cql3handling.py
index 92701d6..c83c94d 100644
--- a/pylib/cqlshlib/cql3handling.py
+++ b/pylib/cqlshlib/cql3handling.py
@@ -1395,6 +1395,8 @@ CqlRuleSet.append_rules(syntax_rules)
 
 class CqlColumnDef:
 index_name = None
+index_type = None
+index_options = {}
 
 def __init__(self, name, cqltype):
 self.name = name
@@ -1409,6 +1411,9 @@ class CqlColumnDef:
 colname = layout[u'column']
 c = cls(colname, lookup_casstype(layout[u'validator']))
 c.index_name = layout[u'index_name']
+c.index_type = layout[u'index_type']
+if c.index_type == 'CUSTOM':
+c.index_options = json.loads(layout[u'index_options'])
 return c
 
 def __str__(self):



[jira] [Created] (CASSANDRA-5763) CqlPagingRecordReader should quote table and column identifiers

2013-07-15 Thread JIRA
Piotr Kołaczkowski created CASSANDRA-5763:
-

 Summary: CqlPagingRecordReader should quote table and column 
identifiers
 Key: CASSANDRA-5763
 URL: https://issues.apache.org/jira/browse/CASSANDRA-5763
 Project: Cassandra
  Issue Type: Bug
  Components: Hadoop
Affects Versions: 1.2.6
Reporter: Piotr Kołaczkowski
Assignee: Piotr Kołaczkowski
Priority: Minor


Using CPIF on table with uppercase name or with uppercase column names doesn't 
work (unconfigured table message).

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


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

2013-07-15 Thread Brandon Williams (JIRA)

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

Brandon Williams updated CASSANDRA-5701:


Labels:   (was: patch)

 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
   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 is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


git commit: Kill the remains of old cf ids in CFMetaData

2013-07-15 Thread aleksey
Updated Branches:
  refs/heads/trunk 3828cc519 - 40cf7b00f


Kill the remains of old cf ids in CFMetaData


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

Branch: refs/heads/trunk
Commit: 40cf7b00f892d757235d23cedb785aaf45331d90
Parents: 3828cc5
Author: Aleksey Yeschenko alek...@apache.org
Authored: Mon Jul 15 19:37:56 2013 +0300
Committer: Aleksey Yeschenko alek...@apache.org
Committed: Mon Jul 15 19:37:56 2013 +0300

--
 .../org/apache/cassandra/config/CFMetaData.java | 184 +--
 .../cassandra/config/ColumnDefinition.java  |   2 +-
 .../org/apache/cassandra/config/KSMetaData.java |   2 +-
 .../apache/cassandra/config/TriggerOptions.java |   6 +-
 4 files changed, 91 insertions(+), 103 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/40cf7b00/src/java/org/apache/cassandra/config/CFMetaData.java
--
diff --git a/src/java/org/apache/cassandra/config/CFMetaData.java 
b/src/java/org/apache/cassandra/config/CFMetaData.java
index 5639292..3611986 100644
--- a/src/java/org/apache/cassandra/config/CFMetaData.java
+++ b/src/java/org/apache/cassandra/config/CFMetaData.java
@@ -91,81 +91,80 @@ public final class CFMetaData
 // Note that this is the default only for user created tables
 public final static String DEFAULT_COMPRESSOR = 
LZ4Compressor.class.getCanonicalName();
 
-public static final CFMetaData IndexCf = compile(5, CREATE TABLE \ + 
SystemKeyspace.INDEX_CF + \ (
-+ table_name text,
-+ index_name text,
-+ PRIMARY KEY 
(table_name, index_name)
-+ ) WITH COMPACT 
STORAGE AND COMMENT='indexes that have been completed');
-
-public static final CFMetaData CounterIdCf = compile(6, CREATE TABLE \ 
+ SystemKeyspace.COUNTER_ID_CF + \ (
-+ key text,
-+ id timeuuid,
-+ PRIMARY KEY 
(key, id)
-+ ) WITH COMPACT 
STORAGE AND COMMENT='counter node IDs');
-
-// new-style schema
-public static final CFMetaData SchemaKeyspacesCf = compile(8, CREATE 
TABLE  + SystemKeyspace.SCHEMA_KEYSPACES_CF + (
-  + 
keyspace_name text PRIMARY KEY,
-  + 
durable_writes boolean,
-  + 
strategy_class text,
-  + 
strategy_options text
-  + ) WITH 
COMPACT STORAGE AND COMMENT='keyspace definitions' AND gc_grace_seconds=8640);
-
-public static final CFMetaData SchemaColumnFamiliesCf = compile(9, CREATE 
TABLE  + SystemKeyspace.SCHEMA_COLUMNFAMILIES_CF + (
-   + 
keyspace_name text,
-   + 
columnfamily_name text,
-   + type 
text,
-   + 
comparator text,
-   + 
subcomparator text,
-   + 
comment text,
-   + 
read_repair_chance double,
-   + 
local_read_repair_chance double,
-   + 
replicate_on_write boolean,
-   + 
gc_grace_seconds int,
-   + 
default_validator text,
-   + 
key_validator text,
-   + 
min_compaction_threshold int,
-   + 
max_compaction_threshold int,
-   + 

[jira] [Updated] (CASSANDRA-5763) CqlPagingRecordReader should quote table and column identifiers

2013-07-15 Thread JIRA

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

Piotr Kołaczkowski updated CASSANDRA-5763:
--

Attachment: 0001-DSP-2292-CPIF-quotes-table-and-column-names-in-gener.patch

 CqlPagingRecordReader should quote table and column identifiers
 ---

 Key: CASSANDRA-5763
 URL: https://issues.apache.org/jira/browse/CASSANDRA-5763
 Project: Cassandra
  Issue Type: Bug
  Components: Hadoop
Affects Versions: 1.2.6
Reporter: Piotr Kołaczkowski
Assignee: Piotr Kołaczkowski
Priority: Minor
 Attachments: 
 0001-DSP-2292-CPIF-quotes-table-and-column-names-in-gener.patch


 Using CPIF on table with uppercase name or with uppercase column names 
 doesn't work (unconfigured table message).

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


[jira] [Commented] (CASSANDRA-5763) CqlPagingRecordReader should quote table and column identifiers

2013-07-15 Thread JIRA

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

Piotr Kołaczkowski commented on CASSANDRA-5763:
---

Related DSE issue: https://datastax.jira.com/browse/DSP-2292

 CqlPagingRecordReader should quote table and column identifiers
 ---

 Key: CASSANDRA-5763
 URL: https://issues.apache.org/jira/browse/CASSANDRA-5763
 Project: Cassandra
  Issue Type: Bug
  Components: Hadoop
Affects Versions: 1.2.6
Reporter: Piotr Kołaczkowski
Assignee: Piotr Kołaczkowski
Priority: Minor
 Attachments: 
 0001-DSP-2292-CPIF-quotes-table-and-column-names-in-gener.patch


 Using CPIF on table with uppercase name or with uppercase column names 
 doesn't work (unconfigured table message).

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


[jira] [Updated] (CASSANDRA-5762) Lost row marker after TTL expires

2013-07-15 Thread Sylvain Lebresne (JIRA)

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

Sylvain Lebresne updated CASSANDRA-5762:


Affects Version/s: (was: 1.2.6)
   1.2.0

 Lost row marker after TTL expires
 -

 Key: CASSANDRA-5762
 URL: https://issues.apache.org/jira/browse/CASSANDRA-5762
 Project: Cassandra
  Issue Type: Bug
Affects Versions: 1.2.0
 Environment: Ubuntu 12.04
Reporter: Taner Catakli
Assignee: Sylvain Lebresne
Priority: Critical

 I have the following table
 cqlsh:loginproject DESCRIBE TABLE gameservers;
  
 CREATE TABLE gameservers (
   address inet PRIMARY KEY,
   last_update timestamp,
   regions blob,
   server_status boolean
 ) WITH
   bloom_filter_fp_chance=0.01 AND
   caching='KEYS_ONLY' AND
   comment='' AND
   dclocal_read_repair_chance=0.00 AND
   gc_grace_seconds=864000 AND
   read_repair_chance=0.10 AND
   replicate_on_write='true' AND
   populate_io_cache_on_flush='false' AND
   compaction={'class': 'SizeTieredCompactionStrategy'} AND
   compression={'sstable_compression': 'SnappyCompressor'};
 after inserting a row and executing the following command:
 UPDATE gameservers USING TTL 10 SET server_status = true WHERE address = 
 '192.168.0.100'
 after waiting for the ttl to expire, the row will lose its rowmarker making 
 select address from gameservers returning 0 results although there are some.
 in cassandra-cli the table looks like this:
 [default@loginproject] list gameservers;
 Using default limit of 100
 Using default cell limit of 100
 ---
 RowKey: 192.168.0.100
 = (name=last_update, value=0017, timestamp=1373884433543000)
 = (name=regions, value=truncated, timestamp=1373883701652000)
 1 Row Returned.
 Elapsed time: 345 msec(s).
 [default@loginproject]

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


[jira] [Updated] (CASSANDRA-5757) assertionError in repair

2013-07-15 Thread Sylvain Lebresne (JIRA)

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

Sylvain Lebresne updated CASSANDRA-5757:


Attachment: 5757.txt

The actual AssertionError is due to basically a misplaced assertion.  
DataRange.Paging don't really support wrapping ranges but is only used in 
getRangeSlice which unwraps ranges first anyway.  However repair does use 
wrapping range so DataRange itself should allow wrapping ranges.

So fixing that is trivial, but this uncover the fact that SSTableScanner is 
broken on trunk if the range is wrapping. For the records, it has initially 
been broken by CASSANDRA-4180 (after this patch, for a wrapping range, only the 
part between the start of the range and then end of ring/file was returned by 
the scanner). CASSANDRA-4415 introduced DataRange but didn't really changed the 
logic there so the bug persisted.

Attaching a patch that move the assert and fix SSTableScanner to handle 
wrapping ranges correctly.


 assertionError in repair
 

 Key: CASSANDRA-5757
 URL: https://issues.apache.org/jira/browse/CASSANDRA-5757
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Affects Versions: 2.0 beta 1
Reporter: Radim Kolar
Assignee: Sylvain Lebresne
 Attachments: 5757.txt


 i increased replication factor and run repair, some token ranges were 
 repaired okay, but one failed with:
  INFO 13:03:52,234 [repair #dd7937a0-ebab-11e2-ba07-c38e7fba9d51] session 
 completed successfully
 ERROR 13:03:52,343 Exception in thread Thread[ValidationExecutor:2,1,main]
 java.lang.AssertionError: (max(9099058114996150811),max(-5486100704702537010)]
 at org.apache.cassandra.db.DataRange.init(DataRange.java:50)
 at org.apache.cassandra.db.DataRange.forKeyRange(DataRange.java:74)
 at 
 org.apache.cassandra.io.sstable.SSTableReader.getScanner(SSTableReade
 r.java:1033)
 at 
 org.apache.cassandra.db.compaction.AbstractCompactionStrategy.getScan
 ners(AbstractCompactionStrategy.java:214)
 at 
 org.apache.cassandra.db.compaction.CompactionManager$ValidationCompac
 tionIterable.init(CompactionManager.java:751)
 at 
 org.apache.cassandra.db.compaction.CompactionManager.doValidationComp
 action(CompactionManager.java:657)

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


[jira] [Commented] (CASSANDRA-5727) Evaluate default LCS sstable size

2013-07-15 Thread Robert Coli (JIRA)

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

Robert Coli commented on CASSANDRA-5727:


Anecdotally, many people on @cassandra-user/#cassandra have been bitten by the 
current 5mb size. The types of negative experiences they have seem to relate to 
too many SSTables for small or medium data sizes. Even a relatively naive 
doubling of this default to 10mb seems likely to be a win for most of these 
users.

 Evaluate default LCS sstable size
 -

 Key: CASSANDRA-5727
 URL: https://issues.apache.org/jira/browse/CASSANDRA-5727
 Project: Cassandra
  Issue Type: Task
  Components: Core
Reporter: Jonathan Ellis
Assignee: Daniel Meyer

 What we're not sure about is the effect on compaction efficiency --
 larger files mean that each level contains more data, so reads will
 have to touch less sstables, but we're also compacting less unchanged
 data when we merge forward.
 So the question is, how big can we make the sstables to get the benefits of 
 the
 first effect, before the second effect starts to dominate?

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


[jira] [Updated] (CASSANDRA-5763) CqlPagingRecordReader should quote table and column identifiers

2013-07-15 Thread JIRA

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

Piotr Kołaczkowski updated CASSANDRA-5763:
--

Attachment: (was: 
0001-DSP-2292-CPIF-quotes-table-and-column-names-in-gener.patch)

 CqlPagingRecordReader should quote table and column identifiers
 ---

 Key: CASSANDRA-5763
 URL: https://issues.apache.org/jira/browse/CASSANDRA-5763
 Project: Cassandra
  Issue Type: Bug
  Components: Hadoop
Affects Versions: 1.2.6
Reporter: Piotr Kołaczkowski
Assignee: Piotr Kołaczkowski
Priority: Minor

 Using CPIF on table with uppercase name or with uppercase column names 
 doesn't work (unconfigured table message).

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


[jira] [Updated] (CASSANDRA-5763) CqlPagingRecordReader should quote table and column identifiers

2013-07-15 Thread JIRA

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

Piotr Kołaczkowski updated CASSANDRA-5763:
--

Attachment: DSP-2292.patch

 CqlPagingRecordReader should quote table and column identifiers
 ---

 Key: CASSANDRA-5763
 URL: https://issues.apache.org/jira/browse/CASSANDRA-5763
 Project: Cassandra
  Issue Type: Bug
  Components: Hadoop
Affects Versions: 1.2.6
Reporter: Piotr Kołaczkowski
Assignee: Piotr Kołaczkowski
Priority: Minor
 Attachments: DSP-2292.patch


 Using CPIF on table with uppercase name or with uppercase column names 
 doesn't work (unconfigured table message).

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


[jira] [Updated] (CASSANDRA-5337) vnode-aware replacenode command

2013-07-15 Thread Jason Brown (JIRA)

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

Jason Brown updated CASSANDRA-5337:
---

Reviewer: jasobrown  (was: vijay2...@yahoo.com)

 vnode-aware replacenode command
 ---

 Key: CASSANDRA-5337
 URL: https://issues.apache.org/jira/browse/CASSANDRA-5337
 Project: Cassandra
  Issue Type: New Feature
  Components: Core
Affects Versions: 1.2.0
Reporter: Jonathan Ellis
Assignee: Brandon Williams
  Labels: vnodes
 Fix For: 1.2.7, 2.0

 Attachments: 5337.txt


 Currently you have the following options to replace a dead, unrecoverable 
 node:
 - replacetoken.  this requires specifying all 256 or so vnode tokens as a CSL
 - bootstrap new node, decommission old one.  this is inefficient since the 
 new node's vnodes will probably not overlap much with the old one's, so we 
 replicate stream about 2x as much as if we were just replacing the old with 
 the new
 We should add an analogue to replacetoken that takes the address or node ID 
 of the dead node instead.

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


[jira] [Commented] (CASSANDRA-5337) vnode-aware replacenode command

2013-07-15 Thread Jason Brown (JIRA)

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

Jason Brown commented on CASSANDRA-5337:


lgtm.

The only (very minor) suggestion I'd make is maybe create a method like this on 
DD

{code}public static boolean isReplacing() 
{
   return 0 != getReplaceTokens().size() || getReplaceNode() != null
}{code}

That way you avoid having to copy that dual condition check in SS. Otherwise, 
ship it!

 vnode-aware replacenode command
 ---

 Key: CASSANDRA-5337
 URL: https://issues.apache.org/jira/browse/CASSANDRA-5337
 Project: Cassandra
  Issue Type: New Feature
  Components: Core
Affects Versions: 1.2.0
Reporter: Jonathan Ellis
Assignee: Brandon Williams
  Labels: vnodes
 Fix For: 1.2.7, 2.0

 Attachments: 5337.txt


 Currently you have the following options to replace a dead, unrecoverable 
 node:
 - replacetoken.  this requires specifying all 256 or so vnode tokens as a CSL
 - bootstrap new node, decommission old one.  this is inefficient since the 
 new node's vnodes will probably not overlap much with the old one's, so we 
 replicate stream about 2x as much as if we were just replacing the old with 
 the new
 We should add an analogue to replacetoken that takes the address or node ID 
 of the dead node instead.

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


[jira] [Assigned] (CASSANDRA-5689) NPE shutting down Cassandra trunk (cassandra-1.2.5-989-g70dfb70)

2013-07-15 Thread Cathy Daw (JIRA)

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

Cathy Daw reassigned CASSANDRA-5689:


Assignee: Cathy Daw  (was: Alex Zarutin)

 NPE shutting down Cassandra trunk (cassandra-1.2.5-989-g70dfb70)
 

 Key: CASSANDRA-5689
 URL: https://issues.apache.org/jira/browse/CASSANDRA-5689
 Project: Cassandra
  Issue Type: Bug
  Components: API
Affects Versions: 1.2.0
 Environment: Ubuntu Precise with Oracle Java 7u25.
Reporter: Blair Zajac
Assignee: Cathy Daw
Priority: Trivial
 Attachments: CASSANDRA-5689.txt, init1, init2, init3


 I built Cassandra from git trunk at cassandra-1.2.5-989-g70dfb70 using the 
 debian/ package.  I have a shell script to shut down Cassandra:
 {code}
   $nodetool disablegossip
   sleep 5
   $nodetool disablebinary
   $nodetool disablethrift
   $nodetool drain
   /etc/init.d/cassandra stop
 {code}
 Shutting it down I get this exception on all three nodes:
 {code}
 Exception in thread main java.lang.NullPointerException
   at org.apache.cassandra.transport.Server.close(Server.java:156)
   at org.apache.cassandra.transport.Server.stop(Server.java:107)
   at 
 org.apache.cassandra.service.StorageService.stopNativeTransport(StorageService.java:347)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at 
 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
   at 
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   at java.lang.reflect.Method.invoke(Method.java:606)
   at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:75)
   at sun.reflect.GeneratedMethodAccessor7.invoke(Unknown Source)
   at 
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   at java.lang.reflect.Method.invoke(Method.java:606)
   at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:279)
   at 
 com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:112)
   at 
 com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:46)
   at 
 com.sun.jmx.mbeanserver.MBeanIntrospector.invokeM(MBeanIntrospector.java:237)
   at com.sun.jmx.mbeanserver.PerInterface.invoke(PerInterface.java:138)
   at com.sun.jmx.mbeanserver.MBeanSupport.invoke(MBeanSupport.java:252)
   at 
 com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)
   at 
 com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)
   at 
 com.sun.jmx.remote.security.MBeanServerAccessController.invoke(MBeanServerAccessController.java:468)
   at 
 javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1487)
   at 
 javax.management.remote.rmi.RMIConnectionImpl.access$300(RMIConnectionImpl.java:97)
   at 
 javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1328)
   at java.security.AccessController.doPrivileged(Native Method)
   at 
 javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1427)
   at 
 javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:848)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at 
 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
   at 
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   at java.lang.reflect.Method.invoke(Method.java:606)
   at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:322)
   at sun.rmi.transport.Transport$1.run(Transport.java:177)
   at sun.rmi.transport.Transport$1.run(Transport.java:174)
   at java.security.AccessController.doPrivileged(Native Method)
   at sun.rmi.transport.Transport.serviceCall(Transport.java:173)
   at 
 sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:553)
   at 
 sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:808)
   at 
 sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:667)
   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)
 {code}

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


[jira] [Assigned] (CASSANDRA-5695) Convert pig smoke tests into real PigUnit tests

2013-07-15 Thread Cathy Daw (JIRA)

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

Cathy Daw reassigned CASSANDRA-5695:


Assignee: Alex Zarutin  (was: Ryan McGuire)

 Convert pig smoke tests into real PigUnit tests
 ---

 Key: CASSANDRA-5695
 URL: https://issues.apache.org/jira/browse/CASSANDRA-5695
 Project: Cassandra
  Issue Type: Test
  Components: Hadoop
Reporter: Brandon Williams
Assignee: Alex Zarutin
Priority: Minor
 Fix For: 1.2.7


 Currently, we have some ghetto pig tests in examples/pig/test, but there's 
 currently no way to continuously integrate these since a human needs to check 
 that the output isn't wrong, not just that the tests ran successfully.  We've 
 had garbled output problems in the past, so it would be nice to formalize our 
 tests to catch this.  PigUnit appears to be a good choice for this.

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


[jira] [Updated] (CASSANDRA-5337) vnode-aware replacenode command

2013-07-15 Thread Brandon Williams (JIRA)

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

Brandon Williams updated CASSANDRA-5337:


Attachment: 5337-v2.txt

Good idea, v2 incorporates it and adds a minor cleanup.

 vnode-aware replacenode command
 ---

 Key: CASSANDRA-5337
 URL: https://issues.apache.org/jira/browse/CASSANDRA-5337
 Project: Cassandra
  Issue Type: New Feature
  Components: Core
Affects Versions: 1.2.0
Reporter: Jonathan Ellis
Assignee: Brandon Williams
  Labels: vnodes
 Fix For: 1.2.7, 2.0

 Attachments: 5337.txt, 5337-v2.txt


 Currently you have the following options to replace a dead, unrecoverable 
 node:
 - replacetoken.  this requires specifying all 256 or so vnode tokens as a CSL
 - bootstrap new node, decommission old one.  this is inefficient since the 
 new node's vnodes will probably not overlap much with the old one's, so we 
 replicate stream about 2x as much as if we were just replacing the old with 
 the new
 We should add an analogue to replacetoken that takes the address or node ID 
 of the dead node instead.

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


[jira] [Commented] (CASSANDRA-5337) vnode-aware replacenode command

2013-07-15 Thread Jason Brown (JIRA)

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

Jason Brown commented on CASSANDRA-5337:


v2 lgtm.

 vnode-aware replacenode command
 ---

 Key: CASSANDRA-5337
 URL: https://issues.apache.org/jira/browse/CASSANDRA-5337
 Project: Cassandra
  Issue Type: New Feature
  Components: Core
Affects Versions: 1.2.0
Reporter: Jonathan Ellis
Assignee: Brandon Williams
  Labels: vnodes
 Fix For: 1.2.7, 2.0

 Attachments: 5337.txt, 5337-v2.txt


 Currently you have the following options to replace a dead, unrecoverable 
 node:
 - replacetoken.  this requires specifying all 256 or so vnode tokens as a CSL
 - bootstrap new node, decommission old one.  this is inefficient since the 
 new node's vnodes will probably not overlap much with the old one's, so we 
 replicate stream about 2x as much as if we were just replacing the old with 
 the new
 We should add an analogue to replacetoken that takes the address or node ID 
 of the dead node instead.

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


[2/3] git commit: Add replace_token functionality for vnodes. Patch by brandonwilliams reviewed by jasobrown for CASSANDRA-5337

2013-07-15 Thread brandonwilliams
Add replace_token functionality for vnodes.
Patch by brandonwilliams reviewed by jasobrown for CASSANDRA-5337


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

Branch: refs/heads/trunk
Commit: ba6396a20c642108447c0c9820e2585ed6f6adb0
Parents: f79a2d3
Author: Brandon Williams brandonwilli...@apache.org
Authored: Mon Jul 15 15:52:45 2013 -0500
Committer: Brandon Williams brandonwilli...@apache.org
Committed: Mon Jul 15 15:52:45 2013 -0500

--
 CHANGES.txt |  1 +
 .../cassandra/config/DatabaseDescriptor.java| 16 
 .../cassandra/service/StorageService.java   | 27 
 3 files changed, 39 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/ba6396a2/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 5cec576..ee277aa 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 1.2.7
+ * Add replace_node functionality for vnodes (CASSANDRA-5337)
  * Add timeout events to query traces (CASSANDRA-5520)
  * make starting native protocol server idempotent (CASSANDRA-5728)
  * Fix loading key cache when a saved entry is no longer valid (CASSANDRA-5706)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/ba6396a2/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
--
diff --git a/src/java/org/apache/cassandra/config/DatabaseDescriptor.java 
b/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
index 941249f..91ae675 100644
--- a/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
+++ b/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
@@ -715,6 +715,22 @@ public class DatabaseDescriptor
 return tokensFromString(System.getProperty(cassandra.replace_token, 
null));
 }
 
+public static UUID getReplaceNode()
+{
+try
+{
+return 
UUID.fromString(System.getProperty(cassandra.replace_node, null));
+} catch (NullPointerException e)
+{
+return null;
+}
+}
+
+public static boolean isReplacing()
+{
+return 0 != getReplaceTokens().size() || getReplaceNode() != null
+}
+
 public static String getClusterName()
 {
 return conf.cluster_name;

http://git-wip-us.apache.org/repos/asf/cassandra/blob/ba6396a2/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 34ecec8..e556306 100644
--- a/src/java/org/apache/cassandra/service/StorageService.java
+++ b/src/java/org/apache/cassandra/service/StorageService.java
@@ -574,7 +574,7 @@ public class StorageService extends 
NotificationBroadcasterSupport implements IE
 appStates.put(ApplicationState.NET_VERSION, 
valueFactory.networkVersion());
 appStates.put(ApplicationState.HOST_ID, 
valueFactory.hostId(SystemTable.getLocalHostId()));
 appStates.put(ApplicationState.RPC_ADDRESS, 
valueFactory.rpcaddress(DatabaseDescriptor.getRpcAddress()));
-if (0 != DatabaseDescriptor.getReplaceTokens().size())
+if (DatabaseDescriptor.isReplacing())
 appStates.put(ApplicationState.STATUS, 
valueFactory.hibernate(true));
 appStates.put(ApplicationState.RELEASE_VERSION, 
valueFactory.releaseVersion());
 Gossiper.instance.register(this);
@@ -655,7 +655,7 @@ public class StorageService extends 
NotificationBroadcasterSupport implements IE
 if (logger.isDebugEnabled())
 logger.debug(... got ring + schema info);
 
-if (DatabaseDescriptor.getReplaceTokens().size() == 0)
+if (DatabaseDescriptor.isReplacing())
 {
 if (tokenMetadata.isMember(FBUtilities.getBroadcastAddress()))
 {
@@ -667,6 +667,8 @@ public class StorageService extends 
NotificationBroadcasterSupport implements IE
 }
 else
 {
+if (DatabaseDescriptor.getReplaceTokens().size() != 0  
DatabaseDescriptor.getReplaceNode() != null)
+throw new UnsupportedOperationException(You cannot 
specify both replace_token and replace_node, choose one or the other);
 try
 {
 // Sleeping additionally to make sure that the server 
actually is not alive
@@ -678,8 +680,19 @@ public class StorageService extends 

[1/3] git commit: Add replace_token functionality for vnodes. Patch by brandonwilliams reviewed by jasobrown for CASSANDRA-5337

2013-07-15 Thread brandonwilliams
Updated Branches:
  refs/heads/cassandra-1.2 f79a2d3a6 - ba6396a20
  refs/heads/trunk 40cf7b00f - 280284961


Add replace_token functionality for vnodes.
Patch by brandonwilliams reviewed by jasobrown for CASSANDRA-5337


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

Branch: refs/heads/cassandra-1.2
Commit: ba6396a20c642108447c0c9820e2585ed6f6adb0
Parents: f79a2d3
Author: Brandon Williams brandonwilli...@apache.org
Authored: Mon Jul 15 15:52:45 2013 -0500
Committer: Brandon Williams brandonwilli...@apache.org
Committed: Mon Jul 15 15:52:45 2013 -0500

--
 CHANGES.txt |  1 +
 .../cassandra/config/DatabaseDescriptor.java| 16 
 .../cassandra/service/StorageService.java   | 27 
 3 files changed, 39 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/ba6396a2/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 5cec576..ee277aa 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 1.2.7
+ * Add replace_node functionality for vnodes (CASSANDRA-5337)
  * Add timeout events to query traces (CASSANDRA-5520)
  * make starting native protocol server idempotent (CASSANDRA-5728)
  * Fix loading key cache when a saved entry is no longer valid (CASSANDRA-5706)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/ba6396a2/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
--
diff --git a/src/java/org/apache/cassandra/config/DatabaseDescriptor.java 
b/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
index 941249f..91ae675 100644
--- a/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
+++ b/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
@@ -715,6 +715,22 @@ public class DatabaseDescriptor
 return tokensFromString(System.getProperty(cassandra.replace_token, 
null));
 }
 
+public static UUID getReplaceNode()
+{
+try
+{
+return 
UUID.fromString(System.getProperty(cassandra.replace_node, null));
+} catch (NullPointerException e)
+{
+return null;
+}
+}
+
+public static boolean isReplacing()
+{
+return 0 != getReplaceTokens().size() || getReplaceNode() != null
+}
+
 public static String getClusterName()
 {
 return conf.cluster_name;

http://git-wip-us.apache.org/repos/asf/cassandra/blob/ba6396a2/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 34ecec8..e556306 100644
--- a/src/java/org/apache/cassandra/service/StorageService.java
+++ b/src/java/org/apache/cassandra/service/StorageService.java
@@ -574,7 +574,7 @@ public class StorageService extends 
NotificationBroadcasterSupport implements IE
 appStates.put(ApplicationState.NET_VERSION, 
valueFactory.networkVersion());
 appStates.put(ApplicationState.HOST_ID, 
valueFactory.hostId(SystemTable.getLocalHostId()));
 appStates.put(ApplicationState.RPC_ADDRESS, 
valueFactory.rpcaddress(DatabaseDescriptor.getRpcAddress()));
-if (0 != DatabaseDescriptor.getReplaceTokens().size())
+if (DatabaseDescriptor.isReplacing())
 appStates.put(ApplicationState.STATUS, 
valueFactory.hibernate(true));
 appStates.put(ApplicationState.RELEASE_VERSION, 
valueFactory.releaseVersion());
 Gossiper.instance.register(this);
@@ -655,7 +655,7 @@ public class StorageService extends 
NotificationBroadcasterSupport implements IE
 if (logger.isDebugEnabled())
 logger.debug(... got ring + schema info);
 
-if (DatabaseDescriptor.getReplaceTokens().size() == 0)
+if (DatabaseDescriptor.isReplacing())
 {
 if (tokenMetadata.isMember(FBUtilities.getBroadcastAddress()))
 {
@@ -667,6 +667,8 @@ public class StorageService extends 
NotificationBroadcasterSupport implements IE
 }
 else
 {
+if (DatabaseDescriptor.getReplaceTokens().size() != 0  
DatabaseDescriptor.getReplaceNode() != null)
+throw new UnsupportedOperationException(You cannot 
specify both replace_token and replace_node, choose one or the other);
 try
 {
 // Sleeping additionally 

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

2013-07-15 Thread brandonwilliams
Merge branch 'cassandra-1.2' into trunk

Conflicts:
src/java/org/apache/cassandra/service/StorageService.java


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

Branch: refs/heads/trunk
Commit: 280284961f3fbea6d5638c94d19768afaeaaac43
Parents: 40cf7b0 ba6396a
Author: Brandon Williams brandonwilli...@apache.org
Authored: Mon Jul 15 15:56:08 2013 -0500
Committer: Brandon Williams brandonwilli...@apache.org
Committed: Mon Jul 15 15:56:08 2013 -0500

--
 CHANGES.txt |  1 +
 .../cassandra/config/DatabaseDescriptor.java| 16 
 .../cassandra/service/StorageService.java   | 27 
 3 files changed, 39 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/28028496/CHANGES.txt
--
diff --cc CHANGES.txt
index ddb46f1,ee277aa..63c85af
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,89 -1,5 +1,90 @@@
 +2.0.0-beta2
 + * Allow nodetool with no args, and with help to run without a server 
(CASSANDRA-5734)
 + * Cleanup AbstractType/TypeSerializer classes (CASSANDRA-5744)
 + * Remove unimplemented cli option schema-mwt (CASSANDRA-5754)
 + * Support range tombstones in thrift (CASSANDRA-5435)
 + * Normalize table-manipulating CQL3 statements' class names (CASSANDRA-5759)
 + * cqlsh: add missing table options to DESCRIBE output (CASSANDRA-5749)
 +
 +2.0.0-beta1
 + * Removed on-heap row cache (CASSANDRA-5348)
 + * use nanotime consistently for node-local timeouts (CASSANDRA-5581)
 + * Avoid unnecessary second pass on name-based queries (CASSANDRA-5577)
 + * Experimental triggers (CASSANDRA-1311)
 + * JEMalloc support for off-heap allocation (CASSANDRA-3997)
 + * Single-pass compaction (CASSANDRA-4180)
 + * Removed token range bisection (CASSANDRA-5518)
 + * Removed compatibility with pre-1.2.5 sstables and network messages
 +   (CASSANDRA-5511)
 + * removed PBSPredictor (CASSANDRA-5455)
 + * CAS support (CASSANDRA-5062, 5441, 5442, 5443, 5619, 5667)
 + * Leveled compaction performs size-tiered compactions in L0 
 +   (CASSANDRA-5371, 5439)
 + * Add yaml network topology snitch for mixed ec2/other envs (CASSANDRA-5339)
 + * Log when a node is down longer than the hint window (CASSANDRA-4554)
 + * Optimize tombstone creation for ExpiringColumns (CASSANDRA-4917)
 + * Improve LeveledScanner work estimation (CASSANDRA-5250, 5407)
 + * Replace compaction lock with runWithCompactionsDisabled (CASSANDRA-3430)
 + * Change Message IDs to ints (CASSANDRA-5307)
 + * Move sstable level information into the Stats component, removing the
 +   need for a separate Manifest file (CASSANDRA-4872)
 + * avoid serializing to byte[] on commitlog append (CASSANDRA-5199)
 + * make index_interval configurable per columnfamily (CASSANDRA-3961, 
CASSANDRA-5650)
 + * add default_time_to_live (CASSANDRA-3974)
 + * add memtable_flush_period_in_ms (CASSANDRA-4237)
 + * replace supercolumns internally by composites (CASSANDRA-3237, 5123)
 + * upgrade thrift to 0.9.0 (CASSANDRA-3719)
 + * drop unnecessary keyspace parameter from user-defined compaction API 
 +   (CASSANDRA-5139)
 + * more robust solution to incomplete compactions + counters (CASSANDRA-5151)
 + * Change order of directory searching for c*.in.sh (CASSANDRA-3983)
 + * Add tool to reset SSTable compaction level for LCS (CASSANDRA-5271)
 + * Allow custom configuration loader (CASSANDRA-5045)
 + * Remove memory emergency pressure valve logic (CASSANDRA-3534)
 + * Reduce request latency with eager retry (CASSANDRA-4705)
 + * cqlsh: Remove ASSUME command (CASSANDRA-5331)
 + * Rebuild BF when loading sstables if bloom_filter_fp_chance
 +   has changed since compaction (CASSANDRA-5015)
 + * remove row-level bloom filters (CASSANDRA-4885)
 + * Change Kernel Page Cache skipping into row preheating (disabled by default)
 +   (CASSANDRA-4937)
 + * Improve repair by deciding on a gcBefore before sending
 +   out TreeRequests (CASSANDRA-4932)
 + * Add an official way to disable compactions (CASSANDRA-5074)
 + * Reenable ALTER TABLE DROP with new semantics (CASSANDRA-3919)
 + * Add binary protocol versioning (CASSANDRA-5436)
 + * Swap THshaServer for TThreadedSelectorServer (CASSANDRA-5530)
 + * Add alias support to SELECT statement (CASSANDRA-5075)
 + * Don't create empty RowMutations in CommitLogReplayer (CASSANDRA-5541)
 + * Use range tombstones when dropping cfs/columns from schema (CASSANDRA-5579)
 + * cqlsh: drop CQL2/CQL3-beta support (CASSANDRA-5585)
 + * Track max/min column names in sstables to be able to optimize slice
 +   queries (CASSANDRA-5514, CASSANDRA-5595, 

[jira] [Updated] (CASSANDRA-5337) vnode-aware replacenode command

2013-07-15 Thread Brandon Williams (JIRA)

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

Brandon Williams updated CASSANDRA-5337:


Tester: enigmacurry

 vnode-aware replacenode command
 ---

 Key: CASSANDRA-5337
 URL: https://issues.apache.org/jira/browse/CASSANDRA-5337
 Project: Cassandra
  Issue Type: New Feature
  Components: Core
Affects Versions: 1.2.0
Reporter: Jonathan Ellis
Assignee: Brandon Williams
  Labels: vnodes
 Fix For: 1.2.7, 2.0

 Attachments: 5337.txt, 5337-v2.txt


 Currently you have the following options to replace a dead, unrecoverable 
 node:
 - replacetoken.  this requires specifying all 256 or so vnode tokens as a CSL
 - bootstrap new node, decommission old one.  this is inefficient since the 
 new node's vnodes will probably not overlap much with the old one's, so we 
 replicate stream about 2x as much as if we were just replacing the old with 
 the new
 We should add an analogue to replacetoken that takes the address or node ID 
 of the dead node instead.

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


[2/3] git commit: fix build

2013-07-15 Thread brandonwilliams
fix build


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

Branch: refs/heads/trunk
Commit: d6145668c6cee8e30246f912ee58e8cd2ffdb9ba
Parents: ba6396a
Author: Brandon Williams brandonwilli...@apache.org
Authored: Mon Jul 15 16:10:23 2013 -0500
Committer: Brandon Williams brandonwilli...@apache.org
Committed: Mon Jul 15 16:10:23 2013 -0500

--
 src/java/org/apache/cassandra/config/DatabaseDescriptor.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/d6145668/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
--
diff --git a/src/java/org/apache/cassandra/config/DatabaseDescriptor.java 
b/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
index 91ae675..55d78b8 100644
--- a/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
+++ b/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
@@ -728,7 +728,7 @@ public class DatabaseDescriptor
 
 public static boolean isReplacing()
 {
-return 0 != getReplaceTokens().size() || getReplaceNode() != null
+return 0 != getReplaceTokens().size() || getReplaceNode() != null;
 }
 
 public static String getClusterName()



[1/3] git commit: fix build

2013-07-15 Thread brandonwilliams
Updated Branches:
  refs/heads/cassandra-1.2 ba6396a20 - d6145668c
  refs/heads/trunk 280284961 - 11928f7d8


fix build


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

Branch: refs/heads/cassandra-1.2
Commit: d6145668c6cee8e30246f912ee58e8cd2ffdb9ba
Parents: ba6396a
Author: Brandon Williams brandonwilli...@apache.org
Authored: Mon Jul 15 16:10:23 2013 -0500
Committer: Brandon Williams brandonwilli...@apache.org
Committed: Mon Jul 15 16:10:23 2013 -0500

--
 src/java/org/apache/cassandra/config/DatabaseDescriptor.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/d6145668/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
--
diff --git a/src/java/org/apache/cassandra/config/DatabaseDescriptor.java 
b/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
index 91ae675..55d78b8 100644
--- a/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
+++ b/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
@@ -728,7 +728,7 @@ public class DatabaseDescriptor
 
 public static boolean isReplacing()
 {
-return 0 != getReplaceTokens().size() || getReplaceNode() != null
+return 0 != getReplaceTokens().size() || getReplaceNode() != null;
 }
 
 public static String getClusterName()



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

2013-07-15 Thread brandonwilliams
Merge branch 'cassandra-1.2' into trunk


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

Branch: refs/heads/trunk
Commit: 11928f7d8952d587337ddae77d8408156391e90d
Parents: 2802849 d614566
Author: Brandon Williams brandonwilli...@apache.org
Authored: Mon Jul 15 16:10:30 2013 -0500
Committer: Brandon Williams brandonwilli...@apache.org
Committed: Mon Jul 15 16:10:30 2013 -0500

--
 src/java/org/apache/cassandra/config/DatabaseDescriptor.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


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



[2/3] git commit: invert replace condition

2013-07-15 Thread brandonwilliams
invert replace condition


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

Branch: refs/heads/trunk
Commit: e7061901a108a9388f270323d327881fc83098ab
Parents: d614566
Author: Brandon Williams brandonwilli...@apache.org
Authored: Mon Jul 15 17:08:39 2013 -0500
Committer: Brandon Williams brandonwilli...@apache.org
Committed: Mon Jul 15 17:08:39 2013 -0500

--
 src/java/org/apache/cassandra/service/StorageService.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/e7061901/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 e556306..1f7fcdf 100644
--- a/src/java/org/apache/cassandra/service/StorageService.java
+++ b/src/java/org/apache/cassandra/service/StorageService.java
@@ -655,7 +655,7 @@ public class StorageService extends 
NotificationBroadcasterSupport implements IE
 if (logger.isDebugEnabled())
 logger.debug(... got ring + schema info);
 
-if (DatabaseDescriptor.isReplacing())
+if (!DatabaseDescriptor.isReplacing())
 {
 if (tokenMetadata.isMember(FBUtilities.getBroadcastAddress()))
 {



[1/3] git commit: invert replace condition

2013-07-15 Thread brandonwilliams
Updated Branches:
  refs/heads/cassandra-1.2 d6145668c - e7061901a
  refs/heads/trunk 11928f7d8 - ae26aab47


invert replace condition


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

Branch: refs/heads/cassandra-1.2
Commit: e7061901a108a9388f270323d327881fc83098ab
Parents: d614566
Author: Brandon Williams brandonwilli...@apache.org
Authored: Mon Jul 15 17:08:39 2013 -0500
Committer: Brandon Williams brandonwilli...@apache.org
Committed: Mon Jul 15 17:08:39 2013 -0500

--
 src/java/org/apache/cassandra/service/StorageService.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/e7061901/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 e556306..1f7fcdf 100644
--- a/src/java/org/apache/cassandra/service/StorageService.java
+++ b/src/java/org/apache/cassandra/service/StorageService.java
@@ -655,7 +655,7 @@ public class StorageService extends 
NotificationBroadcasterSupport implements IE
 if (logger.isDebugEnabled())
 logger.debug(... got ring + schema info);
 
-if (DatabaseDescriptor.isReplacing())
+if (!DatabaseDescriptor.isReplacing())
 {
 if (tokenMetadata.isMember(FBUtilities.getBroadcastAddress()))
 {



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

2013-07-15 Thread brandonwilliams
Merge branch 'cassandra-1.2' into trunk


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

Branch: refs/heads/trunk
Commit: ae26aab47b1351ebab88b0aa5c7f9c473f39a019
Parents: 11928f7 e706190
Author: Brandon Williams brandonwilli...@apache.org
Authored: Mon Jul 15 17:08:45 2013 -0500
Committer: Brandon Williams brandonwilli...@apache.org
Committed: Mon Jul 15 17:08:45 2013 -0500

--
 src/java/org/apache/cassandra/service/StorageService.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


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



[jira] [Commented] (CASSANDRA-5727) Evaluate default LCS sstable size

2013-07-15 Thread Radim Kolar (JIRA)

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

Radim Kolar commented on CASSANDRA-5727:


Leveldb is using 2MB by default. Real problem is naive leveldb implementation 
in cassandra.

 Evaluate default LCS sstable size
 -

 Key: CASSANDRA-5727
 URL: https://issues.apache.org/jira/browse/CASSANDRA-5727
 Project: Cassandra
  Issue Type: Task
  Components: Core
Reporter: Jonathan Ellis
Assignee: Daniel Meyer

 What we're not sure about is the effect on compaction efficiency --
 larger files mean that each level contains more data, so reads will
 have to touch less sstables, but we're also compacting less unchanged
 data when we merge forward.
 So the question is, how big can we make the sstables to get the benefits of 
 the
 first effect, before the second effect starts to dominate?

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


[jira] [Commented] (CASSANDRA-5727) Evaluate default LCS sstable size

2013-07-15 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis commented on CASSANDRA-5727:
---

Have you read the leveldb source?  There is no magic there.

 Evaluate default LCS sstable size
 -

 Key: CASSANDRA-5727
 URL: https://issues.apache.org/jira/browse/CASSANDRA-5727
 Project: Cassandra
  Issue Type: Task
  Components: Core
Reporter: Jonathan Ellis
Assignee: Daniel Meyer

 What we're not sure about is the effect on compaction efficiency --
 larger files mean that each level contains more data, so reads will
 have to touch less sstables, but we're also compacting less unchanged
 data when we merge forward.
 So the question is, how big can we make the sstables to get the benefits of 
 the
 first effect, before the second effect starts to dominate?

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


[jira] [Comment Edited] (CASSANDRA-5727) Evaluate default LCS sstable size

2013-07-15 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis edited comment on CASSANDRA-5727 at 7/15/13 10:19 PM:
-

Don't be a troll.  If you have constructive feedback, make it here or in 
another ticket.  Multiple Cassandra developers have read the leveldb source; 
there is no magic there.

  was (Author: jbellis):
Have you read the leveldb source?  There is no magic there.
  
 Evaluate default LCS sstable size
 -

 Key: CASSANDRA-5727
 URL: https://issues.apache.org/jira/browse/CASSANDRA-5727
 Project: Cassandra
  Issue Type: Task
  Components: Core
Reporter: Jonathan Ellis
Assignee: Daniel Meyer

 What we're not sure about is the effect on compaction efficiency --
 larger files mean that each level contains more data, so reads will
 have to touch less sstables, but we're also compacting less unchanged
 data when we merge forward.
 So the question is, how big can we make the sstables to get the benefits of 
 the
 first effect, before the second effect starts to dominate?

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


[jira] [Comment Edited] (CASSANDRA-5727) Evaluate default LCS sstable size

2013-07-15 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis edited comment on CASSANDRA-5727 at 7/15/13 10:21 PM:
-

Don't be a troll.  If you have constructive feedback, make it here or in 
another ticket.  Multiple Cassandra developers have read the leveldb source; 
there is no magic there.

For the record, leveldb is designed for low concurrency embedded purposes.  
Everyone who tries to use it for a multiuser database (riak, hyperdex, probably 
others) has to do some serious surgery of the kind we've done.  (Don't block 
writes for L0, concurrent compactions, etc.)

  was (Author: jbellis):
Don't be a troll.  If you have constructive feedback, make it here or in 
another ticket.  Multiple Cassandra developers have read the leveldb source; 
there is no magic there.
  
 Evaluate default LCS sstable size
 -

 Key: CASSANDRA-5727
 URL: https://issues.apache.org/jira/browse/CASSANDRA-5727
 Project: Cassandra
  Issue Type: Task
  Components: Core
Reporter: Jonathan Ellis
Assignee: Daniel Meyer

 What we're not sure about is the effect on compaction efficiency --
 larger files mean that each level contains more data, so reads will
 have to touch less sstables, but we're also compacting less unchanged
 data when we merge forward.
 So the question is, how big can we make the sstables to get the benefits of 
 the
 first effect, before the second effect starts to dominate?

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


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

2013-07-15 Thread jbellis
Merge branch 'cassandra-1.2' into trunk


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

Branch: refs/heads/trunk
Commit: 3f87907697cd78076fa9843636ccf584be6726cf
Parents: ae26aab 6659961
Author: Jonathan Ellis jbel...@apache.org
Authored: Mon Jul 15 17:37:42 2013 -0500
Committer: Jonathan Ellis jbel...@apache.org
Committed: Mon Jul 15 17:37:42 2013 -0500

--
 CHANGES.txt |  1 +
 .../hadoop/cql3/CqlPagingRecordReader.java  | 20 +---
 2 files changed, 14 insertions(+), 7 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/3f879076/CHANGES.txt
--
diff --cc CHANGES.txt
index 63c85af,00148a3..09b5c25
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,89 -1,5 +1,90 @@@
 +2.0.0-beta2
 + * Allow nodetool with no args, and with help to run without a server 
(CASSANDRA-5734)
 + * Cleanup AbstractType/TypeSerializer classes (CASSANDRA-5744)
 + * Remove unimplemented cli option schema-mwt (CASSANDRA-5754)
 + * Support range tombstones in thrift (CASSANDRA-5435)
 + * Normalize table-manipulating CQL3 statements' class names (CASSANDRA-5759)
 + * cqlsh: add missing table options to DESCRIBE output (CASSANDRA-5749)
 +
 +2.0.0-beta1
 + * Removed on-heap row cache (CASSANDRA-5348)
 + * use nanotime consistently for node-local timeouts (CASSANDRA-5581)
 + * Avoid unnecessary second pass on name-based queries (CASSANDRA-5577)
 + * Experimental triggers (CASSANDRA-1311)
 + * JEMalloc support for off-heap allocation (CASSANDRA-3997)
 + * Single-pass compaction (CASSANDRA-4180)
 + * Removed token range bisection (CASSANDRA-5518)
 + * Removed compatibility with pre-1.2.5 sstables and network messages
 +   (CASSANDRA-5511)
 + * removed PBSPredictor (CASSANDRA-5455)
 + * CAS support (CASSANDRA-5062, 5441, 5442, 5443, 5619, 5667)
 + * Leveled compaction performs size-tiered compactions in L0 
 +   (CASSANDRA-5371, 5439)
 + * Add yaml network topology snitch for mixed ec2/other envs (CASSANDRA-5339)
 + * Log when a node is down longer than the hint window (CASSANDRA-4554)
 + * Optimize tombstone creation for ExpiringColumns (CASSANDRA-4917)
 + * Improve LeveledScanner work estimation (CASSANDRA-5250, 5407)
 + * Replace compaction lock with runWithCompactionsDisabled (CASSANDRA-3430)
 + * Change Message IDs to ints (CASSANDRA-5307)
 + * Move sstable level information into the Stats component, removing the
 +   need for a separate Manifest file (CASSANDRA-4872)
 + * avoid serializing to byte[] on commitlog append (CASSANDRA-5199)
 + * make index_interval configurable per columnfamily (CASSANDRA-3961, 
CASSANDRA-5650)
 + * add default_time_to_live (CASSANDRA-3974)
 + * add memtable_flush_period_in_ms (CASSANDRA-4237)
 + * replace supercolumns internally by composites (CASSANDRA-3237, 5123)
 + * upgrade thrift to 0.9.0 (CASSANDRA-3719)
 + * drop unnecessary keyspace parameter from user-defined compaction API 
 +   (CASSANDRA-5139)
 + * more robust solution to incomplete compactions + counters (CASSANDRA-5151)
 + * Change order of directory searching for c*.in.sh (CASSANDRA-3983)
 + * Add tool to reset SSTable compaction level for LCS (CASSANDRA-5271)
 + * Allow custom configuration loader (CASSANDRA-5045)
 + * Remove memory emergency pressure valve logic (CASSANDRA-3534)
 + * Reduce request latency with eager retry (CASSANDRA-4705)
 + * cqlsh: Remove ASSUME command (CASSANDRA-5331)
 + * Rebuild BF when loading sstables if bloom_filter_fp_chance
 +   has changed since compaction (CASSANDRA-5015)
 + * remove row-level bloom filters (CASSANDRA-4885)
 + * Change Kernel Page Cache skipping into row preheating (disabled by default)
 +   (CASSANDRA-4937)
 + * Improve repair by deciding on a gcBefore before sending
 +   out TreeRequests (CASSANDRA-4932)
 + * Add an official way to disable compactions (CASSANDRA-5074)
 + * Reenable ALTER TABLE DROP with new semantics (CASSANDRA-3919)
 + * Add binary protocol versioning (CASSANDRA-5436)
 + * Swap THshaServer for TThreadedSelectorServer (CASSANDRA-5530)
 + * Add alias support to SELECT statement (CASSANDRA-5075)
 + * Don't create empty RowMutations in CommitLogReplayer (CASSANDRA-5541)
 + * Use range tombstones when dropping cfs/columns from schema (CASSANDRA-5579)
 + * cqlsh: drop CQL2/CQL3-beta support (CASSANDRA-5585)
 + * Track max/min column names in sstables to be able to optimize slice
 +   queries (CASSANDRA-5514, CASSANDRA-5595, CASSANDRA-5600)
 + * Binary protocol: allow batching already prepared statements 
(CASSANDRA-4693)
 + * Allow preparing timestamp, ttl and limit in CQL3 queries 

[2/3] git commit: quote identifiers in CqlPagingRecordReader patch by Piotr Kołaczkowski; reviewed by jbellis for CASSANDRA-5763

2013-07-15 Thread jbellis
quote identifiers in CqlPagingRecordReader
patch by Piotr Kołaczkowski; reviewed by jbellis for CASSANDRA-5763


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

Branch: refs/heads/trunk
Commit: 66599611d585ec600bfdceed14868889e0cb423b
Parents: e706190
Author: Jonathan Ellis jbel...@apache.org
Authored: Mon Jul 15 17:37:31 2013 -0500
Committer: Jonathan Ellis jbel...@apache.org
Committed: Mon Jul 15 17:37:31 2013 -0500

--
 CHANGES.txt |  1 +
 .../hadoop/cql3/CqlPagingRecordReader.java  | 20 +---
 2 files changed, 14 insertions(+), 7 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/66599611/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index ee277aa..00148a3 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 1.2.7
+ * (Hadoop) quote identifiers in CqlPagingRecordReader (CASSANDRA-5763)
  * Add replace_node functionality for vnodes (CASSANDRA-5337)
  * Add timeout events to query traces (CASSANDRA-5520)
  * make starting native protocol server idempotent (CASSANDRA-5728)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/66599611/src/java/org/apache/cassandra/hadoop/cql3/CqlPagingRecordReader.java
--
diff --git 
a/src/java/org/apache/cassandra/hadoop/cql3/CqlPagingRecordReader.java 
b/src/java/org/apache/cassandra/hadoop/cql3/CqlPagingRecordReader.java
index 55f67cc..c9842d0 100644
--- a/src/java/org/apache/cassandra/hadoop/cql3/CqlPagingRecordReader.java
+++ b/src/java/org/apache/cassandra/hadoop/cql3/CqlPagingRecordReader.java
@@ -430,13 +430,13 @@ public class CqlPagingRecordReader extends 
RecordReaderMapString, ByteBuffer,
 
 columns = withoutKeyColumns(columns);
 columns = (clusterKey == null || .equals(clusterKey))
-? partitionKey + , + columns
-: partitionKey + , + clusterKey + , + columns;
+? quote(partitionKey) + , + columns
+: quote(partitionKey) + , + quote(clusterKey) + , 
+ columns;
 }
 
 return Pair.create(clause.left,
SELECT  + columns
-   +  FROM  + cfName
+   +  FROM  + quote(cfName)
+ clause.right
+ (userDefinedWhereClauses == null ?  :  AND 
 + userDefinedWhereClauses)
+  LIMIT  + pageRowSize
@@ -459,7 +459,8 @@ public class CqlPagingRecordReader extends 
RecordReaderMapString, ByteBuffer,
 if (keyNames.contains(trimmed))
 continue;
 
-result = result == null ? trimmed : result + , + trimmed;
+String quoted = quote(trimmed);
+result = result == null ? quoted : result + , + quoted;
 }
 return result;
 }
@@ -492,10 +493,10 @@ public class CqlPagingRecordReader extends 
RecordReaderMapString, ByteBuffer,
 private PairInteger, String whereClause(ListBoundColumn column, 
int position)
 {
 if (position == column.size() - 1 || column.get(position + 
1).value == null)
-return Pair.create(position + 2,  AND  + 
column.get(position).name +   ? );
+return Pair.create(position + 2,  AND  + 
quote(column.get(position).name) +   ? );
 
 PairInteger, String clause = whereClause(column, position + 1);
-return Pair.create(clause.left,  AND  + 
column.get(position).name +  = ?  + clause.right);
+return Pair.create(clause.left,  AND  + 
quote(column.get(position).name) +  = ?  + clause.right);
 }
 
 /** check whether all key values are null */
@@ -514,7 +515,7 @@ public class CqlPagingRecordReader extends 
RecordReaderMapString, ByteBuffer,
 {
 String result = null;
 for (BoundColumn column : columns)
-result = result == null ? column.name : result + , + 
column.name;
+result = result == null ? quote(column.name) : result + , + 
quote(column.name);
 
 return result == null ?  : result;
 }
@@ -591,6 +592,11 @@ public class CqlPagingRecordReader extends 
RecordReaderMapString, ByteBuffer,
 return cqlPreparedResult.itemId;
 }
 
+/** Quoting for working with uppercase */
+private String quote(String identifier) {
+return \ + 

[1/3] git commit: quote identifiers in CqlPagingRecordReader patch by Piotr Kołaczkowski; reviewed by jbellis for CASSANDRA-5763

2013-07-15 Thread jbellis
Updated Branches:
  refs/heads/cassandra-1.2 e7061901a - 66599611d
  refs/heads/trunk ae26aab47 - 3f8790769


quote identifiers in CqlPagingRecordReader
patch by Piotr Kołaczkowski; reviewed by jbellis for CASSANDRA-5763


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

Branch: refs/heads/cassandra-1.2
Commit: 66599611d585ec600bfdceed14868889e0cb423b
Parents: e706190
Author: Jonathan Ellis jbel...@apache.org
Authored: Mon Jul 15 17:37:31 2013 -0500
Committer: Jonathan Ellis jbel...@apache.org
Committed: Mon Jul 15 17:37:31 2013 -0500

--
 CHANGES.txt |  1 +
 .../hadoop/cql3/CqlPagingRecordReader.java  | 20 +---
 2 files changed, 14 insertions(+), 7 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/66599611/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index ee277aa..00148a3 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 1.2.7
+ * (Hadoop) quote identifiers in CqlPagingRecordReader (CASSANDRA-5763)
  * Add replace_node functionality for vnodes (CASSANDRA-5337)
  * Add timeout events to query traces (CASSANDRA-5520)
  * make starting native protocol server idempotent (CASSANDRA-5728)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/66599611/src/java/org/apache/cassandra/hadoop/cql3/CqlPagingRecordReader.java
--
diff --git 
a/src/java/org/apache/cassandra/hadoop/cql3/CqlPagingRecordReader.java 
b/src/java/org/apache/cassandra/hadoop/cql3/CqlPagingRecordReader.java
index 55f67cc..c9842d0 100644
--- a/src/java/org/apache/cassandra/hadoop/cql3/CqlPagingRecordReader.java
+++ b/src/java/org/apache/cassandra/hadoop/cql3/CqlPagingRecordReader.java
@@ -430,13 +430,13 @@ public class CqlPagingRecordReader extends 
RecordReaderMapString, ByteBuffer,
 
 columns = withoutKeyColumns(columns);
 columns = (clusterKey == null || .equals(clusterKey))
-? partitionKey + , + columns
-: partitionKey + , + clusterKey + , + columns;
+? quote(partitionKey) + , + columns
+: quote(partitionKey) + , + quote(clusterKey) + , 
+ columns;
 }
 
 return Pair.create(clause.left,
SELECT  + columns
-   +  FROM  + cfName
+   +  FROM  + quote(cfName)
+ clause.right
+ (userDefinedWhereClauses == null ?  :  AND 
 + userDefinedWhereClauses)
+  LIMIT  + pageRowSize
@@ -459,7 +459,8 @@ public class CqlPagingRecordReader extends 
RecordReaderMapString, ByteBuffer,
 if (keyNames.contains(trimmed))
 continue;
 
-result = result == null ? trimmed : result + , + trimmed;
+String quoted = quote(trimmed);
+result = result == null ? quoted : result + , + quoted;
 }
 return result;
 }
@@ -492,10 +493,10 @@ public class CqlPagingRecordReader extends 
RecordReaderMapString, ByteBuffer,
 private PairInteger, String whereClause(ListBoundColumn column, 
int position)
 {
 if (position == column.size() - 1 || column.get(position + 
1).value == null)
-return Pair.create(position + 2,  AND  + 
column.get(position).name +   ? );
+return Pair.create(position + 2,  AND  + 
quote(column.get(position).name) +   ? );
 
 PairInteger, String clause = whereClause(column, position + 1);
-return Pair.create(clause.left,  AND  + 
column.get(position).name +  = ?  + clause.right);
+return Pair.create(clause.left,  AND  + 
quote(column.get(position).name) +  = ?  + clause.right);
 }
 
 /** check whether all key values are null */
@@ -514,7 +515,7 @@ public class CqlPagingRecordReader extends 
RecordReaderMapString, ByteBuffer,
 {
 String result = null;
 for (BoundColumn column : columns)
-result = result == null ? column.name : result + , + 
column.name;
+result = result == null ? quote(column.name) : result + , + 
quote(column.name);
 
 return result == null ?  : result;
 }
@@ -591,6 +592,11 @@ public class CqlPagingRecordReader extends 
RecordReaderMapString, ByteBuffer,
 return cqlPreparedResult.itemId;
 }
 
+/** Quoting 

[jira] [Commented] (CASSANDRA-5763) CqlPagingRecordReader should quote table and column identifiers

2013-07-15 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis commented on CASSANDRA-5763:
---

LGTM.  Rebased for you and committed.

 CqlPagingRecordReader should quote table and column identifiers
 ---

 Key: CASSANDRA-5763
 URL: https://issues.apache.org/jira/browse/CASSANDRA-5763
 Project: Cassandra
  Issue Type: Bug
  Components: Hadoop
Affects Versions: 1.2.6
Reporter: Piotr Kołaczkowski
Assignee: Piotr Kołaczkowski
Priority: Minor
 Fix For: 1.2.7

 Attachments: DSP-2292.patch


 Using CPIF on table with uppercase name or with uppercase column names 
 doesn't work (unconfigured table message).

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


[2/3] git commit: replace string concatenation with modern logging and String.format

2013-07-15 Thread jbellis
replace string concatenation with modern logging and String.format


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

Branch: refs/heads/trunk
Commit: b2daab711cd8dc03afb39a6464f21325ba0193ee
Parents: 6659961
Author: Jonathan Ellis jbel...@apache.org
Authored: Mon Jul 15 17:44:40 2013 -0500
Committer: Jonathan Ellis jbel...@apache.org
Committed: Mon Jul 15 17:44:40 2013 -0500

--
 .../hadoop/cql3/CqlPagingRecordReader.java  | 49 +---
 1 file changed, 23 insertions(+), 26 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/b2daab71/src/java/org/apache/cassandra/hadoop/cql3/CqlPagingRecordReader.java
--
diff --git 
a/src/java/org/apache/cassandra/hadoop/cql3/CqlPagingRecordReader.java 
b/src/java/org/apache/cassandra/hadoop/cql3/CqlPagingRecordReader.java
index c9842d0..a900261 100644
--- a/src/java/org/apache/cassandra/hadoop/cql3/CqlPagingRecordReader.java
+++ b/src/java/org/apache/cassandra/hadoop/cql3/CqlPagingRecordReader.java
@@ -186,7 +186,7 @@ public class CqlPagingRecordReader extends 
RecordReaderMapString, ByteBuffer,
 {
 if (!rowIterator.hasNext())
 {
-logger.debug(Finished scanning  + rowIterator.totalRead +  rows 
(estimate was:  + totalRowCount + ));
+logger.debug(Finished scanning {} rows (estimate was: {}), 
rowIterator.totalRead, totalRowCount);
 return false;
 }
 
@@ -295,18 +295,18 @@ public class CqlPagingRecordReader extends 
RecordReaderMapString, ByteBuffer,
 // no more data
 if (index == -1 || emptyPartitionKeyValues())
 {
-logger.debug(no more data.);
+logger.debug(no more data);
 return endOfData();
 }
 
 index = setTailNull(clusterColumns);
-logger.debug(set tail to null, index:  + index);
+logger.debug(set tail to null, index: {}, index);
 executeQuery();
 pageRows = 0;
 
 if (rows == null || !rows.hasNext()  index  0)
 {
-logger.debug(no more data.);
+logger.debug(no more data);
 return endOfData();
 }
 }
@@ -318,7 +318,7 @@ public class CqlPagingRecordReader extends 
RecordReaderMapString, ByteBuffer,
 for (Column column : row.columns)
 {
 String columnName = 
stringValue(ByteBuffer.wrap(column.getName()));
-logger.debug(column:  + columnName);
+logger.debug(column: {}, columnName);
 
 if (i  partitionBoundColumns.size() + clusterColumns.size())
 keyColumns.put(stringValue(column.name), column.value);
@@ -370,7 +370,7 @@ public class CqlPagingRecordReader extends 
RecordReaderMapString, ByteBuffer,
 rowKey = rowKey + 
column.validator.getString(ByteBufferUtil.clone(iter.next())) + :;
 }
 
-logger.debug(previous RowKey:  + previousRowKey + , new row 
key:  + rowKey);
+logger.debug(previous RowKey: {}, new row key: {}, 
previousRowKey, rowKey);
 if (previousRowKey == null)
 {
 this.previousRowKey = rowKey;
@@ -400,7 +400,7 @@ public class CqlPagingRecordReader extends 
RecordReaderMapString, ByteBuffer,
 {
 int index = previousIndex  0 ? previousIndex : 0;
 BoundColumn column = values.get(index);
-logger.debug(set key  + column.name +  value to  null);
+logger.debug(set key {} value to  null, column.name);
 column.value = null;
 return previousIndex - 1;
 }
@@ -409,7 +409,7 @@ public class CqlPagingRecordReader extends 
RecordReaderMapString, ByteBuffer,
 }
 
 BoundColumn column = values.get(previousIndex);
-logger.debug(set key  + column.name +  value to null);
+logger.debug(set key {} value to  null, column.name);
 column.value = null;
 return previousIndex - 1;
 }
@@ -434,13 +434,10 @@ public class CqlPagingRecordReader extends 
RecordReaderMapString, ByteBuffer,
 : quote(partitionKey) + , + quote(clusterKey) + , 
+ columns;
 }
 
+String whereStr = userDefinedWhereClauses == null ?  :  AND  + 
userDefinedWhereClauses;
 return 

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

2013-07-15 Thread jbellis
Merge branch 'cassandra-1.2' into trunk


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

Branch: refs/heads/trunk
Commit: e4ebd5ff59aa63bcf8ea9e457d8048367d16ea8c
Parents: 3f87907 b2daab7
Author: Jonathan Ellis jbel...@apache.org
Authored: Mon Jul 15 17:44:46 2013 -0500
Committer: Jonathan Ellis jbel...@apache.org
Committed: Mon Jul 15 17:44:46 2013 -0500

--
 .../hadoop/cql3/CqlPagingRecordReader.java  | 49 +---
 1 file changed, 23 insertions(+), 26 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/e4ebd5ff/src/java/org/apache/cassandra/hadoop/cql3/CqlPagingRecordReader.java
--
diff --cc src/java/org/apache/cassandra/hadoop/cql3/CqlPagingRecordReader.java
index 5b9de9b,a900261..c0a6832
--- a/src/java/org/apache/cassandra/hadoop/cql3/CqlPagingRecordReader.java
+++ b/src/java/org/apache/cassandra/hadoop/cql3/CqlPagingRecordReader.java
@@@ -486,10 -483,10 +483,10 @@@ public class CqlPagingRecordReader exte
  // query token(k) = token(pre_partition_key) and m = 
pre_cluster_key_m and n  pre_cluster_key_n
  PairInteger, String clause = whereClause(clusterColumns, 0);
  return Pair.create(clause.left,
- WHERE token( + partitionKeyString + ) = 
token( + partitionKeyMarkers + )  + clause.right);
+String.format( WHERE token(%s) = token(%s) 
%s, partitionKeyString, partitionKeyMarkers, clause.right));
  }
  
 -/** recursively compose the where clause */
 +/** recursively serialize the where clause */
  private PairInteger, String whereClause(ListBoundColumn column, 
int position)
  {
  if (position == column.size() - 1 || column.get(position + 
1).value == null)



[1/3] git commit: replace string concatenation with modern logging and String.format

2013-07-15 Thread jbellis
Updated Branches:
  refs/heads/cassandra-1.2 66599611d - b2daab711
  refs/heads/trunk 3f8790769 - e4ebd5ff5


replace string concatenation with modern logging and String.format


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

Branch: refs/heads/cassandra-1.2
Commit: b2daab711cd8dc03afb39a6464f21325ba0193ee
Parents: 6659961
Author: Jonathan Ellis jbel...@apache.org
Authored: Mon Jul 15 17:44:40 2013 -0500
Committer: Jonathan Ellis jbel...@apache.org
Committed: Mon Jul 15 17:44:40 2013 -0500

--
 .../hadoop/cql3/CqlPagingRecordReader.java  | 49 +---
 1 file changed, 23 insertions(+), 26 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/b2daab71/src/java/org/apache/cassandra/hadoop/cql3/CqlPagingRecordReader.java
--
diff --git 
a/src/java/org/apache/cassandra/hadoop/cql3/CqlPagingRecordReader.java 
b/src/java/org/apache/cassandra/hadoop/cql3/CqlPagingRecordReader.java
index c9842d0..a900261 100644
--- a/src/java/org/apache/cassandra/hadoop/cql3/CqlPagingRecordReader.java
+++ b/src/java/org/apache/cassandra/hadoop/cql3/CqlPagingRecordReader.java
@@ -186,7 +186,7 @@ public class CqlPagingRecordReader extends 
RecordReaderMapString, ByteBuffer,
 {
 if (!rowIterator.hasNext())
 {
-logger.debug(Finished scanning  + rowIterator.totalRead +  rows 
(estimate was:  + totalRowCount + ));
+logger.debug(Finished scanning {} rows (estimate was: {}), 
rowIterator.totalRead, totalRowCount);
 return false;
 }
 
@@ -295,18 +295,18 @@ public class CqlPagingRecordReader extends 
RecordReaderMapString, ByteBuffer,
 // no more data
 if (index == -1 || emptyPartitionKeyValues())
 {
-logger.debug(no more data.);
+logger.debug(no more data);
 return endOfData();
 }
 
 index = setTailNull(clusterColumns);
-logger.debug(set tail to null, index:  + index);
+logger.debug(set tail to null, index: {}, index);
 executeQuery();
 pageRows = 0;
 
 if (rows == null || !rows.hasNext()  index  0)
 {
-logger.debug(no more data.);
+logger.debug(no more data);
 return endOfData();
 }
 }
@@ -318,7 +318,7 @@ public class CqlPagingRecordReader extends 
RecordReaderMapString, ByteBuffer,
 for (Column column : row.columns)
 {
 String columnName = 
stringValue(ByteBuffer.wrap(column.getName()));
-logger.debug(column:  + columnName);
+logger.debug(column: {}, columnName);
 
 if (i  partitionBoundColumns.size() + clusterColumns.size())
 keyColumns.put(stringValue(column.name), column.value);
@@ -370,7 +370,7 @@ public class CqlPagingRecordReader extends 
RecordReaderMapString, ByteBuffer,
 rowKey = rowKey + 
column.validator.getString(ByteBufferUtil.clone(iter.next())) + :;
 }
 
-logger.debug(previous RowKey:  + previousRowKey + , new row 
key:  + rowKey);
+logger.debug(previous RowKey: {}, new row key: {}, 
previousRowKey, rowKey);
 if (previousRowKey == null)
 {
 this.previousRowKey = rowKey;
@@ -400,7 +400,7 @@ public class CqlPagingRecordReader extends 
RecordReaderMapString, ByteBuffer,
 {
 int index = previousIndex  0 ? previousIndex : 0;
 BoundColumn column = values.get(index);
-logger.debug(set key  + column.name +  value to  null);
+logger.debug(set key {} value to  null, column.name);
 column.value = null;
 return previousIndex - 1;
 }
@@ -409,7 +409,7 @@ public class CqlPagingRecordReader extends 
RecordReaderMapString, ByteBuffer,
 }
 
 BoundColumn column = values.get(previousIndex);
-logger.debug(set key  + column.name +  value to null);
+logger.debug(set key {} value to  null, column.name);
 column.value = null;
 return previousIndex - 1;
 }
@@ -434,13 +434,10 @@ public class CqlPagingRecordReader extends 
RecordReaderMapString, ByteBuffer,
 : quote(partitionKey) + , + quote(clusterKey) + , 
+ columns;
 }
 
+String 

[jira] [Commented] (CASSANDRA-4983) Improve range wrap-around in CFIF: CFIF shouldn't produce input splits of very tiny size

2013-07-15 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis commented on CASSANDRA-4983:
---

I'm not really a fan of making CFRR (and CqlPRR?) more complex to make a corner 
case slightly better.  Remember, we'll have exactly one wrapping range per Task 
out of the 100s of splits.

On the bright side, the real CqlInputFormat (using server-side paging) will 
make this a non-issue in 2.0.

 Improve range wrap-around in CFIF: CFIF shouldn't produce input splits of 
 very tiny size
 

 Key: CASSANDRA-4983
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4983
 Project: Cassandra
  Issue Type: Improvement
Affects Versions: 1.1.6
Reporter: Piotr Kołaczkowski
Assignee: Piotr Kołaczkowski
Priority: Minor
 Fix For: 1.2.7

 Attachments: 
 0001-CASSANDRA-4983-CFRR-able-to-iterate-over-more-than-o.patch


 Currently CFIF splits the wrap-around split into two non-wrap-around splits. 
 While it simplifies CFRR implementation, this approach has several minor 
 downsides:
  * One of the splits can be extremely small. One of our (picky) customers 
 suspected there must be a bug, because one of his map tasks executed in 1  
 second, while all the rest executed in minutes. Also having a very small task 
 is wasting resources - more resources go to launching the task than doing any 
 real work.
  * The number of map tasks is always one more than the number of (expected 
 rows / cassandra.input.split.size). The number of map tasks is always = 2. 
 This is confusing customers. 
  * Progress reporting for the divided split parts is inaccurate - even if the 
 splits are similar in size, the progress bar goes to about 50% and then 
 immediately to 100%, because it is impossible to estimate their size properly 
 (the size estimation is done before removing wrap-around).

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


[jira] [Commented] (CASSANDRA-5718) Cql3 reader returns duplicate rows if the cluster column is reversed

2013-07-15 Thread Alex Liu (JIRA)

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

Alex Liu commented on CASSANDRA-5718:
-

create a compact table

{code}
 CREATE TABLE wordfreq ( title text, word text, occurances int, PRIMARY KEY 
(title,occurances)) 
 WITH COMPACT STORAGE and CLUSTERING ORDER by (occurances DESC);
{code}

show the schema

{code}
  cqlsh:test select key_aliases, column_aliases, key_validator, comparator 
from system.schema_columnfamilies where   keyspace_name='test';

 key_aliases | column_aliases | key_validator| 
comparator
-++--+-
   [title] | [occurances] | org.apache.cassandra.db.marshal.UTF8Type | 
org.apache.cassandra.db.marshal.ReversedType(org.apache.cassandra.db.marshal.Int32Type)
{code}

it has the clustering column and reversed type defined for the table in 
system.schema_columnfamilies table.

 Cql3 reader returns duplicate rows if the cluster column is reversed
 

 Key: CASSANDRA-5718
 URL: https://issues.apache.org/jira/browse/CASSANDRA-5718
 Project: Cassandra
  Issue Type: Bug
Affects Versions: 1.2.6
Reporter: Alex Liu
Assignee: Alex Liu
 Fix For: 1.2.7

 Attachments: 5718-1.2-branch.txt


 To reproduce it,
 cqlsh:test  select * from wordfreq;
  title   | occurances | word
 -++---
  alex123 |  4 |  liu3
alex1 |  23456 |  liu2
   alex10 | 10 | liu10
   alex12 | 34 |  liu3
 alex | 123456 |  liu1
 alex |   1000 |   liu
 CREATE TABLE wordfreq ( title text, word text, occurances int, PRIMARY KEY 
 (title,occurances)) WITH CLUSTERING ORDER by (occurances DESC);
 The hadoop job returns 7 rows instead of 6 rows. 
 I will post a patch soon.

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


[jira] [Comment Edited] (CASSANDRA-5718) Cql3 reader returns duplicate rows if the cluster column is reversed

2013-07-15 Thread Alex Liu (JIRA)

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

Alex Liu edited comment on CASSANDRA-5718 at 7/15/13 11:03 PM:
---

create a compact table

{code}
 CREATE TABLE wordfreq ( title text, word text, occurances int, PRIMARY KEY 
(title,occurances)) 
 WITH COMPACT STORAGE and CLUSTERING ORDER by (occurances DESC);
{code}

show the schema

{code}
  cqlsh:test select key_aliases, column_aliases, key_validator, comparator 
from system.schema_columnfamilies where   keyspace_name='test';

 key_aliases | column_aliases | key_validator| 
comparator
-++--+-
   [title] | [occurances] | org.apache.cassandra.db.marshal.UTF8Type | 
org.apache.cassandra.db.marshal.ReversedType(org.apache.cassandra.db.marshal.Int32Type)
{code}

It has the clustering column and reversed type defined for the table in 
system.schema_columnfamilies table.

The patch covers the compact storage type tables. Is there any other type of 
thrift table I am missing? 

  was (Author: alexliu68):
create a compact table

{code}
 CREATE TABLE wordfreq ( title text, word text, occurances int, PRIMARY KEY 
(title,occurances)) 
 WITH COMPACT STORAGE and CLUSTERING ORDER by (occurances DESC);
{code}

show the schema

{code}
  cqlsh:test select key_aliases, column_aliases, key_validator, comparator 
from system.schema_columnfamilies where   keyspace_name='test';

 key_aliases | column_aliases | key_validator| 
comparator
-++--+-
   [title] | [occurances] | org.apache.cassandra.db.marshal.UTF8Type | 
org.apache.cassandra.db.marshal.ReversedType(org.apache.cassandra.db.marshal.Int32Type)
{code}

It has the clustering column and reversed type defined for the table in 
system.schema_columnfamilies table.

The patch cover the compact storage type tables. Is there any other type of 
thrift table I am missing? 
  
 Cql3 reader returns duplicate rows if the cluster column is reversed
 

 Key: CASSANDRA-5718
 URL: https://issues.apache.org/jira/browse/CASSANDRA-5718
 Project: Cassandra
  Issue Type: Bug
Affects Versions: 1.2.6
Reporter: Alex Liu
Assignee: Alex Liu
 Fix For: 1.2.7

 Attachments: 5718-1.2-branch.txt


 To reproduce it,
 cqlsh:test  select * from wordfreq;
  title   | occurances | word
 -++---
  alex123 |  4 |  liu3
alex1 |  23456 |  liu2
   alex10 | 10 | liu10
   alex12 | 34 |  liu3
 alex | 123456 |  liu1
 alex |   1000 |   liu
 CREATE TABLE wordfreq ( title text, word text, occurances int, PRIMARY KEY 
 (title,occurances)) WITH CLUSTERING ORDER by (occurances DESC);
 The hadoop job returns 7 rows instead of 6 rows. 
 I will post a patch soon.

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


[jira] [Comment Edited] (CASSANDRA-5718) Cql3 reader returns duplicate rows if the cluster column is reversed

2013-07-15 Thread Alex Liu (JIRA)

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

Alex Liu edited comment on CASSANDRA-5718 at 7/15/13 11:03 PM:
---

create a compact table

{code}
 CREATE TABLE wordfreq ( title text, word text, occurances int, PRIMARY KEY 
(title,occurances)) 
 WITH COMPACT STORAGE and CLUSTERING ORDER by (occurances DESC);
{code}

show the schema

{code}
  cqlsh:test select key_aliases, column_aliases, key_validator, comparator 
from system.schema_columnfamilies where   keyspace_name='test';

 key_aliases | column_aliases | key_validator| 
comparator
-++--+-
   [title] | [occurances] | org.apache.cassandra.db.marshal.UTF8Type | 
org.apache.cassandra.db.marshal.ReversedType(org.apache.cassandra.db.marshal.Int32Type)
{code}

It has the clustering column and reversed type defined for the table in 
system.schema_columnfamilies table.

The patch cover the compact storage type tables. Is there any other type of 
thrift table I am missing? 

  was (Author: alexliu68):
create a compact table

{code}
 CREATE TABLE wordfreq ( title text, word text, occurances int, PRIMARY KEY 
(title,occurances)) 
 WITH COMPACT STORAGE and CLUSTERING ORDER by (occurances DESC);
{code}

show the schema

{code}
  cqlsh:test select key_aliases, column_aliases, key_validator, comparator 
from system.schema_columnfamilies where   keyspace_name='test';

 key_aliases | column_aliases | key_validator| 
comparator
-++--+-
   [title] | [occurances] | org.apache.cassandra.db.marshal.UTF8Type | 
org.apache.cassandra.db.marshal.ReversedType(org.apache.cassandra.db.marshal.Int32Type)
{code}

it has the clustering column and reversed type defined for the table in 
system.schema_columnfamilies table.
  
 Cql3 reader returns duplicate rows if the cluster column is reversed
 

 Key: CASSANDRA-5718
 URL: https://issues.apache.org/jira/browse/CASSANDRA-5718
 Project: Cassandra
  Issue Type: Bug
Affects Versions: 1.2.6
Reporter: Alex Liu
Assignee: Alex Liu
 Fix For: 1.2.7

 Attachments: 5718-1.2-branch.txt


 To reproduce it,
 cqlsh:test  select * from wordfreq;
  title   | occurances | word
 -++---
  alex123 |  4 |  liu3
alex1 |  23456 |  liu2
   alex10 | 10 | liu10
   alex12 | 34 |  liu3
 alex | 123456 |  liu1
 alex |   1000 |   liu
 CREATE TABLE wordfreq ( title text, word text, occurances int, PRIMARY KEY 
 (title,occurances)) WITH CLUSTERING ORDER by (occurances DESC);
 The hadoop job returns 7 rows instead of 6 rows. 
 I will post a patch soon.

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


[jira] [Commented] (CASSANDRA-4686) update hadoop version in wordcount exampe

2013-07-15 Thread Alex Liu (JIRA)

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

Alex Liu commented on CASSANDRA-4686:
-

+1

 update hadoop version in wordcount exampe
 -

 Key: CASSANDRA-4686
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4686
 Project: Cassandra
  Issue Type: Improvement
  Components: Hadoop
Reporter: Philip Crotwell
Assignee: Jeremy Hanna
Priority: Trivial
 Fix For: 2.0

 Attachments: trunk-4686.txt


 example/hadoop_word_count uses Hadoop 0.20.2, should use most recent stable 
 version of hadoop, 1.0.3

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


[jira] [Updated] (CASSANDRA-5542) BulkLoader is broken in trunk

2013-07-15 Thread Yuki Morishita (JIRA)

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

Yuki Morishita updated CASSANDRA-5542:
--

Attachment: (was: 0002-make-BulkLoader-work-with-SSTableReader.patch)

 BulkLoader is broken in trunk
 -

 Key: CASSANDRA-5542
 URL: https://issues.apache.org/jira/browse/CASSANDRA-5542
 Project: Cassandra
  Issue Type: Bug
Affects Versions: 2.0 beta 1
Reporter: Yuki Morishita
Assignee: Yuki Morishita
 Fix For: 2.0

 Attachments: 5542-fix-NPE.txt, 5542.txt


 After CASSANDRA-5015 and CASSANDRA-5521, we need CFMetaData to open 
 SSTable(Reader), especially to get bloom_filter_fp_chance and index_interval.
 When using bulkloader, CFMetaData is not available, so we cannot open SSTable 
 to be streamed.

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


[jira] [Updated] (CASSANDRA-5542) BulkLoader is broken in trunk

2013-07-15 Thread Yuki Morishita (JIRA)

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

Yuki Morishita updated CASSANDRA-5542:
--

Attachment: (was: 0001-change-streaming-procedure.patch)

 BulkLoader is broken in trunk
 -

 Key: CASSANDRA-5542
 URL: https://issues.apache.org/jira/browse/CASSANDRA-5542
 Project: Cassandra
  Issue Type: Bug
Affects Versions: 2.0 beta 1
Reporter: Yuki Morishita
Assignee: Yuki Morishita
 Fix For: 2.0

 Attachments: 5542-fix-NPE.txt, 5542.txt


 After CASSANDRA-5015 and CASSANDRA-5521, we need CFMetaData to open 
 SSTable(Reader), especially to get bloom_filter_fp_chance and index_interval.
 When using bulkloader, CFMetaData is not available, so we cannot open SSTable 
 to be streamed.

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


[jira] [Updated] (CASSANDRA-5542) BulkLoader is broken in trunk

2013-07-15 Thread Yuki Morishita (JIRA)

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

Yuki Morishita updated CASSANDRA-5542:
--

Attachment: 0001-change-streaming-procedure.patch
0002-make-BulkLoader-work-with-SSTableReader.patch
0003-update-for-post-CASSANDRA-5171.patch

Uploaded update patches.

* 0001 changes so that streaming initiator makes two connections. It also 
changes how StreamManager manages current connection in order to distinguish 
plans inside the same JVM (for bulkload JMX op and unit test).
* 0002 is updated for sstableloader command output.
* 0003 introduces change in how we create socket from streaming session. 
CASSANDRA-5171 makes OutboundTCPConnection pool require system table which 
client like sstableloader doesn't have. Instead, I made newSocket static method 
so we just can obtain socket for specific host.

 BulkLoader is broken in trunk
 -

 Key: CASSANDRA-5542
 URL: https://issues.apache.org/jira/browse/CASSANDRA-5542
 Project: Cassandra
  Issue Type: Bug
Affects Versions: 2.0 beta 1
Reporter: Yuki Morishita
Assignee: Yuki Morishita
 Fix For: 2.0

 Attachments: 0001-change-streaming-procedure.patch, 
 0002-make-BulkLoader-work-with-SSTableReader.patch, 
 0003-update-for-post-CASSANDRA-5171.patch, 5542-fix-NPE.txt, 5542.txt


 After CASSANDRA-5015 and CASSANDRA-5521, we need CFMetaData to open 
 SSTable(Reader), especially to get bloom_filter_fp_chance and index_interval.
 When using bulkloader, CFMetaData is not available, so we cannot open SSTable 
 to be streamed.

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


[jira] [Created] (CASSANDRA-5764) CommitLogReplayer should calculate checksums differently for 2.0

2013-07-15 Thread Dave Brosius (JIRA)
Dave Brosius created CASSANDRA-5764:
---

 Summary: CommitLogReplayer should calculate checksums differently 
for  2.0
 Key: CASSANDRA-5764
 URL: https://issues.apache.org/jira/browse/CASSANDRA-5764
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Affects Versions: 2.0 beta 1
Reporter: Dave Brosius
Assignee: Dave Brosius
Priority: Trivial
 Fix For: 2.0 beta 2


code uses the wrong version to check whether to use old style or new style 
checksumming.

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


[jira] [Updated] (CASSANDRA-5764) CommitLogReplayer should calculate checksums differently for 2.0

2013-07-15 Thread Dave Brosius (JIRA)

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

Dave Brosius updated CASSANDRA-5764:


Attachment: 5764.txt

 CommitLogReplayer should calculate checksums differently for  2.0
 --

 Key: CASSANDRA-5764
 URL: https://issues.apache.org/jira/browse/CASSANDRA-5764
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Affects Versions: 2.0 beta 1
Reporter: Dave Brosius
Assignee: Dave Brosius
Priority: Trivial
 Fix For: 2.0 beta 2

 Attachments: 5764.txt


 code uses the wrong version to check whether to use old style or new style 
 checksumming.

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


[2/3] git commit: another inverted condition

2013-07-15 Thread brandonwilliams
another inverted condition


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

Branch: refs/heads/trunk
Commit: 3280fb087801de8b66eaf32e7b73a9e74a07d0ce
Parents: b2daab7
Author: Brandon Williams brandonwilli...@apache.org
Authored: Mon Jul 15 23:44:39 2013 -0500
Committer: Brandon Williams brandonwilli...@apache.org
Committed: Mon Jul 15 23:44:39 2013 -0500

--
 src/java/org/apache/cassandra/service/StorageService.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/3280fb08/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 1f7fcdf..7f1bdbc 100644
--- a/src/java/org/apache/cassandra/service/StorageService.java
+++ b/src/java/org/apache/cassandra/service/StorageService.java
@@ -920,7 +920,7 @@ public class StorageService extends 
NotificationBroadcasterSupport implements IE
 {
 isBootstrapMode = true;
 SystemTable.updateTokens(tokens); // DON'T use setToken, that makes us 
part of the ring locally which is incorrect until we are done bootstrapping
-if (DatabaseDescriptor.isReplacing())
+if (!DatabaseDescriptor.isReplacing())
 {
 // if not an existing token then bootstrap
 // order is important here, the gossiper can fire in between 
adding these two states.  It's ok to send TOKENS without STATUS, but *not* vice 
versa.



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

2013-07-15 Thread brandonwilliams
Merge branch 'cassandra-1.2' into trunk

Conflicts:
src/java/org/apache/cassandra/service/StorageService.java


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

Branch: refs/heads/trunk
Commit: eec01e9fe8668c6b08be87e3680c35824e02bef9
Parents: e4ebd5f 3280fb0
Author: Brandon Williams brandonwilli...@apache.org
Authored: Mon Jul 15 23:45:14 2013 -0500
Committer: Brandon Williams brandonwilli...@apache.org
Committed: Mon Jul 15 23:45:14 2013 -0500

--
 src/java/org/apache/cassandra/service/StorageService.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/eec01e9f/src/java/org/apache/cassandra/service/StorageService.java
--
diff --cc src/java/org/apache/cassandra/service/StorageService.java
index 195e592,7f1bdbc..a31c10a
--- a/src/java/org/apache/cassandra/service/StorageService.java
+++ b/src/java/org/apache/cassandra/service/StorageService.java
@@@ -877,8 -919,8 +877,8 @@@ public class StorageService extends Not
  private void bootstrap(CollectionToken tokens)
  {
  isBootstrapMode = true;
 -SystemTable.updateTokens(tokens); // DON'T use setToken, that makes 
us part of the ring locally which is incorrect until we are done bootstrapping
 +SystemKeyspace.updateTokens(tokens); // DON'T use setToken, that 
makes us part of the ring locally which is incorrect until we are done 
bootstrapping
- if (DatabaseDescriptor.isReplacing())
+ if (!DatabaseDescriptor.isReplacing())
  {
  // if not an existing token then bootstrap
  // order is important here, the gossiper can fire in between 
adding these two states.  It's ok to send TOKENS without STATUS, but *not* vice 
versa.



[1/3] git commit: another inverted condition

2013-07-15 Thread brandonwilliams
Updated Branches:
  refs/heads/cassandra-1.2 b2daab711 - 3280fb087
  refs/heads/trunk e4ebd5ff5 - eec01e9fe


another inverted condition


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

Branch: refs/heads/cassandra-1.2
Commit: 3280fb087801de8b66eaf32e7b73a9e74a07d0ce
Parents: b2daab7
Author: Brandon Williams brandonwilli...@apache.org
Authored: Mon Jul 15 23:44:39 2013 -0500
Committer: Brandon Williams brandonwilli...@apache.org
Committed: Mon Jul 15 23:44:39 2013 -0500

--
 src/java/org/apache/cassandra/service/StorageService.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/3280fb08/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 1f7fcdf..7f1bdbc 100644
--- a/src/java/org/apache/cassandra/service/StorageService.java
+++ b/src/java/org/apache/cassandra/service/StorageService.java
@@ -920,7 +920,7 @@ public class StorageService extends 
NotificationBroadcasterSupport implements IE
 {
 isBootstrapMode = true;
 SystemTable.updateTokens(tokens); // DON'T use setToken, that makes us 
part of the ring locally which is incorrect until we are done bootstrapping
-if (DatabaseDescriptor.isReplacing())
+if (!DatabaseDescriptor.isReplacing())
 {
 // if not an existing token then bootstrap
 // order is important here, the gossiper can fire in between 
adding these two states.  It's ok to send TOKENS without STATUS, but *not* vice 
versa.