[jira] Created: (CASSANDRA-2339) Repair results in benign Unable to delete error on streaming neighbors

2011-03-16 Thread Jason Harvey (JIRA)
Repair results in benign Unable to delete error on streaming neighbors


 Key: CASSANDRA-2339
 URL: https://issues.apache.org/jira/browse/CASSANDRA-2339
 Project: Cassandra
  Issue Type: Bug
Affects Versions: 0.7.4
Reporter: Jason Harvey
Priority: Minor


When running a repair on a node, all of the surrounding nodes threw multitudes 
of the following errors immediately after they started streaming for the repair:

{code}
ERROR 23:24:00,494 Unable to delete 
/var/lib/cassandra/data/system/LocationInfo-f-21-Data.db (it will be removed on 
server restart)
ERROR 23:24:00,495 Unable to delete 
/var/lib/cassandra/data/reddit/Hide-f-15-Data.db (it will be removed on server 
restart)
ERROR 23:24:00,496 Unable to delete 
/var/lib/cassandra/data/reddit/CommentSortsCache-f-21-Data.db (it will be 
removed on server restart)
ERROR 23:24:00,496 Unable to delete 
/var/lib/cassandra/data/reddit/permacache-f-58-Data.db (it will be removed on 
server restart)
ERROR 23:24:00,496 Unable to delete 
/var/lib/cassandra/data/reddit/VotesByDay-f-5-Data.db (it will be removed on 
server restart)
...
{code}

Interestingly, I checked every file and verified that it *was* actually removed 
right around the time these errors were thrown. Double-delete going on 
somewhere?

The error didn't appear to cause any problems with the repair.

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


[jira] Commented: (CASSANDRA-2339) Repair results in benign Unable to delete error on streaming neighbors

2011-03-16 Thread Jason Harvey (JIRA)

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

Jason Harvey commented on CASSANDRA-2339:
-

Perhaps this is a similar issue to #681?

 Repair results in benign Unable to delete error on streaming neighbors
 

 Key: CASSANDRA-2339
 URL: https://issues.apache.org/jira/browse/CASSANDRA-2339
 Project: Cassandra
  Issue Type: Bug
Affects Versions: 0.7.4
Reporter: Jason Harvey
Priority: Minor
  Labels: repair

 When running a repair on a node, all of the surrounding nodes threw 
 multitudes of the following errors immediately after they started streaming 
 for the repair:
 {code}
 ERROR 23:24:00,494 Unable to delete 
 /var/lib/cassandra/data/system/LocationInfo-f-21-Data.db (it will be removed 
 on server restart)
 ERROR 23:24:00,495 Unable to delete 
 /var/lib/cassandra/data/reddit/Hide-f-15-Data.db (it will be removed on 
 server restart)
 ERROR 23:24:00,496 Unable to delete 
 /var/lib/cassandra/data/reddit/CommentSortsCache-f-21-Data.db (it will be 
 removed on server restart)
 ERROR 23:24:00,496 Unable to delete 
 /var/lib/cassandra/data/reddit/permacache-f-58-Data.db (it will be removed on 
 server restart)
 ERROR 23:24:00,496 Unable to delete 
 /var/lib/cassandra/data/reddit/VotesByDay-f-5-Data.db (it will be removed on 
 server restart)
 ...
 {code}
 Interestingly, I checked every file and verified that it *was* actually 
 removed right around the time these errors were thrown. Double-delete going 
 on somewhere?
 The error didn't appear to cause any problems with the repair.

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


[jira] Commented: (CASSANDRA-2338) C* needs a LOCAL_QUORUM_PLUS_ONE_REMOTE consistency level

2011-03-16 Thread Peter Schuller (JIRA)

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

Peter Schuller commented on CASSANDRA-2338:
---

I think this highlights even better than CASSANDRA-2013 that there is at least 
interest (if not need) to be able to specify with finer granularity what your 
requirements are. One can probably come up with a list of 15 cases and suddenly 
ConsistencyLevel is a huge beast. A few seemingly reasonable/realistic 
situations I can think of:

* Your situation, except there are 3 DC:s, 2 of which are production and one 
analysis. Now you want LOCAL_QUORUM_PLUS_ONE_IN_THIS_OTHER_PARTICULAR_REMOTE_DC
* You may want the reverse of requiring additional replicas; e.g., reads shall 
never try to go beyond the local DC; I prefer failures/timeouts)
* Maybe you one one replicate per DC, but no QUOROM in each.

It would be a bigger API change, and a more invasive code change. The simplest 
way to do this I can think of, is to allow the passing of a 
ReplicaSelectionPolicy (for lack of a better word right now) which allows you 
to specify, globally and on a per-dc level (assuming dc:s are named):

(1) How many replicates are *allowed* to be consulted.
(2) How many replicas are *required* to be consulted.

(1) would be of interest for reads, and (2) for both reads and writes.

Is this complete overkill?


 C* needs a LOCAL_QUORUM_PLUS_ONE_REMOTE consistency level
 -

 Key: CASSANDRA-2338
 URL: https://issues.apache.org/jira/browse/CASSANDRA-2338
 Project: Cassandra
  Issue Type: New Feature
Reporter: Matthew F. Dennis
Priority: Minor

 for cases where people want to run C* across multiple DCs for disaster 
 recovery et cetera where normal operations only happen in the first DC (e.g. 
 no writes/reads happen in the remove DC under normal operation) neither 
 LOCAL_QUORUM or EACH_QUORUM really suffices.  
 Consider the case with RF of DC1:3 DC2:2
 LOCAL_QUORUM doesn't provide any guarantee that data is in the remote DC.
 EACH_QUORUM requires that both nodes in the remote DC are up.
 It would be useful in some situations to be able to specify a LOCAL_QUORUM 
 (for local consistency) + at least one remote for durability/disaster 
 proofing.

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


[jira] Created: (CASSANDRA-2340) Easy means to set Maven repository locations

2011-03-16 Thread JIRA
Easy means to set Maven repository locations


 Key: CASSANDRA-2340
 URL: https://issues.apache.org/jira/browse/CASSANDRA-2340
 Project: Cassandra
  Issue Type: Improvement
  Components: Tools
Reporter: Jürgen Hermann
Priority: Minor


The attached patch allows to change the repository locations in 
build.properties. This is expecially useful to point them to a local proxy like 
Nexus, which speeds up the builds quite a bit.

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


[jira] Updated: (CASSANDRA-2340) Easy means to set Maven repository locations

2011-03-16 Thread JIRA

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

Jürgen Hermann updated CASSANDRA-2340:
--

Attachment: cassandra-trunk-2340.diff

 Easy means to set Maven repository locations
 

 Key: CASSANDRA-2340
 URL: https://issues.apache.org/jira/browse/CASSANDRA-2340
 Project: Cassandra
  Issue Type: Improvement
  Components: Tools
Reporter: Jürgen Hermann
Priority: Minor
 Attachments: cassandra-trunk-2340.diff


 The attached patch allows to change the repository locations in 
 build.properties. This is expecially useful to point them to a local proxy 
 like Nexus, which speeds up the builds quite a bit.

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


[jira] Updated: (CASSANDRA-2313) CommutativeRowIndexer always read full row in memory

2011-03-16 Thread Sylvain Lebresne (JIRA)

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

Sylvain Lebresne updated CASSANDRA-2313:


Attachment: 0002-Make-CommutativeRowIndexer-uses-AbstractCompactionRo.patch
0001-Introduce-CompactionController-to-handler-compaction.patch

Attaching patch against trunk.

This turns out to be slightly harder than expected because 
(PreCompacted|LazilyCompacted)Row and SSTableIdentityIterator were relying on a 
SSTableReader, but while rebuilding the index, we don't have one yet (and 
faking one would probably be fragile).

Instead, a first patch introduces CompactionController, that is used to manage 
the compaction options. This remove parts of the dependency mentioned above.  I 
also think that it cleans code and slightly optimize it in that it avoid 
recreating a HashSet of the sstables for each given row.

The second patch modify CommutativeRowIndexer to use 
(PreCompacted|LazilyCompacted)Row, which actually greatly simply the code there.


 CommutativeRowIndexer always read full row in memory
 

 Key: CASSANDRA-2313
 URL: https://issues.apache.org/jira/browse/CASSANDRA-2313
 Project: Cassandra
  Issue Type: Bug
Affects Versions: 0.8
Reporter: Sylvain Lebresne
Assignee: Sylvain Lebresne
 Fix For: 0.8

 Attachments: 
 0001-Introduce-CompactionController-to-handler-compaction.patch, 
 0002-Make-CommutativeRowIndexer-uses-AbstractCompactionRo.patch

   Original Estimate: 4h
  Remaining Estimate: 4h

 CommutativeRowIndexer use CFSerializer.deserializeColumns() that read the 
 full row in memory. We should use PreCompactedRow/LazilyCompactedRow instead 
 to avoid this on huge row.
 As an added benefit, using PreCompactedRow will avoid a current seek back to 
 write the row size.

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


[jira] Commented: (CASSANDRA-2272) Refactor Key and Row caches handling code

2011-03-16 Thread Sylvain Lebresne (JIRA)

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

Sylvain Lebresne commented on CASSANDRA-2272:
-

The v4 changes look good. Thanks

 Refactor Key and Row caches handling code 
 --

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

 Attachments: 0001-Refactor-key-and-row-cache-handling-code-v2.patch, 
 0001-Refactor-key-and-row-cache-handling-code-v3.patch, 
 0001-Refactor-key-and-row-cache-handling-code.patch, 2272_trunk_v4.txt

   Original Estimate: 4h
  Remaining Estimate: 4h

 The code related to key and row caches has a bunch of code duplication. It's
 moreover a bit scattered, the caches are in SSTableTracker but the scheduled
 task to save them are in CFStore. And having the caches in SSTableTracker is
 not very logic, for row cache at least, since it does not only concern the
 sstables. Proposed patch refactor this to avoid the duplication and put all
 the cache handling code in one place.

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


[jira] Commented: (CASSANDRA-2124) JDBC driver for CQL

2011-03-16 Thread Gary Dusbabek (JIRA)

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

Gary Dusbabek commented on CASSANDRA-2124:
--

Let's move any ResultSetMetaData discussion over to CASSANDRA-2302.

 JDBC driver for CQL
 ---

 Key: CASSANDRA-2124
 URL: https://issues.apache.org/jira/browse/CASSANDRA-2124
 Project: Cassandra
  Issue Type: New Feature
  Components: API
Reporter: Eric Evans
Assignee: Vivek Mishra
Priority: Minor
  Labels: cql
 Fix For: 0.8

 Attachments: Cassandra-2124_v1.0, Cassandra_2124_decoder.patch, 
 cassandra-0.7.1-2124_v2.0, cassandra-0.7.1-2124_v2.1, 
 cassandra_generic_decoder.patch, cassandra_generic_decoder_v1.1.patch, 
 v3-0001-first-pass-at-column-decoding.txt, 
 v3-0002-clean-up-JdbcDriverTest.txt, 
 v3-0003-implements-getXXX-methods-to-return-values-of-the-corr.txt, 
 v3-0004-more-comments-in-ColumnDecoder.txt, 
 v3-0005-move-all-java-cql-into-jdbc-package-and-only-expose-.patch


 A simple connection class and corresponding pool was created for CQL as a 
 part of CASSANDRA-1710, but a JDBC driver (either in addition to, or as a 
 replacement for) would also be interesting.

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


[jira] Updated: (CASSANDRA-2302) JDBC driver needs ResultSet.getMetaData()

2011-03-16 Thread Gary Dusbabek (JIRA)

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

Gary Dusbabek updated CASSANDRA-2302:
-

Attachment: v2-0004-cache-comparator-and-validator-in-the-resultset.txt
v2-0003-oh-yeah.-RSMD-column-index-all-need-to-be-off-by-one.txt

v2-0002-expose-CassandraResultSetMetaData-to-inspect-type-info.txt
v2-0001-implement-a-real-ResultSetMetaData.txt

 JDBC driver needs ResultSet.getMetaData()
 -

 Key: CASSANDRA-2302
 URL: https://issues.apache.org/jira/browse/CASSANDRA-2302
 Project: Cassandra
  Issue Type: Improvement
  Components: Core
Reporter: Gary Dusbabek
Assignee: Gary Dusbabek
Priority: Minor
  Labels: cql
 Fix For: 0.8

 Attachments: 
 v2-0001-RowData-exposes-sparse-column-attributes-through-Cassa.txt, 
 v2-0001-implement-a-real-ResultSetMetaData.txt, 
 v2-0002-expose-CassandraResultSetMetaData-to-inspect-type-info.txt, 
 v2-0002-make-RowMetaData-typed.txt, 
 v2-0003-oh-yeah.-RSMD-column-index-all-need-to-be-off-by-one.txt, 
 v2-0004-cache-comparator-and-validator-in-the-resultset.txt




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


[jira] Updated: (CASSANDRA-2302) JDBC driver needs ResultSet.getMetaData()

2011-03-16 Thread Gary Dusbabek (JIRA)

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

Gary Dusbabek updated CASSANDRA-2302:
-

Attachment: (was: 
v2-0001-RowData-exposes-sparse-column-attributes-through-Cassa.txt)

 JDBC driver needs ResultSet.getMetaData()
 -

 Key: CASSANDRA-2302
 URL: https://issues.apache.org/jira/browse/CASSANDRA-2302
 Project: Cassandra
  Issue Type: Improvement
  Components: Core
