[jira] [Updated] (CASSANDRA-2843) better performance on long row read

2011-07-06 Thread Sylvain Lebresne (JIRA)

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

Sylvain Lebresne updated CASSANDRA-2843:


Attachment: microBenchmark.patch

bq. this implementation should not expect the input always come in already 
sorted order

Yeah, that's not really what I said. I said that it should not *assume* it.  
Which doesn't mean it cannot optimize for it. If you look at the version I 
attached, at least as far a addColumn is concerned, it does the exact same 
thing as your version, with the only difference that I first check if adding at 
the tail is legit and fail back to a binary search if that is not the case.  
That is, as long as the input is in sorted order, it will be as fast as your 
implementation (there is one more bytebuffer comparison but I'm willing to bet 
that it has no noticeable impact on performance). But it won't create unsorted 
CF if the input is not in sorted order.

Btw, Yang, can you try to fix you 3 last comments ?

bq. If the main benefit is avoiding synchronization, shouldn't we just stick w/ 
TreeMap for simplicity?

I'm attaching a second patch with the micro-benchmark that I've used and the 
TreeMap implementation so that people can look for themselves. The test simply 
creates a CF, add columns to it (in sorted order) and do a simple iteration at 
the end. I've also add a delete at the end because at least in the case of 
super columns, we do call removeDeleted so the goal was to see if this has a 
significant impact (the deletes are made at the beginning of the CF, which is 
the worst case for the ArrayBacked solution). The test also allow to have some 
column overwrap (to exercise reconciliation). Not that when that happens, the 
input is not in strict sorted order anymore, but it's mostly at the 
disadvantage of the ArrayBack implementation there too.  Playing with the 
parameters (number of columns added, number that overlaps, number of deletes) 
the results seems to always be the same. The ArrayBacked is consistently faster 
than the TreeMap one that is itself consistently faster than the CSLM one. Now 
what I meant is that the difference between ArrayBacked and TreeMap is 
generally not as big as the one with CSLM, but it is still often very 
noticeable.

This is no surprise in the end, the ArrayBacked solution is optimized for 
insertion in sorted order: the insertion is then O(1) and with a small constant 
factor because we're using ArrayList. TreeMap can't beat that. Given this, and 
given that ColumnFamily is one of our core data structure, I think we should 
choose the more efficient implementation for each use case. And truth is, the 
ArrayBacked implementation is really not very complicated, that's basic stuff.

bq. That's odd, because adding in sorted order is actually worst-case for CSLM, 
and that's what we do on reads.

Yeah, I was a bit quick on that statement. Rerunning my micro-benchmarks does 
show that we're much much faster even without reconciliation happening.


 better performance on long row read
 ---

 Key: CASSANDRA-2843
 URL: https://issues.apache.org/jira/browse/CASSANDRA-2843
 Project: Cassandra
  Issue Type: New Feature
Reporter: Yang Yang
 Attachments: 2843.patch, fast_cf_081_trunk.diff, microBenchmark.patch


 currently if a row contains  1000 columns, the run time becomes considerably 
 slow (my test of 
 a row with 30 00 columns (standard, regular) each with 8 bytes in name, and 
 40 bytes in value, is about 16ms.
 this is all running in memory, no disk read is involved.
 through debugging we can find
 most of this time is spent on 
 [Wall Time]  org.apache.cassandra.db.Table.getRow(QueryFilter)
 [Wall Time]  
 org.apache.cassandra.db.ColumnFamilyStore.getColumnFamily(QueryFilter, 
 ColumnFamily)
 [Wall Time]  
 org.apache.cassandra.db.ColumnFamilyStore.getColumnFamily(QueryFilter, int, 
 ColumnFamily)
 [Wall Time]  
 org.apache.cassandra.db.ColumnFamilyStore.getTopLevelColumns(QueryFilter, 
 int, ColumnFamily)
 [Wall Time]  
 org.apache.cassandra.db.filter.QueryFilter.collectCollatedColumns(ColumnFamily,
  Iterator, int)
 [Wall Time]  
 org.apache.cassandra.db.filter.SliceQueryFilter.collectReducedColumns(IColumnContainer,
  Iterator, int)
 [Wall Time]  org.apache.cassandra.db.ColumnFamily.addColumn(IColumn)
 ColumnFamily.addColumn() is slow because it inserts into an internal 
 concurrentSkipListMap() that maps column names to values.
 this structure is slow for two reasons: it needs to do synchronization; it 
 needs to maintain a more complex structure of map.
 but if we look at the whole read path, thrift already defines the read output 
 to be ListColumnOrSuperColumn so it does not make sense to use a luxury map 
 data structure in the interium and finally convert it to a list. on the 
 synchronization side, since the return 

[jira] [Commented] (CASSANDRA-2820) Re-introduce FastByteArrayInputStream (and Output equivalent)

2011-07-06 Thread Sylvain Lebresne (JIRA)

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

Sylvain Lebresne commented on CASSANDRA-2820:
-

I'm actually not too much of a fan of extending ByteArray*Stream but 
redeclaring all the fields, giving fake argument to the super constructor. 
It's a bit ugly and not too optimal in memory size (the space argument is not a 
huge one I agree). I think we should extend and reuse the protected field of 
the super class. Those are part of the public API, so there is not so much 
liberty over what a future Harmony implementation (or any implementation for 
that matter) can do with them in the future and more importantly, if we 
override all the methods, we don't care (expect for the call to the super 
constructor actually, but it's easy enough to assert the validity of the field 
assignation after the call to super() if we really want to). And talking about 
that, we need to add an implementation of read(byte[]), flush() and 
write(byte[]) because we can't be sure that the implementation we extend will 
not override the ones inherited from InputStream/OutputStream.

Now I'll admit that I made my earlier comment a bit quickly and that in the end 
it may be simpler/cleaner to make FastByteArray*Stream extends 
Input/OutputStream directly and use
{noformat}
InputStream buffer = new FastByteArrayInputStream(bytes);
OutputStream buffer = new FastByteArrayOutputStream(bytes);
{noformat}
We cannot always do that for the OutputStream side because OutputStream doesn't 
have the toByteArray() method, but we can use FastByteArrayOutputStream then. 
Really my earlier comment was more about avoiding to use FastByteArray*Stream 
in more places than strictly necessary.


 Re-introduce FastByteArrayInputStream (and Output equivalent)
 -

 Key: CASSANDRA-2820
 URL: https://issues.apache.org/jira/browse/CASSANDRA-2820
 Project: Cassandra
  Issue Type: Improvement
  Components: Core
Affects Versions: 0.8.0
 Environment: n/a
Reporter: Paul Loy
Priority: Minor
  Labels: bytearrayinputstream, bytearrayoutputstream, license, 
 synchronized
 Fix For: 1.0

 Attachments: fast_bytearray_iostreams_harmony-patch-2.txt, 
 fast_bytearray_iostreams_harmony-patch-3.txt


 In https://issues.apache.org/jira/browse/CASSANDRA-37 
 FastByteArrayInputStream and FastByteArrayOutputStream were removed due to 
 being code copied from the JDK and then subsequently modified. The JDK 
 license is incompatible with Apache 2 license so the code had to go.
 I have since had a look at the performance of the JDK ByteArrayInputStream 
 and a FastByteArrayInputStream (i.e. one with synchronized methods made 
 un-synchronized) and seen the difference is significant.
 After a warmup-period of 1 loops I get the following for 1 loops 
 through a 128000 byte array:
 bais : 3513ms
 fbais: 72ms
 This varies depending on the OS, machine and Java version, but it's always in 
 favour of the FastByteArrayInputStream as you might expect.
 Then, at Jonathan Ellis' suggestion, I tried this using a modified Apache 
 Harmony ByteArrayInputStream - i.e. one whose license is compatible - and the 
 results were the same. A significant boost.
 I will attach a patch with changes for the 0.8.0 tag.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Created] (CASSANDRA-2863) NPE when writing SSTable generated via repair

2011-07-06 Thread JIRA
NPE when writing SSTable generated via repair
-

 Key: CASSANDRA-2863
 URL: https://issues.apache.org/jira/browse/CASSANDRA-2863
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Affects Versions: 0.8.1
Reporter: Héctor Izquierdo


A NPE is generated during repair when closing an sstable generated via SSTable 
build. It doesn't happen always. The node had been scrubbed and compacted 
before calling repair.

 INFO [CompactionExecutor:2] 2011-07-06 11:11:32,640 SSTableReader.java (line 
158) Opening /d2/cassandra/data/sbs/walf-g-730
ERROR [CompactionExecutor:2] 2011-07-06 11:11:34,327 
AbstractCassandraDaemon.java (line 113) Fatal exception in thread 
Thread[CompactionExecutor:2,1,main] 
java.lang.NullPointerException
at 
org.apache.cassandra.io.sstable.SSTableWriter$RowIndexer.close(SSTableWriter.java:382)
at 
org.apache.cassandra.io.sstable.SSTableWriter$RowIndexer.index(SSTableWriter.java:370)
at 
org.apache.cassandra.io.sstable.SSTableWriter$Builder.build(SSTableWriter.java:315)
at 
org.apache.cassandra.db.compaction.CompactionManager$9.call(CompactionManager.java:1103)
at 
org.apache.cassandra.db.compaction.CompactionManager$9.call(CompactionManager.java:1094)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
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)


--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira




svn commit: r1143352 - in /cassandra/branches/cassandra-0.8: ./ src/java/org/apache/cassandra/db/ src/java/org/apache/cassandra/db/compaction/ test/unit/org/apache/cassandra/db/compaction/

2011-07-06 Thread slebresne
Author: slebresne
Date: Wed Jul  6 11:34:50 2011
New Revision: 1143352

URL: http://svn.apache.org/viewvc?rev=1143352view=rev
Log:
Handle row tombstones correctly in EchoedRow
patch by slebresne; reviewed by jbellis for CASSANDRA-2786

Modified:
cassandra/branches/cassandra-0.8/CHANGES.txt

cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/db/EchoedRow.java

cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/db/compaction/CompactionController.java

cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/db/compaction/CompactionManager.java

cassandra/branches/cassandra-0.8/test/unit/org/apache/cassandra/db/compaction/CompactionsTest.java

Modified: cassandra/branches/cassandra-0.8/CHANGES.txt
URL: 
http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.8/CHANGES.txt?rev=1143352r1=1143351r2=1143352view=diff
==
--- cassandra/branches/cassandra-0.8/CHANGES.txt (original)
+++ cassandra/branches/cassandra-0.8/CHANGES.txt Wed Jul  6 11:34:50 2011
@@ -15,6 +15,7 @@
  * fix index-building status display (CASSANDRA-2853)
  * fix CLI perpetuating obsolete KsDef.replication_factor (CASSANDRA-2846)
  * improve cli treatment of multiline comments (CASSANDRA-2852)
+ * handle row tombstones correctly in EchoedRow (CASSANDRA-2786)
 
 
 0.8.1

Modified: 
cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/db/EchoedRow.java
URL: 
http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/db/EchoedRow.java?rev=1143352r1=1143351r2=1143352view=diff
==
--- 
cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/db/EchoedRow.java
 (original)
+++ 
cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/db/EchoedRow.java
 Wed Jul  6 11:34:50 2011
@@ -26,6 +26,7 @@ import java.io.IOException;
 import java.security.MessageDigest;
 
 import org.apache.cassandra.db.compaction.AbstractCompactedRow;