Reporter: Gary Dusbabek
Assignee: Gary Dusbabek
Priority: Minor
  Labels: cql
 Fix For: 0.8

 Attachments: v2-0001-implement-a-real-ResultSetMetaData.txt, 
 v2-0002-expose-CassandraResultSetMetaData-to-inspect-type-info.txt, 
 v2-0002-make-RowMetaData-typed.txt, 
 v2-0003-oh-yeah.-RSMD-column-index-all-need-to-be-off-by-one.txt, 
 v2-0004-cache-comparator-and-validator-in-the-resultset.txt




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


[jira] Updated: (CASSANDRA-2302) JDBC driver needs ResultSet.getMetaData()

2011-03-16 Thread Gary Dusbabek (JIRA)

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

Gary Dusbabek updated CASSANDRA-2302:
-

Attachment: (was: v2-0002-make-RowMetaData-typed.txt)

 JDBC driver needs ResultSet.getMetaData()
 -

 Key: CASSANDRA-2302
 URL: https://issues.apache.org/jira/browse/CASSANDRA-2302
 Project: Cassandra
  Issue Type: Improvement
  Components: Core
Reporter: Gary Dusbabek
Assignee: Gary Dusbabek
Priority: Minor
  Labels: cql
 Fix For: 0.8

 Attachments: v2-0001-implement-a-real-ResultSetMetaData.txt, 
 v2-0002-expose-CassandraResultSetMetaData-to-inspect-type-info.txt, 
 v2-0003-oh-yeah.-RSMD-column-index-all-need-to-be-off-by-one.txt, 
 v2-0004-cache-comparator-and-validator-in-the-resultset.txt




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


[jira] Created: (CASSANDRA-2341) Cli support for counters

2011-03-16 Thread Sylvain Lebresne (JIRA)
Cli support for counters


 Key: CASSANDRA-2341
 URL: https://issues.apache.org/jira/browse/CASSANDRA-2341
 Project: Cassandra
  Issue Type: Improvement
  Components: Tools
Affects Versions: 0.8
Reporter: Sylvain Lebresne
Assignee: Sylvain Lebresne
Priority: Minor
 Fix For: 0.8


The cli should have support for counters operation

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


[jira] Commented: (CASSANDRA-2302) JDBC driver needs ResultSet.getMetaData()

2011-03-16 Thread Gary Dusbabek (JIRA)

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

Gary Dusbabek commented on CASSANDRA-2302:
--

Newest patch offers a ResultSetMetaData implementation that is more true to the 
JDBC spec.  The ResultSetMetaData interface is limited in that it only exposes 
type information for column values.  I've exposed CassandraResultSetMetaData to 
remedy this.  It can be accessed this way: 
{code}
ResultSet rs = stmt.executeQuery(select ...);
ResultSetMetaData md = rs.getMetaData();
CassandraResultSetMetaData cmd = md.unwrap(CassandraResultSetMetaData.class);
{code}
CassandraResultSetMetaData is a long name to type out. I'm not opposed to 
renaming it CassandraResultMetaData or something else shorter.

One aspect of CassandraResultSetMetaData that is different than the traditional 
ResultSetMetaData is that it answers questions about the *current row* and not 
the entire query (getColumnCount(), etc.), although type information (class 
names, etc.) will be constant for every row in a result set.

When the time comes, I think CassandraResultSetMetaData will be the appropriate 
place to expose decoded and typed row keys.

 JDBC driver needs ResultSet.getMetaData()
 -

 Key: CASSANDRA-2302
 URL: https://issues.apache.org/jira/browse/CASSANDRA-2302
 Project: Cassandra
  Issue Type: Improvement
  Components: Core
Reporter: Gary Dusbabek
Assignee: Gary Dusbabek
Priority: Minor
  Labels: cql
 Fix For: 0.8

 Attachments: v2-0001-implement-a-real-ResultSetMetaData.txt, 
 v2-0002-expose-CassandraResultSetMetaData-to-inspect-type-info.txt, 
 v2-0003-oh-yeah.-RSMD-column-index-all-need-to-be-off-by-one.txt, 
 v2-0004-cache-comparator-and-validator-in-the-resultset.txt




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


[jira] Updated: (CASSANDRA-2341) Cli support for counters

2011-03-16 Thread Sylvain Lebresne (JIRA)

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

Sylvain Lebresne updated CASSANDRA-2341:


Attachment: 0001-Add-counter-support-to-cli.patch

Attached patch add two new cli commands: incr and decr. Both use a value of 1 
by default but can be given another delta with 'by x'. Negative delta are fine 
so decrement is really just syntactic sugar.

The get and get_slice are also modified to use counter operation when needed.

Remove is also implemented. As a side note, there is an inconsistency with 
remove since it assumes the key to be a utf-8 string while get and set assumes 
an hex string, making testing remove pretty annoying. 

 Cli support for counters
 

 Key: CASSANDRA-2341
 URL: https://issues.apache.org/jira/browse/CASSANDRA-2341
 Project: Cassandra
  Issue Type: Improvement
  Components: Tools
Affects Versions: 0.8
Reporter: Sylvain Lebresne
Assignee: Sylvain Lebresne
Priority: Minor
 Fix For: 0.8

 Attachments: 0001-Add-counter-support-to-cli.patch

   Original Estimate: 6h
  Remaining Estimate: 6h

 The cli should have support for counters operation

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


[jira] Updated: (CASSANDRA-2341) Cli support for counters

2011-03-16 Thread Sylvain Lebresne (JIRA)

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

Sylvain Lebresne updated CASSANDRA-2341:


Reviewer: xedin

 Cli support for counters
 

 Key: CASSANDRA-2341
 URL: https://issues.apache.org/jira/browse/CASSANDRA-2341
 Project: Cassandra
  Issue Type: Improvement
  Components: Tools
Affects Versions: 0.8
Reporter: Sylvain Lebresne
Assignee: Sylvain Lebresne
Priority: Minor
 Fix For: 0.8

 Attachments: 0001-Add-counter-support-to-cli.patch

   Original Estimate: 6h
  Remaining Estimate: 6h

 The cli should have support for counters operation

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


[jira] Commented: (CASSANDRA-1906) Sanitize configuration code

2011-03-16 Thread Gary Dusbabek (JIRA)

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

Gary Dusbabek commented on CASSANDRA-1906:
--

I can review this today. Jon-will you rebase and re-upload when you have a few 
minutes?

 Sanitize configuration code
 ---

 Key: CASSANDRA-1906
 URL: https://issues.apache.org/jira/browse/CASSANDRA-1906
 Project: Cassandra
  Issue Type: Improvement
Reporter: Jon Hermes
Assignee: Jon Hermes
Priority: Minor
 Fix For: 0.8

 Attachments: 1906-2.txt, 1906.txt

   Original Estimate: 24h
  Remaining Estimate: 24h

 Multipart:
 - Drop deprecated YAML config. Only config allowed is via thrift/JMX. Make 
 this gratuitously easy to do with sane defaults and accepting changesets as 
 opposed to full definitions.
 - Combine common code between KS/CF/ColumnDefs and between thrift/avro defs.
 - Provide an obvious and clean interface for changing settings locally versus 
 globally (JMX vs. thrift). Dox here.

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


svn commit: r1082155 - in /cassandra/trunk: CHANGES.txt src/java/org/apache/cassandra/db/marshal/AbstractCommutativeType.java

2011-03-16 Thread gdusbabek
Author: gdusbabek
Date: Wed Mar 16 14:18:21 2011
New Revision: 1082155

URL: http://svn.apache.org/viewvc?rev=1082155view=rev
Log:
fix merge problem with CHANGES.txt, use right call in 
AbstractCommutativeType.compose()

Modified:
cassandra/trunk/CHANGES.txt

cassandra/trunk/src/java/org/apache/cassandra/db/marshal/AbstractCommutativeType.java

Modified: cassandra/trunk/CHANGES.txt
URL: 
http://svn.apache.org/viewvc/cassandra/trunk/CHANGES.txt?rev=1082155r1=1082154r2=1082155view=diff
==
--- cassandra/trunk/CHANGES.txt (original)
+++ cassandra/trunk/CHANGES.txt Wed Mar 16 14:18:21 2011
@@ -1,4 +1,3 @@
- .working
 0.8-dev
  * avoid double RowMutation serialization on write path (CASSANDRA-1800)
  * adds support for columns that act as incr/decr counters 
@@ -12,7 +11,6 @@
  * Fix for Cli to support updating replicate_on_write (CASSANDRA-2236)
 
 
-===
 0.7.5
  * Avoid seeking when sstable2json exports the entire file (CASSANDRA-2318)
  * fix tombstone handling in repair and sstable2json (CASSANDRA-2279)
@@ -24,7 +22,6 @@
  * shut down server for OOM on a Thrift thread (CASSANDRA-2269)
 
 
- .merge-right.r1081840
 0.7.4
  * add nodetool join command (CASSANDRA-2160)
  * fix secondary indexes on pre-existing or streamed data (CASSANDRA-2244)

Modified: 
cassandra/trunk/src/java/org/apache/cassandra/db/marshal/AbstractCommutativeType.java
URL: 
http://svn.apache.org/viewvc/cassandra/trunk/src/java/org/apache/cassandra/db/marshal/AbstractCommutativeType.java?rev=1082155r1=1082154r2=1082155view=diff
==
--- 
cassandra/trunk/src/java/org/apache/cassandra/db/marshal/AbstractCommutativeType.java
 (original)
+++ 
cassandra/trunk/src/java/org/apache/cassandra/db/marshal/AbstractCommutativeType.java
 Wed Mar 16 14:18:21 2011
@@ -20,12 +20,10 @@
  */
 package org.apache.cassandra.db.marshal;
 
-import java.net.InetAddress;
 import java.nio.ByteBuffer;
 
 import org.apache.cassandra.db.Column;
-import org.apache.cassandra.db.IColumnContainer;
-import org.apache.cassandra.utils.ByteBufferUtil;
+import org.apache.cassandra.db.context.CounterContext;
 
 public abstract class AbstractCommutativeType extends AbstractTypeLong
 {
@@ -36,7 +34,7 @@ public abstract class AbstractCommutativ
 
 public Long compose(ByteBuffer bytes)
 {
-return ByteBufferUtil.toLong(bytes);
+return CounterContext.instance().total(bytes);
 }
 
 /**




[jira] Created: (CASSANDRA-2342) Add range slice support for counters

2011-03-16 Thread Sylvain Lebresne (JIRA)
Add range slice support for counters


 Key: CASSANDRA-2342
 URL: https://issues.apache.org/jira/browse/CASSANDRA-2342
 Project: Cassandra
  Issue Type: Improvement
  Components: Core
Affects Versions: 0.8
Reporter: Sylvain Lebresne
Priority: Minor
 Fix For: 0.8


There is no equivalent for get_range_slice() for counters right now.

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


[jira] Commented: (CASSANDRA-2341) Cli support for counters

2011-03-16 Thread Sylvain Lebresne (JIRA)

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

Sylvain Lebresne commented on CASSANDRA-2341:
-

Btw, the 'list' command won't work on counter CF (well until CASSANDRA-2321 it 
kind of work but return non human readable values). But we need CASSANDRA-2342 
first to do that.

 Cli support for counters
 

 Key: CASSANDRA-2341
 URL: https://issues.apache.org/jira/browse/CASSANDRA-2341
 Project: Cassandra
  Issue Type: Improvement
  Components: Tools
Affects Versions: 0.8
Reporter: Sylvain Lebresne
Assignee: Sylvain Lebresne
Priority: Minor
 Fix For: 0.8

 Attachments: 0001-Add-counter-support-to-cli.patch

   Original Estimate: 6h
  Remaining Estimate: 6h

 The cli should have support for counters operation

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


[jira] Updated: (CASSANDRA-1034) Remove assumption that Key to Token is one-to-one

2011-03-16 Thread Sylvain Lebresne (JIRA)

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

Sylvain Lebresne updated CASSANDRA-1034:


Attachment: 0001-Make-range-accept-both-Token-and-DecoratedKey.patch

Patch rebased

 Remove assumption that Key to Token is one-to-one
 -

 Key: CASSANDRA-1034
 URL: https://issues.apache.org/jira/browse/CASSANDRA-1034
 Project: Cassandra
  Issue Type: Bug
Reporter: Stu Hood
Assignee: Sylvain Lebresne
Priority: Minor
 Fix For: 0.8

 Attachments: 
 0001-Make-range-accept-both-Token-and-DecoratedKey.patch, 
 0002-LengthPartitioner.patch, 1034_v1.txt


 get_range_slices assumes that Tokens do not collide and converts a KeyRange 
 to an AbstractBounds. For RandomPartitioner, this assumption isn't safe, and 
 would lead to a very weird heisenberg.
 Converting AbstractBounds to use a DecoratedKey would solve this, because the 
 byte[] key portion of the DecoratedKey can act as a tiebreaker. 
 Alternatively, we could make DecoratedKey extend Token, and then use 
 DecoratedKeys in places where collisions are unacceptable.

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


[jira] Updated: (CASSANDRA-1034) Remove assumption that Key to Token is one-to-one

2011-03-16 Thread Sylvain Lebresne (JIRA)

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

Sylvain Lebresne updated CASSANDRA-1034:


Attachment: (was: 
0001-Make-range-accept-both-Token-and-DecoratedKey.patch)

 Remove assumption that Key to Token is one-to-one
 -

 Key: CASSANDRA-1034
 URL: https://issues.apache.org/jira/browse/CASSANDRA-1034
 Project: Cassandra
  Issue Type: Bug
Reporter: Stu Hood
Assignee: Sylvain Lebresne
Priority: Minor
 Fix For: 0.8

 Attachments: 
 0001-Make-range-accept-both-Token-and-DecoratedKey.patch, 
 0002-LengthPartitioner.patch, 1034_v1.txt


 get_range_slices assumes that Tokens do not collide and converts a KeyRange 
 to an AbstractBounds. For RandomPartitioner, this assumption isn't safe, and 
 would lead to a very weird heisenberg.
 Converting AbstractBounds to use a DecoratedKey would solve this, because the 
 byte[] key portion of the DecoratedKey can act as a tiebreaker. 
 Alternatively, we could make DecoratedKey extend Token, and then use 
 DecoratedKeys in places where collisions are unacceptable.

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


[jira] Resolved: (CASSANDRA-2235) Counter AES performance issue

2011-03-16 Thread Sylvain Lebresne (JIRA)

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

Sylvain Lebresne resolved CASSANDRA-2235.
-

Resolution: Fixed

Marking resolved since either CASSANDRA-2218 or CASSANDRA-2288 fixed this.

 Counter AES performance issue
 -

 Key: CASSANDRA-2235
 URL: https://issues.apache.org/jira/browse/CASSANDRA-2235
 Project: Cassandra
  Issue Type: Bug
Reporter: Chris Goffinet
Assignee: Chris Goffinet
 Fix For: 0.8


 We noticed tonight when trying out AES for Counters in trunk, there is a 
 serious performance issue when inlining the SSTables. We found that the way 
 we are seeking in the file, BRAF keeps flushing out its buffer of 8MB, and we 
 call dfile.sync() on every row. We are finalizing a patch to write a new 
 SSTable on rebuild, instead of inlining. 

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


[jira] Commented: (CASSANDRA-1906) Sanitize configuration code

2011-03-16 Thread Jon Hermes (JIRA)

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

Jon Hermes commented on CASSANDRA-1906:
---

Yes. If I only have to rebase this twice I'll consider it a miracle.

 Sanitize configuration code
 ---

 Key: CASSANDRA-1906
 URL: https://issues.apache.org/jira/browse/CASSANDRA-1906
 Project: Cassandra
  Issue Type: Improvement
Reporter: Jon Hermes
Assignee: Jon Hermes
Priority: Minor
 Fix For: 0.8

 Attachments: 1906-2.txt, 1906.txt

   Original Estimate: 24h
  Remaining Estimate: 24h

 Multipart:
 - Drop deprecated YAML config. Only config allowed is via thrift/JMX. Make 
 this gratuitously easy to do with sane defaults and accepting changesets as 
 opposed to full definitions.
 - Combine common code between KS/CF/ColumnDefs and between thrift/avro defs.
 - Provide an obvious and clean interface for changing settings locally versus 
 globally (JMX vs. thrift). Dox here.

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


[jira] Commented: (CASSANDRA-2338) C* needs a LOCAL_QUORUM_PLUS_ONE_REMOTE consistency level

2011-03-16 Thread Eric Evans (JIRA)

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

Eric Evans commented on CASSANDRA-2338:
---

AIUI, the reasoning behind the ConsistencyLevel enum was to simply things, to 
codify best practice and make it easier for people to understand and do the 
Right Thing.  In other words, sacrifice some flexibility in exchange for 
usability.  For this to work, the Right Answer in situations like this is to 
tweak the RF knob to work with the available consistency options.

If consensus is that this trade-off is wrong (usability vs flexibility), then 
the reasonable thing to do is eliminate ConsistencyLevel in favor of an int.

LOCAL_QUORUM_PLUS_ONE_REMOTE is a Bad Idea IMO, so is TWO and THREE.

 C* needs a LOCAL_QUORUM_PLUS_ONE_REMOTE consistency level
 -

 Key: CASSANDRA-2338
 URL: https://issues.apache.org/jira/browse/CASSANDRA-2338
 Project: Cassandra
  Issue Type: New Feature
Reporter: Matthew F. Dennis
Priority: Minor

 for cases where people want to run C* across multiple DCs for disaster 
 recovery et cetera where normal operations only happen in the first DC (e.g. 
 no writes/reads happen in the remove DC under normal operation) neither 
 LOCAL_QUORUM or EACH_QUORUM really suffices.  
 Consider the case with RF of DC1:3 DC2:2
 LOCAL_QUORUM doesn't provide any guarantee that data is in the remote DC.
 EACH_QUORUM requires that both nodes in the remote DC are up.
 It would be useful in some situations to be able to specify a LOCAL_QUORUM 
 (for local consistency) + at least one remote for durability/disaster 
 proofing.

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


[jira] Created: (CASSANDRA-2343) Allow configured ports to be overridden with system properties

2011-03-16 Thread Brandon Williams (JIRA)
Allow configured ports to be overridden with system properties
--

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

For automated testing, it would be nice to be able to override the storage/rpc 
ports in config, rather than rewrite the yaml.

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


[jira] Updated: (CASSANDRA-2343) Allow configured ports to be overridden with system properties

2011-03-16 Thread Brandon Williams (JIRA)

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

Brandon Williams updated CASSANDRA-2343:


Attachment: 2343.txt

 Allow configured ports to be overridden with system properties
 --

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

 Attachments: 2343.txt


 For automated testing, it would be nice to be able to override the 
 storage/rpc ports in config, rather than rewrite the yaml.

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


[jira] Commented: (CASSANDRA-2338) C* needs a LOCAL_QUORUM_PLUS_ONE_REMOTE consistency level

2011-03-16 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis commented on CASSANDRA-2338:
---

An int doesn't capture enough information though, it's just the first nodes 
that reply which isn't always what you want.

IMO we should ship commonly-used levels (which probably doesn't include TWO or 
THREE) but make it pluggable so people can add custom ones.

 C* needs a LOCAL_QUORUM_PLUS_ONE_REMOTE consistency level
 -

 Key: CASSANDRA-2338
 URL: https://issues.apache.org/jira/browse/CASSANDRA-2338
 Project: Cassandra
  Issue Type: New Feature
Reporter: Matthew F. Dennis
Priority: Minor

 for cases where people want to run C* across multiple DCs for disaster 
 recovery et cetera where normal operations only happen in the first DC (e.g. 
 no writes/reads happen in the remove DC under normal operation) neither 
 LOCAL_QUORUM or EACH_QUORUM really suffices.  
 Consider the case with RF of DC1:3 DC2:2
 LOCAL_QUORUM doesn't provide any guarantee that data is in the remote DC.
 EACH_QUORUM requires that both nodes in the remote DC are up.
 It would be useful in some situations to be able to specify a LOCAL_QUORUM 
 (for local consistency) + at least one remote for durability/disaster 
 proofing.

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


svn commit: r1082199 - in /cassandra/trunk: build.properties.default build.xml

2011-03-16 Thread jbellis
Author: jbellis
Date: Wed Mar 16 16:51:04 2011
New Revision: 1082199

URL: http://svn.apache.org/viewvc?rev=1082199view=rev
Log:
allow specifying maven repo locations
patch by Jürgen Hermann; tested by jbellis for CASSANDRA-2340

Added:
cassandra/trunk/build.properties.default
Modified:
cassandra/trunk/build.xml

Added: cassandra/trunk/build.properties.default
URL: 
http://svn.apache.org/viewvc/cassandra/trunk/build.properties.default?rev=1082199view=auto
==
--- cassandra/trunk/build.properties.default (added)
+++ cassandra/trunk/build.properties.default Wed Mar 16 16:51:04 2011
@@ -0,0 +1,9 @@
+# Maven2 Repository Locations (you can override these to point to a local 
proxy, e.g. Nexus)
+artifact.remoteRepository.central:  http://repo1.maven.org/maven2
+artifact.remoteRepository.java.net2:http://download.java.net/maven/2
+artifact.remoteRepository.java.apache:  
https://repository.apache.org/content/repositories/releases
+artifact.remoteRepository.java.cloudera:
https://repository.cloudera.com/content/repositories/releases
+artifact.remoteRepository.java.jclouds: 
http://jclouds.googlecode.com/svn/repo
+artifact.remoteRepository.java.oauth:   
http://oauth.googlecode.com/svn/code/maven
+artifact.remoteRepository.java.twttr:   http://maven.twttr.com
+

Modified: cassandra/trunk/build.xml
URL: 
http://svn.apache.org/viewvc/cassandra/trunk/build.xml?rev=1082199r1=1082198r2=1082199view=diff
==
--- cassandra/trunk/build.xml (original)
+++ cassandra/trunk/build.xml Wed Mar 16 16:51:04 2011
@@ -21,6 +21,7 @@
  xmlns:artifact=antlib:org.apache.maven.artifact.ant
 property environment=env/
 property file=build.properties /
+property file=build.properties.default /
 property name=debuglevel value=source,lines,vars/
 
 property name=basedir value=./
@@ -184,14 +185,14 @@
   typedef uri=antlib:org.apache.maven.artifact.ant 
classpathref=maven-ant-tasks.classpath /
 
   !-- define the remote repositories we use --
-  artifact:remoteRepository id=central 
url=http://repo1.maven.org/maven2/
-  artifact:remoteRepository id=java.net2 
url=http://download.java.net/maven/2/
-  artifact:remoteRepository id=apache
url=https://repository.apache.org/content/repositories/releases/
-  artifact:remoteRepository id=cloudera  
url=https://repository.cloudera.com/content/repositories/releases/
+  artifact:remoteRepository id=central   
url=${artifact.remoteRepository.central}/
+  artifact:remoteRepository id=java.net2 
url=${artifact.remoteRepository.java.net2}/
+  artifact:remoteRepository id=apache
url=${artifact.remoteRepository.apache}/
+  artifact:remoteRepository id=cloudera  
url=${artifact.remoteRepository.cloudera}/
   !-- for distributed tests --
-  artifact:remoteRepository id=jclouds   
url=http://jclouds.googlecode.com/svn/repo/
-  artifact:remoteRepository id=oauth 
url=http://oauth.googlecode.com/svn/code/maven/
-  artifact:remoteRepository id=twttr url=http://maven.twttr.com/
+  artifact:remoteRepository id=jclouds   
url=${artifact.remoteRepository.jclouds}/
+  artifact:remoteRepository id=oauth 
url=${artifact.remoteRepository.oauth}/
+  artifact:remoteRepository id=twttr 
url=${artifact.remoteRepository.twttr}/
 
   property name=maven-ant-tasks.initialized value=true/
 /target




[jira] Resolved: (CASSANDRA-2340) Easy means to set Maven repository locations

2011-03-16 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis resolved CASSANDRA-2340.
---

   Resolution: Fixed
Fix Version/s: 0.8
 Reviewer: jbellis
 Assignee: Jürgen Hermann

committed, thanks!

 Easy means to set Maven repository locations
 

 Key: CASSANDRA-2340
 URL: https://issues.apache.org/jira/browse/CASSANDRA-2340
 Project: Cassandra
  Issue Type: Improvement
  Components: Tools
Reporter: Jürgen Hermann
Assignee: Jürgen Hermann
Priority: Minor
 Fix For: 0.8

 Attachments: cassandra-trunk-2340.diff


 The attached patch allows to change the repository locations in 
 build.properties. This is expecially useful to point them to a local proxy 
 like Nexus, which speeds up the builds quite a bit.

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


[jira] Commented: (CASSANDRA-2343) Allow configured ports to be overridden with system properties

2011-03-16 Thread Rick Shaw (JIRA)

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

Rick Shaw commented on CASSANDRA-2343:
--

Allowing the override of 'initial_token' would be useful as well. This would 
greatly simplify configuration of multiple node configurations where the 
initial token is the only difference in yaml config files.


 Allow configured ports to be overridden with system properties
 --

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

 Attachments: 2343.txt


 For automated testing, it would be nice to be able to override the 
 storage/rpc ports in config, rather than rewrite the yaml.

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


[jira] Updated: (CASSANDRA-2343) Allow configured ports to be overridden with system properties

2011-03-16 Thread Brandon Williams (JIRA)

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

Brandon Williams updated CASSANDRA-2343:


Attachment: (was: 2343.txt)

 Allow configured ports to be overridden with system properties
 --

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

 Attachments: 2343.txt


 For automated testing, it would be nice to be able to override the 
 storage/rpc ports in config, rather than rewrite the yaml.

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


[jira] Updated: (CASSANDRA-2343) Allow configured ports to be overridden with system properties

2011-03-16 Thread Brandon Williams (JIRA)

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

Brandon Williams updated CASSANDRA-2343:


Attachment: 2343.txt

That seems reasonable.  Updated patch.

 Allow configured ports to be overridden with system properties
 --

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

 Attachments: 2343.txt


 For automated testing, it would be nice to be able to override the 
 storage/rpc ports in config, rather than rewrite the yaml.

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


[jira] Updated: (CASSANDRA-2272) Refactor Key and Row caches handling code

2011-03-16 Thread Matthew F. Dennis (JIRA)

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

Matthew F. Dennis updated CASSANDRA-2272:
-

Attachment: 2272_trunk_v5.txt

v5 rebased to trunk

 Refactor Key and Row caches handling code 
 --

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

 Attachments: 0001-Refactor-key-and-row-cache-handling-code-v2.patch, 
 0001-Refactor-key-and-row-cache-handling-code-v3.patch, 
 0001-Refactor-key-and-row-cache-handling-code.patch, 2272_trunk_v4.txt, 
 2272_trunk_v5.txt

   Original Estimate: 4h
  Remaining Estimate: 4h

 The code related to key and row caches has a bunch of code duplication. It's
 moreover a bit scattered, the caches are in SSTableTracker but the scheduled
 task to save them are in CFStore. And having the caches in SSTableTracker is
 not very logic, for row cache at least, since it does not only concern the
 sstables. Proposed patch refactor this to avoid the duplication and put all
 the cache handling code in one place.

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


svn commit: r1082236 - in /cassandra/trunk/src/java/org/apache/cassandra: config/ db/ io/sstable/ service/

2011-03-16 Thread brandonwilliams
Author: brandonwilliams
Date: Wed Mar 16 17:52:53 2011
New Revision: 1082236

URL: http://svn.apache.org/viewvc?rev=1082236view=rev
Log:
Refactor row/key cache handling.
Patch by slebresne, reviewed by Matthew Dennis for CASSANDRA-2272

Removed:
cassandra/trunk/src/java/org/apache/cassandra/io/sstable/CacheWriter.java
Modified:
cassandra/trunk/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
cassandra/trunk/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
cassandra/trunk/src/java/org/apache/cassandra/db/CompactionManager.java
cassandra/trunk/src/java/org/apache/cassandra/db/Table.java
cassandra/trunk/src/java/org/apache/cassandra/io/sstable/SSTableReader.java
cassandra/trunk/src/java/org/apache/cassandra/io/sstable/SSTableTracker.java
cassandra/trunk/src/java/org/apache/cassandra/service/StorageService.java

Modified: 
cassandra/trunk/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
URL: 
http://svn.apache.org/viewvc/cassandra/trunk/src/java/org/apache/cassandra/config/DatabaseDescriptor.java?rev=1082236r1=1082235r2=1082236view=diff
==
--- 
cassandra/trunk/src/java/org/apache/cassandra/config/DatabaseDescriptor.java 
(original)
+++ 
cassandra/trunk/src/java/org/apache/cassandra/config/DatabaseDescriptor.java 
Wed Mar 16 17:52:53 2011
@@ -34,6 +34,7 @@ import org.apache.cassandra.auth.AllowAl
 import org.apache.cassandra.auth.IAuthenticator;
 import org.apache.cassandra.auth.IAuthority;
 import org.apache.cassandra.config.Config.RequestSchedulerId;
+import org.apache.cassandra.db.ColumnFamilyStore;
 import org.apache.cassandra.db.ColumnFamilyType;
 import org.apache.cassandra.db.DefsTable;
 import org.apache.cassandra.db.Table;
@@ -997,26 +998,6 @@ public class DatabaseDescriptor
 return getCFMetaData(tableName, cfName).subcolumnComparator;
 }
 
-/**
- * @return The absolute number of keys that should be cached per table.
- */
-public static int getKeysCachedFor(String tableName, String 
columnFamilyName, long expectedKeys)
-{
-CFMetaData cfm = getCFMetaData(tableName, columnFamilyName);
-double v = (cfm == null) ? CFMetaData.DEFAULT_KEY_CACHE_SIZE : 
cfm.getKeyCacheSize();
-return (int)Math.min(FBUtilities.absoluteFromFraction(v, 
expectedKeys), Integer.MAX_VALUE);
-}
-
-/**
- * @return The absolute number of rows that should be cached for the 
columnfamily.
- */
-public static int getRowsCachedFor(String tableName, String 
columnFamilyName, long expectedRows)
-{
-CFMetaData cfm = getCFMetaData(tableName, columnFamilyName);
-double v = (cfm == null) ? CFMetaData.DEFAULT_ROW_CACHE_SIZE : 
cfm.getRowCacheSize();
-return (int)Math.min(FBUtilities.absoluteFromFraction(v, 
expectedRows), Integer.MAX_VALUE);
-}
-
 public static KSMetaData getTableDefinition(String table)
 {
 return tables.get(table);
@@ -1156,14 +1137,9 @@ public class DatabaseDescriptor
 return conf.index_interval;
 }
 
-public static File getSerializedRowCachePath(String ksName, String cfName)
-{
-return new File(conf.saved_caches_directory + File.separator + ksName 
+ - + cfName + -RowCache);
-}
-
-public static File getSerializedKeyCachePath(String ksName, String cfName)
+public static File getSerializedCachePath(String ksName, String cfName, 
ColumnFamilyStore.CacheType cacheType)
 {
-return new File(conf.saved_caches_directory + File.separator + ksName 
+ - + cfName + -KeyCache);
+return new File(conf.saved_caches_directory + File.separator + ksName 
+ - + cfName + - + cacheType);
 }
 
 public static int getDynamicUpdateInterval()

Modified: 
cassandra/trunk/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
URL: 
http://svn.apache.org/viewvc/cassandra/trunk/src/java/org/apache/cassandra/db/ColumnFamilyStore.java?rev=1082236r1=1082235r2=1082236view=diff
==
--- cassandra/trunk/src/java/org/apache/cassandra/db/ColumnFamilyStore.java 
(original)
+++ cassandra/trunk/src/java/org/apache/cassandra/db/ColumnFamilyStore.java Wed 
Mar 16 17:52:53 2011
@@ -35,6 +35,9 @@ import org.apache.commons.lang.StringUti
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import org.apache.cassandra.cache.AutoSavingCache;
+import org.apache.cassandra.cache.AutoSavingKeyCache;
+import org.apache.cassandra.cache.AutoSavingRowCache;
 import org.apache.cassandra.concurrent.JMXEnabledThreadPoolExecutor;
 import org.apache.cassandra.concurrent.NamedThreadFactory;
 import org.apache.cassandra.concurrent.StageManager;
@@ -92,6 +95,7 @@ public class ColumnFamilyStore implement
new 
LinkedBlockingQueueRunnable(DatabaseDescriptor.getFlushQueueSize()),
new 

buildbot failure in ASF Buildbot on cassandra-trunk

2011-03-16 Thread buildbot
The Buildbot has detected a new failure of cassandra-trunk on ASF Buildbot.
Full details are available at:
 http://ci.apache.org/builders/cassandra-trunk/builds/1133

Buildbot URL: http://ci.apache.org/

Buildslave for this Build: isis_ubuntu

Build Reason: 
Build Source Stamp: [branch cassandra/trunk] 1082236
Blamelist: brandonwilliams

BUILD FAILED: failed compile

sincerely,
 -The Buildbot



svn commit: r1082243 - in /cassandra/trunk/doc/cql: CQL.html CQL.textile

2011-03-16 Thread eevans
Author: eevans
Date: Wed Mar 16 18:18:41 2011
New Revision: 1082243

URL: http://svn.apache.org/viewvc?rev=1082243view=rev
Log:
update CQL doco for recent changes

Patch by eevans

Modified:
cassandra/trunk/doc/cql/CQL.html
cassandra/trunk/doc/cql/CQL.textile

Modified: cassandra/trunk/doc/cql/CQL.html
URL: 
http://svn.apache.org/viewvc/cassandra/trunk/doc/cql/CQL.html?rev=1082243r1=1082242r2=1082243view=diff
==
--- cassandra/trunk/doc/cql/CQL.html (original)
+++ cassandra/trunk/doc/cql/CQL.html Wed Mar 16 18:18:41 2011
@@ -1,4 +1,4 @@
-?xml version='1.0' encoding='utf-8' ?!DOCTYPE html PUBLIC -//W3C//DTD 
XHTML 1.0 Transitional//EN 
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd;html 
xmlns=http://www.w3.org/1999/xhtml;headmeta http-equiv=Content-Type 
content=text/html; charset=utf-8//headbodyh1 
id=CassandraQueryLanguageCQLv0.99.1Cassandra Query Language (CQL) 
v0.99.1/h1h2 id=TableofContentsTable of Contents/h2ol 
style=list-style: none;lia 
href=#CassandraQueryLanguageCQLv0.99.1Cassandra Query Language (CQL) 
v0.99.1/aol style=list-style: none;lia href=#TableofContentsTable 
of Contents/a/lilia href=#USEUSE/a/lilia 
href=#SELECTSELECT/aol style=list-style: none;lia 
href=#SpecifyingColumnsSpecifying Columns/a/lilia 
href=#ColumnFamilyColumn Family/a/lilia 
href=#ConsistencyLevelConsistency Level/a/lilia 
href=#FilteringrowsFiltering rows/a/lilia 
href=#LimitsLimits/a/li/ol/li
 lia href=#UPDATEUPDATE/aol style=list-style: none;lia 
href=#ColumnFamily2Column Family/a/lilia 
href=#ConsistencyLevel2Consistency Level/a/lilia 
href=#SpecifyingColumnsandRowSpecifying Columns and 
Row/a/li/ol/lilia href=#DELETEDELETE/aol style=list-style: 
none;lia href=#SpecifyingColumns2Specifying Columns/a/lilia 
href=#ColumnFamily3Column Family/a/lilia 
href=#ConsistencyLevel3Consistency Level/a/lilia 
href=#deleterowsSpecifying Rows/a/li/ol/lilia 
href=#TRUNCATETRUNCATE/a/lilia href=#CREATEKEYSPACECREATE 
KEYSPACE/a/lilia href=#CREATECOLUMNFAMILYCREATE COLUMNFAMILY/aol 
style=list-style: none;lia href=#columntypesSpecifying Column Type 
(optional)/a/lilia href=#ColumnFamilyOptionsoptionalColumn Family 
Options (optional)/a/li/ol/lilia href=#CREATEINDEXCREATE 
INDEX/a/lilia href=#DROPDROP/a/lilia href=#
 CommonIdiomsCommon Idioms/aol style=list-style: none;lia 
href=#consistencySpecifying Consistency/a/lilia href=#termsTerm 
specification/aol style=list-style: none;lia 
href=#string_literalsString Literals/a/lilia 
href=#UnicodeUnicode/a/lilia href=#IntegerslongsIntegers / 
longs/a/lilia 
href=#UUIDsUUIDs/a/li/ol/li/ol/li/ol/li/olh2 
id=USEUSE/h2piSynopsis:/i/pprecodeUSE lt;KEYSPACEgt;;
+?xml version='1.0' encoding='utf-8' ?!DOCTYPE html PUBLIC -//W3C//DTD 
XHTML 1.0 Transitional//EN 
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd;html 
xmlns=http://www.w3.org/1999/xhtml;headmeta http-equiv=Content-Type 
content=text/html; charset=utf-8//headbodyh1 
id=CassandraQueryLanguageCQLv0.99.1Cassandra Query Language (CQL) 
v0.99.1/h1h2 id=TableofContentsTable of Contents/h2ol 
style=list-style: none;lia 
href=#CassandraQueryLanguageCQLv0.99.1Cassandra Query Language (CQL) 
v0.99.1/aol style=list-style: none;lia href=#TableofContentsTable 
of Contents/a/lilia href=#USEUSE/a/lilia 
href=#SELECTSELECT/aol style=list-style: none;lia 
href=#SpecifyingColumnsSpecifying Columns/a/lilia 
href=#ColumnFamilyColumn Family/a/lilia 
href=#ConsistencyLevelConsistency Level/a/lilia 
href=#FilteringrowsFiltering rows/a/lilia 
href=#LimitsLimits/a/li/ol/li
 lia href=#UPDATEUPDATE/aol style=list-style: none;lia 
href=#ColumnFamily2Column Family/a/lilia 
href=#ConsistencyLevel2Consistency Level/a/lilia 
href=#SpecifyingColumnsandRowSpecifying Columns and 
Row/a/li/ol/lilia href=#DELETEDELETE/aol style=list-style: 
none;lia href=#SpecifyingColumns2Specifying Columns/a/lilia 
href=#ColumnFamily3Column Family/a/lilia 
href=#ConsistencyLevel3Consistency Level/a/lilia 
href=#deleterowsSpecifying Rows/a/li/ol/lilia 
href=#TRUNCATETRUNCATE/a/lilia href=#CREATEKEYSPACECREATE 
KEYSPACE/a/lilia href=#CREATECOLUMNFAMILYCREATE COLUMNFAMILY/aol 
style=list-style: none;lia href=#columntypesSpecifying Column Type 
(optional)/a/lilia href=#ColumnFamilyOptionsoptionalColumn Family 
Options (optional)/a/li/ol/lilia href=#CREATEINDEXCREATE 
INDEX/a/lilia href=#DROPDROP/a/lilia href=#
 CommonIdiomsCommon Idioms/aol style=list-style: none;lia 
href=#consistencySpecifying Consistency/a/lilia href=#termsTerm 
specification/a/li/ol/li/ol/li/olh2 
id=USEUSE/h2piSynopsis:/i/pprecodeUSE lt;KEYSPACEgt;;
 /code/prepA codeUSE/code statement consists of the codeUSE/code 
keyword, followed by a valid keyspace name.  Its purpose is to assign the 
per-connection, current working keyspace.  All subsequent keyspace-specific 
actions will be performed in the context of the supplied value./ph2 
id=SELECTSELECT/h2piSynopsis:/i/pprecodeSELECT [FIRST N] 
[REVERSED] lt;SELECT EXPRgt; FROM 

[jira] Commented: (CASSANDRA-2338) C* needs a LOCAL_QUORUM_PLUS_ONE_REMOTE consistency level

2011-03-16 Thread Eric Evans (JIRA)

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

Eric Evans commented on CASSANDRA-2338:
---

bq. An int doesn't capture enough information though, it's just the first 
nodes that reply which isn't always what you want.

Right, I was using int to mean arbitrary, as opposed to picking from a 
fixed set (and I wasn't advocating that approach :)).

bq. IMO we should ship commonly-used levels (which probably doesn't include TWO 
or THREE) but make it pluggable so people can add custom ones.

This is a much better alternative IMO.

 C* needs a LOCAL_QUORUM_PLUS_ONE_REMOTE consistency level
 -

 Key: CASSANDRA-2338
 URL: https://issues.apache.org/jira/browse/CASSANDRA-2338
 Project: Cassandra
  Issue Type: New Feature
Reporter: Matthew F. Dennis
Priority: Minor

 for cases where people want to run C* across multiple DCs for disaster 
 recovery et cetera where normal operations only happen in the first DC (e.g. 
 no writes/reads happen in the remove DC under normal operation) neither 
 LOCAL_QUORUM or EACH_QUORUM really suffices.  
 Consider the case with RF of DC1:3 DC2:2
 LOCAL_QUORUM doesn't provide any guarantee that data is in the remote DC.
 EACH_QUORUM requires that both nodes in the remote DC are up.
 It would be useful in some situations to be able to specify a LOCAL_QUORUM 
 (for local consistency) + at least one remote for durability/disaster 
 proofing.

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


[jira] Commented: (CASSANDRA-2338) C* needs a LOCAL_QUORUM_PLUS_ONE_REMOTE consistency level

2011-03-16 Thread Matthew F. Dennis (JIRA)

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

Matthew F. Dennis commented on CASSANDRA-2338:
--

two of the most common requests I hear from users is specify an arbitrary 
number of replicas (usually two) and specify things like (at least one copy in 
one other DC).

In any case, I certainly wasn't trying tp advocate that 
LOCAL_QUORUM_PLUS_ONE_REMOTE be the only one (even though the bug came out 
sounding like that); it's just one of many examples of more complex scenarios 
that I've seen several requests for.

Making it pluggable is certainly the best long term choice.  As people develop 
ones that are generally useful and well written, we can just include them.

 C* needs a LOCAL_QUORUM_PLUS_ONE_REMOTE consistency level
 -

 Key: CASSANDRA-2338
 URL: https://issues.apache.org/jira/browse/CASSANDRA-2338
 Project: Cassandra
  Issue Type: New Feature
Reporter: Matthew F. Dennis
Priority: Minor

 for cases where people want to run C* across multiple DCs for disaster 
 recovery et cetera where normal operations only happen in the first DC (e.g. 
 no writes/reads happen in the remove DC under normal operation) neither 
 LOCAL_QUORUM or EACH_QUORUM really suffices.  
 Consider the case with RF of DC1:3 DC2:2
 LOCAL_QUORUM doesn't provide any guarantee that data is in the remote DC.
 EACH_QUORUM requires that both nodes in the remote DC are up.
 It would be useful in some situations to be able to specify a LOCAL_QUORUM 
 (for local consistency) + at least one remote for durability/disaster 
 proofing.

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


[jira] Updated: (CASSANDRA-2338) C* consistency level needs to be pluggable

2011-03-16 Thread Matthew F. Dennis (JIRA)

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

Matthew F. Dennis updated CASSANDRA-2338:
-

Description: 
for cases where people want to run C* across multiple DCs for disaster recovery 
et cetera where normal operations only happen in the first DC (e.g. no 
writes/reads happen in the remove DC under normal operation) neither 
LOCAL_QUORUM or EACH_QUORUM really suffices.  

Consider the case with RF of DC1:3 DC2:2

LOCAL_QUORUM doesn't provide any guarantee that data is in the remote DC.

EACH_QUORUM requires that both nodes in the remote DC are up.

It would be useful in some situations to be able to specify a strategy where 
LOCAL_QUORUM is used for the local DC and at least one in a remote DC (and/or 
at least in *each* remote DC).

  was:
for cases where people want to run C* across multiple DCs for disaster recovery 
et cetera where normal operations only happen in the first DC (e.g. no 
writes/reads happen in the remove DC under normal operation) neither 
LOCAL_QUORUM or EACH_QUORUM really suffices.  

Consider the case with RF of DC1:3 DC2:2

LOCAL_QUORUM doesn't provide any guarantee that data is in the remote DC.

EACH_QUORUM requires that both nodes in the remote DC are up.

It would be useful in some situations to be able to specify a LOCAL_QUORUM (for 
local consistency) + at least one remote for durability/disaster proofing.



Summary: C* consistency level needs to be pluggable  (was: C* needs a 
LOCAL_QUORUM_PLUS_ONE_REMOTE consistency level)

 C* consistency level needs to be pluggable
 --

 Key: CASSANDRA-2338
 URL: https://issues.apache.org/jira/browse/CASSANDRA-2338
 Project: Cassandra
  Issue Type: New Feature
Reporter: Matthew F. Dennis
Priority: Minor

 for cases where people want to run C* across multiple DCs for disaster 
 recovery et cetera where normal operations only happen in the first DC (e.g. 
 no writes/reads happen in the remove DC under normal operation) neither 
 LOCAL_QUORUM or EACH_QUORUM really suffices.  
 Consider the case with RF of DC1:3 DC2:2
 LOCAL_QUORUM doesn't provide any guarantee that data is in the remote DC.
 EACH_QUORUM requires that both nodes in the remote DC are up.
 It would be useful in some situations to be able to specify a strategy where 
 LOCAL_QUORUM is used for the local DC and at least one in a remote DC (and/or 
 at least in *each* remote DC).

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


svn commit: r1082254 - in /cassandra/trunk/src/java/org/apache/cassandra/cache: AutoSavingCache.java AutoSavingKeyCache.java AutoSavingRowCache.java

2011-03-16 Thread brandonwilliams
Author: brandonwilliams
Date: Wed Mar 16 18:37:19 2011
New Revision: 1082254

URL: http://svn.apache.org/viewvc?rev=1082254view=rev
Log:
Forgotten files from 2272

Added:
cassandra/trunk/src/java/org/apache/cassandra/cache/AutoSavingCache.java   
(with props)
cassandra/trunk/src/java/org/apache/cassandra/cache/AutoSavingKeyCache.java 
  (with props)
cassandra/trunk/src/java/org/apache/cassandra/cache/AutoSavingRowCache.java 
  (with props)

Added: cassandra/trunk/src/java/org/apache/cassandra/cache/AutoSavingCache.java
URL: 
http://svn.apache.org/viewvc/cassandra/trunk/src/java/org/apache/cassandra/cache/AutoSavingCache.java?rev=1082254view=auto
==
--- cassandra/trunk/src/java/org/apache/cassandra/cache/AutoSavingCache.java 
(added)
+++ cassandra/trunk/src/java/org/apache/cassandra/cache/AutoSavingCache.java 
Wed Mar 16 18:37:19 2011
@@ -0,0 +1,263 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * License); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * AS IS BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.cassandra.cache;
+
+import java.io.*;
+import java.nio.ByteBuffer;
+import java.util.Set;
+import java.util.TreeSet;
+import java.util.concurrent.Future;
+import java.util.concurrent.ScheduledFuture;
+import java.util.concurrent.TimeUnit;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import org.apache.cassandra.config.CFMetaData;
+import org.apache.cassandra.config.DatabaseDescriptor;
+import org.apache.cassandra.db.ColumnFamilyStore;
+import org.apache.cassandra.db.CompactionManager;
+import org.apache.cassandra.db.DecoratedKey;
+import org.apache.cassandra.io.ICompactionInfo;
+import org.apache.cassandra.io.util.BufferedRandomAccessFile;
+import org.apache.cassandra.io.util.FileUtils;
+import org.apache.cassandra.service.StorageService;
+import org.apache.cassandra.utils.ByteBufferUtil;
+import org.apache.cassandra.utils.FBUtilities;
+import org.apache.cassandra.utils.WrappedRunnable;
+
+public abstract class AutoSavingCacheK, V extends JMXInstrumentedCacheK, V
+{
+private static final Logger logger = 
LoggerFactory.getLogger(AutoSavingCache.class);
+
+protected final String cfName;
+protected final String tableName;
+protected volatile ScheduledFuture? saveTask;
+protected final ColumnFamilyStore.CacheType cacheType;
+
+public AutoSavingCache(String tableName, String cfName, 
ColumnFamilyStore.CacheType cacheType, int capacity)
+{
+super(tableName, cfName + cacheType, capacity);
+this.tableName = tableName;
+this.cfName = cfName;
+this.cacheType = cacheType;
+}
+
+public abstract ByteBuffer translateKey(K key);
+public abstract double getConfiguredCacheSize(CFMetaData cfm);
+
+public int getAdjustedCacheSize(long expectedKeys)
+{
+CFMetaData cfm = DatabaseDescriptor.getCFMetaData(tableName, cfName);
+return 
(int)Math.min(FBUtilities.absoluteFromFraction(getConfiguredCacheSize(cfm), 
expectedKeys), Integer.MAX_VALUE);
+}
+
+public File getCachePath()
+{
+return DatabaseDescriptor.getSerializedCachePath(tableName, cfName, 
cacheType);
+}
+
+public Writer getWriter()
+{
+return new Writer();
+}
+
+public void scheduleSaving(int savePeriodInSeconds)
+{
+if (saveTask != null)
+{
+saveTask.cancel(false); // Do not interrupt an in-progress save
+saveTask = null;
+}
+if (savePeriodInSeconds  0)
+{
+Runnable runnable = new WrappedRunnable()
+{
+public void runMayThrow()
+{
+submitWrite();
+}
+};
+saveTask = 
StorageService.scheduledTasks.scheduleWithFixedDelay(runnable,
+
savePeriodInSeconds,
+
savePeriodInSeconds,
+
TimeUnit.SECONDS);
+}
+}
+
+public Future? submitWrite()
+{
+return CompactionManager.instance.submitCacheWrite(getWriter());
+}
+
+

[jira] Updated: (CASSANDRA-1906) Sanitize configuration code

2011-03-16 Thread Jon Hermes (JIRA)

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

Jon Hermes updated CASSANDRA-1906:
--

Attachment: 1906-3.txt

Rebased with new index changes.

 Sanitize configuration code
 ---

 Key: CASSANDRA-1906
 URL: https://issues.apache.org/jira/browse/CASSANDRA-1906
 Project: Cassandra
  Issue Type: Improvement
Reporter: Jon Hermes
Assignee: Jon Hermes
Priority: Minor
 Fix For: 0.8

 Attachments: 1906-2.txt, 1906-3.txt, 1906.txt

   Original Estimate: 24h
  Remaining Estimate: 24h

 Multipart:
 - Drop deprecated YAML config. Only config allowed is via thrift/JMX. Make 
 this gratuitously easy to do with sane defaults and accepting changesets as 
 opposed to full definitions.
 - Combine common code between KS/CF/ColumnDefs and between thrift/avro defs.
 - Provide an obvious and clean interface for changing settings locally versus 
 globally (JMX vs. thrift). Dox here.

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


[jira] Assigned: (CASSANDRA-2129) removetoken after removetoken rf error fails to work

2011-03-16 Thread Brandon Williams (JIRA)

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

Brandon Williams reassigned CASSANDRA-2129:
---

Assignee: Brandon Williams  (was: Nick Bailey)

 removetoken after removetoken rf error fails to work
 

 Key: CASSANDRA-2129
 URL: https://issues.apache.org/jira/browse/CASSANDRA-2129
 Project: Cassandra
  Issue Type: Bug
Affects Versions: 0.7.0
Reporter: Mike Bulman
Assignee: Brandon Williams
Priority: Minor
 Fix For: 0.7.5

 Attachments: 2129.txt

   Original Estimate: 4h
  Remaining Estimate: 4h

 2 node cluster, a keyspace existed with rf=2.  Tried removetoken and got:
 mbulman@ripcord-maverick1:/usr/src/cassandra/tags/cassandra-0.7.0$ 
 bin/nodetool -h localhost removetoken 159559397954378837828954138596956659794
 Exception in thread main java.lang.IllegalStateException: replication 
 factor (2) exceeds number of endpoints (1)
 Deleted the keyspace, and tried again:
 mbulman@ripcord-maverick1:/usr/src/cassandra/tags/cassandra-0.7.0$ 
 bin/nodetool -h localhost removetoken 159559397954378837828954138596956659794
 Exception in thread main java.lang.UnsupportedOperationException: This node 
 is already processing a removal. Wait for it to complete.

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


[jira] Updated: (CASSANDRA-2129) removetoken after removetoken rf error fails to work

2011-03-16 Thread Brandon Williams (JIRA)

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

Brandon Williams updated CASSANDRA-2129:


Attachment: 2129.txt

Patch to allow removing the token, and throw UE instead of an internal error 
when trying to insert and the number of endpoints is less than the RF.

 removetoken after removetoken rf error fails to work
 

 Key: CASSANDRA-2129
 URL: https://issues.apache.org/jira/browse/CASSANDRA-2129
 Project: Cassandra
  Issue Type: Bug
Affects Versions: 0.7.0
Reporter: Mike Bulman
Assignee: Brandon Williams
Priority: Minor
 Fix For: 0.7.5

 Attachments: 2129.txt

   Original Estimate: 4h
  Remaining Estimate: 4h

 2 node cluster, a keyspace existed with rf=2.  Tried removetoken and got:
 mbulman@ripcord-maverick1:/usr/src/cassandra/tags/cassandra-0.7.0$ 
 bin/nodetool -h localhost removetoken 159559397954378837828954138596956659794
 Exception in thread main java.lang.IllegalStateException: replication 
 factor (2) exceeds number of endpoints (1)
 Deleted the keyspace, and tried again:
 mbulman@ripcord-maverick1:/usr/src/cassandra/tags/cassandra-0.7.0$ 
 bin/nodetool -h localhost removetoken 159559397954378837828954138596956659794
 Exception in thread main java.lang.UnsupportedOperationException: This node 
 is already processing a removal. Wait for it to complete.

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


svn commit: r1082271 [3/5] - in /cassandra/trunk/drivers/py: cql/cassandra/ cql/cassandra/Cassandra.py cql/cassandra/__init__.py cql/cassandra/constants.py cql/cassandra/ttypes.py cql/connection.py se

2011-03-16 Thread eevans
Added: cassandra/trunk/drivers/py/cql/cassandra/__init__.py
URL: 
http://svn.apache.org/viewvc/cassandra/trunk/drivers/py/cql/cassandra/__init__.py?rev=1082271view=auto
==
--- cassandra/trunk/drivers/py/cql/cassandra/__init__.py (added)
+++ cassandra/trunk/drivers/py/cql/cassandra/__init__.py Wed Mar 16 19:36:35 
2011
@@ -0,0 +1 @@
+__all__ = ['ttypes', 'constants', 'Cassandra']

Added: cassandra/trunk/drivers/py/cql/cassandra/constants.py
URL: 
http://svn.apache.org/viewvc/cassandra/trunk/drivers/py/cql/cassandra/constants.py?rev=1082271view=auto
==
--- cassandra/trunk/drivers/py/cql/cassandra/constants.py (added)
+++ cassandra/trunk/drivers/py/cql/cassandra/constants.py Wed Mar 16 19:36:35 
2011
@@ -0,0 +1,10 @@
+#
+# Autogenerated by Thrift
+#
+# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+#
+
+from thrift.Thrift import *
+from ttypes import *
+
+VERSION = 19.4.0




svn commit: r1082271 [1/5] - in /cassandra/trunk/drivers/py: cql/cassandra/ cql/cassandra/Cassandra.py cql/cassandra/__init__.py cql/cassandra/constants.py cql/cassandra/ttypes.py cql/connection.py se

2011-03-16 Thread eevans
Author: eevans
Date: Wed Mar 16 19:36:35 2011
New Revision: 1082271

URL: http://svn.apache.org/viewvc?rev=1082271view=rev
Log:
embed a copy of the generated code

Patch by eevans

Added:
cassandra/trunk/drivers/py/cql/cassandra/
cassandra/trunk/drivers/py/cql/cassandra/Cassandra.py
cassandra/trunk/drivers/py/cql/cassandra/__init__.py
cassandra/trunk/drivers/py/cql/cassandra/constants.py
cassandra/trunk/drivers/py/cql/cassandra/ttypes.py
Modified:
cassandra/trunk/drivers/py/cql/connection.py
cassandra/trunk/drivers/py/setup.py



svn commit: r1082271 [5/5] - in /cassandra/trunk/drivers/py: cql/cassandra/ cql/cassandra/Cassandra.py cql/cassandra/__init__.py cql/cassandra/constants.py cql/cassandra/ttypes.py cql/connection.py se

2011-03-16 Thread eevans
Modified: cassandra/trunk/drivers/py/cql/connection.py
URL: 
http://svn.apache.org/viewvc/cassandra/trunk/drivers/py/cql/connection.py?rev=1082271r1=1082270r2=1082271view=diff
==
--- cassandra/trunk/drivers/py/cql/connection.py (original)
+++ cassandra/trunk/drivers/py/cql/connection.py Wed Mar 16 19:36:35 2011
@@ -25,25 +25,10 @@ from decoders import SchemaDecoder
 from results import RowsProxy
 import zlib, re
 
-try:
-from cassandra import Cassandra
-from cassandra.ttypes import Compression, InvalidRequestException, \
- CqlResultType, AuthenticationRequest, \
- SchemaDisagreementException
-except ImportError:
-# Hack to run from a source tree
-import sys
-sys.path.append(join(abspath(dirname(__file__)),
- '..',
- '..',
- '..',
- 'interface',
- 'thrift',
- 'gen-py'))
-from cassandra import Cassandra
-from cassandra.ttypes import Compression, InvalidRequestException, \
- CqlResultType, AuthenticationRequest, \
- SchemaDisagreementException
+from cassandra import Cassandra
+from cassandra.ttypes import Compression, InvalidRequestException, \
+ CqlResultType, AuthenticationRequest, \
+ SchemaDisagreementException
 
 COMPRESSION_SCHEMES = ['GZIP']
 DEFAULT_COMPRESSION = 'GZIP'

Modified: cassandra/trunk/drivers/py/setup.py
URL: 
http://svn.apache.org/viewvc/cassandra/trunk/drivers/py/setup.py?rev=1082271r1=1082270r2=1082271view=diff
==
--- cassandra/trunk/drivers/py/setup.py (original)
+++ cassandra/trunk/drivers/py/setup.py Wed Mar 16 19:36:35 2011
@@ -24,7 +24,7 @@ setup(
 description=Cassandra Query Language driver,
 long_description=open(abspath(join(dirname(__file__), 'README'))).read(),
 url=http://cassandra.apache.org;,
-packages=[cql],
+packages=[cql, cql.cassandra],
 scripts=[cqlsh],
 requires=[thrift],
 provides=[cql],




svn commit: r1082273 [5/5] - in /cassandra/trunk/drivers/txpy: setup.py txcql/cassandra/ txcql/cassandra/Cassandra.py txcql/cassandra/__init__.py txcql/cassandra/constants.py txcql/cassandra/ttypes.py

2011-03-16 Thread eevans
Modified: cassandra/trunk/drivers/txpy/txcql/connection.py
URL: 
http://svn.apache.org/viewvc/cassandra/trunk/drivers/txpy/txcql/connection.py?rev=1082273r1=1082272r2=1082273view=diff
==
--- cassandra/trunk/drivers/txpy/txcql/connection.py (original)
+++ cassandra/trunk/drivers/txpy/txcql/connection.py Wed Mar 16 19:36:47 2011
@@ -20,11 +20,12 @@ from thrift.transport import TTwisted
 from thrift.protocol import TBinaryProtocol
 from thrift.Thrift import TApplicationException
 from twisted.internet import defer, reactor
+from cassandra import Cassandra
+from cassandra.ttypes import Compression, InvalidRequestException, \
+CqlResultType, AuthenticationRequest, \
+SchemaDisagreementException
+
 try:
-from cassandra import Cassandra
-from cassandra.ttypes import Compression, InvalidRequestException, \
- CqlResultType, AuthenticationRequest, \
- SchemaDisagreementException
 from cql.errors import CQLException, InvalidCompressionScheme
 from cql.marshal import prepare
 from cql.decoders import SchemaDecoder
@@ -36,18 +37,7 @@ except ImportError:
 sys.path.append(join(abspath(dirname(__file__)),
  '..',
  '..',
- '..',
- 'interface',
- 'thrift',
- 'gen-py.twisted'))
-sys.path.append(join(abspath(dirname(__file__)),
- '..',
- '..',
  'py'))
-from cassandra import Cassandra
-from cassandra.ttypes import Compression, InvalidRequestException, \
- CqlResultType, AuthenticationRequest, \
- SchemaDisagreementException
 from cql.errors import CQLException, InvalidCompressionScheme
 from cql.marshal import prepare
 from cql.decoders import SchemaDecoder




svn commit: r1082272 - in /cassandra/trunk/drivers/py: cql/marshal.py test/test_query_preparation.py

2011-03-16 Thread eevans
Author: eevans
Date: Wed Mar 16 19:36:40 2011
New Revision: 1082272

URL: http://svn.apache.org/viewvc?rev=1082272view=rev
Log:
fix unicode term marshal function (and tests)

Patch by eevans

Modified:
cassandra/trunk/drivers/py/cql/marshal.py
cassandra/trunk/drivers/py/test/test_query_preparation.py

Modified: cassandra/trunk/drivers/py/cql/marshal.py
URL: 
http://svn.apache.org/viewvc/cassandra/trunk/drivers/py/cql/marshal.py?rev=1082272r1=1082271r2=1082272view=diff
==
--- cassandra/trunk/drivers/py/cql/marshal.py (original)
+++ cassandra/trunk/drivers/py/cql/marshal.py Wed Mar 16 19:36:40 2011
@@ -49,7 +49,7 @@ def marshal(term):
 if isinstance(term, (long,int)):
 return %d % term
 elif isinstance(term, unicode):
-return u'%s' % term
+return '%s' % term.encode('utf8')
 elif isinstance(term, str):
 return '%s' % term
 elif isinstance(term, UUID):

Modified: cassandra/trunk/drivers/py/test/test_query_preparation.py
URL: 
http://svn.apache.org/viewvc/cassandra/trunk/drivers/py/test/test_query_preparation.py?rev=1082272r1=1082271r2=1082272view=diff
==
--- cassandra/trunk/drivers/py/test/test_query_preparation.py (original)
+++ cassandra/trunk/drivers/py/test/test_query_preparation.py Wed Mar 16 
19:36:40 2011
@@ -6,7 +6,7 @@ from cql.errors import InvalidQueryForma
 # TESTS[i] ARGUMENTS[i] - STANDARDS[i]
 TESTS = (
 
-SELECT ?,?,?,? FROM ColumnFamily WHERE KEY = ? AND col = ?;
+SELECT ?,?,?,? FROM ColumnFamily WHERE KEY = ? AND 'col' = ?;
 ,
 
 USE Keyspace;
@@ -20,7 +20,7 @@ ARGUMENTS = (
 
 STANDARDS = (
 
-SELECT 1,3,1000L,3000L FROM ColumnFamily WHERE KEY = key AND col = uval;
+SELECT 1,3,1000,3000 FROM ColumnFamily WHERE KEY = 'key' AND 'col' = 'val';
 ,
 
 USE Keyspace;




svn commit: r1082273 [3/5] - in /cassandra/trunk/drivers/txpy: setup.py txcql/cassandra/ txcql/cassandra/Cassandra.py txcql/cassandra/__init__.py txcql/cassandra/constants.py txcql/cassandra/ttypes.py

2011-03-16 Thread eevans
Added: cassandra/trunk/drivers/txpy/txcql/cassandra/__init__.py
URL: 
http://svn.apache.org/viewvc/cassandra/trunk/drivers/txpy/txcql/cassandra/__init__.py?rev=1082273view=auto
==
--- cassandra/trunk/drivers/txpy/txcql/cassandra/__init__.py (added)
+++ cassandra/trunk/drivers/txpy/txcql/cassandra/__init__.py Wed Mar 16 
19:36:47 2011
@@ -0,0 +1 @@
+__all__ = ['ttypes', 'constants', 'Cassandra']

Added: cassandra/trunk/drivers/txpy/txcql/cassandra/constants.py
URL: 
http://svn.apache.org/viewvc/cassandra/trunk/drivers/txpy/txcql/cassandra/constants.py?rev=1082273view=auto
==
--- cassandra/trunk/drivers/txpy/txcql/cassandra/constants.py (added)
+++ cassandra/trunk/drivers/txpy/txcql/cassandra/constants.py Wed Mar 16 
19:36:47 2011
@@ -0,0 +1,10 @@
+#
+# Autogenerated by Thrift
+#
+# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+#
+
+from thrift.Thrift import *
+from ttypes import *
+
+VERSION = 19.4.0




buildbot success in ASF Buildbot on cassandra-trunk

2011-03-16 Thread buildbot
The Buildbot has detected a restored build of cassandra-trunk on ASF Buildbot.
Full details are available at:
 http://ci.apache.org/builders/cassandra-trunk/builds/1136

Buildbot URL: http://ci.apache.org/

Buildslave for this Build: isis_ubuntu

Build Reason: 
Build Source Stamp: [branch cassandra/trunk] 1082271
Blamelist: eevans

Build succeeded!

sincerely,
 -The Buildbot



[jira] Commented: (CASSANDRA-1906) Sanitize configuration code

2011-03-16 Thread Gary Dusbabek (JIRA)

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

Gary Dusbabek commented on CASSANDRA-1906:
--

Minor things (aside from the system test failures):
* the CMFD constructors can be combined (public calls the private, passing 
nextId()).
* a few of the files have spuriously inserted unnecessary imports.  Those 
changes are the only changes for a few of them.

 Sanitize configuration code
 ---

 Key: CASSANDRA-1906
 URL: https://issues.apache.org/jira/browse/CASSANDRA-1906
 Project: Cassandra
  Issue Type: Improvement
Reporter: Jon Hermes
Assignee: Jon Hermes
Priority: Minor
 Fix For: 0.8

 Attachments: 1906-2.txt, 1906-3.txt, 1906.txt

   Original Estimate: 24h
  Remaining Estimate: 24h

 Multipart:
 - Drop deprecated YAML config. Only config allowed is via thrift/JMX. Make 
 this gratuitously easy to do with sane defaults and accepting changesets as 
 opposed to full definitions.
 - Combine common code between KS/CF/ColumnDefs and between thrift/avro defs.
 - Provide an obvious and clean interface for changing settings locally versus 
 globally (JMX vs. thrift). Dox here.

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


[jira] Updated: (CASSANDRA-2344) generate CQL python driver artifacts for release

2011-03-16 Thread Eric Evans (JIRA)

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

Eric Evans updated CASSANDRA-2344:
--

Attachment: v1-0001-CASSANDRA-2344-create-python-release-artifacts.txt

 generate CQL python driver artifacts for release
 

 Key: CASSANDRA-2344
 URL: https://issues.apache.org/jira/browse/CASSANDRA-2344
 Project: Cassandra
  Issue Type: Improvement
  Components: Packaging
Reporter: Eric Evans
Assignee: Eric Evans
Priority: Minor
  Labels: cql
 Fix For: 0.8

 Attachments: 
 v1-0001-CASSANDRA-2344-create-python-release-artifacts.txt


 Create release artifacts for the Python (and Twisted Python) CQL drivers.

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


[jira] Created: (CASSANDRA-2344) generate CQL python driver artifacts for release

2011-03-16 Thread Eric Evans (JIRA)
generate CQL python driver artifacts for release


 Key: CASSANDRA-2344
 URL: https://issues.apache.org/jira/browse/CASSANDRA-2344
 Project: Cassandra
  Issue Type: Improvement
  Components: Packaging
Reporter: Eric Evans
Assignee: Eric Evans
Priority: Minor
 Fix For: 0.8
 Attachments: v1-0001-CASSANDRA-2344-create-python-release-artifacts.txt

Create release artifacts for the Python (and Twisted Python) CQL drivers.

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


[jira] Updated: (CASSANDRA-1618) Allow specifying a slice predicate for pig queries to filter out columns

2011-03-16 Thread Brandon Williams (JIRA)

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

Brandon Williams updated CASSANDRA-1618:


Attachment: 1618.txt

Patch to first respect the input slice if already set in the job configuration, 
otherwise parse it from the URI.  Start and end parameters must be in hex to 
accommodate binary columns.

 Allow specifying a slice predicate for pig queries to filter out columns
 

 Key: CASSANDRA-1618
 URL: https://issues.apache.org/jira/browse/CASSANDRA-1618
 Project: Cassandra
  Issue Type: Improvement
  Components: Contrib, Hadoop
Reporter: Jeremy Hanna
 Attachments: 1618.txt


 Currently the Cassandra/Pig loadfunc hardcodes the slice predicate to get all 
 columns in a particular row.  It would be nice to allow the user to configure 
 the slice predicate.

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


[jira] Assigned: (CASSANDRA-1618) Allow specifying a slice predicate for pig queries to filter out columns

2011-03-16 Thread Brandon Williams (JIRA)

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

Brandon Williams reassigned CASSANDRA-1618:
---

Assignee: Brandon Williams

 Allow specifying a slice predicate for pig queries to filter out columns
 

 Key: CASSANDRA-1618
 URL: https://issues.apache.org/jira/browse/CASSANDRA-1618
 Project: Cassandra
  Issue Type: Improvement
  Components: Contrib, Hadoop
Reporter: Jeremy Hanna
Assignee: Brandon Williams
 Attachments: 1618.txt


 Currently the Cassandra/Pig loadfunc hardcodes the slice predicate to get all 
 columns in a particular row.  It would be nice to allow the user to configure 
 the slice predicate.

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


[jira] Updated: (CASSANDRA-1618) Allow specifying a slice predicate for pig queries to filter out columns

2011-03-16 Thread Brandon Williams (JIRA)

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

Brandon Williams updated CASSANDRA-1618:


 Reviewer: jeromatron
Fix Version/s: 0.7.5

 Allow specifying a slice predicate for pig queries to filter out columns
 

 Key: CASSANDRA-1618
 URL: https://issues.apache.org/jira/browse/CASSANDRA-1618
 Project: Cassandra
  Issue Type: Improvement
  Components: Contrib, Hadoop
Reporter: Jeremy Hanna
Assignee: Brandon Williams
 Fix For: 0.7.5

 Attachments: 1618.txt


 Currently the Cassandra/Pig loadfunc hardcodes the slice predicate to get all 
 columns in a particular row.  It would be nice to allow the user to configure 
 the slice predicate.

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


[jira] Created: (CASSANDRA-2345) CLI: Units on show keyspaces output

2011-03-16 Thread Jon Hermes (JIRA)
CLI: Units on show keyspaces output
---

 Key: CASSANDRA-2345
 URL: https://issues.apache.org/jira/browse/CASSANDRA-2345
 Project: Cassandra
  Issue Type: Improvement
Reporter: Jon Hermes
Assignee: Pavel Yaskevich
Priority: Minor
 Fix For: 0.7.5, 0.8


Memtable thresholds don't give units/designations:
{code}
Memtable thresholds: 0.0375/8/60
{code}

By comparison, cache info fully qualifies the numbers.
{code}
Key cache size / save period: 0.01/14400
{code}

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


[jira] Created: (CASSANDRA-2346) Windows: SSTableWriterTest Fails

2011-03-16 Thread Benjamin Coverston (JIRA)
Windows: SSTableWriterTest Fails


 Key: CASSANDRA-2346
 URL: https://issues.apache.org/jira/browse/CASSANDRA-2346
 Project: Cassandra
  Issue Type: Bug
Affects Versions: 0.7.4
 Environment: Windows
Reporter: Benjamin Coverston


Fails with the following exception[1]

Which looks like there's a stream keeping this file open somewhere.

I looked for the culprit, but I was unable to identify it. Following it through 
it appears that if the following two lines of code are executed from 
IndexWriter.afterAppend:

ByteBufferUtil.writeWithShortLength(key.key, indexFile);
indexFile.writeLong(dataPosition);

Then the indexFile gets touched and that generally triggers this situation. One 
thing interesting here is that an index file without any rows will trigger a 
divide by zero exception [2].

I looked at this quite a bit without being able to make much progress.



[1]
java.io.IOException: Failed to delete 
C:\Users\Ben\AppData\Local\Temp\Keyspace12505092819180437091Indexed1\Keyspace1\Indexed1-f-0-Index.db
at 
org.apache.cassandra.io.util.FileUtils.deleteWithConfirm(FileUtils.java:51)
at 
org.apache.cassandra.io.util.FileUtils.deleteWithConfirm(FileUtils.java:41)
at 
org.apache.cassandra.io.sstable.SSTableWriterTest.testRecoverAndOpen(SSTableWriterTest.java:79)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at 
org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
at 
org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
at 
org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
at 
org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
at 
org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
at 
org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
at 
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
at 
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:44)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:180)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:41)
at org.junit.runners.ParentRunner$1.evaluate(ParentRunner.java:173)
at 
org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
at 
org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
at org.junit.runners.ParentRunner.run(ParentRunner.java:220)
at org.junit.runner.JUnitCore.run(JUnitCore.java:159)
at 
com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:97)
at 
com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:196)
at 
com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:65)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:115)


[2]

ERROR 16:57:48,119 Error in ThreadPoolExecutor
java.lang.ArithmeticException: / by zero
at 
org.apache.cassandra.io.sstable.SSTable.estimateRowsFromData(SSTable.java:218)
at 
org.apache.cassandra.io.sstable.SSTableWriter$Builder.build(SSTableWriter.java:291)
at 
org.apache.cassandra.db.CompactionManager$9.call(CompactionManager.java:942)
at 
org.apache.cassandra.db.CompactionManager$9.call(CompactionManager.java:935)
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:619)

java.util.concurrent.ExecutionException: java.lang.ArithmeticException: / by 
zero
at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:222)
at java.util.concurrent.FutureTask.get(FutureTask.java:83)
at 
org.apache.cassandra.io.sstable.SSTableWriterTest.testRecoverAndOpen(SSTableWriterTest.java:82)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at 

[jira] Commented: (CASSANDRA-2345) CLI: Units on show keyspaces output

2011-03-16 Thread Eric Gilmore (JIRA)

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

Eric Gilmore commented on CASSANDRA-2345:
-

Strictly speaking, the cache info doesn't have units either.  The save period 
is seconds but I'm actually not sure about the size :)

Seems like a good idea to supply as much information as possible without 
crowding the output too much.

 CLI: Units on show keyspaces output
 ---

 Key: CASSANDRA-2345
 URL: https://issues.apache.org/jira/browse/CASSANDRA-2345
 Project: Cassandra
  Issue Type: Improvement
Reporter: Jon Hermes
Assignee: Pavel Yaskevich
Priority: Minor
 Fix For: 0.7.5, 0.8


 Memtable thresholds don't give units/designations:
 {code}
 Memtable thresholds: 0.0375/8/60
 {code}
 By comparison, cache info fully qualifies the numbers.
 {code}
 Key cache size / save period: 0.01/14400
 {code}

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


[jira] Updated: (CASSANDRA-1906) Sanitize configuration code

2011-03-16 Thread Jon Hermes (JIRA)

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

Jon Hermes updated CASSANDRA-1906:
--

Attachment: 1906-4.txt

Fixes all but one system test. Not done yet.

 Sanitize configuration code
 ---

 Key: CASSANDRA-1906
 URL: https://issues.apache.org/jira/browse/CASSANDRA-1906
 Project: Cassandra
  Issue Type: Improvement
Reporter: Jon Hermes
Assignee: Jon Hermes
Priority: Minor
 Fix For: 0.8

 Attachments: 1906-2.txt, 1906-3.txt, 1906-4.txt, 1906.txt

   Original Estimate: 24h
  Remaining Estimate: 24h

 Multipart:
 - Drop deprecated YAML config. Only config allowed is via thrift/JMX. Make 
 this gratuitously easy to do with sane defaults and accepting changesets as 
 opposed to full definitions.
 - Combine common code between KS/CF/ColumnDefs and between thrift/avro defs.
 - Provide an obvious and clean interface for changing settings locally versus 
 globally (JMX vs. thrift). Dox here.

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


[jira] Updated: (CASSANDRA-1906) Sanitize configuration code

2011-03-16 Thread Jon Hermes (JIRA)

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

Jon Hermes updated CASSANDRA-1906:
--

Attachment: 1906-5.txt

All tests passing.

 Sanitize configuration code
 ---

 Key: CASSANDRA-1906
 URL: https://issues.apache.org/jira/browse/CASSANDRA-1906
 Project: Cassandra
  Issue Type: Improvement
Reporter: Jon Hermes
Assignee: Jon Hermes
Priority: Minor
 Fix For: 0.8

 Attachments: 1906-2.txt, 1906-3.txt, 1906-4.txt, 1906-5.txt, 1906.txt

   Original Estimate: 24h
  Remaining Estimate: 24h

 Multipart:
 - Drop deprecated YAML config. Only config allowed is via thrift/JMX. Make 
 this gratuitously easy to do with sane defaults and accepting changesets as 
 opposed to full definitions.
 - Combine common code between KS/CF/ColumnDefs and between thrift/avro defs.
 - Provide an obvious and clean interface for changing settings locally versus 
 globally (JMX vs. thrift). Dox here.

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


[jira] Updated: (CASSANDRA-1618) Allow specifying a slice predicate for pig queries to filter out columns

2011-03-16 Thread Brandon Williams (JIRA)

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

Brandon Williams updated CASSANDRA-1618:


Attachment: (was: 1618.txt)

 Allow specifying a slice predicate for pig queries to filter out columns
 

 Key: CASSANDRA-1618
 URL: https://issues.apache.org/jira/browse/CASSANDRA-1618
 Project: Cassandra
  Issue Type: Improvement
  Components: Contrib, Hadoop
Reporter: Jeremy Hanna
Assignee: Brandon Williams
 Fix For: 0.7.5

 Attachments: 1618.txt


 Currently the Cassandra/Pig loadfunc hardcodes the slice predicate to get all 
 columns in a particular row.  It would be nice to allow the user to configure 
 the slice predicate.

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


[jira] Updated: (CASSANDRA-1618) Allow specifying a slice predicate for pig queries to filter out columns

2011-03-16 Thread Brandon Williams (JIRA)

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

Brandon Williams updated CASSANDRA-1618:


Attachment: 1618.txt

 Allow specifying a slice predicate for pig queries to filter out columns
 

 Key: CASSANDRA-1618
 URL: https://issues.apache.org/jira/browse/CASSANDRA-1618
 Project: Cassandra
  Issue Type: Improvement
  Components: Contrib, Hadoop
Reporter: Jeremy Hanna
Assignee: Brandon Williams
 Fix For: 0.7.5

 Attachments: 1618.txt


 Currently the Cassandra/Pig loadfunc hardcodes the slice predicate to get all 
 columns in a particular row.  It would be nice to allow the user to configure 
 the slice predicate.

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


[jira] Commented: (CASSANDRA-2129) removetoken after removetoken rf error fails to work

2011-03-16 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis commented on CASSANDRA-2129:
---

SP.mutate should be throwing UAE already (assureSufficientLiveNodes).  Why 
isn't that working?

 removetoken after removetoken rf error fails to work
 

 Key: CASSANDRA-2129
 URL: https://issues.apache.org/jira/browse/CASSANDRA-2129
 Project: Cassandra
  Issue Type: Bug
Affects Versions: 0.7.0
Reporter: Mike Bulman
Assignee: Brandon Williams
Priority: Minor
 Fix For: 0.7.5

 Attachments: 2129.txt

   Original Estimate: 4h
  Remaining Estimate: 4h

 2 node cluster, a keyspace existed with rf=2.  Tried removetoken and got:
 mbulman@ripcord-maverick1:/usr/src/cassandra/tags/cassandra-0.7.0$ 
 bin/nodetool -h localhost removetoken 159559397954378837828954138596956659794
 Exception in thread main java.lang.IllegalStateException: replication 
 factor (2) exceeds number of endpoints (1)
 Deleted the keyspace, and tried again:
 mbulman@ripcord-maverick1:/usr/src/cassandra/tags/cassandra-0.7.0$ 
 bin/nodetool -h localhost removetoken 159559397954378837828954138596956659794
 Exception in thread main java.lang.UnsupportedOperationException: This node 
 is already processing a removal. Wait for it to complete.

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


[jira] Commented: (CASSANDRA-1618) Allow specifying a slice predicate for pig queries to filter out columns

2011-03-16 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis commented on CASSANDRA-1618:
---

can't we use start and end in human-readable string format and use 
comparator.fromString?

 Allow specifying a slice predicate for pig queries to filter out columns
 

 Key: CASSANDRA-1618
 URL: https://issues.apache.org/jira/browse/CASSANDRA-1618
 Project: Cassandra
  Issue Type: Improvement
  Components: Contrib, Hadoop
Reporter: Jeremy Hanna
Assignee: Brandon Williams
 Fix For: 0.7.5

 Attachments: 1618.txt


 Currently the Cassandra/Pig loadfunc hardcodes the slice predicate to get all 
 columns in a particular row.  It would be nice to allow the user to configure 
 the slice predicate.

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


[jira] Commented: (CASSANDRA-2343) Allow configured ports to be overridden with system properties

2011-03-16 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis commented on CASSANDRA-2343:
---

+1

 Allow configured ports to be overridden with system properties
 --

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

 Attachments: 2343.txt


 For automated testing, it would be nice to be able to override the 
 storage/rpc ports in config, rather than rewrite the yaml.

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


svn commit: r1082376 - /cassandra/branches/cassandra-0.7/test/unit/org/apache/cassandra/cli/CliTest.java

2011-03-16 Thread jbellis
Author: jbellis
Date: Thu Mar 17 02:38:33 2011
New Revision: 1082376

URL: http://svn.apache.org/viewvc?rev=1082376view=rev
Log:
fix CliTest on Windows
patch by Ben Coverston; reviewed by jbellis for CASSANDRA-2337

Modified:

cassandra/branches/cassandra-0.7/test/unit/org/apache/cassandra/cli/CliTest.java

Modified: 
cassandra/branches/cassandra-0.7/test/unit/org/apache/cassandra/cli/CliTest.java
URL: 
http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.7/test/unit/org/apache/cassandra/cli/CliTest.java?rev=1082376r1=1082375r2=1082376view=diff
==
--- 
cassandra/branches/cassandra-0.7/test/unit/org/apache/cassandra/cli/CliTest.java
 (original)
+++ 
cassandra/branches/cassandra-0.7/test/unit/org/apache/cassandra/cli/CliTest.java
 Thu Mar 17 02:38:33 2011
@@ -181,13 +181,13 @@ public class CliTest extends CleanupHelp
 }
 else if (statement.startsWith(set ))
 {
-assertEquals(result, Value inserted.\n);
+assertEquals(result, Value inserted. + 
System.getProperty(line.separator));
 }
 else if (statement.startsWith(get ))
 {
 if (statement.contains(where))
 {
-
assertTrue(result.startsWith(---\nRowKey:));
+assertTrue(result.startsWith(--- + 
System.getProperty(line.separator) + RowKey:));
 }
 else
 {




svn commit: r1082387 - in /cassandra/branches/cassandra-0.7: src/java/org/apache/cassandra/thrift/ThriftValidation.java test/system/__init__.py test/system/test_thrift_server.py

2011-03-16 Thread jbellis
Author: jbellis
Date: Thu Mar 17 02:55:26 2011
New Revision: 1082387

URL: http://svn.apache.org/viewvc?rev=1082387view=rev
Log:
validate index predicates
patch by Aaron Morton; reviewed by jbellis for CASSANDRA-2328

Modified:

cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/thrift/ThriftValidation.java
cassandra/branches/cassandra-0.7/test/system/__init__.py
cassandra/branches/cassandra-0.7/test/system/test_thrift_server.py

Modified: 
cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/thrift/ThriftValidation.java
URL: 
http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/thrift/ThriftValidation.java?rev=1082387r1=1082386r2=1082387view=diff
==
--- 
cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/thrift/ThriftValidation.java
 (original)
+++ 
cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/thrift/ThriftValidation.java
 Thu Mar 17 02:55:26 2011
@@ -394,12 +394,41 @@ public class ThriftValidation
 if (index_clause.expressions.isEmpty())
 throw new InvalidRequestException(index clause list may not be 
empty);
 SetByteBuffer indexedColumns = 
Table.open(keyspace).getColumnFamilyStore(columnFamily).getIndexedColumns();
+AbstractType nameValidator =  ColumnFamily.getComparatorFor(keyspace, 
columnFamily, null);
+
+boolean isIndexed = false;
 for (IndexExpression expression : index_clause.expressions)
 {
-if (expression.op.equals(IndexOperator.EQ)  
indexedColumns.contains(expression.column_name))
-return;
+try
+{
+nameValidator.validate(expression.column_name);
+}
+catch (MarshalException me)
+{
+throw new InvalidRequestException(String.format([%s]=[%s] 
failed name validation (%s),
+
ByteBufferUtil.bytesToHex(expression.column_name),
+
ByteBufferUtil.bytesToHex(expression.value),
+
me.getMessage()));
+}
+
+AbstractType valueValidator = 
DatabaseDescriptor.getValueValidator(keyspace, columnFamily, 
expression.column_name);
+try
+{
+valueValidator.validate(expression.value);
+}
+catch (MarshalException me)
+{
+throw new InvalidRequestException(String.format([%s]=[%s] 
failed value validation (%s),
+
ByteBufferUtil.bytesToHex(expression.column_name),
+
ByteBufferUtil.bytesToHex(expression.value),
+
me.getMessage()));
+}
+
+isIndexed |= expression.op.equals(IndexOperator.EQ)  
indexedColumns.contains(expression.column_name);
 }
-throw new InvalidRequestException(No indexed columns present in index 
clause with operator EQ);
+
+if (!isIndexed)
+throw new InvalidRequestException(No indexed columns present in 
index clause with operator EQ);
 }
 
 public static void validateCfDef(CfDef cf_def) throws 
InvalidRequestException

Modified: cassandra/branches/cassandra-0.7/test/system/__init__.py
URL: 
http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.7/test/system/__init__.py?rev=1082387r1=1082386r2=1082387view=diff
==
--- cassandra/branches/cassandra-0.7/test/system/__init__.py (original)
+++ cassandra/branches/cassandra-0.7/test/system/__init__.py Thu Mar 17 
02:55:26 2011
@@ -14,7 +14,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-import os, sys, time, signal, httplib, errno
+import os, sys, time, signal, httplib, errno, uuid
 
 __all__ = ['root', 'thrift_client']
 
@@ -171,6 +171,8 @@ class ThriftTester(BaseTester):
 Cassandra.CfDef('Keyspace1', 'Super3', column_type='Super', 
subcomparator_type='LongType'), 
 Cassandra.CfDef('Keyspace1', 'Super4', column_type='Super', 
subcomparator_type='UTF8Type'),
 Cassandra.CfDef('Keyspace1', 'Indexed1', 
column_metadata=[Cassandra.ColumnDef('birthdate', 'LongType', 
Cassandra.IndexType.KEYS, 'birthdate')]),
+Cassandra.CfDef('Keyspace1', 'Indexed2', 
comparator_type='TimeUUIDType', 
column_metadata=[Cassandra.ColumnDef(uuid.UUID('--1000--').bytes,
 'LongType', Cassandra.IndexType.KEYS, 'birthdate')]),
+
 ])
 
 keyspace2 = Cassandra.KsDef('Keyspace2', 
'org.apache.cassandra.locator.SimpleStrategy', None, 1,

Modified: 

svn commit: r1082388 - /cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/config/DatabaseDescriptor.java

2011-03-16 Thread brandonwilliams
Author: brandonwilliams
Date: Thu Mar 17 02:58:45 2011
New Revision: 1082388

URL: http://svn.apache.org/viewvc?rev=1082388view=rev
Log:
Allow configured ports and initial token to be overridden by system
properties.
Patch by brandonwilliams, reviewed by jbellis for CASSANDRA-2343

Modified:

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

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=1082388r1=1082387r2=1082388view=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
 Thu Mar 17 02:58:45 2011
@@ -758,7 +758,7 @@ public classDatabaseDescriptor
 
 public static String getInitialToken()
 {
-return conf.initial_token;
+return System.getProperty(cassandra.initial_token, 
conf.initial_token);
 }
 
public static String getClusterName()
@@ -825,12 +825,12 @@ public classDatabaseDescriptor
 
 public static int getStoragePort()
 {
-return conf.storage_port;
+return Integer.parseInt(System.getProperty(cassandra.storage_port, 
conf.storage_port.toString()));
 }
 
 public static int getRpcPort()
 {
-return conf.rpc_port;
+return Integer.parseInt(System.getProperty(cassandra.rpc_port, 
conf.rpc_port.toString()));
 }
 
 public static long getRpcTimeout()




[jira] Created: (CASSANDRA-2347) index scan uses incorrect comparator on non-indexed expressions

2011-03-16 Thread Jonathan Ellis (JIRA)
index scan uses incorrect comparator on non-indexed expressions
---

 Key: CASSANDRA-2347
 URL: https://issues.apache.org/jira/browse/CASSANDRA-2347
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Affects Versions: 0.7.0
Reporter: Jonathan Ellis
Assignee: Jonathan Ellis
 Fix For: 0.7.5


When multiple index expressions are specified, the column name comparator is 
used when evaluating secondary (non-indexed) expressions after an indexed 
expression match.

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


[jira] Updated: (CASSANDRA-2347) index scan uses incorrect comparator on non-indexed expressions

2011-03-16 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis updated CASSANDRA-2347:
--

Attachment: 2347.txt

patch w/ failing test + fix

 index scan uses incorrect comparator on non-indexed expressions
 ---

 Key: CASSANDRA-2347
 URL: https://issues.apache.org/jira/browse/CASSANDRA-2347
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Affects Versions: 0.7.0
Reporter: Jonathan Ellis
Assignee: Jonathan Ellis
 Fix For: 0.7.5

 Attachments: 2347.txt


 When multiple index expressions are specified, the column name comparator is 
 used when evaluating secondary (non-indexed) expressions after an indexed 
 expression match.

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


[jira] Updated: (CASSANDRA-2324) Repair transfers more data than necessary

2011-03-16 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis updated CASSANDRA-2324:
--

 Priority: Major  (was: Minor)
Affects Version/s: (was: 0.7.3)
   0.7.0
Fix Version/s: 0.7.5
  Summary: Repair transfers more data than necessary  (was: Repair 
never fully repairs, indexes out of order)

 Repair transfers more data than necessary
 -

 Key: CASSANDRA-2324
 URL: https://issues.apache.org/jira/browse/CASSANDRA-2324
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Affects Versions: 0.7.0
Reporter: Brandon Williams
 Fix For: 0.7.5


 To repro: 3 node cluster, stress.java 1M rows with -x KEYS and -l 2.  The 
 index is enough to make some mutations drop (about 20-30k total in my tests). 
  Repair afterwards will repair a large amount of ranges the first time.  
 However, each subsequent run will repair the same set of small ranges every 
 time.  INDEXED_RANGE_SLICE in stress never fully works.  Counting rows with 
 sstablekeys shows there are 2M rows total as expected, however when trying to 
 count the indexed keys, I get exceptions like:
 {noformat}
 Exception in thread main java.io.IOException: Key out of order! 
 DecoratedKey(101571366040797913119296586470838356016, 
 0707ab782c5b5029d28a5e6d508ef72f0222528b5e28da3b7787492679dc51b96f868e0746073e54bc173be927049d0f51e25a6a95b3268213b8969abf40cea7d7)
   DecoratedKey(12639574763031545147067490818595764132, 
 0bc414be3093348a2ad389ed28f18f0cc9a044b2e98587848a0d289dae13ed0ad479c74654900eeffc6236)
 at 
 org.apache.cassandra.tools.SSTableExport.enumeratekeys(SSTableExport.java:206)
 at 
 org.apache.cassandra.tools.SSTableExport.main(SSTableExport.java:388)
 {noformat}

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


[jira] Updated: (CASSANDRA-2280) Request specific column families using StreamIn

2011-03-16 Thread Stu Hood (JIRA)

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

Stu Hood updated CASSANDRA-2280:


Attachment: 0002-Only-flush-matching-CFS.txt

Adding 0002 to only flush matching CFS.

 Request specific column families using StreamIn
 ---

 Key: CASSANDRA-2280
 URL: https://issues.apache.org/jira/browse/CASSANDRA-2280
 Project: Cassandra
  Issue Type: Improvement
  Components: Core
Reporter: Stu Hood
 Fix For: 0.8

 Attachments: 
 0001-Allow-specific-column-families-to-be-requested-for-str.txt, 
 0002-Only-flush-matching-CFS.txt


 StreamIn.requestRanges only specifies a keyspace, meaning that requesting a 
 range will request it for all column families: if you have a large number of 
 CFs, this can cause quite a headache.

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