+import org.apache.cassandra.db.compaction.CompactionController;
 import org.apache.cassandra.io.sstable.SSTableIdentityIterator;
 
 /**
@@ -35,11 +36,13 @@ import org.apache.cassandra.io.sstable.S
 public class EchoedRow extends AbstractCompactedRow
 {
 private final SSTableIdentityIterator row;
+private final int gcBefore;
 
-public EchoedRow(SSTableIdentityIterator row)
+public EchoedRow(CompactionController controller, SSTableIdentityIterator 
row)
 {
 super(row.getKey());
 this.row = row;
+this.gcBefore = controller.gcBefore;
 // Reset SSTableIdentityIterator because we have not guarantee the 
filePointer hasn't moved since the Iterator was built
 row.reset();
 }
@@ -59,7 +62,7 @@ public class EchoedRow extends AbstractC
 
 public boolean isEmpty()
 {
-return !row.hasNext();
+return !row.hasNext()  
ColumnFamilyStore.removeDeletedCF(row.getColumnFamily(), gcBefore) == null;
 }
 
 public int columnCount()

Modified: 
cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/db/compaction/CompactionController.java
URL: 
http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/db/compaction/CompactionController.java?rev=1143352r1=1143351r2=1143352view=diff
==
--- 
cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/db/compaction/CompactionController.java
 (original)
+++ 
cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/db/compaction/CompactionController.java
 Wed Jul  6 11:34:50 2011
@@ -113,7 +113,7 @@ public class CompactionController
 public AbstractCompactedRow getCompactedRow(ListSSTableIdentityIterator 
rows)
 {
 if (rows.size() == 1  !needDeserialize()  
!shouldPurge(rows.get(0).getKey()))
-return new EchoedRow(rows.get(0));
+return new EchoedRow(this, rows.get(0));
 
 long rowSize = 0;
 for (SSTableIdentityIterator row : rows)

Modified: 
cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/db/compaction/CompactionManager.java
URL: 
http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/db/compaction/CompactionManager.java?rev=1143352r1=1143351r2=1143352view=diff
==
--- 
cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/db/compaction/CompactionManager.java
 (original)
+++ 
cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/db/compaction/CompactionManager.java
 Wed Jul  6 11:34:50 2011
@@ -412,7 +412,8 @@ public class CompactionManager implement
 // success: perform the compaction
 try
 {
-doCompactionWithoutSizeEstimation(cfs, sstables, 

[jira] [Commented] (CASSANDRA-2786) After a minor compaction, deleted key-slices are visible again

2011-07-06 Thread Hudson (JIRA)

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

Hudson commented on CASSANDRA-2786:
---

Integrated in Cassandra-0.8 #205 (See 
[https://builds.apache.org/job/Cassandra-0.8/205/])
Handle row tombstones correctly in EchoedRow
patch by slebresne; reviewed by jbellis for CASSANDRA-2786

slebresne : 
http://svn.apache.org/viewcvs.cgi/?root=Apache-SVNview=revrev=1143352
Files : 
* /cassandra/branches/cassandra-0.8/CHANGES.txt
* 
/cassandra/branches/cassandra-0.8/test/unit/org/apache/cassandra/db/compaction/CompactionsTest.java
* 
/cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/db/compaction/CompactionController.java
* 
/cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/db/EchoedRow.java
* 
/cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/db/compaction/CompactionManager.java


 After a minor compaction, deleted key-slices are visible again
 --

 Key: CASSANDRA-2786
 URL: https://issues.apache.org/jira/browse/CASSANDRA-2786
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Affects Versions: 0.8.0
 Environment: Reproduced on single Cassandra node (CentOS 5.5)
 Reproduced on single Cassandra node (Windows Server 2008)
Reporter: rene kochen
Assignee: Sylvain Lebresne
 Fix For: 0.8.1, 0.8.2

 Attachments: 0001-Fix-wrong-purge-of-deleted-cf.patch, 
 2786_part2.patch, CassandraIssue.zip, CassandraIssueJava.zip


 After a minor compaction, deleted key-slices are visible again.
 Steps to reproduce:
 1) Insert a row named test.
 2) Insert 50 rows. During this step, row test is included in a major 
 compaction:
file-1, file-2, file-3 and file-4 compacted to file-5 (includes test).
 3) Delete row named test.
 4) Insert 50 rows. During this step, row test is included in a minor 
 compaction:
file-6, file-7, file-8 and file-9 compacted to file-10 (should include 
 tombstoned test).
 After step 4, row test is live again.
 Test environment:
 Single node with empty database.
 Standard configured super-column-family (I see this behavior with several 
 gc_grace settings (big and small values):
 create column family Customers with column_type = 'Super' and comparator = 
 'BytesType;
 In Cassandra 0.7.6 I observe the expected behavior, i.e. after step 4, the 
 row is still deleted.
 I've included a .NET program to reproduce the problem. I will add a Java 
 version later on.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira




svn commit: r1143372 - in /cassandra/trunk: ./ contrib/ interface/thrift/gen-java/org/apache/cassandra/thrift/ src/java/org/apache/cassandra/db/ src/java/org/apache/cassandra/db/compaction/ test/unit/

2011-07-06 Thread slebresne
Author: slebresne
Date: Wed Jul  6 12:17:23 2011
New Revision: 1143372

URL: http://svn.apache.org/viewvc?rev=1143372view=rev
Log:
merge from 0.8

Modified:
cassandra/trunk/   (props changed)
cassandra/trunk/CHANGES.txt
cassandra/trunk/contrib/   (props changed)

cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java
   (props changed)

cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/Column.java
   (props changed)

cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/InvalidRequestException.java
   (props changed)

cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/NotFoundException.java
   (props changed)

cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/SuperColumn.java
   (props changed)
cassandra/trunk/src/java/org/apache/cassandra/db/EchoedRow.java

cassandra/trunk/src/java/org/apache/cassandra/db/compaction/CompactionController.java
cassandra/trunk/test/unit/org/apache/cassandra/Util.java

cassandra/trunk/test/unit/org/apache/cassandra/db/compaction/CompactionsTest.java

Propchange: cassandra/trunk/
--
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Jul  6 12:17:23 2011
@@ -1,7 +1,7 @@
 
/cassandra/branches/cassandra-0.6:922689-1052356,1052358-1053452,1053454,1053456-1131291
 /cassandra/branches/cassandra-0.7:1026516-1140567,1141129,1141213,1141217
 /cassandra/branches/cassandra-0.7.0:1053690-1055654
-/cassandra/branches/cassandra-0.8:1090934-1125013,1125019-1140755,1140760,1141134,1141214,1141220
+/cassandra/branches/cassandra-0.8:1090934-1125013,1125019-1140755,1140760,1141134,1141214,1141220,1143352
 /cassandra/branches/cassandra-0.8.0:1125021-1130369
 /cassandra/branches/cassandra-0.8.1:1101014-1125018
 /cassandra/tags/cassandra-0.7.0-rc3:1051699-1053689

Modified: cassandra/trunk/CHANGES.txt
URL: 
http://svn.apache.org/viewvc/cassandra/trunk/CHANGES.txt?rev=1143372r1=1143371r2=1143372view=diff
==
--- cassandra/trunk/CHANGES.txt (original)
+++ cassandra/trunk/CHANGES.txt Wed Jul  6 12:17:23 2011
@@ -26,6 +26,7 @@
(CASSANDRA-2823)
  * Fix race in SystemTable.getCurrentLocalNodeId (CASSANDRA-2824)
  * Correctly set default for replicate_on_write (CASSANDRA-2835)
+ * handle row tombstones correctly in EchoedRow (CASSANDRA-2786)
 
 
 0.8.1

Propchange: cassandra/trunk/contrib/
--
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Jul  6 12:17:23 2011
@@ -1,7 +1,7 @@
 
/cassandra/branches/cassandra-0.6/contrib:922689-1052356,1052358-1053452,1053454,1053456-1068009
 
/cassandra/branches/cassandra-0.7/contrib:1026516-1140567,1141129,1141213,1141217
 /cassandra/branches/cassandra-0.7.0/contrib:1053690-1055654
-/cassandra/branches/cassandra-0.8/contrib:1090934-1125013,1125019-1140755,1140760,1141134,1141214,1141220
+/cassandra/branches/cassandra-0.8/contrib:1090934-1125013,1125019-1140755,1140760,1141134,1141214,1141220,1143352
 /cassandra/branches/cassandra-0.8.0/contrib:1125021-1130369
 /cassandra/branches/cassandra-0.8.1/contrib:1101014-1125018
 /cassandra/tags/cassandra-0.7.0-rc3/contrib:1051699-1053689

Propchange: 
cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java
--
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Jul  6 12:17:23 2011
@@ -1,7 +1,7 @@
 
/cassandra/branches/cassandra-0.6/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java:922689-1052356,1052358-1053452,1053454,1053456-1131291
 
/cassandra/branches/cassandra-0.7/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java:1026516-1140567,1141129,1141213,1141217
 
/cassandra/branches/cassandra-0.7.0/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java:1053690-1055654
-/cassandra/branches/cassandra-0.8/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java:1090934-1125013,1125019-1140755,1140760,1141134,1141214,1141220
+/cassandra/branches/cassandra-0.8/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java:1090934-1125013,1125019-1140755,1140760,1141134,1141214,1141220,1143352
 
/cassandra/branches/cassandra-0.8.0/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java:1125021-1130369
 
/cassandra/branches/cassandra-0.8.1/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java:1101014-1125018
 
/cassandra/tags/cassandra-0.7.0-rc3/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java:1051699-1053689

Propchange: 
cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/Column.java
--
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Jul  6 

[jira] [Commented] (CASSANDRA-2786) After a minor compaction, deleted key-slices are visible again

2011-07-06 Thread Sylvain Lebresne (JIRA)

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

Sylvain Lebresne commented on CASSANDRA-2786:
-

Committed, thanks.

bq. Nit: wouldn't it be cleaner to just pass gcBefore rather than the entire 
controller to EchoedRow constructor?

I passed the controller because Precompacted and LazilyCompacted do that too, 
so it felt slightly cleaner, and if we happen to need more info from the 
controller in the future, it'll be there. But really at the end I did not 
change it before committing out of laziness :)

 After a minor compaction, deleted key-slices are visible again
 --

 Key: CASSANDRA-2786
 URL: https://issues.apache.org/jira/browse/CASSANDRA-2786
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Affects Versions: 0.8.0
 Environment: Reproduced on single Cassandra node (CentOS 5.5)
 Reproduced on single Cassandra node (Windows Server 2008)
Reporter: rene kochen
Assignee: Sylvain Lebresne
 Fix For: 0.8.1, 0.8.2

 Attachments: 0001-Fix-wrong-purge-of-deleted-cf.patch, 
 2786_part2.patch, CassandraIssue.zip, CassandraIssueJava.zip


 After a minor compaction, deleted key-slices are visible again.
 Steps to reproduce:
 1) Insert a row named test.
 2) Insert 50 rows. During this step, row test is included in a major 
 compaction:
file-1, file-2, file-3 and file-4 compacted to file-5 (includes test).
 3) Delete row named test.
 4) Insert 50 rows. During this step, row test is included in a minor 
 compaction:
file-6, file-7, file-8 and file-9 compacted to file-10 (should include 
 tombstoned test).
 After step 4, row test is live again.
 Test environment:
 Single node with empty database.
 Standard configured super-column-family (I see this behavior with several 
 gc_grace settings (big and small values):
 create column family Customers with column_type = 'Super' and comparator = 
 'BytesType;
 In Cassandra 0.7.6 I observe the expected behavior, i.e. after step 4, the 
 row is still deleted.
 I've included a .NET program to reproduce the problem. I will add a Java 
 version later on.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (CASSANDRA-2804) expose dropped messages, exceptions over JMX

2011-07-06 Thread Sylvain Lebresne (JIRA)

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

Sylvain Lebresne commented on CASSANDRA-2804:
-

In getRecentlyDroppedMessages, the last line of the for loop should be
{noformat}
  lastDropped.put(verb, dropped);
{noformat}
Other than that, +1.

 expose dropped messages, exceptions over JMX
 

 Key: CASSANDRA-2804
 URL: https://issues.apache.org/jira/browse/CASSANDRA-2804
 Project: Cassandra
  Issue Type: Improvement
  Components: Tools
Reporter: Jonathan Ellis
Assignee: Jonathan Ellis
Priority: Minor
 Fix For: 0.8.2

 Attachments: 2804-v2.txt, 2804.txt, 
 twttr-cassandra-0.8-counts-resync-droppedmsg-metric.diff


 Patch against 0.7.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (CASSANDRA-2843) better performance on long row read

2011-07-06 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis commented on CASSANDRA-2843:
---

bq. I first check if adding at the tail is legit and fail back to a binary 
search if that is not the case ... we should choose the more efficient 
implementation for each use case

I agree with the second part, but doesn't that imply that if we're doing 
non-sorted inserts that we should be using the CSLM or TM version instead of 
trying to support everything from the AL version?

 better performance on long row read
 ---

 Key: CASSANDRA-2843
 URL: https://issues.apache.org/jira/browse/CASSANDRA-2843
 Project: Cassandra
  Issue Type: New Feature
Reporter: Yang Yang
 Attachments: 2843.patch, fast_cf_081_trunk.diff, microBenchmark.patch


 currently if a row contains  1000 columns, the run time becomes considerably 
 slow (my test of 
 a row with 30 00 columns (standard, regular) each with 8 bytes in name, and 
 40 bytes in value, is about 16ms.
 this is all running in memory, no disk read is involved.
 through debugging we can find
 most of this time is spent on 
 [Wall Time]  org.apache.cassandra.db.Table.getRow(QueryFilter)
 [Wall Time]  
 org.apache.cassandra.db.ColumnFamilyStore.getColumnFamily(QueryFilter, 
 ColumnFamily)
 [Wall Time]  
 org.apache.cassandra.db.ColumnFamilyStore.getColumnFamily(QueryFilter, int, 
 ColumnFamily)
 [Wall Time]  
 org.apache.cassandra.db.ColumnFamilyStore.getTopLevelColumns(QueryFilter, 
 int, ColumnFamily)
 [Wall Time]  
 org.apache.cassandra.db.filter.QueryFilter.collectCollatedColumns(ColumnFamily,
  Iterator, int)
 [Wall Time]  
 org.apache.cassandra.db.filter.SliceQueryFilter.collectReducedColumns(IColumnContainer,
  Iterator, int)
 [Wall Time]  org.apache.cassandra.db.ColumnFamily.addColumn(IColumn)
 ColumnFamily.addColumn() is slow because it inserts into an internal 
 concurrentSkipListMap() that maps column names to values.
 this structure is slow for two reasons: it needs to do synchronization; it 
 needs to maintain a more complex structure of map.
 but if we look at the whole read path, thrift already defines the read output 
 to be ListColumnOrSuperColumn so it does not make sense to use a luxury map 
 data structure in the interium and finally convert it to a list. on the 
 synchronization side, since the return CF is never going to be 
 shared/modified by other threads, we know the access is always single thread, 
 so no synchronization is needed.
 but these 2 features are indeed needed for ColumnFamily in other cases, 
 particularly write. so we can provide a different ColumnFamily to 
 CFS.getTopLevelColumnFamily(), so getTopLevelColumnFamily no longer always 
 creates the standard ColumnFamily, but take a provided returnCF, whose cost 
 is much cheaper.
 the provided patch is for demonstration now, will work further once we agree 
 on the general direction. 
 CFS, ColumnFamily, and Table  are changed; a new FastColumnFamily is 
 provided. the main work is to let the FastColumnFamily use an array  for 
 internal storage. at first I used binary search to insert new columns in 
 addColumn(), but later I found that even this is not necessary, since all 
 calling scenarios of ColumnFamily.addColumn() has an invariant that the 
 inserted columns come in sorted order (I still have an issue to resolve 
 descending or ascending  now, but ascending works). so the current logic is 
 simply to compare the new column against the end column in the array, if 
 names not equal, append, if equal, reconcile.
 slight temporary hacks are made on getTopLevelColumnFamily so we have 2 
 flavors of the method, one accepting a returnCF. but we could definitely 
 think about what is the better way to provide this returnCF.
 this patch compiles fine, no tests are provided yet. but I tested it in my 
 application, and the performance improvement is dramatic: it offers about 50% 
 reduction in read time in the 3000-column case.
 thanks
 Yang

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Updated] (CASSANDRA-2863) NPE when writing SSTable generated via repair

2011-07-06 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis updated CASSANDRA-2863:
--

Fix Version/s: 0.8.2
 Assignee: Sylvain Lebresne

 NPE when writing SSTable generated via repair
 -

 Key: CASSANDRA-2863
 URL: https://issues.apache.org/jira/browse/CASSANDRA-2863
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Affects Versions: 0.8.1
Reporter: Héctor Izquierdo
Assignee: Sylvain Lebresne
 Fix For: 0.8.2


 A NPE is generated during repair when closing an sstable generated via 
 SSTable build. It doesn't happen always. The node had been scrubbed and 
 compacted before calling repair.
  INFO [CompactionExecutor:2] 2011-07-06 11:11:32,640 SSTableReader.java (line 
 158) Opening /d2/cassandra/data/sbs/walf-g-730
 ERROR [CompactionExecutor:2] 2011-07-06 11:11:34,327 
 AbstractCassandraDaemon.java (line 113) Fatal exception in thread 
 Thread[CompactionExecutor:2,1,main] 
 java.lang.NullPointerException
   at 
 org.apache.cassandra.io.sstable.SSTableWriter$RowIndexer.close(SSTableWriter.java:382)
   at 
 org.apache.cassandra.io.sstable.SSTableWriter$RowIndexer.index(SSTableWriter.java:370)
   at 
 org.apache.cassandra.io.sstable.SSTableWriter$Builder.build(SSTableWriter.java:315)
   at 
 org.apache.cassandra.db.compaction.CompactionManager$9.call(CompactionManager.java:1103)
   at 
 org.apache.cassandra.db.compaction.CompactionManager$9.call(CompactionManager.java:1094)
   at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
   at java.util.concurrent.FutureTask.run(FutureTask.java:138)
   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)

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (CASSANDRA-2786) After a minor compaction, deleted key-slices are visible again

2011-07-06 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis commented on CASSANDRA-2786:
---

bq. Precompacted and LazilyCompacted do that too

That makes sense.

 After a minor compaction, deleted key-slices are visible again
 --

 Key: CASSANDRA-2786
 URL: https://issues.apache.org/jira/browse/CASSANDRA-2786
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Affects Versions: 0.8.0
 Environment: Reproduced on single Cassandra node (CentOS 5.5)
 Reproduced on single Cassandra node (Windows Server 2008)
Reporter: rene kochen
Assignee: Sylvain Lebresne
 Fix For: 0.8.1, 0.8.2

 Attachments: 0001-Fix-wrong-purge-of-deleted-cf.patch, 
 2786_part2.patch, CassandraIssue.zip, CassandraIssueJava.zip


 After a minor compaction, deleted key-slices are visible again.
 Steps to reproduce:
 1) Insert a row named test.
 2) Insert 50 rows. During this step, row test is included in a major 
 compaction:
file-1, file-2, file-3 and file-4 compacted to file-5 (includes test).
 3) Delete row named test.
 4) Insert 50 rows. During this step, row test is included in a minor 
 compaction:
file-6, file-7, file-8 and file-9 compacted to file-10 (should include 
 tombstoned test).
 After step 4, row test is live again.
 Test environment:
 Single node with empty database.
 Standard configured super-column-family (I see this behavior with several 
 gc_grace settings (big and small values):
 create column family Customers with column_type = 'Super' and comparator = 
 'BytesType;
 In Cassandra 0.7.6 I observe the expected behavior, i.e. after step 4, the 
 row is still deleted.
 I've included a .NET program to reproduce the problem. I will add a Java 
 version later on.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira




svn commit: r1143397 - /cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/cli/CliClient.java

2011-07-06 Thread jbellis
Author: jbellis
Date: Wed Jul  6 13:16:14 2011
New Revision: 1143397

URL: http://svn.apache.org/viewvc?rev=1143397view=rev
Log:
add initCause to cliclient exceptions
patch by Jackson Chung; reviewed by jbellis for CASSANDRA-2746

Modified:

cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/cli/CliClient.java

Modified: 
cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/cli/CliClient.java
URL: 
http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/cli/CliClient.java?rev=1143397r1=1143396r2=1143397view=diff
==
--- 
cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/cli/CliClient.java
 (original)
+++ 
cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/cli/CliClient.java
 Wed Jul  6 13:16:14 2011
@@ -287,15 +287,21 @@ public class CliClient
 }
 catch (InvalidRequestException e)
 {
-throw new RuntimeException(e.getWhy());
+   RuntimeException rtEx = new RuntimeException(e.getWhy());
+rtEx.initCause(e);
+throw rtEx;
 }
 catch (SchemaDisagreementException e)
 {
-throw new RuntimeException(schema does not match across nodes, 
(try again later).);
+   RuntimeException rtEx = new RuntimeException(schema does not 
match across nodes, (try again later).);
+rtEx.initCause(e);
+throw new RuntimeException();
 }
 catch (Exception e)
 {
-throw new RuntimeException(e.getMessage());
+RuntimeException rtEx = new RuntimeException(e.getMessage());
+rtEx.initCause(e);
+throw rtEx;
 }
 }
 




[jira] [Resolved] (CASSANDRA-2746) CliClient does not log root cause exception when catch it from executeCLIStatement

2011-07-06 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis resolved CASSANDRA-2746.
---

Resolution: Fixed
  Reviewer: jbellis

committed, thanks!

 CliClient does not log root cause exception when catch it from 
 executeCLIStatement
 --

 Key: CASSANDRA-2746
 URL: https://issues.apache.org/jira/browse/CASSANDRA-2746
 Project: Cassandra
  Issue Type: Bug
  Components: Tools
Reporter: Jackson Chung
Assignee: Jackson Chung
Priority: Trivial
 Fix For: 0.8.2

 Attachments: patch2746.txt


 When executing a statement from the cassandra-cli (with --debug) , if an 
 exception is thrown from one of the cases in side the executeCLIStatement 
 method, the root cause is swallowed. For specific case such as the 
 InvalidRequestException or the SchemaDisagreementException, just the message 
 itself maybe enough, but for the general Exception case, without the root 
 cause, it could be difficult to debug the issue. 
 For example, we have seen exception like:
 {noformat}
 null
 java.lang.RuntimeException
 at org.apache.cassandra.cli.CliClient.executeCLIStatement(CliClient.java:209)
 at org.apache.cassandra.cli.CliMain.processStatement(CliMain.java:223)
 at org.apache.cassandra.cli.CliMain.main(CliMain.java:351)
 {noformat}
 the null there would most likely indicate this is a NPE (though it could 
 still be any Exception with null message). By adding a initCause to the 
 caught exception, we could see the root cause, eg:
 {noformat}
 null
 java.lang.RuntimeException
 at 
 org.apache.cassandra.cli.CliClient.executeCLIStatement(CliClient.java:212)
 at org.apache.cassandra.cli.CliMain.processStatement(CliMain.java:223)
 at org.apache.cassandra.cli.CliMain.main(CliMain.java:351)
 Caused by: java.lang.NullPointerException
 at 
 org.apache.cassandra.cli.CliClient.describeKeySpace(CliClient.java:1336)
 at 
 org.apache.cassandra.cli.CliClient.executeShowKeySpaces(CliClient.java:1166)
 at 
 org.apache.cassandra.cli.CliClient.executeCLIStatement(CliClient.java:170)
 ... 2 more
 {noformat}
 submitting a patch here that would add the initCause to all caught exceptions 
 here. But the most important one is the general Exception case.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Updated] (CASSANDRA-2746) CliClient does not log root cause exception when catch it from executeCLIStatement

2011-07-06 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis updated CASSANDRA-2746:
--

  Component/s: Tools
 Priority: Trivial  (was: Major)
Fix Version/s: 0.8.2
 Assignee: Jackson Chung

 CliClient does not log root cause exception when catch it from 
 executeCLIStatement
 --

 Key: CASSANDRA-2746
 URL: https://issues.apache.org/jira/browse/CASSANDRA-2746
 Project: Cassandra
  Issue Type: Bug
  Components: Tools
Reporter: Jackson Chung
Assignee: Jackson Chung
Priority: Trivial
 Fix For: 0.8.2

 Attachments: patch2746.txt


 When executing a statement from the cassandra-cli (with --debug) , if an 
 exception is thrown from one of the cases in side the executeCLIStatement 
 method, the root cause is swallowed. For specific case such as the 
 InvalidRequestException or the SchemaDisagreementException, just the message 
 itself maybe enough, but for the general Exception case, without the root 
 cause, it could be difficult to debug the issue. 
 For example, we have seen exception like:
 {noformat}
 null
 java.lang.RuntimeException
 at org.apache.cassandra.cli.CliClient.executeCLIStatement(CliClient.java:209)
 at org.apache.cassandra.cli.CliMain.processStatement(CliMain.java:223)
 at org.apache.cassandra.cli.CliMain.main(CliMain.java:351)
 {noformat}
 the null there would most likely indicate this is a NPE (though it could 
 still be any Exception with null message). By adding a initCause to the 
 caught exception, we could see the root cause, eg:
 {noformat}
 null
 java.lang.RuntimeException
 at 
 org.apache.cassandra.cli.CliClient.executeCLIStatement(CliClient.java:212)
 at org.apache.cassandra.cli.CliMain.processStatement(CliMain.java:223)
 at org.apache.cassandra.cli.CliMain.main(CliMain.java:351)
 Caused by: java.lang.NullPointerException
 at 
 org.apache.cassandra.cli.CliClient.describeKeySpace(CliClient.java:1336)
 at 
 org.apache.cassandra.cli.CliClient.executeShowKeySpaces(CliClient.java:1166)
 at 
 org.apache.cassandra.cli.CliClient.executeCLIStatement(CliClient.java:170)
 ... 2 more
 {noformat}
 submitting a patch here that would add the initCause to all caught exceptions 
 here. But the most important one is the general Exception case.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (CASSANDRA-2856) log unavailableexception details at debug level

2011-07-06 Thread Sylvain Lebresne (JIRA)

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

Sylvain Lebresne commented on CASSANDRA-2856:
-

+1

 log unavailableexception details at debug level
 ---

 Key: CASSANDRA-2856
 URL: https://issues.apache.org/jira/browse/CASSANDRA-2856
 Project: Cassandra
  Issue Type: Improvement
Reporter: Jonathan Ellis
Assignee: Jonathan Ellis
Priority: Trivial
 Fix For: 0.7.7, 0.8.2

 Attachments: 2856.txt




--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira




svn commit: r1143399 - in /cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/service: DatacenterReadCallback.java ReadCallback.java

2011-07-06 Thread jbellis
Author: jbellis
Date: Wed Jul  6 13:23:29 2011
New Revision: 1143399

URL: http://svn.apache.org/viewvc?rev=1143399view=rev
Log:
log unavailableexception details at debug level
patch by jbellis; reviewed by slebresne for CASSANDRA-2856

Modified:

cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/service/DatacenterReadCallback.java

cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/service/ReadCallback.java

Modified: 
cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/service/DatacenterReadCallback.java
URL: 
http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/service/DatacenterReadCallback.java?rev=1143399r1=1143398r2=1143399view=diff
==
--- 
cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/service/DatacenterReadCallback.java
 (original)
+++ 
cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/service/DatacenterReadCallback.java
 Wed Jul  6 13:23:29 2011
@@ -77,8 +77,21 @@ public class DatacenterReadCallbackT e
 if (localdc.equals(snitch.getDatacenter(endpoint)))
 localEndpoints++;
 }
-
-if(localEndpoints  blockfor)
+
+if (localEndpoints  blockfor)
+{
+if (logger.isDebugEnabled())
+{
+StringBuilder builder = new StringBuilder(Local replicas [);
+for (InetAddress endpoint : endpoints)
+{
+if (localdc.equals(snitch.getDatacenter(endpoint)))
+builder.append(endpoint).append(, );
+}
+builder.append(] are insufficient to satisfy LOCAL_QUORUM 
requirement of ).append(blockfor).append( live nodes);
+}
+
 throw new UnavailableException();
+}
 }
 }

Modified: 
cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/service/ReadCallback.java
URL: 
http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/service/ReadCallback.java?rev=1143399r1=1143398r2=1143399view=diff
==
--- 
cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/service/ReadCallback.java
 (original)
+++ 
cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/service/ReadCallback.java
 Wed Jul  6 13:23:29 2011
@@ -204,7 +204,11 @@ public class ReadCallbackT implements 
 public void assureSufficientLiveNodes() throws UnavailableException
 {
 if (endpoints.size()  blockfor)
+{
+logger.debug(Live nodes {} do not satisfy ConsistencyLevel ({} 
required),
+ StringUtils.join(endpoints, , ), blockfor);
 throw new UnavailableException();
+}
 }
 
 public boolean isLatencyForSnitch()




[jira] [Commented] (CASSANDRA-2843) better performance on long row read

2011-07-06 Thread Sylvain Lebresne (JIRA)

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

Sylvain Lebresne commented on CASSANDRA-2843:
-

bq.  but doesn't that imply that if we're doing non-sorted inserts that we 
should be using the CSLM or TM version instead of trying to support everything 
from the AL version

Totally agree. I was going to say that following this, we should look at using 
a non-synchronized implementation in other parts like compaction, but there it 
may be better to use the TM one. But for reads, I think the AL one should be 
the fastest.

 better performance on long row read
 ---

 Key: CASSANDRA-2843
 URL: https://issues.apache.org/jira/browse/CASSANDRA-2843
 Project: Cassandra
  Issue Type: New Feature
Reporter: Yang Yang
 Attachments: 2843.patch, fast_cf_081_trunk.diff, microBenchmark.patch


 currently if a row contains  1000 columns, the run time becomes considerably 
 slow (my test of 
 a row with 30 00 columns (standard, regular) each with 8 bytes in name, and 
 40 bytes in value, is about 16ms.
 this is all running in memory, no disk read is involved.
 through debugging we can find
 most of this time is spent on 
 [Wall Time]  org.apache.cassandra.db.Table.getRow(QueryFilter)
 [Wall Time]  
 org.apache.cassandra.db.ColumnFamilyStore.getColumnFamily(QueryFilter, 
 ColumnFamily)
 [Wall Time]  
 org.apache.cassandra.db.ColumnFamilyStore.getColumnFamily(QueryFilter, int, 
 ColumnFamily)
 [Wall Time]  
 org.apache.cassandra.db.ColumnFamilyStore.getTopLevelColumns(QueryFilter, 
 int, ColumnFamily)
 [Wall Time]  
 org.apache.cassandra.db.filter.QueryFilter.collectCollatedColumns(ColumnFamily,
  Iterator, int)
 [Wall Time]  
 org.apache.cassandra.db.filter.SliceQueryFilter.collectReducedColumns(IColumnContainer,
  Iterator, int)
 [Wall Time]  org.apache.cassandra.db.ColumnFamily.addColumn(IColumn)
 ColumnFamily.addColumn() is slow because it inserts into an internal 
 concurrentSkipListMap() that maps column names to values.
 this structure is slow for two reasons: it needs to do synchronization; it 
 needs to maintain a more complex structure of map.
 but if we look at the whole read path, thrift already defines the read output 
 to be ListColumnOrSuperColumn so it does not make sense to use a luxury map 
 data structure in the interium and finally convert it to a list. on the 
 synchronization side, since the return CF is never going to be 
 shared/modified by other threads, we know the access is always single thread, 
 so no synchronization is needed.
 but these 2 features are indeed needed for ColumnFamily in other cases, 
 particularly write. so we can provide a different ColumnFamily to 
 CFS.getTopLevelColumnFamily(), so getTopLevelColumnFamily no longer always 
 creates the standard ColumnFamily, but take a provided returnCF, whose cost 
 is much cheaper.
 the provided patch is for demonstration now, will work further once we agree 
 on the general direction. 
 CFS, ColumnFamily, and Table  are changed; a new FastColumnFamily is 
 provided. the main work is to let the FastColumnFamily use an array  for 
 internal storage. at first I used binary search to insert new columns in 
 addColumn(), but later I found that even this is not necessary, since all 
 calling scenarios of ColumnFamily.addColumn() has an invariant that the 
 inserted columns come in sorted order (I still have an issue to resolve 
 descending or ascending  now, but ascending works). so the current logic is 
 simply to compare the new column against the end column in the array, if 
 names not equal, append, if equal, reconcile.
 slight temporary hacks are made on getTopLevelColumnFamily so we have 2 
 flavors of the method, one accepting a returnCF. but we could definitely 
 think about what is the better way to provide this returnCF.
 this patch compiles fine, no tests are provided yet. but I tested it in my 
 application, and the performance improvement is dramatic: it offers about 50% 
 reduction in read time in the 3000-column case.
 thanks
 Yang

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira




svn commit: r1143401 - /cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/service/DatacenterReadCallback.java

2011-07-06 Thread jbellis
Author: jbellis
Date: Wed Jul  6 13:27:19 2011
New Revision: 1143401

URL: http://svn.apache.org/viewvc?rev=1143401view=rev
Log:
actually log the built replica list (#2746)

Modified:

cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/service/DatacenterReadCallback.java

Modified: 
cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/service/DatacenterReadCallback.java
URL: 
http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/service/DatacenterReadCallback.java?rev=1143401r1=1143400r2=1143401view=diff
==
--- 
cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/service/DatacenterReadCallback.java
 (original)
+++ 
cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/service/DatacenterReadCallback.java
 Wed Jul  6 13:27:19 2011
@@ -86,9 +86,10 @@ public class DatacenterReadCallbackT e
 for (InetAddress endpoint : endpoints)
 {
 if (localdc.equals(snitch.getDatacenter(endpoint)))
-builder.append(endpoint).append(, );
+builder.append(endpoint).append(,);
 }
 builder.append(] are insufficient to satisfy LOCAL_QUORUM 
requirement of ).append(blockfor).append( live nodes);
+logger.debug(builder.toString());
 }
 
 throw new UnavailableException();




[jira] [Commented] (CASSANDRA-2843) better performance on long row read

2011-07-06 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis commented on CASSANDRA-2843:
---

Doesn't it make sense then to change the AL fallback-to-bsearch into an 
assertion failure?

 better performance on long row read
 ---

 Key: CASSANDRA-2843
 URL: https://issues.apache.org/jira/browse/CASSANDRA-2843
 Project: Cassandra
  Issue Type: New Feature
Reporter: Yang Yang
 Attachments: 2843.patch, fast_cf_081_trunk.diff, microBenchmark.patch


 currently if a row contains  1000 columns, the run time becomes considerably 
 slow (my test of 
 a row with 30 00 columns (standard, regular) each with 8 bytes in name, and 
 40 bytes in value, is about 16ms.
 this is all running in memory, no disk read is involved.
 through debugging we can find
 most of this time is spent on 
 [Wall Time]  org.apache.cassandra.db.Table.getRow(QueryFilter)
 [Wall Time]  
 org.apache.cassandra.db.ColumnFamilyStore.getColumnFamily(QueryFilter, 
 ColumnFamily)
 [Wall Time]  
 org.apache.cassandra.db.ColumnFamilyStore.getColumnFamily(QueryFilter, int, 
 ColumnFamily)
 [Wall Time]  
 org.apache.cassandra.db.ColumnFamilyStore.getTopLevelColumns(QueryFilter, 
 int, ColumnFamily)
 [Wall Time]  
 org.apache.cassandra.db.filter.QueryFilter.collectCollatedColumns(ColumnFamily,
  Iterator, int)
 [Wall Time]  
 org.apache.cassandra.db.filter.SliceQueryFilter.collectReducedColumns(IColumnContainer,
  Iterator, int)
 [Wall Time]  org.apache.cassandra.db.ColumnFamily.addColumn(IColumn)
 ColumnFamily.addColumn() is slow because it inserts into an internal 
 concurrentSkipListMap() that maps column names to values.
 this structure is slow for two reasons: it needs to do synchronization; it 
 needs to maintain a more complex structure of map.
 but if we look at the whole read path, thrift already defines the read output 
 to be ListColumnOrSuperColumn so it does not make sense to use a luxury map 
 data structure in the interium and finally convert it to a list. on the 
 synchronization side, since the return CF is never going to be 
 shared/modified by other threads, we know the access is always single thread, 
 so no synchronization is needed.
 but these 2 features are indeed needed for ColumnFamily in other cases, 
 particularly write. so we can provide a different ColumnFamily to 
 CFS.getTopLevelColumnFamily(), so getTopLevelColumnFamily no longer always 
 creates the standard ColumnFamily, but take a provided returnCF, whose cost 
 is much cheaper.
 the provided patch is for demonstration now, will work further once we agree 
 on the general direction. 
 CFS, ColumnFamily, and Table  are changed; a new FastColumnFamily is 
 provided. the main work is to let the FastColumnFamily use an array  for 
 internal storage. at first I used binary search to insert new columns in 
 addColumn(), but later I found that even this is not necessary, since all 
 calling scenarios of ColumnFamily.addColumn() has an invariant that the 
 inserted columns come in sorted order (I still have an issue to resolve 
 descending or ascending  now, but ascending works). so the current logic is 
 simply to compare the new column against the end column in the array, if 
 names not equal, append, if equal, reconcile.
 slight temporary hacks are made on getTopLevelColumnFamily so we have 2 
 flavors of the method, one accepting a returnCF. but we could definitely 
 think about what is the better way to provide this returnCF.
 this patch compiles fine, no tests are provided yet. but I tested it in my 
 application, and the performance improvement is dramatic: it offers about 50% 
 reduction in read time in the 3000-column case.
 thanks
 Yang

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira




svn commit: r1143404 - in /cassandra/branches/cassandra-0.8: ./ contrib/ interface/thrift/gen-java/org/apache/cassandra/thrift/ src/java/org/apache/cassandra/service/

2011-07-06 Thread jbellis
Author: jbellis
Date: Wed Jul  6 13:31:54 2011
New Revision: 1143404

URL: http://svn.apache.org/viewvc?rev=1143404view=rev
Log:
merge from 0.7

Modified:
cassandra/branches/cassandra-0.8/   (props changed)
cassandra/branches/cassandra-0.8/contrib/   (props changed)

cassandra/branches/cassandra-0.8/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java
   (props changed)

cassandra/branches/cassandra-0.8/interface/thrift/gen-java/org/apache/cassandra/thrift/Column.java
   (props changed)

cassandra/branches/cassandra-0.8/interface/thrift/gen-java/org/apache/cassandra/thrift/InvalidRequestException.java
   (props changed)

cassandra/branches/cassandra-0.8/interface/thrift/gen-java/org/apache/cassandra/thrift/NotFoundException.java
   (props changed)

cassandra/branches/cassandra-0.8/interface/thrift/gen-java/org/apache/cassandra/thrift/SuperColumn.java
   (props changed)

cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/service/DatacenterReadCallback.java

cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/service/ReadCallback.java

Propchange: cassandra/branches/cassandra-0.8/
--
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Jul  6 13:31:54 2011
@@ -1,5 +1,5 @@
 
/cassandra/branches/cassandra-0.6:922689-1052356,1052358-1053452,1053454,1053456-1131291
-/cassandra/branches/cassandra-0.7:1026516-1142727
+/cassandra/branches/cassandra-0.7:1026516-1143403
 /cassandra/branches/cassandra-0.7.0:1053690-1055654
 /cassandra/branches/cassandra-0.8:1090934-1125013,1125041
 /cassandra/branches/cassandra-0.8.0:1125021-1130369

Propchange: cassandra/branches/cassandra-0.8/contrib/
--
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Jul  6 13:31:54 2011
@@ -1,5 +1,5 @@
 
/cassandra/branches/cassandra-0.6/contrib:922689-1052356,1052358-1053452,1053454,1053456-1068009
-/cassandra/branches/cassandra-0.7/contrib:1026516-1142727
+/cassandra/branches/cassandra-0.7/contrib:1026516-1143403
 /cassandra/branches/cassandra-0.7.0/contrib:1053690-1055654
 /cassandra/branches/cassandra-0.8/contrib:1090934-1125013,1125041
 /cassandra/branches/cassandra-0.8.0/contrib:1125021-1130369

Propchange: 
cassandra/branches/cassandra-0.8/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java
--
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Jul  6 13:31:54 2011
@@ -1,5 +1,5 @@
 
/cassandra/branches/cassandra-0.6/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java:922689-1052356,1052358-1053452,1053454,1053456-1131291
-/cassandra/branches/cassandra-0.7/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java:1026516-1142727
+/cassandra/branches/cassandra-0.7/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java:1026516-1143403
 
/cassandra/branches/cassandra-0.7.0/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java:1053690-1055654
 
/cassandra/branches/cassandra-0.8/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java:1090934-1125013,1125041
 
/cassandra/branches/cassandra-0.8.0/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java:1125021-1130369

Propchange: 
cassandra/branches/cassandra-0.8/interface/thrift/gen-java/org/apache/cassandra/thrift/Column.java
--
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Jul  6 13:31:54 2011
@@ -1,5 +1,5 @@
 
/cassandra/branches/cassandra-0.6/interface/thrift/gen-java/org/apache/cassandra/thrift/Column.java:922689-1052356,1052358-1053452,1053454,1053456-1131291
-/cassandra/branches/cassandra-0.7/interface/thrift/gen-java/org/apache/cassandra/thrift/Column.java:1026516-1142727
+/cassandra/branches/cassandra-0.7/interface/thrift/gen-java/org/apache/cassandra/thrift/Column.java:1026516-1143403
 
/cassandra/branches/cassandra-0.7.0/interface/thrift/gen-java/org/apache/cassandra/thrift/Column.java:1053690-1055654
 
/cassandra/branches/cassandra-0.8/interface/thrift/gen-java/org/apache/cassandra/thrift/Column.java:1090934-1125013,1125041
 
/cassandra/branches/cassandra-0.8.0/interface/thrift/gen-java/org/apache/cassandra/thrift/Column.java:1125021-1130369

Propchange: 
cassandra/branches/cassandra-0.8/interface/thrift/gen-java/org/apache/cassandra/thrift/InvalidRequestException.java
--
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Jul  6 13:31:54 2011
@@ -1,5 +1,5 @@
 
/cassandra/branches/cassandra-0.6/interface/thrift/gen-java/org/apache/cassandra/thrift/InvalidRequestException.java:922689-1052356,1052358-1053452,1053454,1053456-1131291

[jira] [Commented] (CASSANDRA-2856) log unavailableexception details at debug level

2011-07-06 Thread Hudson (JIRA)

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

Hudson commented on CASSANDRA-2856:
---

Integrated in Cassandra-0.7 #521 (See 
[https://builds.apache.org/job/Cassandra-0.7/521/])
log unavailableexception details at debug level
patch by jbellis; reviewed by slebresne for CASSANDRA-2856

jbellis : 
http://svn.apache.org/viewcvs.cgi/?root=Apache-SVNview=revrev=1143399
Files : 
* 
/cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/service/ReadCallback.java
* 
/cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/service/DatacenterReadCallback.java


 log unavailableexception details at debug level
 ---

 Key: CASSANDRA-2856
 URL: https://issues.apache.org/jira/browse/CASSANDRA-2856
 Project: Cassandra
  Issue Type: Improvement
Reporter: Jonathan Ellis
Assignee: Jonathan Ellis
Priority: Trivial
 Fix For: 0.7.7, 0.8.2

 Attachments: 2856.txt




--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira




svn commit: r1143428 - in /cassandra/branches/cassandra-0.8: ./ src/java/org/apache/cassandra/net/ src/java/org/apache/cassandra/service/ src/java/org/apache/cassandra/tools/

2011-07-06 Thread jbellis
Author: jbellis
Date: Wed Jul  6 14:13:10 2011
New Revision: 1143428

URL: http://svn.apache.org/viewvc?rev=1143428view=rev
Log:
add MessagingService.get[Recently]DroppedMessages and 
StorageService.getExceptionCount
patch by jbellis and Ryan King; reviewed by slebresne for CASSANDRA-2804

Modified:
cassandra/branches/cassandra-0.8/CHANGES.txt

cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/net/MessageDeliveryTask.java

cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/net/MessagingService.java

cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/net/MessagingServiceMBean.java

cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/service/AbstractCassandraDaemon.java

cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/service/GCInspector.java

cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/service/StorageService.java

cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/service/StorageServiceMBean.java

cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/tools/NodeCmd.java

cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/tools/NodeProbe.java

Modified: cassandra/branches/cassandra-0.8/CHANGES.txt
URL: 
http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.8/CHANGES.txt?rev=1143428r1=1143427r2=1143428view=diff
==
--- cassandra/branches/cassandra-0.8/CHANGES.txt (original)
+++ cassandra/branches/cassandra-0.8/CHANGES.txt Wed Jul  6 14:13:10 2011
@@ -16,6 +16,8 @@
  * fix CLI perpetuating obsolete KsDef.replication_factor (CASSANDRA-2846)
  * improve cli treatment of multiline comments (CASSANDRA-2852)
  * handle row tombstones correctly in EchoedRow (CASSANDRA-2786)
+ * add MessagingService.get[Recently]DroppedMessages and
+   StorageService.getExceptionCount (CASSANDRA-2804)
 
 
 0.8.1

Modified: 
cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/net/MessageDeliveryTask.java
URL: 
http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/net/MessageDeliveryTask.java?rev=1143428r1=1143427r2=1143428view=diff
==
--- 
cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/net/MessageDeliveryTask.java
 (original)
+++ 
cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/net/MessageDeliveryTask.java
 Wed Jul  6 14:13:10 2011
@@ -42,33 +42,20 @@ public class MessageDeliveryTask impleme
 public void run()
 { 
 StorageService.Verb verb = message.getVerb();
-switch (verb)
+if (MessagingService.DROPPABLE_VERBS.contains(verb)
+ System.currentTimeMillis()  constructionTime + 
DatabaseDescriptor.getRpcTimeout())
 {
-case BINARY:
-case MUTATION:
-case READ:
-case RANGE_SLICE:
-case READ_REPAIR:
-case REQUEST_RESPONSE:
-if (System.currentTimeMillis()  constructionTime + 
DatabaseDescriptor.getRpcTimeout())
-{
-MessagingService.instance().incrementDroppedMessages(verb);
-return;
-}
-break;
-
-// don't bother.
-case UNUSED_1:
-case UNUSED_2:
-case UNUSED_3:
-return;
-
-default:
-break;
+MessagingService.instance().incrementDroppedMessages(verb);
+return;
 }
 
 IVerbHandler verbHandler = 
MessagingService.instance().getVerbHandler(verb);
-assert verbHandler != null : unknown verb  + verb;
+if (verbHandler == null)
+{
+logger_.debug(Unknown verb {}, verb);
+return;
+}
+
 verbHandler.doVerb(message, id);
 }
 }

Modified: 
cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/net/MessagingService.java
URL: 
http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/net/MessagingService.java?rev=1143428r1=1143427r2=1143428view=diff
==
--- 
cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/net/MessagingService.java
 (original)
+++ 
cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/net/MessagingService.java
 Wed Jul  6 14:13:10 2011
@@ -57,6 +57,8 @@ import org.cliffc.high_scale_lib.NonBloc
 
 public final class MessagingService implements MessagingServiceMBean
 {
+public static final String MBEAN_NAME = 
org.apache.cassandra.net:type=MessagingService;
+
 public static final int VERSION_07 = 1;
 public static final int version_ = 2;
 //TODO: make this parameter dynamic somehow.  Not sure if config is 
appropriate.
@@ -81,13 +83,33 @@ public final class 

[jira] [Created] (CASSANDRA-2864) Alternative Row Cache Implementation

2011-07-06 Thread Daniel Doubleday (JIRA)
Alternative Row Cache Implementation


 Key: CASSANDRA-2864
 URL: https://issues.apache.org/jira/browse/CASSANDRA-2864
 Project: Cassandra
  Issue Type: Improvement
  Components: Core
Affects Versions: 0.8.1
Reporter: Daniel Doubleday
Priority: Minor


we have been working on an alternative implementation to the existing row 
cache(s)

We have 2 main goals:

- Decrease memory - get more rows in the cache without suffering a huge 
performance penalty
- Reduce gc pressure

This sounds a lot like we should be using the new serializing cache in 0.8. 
Unfortunately our workload consists of loads of updates which would invalidate 
the cache all the time.

The second unfortunate thing is that the idea we came up with doesn't fit the 
new cache provider api...

It looks like this:

Like the serializing cache we basically only cache the serialized byte buffer. 
we don't serialize the bloom filter and try to do some other minor compression 
tricks (var ints etc not done yet). The main difference is that we don't 
deserialize but use the normal sstable iterators and filters as in the regular 
uncached case.

So the read path looks like this:

return filter.collectCollatedColumns(memtable iter, cached row iter)

The write path is not affected. It does not update the cache

During flush we merge all memtable updates with the cached rows.

The attached patch is based on 0.8 branch r1143352

It does not replace the existing row cache but sits aside it. Theres 
environment switch to choose the implementation. This way it is easy to 
benchmark performance differences.

-DuseSSTableCache=true enables the alternative cache. It shares its 
configuration with the standard row cache. So the cache capacity is shared. 

We have duplicated a fair amount of code. First we actually refactored the 
existing sstable filter / reader but than decided to minimize dependencies. 
Also this way it is easy to customize serialization for in memory sstable rows. 

We have also experimented a little with compaction but since this task at this 
stage is mainly to kick off discussion we wanted to keep things simple. But 
there is certainly room for optimizations.


--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Created] (CASSANDRA-2865) During repair mark a node as being repared, so no reads go to that node

2011-07-06 Thread JIRA
During repair mark a node as being repared, so no reads go to that node
---

 Key: CASSANDRA-2865
 URL: https://issues.apache.org/jira/browse/CASSANDRA-2865
 Project: Cassandra
  Issue Type: Improvement
  Components: Core
Affects Versions: 0.8.1
Reporter: Héctor Izquierdo


If a disk breaks and you lose a node data, when you bring it up again to do the 
repair, it will serve reads, and if clients are using CL.ONE, they will get bad 
data. Would it be possible to signal somehow that the node should not be 
trusted and reads should go to any other replica?

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Updated] (CASSANDRA-2864) Alternative Row Cache Implementation

2011-07-06 Thread Daniel Doubleday (JIRA)

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

Daniel Doubleday updated CASSANDRA-2864:


Attachment: rowcache.patch

 Alternative Row Cache Implementation
 

 Key: CASSANDRA-2864
 URL: https://issues.apache.org/jira/browse/CASSANDRA-2864
 Project: Cassandra
  Issue Type: Improvement
  Components: Core
Affects Versions: 0.8.1
Reporter: Daniel Doubleday
Priority: Minor
 Attachments: rowcache.patch


 we have been working on an alternative implementation to the existing row 
 cache(s)
 We have 2 main goals:
 - Decrease memory - get more rows in the cache without suffering a huge 
 performance penalty
 - Reduce gc pressure
 This sounds a lot like we should be using the new serializing cache in 0.8. 
 Unfortunately our workload consists of loads of updates which would 
 invalidate the cache all the time.
 The second unfortunate thing is that the idea we came up with doesn't fit the 
 new cache provider api...
 It looks like this:
 Like the serializing cache we basically only cache the serialized byte 
 buffer. we don't serialize the bloom filter and try to do some other minor 
 compression tricks (var ints etc not done yet). The main difference is that 
 we don't deserialize but use the normal sstable iterators and filters as in 
 the regular uncached case.
 So the read path looks like this:
 return filter.collectCollatedColumns(memtable iter, cached row iter)
 The write path is not affected. It does not update the cache
 During flush we merge all memtable updates with the cached rows.
 The attached patch is based on 0.8 branch r1143352
 It does not replace the existing row cache but sits aside it. Theres 
 environment switch to choose the implementation. This way it is easy to 
 benchmark performance differences.
 -DuseSSTableCache=true enables the alternative cache. It shares its 
 configuration with the standard row cache. So the cache capacity is shared. 
 We have duplicated a fair amount of code. First we actually refactored the 
 existing sstable filter / reader but than decided to minimize dependencies. 
 Also this way it is easy to customize serialization for in memory sstable 
 rows. 
 We have also experimented a little with compaction but since this task at 
 this stage is mainly to kick off discussion we wanted to keep things simple. 
 But there is certainly room for optimizations.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Resolved] (CASSANDRA-2865) During repair mark a node as being repared, so no reads go to that node

2011-07-06 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis resolved CASSANDRA-2865.
---

Resolution: Not A Problem

The right way to fix this is to removetoken the node w/ the bad disk, and 
rebootstrap it once it is repaired.  See 
http://wiki.apache.org/cassandra/Operations

 During repair mark a node as being repared, so no reads go to that node
 ---

 Key: CASSANDRA-2865
 URL: https://issues.apache.org/jira/browse/CASSANDRA-2865
 Project: Cassandra
  Issue Type: Improvement
  Components: Core
Affects Versions: 0.8.1
Reporter: Héctor Izquierdo

 If a disk breaks and you lose a node data, when you bring it up again to do 
 the repair, it will serve reads, and if clients are using CL.ONE, they will 
 get bad data. Would it be possible to signal somehow that the node should not 
 be trusted and reads should go to any other replica?

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (CASSANDRA-2746) CliClient does not log root cause exception when catch it from executeCLIStatement

2011-07-06 Thread Hudson (JIRA)

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

Hudson commented on CASSANDRA-2746:
---

Integrated in Cassandra-0.8 #206 (See 
[https://builds.apache.org/job/Cassandra-0.8/206/])
add initCause to cliclient exceptions
patch by Jackson Chung; reviewed by jbellis for CASSANDRA-2746

jbellis : 
http://svn.apache.org/viewcvs.cgi/?root=Apache-SVNview=revrev=1143397
Files : 
* 
/cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/cli/CliClient.java


 CliClient does not log root cause exception when catch it from 
 executeCLIStatement
 --

 Key: CASSANDRA-2746
 URL: https://issues.apache.org/jira/browse/CASSANDRA-2746
 Project: Cassandra
  Issue Type: Bug
  Components: Tools
Reporter: Jackson Chung
Assignee: Jackson Chung
Priority: Trivial
 Fix For: 0.8.2

 Attachments: patch2746.txt


 When executing a statement from the cassandra-cli (with --debug) , if an 
 exception is thrown from one of the cases in side the executeCLIStatement 
 method, the root cause is swallowed. For specific case such as the 
 InvalidRequestException or the SchemaDisagreementException, just the message 
 itself maybe enough, but for the general Exception case, without the root 
 cause, it could be difficult to debug the issue. 
 For example, we have seen exception like:
 {noformat}
 null
 java.lang.RuntimeException
 at org.apache.cassandra.cli.CliClient.executeCLIStatement(CliClient.java:209)
 at org.apache.cassandra.cli.CliMain.processStatement(CliMain.java:223)
 at org.apache.cassandra.cli.CliMain.main(CliMain.java:351)
 {noformat}
 the null there would most likely indicate this is a NPE (though it could 
 still be any Exception with null message). By adding a initCause to the 
 caught exception, we could see the root cause, eg:
 {noformat}
 null
 java.lang.RuntimeException
 at 
 org.apache.cassandra.cli.CliClient.executeCLIStatement(CliClient.java:212)
 at org.apache.cassandra.cli.CliMain.processStatement(CliMain.java:223)
 at org.apache.cassandra.cli.CliMain.main(CliMain.java:351)
 Caused by: java.lang.NullPointerException
 at 
 org.apache.cassandra.cli.CliClient.describeKeySpace(CliClient.java:1336)
 at 
 org.apache.cassandra.cli.CliClient.executeShowKeySpaces(CliClient.java:1166)
 at 
 org.apache.cassandra.cli.CliClient.executeCLIStatement(CliClient.java:170)
 ... 2 more
 {noformat}
 submitting a patch here that would add the initCause to all caught exceptions 
 here. But the most important one is the general Exception case.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira




svn commit: r1143437 - in /cassandra/branches/cassandra-0.7: CHANGES.txt src/java/org/apache/cassandra/dht/OrderPreservingPartitioner.java

2011-07-06 Thread slebresne
Author: slebresne
Date: Wed Jul  6 14:35:35 2011
New Revision: 1143437

URL: http://svn.apache.org/viewvc?rev=1143437view=rev
Log:
Fix describeOwnership for OPP
patch by jhermes; reviewed by slebresne for CASSANDRA-2800

Modified:
cassandra/branches/cassandra-0.7/CHANGES.txt

cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/dht/OrderPreservingPartitioner.java

Modified: cassandra/branches/cassandra-0.7/CHANGES.txt
URL: 
http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.7/CHANGES.txt?rev=1143437r1=1143436r2=1143437view=diff
==
--- cassandra/branches/cassandra-0.7/CHANGES.txt (original)
+++ cassandra/branches/cassandra-0.7/CHANGES.txt Wed Jul  6 14:35:35 2011
@@ -32,6 +32,7 @@
  * allow deleting a row and updating indexed columns in it in the
same mutation (CASSANDRA-2773)
  * improve cli treatment of multiline comments (CASSANDRA-2852)
+ * fix describeOwnership for OPP (CASSANDRA-2800)
 
 
 0.7.6

Modified: 
cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/dht/OrderPreservingPartitioner.java
URL: 
http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/dht/OrderPreservingPartitioner.java?rev=1143437r1=1143436r2=1143437view=diff
==
--- 
cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/dht/OrderPreservingPartitioner.java
 (original)
+++ 
cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/dht/OrderPreservingPartitioner.java
 Wed Jul  6 14:35:35 2011
@@ -188,7 +188,7 @@ public class OrderPreservingPartitioner 
 for (Range r : sortedRanges)
 {
 // Looping over every KS:CF:Range, get the splits size and 
add it to the count
-allTokens.put(r.right, allTokens.get(r.right) + 
StorageService.instance.getSplits(ks, cfmd.cfName, r, 1).size());
+allTokens.put(r.right, allTokens.get(r.right) + 
StorageService.instance.getSplits(ks, cfmd.cfName, r, 
DatabaseDescriptor.getIndexInterval()).size());
 }
 }
 }




svn commit: r1143438 - in /cassandra/branches/cassandra-0.8: ./ contrib/ interface/thrift/gen-java/org/apache/cassandra/thrift/ src/java/org/apache/cassandra/dht/

2011-07-06 Thread slebresne
Author: slebresne
Date: Wed Jul  6 14:36:56 2011
New Revision: 1143438

URL: http://svn.apache.org/viewvc?rev=1143438view=rev
Log:
merge from 0.7

Modified:
cassandra/branches/cassandra-0.8/   (props changed)
cassandra/branches/cassandra-0.8/CHANGES.txt
cassandra/branches/cassandra-0.8/contrib/   (props changed)

cassandra/branches/cassandra-0.8/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java
   (props changed)

cassandra/branches/cassandra-0.8/interface/thrift/gen-java/org/apache/cassandra/thrift/Column.java
   (props changed)

cassandra/branches/cassandra-0.8/interface/thrift/gen-java/org/apache/cassandra/thrift/InvalidRequestException.java
   (props changed)

cassandra/branches/cassandra-0.8/interface/thrift/gen-java/org/apache/cassandra/thrift/NotFoundException.java
   (props changed)

cassandra/branches/cassandra-0.8/interface/thrift/gen-java/org/apache/cassandra/thrift/SuperColumn.java
   (props changed)

cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/dht/OrderPreservingPartitioner.java

Propchange: cassandra/branches/cassandra-0.8/
--
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Jul  6 14:36:56 2011
@@ -1,5 +1,5 @@
 
/cassandra/branches/cassandra-0.6:922689-1052356,1052358-1053452,1053454,1053456-1131291
-/cassandra/branches/cassandra-0.7:1026516-1143403
+/cassandra/branches/cassandra-0.7:1026516-1143403,1143437
 /cassandra/branches/cassandra-0.7.0:1053690-1055654
 /cassandra/branches/cassandra-0.8:1090934-1125013,1125041
 /cassandra/branches/cassandra-0.8.0:1125021-1130369

Modified: cassandra/branches/cassandra-0.8/CHANGES.txt
URL: 
http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.8/CHANGES.txt?rev=1143438r1=1143437r2=1143438view=diff
==
--- cassandra/branches/cassandra-0.8/CHANGES.txt (original)
+++ cassandra/branches/cassandra-0.8/CHANGES.txt Wed Jul  6 14:36:56 2011
@@ -95,6 +95,7 @@
  * fix scan wrongly throwing assertion error (CASSANDRA-2653)
  * Always use even distribution for merkle tree with RandomPartitionner
(CASSANDRA-2841)
+ * fix describeOwnership for OPP (CASSANDRA-2800)
 
 
 0.8.0-final

Propchange: cassandra/branches/cassandra-0.8/contrib/
--
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Jul  6 14:36:56 2011
@@ -1,5 +1,5 @@
 
/cassandra/branches/cassandra-0.6/contrib:922689-1052356,1052358-1053452,1053454,1053456-1068009
-/cassandra/branches/cassandra-0.7/contrib:1026516-1143403
+/cassandra/branches/cassandra-0.7/contrib:1026516-1143403,1143437
 /cassandra/branches/cassandra-0.7.0/contrib:1053690-1055654
 /cassandra/branches/cassandra-0.8/contrib:1090934-1125013,1125041
 /cassandra/branches/cassandra-0.8.0/contrib:1125021-1130369

Propchange: 
cassandra/branches/cassandra-0.8/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java
--
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Jul  6 14:36:56 2011
@@ -1,5 +1,5 @@
 
/cassandra/branches/cassandra-0.6/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java:922689-1052356,1052358-1053452,1053454,1053456-1131291
-/cassandra/branches/cassandra-0.7/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java:1026516-1143403
+/cassandra/branches/cassandra-0.7/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java:1026516-1143403,1143437
 
/cassandra/branches/cassandra-0.7.0/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java:1053690-1055654
 
/cassandra/branches/cassandra-0.8/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java:1090934-1125013,1125041
 
/cassandra/branches/cassandra-0.8.0/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java:1125021-1130369

Propchange: 
cassandra/branches/cassandra-0.8/interface/thrift/gen-java/org/apache/cassandra/thrift/Column.java
--
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Jul  6 14:36:56 2011
@@ -1,5 +1,5 @@
 
/cassandra/branches/cassandra-0.6/interface/thrift/gen-java/org/apache/cassandra/thrift/Column.java:922689-1052356,1052358-1053452,1053454,1053456-1131291
-/cassandra/branches/cassandra-0.7/interface/thrift/gen-java/org/apache/cassandra/thrift/Column.java:1026516-1143403
+/cassandra/branches/cassandra-0.7/interface/thrift/gen-java/org/apache/cassandra/thrift/Column.java:1026516-1143403,1143437
 
/cassandra/branches/cassandra-0.7.0/interface/thrift/gen-java/org/apache/cassandra/thrift/Column.java:1053690-1055654
 
/cassandra/branches/cassandra-0.8/interface/thrift/gen-java/org/apache/cassandra/thrift/Column.java:1090934-1125013,1125041
 

svn commit: r1143441 - in /cassandra/trunk: ./ contrib/ interface/thrift/gen-java/org/apache/cassandra/thrift/ src/java/org/apache/cassandra/dht/

2011-07-06 Thread slebresne
Author: slebresne
Date: Wed Jul  6 14:40:22 2011
New Revision: 1143441

URL: http://svn.apache.org/viewvc?rev=1143441view=rev
Log:
merge from 0.8

Modified:
cassandra/trunk/   (props changed)
cassandra/trunk/CHANGES.txt
cassandra/trunk/contrib/   (props changed)

cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java
   (props changed)

cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/Column.java
   (props changed)

cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/InvalidRequestException.java
   (props changed)

cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/NotFoundException.java
   (props changed)

cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/SuperColumn.java
   (props changed)

cassandra/trunk/src/java/org/apache/cassandra/dht/OrderPreservingPartitioner.java

Propchange: cassandra/trunk/
--
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Jul  6 14:40:22 2011
@@ -1,7 +1,7 @@
 
/cassandra/branches/cassandra-0.6:922689-1052356,1052358-1053452,1053454,1053456-1131291
-/cassandra/branches/cassandra-0.7:1026516-1140567,1141129,1141213,1141217
+/cassandra/branches/cassandra-0.7:1026516-1140567,1141129,1141213,1141217,1143437
 /cassandra/branches/cassandra-0.7.0:1053690-1055654
-/cassandra/branches/cassandra-0.8:1090934-1125013,1125019-1140755,1140760,1141134,1141214,1141220,1143352
+/cassandra/branches/cassandra-0.8:1090934-1125013,1125019-1140755,1140760,1141134,1141214,1141220,1143352,1143438
 /cassandra/branches/cassandra-0.8.0:1125021-1130369
 /cassandra/branches/cassandra-0.8.1:1101014-1125018
 /cassandra/tags/cassandra-0.7.0-rc3:1051699-1053689

Modified: cassandra/trunk/CHANGES.txt
URL: 
http://svn.apache.org/viewvc/cassandra/trunk/CHANGES.txt?rev=1143441r1=1143440r2=1143441view=diff
==
--- cassandra/trunk/CHANGES.txt (original)
+++ cassandra/trunk/CHANGES.txt Wed Jul  6 14:40:22 2011
@@ -108,6 +108,7 @@
  * fix scan wrongly throwing assertion error (CASSANDRA-2653)
  * Always use even distribution for merkle tree with RandomPartitionner
(CASSANDRA-2841)
+ * fix describeOwnership for OPP (CASSANDRA-2800)
 
 
 0.8.0-final

Propchange: cassandra/trunk/contrib/
--
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Jul  6 14:40:22 2011
@@ -1,7 +1,7 @@
 
/cassandra/branches/cassandra-0.6/contrib:922689-1052356,1052358-1053452,1053454,1053456-1068009
-/cassandra/branches/cassandra-0.7/contrib:1026516-1140567,1141129,1141213,1141217
+/cassandra/branches/cassandra-0.7/contrib:1026516-1140567,1141129,1141213,1141217,1143437
 /cassandra/branches/cassandra-0.7.0/contrib:1053690-1055654
-/cassandra/branches/cassandra-0.8/contrib:1090934-1125013,1125019-1140755,1140760,1141134,1141214,1141220,1143352
+/cassandra/branches/cassandra-0.8/contrib:1090934-1125013,1125019-1140755,1140760,1141134,1141214,1141220,1143352,1143438
 /cassandra/branches/cassandra-0.8.0/contrib:1125021-1130369
 /cassandra/branches/cassandra-0.8.1/contrib:1101014-1125018
 /cassandra/tags/cassandra-0.7.0-rc3/contrib:1051699-1053689

Propchange: 
cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java
--
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Jul  6 14:40:22 2011
@@ -1,7 +1,7 @@
 
/cassandra/branches/cassandra-0.6/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java:922689-1052356,1052358-1053452,1053454,1053456-1131291
-/cassandra/branches/cassandra-0.7/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java:1026516-1140567,1141129,1141213,1141217
+/cassandra/branches/cassandra-0.7/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java:1026516-1140567,1141129,1141213,1141217,1143437
 
/cassandra/branches/cassandra-0.7.0/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java:1053690-1055654
-/cassandra/branches/cassandra-0.8/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java:1090934-1125013,1125019-1140755,1140760,1141134,1141214,1141220,1143352
+/cassandra/branches/cassandra-0.8/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java:1090934-1125013,1125019-1140755,1140760,1141134,1141214,1141220,1143352,1143438
 
/cassandra/branches/cassandra-0.8.0/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java:1125021-1130369
 
/cassandra/branches/cassandra-0.8.1/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java:1101014-1125018
 
/cassandra/tags/cassandra-0.7.0-rc3/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java:1051699-1053689

Propchange: 

svn commit: r1143444 - /cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/cli/CliClient.java

2011-07-06 Thread slebresne
Author: slebresne
Date: Wed Jul  6 14:50:46 2011
New Revision: 1143444

URL: http://svn.apache.org/viewvc?rev=1143444view=rev
Log:
Fix typo in CLI help
patch by j.casares; reviewed by slebresne for CASSANDRA-2839

Modified:

cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/cli/CliClient.java

Modified: 
cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/cli/CliClient.java
URL: 
http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/cli/CliClient.java?rev=1143444r1=1143443r2=1143444view=diff
==
--- 
cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/cli/CliClient.java
 (original)
+++ 
cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/cli/CliClient.java
 Wed Jul  6 14:50:46 2011
@@ -1352,7 +1352,7 @@ public class CliClient extends CliUserHe
 sessionState.out.printf(  Row cache size / save period in 
seconds: %s/%s%n, cf_def.row_cache_size, 
cf_def.row_cache_save_period_in_seconds);
 sessionState.out.printf(  Key cache size / save period in 
seconds: %s/%s%n, cf_def.key_cache_size, 
cf_def.key_cache_save_period_in_seconds);
 sessionState.out.printf(  Memtable thresholds: %s/%s/%s 
(millions of ops/minutes/MB)%n,
-cf_def.memtable_operations_in_millions, 
cf_def.memtable_throughput_in_mb, cf_def.memtable_flush_after_mins);
+cf_def.memtable_operations_in_millions, 
cf_def.memtable_flush_after_mins, cf_def.memtable_throughput_in_mb);
 sessionState.out.printf(  GC grace seconds: %s%n, 
cf_def.gc_grace_seconds);
 sessionState.out.printf(  Compaction min/max thresholds: 
%s/%s%n, cf_def.min_compaction_threshold, cf_def.max_compaction_threshold);
 sessionState.out.printf(  Read repair chance: %s%n, 
cf_def.read_repair_chance);




svn commit: r1143445 - in /cassandra/branches/cassandra-0.8: ./ contrib/ interface/thrift/gen-java/org/apache/cassandra/thrift/ src/java/org/apache/cassandra/cli/

2011-07-06 Thread slebresne
Author: slebresne
Date: Wed Jul  6 14:52:33 2011
New Revision: 1143445

URL: http://svn.apache.org/viewvc?rev=1143445view=rev
Log:
merge from 0.7

Modified:
cassandra/branches/cassandra-0.8/   (props changed)
cassandra/branches/cassandra-0.8/contrib/   (props changed)

cassandra/branches/cassandra-0.8/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java
   (props changed)

cassandra/branches/cassandra-0.8/interface/thrift/gen-java/org/apache/cassandra/thrift/Column.java
   (props changed)

cassandra/branches/cassandra-0.8/interface/thrift/gen-java/org/apache/cassandra/thrift/InvalidRequestException.java
   (props changed)

cassandra/branches/cassandra-0.8/interface/thrift/gen-java/org/apache/cassandra/thrift/NotFoundException.java
   (props changed)

cassandra/branches/cassandra-0.8/interface/thrift/gen-java/org/apache/cassandra/thrift/SuperColumn.java
   (props changed)

cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/cli/CliClient.java

Propchange: cassandra/branches/cassandra-0.8/
--
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Jul  6 14:52:33 2011
@@ -1,5 +1,5 @@
 
/cassandra/branches/cassandra-0.6:922689-1052356,1052358-1053452,1053454,1053456-1131291
-/cassandra/branches/cassandra-0.7:1026516-1143403,1143437
+/cassandra/branches/cassandra-0.7:1026516-1143403,1143437,1143444
 /cassandra/branches/cassandra-0.7.0:1053690-1055654
 /cassandra/branches/cassandra-0.8:1090934-1125013,1125041
 /cassandra/branches/cassandra-0.8.0:1125021-1130369

Propchange: cassandra/branches/cassandra-0.8/contrib/
--
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Jul  6 14:52:33 2011
@@ -1,5 +1,5 @@
 
/cassandra/branches/cassandra-0.6/contrib:922689-1052356,1052358-1053452,1053454,1053456-1068009
-/cassandra/branches/cassandra-0.7/contrib:1026516-1143403,1143437
+/cassandra/branches/cassandra-0.7/contrib:1026516-1143403,1143437,1143444
 /cassandra/branches/cassandra-0.7.0/contrib:1053690-1055654
 /cassandra/branches/cassandra-0.8/contrib:1090934-1125013,1125041
 /cassandra/branches/cassandra-0.8.0/contrib:1125021-1130369

Propchange: 
cassandra/branches/cassandra-0.8/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java
--
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Jul  6 14:52:33 2011
@@ -1,5 +1,5 @@
 
/cassandra/branches/cassandra-0.6/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java:922689-1052356,1052358-1053452,1053454,1053456-1131291
-/cassandra/branches/cassandra-0.7/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java:1026516-1143403,1143437
+/cassandra/branches/cassandra-0.7/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java:1026516-1143403,1143437,1143444
 
/cassandra/branches/cassandra-0.7.0/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java:1053690-1055654
 
/cassandra/branches/cassandra-0.8/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java:1090934-1125013,1125041
 
/cassandra/branches/cassandra-0.8.0/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java:1125021-1130369

Propchange: 
cassandra/branches/cassandra-0.8/interface/thrift/gen-java/org/apache/cassandra/thrift/Column.java
--
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Jul  6 14:52:33 2011
@@ -1,5 +1,5 @@
 
/cassandra/branches/cassandra-0.6/interface/thrift/gen-java/org/apache/cassandra/thrift/Column.java:922689-1052356,1052358-1053452,1053454,1053456-1131291
-/cassandra/branches/cassandra-0.7/interface/thrift/gen-java/org/apache/cassandra/thrift/Column.java:1026516-1143403,1143437
+/cassandra/branches/cassandra-0.7/interface/thrift/gen-java/org/apache/cassandra/thrift/Column.java:1026516-1143403,1143437,1143444
 
/cassandra/branches/cassandra-0.7.0/interface/thrift/gen-java/org/apache/cassandra/thrift/Column.java:1053690-1055654
 
/cassandra/branches/cassandra-0.8/interface/thrift/gen-java/org/apache/cassandra/thrift/Column.java:1090934-1125013,1125041
 
/cassandra/branches/cassandra-0.8.0/interface/thrift/gen-java/org/apache/cassandra/thrift/Column.java:1125021-1130369

Propchange: 
cassandra/branches/cassandra-0.8/interface/thrift/gen-java/org/apache/cassandra/thrift/InvalidRequestException.java
--
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Jul  6 14:52:33 2011
@@ -1,5 +1,5 @@
 
/cassandra/branches/cassandra-0.6/interface/thrift/gen-java/org/apache/cassandra/thrift/InvalidRequestException.java:922689-1052356,1052358-1053452,1053454,1053456-1131291

[jira] [Commented] (CASSANDRA-2800) OPP#describeOwnership reports incorrect ownership

2011-07-06 Thread Hudson (JIRA)

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

Hudson commented on CASSANDRA-2800:
---

Integrated in Cassandra-0.7 #522 (See 
[https://builds.apache.org/job/Cassandra-0.7/522/])
Fix describeOwnership for OPP
patch by jhermes; reviewed by slebresne for CASSANDRA-2800

slebresne : 
http://svn.apache.org/viewcvs.cgi/?root=Apache-SVNview=revrev=1143437
Files : 
* /cassandra/branches/cassandra-0.7/CHANGES.txt
* 
/cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/dht/OrderPreservingPartitioner.java


 OPP#describeOwnership reports incorrect ownership
 -

 Key: CASSANDRA-2800
 URL: https://issues.apache.org/jira/browse/CASSANDRA-2800
 Project: Cassandra
  Issue Type: Bug
Affects Versions: 0.7.4
Reporter: Jon Hermes
Assignee: Jon Hermes
Priority: Minor
 Fix For: 0.7.7, 0.8.2

 Attachments: 2800.txt


 OPP#describeOwnership relies on StorageService#getSplits and counts the 
 received tokens as its basis of ownership.
 When the number of result keys is less than the number of splits, the full 
 count is omitted (to save work?). However, we don't care if a split would end 
 up fractional in this case, we just need the full count.
 The logic here is:
 {code}
 int splits = keycount * DatabaseDescriptor.getIndexInterval() / keysPerSplit;
 if (keycount = splits) { ... add count to result set }
 {code}
 We were passing in 1 key per split (since we just care about the count), but 
 splits=keycount*IndexInterval is guaranteed to be  keycount, so the result 
 set is not completely formed.
 The better unit keysPerSplit to use is IndexInterval itself, which gives 
 splits=keycount*II/II=keycount, so the logic runs correctly.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (CASSANDRA-2839) Small typos in the cli

2011-07-06 Thread Sylvain Lebresne (JIRA)

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

Sylvain Lebresne commented on CASSANDRA-2839:
-

I've committed the typo on the memtable thresholds. On the placement_strategy 
help, are you sure ? Because CliTest does use a fully qualified class and don't 
seem to fail.

 Small typos in the cli
 --

 Key: CASSANDRA-2839
 URL: https://issues.apache.org/jira/browse/CASSANDRA-2839
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Affects Versions: 0.7.6
Reporter: Joaquin Casares
Assignee: Joaquin Casares
Priority: Minor
 Fix For: 0.7.7

 Attachments: 2839.diff


 Memtable thresholds: %s/%s/%s (millions of ops/minutes/MB) was displaying 
 ops/MB/minutes.
 placement_strategy: the fully qualified class used to place replicas in
 this keyspace. Valid values are
 org.apache.cassandra.locator.SimpleStrategy,
 org.apache.cassandra.locator.NetworkTopologyStrategy,
 and 
 org.apache.cassandra.locator.OldNetworkTopologyStrategy
 was being displayed but would only accept SimpleStrategy.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira




svn commit: r1143448 - in /cassandra/trunk: ./ contrib/ interface/thrift/gen-java/org/apache/cassandra/thrift/

2011-07-06 Thread slebresne
Author: slebresne
Date: Wed Jul  6 14:54:34 2011
New Revision: 1143448

URL: http://svn.apache.org/viewvc?rev=1143448view=rev
Log:
merge from 0.8

Modified:
cassandra/trunk/   (props changed)
cassandra/trunk/contrib/   (props changed)

cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java
   (props changed)

cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/Column.java
   (props changed)

cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/InvalidRequestException.java
   (props changed)

cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/NotFoundException.java
   (props changed)

cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/SuperColumn.java
   (props changed)

Propchange: cassandra/trunk/
--
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Jul  6 14:54:34 2011
@@ -1,7 +1,7 @@
 
/cassandra/branches/cassandra-0.6:922689-1052356,1052358-1053452,1053454,1053456-1131291
-/cassandra/branches/cassandra-0.7:1026516-1140567,1141129,1141213,1141217,1143437
+/cassandra/branches/cassandra-0.7:1026516-1140567,1141129,1141213,1141217,1143437,1143444
 /cassandra/branches/cassandra-0.7.0:1053690-1055654
-/cassandra/branches/cassandra-0.8:1090934-1125013,1125019-1140755,1140760,1141134,1141214,1141220,1143352,1143438
+/cassandra/branches/cassandra-0.8:1090934-1125013,1125019-1140755,1140760,1141134,1141214,1141220,1143352,1143438,1143445
 /cassandra/branches/cassandra-0.8.0:1125021-1130369
 /cassandra/branches/cassandra-0.8.1:1101014-1125018
 /cassandra/tags/cassandra-0.7.0-rc3:1051699-1053689

Propchange: cassandra/trunk/contrib/
--
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Jul  6 14:54:34 2011
@@ -1,7 +1,7 @@
 
/cassandra/branches/cassandra-0.6/contrib:922689-1052356,1052358-1053452,1053454,1053456-1068009
-/cassandra/branches/cassandra-0.7/contrib:1026516-1140567,1141129,1141213,1141217,1143437
+/cassandra/branches/cassandra-0.7/contrib:1026516-1140567,1141129,1141213,1141217,1143437,1143444
 /cassandra/branches/cassandra-0.7.0/contrib:1053690-1055654
-/cassandra/branches/cassandra-0.8/contrib:1090934-1125013,1125019-1140755,1140760,1141134,1141214,1141220,1143352,1143438
+/cassandra/branches/cassandra-0.8/contrib:1090934-1125013,1125019-1140755,1140760,1141134,1141214,1141220,1143352,1143438,1143445
 /cassandra/branches/cassandra-0.8.0/contrib:1125021-1130369
 /cassandra/branches/cassandra-0.8.1/contrib:1101014-1125018
 /cassandra/tags/cassandra-0.7.0-rc3/contrib:1051699-1053689

Propchange: 
cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java
--
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Jul  6 14:54:34 2011
@@ -1,7 +1,7 @@
 
/cassandra/branches/cassandra-0.6/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java:922689-1052356,1052358-1053452,1053454,1053456-1131291
-/cassandra/branches/cassandra-0.7/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java:1026516-1140567,1141129,1141213,1141217,1143437
+/cassandra/branches/cassandra-0.7/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java:1026516-1140567,1141129,1141213,1141217,1143437,1143444
 
/cassandra/branches/cassandra-0.7.0/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java:1053690-1055654
-/cassandra/branches/cassandra-0.8/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java:1090934-1125013,1125019-1140755,1140760,1141134,1141214,1141220,1143352,1143438
+/cassandra/branches/cassandra-0.8/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java:1090934-1125013,1125019-1140755,1140760,1141134,1141214,1141220,1143352,1143438,1143445
 
/cassandra/branches/cassandra-0.8.0/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java:1125021-1130369
 
/cassandra/branches/cassandra-0.8.1/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java:1101014-1125018
 
/cassandra/tags/cassandra-0.7.0-rc3/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java:1051699-1053689

Propchange: 
cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/Column.java
--
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Jul  6 14:54:34 2011
@@ -1,7 +1,7 @@
 
/cassandra/branches/cassandra-0.6/interface/thrift/gen-java/org/apache/cassandra/thrift/Column.java:922689-1052356,1052358-1053452,1053454,1053456-1131291
-/cassandra/branches/cassandra-0.7/interface/thrift/gen-java/org/apache/cassandra/thrift/Column.java:1026516-1140567,1141129,1141213,1141217,1143437

[jira] [Commented] (CASSANDRA-2839) Small typos in the cli

2011-07-06 Thread Hudson (JIRA)

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

Hudson commented on CASSANDRA-2839:
---

Integrated in Cassandra-0.7 #523 (See 
[https://builds.apache.org/job/Cassandra-0.7/523/])
Fix typo in CLI help
patch by j.casares; reviewed by slebresne for CASSANDRA-2839

slebresne : 
http://svn.apache.org/viewcvs.cgi/?root=Apache-SVNview=revrev=1143444
Files : 
* 
/cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/cli/CliClient.java


 Small typos in the cli
 --

 Key: CASSANDRA-2839
 URL: https://issues.apache.org/jira/browse/CASSANDRA-2839
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Affects Versions: 0.7.6
Reporter: Joaquin Casares
Assignee: Joaquin Casares
Priority: Minor
 Fix For: 0.7.7

 Attachments: 2839.diff


 Memtable thresholds: %s/%s/%s (millions of ops/minutes/MB) was displaying 
 ops/MB/minutes.
 placement_strategy: the fully qualified class used to place replicas in
 this keyspace. Valid values are
 org.apache.cassandra.locator.SimpleStrategy,
 org.apache.cassandra.locator.NetworkTopologyStrategy,
 and 
 org.apache.cassandra.locator.OldNetworkTopologyStrategy
 was being displayed but would only accept SimpleStrategy.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (CASSANDRA-2762) Token cannot contain comma (possibly non-alpha/non-numeric too?) in OrderPreservingPartitioner

2011-07-06 Thread Sylvain Lebresne (JIRA)

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

Sylvain Lebresne commented on CASSANDRA-2762:
-

nit: the comment  // Hack to prevent giving nodes tokens with strings in them 
should probably read  // Hack to prevent giving nodes tokens with 
DELIMITER_STR in them?

+1

 Token cannot contain comma (possibly non-alpha/non-numeric too?) in 
 OrderPreservingPartitioner
 --

 Key: CASSANDRA-2762
 URL: https://issues.apache.org/jira/browse/CASSANDRA-2762
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Reporter: Jackson Chung
Assignee: Jonathan Ellis
Priority: Minor
 Fix For: 0.7.7, 0.8.2

 Attachments: 2762-v2.txt, 2762.txt


 It'd appear that when the token contain comma in the 
 OrderPreservingPartitioner case, C* will fail with assert error:
 ERROR [GossipStage:1] 2011-06-09 16:01:05,063 AbstractCassandraDaemon.java 
 (line 112) Fatal exception in thread Thread[GossipStage:1,5,main]
 java.lang.AssertionError
 at 
 org.apache.cassandra.service.StorageService.handleStateBootstrap(StorageService.java:685)
 at 
 org.apache.cassandra.service.StorageService.onChange(StorageService.java:648)
 at org.apache.cassandra.gms.Gossiper.doNotifications(Gossiper.java:772)
 at 
 org.apache.cassandra.gms.Gossiper.applyApplicationStateLocally(Gossiper.java:737)
 at org.apache.cassandra.gms.Gossiper.applyStateLocally(Gossiper.java:679)
 at 
 org.apache.cassandra.gms.GossipDigestAck2VerbHandler.doVerb(GossipDigestAck2VerbHandler.java:60)
 at 
 org.apache.cassandra.net.MessageDeliveryTask.run(MessageDeliveryTask.java:72)
 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)

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (CASSANDRA-2762) Token cannot contain comma (possibly non-alpha/non-numeric too?) in OrderPreservingPartitioner

2011-07-06 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis commented on CASSANDRA-2762:
---

committed w/ that change.

also added a final check post-replaceall:

{code}
if (tokenMetadata_.getTokenToEndpointMap().containsKey(token))
throw new RuntimeException(Unable to compute unique token for 
new node -- specify one manually with initial_token);
{code}

 Token cannot contain comma (possibly non-alpha/non-numeric too?) in 
 OrderPreservingPartitioner
 --

 Key: CASSANDRA-2762
 URL: https://issues.apache.org/jira/browse/CASSANDRA-2762
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Reporter: Jackson Chung
Assignee: Jonathan Ellis
Priority: Minor
 Fix For: 0.7.7, 0.8.2

 Attachments: 2762-v2.txt, 2762.txt


 It'd appear that when the token contain comma in the 
 OrderPreservingPartitioner case, C* will fail with assert error:
 ERROR [GossipStage:1] 2011-06-09 16:01:05,063 AbstractCassandraDaemon.java 
 (line 112) Fatal exception in thread Thread[GossipStage:1,5,main]
 java.lang.AssertionError
 at 
 org.apache.cassandra.service.StorageService.handleStateBootstrap(StorageService.java:685)
 at 
 org.apache.cassandra.service.StorageService.onChange(StorageService.java:648)
 at org.apache.cassandra.gms.Gossiper.doNotifications(Gossiper.java:772)
 at 
 org.apache.cassandra.gms.Gossiper.applyApplicationStateLocally(Gossiper.java:737)
 at org.apache.cassandra.gms.Gossiper.applyStateLocally(Gossiper.java:679)
 at 
 org.apache.cassandra.gms.GossipDigestAck2VerbHandler.doVerb(GossipDigestAck2VerbHandler.java:60)
 at 
 org.apache.cassandra.net.MessageDeliveryTask.run(MessageDeliveryTask.java:72)
 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)

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (CASSANDRA-2865) During repair mark a node as being repared, so no reads go to that node

2011-07-06 Thread JIRA

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

Héctor Izquierdo commented on CASSANDRA-2865:
-

You are absolutely right. But wouldn't it still be useful when you are 
repairing a node and it can take several hours to complete? Why don't treat it 
as bootstrap?

 During repair mark a node as being repared, so no reads go to that node
 ---

 Key: CASSANDRA-2865
 URL: https://issues.apache.org/jira/browse/CASSANDRA-2865
 Project: Cassandra
  Issue Type: Improvement
  Components: Core
Affects Versions: 0.8.1
Reporter: Héctor Izquierdo

 If a disk breaks and you lose a node data, when you bring it up again to do 
 the repair, it will serve reads, and if clients are using CL.ONE, they will 
 get bad data. Would it be possible to signal somehow that the node should not 
 be trusted and reads should go to any other replica?

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira




svn commit: r1143476 - in /cassandra/branches/cassandra-0.7: ./ src/java/org/apache/cassandra/config/ src/java/org/apache/cassandra/dht/ src/java/org/apache/cassandra/gms/ src/java/org/apache/cassandr

2011-07-06 Thread jbellis
Author: jbellis
Date: Wed Jul  6 16:00:18 2011
New Revision: 1143476

URL: http://svn.apache.org/viewvc?rev=1143476view=rev
Log:
ensure that string tokens do not contain commas
patch by jbellis; reviewed by slebresne for CASSANDRA-2762

Modified:
cassandra/branches/cassandra-0.7/CHANGES.txt

cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/config/DatabaseDescriptor.java

cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/dht/AbstractByteOrderedPartitioner.java

cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/dht/OrderPreservingPartitioner.java

cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/dht/RandomPartitioner.java

cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/dht/Token.java

cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/gms/Gossiper.java

cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/service/StorageService.java

cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/service/StorageServiceMBean.java

cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/tools/NodeProbe.java

Modified: cassandra/branches/cassandra-0.7/CHANGES.txt
URL: 
http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.7/CHANGES.txt?rev=1143476r1=1143475r2=1143476view=diff
==
--- cassandra/branches/cassandra-0.7/CHANGES.txt (original)
+++ cassandra/branches/cassandra-0.7/CHANGES.txt Wed Jul  6 16:00:18 2011
@@ -33,6 +33,7 @@
same mutation (CASSANDRA-2773)
  * improve cli treatment of multiline comments (CASSANDRA-2852)
  * fix describeOwnership for OPP (CASSANDRA-2800)
+ * ensure that string tokens do not contain commas (CASSANDRA-2762)
 
 
 0.7.6

Modified: 
cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
URL: 
http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/config/DatabaseDescriptor.java?rev=1143476r1=1143475r2=1143476view=diff
==
--- 
cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
 (original)
+++ 
cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
 Wed Jul  6 16:00:18 2011
@@ -40,6 +40,8 @@ import org.apache.cassandra.db.Table;
 import org.apache.cassandra.db.marshal.AbstractType;
 import org.apache.cassandra.db.migration.Migration;
 import org.apache.cassandra.dht.IPartitioner;
+import org.apache.cassandra.gms.Gossiper;
+import org.apache.cassandra.gms.VersionedValue;
 import org.apache.cassandra.io.sstable.Descriptor;
 import org.apache.cassandra.io.util.FileUtils;
 import org.apache.cassandra.locator.*;
@@ -360,6 +362,9 @@ public classDatabaseDescriptor
 throw new ConfigurationException(saved_caches_directory 
missing);
 }
 
+if (conf.initial_token != null)
+partitioner.getTokenFactory().validate(conf.initial_token);
+
 // Hardcoded system tables
 KSMetaData systemMeta = new KSMetaData(Table.SYSTEM_TABLE,
LocalStrategy.class,

Modified: 
cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/dht/AbstractByteOrderedPartitioner.java
URL: 
http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/dht/AbstractByteOrderedPartitioner.java?rev=1143476r1=1143475r2=1143476view=diff
==
--- 
cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/dht/AbstractByteOrderedPartitioner.java
 (original)
+++ 
cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/dht/AbstractByteOrderedPartitioner.java
 Wed Jul  6 16:00:18 2011
@@ -27,6 +27,7 @@ import java.util.List;
 import java.util.Map;
 import java.util.Random;
 
+import org.apache.cassandra.config.ConfigurationException;
 import org.apache.cassandra.utils.ByteBufferUtil;
 import org.apache.commons.lang.ArrayUtils;
 
@@ -151,6 +152,18 @@ public abstract class AbstractByteOrdere
 return FBUtilities.bytesToHex(bytesToken.token);
 }
 
+public void validate(String token) throws ConfigurationException
+{
+try
+{
+FBUtilities.hexToBytes(token);
+}
+catch (NumberFormatException e)
+{
+throw new ConfigurationException(Token  + token +  contains 
non-hex digits);
+}
+}
+
 public Tokenbyte[] fromString(String string)
 {
 return new BytesToken(FBUtilities.hexToBytes(string));

Modified: 
cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/dht/OrderPreservingPartitioner.java
URL: 

[jira] [Commented] (CASSANDRA-2762) Token cannot contain comma (possibly non-alpha/non-numeric too?) in OrderPreservingPartitioner

2011-07-06 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis commented on CASSANDRA-2762:
---

I also note for the record that if you must use an ordered partitioner, you 
should almost certainly be using ByteOrderedPartitioner instead of the obsolete 
OPP.

 Token cannot contain comma (possibly non-alpha/non-numeric too?) in 
 OrderPreservingPartitioner
 --

 Key: CASSANDRA-2762
 URL: https://issues.apache.org/jira/browse/CASSANDRA-2762
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Reporter: Jackson Chung
Assignee: Jonathan Ellis
Priority: Minor
 Fix For: 0.7.7, 0.8.2

 Attachments: 2762-v2.txt, 2762.txt


 It'd appear that when the token contain comma in the 
 OrderPreservingPartitioner case, C* will fail with assert error:
 ERROR [GossipStage:1] 2011-06-09 16:01:05,063 AbstractCassandraDaemon.java 
 (line 112) Fatal exception in thread Thread[GossipStage:1,5,main]
 java.lang.AssertionError
 at 
 org.apache.cassandra.service.StorageService.handleStateBootstrap(StorageService.java:685)
 at 
 org.apache.cassandra.service.StorageService.onChange(StorageService.java:648)
 at org.apache.cassandra.gms.Gossiper.doNotifications(Gossiper.java:772)
 at 
 org.apache.cassandra.gms.Gossiper.applyApplicationStateLocally(Gossiper.java:737)
 at org.apache.cassandra.gms.Gossiper.applyStateLocally(Gossiper.java:679)
 at 
 org.apache.cassandra.gms.GossipDigestAck2VerbHandler.doVerb(GossipDigestAck2VerbHandler.java:60)
 at 
 org.apache.cassandra.net.MessageDeliveryTask.run(MessageDeliveryTask.java:72)
 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)

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira




svn commit: r1143480 - in /cassandra/branches/cassandra-0.8: ./ contrib/ interface/thrift/gen-java/org/apache/cassandra/thrift/ src/java/org/apache/cassandra/config/ src/java/org/apache/cassandra/dht/

2011-07-06 Thread jbellis
Author: jbellis
Date: Wed Jul  6 16:07:28 2011
New Revision: 1143480

URL: http://svn.apache.org/viewvc?rev=1143480view=rev
Log:
merge from 0.7

Modified:
cassandra/branches/cassandra-0.8/   (props changed)
cassandra/branches/cassandra-0.8/CHANGES.txt
cassandra/branches/cassandra-0.8/contrib/   (props changed)

cassandra/branches/cassandra-0.8/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java
   (props changed)

cassandra/branches/cassandra-0.8/interface/thrift/gen-java/org/apache/cassandra/thrift/Column.java
   (props changed)

cassandra/branches/cassandra-0.8/interface/thrift/gen-java/org/apache/cassandra/thrift/InvalidRequestException.java
   (props changed)

cassandra/branches/cassandra-0.8/interface/thrift/gen-java/org/apache/cassandra/thrift/NotFoundException.java
   (props changed)

cassandra/branches/cassandra-0.8/interface/thrift/gen-java/org/apache/cassandra/thrift/SuperColumn.java
   (props changed)

cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/config/DatabaseDescriptor.java

cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/dht/AbstractByteOrderedPartitioner.java

cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/dht/OrderPreservingPartitioner.java

cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/dht/RandomPartitioner.java

cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/dht/Token.java

cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/gms/Gossiper.java

cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/service/StorageService.java

cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/service/StorageServiceMBean.java

cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/tools/NodeProbe.java

Propchange: cassandra/branches/cassandra-0.8/
--
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Jul  6 16:07:28 2011
@@ -1,5 +1,5 @@
 
/cassandra/branches/cassandra-0.6:922689-1052356,1052358-1053452,1053454,1053456-1131291
-/cassandra/branches/cassandra-0.7:1026516-1143403,1143437,1143444
+/cassandra/branches/cassandra-0.7:1026516-1143476
 /cassandra/branches/cassandra-0.7.0:1053690-1055654
 /cassandra/branches/cassandra-0.8:1090934-1125013,1125041
 /cassandra/branches/cassandra-0.8.0:1125021-1130369

Modified: cassandra/branches/cassandra-0.8/CHANGES.txt
URL: 
http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.8/CHANGES.txt?rev=1143480r1=1143479r2=1143480view=diff
==
--- cassandra/branches/cassandra-0.8/CHANGES.txt (original)
+++ cassandra/branches/cassandra-0.8/CHANGES.txt Wed Jul  6 16:07:28 2011
@@ -96,6 +96,7 @@
  * Always use even distribution for merkle tree with RandomPartitionner
(CASSANDRA-2841)
  * fix describeOwnership for OPP (CASSANDRA-2800)
+ * ensure that string tokens do not contain commas (CASSANDRA-2762)
 
 
 0.8.0-final

Propchange: cassandra/branches/cassandra-0.8/contrib/
--
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Jul  6 16:07:28 2011
@@ -1,5 +1,5 @@
 
/cassandra/branches/cassandra-0.6/contrib:922689-1052356,1052358-1053452,1053454,1053456-1068009
-/cassandra/branches/cassandra-0.7/contrib:1026516-1143403,1143437,1143444
+/cassandra/branches/cassandra-0.7/contrib:1026516-1143476
 /cassandra/branches/cassandra-0.7.0/contrib:1053690-1055654
 /cassandra/branches/cassandra-0.8/contrib:1090934-1125013,1125041
 /cassandra/branches/cassandra-0.8.0/contrib:1125021-1130369

Propchange: 
cassandra/branches/cassandra-0.8/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java
--
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Jul  6 16:07:28 2011
@@ -1,5 +1,5 @@
 
/cassandra/branches/cassandra-0.6/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java:922689-1052356,1052358-1053452,1053454,1053456-1131291
-/cassandra/branches/cassandra-0.7/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java:1026516-1143403,1143437,1143444
+/cassandra/branches/cassandra-0.7/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java:1026516-1143476
 
/cassandra/branches/cassandra-0.7.0/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java:1053690-1055654
 
/cassandra/branches/cassandra-0.8/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java:1090934-1125013,1125041
 
/cassandra/branches/cassandra-0.8.0/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java:1125021-1130369

Propchange: 
cassandra/branches/cassandra-0.8/interface/thrift/gen-java/org/apache/cassandra/thrift/Column.java
--
--- svn:mergeinfo 

[jira] [Updated] (CASSANDRA-2860) Versioning works *too* well

2011-07-06 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis updated CASSANDRA-2860:
--

Attachment: 2860.txt

patch to reset protocol-version-to-attempt when MessagingService resets a 
connection pool (when FD notices it's down)

 Versioning works *too* well
 ---

 Key: CASSANDRA-2860
 URL: https://issues.apache.org/jira/browse/CASSANDRA-2860
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Affects Versions: 0.7.1
Reporter: Brandon Williams
Assignee: Brandon Williams
 Fix For: 0.8.2

 Attachments: 2860.txt


 The scenario goes something like this: you upgrade from 0.7 to 0.8, but all 
 the nodes remember that the remote side is 0.7, so they in turn speak 0.7, 
 causing the local node to also think the remote is 0.7, even though both are 
 really 0.8.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (CASSANDRA-2762) Token cannot contain comma (possibly non-alpha/non-numeric too?) in OrderPreservingPartitioner

2011-07-06 Thread Hudson (JIRA)

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

Hudson commented on CASSANDRA-2762:
---

Integrated in Cassandra-0.7 #524 (See 
[https://builds.apache.org/job/Cassandra-0.7/524/])
ensure that string tokens do not contain commas
patch by jbellis; reviewed by slebresne for CASSANDRA-2762

jbellis : 
http://svn.apache.org/viewcvs.cgi/?root=Apache-SVNview=revrev=1143476
Files : 
* /cassandra/branches/cassandra-0.7/CHANGES.txt
* 
/cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/dht/OrderPreservingPartitioner.java
* 
/cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/gms/Gossiper.java
* 
/cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/tools/NodeProbe.java
* /cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/dht/Token.java
* 
/cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/service/StorageServiceMBean.java
* 
/cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
* 
/cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/dht/RandomPartitioner.java
* 
/cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/service/StorageService.java
* 
/cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/dht/AbstractByteOrderedPartitioner.java


 Token cannot contain comma (possibly non-alpha/non-numeric too?) in 
 OrderPreservingPartitioner
 --

 Key: CASSANDRA-2762
 URL: https://issues.apache.org/jira/browse/CASSANDRA-2762
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Reporter: Jackson Chung
Assignee: Jonathan Ellis
Priority: Minor
 Fix For: 0.7.7, 0.8.2

 Attachments: 2762-v2.txt, 2762.txt


 It'd appear that when the token contain comma in the 
 OrderPreservingPartitioner case, C* will fail with assert error:
 ERROR [GossipStage:1] 2011-06-09 16:01:05,063 AbstractCassandraDaemon.java 
 (line 112) Fatal exception in thread Thread[GossipStage:1,5,main]
 java.lang.AssertionError
 at 
 org.apache.cassandra.service.StorageService.handleStateBootstrap(StorageService.java:685)
 at 
 org.apache.cassandra.service.StorageService.onChange(StorageService.java:648)
 at org.apache.cassandra.gms.Gossiper.doNotifications(Gossiper.java:772)
 at 
 org.apache.cassandra.gms.Gossiper.applyApplicationStateLocally(Gossiper.java:737)
 at org.apache.cassandra.gms.Gossiper.applyStateLocally(Gossiper.java:679)
 at 
 org.apache.cassandra.gms.GossipDigestAck2VerbHandler.doVerb(GossipDigestAck2VerbHandler.java:60)
 at 
 org.apache.cassandra.net.MessageDeliveryTask.run(MessageDeliveryTask.java:72)
 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)

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (CASSANDRA-2790) SimpleStrategy enforces endpoints = replicas when reading with ConsistencyLevel.ONE

2011-07-06 Thread Ivan Gorgiev (JIRA)

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

Ivan Gorgiev commented on CASSANDRA-2790:
-

Jonathan, I reported this issue while consulting for a client. That project has 
since been completed. Regarding the Cassandra upgrade, the client decided to 
postpone rolling it out for a while as they currently have more pressing needs. 
I'm staying in touch with them, and will relay back any new info on this. I'm 
quite certain the patch will resolve this issue.

 SimpleStrategy enforces endpoints = replicas when reading with 
 ConsistencyLevel.ONE
 

 Key: CASSANDRA-2790
 URL: https://issues.apache.org/jira/browse/CASSANDRA-2790
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Affects Versions: 0.7.6
 Environment: Linux 2.6.32-31-generic #61-Ubuntu SMP / Java 
 HotSpot(TM) 64-Bit Server VM (build 14.2-b01, mixed mode)
Reporter: Ivan Gorgiev

 We use replication factor of 3 across our system, but in a one case on the 
 application bootstrap we read a stored value with a local (in-process) call 
 to StorageProxy.read(commands, ConsistencyLevel.ONE). This results in the 
 following exception from SimpleStrategy: replication factor 3 exceeds number 
 of endpoints 1. 
 Shouldn't such a read operation always succeed as there is a guaranteed 
 single Cassandra endpoint - the one processing the request? 
 This code used to work with Cassandra 0.6.1 before we upgraded to 0.7.6.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Created] (CASSANDRA-2866) Add higher nofile (ulimit -n) property to the install configuration for debian and rpm packaging

2011-07-06 Thread Jeremy Hanna (JIRA)
Add higher nofile (ulimit -n) property to the install configuration for debian 
and rpm packaging


 Key: CASSANDRA-2866
 URL: https://issues.apache.org/jira/browse/CASSANDRA-2866
 Project: Cassandra
  Issue Type: Improvement
  Components: Packaging
Reporter: Jeremy Hanna
Priority: Minor


Currently in the packaging we set the memlock to unlimited.  We should also up 
the nofile value (ulimit -n) so that it's more than 1024, likely unlimited.  
Otherwise, there can be odd indirect bugs.  For example, I've seen compaction 
fail because of the too many open files error.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Resolved] (CASSANDRA-2790) SimpleStrategy enforces endpoints = replicas when reading with ConsistencyLevel.ONE

2011-07-06 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis resolved CASSANDRA-2790.
---

Resolution: Duplicate

thanks, I'll mark this as a duplicate of 2129 then.

 SimpleStrategy enforces endpoints = replicas when reading with 
 ConsistencyLevel.ONE
 

 Key: CASSANDRA-2790
 URL: https://issues.apache.org/jira/browse/CASSANDRA-2790
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Affects Versions: 0.7.6
 Environment: Linux 2.6.32-31-generic #61-Ubuntu SMP / Java 
 HotSpot(TM) 64-Bit Server VM (build 14.2-b01, mixed mode)
Reporter: Ivan Gorgiev

 We use replication factor of 3 across our system, but in a one case on the 
 application bootstrap we read a stored value with a local (in-process) call 
 to StorageProxy.read(commands, ConsistencyLevel.ONE). This results in the 
 following exception from SimpleStrategy: replication factor 3 exceeds number 
 of endpoints 1. 
 Shouldn't such a read operation always succeed as there is a guaranteed 
 single Cassandra endpoint - the one processing the request? 
 This code used to work with Cassandra 0.6.1 before we upgraded to 0.7.6.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira




[Cassandra Wiki] Update of HowToContribute by JonathanEllis

2011-07-06 Thread Apache Wiki
Dear Wiki user,

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

The HowToContribute page has been changed by JonathanEllis:
http://wiki.apache.org/cassandra/HowToContribute?action=diffrev1=39rev2=40

+ == Overview ==
+  1. Pick an issue to work on.  If you don't have a specific 
[[http://www.catb.org/~esr/writings/cathedral-bazaar/cathedral-bazaar/ar01s02.html|itch
 to scratch]], some possibilities are marked with 
[[https://issues.apache.org/jira/secure/IssueNavigator.jspa?reset=truejqlQuery=project+%3D+12310865+AND+labels+%3D+lhf|the
 low-hanging fruit label]] in JIRA.
   1. Read the relevant parts of ArchitectureInternals; watching 
http://www.channels.com/episodes/show/11765800/Getting-to-know-the-Cassandra-Codebase
 will probably also be useful
   1. Check if someone else has already begun work on the change you have in 
mind in the [[https://issues.apache.org/jira/browse/CASSANDRA|issue tracker]]
   1. If not, create a ticket describing the change you're proposing in the 
issue tracker
@@ -98, +100 @@

  Got commit access?  Outstanding!  Here are the conventions we follow.
  
  Commit messages take the form of
+ 
  {{{
  explanation
  patch by author; reviewed by committer for CASSANDRA-ticket
  }}}
- 
  When committing to multiple branches, start with the most-stable and merge 
forwards.  For instance, if you had a fix to apply to 0.6, 0.7, and trunk, you 
would first commit to 0.6.  Then, from your 0.7 branch checkout, you would run 
svn merge https://svn.apache.org/repos/asf/cassandra/branches/cassandra-0.6;, 
resolve any conflicts, and commit.  Then, from your trunk checkout, you would 
run svn merge 
https://svn.apache.org/repos/asf/cassandra/branches/cassandra-0.7;, again 
resolve conflicts, and commit.
  
  See http://video.google.com/videoplay?docid=-577744660535947210 for an 
in-depth explanation of why fixes should be merged forwards from more-stable 
branches, rather than backported from trunk.


[jira] [Commented] (CASSANDRA-2839) Small typos in the cli

2011-07-06 Thread Joaquin Casares (JIRA)

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

Joaquin Casares commented on CASSANDRA-2839:


This is my output of my test on cassandra-0.7.6 just right now:

[default@unknown] create keyspace abc with 
placement_strategy=org.apache.cassandra.locator.SimpleStrategy;
Syntax error at position 47: missing EOF at '.'
[default@unknown] create keyspace abc with 
placement_strategy=org.apache.cassandra.locator.NetworkTopologyStrategy;
Syntax error at position 47: missing EOF at '.'
[default@unknown] create keyspace abc with 
placement_strategy=org.apache.cassandra.locator.OldNetworkTopologyStrategy;
Syntax error at position 47: missing EOF at '.'
[default@unknown] create keyspace abc with placement_strategy=SimpleStrategy;   
  
844d2b67-a7f9-11e0-b6a3-e700f669bcfc
Waiting for schema agreement...
... schemas agree across the cluster
[default@unknown] update keyspace abc with 
placement_strategy=NetworkTopologyStrategy;
9182d288-a7f9-11e0-b6a3-e700f669bcfc
Waiting for schema agreement...
... schemas agree across the cluster
[default@unknown] update keyspace abc with 
placement_strategy=OldNetworkTopologyStrategy;
96344ca9-a7f9-11e0-b6a3-e700f669bcfc
Waiting for schema agreement...
... schemas agree across the cluster


 Small typos in the cli
 --

 Key: CASSANDRA-2839
 URL: https://issues.apache.org/jira/browse/CASSANDRA-2839
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Affects Versions: 0.7.6
Reporter: Joaquin Casares
Assignee: Joaquin Casares
Priority: Minor
 Fix For: 0.7.7

 Attachments: 2839.diff


 Memtable thresholds: %s/%s/%s (millions of ops/minutes/MB) was displaying 
 ops/MB/minutes.
 placement_strategy: the fully qualified class used to place replicas in
 this keyspace. Valid values are
 org.apache.cassandra.locator.SimpleStrategy,
 org.apache.cassandra.locator.NetworkTopologyStrategy,
 and 
 org.apache.cassandra.locator.OldNetworkTopologyStrategy
 was being displayed but would only accept SimpleStrategy.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (CASSANDRA-2839) Small typos in the cli

2011-07-06 Thread Sylvain Lebresne (JIRA)

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

Sylvain Lebresne commented on CASSANDRA-2839:
-

You'd have to use 
placement_strategy='org.apache.cassandra.locator.SimpleStrategy'

 Small typos in the cli
 --

 Key: CASSANDRA-2839
 URL: https://issues.apache.org/jira/browse/CASSANDRA-2839
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Affects Versions: 0.7.6
Reporter: Joaquin Casares
Assignee: Joaquin Casares
Priority: Minor
 Fix For: 0.7.7

 Attachments: 2839.diff


 Memtable thresholds: %s/%s/%s (millions of ops/minutes/MB) was displaying 
 ops/MB/minutes.
 placement_strategy: the fully qualified class used to place replicas in
 this keyspace. Valid values are
 org.apache.cassandra.locator.SimpleStrategy,
 org.apache.cassandra.locator.NetworkTopologyStrategy,
 and 
 org.apache.cassandra.locator.OldNetworkTopologyStrategy
 was being displayed but would only accept SimpleStrategy.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (CASSANDRA-2839) Small typos in the cli

2011-07-06 Thread Joaquin Casares (JIRA)

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

Joaquin Casares commented on CASSANDRA-2839:


Works! Could we get the help lines to reflect this?

 Small typos in the cli
 --

 Key: CASSANDRA-2839
 URL: https://issues.apache.org/jira/browse/CASSANDRA-2839
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Affects Versions: 0.7.6
Reporter: Joaquin Casares
Assignee: Joaquin Casares
Priority: Minor
 Fix For: 0.7.7

 Attachments: 2839.diff


 Memtable thresholds: %s/%s/%s (millions of ops/minutes/MB) was displaying 
 ops/MB/minutes.
 placement_strategy: the fully qualified class used to place replicas in
 this keyspace. Valid values are
 org.apache.cassandra.locator.SimpleStrategy,
 org.apache.cassandra.locator.NetworkTopologyStrategy,
 and 
 org.apache.cassandra.locator.OldNetworkTopologyStrategy
 was being displayed but would only accept SimpleStrategy.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira




[Cassandra Wiki] Update of HadoopSupport by JakeLuciani

2011-07-06 Thread Apache Wiki
Dear Wiki user,

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

The HadoopSupport page has been changed by JakeLuciani:
http://wiki.apache.org/cassandra/HadoopSupport?action=diffrev1=31rev2=32

Comment:
Mention brisk

  
  == Overview ==
  Cassandra 0.6+ enables certain [[http://hadoop.apache.org/|Hadoop]] 
functionality against Cassandra's data store.  Specifically, support has been 
added for [[http://hadoop.apache.org/mapreduce/|MapReduce]], 
[[http://pig.apache.org|Pig]] and [[http://hive.apache.org/|Hive]].
+ 
+ [[http://datastax.com|DataStax]] has open-sourced a Cassandra based Hadoop 
distribution called Brisk. 
([[http://www.datastax.com/docs/0.8/brisk/index|Documentation]]) 
([[http://github.com/riptano/brisk|Code]]) 
  
  [[#Top|Top]]
  


[jira] [Updated] (CASSANDRA-2753) Capture the max client timestamp for an SSTable

2011-07-06 Thread Alan Liang (JIRA)

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

Alan Liang updated CASSANDRA-2753:
--

Attachment: 
0001-capture-max-timestamp-and-created-SSTableMetadata-to-V3.patch

added maxTimestamp() to IColumn

 Capture the max client timestamp for an SSTable
 ---

 Key: CASSANDRA-2753
 URL: https://issues.apache.org/jira/browse/CASSANDRA-2753
 Project: Cassandra
  Issue Type: New Feature
  Components: Core
Reporter: Alan Liang
Assignee: Alan Liang
Priority: Minor
 Attachments: 
 0001-capture-max-timestamp-and-created-SSTableMetadata-to-V2.patch, 
 0001-capture-max-timestamp-and-created-SSTableMetadata-to-V3.patch, 
 0001-capture-max-timestamp-and-created-SSTableMetadata-to.patch, 
 0003-capture-max-timestamp-for-sstable-and-introduced-SST.patch




--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (CASSANDRA-2805) Clean up mbeans that return Internal Cassandra types

2011-07-06 Thread Gaurav Sharma (JIRA)

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

Gaurav Sharma commented on CASSANDRA-2805:
--

Unless someone else has already started, I am planning to take this one up.

 Clean up mbeans that return Internal Cassandra types
 

 Key: CASSANDRA-2805
 URL: https://issues.apache.org/jira/browse/CASSANDRA-2805
 Project: Cassandra
  Issue Type: Bug
Affects Versions: 0.8.1
Reporter: Nick Bailey
Priority: Minor
  Labels: lhf
 Fix For: 0.8.2


 We need to clean up wherever we return internal cassandra objects over jmx. 
 Namely CompactionInfo objects as well as Tokens. There may be a few other 
 examples.
 This is bad for two reasons
 1. You have to load the cassandra jar when querying these mbeans, which sucks.
 2. Stuff breaks between versions when things are moved. For example, 
 CASSANDRA-1610 moves the compaction related classes around. Any code querying 
 those jmx mbeans in 0.8.0 is now broken in 0.8.2. (assuming those moves stay 
 in the 0.8 branch)
 For things like CompactionInfo we should just expose more mbean methods or 
 serialize to something standard like json.
 I'd like to target this for 0.8.2. Since we've already broken compatibility 
 between 0.8.0 and 0.8.1, I'd say just fix this everywhere now.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Assigned] (CASSANDRA-2805) Clean up mbeans that return Internal Cassandra types

2011-07-06 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis reassigned CASSANDRA-2805:
-

Assignee: Gaurav Sharma

 Clean up mbeans that return Internal Cassandra types
 

 Key: CASSANDRA-2805
 URL: https://issues.apache.org/jira/browse/CASSANDRA-2805
 Project: Cassandra
  Issue Type: Bug
Affects Versions: 0.8.1
Reporter: Nick Bailey
Assignee: Gaurav Sharma
Priority: Minor
  Labels: lhf
 Fix For: 0.8.2


 We need to clean up wherever we return internal cassandra objects over jmx. 
 Namely CompactionInfo objects as well as Tokens. There may be a few other 
 examples.
 This is bad for two reasons
 1. You have to load the cassandra jar when querying these mbeans, which sucks.
 2. Stuff breaks between versions when things are moved. For example, 
 CASSANDRA-1610 moves the compaction related classes around. Any code querying 
 those jmx mbeans in 0.8.0 is now broken in 0.8.2. (assuming those moves stay 
 in the 0.8 branch)
 For things like CompactionInfo we should just expose more mbean methods or 
 serialize to something standard like json.
 I'd like to target this for 0.8.2. Since we've already broken compatibility 
 between 0.8.0 and 0.8.1, I'd say just fix this everywhere now.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (CASSANDRA-2864) Alternative Row Cache Implementation

2011-07-06 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis commented on CASSANDRA-2864:
---

Thanks for the patch, Daniel.

If I understand correctly, this is not a full row cache per se, but a sort of 
merge-cache for sstable data to deal with lots of overwrites (= lots of sstable 
fragments to merge).  So a cache hit becomes merge memtable[s] with cached 
value.

That's an innovative solution for a problem that is causing real pain.  Nice 
work.

However, I'm reluctant to add more special cases to the read path.  It looks 
like the CASSANDRA-2498 + CASSANDRA-2503 approach might offer similar benefits 
(that is, at most one -- or a configurable number of -- non-memtable version in 
memory), for less complexity as well as a more graceful degradation when your 
hot data set doesn't quite fit in memory.

Since you've clearly dug into the read code path more than most, I wonder if 
you'd like to take a stab at that?

 Alternative Row Cache Implementation
 

 Key: CASSANDRA-2864
 URL: https://issues.apache.org/jira/browse/CASSANDRA-2864
 Project: Cassandra
  Issue Type: Improvement
  Components: Core
Affects Versions: 0.8.1
Reporter: Daniel Doubleday
Priority: Minor
 Attachments: rowcache.patch


 we have been working on an alternative implementation to the existing row 
 cache(s)
 We have 2 main goals:
 - Decrease memory - get more rows in the cache without suffering a huge 
 performance penalty
 - Reduce gc pressure
 This sounds a lot like we should be using the new serializing cache in 0.8. 
 Unfortunately our workload consists of loads of updates which would 
 invalidate the cache all the time.
 The second unfortunate thing is that the idea we came up with doesn't fit the 
 new cache provider api...
 It looks like this:
 Like the serializing cache we basically only cache the serialized byte 
 buffer. we don't serialize the bloom filter and try to do some other minor 
 compression tricks (var ints etc not done yet). The main difference is that 
 we don't deserialize but use the normal sstable iterators and filters as in 
 the regular uncached case.
 So the read path looks like this:
 return filter.collectCollatedColumns(memtable iter, cached row iter)
 The write path is not affected. It does not update the cache
 During flush we merge all memtable updates with the cached rows.
 The attached patch is based on 0.8 branch r1143352
 It does not replace the existing row cache but sits aside it. Theres 
 environment switch to choose the implementation. This way it is easy to 
 benchmark performance differences.
 -DuseSSTableCache=true enables the alternative cache. It shares its 
 configuration with the standard row cache. So the cache capacity is shared. 
 We have duplicated a fair amount of code. First we actually refactored the 
 existing sstable filter / reader but than decided to minimize dependencies. 
 Also this way it is easy to customize serialization for in memory sstable 
 rows. 
 We have also experimented a little with compaction but since this task at 
 this stage is mainly to kick off discussion we wanted to keep things simple. 
 But there is certainly room for optimizations.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (CASSANDRA-2753) Capture the max client timestamp for an SSTable

2011-07-06 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis commented on CASSANDRA-2753:
---

committed.  thanks Alan!

 Capture the max client timestamp for an SSTable
 ---

 Key: CASSANDRA-2753
 URL: https://issues.apache.org/jira/browse/CASSANDRA-2753
 Project: Cassandra
  Issue Type: New Feature
  Components: Core
Reporter: Alan Liang
Assignee: Alan Liang
Priority: Minor
 Attachments: 
 0001-capture-max-timestamp-and-created-SSTableMetadata-to-V2.patch, 
 0001-capture-max-timestamp-and-created-SSTableMetadata-to-V3.patch, 
 0001-capture-max-timestamp-and-created-SSTableMetadata-to.patch, 
 0003-capture-max-timestamp-for-sstable-and-introduced-SST.patch




--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (CASSANDRA-2864) Alternative Row Cache Implementation

2011-07-06 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis commented on CASSANDRA-2864:
---

(Just committed CASSANDRA-2753, which adds the timestamp tracking needed for 
2498.)

 Alternative Row Cache Implementation
 

 Key: CASSANDRA-2864
 URL: https://issues.apache.org/jira/browse/CASSANDRA-2864
 Project: Cassandra
  Issue Type: Improvement
  Components: Core
Affects Versions: 0.8.1
Reporter: Daniel Doubleday
Priority: Minor
 Attachments: rowcache.patch


 we have been working on an alternative implementation to the existing row 
 cache(s)
 We have 2 main goals:
 - Decrease memory - get more rows in the cache without suffering a huge 
 performance penalty
 - Reduce gc pressure
 This sounds a lot like we should be using the new serializing cache in 0.8. 
 Unfortunately our workload consists of loads of updates which would 
 invalidate the cache all the time.
 The second unfortunate thing is that the idea we came up with doesn't fit the 
 new cache provider api...
 It looks like this:
 Like the serializing cache we basically only cache the serialized byte 
 buffer. we don't serialize the bloom filter and try to do some other minor 
 compression tricks (var ints etc not done yet). The main difference is that 
 we don't deserialize but use the normal sstable iterators and filters as in 
 the regular uncached case.
 So the read path looks like this:
 return filter.collectCollatedColumns(memtable iter, cached row iter)
 The write path is not affected. It does not update the cache
 During flush we merge all memtable updates with the cached rows.
 The attached patch is based on 0.8 branch r1143352
 It does not replace the existing row cache but sits aside it. Theres 
 environment switch to choose the implementation. This way it is easy to 
 benchmark performance differences.
 -DuseSSTableCache=true enables the alternative cache. It shares its 
 configuration with the standard row cache. So the cache capacity is shared. 
 We have duplicated a fair amount of code. First we actually refactored the 
 existing sstable filter / reader but than decided to minimize dependencies. 
 Also this way it is easy to customize serialization for in memory sstable 
 rows. 
 We have also experimented a little with compaction but since this task at 
 this stage is mainly to kick off discussion we wanted to keep things simple. 
 But there is certainly room for optimizations.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (CASSANDRA-2753) Capture the max client timestamp for an SSTable

2011-07-06 Thread Hudson (JIRA)

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

Hudson commented on CASSANDRA-2753:
---

Integrated in Cassandra #952 (See 
[https://builds.apache.org/job/Cassandra/952/])
track max client timestamp per-sstable
patch by Alan Liang; reviewed by jbellis for CASSANDRA-2753

jbellis : 
http://svn.apache.org/viewcvs.cgi/?root=Apache-SVNview=revrev=1143627
Files : 
* /cassandra/trunk/src/java/org/apache/cassandra/io/sstable/SSTable.java
* 
/cassandra/trunk/src/java/org/apache/cassandra/db/compaction/LazilyCompactedRow.java
* /cassandra/trunk/src/java/org/apache/cassandra/io/sstable/Descriptor.java
* /cassandra/trunk/src/java/org/apache/cassandra/db/SuperColumn.java
* /cassandra/trunk/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
* 
/cassandra/trunk/test/unit/org/apache/cassandra/db/compaction/CompactionsTest.java
* 
/cassandra/trunk/test/unit/org/apache/cassandra/io/sstable/SSTableWriterTest.java
* /cassandra/trunk/test/unit/org/apache/cassandra/db/CleanupTest.java
* /cassandra/trunk/src/java/org/apache/cassandra/io/sstable/SSTableWriter.java
* /cassandra/trunk/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
* /cassandra/trunk/test/unit/org/apache/cassandra/Util.java
* /cassandra/trunk/src/java/org/apache/cassandra/io/sstable/SSTableMetadata.java
* /cassandra/trunk/src/java/org/apache/cassandra/db/ColumnFamily.java
* 
/cassandra/trunk/src/java/org/apache/cassandra/db/compaction/AbstractCompactedRow.java
* /cassandra/trunk/src/java/org/apache/cassandra/db/Column.java
* /cassandra/trunk/src/java/org/apache/cassandra/db/IColumn.java
* 
/cassandra/trunk/src/java/org/apache/cassandra/db/commitlog/ReplayPosition.java
* 
/cassandra/trunk/test/unit/org/apache/cassandra/io/sstable/SSTableWriterCommutativeTest.java
* 
/cassandra/trunk/src/java/org/apache/cassandra/db/compaction/PrecompactedRow.java
* 
/cassandra/trunk/test/unit/org/apache/cassandra/io/sstable/SSTableMetadataSerializerTest.java
* /cassandra/trunk/src/java/org/apache/cassandra/io/sstable/SSTableReader.java
* /cassandra/trunk/src/java/org/apache/cassandra/config/CFMetaData.java
* /cassandra/trunk/src/java/org/apache/cassandra/utils/EstimatedHistogram.java
* /cassandra/trunk/src/java/org/apache/cassandra/db/EchoedRow.java
* /cassandra/trunk/src/java/org/apache/cassandra/db/ColumnFamilySerializer.java


 Capture the max client timestamp for an SSTable
 ---

 Key: CASSANDRA-2753
 URL: https://issues.apache.org/jira/browse/CASSANDRA-2753
 Project: Cassandra
  Issue Type: New Feature
  Components: Core
Reporter: Alan Liang
Assignee: Alan Liang
Priority: Minor
 Fix For: 1.0

 Attachments: 
 0001-capture-max-timestamp-and-created-SSTableMetadata-to-V2.patch, 
 0001-capture-max-timestamp-and-created-SSTableMetadata-to-V3.patch, 
 0001-capture-max-timestamp-and-created-SSTableMetadata-to.patch, 
 0003-capture-max-timestamp-for-sstable-and-introduced-SST.patch




--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (CASSANDRA-2475) Prepared statements

2011-07-06 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis commented on CASSANDRA-2475:
---

bq. we might as well only have one ANTLR parser and use its product for both 
simple and prepared statements

Makes sense to me.  So conceptually, that would involve adding to Cql.g that ? 
(for instance) is an acceptable term value?

 Prepared statements
 ---

 Key: CASSANDRA-2475
 URL: https://issues.apache.org/jira/browse/CASSANDRA-2475
 Project: Cassandra
  Issue Type: Sub-task
  Components: API, Core
Reporter: Eric Evans
  Labels: cql
 Fix For: 1.0




--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira