[jira] [Updated] (CASSANDRA-1337) parallelize fetching rows for low-cardinality indexes

2012-06-09 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis updated CASSANDRA-1337:
--

Reviewer: vijay2...@yahoo.com

> parallelize fetching rows for low-cardinality indexes
> -
>
> Key: CASSANDRA-1337
> URL: https://issues.apache.org/jira/browse/CASSANDRA-1337
> Project: Cassandra
>  Issue Type: Improvement
>Reporter: Jonathan Ellis
>Assignee: David Alves
>Priority: Minor
> Fix For: 1.2
>
> Attachments: 
> 0001-CASSANDRA-1337-scan-concurrently-depending-on-num-rows.txt, 
> CASSANDRA-1337.patch
>
>   Original Estimate: 8h
>  Remaining Estimate: 8h
>
> currently, we read the indexed rows from the first node (in partitioner 
> order); if that does not have enough matching rows, we read the rows from the 
> next, and so forth.
> we should use the statistics fom CASSANDRA-1155 to query multiple nodes in 
> parallel, such that we have a high chance of getting enough rows w/o having 
> to do another round of queries (but, if our estimate is incorrect, we do need 
> to loop and do more rounds until we have enough data or we have fetched from 
> each node).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (CASSANDRA-1337) parallelize fetching rows for low-cardinality indexes

2012-06-09 Thread David Alves (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-1337?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13292395#comment-13292395
 ] 

David Alves commented on CASSANDRA-1337:


couple of questions:

- If i got the logic right the point is that we keep creating async handlers 
until we exceed concurrency factor, at which time we block and wait for the 
replies, clear the handlers and start again. Can't we reach a state where we 
have handlers to which we haven't called get() (because they have not exceeded 
concurrecy factor?).
- On another matter what would be the best strategy to test this both for 
correctness and speed?



> parallelize fetching rows for low-cardinality indexes
> -
>
> Key: CASSANDRA-1337
> URL: https://issues.apache.org/jira/browse/CASSANDRA-1337
> Project: Cassandra
>  Issue Type: Improvement
>Reporter: Jonathan Ellis
>Assignee: David Alves
>Priority: Minor
> Fix For: 1.2
>
> Attachments: 
> 0001-CASSANDRA-1337-scan-concurrently-depending-on-num-rows.txt, 
> CASSANDRA-1337.patch
>
>   Original Estimate: 8h
>  Remaining Estimate: 8h
>
> currently, we read the indexed rows from the first node (in partitioner 
> order); if that does not have enough matching rows, we read the rows from the 
> next, and so forth.
> we should use the statistics fom CASSANDRA-1155 to query multiple nodes in 
> parallel, such that we have a high chance of getting enough rows w/o having 
> to do another round of queries (but, if our estimate is incorrect, we do need 
> to loop and do more rounds until we have enough data or we have fetched from 
> each node).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (CASSANDRA-4320) Assertion error while delivering the hints.

2012-06-09 Thread Vijay (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-4320?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13292391#comment-13292391
 ] 

Vijay commented on CASSANDRA-4320:
--

Sorry i should have been clear, because of 

CFS.removeDeletedSuper
{code}
if (subColumn.getLocalDeletionTime() < gcBefore
|| cf.deletionInfo().isDeleted(c.name(), 
subColumn.timestamp())
|| c.deletionInfo().isDeleted(subColumn))
{
subIter.remove();
}
{code}

Hence we will remove everything and never replay any column if we set the 
max_value. Makes sense?

> Assertion error while delivering the hints.
> ---
>
> Key: CASSANDRA-4320
> URL: https://issues.apache.org/jira/browse/CASSANDRA-4320
> Project: Cassandra
>  Issue Type: Bug
>  Components: Core
>Affects Versions: 1.1.0, 1.2
>Reporter: Vijay
>Assignee: Vijay
>Priority: Minor
> Fix For: 1.1.2, 1.2
>
> Attachments: 0001-CASSANDRA-4320-v2.patch, 0001-CASSANDRA-4320.patch
>
>
> java.lang.AssertionError
> at 
> org.apache.cassandra.db.HintedHandOffManager.deliverHintsToEndpointInternal(HintedHandOffManager.java:351)
> at 
> org.apache.cassandra.db.HintedHandOffManager.deliverHintsToEndpoint(HintedHandOffManager.java:269)
> at 
> org.apache.cassandra.db.HintedHandOffManager.access$400(HintedHandOffManager.java:88)
> at 
> org.apache.cassandra.db.HintedHandOffManager$4.runMayThrow(HintedHandOffManager.java:442)
> at 
> org.apache.cassandra.utils.WrappedRunnable.run(WrappedRunnable.java:26)
> at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
> at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
> at java.lang.Thread.run(Thread.java:636)
> Did some digging and looks like we just need to skip the deleted columns.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Updated] (CASSANDRA-1337) parallelize fetching rows for low-cardinality indexes

2012-06-09 Thread David Alves (JIRA)

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

David Alves updated CASSANDRA-1337:
---

Attachment: CASSANDRA-1337.patch

direct rework of Jake Luciani's original patch applied to trunk. untested. just 
to get the discussion going

> parallelize fetching rows for low-cardinality indexes
> -
>
> Key: CASSANDRA-1337
> URL: https://issues.apache.org/jira/browse/CASSANDRA-1337
> Project: Cassandra
>  Issue Type: Improvement
>Reporter: Jonathan Ellis
>Assignee: David Alves
>Priority: Minor
> Fix For: 1.2
>
> Attachments: 
> 0001-CASSANDRA-1337-scan-concurrently-depending-on-num-rows.txt, 
> CASSANDRA-1337.patch
>
>   Original Estimate: 8h
>  Remaining Estimate: 8h
>
> currently, we read the indexed rows from the first node (in partitioner 
> order); if that does not have enough matching rows, we read the rows from the 
> next, and so forth.
> we should use the statistics fom CASSANDRA-1155 to query multiple nodes in 
> parallel, such that we have a high chance of getting enough rows w/o having 
> to do another round of queries (but, if our estimate is incorrect, we do need 
> to loop and do more rounds until we have enough data or we have fetched from 
> each node).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (CASSANDRA-4189) Improve hints replay

2012-06-09 Thread Vijay (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-4189?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13292375#comment-13292375
 ] 

Vijay commented on CASSANDRA-4189:
--

{quote}
I don't see a ton of benefit from multiple threads trying to run 
deliverHintsToEndpointInternal to the same target
{quote}
Hi Jonathan, Thats exactly what the attached patch does, it has one thread per 
host. Do you see a bug?

{code}
if (queuedDeliveries.contains(to) || !queuedDeliveries.add(to))
{code}
Also ensures there isn't 2 threads running parallel.

> Improve hints replay
> 
>
> Key: CASSANDRA-4189
> URL: https://issues.apache.org/jira/browse/CASSANDRA-4189
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Core
>Affects Versions: 1.2
>Reporter: Vijay
>Assignee: Vijay
>Priority: Minor
> Fix For: 1.2
>
> Attachments: 0001-CASSANDRA-4189.patch
>
>
> Problem: Hints are stored in one row.
> when there are a lot of hints stored and we store Tombstones for the ones 
> which has been replayed.
> It might be worth shading the hints based on Hour at which the hints are 
> stored. This can reduce the complexity of the scanning for hints.
> Problem: Hints replay is too slow and single threaded.
> There are use-case where the hints needs to be replayed ASAP to make the 
> cluster more consistent.
> In Multi region cluster, the throttle is already done due to the latency 
> which is in the order of 100's of millisecond.
> It might be worth trying to replay the hints in parallel and throttle on the 
> number of bytes read from the disk or use the existing setting of throttle 
> based on sleep interval on all the threads.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (CASSANDRA-4189) Improve hints replay

2012-06-09 Thread Jonathan Ellis (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-4189?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13292370#comment-13292370
 ] 

Jonathan Ellis commented on CASSANDRA-4189:
---

I don't see a ton of benefit from multiple threads trying to run 
deliverHintsToEndpointInternal to the same target, and a lot of 
contention/duplicate handoff attempts (hence, CASSANDRA-4320).

Restricting the handoff workers to different targets would be a straightforward 
improvement (sounds like this would still address your use case above).

> Improve hints replay
> 
>
> Key: CASSANDRA-4189
> URL: https://issues.apache.org/jira/browse/CASSANDRA-4189
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Core
>Affects Versions: 1.2
>Reporter: Vijay
>Assignee: Vijay
>Priority: Minor
> Fix For: 1.2
>
> Attachments: 0001-CASSANDRA-4189.patch
>
>
> Problem: Hints are stored in one row.
> when there are a lot of hints stored and we store Tombstones for the ones 
> which has been replayed.
> It might be worth shading the hints based on Hour at which the hints are 
> stored. This can reduce the complexity of the scanning for hints.
> Problem: Hints replay is too slow and single threaded.
> There are use-case where the hints needs to be replayed ASAP to make the 
> cluster more consistent.
> In Multi region cluster, the throttle is already done due to the latency 
> which is in the order of 100's of millisecond.
> It might be worth trying to replay the hints in parallel and throttle on the 
> number of bytes read from the disk or use the existing setting of throttle 
> based on sleep interval on all the threads.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[3/3] git commit: fix NPE in compactionstats patch by jbellis; reviewed by xedin for CASSANDRA-4318

2012-06-09 Thread jbellis
fix NPE in compactionstats
patch by jbellis; reviewed by xedin for CASSANDRA-4318


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

Branch: refs/heads/cassandra-1.1
Commit: 6352edb3fe0a3a678e83ba11002e4cdde2cac468
Parents: 8fd3f49
Author: Jonathan Ellis 
Authored: Sat Jun 9 10:31:57 2012 -0500
Committer: Jonathan Ellis 
Committed: Sat Jun 9 10:31:57 2012 -0500

--
 CHANGES.txt|1 +
 .../apache/cassandra/cache/AutoSavingCache.java|6 -
 .../db/compaction/AbstractCompactionIterable.java  |2 +-
 .../db/compaction/CompactionController.java|2 +-
 .../cassandra/db/compaction/CompactionInfo.java|   17 +-
 .../cassandra/db/compaction/CompactionManager.java |4 +-
 .../cassandra/db/index/SecondaryIndexBuilder.java  |2 +-
 7 files changed, 17 insertions(+), 17 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/6352edb3/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 71ab07d..ed9650c 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 1.1.2
+ * fix NPE in compactionstats (CASSANDRA-4318)
  * enforce 1m min keycache for auto (CASSANDRA-4306)
  * Have DeletedColumn.isMFD always return true (CASSANDRA-4307)
  * ex msg for cql3 order by constraints says primary filter can be an IN 
clause 

http://git-wip-us.apache.org/repos/asf/cassandra/blob/6352edb3/src/java/org/apache/cassandra/cache/AutoSavingCache.java
--
diff --git a/src/java/org/apache/cassandra/cache/AutoSavingCache.java 
b/src/java/org/apache/cassandra/cache/AutoSavingCache.java
index 659e9ec..7eed2a0 100644
--- a/src/java/org/apache/cassandra/cache/AutoSavingCache.java
+++ b/src/java/org/apache/cassandra/cache/AutoSavingCache.java
@@ -30,6 +30,7 @@ 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.compaction.CompactionInfo;
 import org.apache.cassandra.db.compaction.CompactionManager;
@@ -192,7 +193,10 @@ public class AutoSavingCache 
extends InstrumentingCachehttp://git-wip-us.apache.org/repos/asf/cassandra/blob/6352edb3/src/java/org/apache/cassandra/db/compaction/AbstractCompactionIterable.java
--
diff --git 
a/src/java/org/apache/cassandra/db/compaction/AbstractCompactionIterable.java 
b/src/java/org/apache/cassandra/db/compaction/AbstractCompactionIterable.java
index 1eb4e9b..db3e1b3 100644
--- 
a/src/java/org/apache/cassandra/db/compaction/AbstractCompactionIterable.java
+++ 
b/src/java/org/apache/cassandra/db/compaction/AbstractCompactionIterable.java
@@ -53,7 +53,7 @@ public abstract class AbstractCompactionIterable extends 
CompactionInfo.Holder i
 
 public CompactionInfo getCompactionInfo()
 {
-return new CompactionInfo(this.hashCode(),
+return new CompactionInfo(controller.cfs.metadata,
   type,
   bytesRead,
   totalBytes);

http://git-wip-us.apache.org/repos/asf/cassandra/blob/6352edb3/src/java/org/apache/cassandra/db/compaction/CompactionController.java
--
diff --git 
a/src/java/org/apache/cassandra/db/compaction/CompactionController.java 
b/src/java/org/apache/cassandra/db/compaction/CompactionController.java
index 9eaefe7..8ff871e 100644
--- a/src/java/org/apache/cassandra/db/compaction/CompactionController.java
+++ b/src/java/org/apache/cassandra/db/compaction/CompactionController.java
@@ -42,7 +42,7 @@ public class CompactionController
 {
 private static Logger logger = 
LoggerFactory.getLogger(CompactionController.class);
 
-private final ColumnFamilyStore cfs;
+public final ColumnFamilyStore cfs;
 private final boolean deserializeRequired;
 private final IntervalTree overlappingTree;
 

http://git-wip-us.apache.org/repos/asf/cassandra/blob/6352edb3/src/java/org/apache/cassandra/db/compaction/CompactionInfo.java
--
diff --git a/src/java/org/apache/cassandra/db/compaction/CompactionInfo.java 
b/src/java/org/apache/cassandra/db/compaction/CompactionInfo.java
index 17d098b..fdb363e 100644
--- a/src/java/org/apache/cassandra/db/compaction/CompactionInfo.java
+++ b/src/java/org/apache/cassandra/db/compaction

[1/3] git commit: merge from 1.1

2012-06-09 Thread jbellis
Updated Branches:
  refs/heads/cassandra-1.1 8fd3f49e8 -> 6352edb3f
  refs/heads/trunk 63b6c029f -> 678f6ae38


merge from 1.1


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

Branch: refs/heads/trunk
Commit: 678f6ae38f2b7f4e484cf82ae24cf0cb6afe6686
Parents: 63b6c02 6352edb
Author: Jonathan Ellis 
Authored: Sat Jun 9 10:37:59 2012 -0500
Committer: Jonathan Ellis 
Committed: Sat Jun 9 10:37:59 2012 -0500

--
 CHANGES.txt|1 +
 .../apache/cassandra/cache/AutoSavingCache.java|7 -
 .../db/compaction/AbstractCompactionIterable.java  |5 ++-
 .../db/compaction/CompactionController.java|2 +-
 .../cassandra/db/compaction/CompactionInfo.java|   23 ++-
 .../cassandra/db/compaction/CompactionManager.java |6 ++-
 .../cassandra/db/index/SecondaryIndexBuilder.java  |3 +-
 7 files changed, 27 insertions(+), 20 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/678f6ae3/CHANGES.txt
--
diff --cc CHANGES.txt
index 4dc289b,ed9650c..bea8356
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,24 -1,5 +1,25 @@@
 +1.2-dev
 + * add inter-node message compression (CASSANDRA-3127)
 + * enforce 1m min keycache for auto (CASSANDRA-4306)
 + * remove COPP (CASSANDRA-2479)
 + * Track tombstone expiration and compact when tombstone content is
 +   higher than a configurable threshold, default 20% (CASSANDRA-3442)
 + * update MurmurHash to version 3 (CASSANDRA-2975)
 + * (CLI) track elapsed time for `delete' operation (CASSANDRA-4060)
 + * (CLI) jline version is bumped to 1.0 to properly  support
 +   'delete' key function (CASSANDRA-4132)
 + * Save IndexSummary into new SSTable 'Summary' component (CASSANDRA-2392)
 + * Add support for range tombstones (CASSANDRA-3708)
 + * Improve MessagingService efficiency (CASSANDRA-3617)
 + * Avoid ID conflicts from concurrent schema changes (CASSANDRA-3794)
 + * Set thrift HSHA server thread limit to unlimet by default (CASSANDRA-4277)
 + * Avoids double serialization of CF id in RowMutation messages
 +   (CASSANDRA-4293)
 + * fix Summary component and caches to use correct partitioner 
(CASSANDRA-4289)
 +
 +
  1.1.2
+  * fix NPE in compactionstats (CASSANDRA-4318)
   * enforce 1m min keycache for auto (CASSANDRA-4306)
   * Have DeletedColumn.isMFD always return true (CASSANDRA-4307)
   * ex msg for cql3 order by constraints says primary filter can be an IN 
clause 

http://git-wip-us.apache.org/repos/asf/cassandra/blob/678f6ae3/src/java/org/apache/cassandra/cache/AutoSavingCache.java
--
diff --cc src/java/org/apache/cassandra/cache/AutoSavingCache.java
index e6ee7c6,7eed2a0..41b8f5d
--- a/src/java/org/apache/cassandra/cache/AutoSavingCache.java
+++ b/src/java/org/apache/cassandra/cache/AutoSavingCache.java
@@@ -195,7 -193,10 +196,11 @@@ public class AutoSavingCachehttp://git-wip-us.apache.org/repos/asf/cassandra/blob/678f6ae3/src/java/org/apache/cassandra/db/compaction/AbstractCompactionIterable.java
--

http://git-wip-us.apache.org/repos/asf/cassandra/blob/678f6ae3/src/java/org/apache/cassandra/db/compaction/CompactionController.java
--
diff --cc src/java/org/apache/cassandra/db/compaction/CompactionController.java
index 9680c95,8ff871e..c91684f
--- a/src/java/org/apache/cassandra/db/compaction/CompactionController.java
+++ b/src/java/org/apache/cassandra/db/compaction/CompactionController.java
@@@ -39,12 -40,14 +39,12 @@@ import org.apache.cassandra.utils.Throt
   */
  public class CompactionController
  {
 -private static Logger logger = 
LoggerFactory.getLogger(CompactionController.class);
 +private static final Logger logger = 
LoggerFactory.getLogger(CompactionController.class);
  
- private final ColumnFamilyStore cfs;
+ public final ColumnFamilyStore cfs;
 -private final boolean deserializeRequired;
 -private final IntervalTree overlappingTree;
 +private final DataTracker.SSTableIntervalTree overlappingTree;
  
  public final int gcBefore;
 -public boolean keyExistenceIsExpensive;
  public final int mergeShardBefore;
  private final Throttle throttle = new Throttle("Cassandra_Throttle", new 
Throttle.ThroughputFunction()
  {

http://git-wip-us.apache.org/repos/asf/cassandra/blob/678f6ae3/src/java/org/apache/cassandra/db/compaction/CompactionInfo.java
--

[2/3] git commit: fix NPE in compactionstats patch by jbellis; reviewed by xedin for CASSANDRA-4318

2012-06-09 Thread jbellis
fix NPE in compactionstats
patch by jbellis; reviewed by xedin for CASSANDRA-4318


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

Branch: refs/heads/trunk
Commit: 6352edb3fe0a3a678e83ba11002e4cdde2cac468
Parents: 8fd3f49
Author: Jonathan Ellis 
Authored: Sat Jun 9 10:31:57 2012 -0500
Committer: Jonathan Ellis 
Committed: Sat Jun 9 10:31:57 2012 -0500

--
 CHANGES.txt|1 +
 .../apache/cassandra/cache/AutoSavingCache.java|6 -
 .../db/compaction/AbstractCompactionIterable.java  |2 +-
 .../db/compaction/CompactionController.java|2 +-
 .../cassandra/db/compaction/CompactionInfo.java|   17 +-
 .../cassandra/db/compaction/CompactionManager.java |4 +-
 .../cassandra/db/index/SecondaryIndexBuilder.java  |2 +-
 7 files changed, 17 insertions(+), 17 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/6352edb3/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 71ab07d..ed9650c 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 1.1.2
+ * fix NPE in compactionstats (CASSANDRA-4318)
  * enforce 1m min keycache for auto (CASSANDRA-4306)
  * Have DeletedColumn.isMFD always return true (CASSANDRA-4307)
  * ex msg for cql3 order by constraints says primary filter can be an IN 
clause 

http://git-wip-us.apache.org/repos/asf/cassandra/blob/6352edb3/src/java/org/apache/cassandra/cache/AutoSavingCache.java
--
diff --git a/src/java/org/apache/cassandra/cache/AutoSavingCache.java 
b/src/java/org/apache/cassandra/cache/AutoSavingCache.java
index 659e9ec..7eed2a0 100644
--- a/src/java/org/apache/cassandra/cache/AutoSavingCache.java
+++ b/src/java/org/apache/cassandra/cache/AutoSavingCache.java
@@ -30,6 +30,7 @@ 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.compaction.CompactionInfo;
 import org.apache.cassandra.db.compaction.CompactionManager;
@@ -192,7 +193,10 @@ public class AutoSavingCache 
extends InstrumentingCachehttp://git-wip-us.apache.org/repos/asf/cassandra/blob/6352edb3/src/java/org/apache/cassandra/db/compaction/AbstractCompactionIterable.java
--
diff --git 
a/src/java/org/apache/cassandra/db/compaction/AbstractCompactionIterable.java 
b/src/java/org/apache/cassandra/db/compaction/AbstractCompactionIterable.java
index 1eb4e9b..db3e1b3 100644
--- 
a/src/java/org/apache/cassandra/db/compaction/AbstractCompactionIterable.java
+++ 
b/src/java/org/apache/cassandra/db/compaction/AbstractCompactionIterable.java
@@ -53,7 +53,7 @@ public abstract class AbstractCompactionIterable extends 
CompactionInfo.Holder i
 
 public CompactionInfo getCompactionInfo()
 {
-return new CompactionInfo(this.hashCode(),
+return new CompactionInfo(controller.cfs.metadata,
   type,
   bytesRead,
   totalBytes);

http://git-wip-us.apache.org/repos/asf/cassandra/blob/6352edb3/src/java/org/apache/cassandra/db/compaction/CompactionController.java
--
diff --git 
a/src/java/org/apache/cassandra/db/compaction/CompactionController.java 
b/src/java/org/apache/cassandra/db/compaction/CompactionController.java
index 9eaefe7..8ff871e 100644
--- a/src/java/org/apache/cassandra/db/compaction/CompactionController.java
+++ b/src/java/org/apache/cassandra/db/compaction/CompactionController.java
@@ -42,7 +42,7 @@ public class CompactionController
 {
 private static Logger logger = 
LoggerFactory.getLogger(CompactionController.class);
 
-private final ColumnFamilyStore cfs;
+public final ColumnFamilyStore cfs;
 private final boolean deserializeRequired;
 private final IntervalTree overlappingTree;
 

http://git-wip-us.apache.org/repos/asf/cassandra/blob/6352edb3/src/java/org/apache/cassandra/db/compaction/CompactionInfo.java
--
diff --git a/src/java/org/apache/cassandra/db/compaction/CompactionInfo.java 
b/src/java/org/apache/cassandra/db/compaction/CompactionInfo.java
index 17d098b..fdb363e 100644
--- a/src/java/org/apache/cassandra/db/compaction/CompactionInfo.java
+++ b/src/java/org/apache/cassandra/db/compaction/Compact

[jira] [Commented] (CASSANDRA-4314) Index CF tombstones can cause OOM

2012-06-09 Thread Jonathan Ellis (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-4314?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13292365#comment-13292365
 ] 

Jonathan Ellis commented on CASSANDRA-4314:
---

It's not exposed through nodetool, but you can invoke forceMajorCompaction on 
the index cfs mbean directly (o.a.c.db.IndexColumnFamilies), or you can drop 
and recreate the index.

> Index CF tombstones can cause OOM
> -
>
> Key: CASSANDRA-4314
> URL: https://issues.apache.org/jira/browse/CASSANDRA-4314
> Project: Cassandra
>  Issue Type: Bug
>  Components: Core
>Affects Versions: 0.7.0
> Environment: AS5 64, 64 GB ram, 12 core, Intel SSD 
>Reporter: Wade Poziombka
>Assignee: Jonathan Ellis
>Priority: Critical
> Fix For: 1.0.11, 1.1.2
>
> Attachments: 2012-06-07-compact.zip, 2012-06-07.zip, 4314-1.0.txt, 
> 4314-1.1.txt, oom.zip, yourkitsnapshot.png
>
>
> My database (now at 1.0.10) is in a state in which it goes out of memory with 
> hardly any activity at all.  A key slice nothing more.
> The logs attached are this including verbose gc in stdout.  I started up 
> cassandra and waited a bit to ensure that it was unperturbed.
> Then (about 15:46) I ran this slice (using Pelops), which in this case should 
> return NO data.  My client times out and the database goes OOM.
>   ConsistencyLevel cl = ConsistencyLevel.TWO;//TWO nodes in 
> my cluster
>   Selector s = new Selector(this.pool);
>   List indexExpressions = new 
> ArrayList();
>   IndexExpression e = new IndexExpression(
>   
> ByteBuffer.wrap("encryptionSettingsID".getBytes(ASCII)), IndexOperator.EQ,
>   
> ByteBuffer.wrap(encryptionSettingsID.getBytes(Utils.ASCII)));
>   indexExpressions.add(e);
>   IndexClause indexClause = new IndexClause(indexExpressions,
>   ByteBuffer.wrap(EMPTY_BYTE_ARRAY), 1);
>   SlicePredicate predicate = new SlicePredicate();
>   predicate.setColumn_names(Arrays.asList(new ByteBuffer[]
> { ByteBuffer.wrap(COL_PAN_ENC_BYTES) }));
>   List slices = s.getKeySlices(CF_TOKEN, 
> indexClause, predicate, cl);
> Note that “encryptionSettingsID” is an indexed column.  When this is executed 
> there should be no columns with the supplied value.
> I suppose I may have some kind of blatant error in this query but it is not 
> obvious to me.  I’m relatively new to cassandra.
> My key space is defined as follows:
> KsDef(name:TB_UNIT, 
> strategy_class:org.apache.cassandra.locator.SimpleStrategy, 
> strategy_options:{replication_factor=3}, 
> cf_defs:[
> CfDef(keyspace:TB_UNIT, name:token, column_type:Standard, 
> comparator_type:BytesType, column_metadata:[ColumnDef(name:70 61 6E 45 6E 63, 
> validation_class:BytesType), ColumnDef(name:63 72 65 61 74 65 54 73, 
> validation_class:DateType), ColumnDef(name:63 72 65 61 74 65 44 61 74 65, 
> validation_class:DateType, index_type:KEYS, index_name:TokenCreateDate), 
> ColumnDef(name:65 6E 63 72 79 70 74 69 6F 6E 53 65 74 74 69 6E 67 73 49 44, 
> validation_class:UTF8Type, index_type:KEYS, 
> index_name:EncryptionSettingsID)], caching:keys_only), 
> CfDef(keyspace:TB_UNIT, name:pan_d721fd40fd9443aa81cc6f59c8e047c6, 
> column_type:Standard, comparator_type:BytesType, caching:keys_only), 
> CfDef(keyspace:TB_UNIT, name:counters, column_type:Standard, 
> comparator_type:BytesType, column_metadata:[ColumnDef(name:75 73 65 43 6F 75 
> 6E 74, validation_class:CounterColumnType)], 
> default_validation_class:CounterColumnType, caching:keys_only)
> ])
> tpstats show pending tasks many minutes after time out:
> [root@r610-lb6 bin]# ../cassandra/bin/nodetool -h 127.0.0.1 tpstats
> Pool NameActive   Pending  Completed   Blocked  All 
> time blocked
> ReadStage 3 3107 0
>  0
> RequestResponseStage  0 0 56 0
>  0
> MutationStage 0 0  6 0
>  0
> ReadRepairStage   0 0  0 0
>  0
> ReplicateOnWriteStage 0 0  0 0
>  0
> GossipStage   0 0   2231 0
>  0
> AntiEntropyStage  0 0  0 0
>  0
> MigrationStage0 0  0 0
>  0
> MemtablePostFlusher   0 0  3 0
>  0
> StreamStage   

[jira] [Commented] (CASSANDRA-4320) Assertion error while delivering the hints.

2012-06-09 Thread Jonathan Ellis (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-4320?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13292363#comment-13292363
 ] 

Jonathan Ellis commented on CASSANDRA-4320:
---

I don't follow, using max_value means that if an ExpiringColumn has expired we 
will ignore it, if it has not then we don't want to.

> Assertion error while delivering the hints.
> ---
>
> Key: CASSANDRA-4320
> URL: https://issues.apache.org/jira/browse/CASSANDRA-4320
> Project: Cassandra
>  Issue Type: Bug
>  Components: Core
>Affects Versions: 1.1.0, 1.2
>Reporter: Vijay
>Assignee: Vijay
>Priority: Minor
> Fix For: 1.1.2, 1.2
>
> Attachments: 0001-CASSANDRA-4320-v2.patch, 0001-CASSANDRA-4320.patch
>
>
> java.lang.AssertionError
> at 
> org.apache.cassandra.db.HintedHandOffManager.deliverHintsToEndpointInternal(HintedHandOffManager.java:351)
> at 
> org.apache.cassandra.db.HintedHandOffManager.deliverHintsToEndpoint(HintedHandOffManager.java:269)
> at 
> org.apache.cassandra.db.HintedHandOffManager.access$400(HintedHandOffManager.java:88)
> at 
> org.apache.cassandra.db.HintedHandOffManager$4.runMayThrow(HintedHandOffManager.java:442)
> at 
> org.apache.cassandra.utils.WrappedRunnable.run(WrappedRunnable.java:26)
> at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
> at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
> at java.lang.Thread.run(Thread.java:636)
> Did some digging and looks like we just need to skip the deleted columns.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (CASSANDRA-4326) IndexOutOfBoundsException on TimeUUIDType.compareTimestampBytes

2012-06-09 Thread Jonathan Ellis (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-4326?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13292361#comment-13292361
 ] 

Jonathan Ellis commented on CASSANDRA-4326:
---

Do you get the same error using UUIDType instead of TimeUUIDType?

Can you reproduce w/ a simple single node test case?

> IndexOutOfBoundsException on TimeUUIDType.compareTimestampBytes
> ---
>
> Key: CASSANDRA-4326
> URL: https://issues.apache.org/jira/browse/CASSANDRA-4326
> Project: Cassandra
>  Issue Type: Bug
>  Components: Core
>Affects Versions: 1.1.1
> Environment: Cassandra 1.1.1 running on CentOS 6.0 64bit. 5 nodes, 
> mixed hardware.
>Reporter: Kristoffer Carlson
>
> I get the following exception when performing a query on two indexed columns 
> (both UTF8Type) with TimeUUIDType as the column families key validation class:
> {noformat}
> java.lang.RuntimeException: java.lang.IndexOutOfBoundsException
> at 
> org.apache.cassandra.service.StorageProxy$DroppableRunnable.run(StorageProxy.java:1254)
> at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
> at java.lang.Thread.run(Unknown Source)
> Caused by: java.lang.IndexOutOfBoundsException
> at java.nio.Buffer.checkIndex(Unknown Source)
> at java.nio.HeapByteBuffer.get(Unknown Source)
> at 
> org.apache.cassandra.db.marshal.TimeUUIDType.compareTimestampBytes(TimeUUIDType.java:76)
> at 
> org.apache.cassandra.db.marshal.TimeUUIDType.compare(TimeUUIDType.java:65)
> at 
> org.apache.cassandra.db.marshal.TimeUUIDType.compare(TimeUUIDType.java:37)
> at org.apache.cassandra.dht.LocalToken.compareTo(LocalToken.java:45)
> at 
> org.apache.cassandra.db.DecoratedKey.compareTo(DecoratedKey.java:89)
> at 
> org.apache.cassandra.db.DecoratedKey.compareTo(DecoratedKey.java:38)
> at java.util.concurrent.ConcurrentSkipListMap.findPredecessor(Unknown 
> Source)
> at java.util.concurrent.ConcurrentSkipListMap.findNode(Unknown Source)
> at java.util.concurrent.ConcurrentSkipListMap.doGet(Unknown Source)
> at java.util.concurrent.ConcurrentSkipListMap.get(Unknown Source)
> at org.apache.cassandra.db.Memtable.resolve(Memtable.java:235)
> at org.apache.cassandra.db.Memtable.put(Memtable.java:156)
> at 
> org.apache.cassandra.db.ColumnFamilyStore.apply(ColumnFamilyStore.java:742)
> at 
> org.apache.cassandra.db.index.keys.KeysIndex.deleteColumn(KeysIndex.java:82)
> at 
> org.apache.cassandra.db.index.SecondaryIndexManager.applyIndexUpdates(SecondaryIndexManager.java:460)
> at org.apache.cassandra.db.Table.apply(Table.java:441)
> at org.apache.cassandra.db.Table.apply(Table.java:366)
> at org.apache.cassandra.db.RowMutation.apply(RowMutation.java:294)
> at 
> org.apache.cassandra.service.StorageProxy$6.runMayThrow(StorageProxy.java:453)
> at 
> org.apache.cassandra.service.StorageProxy$DroppableRunnable.run(StorageProxy.java:1250)
> ... 3 more
> ERROR [Selector-Thread-0] 2012-06-09 13:43:21,878 TNonblockingServer.java 
> (line 468) Read an invalid frame size of 0. Are you using TFramedTransport on 
> the client side?
> {noformat}
> Also, the keys were generated with the following function (which had worked 
> previously):
> {code:borderStyle=solid}
> public static UUID convertLegacyIdToUuid(long millis, long userId)
> {
> long time = millis * 1 + 0x01b21dd213814000L;
> long timeLow = time & 0xL;
> long timeMid = time & 0xL;
> long timeHi = time & 0xfffL;
> long upperLong = ( timeLow << 32 ) | ( timeMid >> 16 ) | ( 1 << 12 ) | ( 
> timeHi >> 48 );
> return new UUID(upperLong, userId);
> }
> {code} 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Updated] (CASSANDRA-4322) Error in CLI when updating keyspace

2012-06-09 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis updated CASSANDRA-4322:
--

Reviewer: richardlow  (was: thepaul)

> Error in CLI when updating keyspace
> ---
>
> Key: CASSANDRA-4322
> URL: https://issues.apache.org/jira/browse/CASSANDRA-4322
> Project: Cassandra
>  Issue Type: Bug
>Affects Versions: 1.1.1
>Reporter: Richard Low
>Assignee: Dave Brosius
>Priority: Minor
> Attachments: auth_for_mod_ks.txt
>
>
> To repro:
> 1. Open the cli
> 2. Create a keyspace:
>   create keyspace ks1 with placement_strategy = SimpleStrategy and 
> strategy_options = {replication_factor:1};
> 3. Update the keyspace:
>   update keyspace ks1 with strategy_options = {replication_factor:3};
> The output is:
> [default@unknown] create keyspace ks1 with placement_strategy = 
> SimpleStrategy and strategy_options = {replication_factor:1}; 
>   
> 8ecd5e16-e0f7-37e7-850e-38ee1a3a510e
> Waiting for schema agreement...
> ... schemas agree across the cluster
> [default@unknown] update keyspace ks1 with strategy_options = 
> {replication_factor:3};
> 857af387-6677-3e39-bdf6-e1132673c25b
> Waiting for schema agreement...
> ... schemas agree across the cluster
> org.apache.thrift.protocol.TProtocolException: Required field 'keyspace' was 
> not present! Struct: describe_keyspace_args(keyspace:null)
> [default@unknown]
> The problem is that the patch in CASSANDRA-4052 assumes the CLI is 
> authenticated to a working keyspace.  getKSMetaData in executeUpdateKeySpace 
> is called with keySpace, which is null.
> Changing this to keyspaceName partially solves it, we now get:
> [default@unknown] update keyspace ks1 with strategy_options = 
> {replication_factor:3};
> Not authenticated to a working keyspace.
> 18d750fc-19d9-30f0-b8b9-18b2e4a0a0d4
> Waiting for schema agreement...
> ... schemas agree across the cluster
> Not authenticated to a working keyspace.
> This comes from replayAssumptions in getKSMetaData.
> It seems that the refresh code needs to be reworked slightly to not assume 
> the CLI is authenticated to a keyspace.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Updated] (CASSANDRA-4322) Error in CLI when updating keyspace

2012-06-09 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis updated CASSANDRA-4322:
--

Reviewer: thepaul

> Error in CLI when updating keyspace
> ---
>
> Key: CASSANDRA-4322
> URL: https://issues.apache.org/jira/browse/CASSANDRA-4322
> Project: Cassandra
>  Issue Type: Bug
>Affects Versions: 1.1.1
>Reporter: Richard Low
>Assignee: Dave Brosius
>Priority: Minor
> Attachments: auth_for_mod_ks.txt
>
>
> To repro:
> 1. Open the cli
> 2. Create a keyspace:
>   create keyspace ks1 with placement_strategy = SimpleStrategy and 
> strategy_options = {replication_factor:1};
> 3. Update the keyspace:
>   update keyspace ks1 with strategy_options = {replication_factor:3};
> The output is:
> [default@unknown] create keyspace ks1 with placement_strategy = 
> SimpleStrategy and strategy_options = {replication_factor:1}; 
>   
> 8ecd5e16-e0f7-37e7-850e-38ee1a3a510e
> Waiting for schema agreement...
> ... schemas agree across the cluster
> [default@unknown] update keyspace ks1 with strategy_options = 
> {replication_factor:3};
> 857af387-6677-3e39-bdf6-e1132673c25b
> Waiting for schema agreement...
> ... schemas agree across the cluster
> org.apache.thrift.protocol.TProtocolException: Required field 'keyspace' was 
> not present! Struct: describe_keyspace_args(keyspace:null)
> [default@unknown]
> The problem is that the patch in CASSANDRA-4052 assumes the CLI is 
> authenticated to a working keyspace.  getKSMetaData in executeUpdateKeySpace 
> is called with keySpace, which is null.
> Changing this to keyspaceName partially solves it, we now get:
> [default@unknown] update keyspace ks1 with strategy_options = 
> {replication_factor:3};
> Not authenticated to a working keyspace.
> 18d750fc-19d9-30f0-b8b9-18b2e4a0a0d4
> Waiting for schema agreement...
> ... schemas agree across the cluster
> Not authenticated to a working keyspace.
> This comes from replayAssumptions in getKSMetaData.
> It seems that the refresh code needs to be reworked slightly to not assume 
> the CLI is authenticated to a keyspace.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Updated] (CASSANDRA-4012) Load-from-flat-file data import tool

2012-06-09 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis updated CASSANDRA-4012:
--

Reviewer: brandon.williams

> Load-from-flat-file data import tool
> 
>
> Key: CASSANDRA-4012
> URL: https://issues.apache.org/jira/browse/CASSANDRA-4012
> Project: Cassandra
>  Issue Type: New Feature
>  Components: Tools
>Reporter: Jonathan Ellis
>Assignee: paul cannon
>  Labels: cqlsh
> Fix For: 1.1.2
>
> Attachments: 4012.patch.txt
>
>
> Would like to be able to import data from a comma-delimited or tab-delimited 
> file, one "row" per line.  (That is, "row" can be "logical row" as in 
> http://www.datastax.com/dev/blog/schema-in-cassandra-1-1.)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Assigned] (CASSANDRA-3607) Iterating through HashMap via key set instead of entry set

2012-06-09 Thread JIRA

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

Tommy Tynjä reassigned CASSANDRA-3607:
--

Assignee: Tommy Tynjä

> Iterating through HashMap via key set instead of entry set
> --
>
> Key: CASSANDRA-3607
> URL: https://issues.apache.org/jira/browse/CASSANDRA-3607
> Project: Cassandra
>  Issue Type: Improvement
>Affects Versions: 1.1.0
> Environment: all
>Reporter: Zoltan Farkas
>Assignee: Tommy Tynjä
>Priority: Trivial
>   Original Estimate: 10m
>  Remaining Estimate: 10m
>
> At StorageService.java:[line 2635]
> At StorageService.java:[line 2687]
> At SSTableImport.java:[line 286]
> At CliClient.java:[line 2138]

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Updated] (CASSANDRA-4326) IndexOutOfBoundsException on TimeUUIDType.compareTimestampBytes

2012-06-09 Thread Kristoffer Carlson (JIRA)

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

Kristoffer Carlson updated CASSANDRA-4326:
--

Description: 
I get the following exception when performing a query on two indexed columns 
(both UTF8Type) with TimeUUIDType as the column families key validation class:

{noformat}
java.lang.RuntimeException: java.lang.IndexOutOfBoundsException
at 
org.apache.cassandra.service.StorageProxy$DroppableRunnable.run(StorageProxy.java:1254)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.IndexOutOfBoundsException
at java.nio.Buffer.checkIndex(Unknown Source)
at java.nio.HeapByteBuffer.get(Unknown Source)
at 
org.apache.cassandra.db.marshal.TimeUUIDType.compareTimestampBytes(TimeUUIDType.java:76)
at 
org.apache.cassandra.db.marshal.TimeUUIDType.compare(TimeUUIDType.java:65)
at 
org.apache.cassandra.db.marshal.TimeUUIDType.compare(TimeUUIDType.java:37)
at org.apache.cassandra.dht.LocalToken.compareTo(LocalToken.java:45)
at org.apache.cassandra.db.DecoratedKey.compareTo(DecoratedKey.java:89)
at org.apache.cassandra.db.DecoratedKey.compareTo(DecoratedKey.java:38)
at java.util.concurrent.ConcurrentSkipListMap.findPredecessor(Unknown 
Source)
at java.util.concurrent.ConcurrentSkipListMap.findNode(Unknown Source)
at java.util.concurrent.ConcurrentSkipListMap.doGet(Unknown Source)
at java.util.concurrent.ConcurrentSkipListMap.get(Unknown Source)
at org.apache.cassandra.db.Memtable.resolve(Memtable.java:235)
at org.apache.cassandra.db.Memtable.put(Memtable.java:156)
at 
org.apache.cassandra.db.ColumnFamilyStore.apply(ColumnFamilyStore.java:742)
at 
org.apache.cassandra.db.index.keys.KeysIndex.deleteColumn(KeysIndex.java:82)
at 
org.apache.cassandra.db.index.SecondaryIndexManager.applyIndexUpdates(SecondaryIndexManager.java:460)
at org.apache.cassandra.db.Table.apply(Table.java:441)
at org.apache.cassandra.db.Table.apply(Table.java:366)
at org.apache.cassandra.db.RowMutation.apply(RowMutation.java:294)
at 
org.apache.cassandra.service.StorageProxy$6.runMayThrow(StorageProxy.java:453)
at 
org.apache.cassandra.service.StorageProxy$DroppableRunnable.run(StorageProxy.java:1250)
... 3 more
ERROR [Selector-Thread-0] 2012-06-09 13:43:21,878 TNonblockingServer.java (line 
468) Read an invalid frame size of 0. Are you using TFramedTransport on the 
client side?
{noformat}

Also, the keys were generated with the following function (which had worked 
previously):

{code:borderStyle=solid}
public static UUID convertLegacyIdToUuid(long millis, long userId)
{
long time = millis * 1 + 0x01b21dd213814000L;
long timeLow = time & 0xL;
long timeMid = time & 0xL;
long timeHi = time & 0xfffL;
long upperLong = ( timeLow << 32 ) | ( timeMid >> 16 ) | ( 1 << 12 ) | ( 
timeHi >> 48 );
return new UUID(upperLong, userId);
}
{code} 

  was:
I get the following exception when performing a query on two indexed columns 
(both UTF8Type) with TimeUUIDType as the column families key validation class:

{noformat}
java.lang.RuntimeException: java.lang.IndexOutOfBoundsException
at 
org.apache.cassandra.service.StorageProxy$DroppableRunnable.run(StorageProxy.java:1254)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.IndexOutOfBoundsException
at java.nio.Buffer.checkIndex(Unknown Source)
at java.nio.HeapByteBuffer.get(Unknown Source)
at 
org.apache.cassandra.db.marshal.TimeUUIDType.compareTimestampBytes(TimeUUIDType.java:76)
at 
org.apache.cassandra.db.marshal.TimeUUIDType.compare(TimeUUIDType.java:65)
at 
org.apache.cassandra.db.marshal.TimeUUIDType.compare(TimeUUIDType.java:37)
at org.apache.cassandra.dht.LocalToken.compareTo(LocalToken.java:45)
at org.apache.cassandra.db.DecoratedKey.compareTo(DecoratedKey.java:89)
at org.apache.cassandra.db.DecoratedKey.compareTo(DecoratedKey.java:38)
at java.util.concurrent.ConcurrentSkipListMap.findPredecessor(Unknown 
Source)
at java.util.concurrent.ConcurrentSkipListMap.findNode(Unknown Source)
at java.util.concurrent.ConcurrentSkipListMap.doGet(Unknown Source)
at java.util.concurrent.ConcurrentSkipListMap.get(Unknown Source)
at org.apache.cassandra.db.Memtable.resolve(Memtable.java:235)
at org.apache.cassandra.db.Memtable.put(Memtable.java:156)
at 
org.apache.cassandra.db.ColumnF

[jira] [Updated] (CASSANDRA-4326) IndexOutOfBoundsException on TimeUUIDType.compareTimestampBytes

2012-06-09 Thread Kristoffer Carlson (JIRA)

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

Kristoffer Carlson updated CASSANDRA-4326:
--

Description: 
I get the following exception when performing a query on two indexed columns 
(both UTF8Type) with TimeUUIDType as the column families key validation class:

{noformat}
java.lang.RuntimeException: java.lang.IndexOutOfBoundsException
at 
org.apache.cassandra.service.StorageProxy$DroppableRunnable.run(StorageProxy.java:1254)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.IndexOutOfBoundsException
at java.nio.Buffer.checkIndex(Unknown Source)
at java.nio.HeapByteBuffer.get(Unknown Source)
at 
org.apache.cassandra.db.marshal.TimeUUIDType.compareTimestampBytes(TimeUUIDType.java:76)
at 
org.apache.cassandra.db.marshal.TimeUUIDType.compare(TimeUUIDType.java:65)
at 
org.apache.cassandra.db.marshal.TimeUUIDType.compare(TimeUUIDType.java:37)
at org.apache.cassandra.dht.LocalToken.compareTo(LocalToken.java:45)
at org.apache.cassandra.db.DecoratedKey.compareTo(DecoratedKey.java:89)
at org.apache.cassandra.db.DecoratedKey.compareTo(DecoratedKey.java:38)
at java.util.concurrent.ConcurrentSkipListMap.findPredecessor(Unknown 
Source)
at java.util.concurrent.ConcurrentSkipListMap.findNode(Unknown Source)
at java.util.concurrent.ConcurrentSkipListMap.doGet(Unknown Source)
at java.util.concurrent.ConcurrentSkipListMap.get(Unknown Source)
at org.apache.cassandra.db.Memtable.resolve(Memtable.java:235)
at org.apache.cassandra.db.Memtable.put(Memtable.java:156)
at 
org.apache.cassandra.db.ColumnFamilyStore.apply(ColumnFamilyStore.java:742)
at 
org.apache.cassandra.db.index.keys.KeysIndex.deleteColumn(KeysIndex.java:82)
at 
org.apache.cassandra.db.index.SecondaryIndexManager.applyIndexUpdates(SecondaryIndexManager.java:460)
at org.apache.cassandra.db.Table.apply(Table.java:441)
at org.apache.cassandra.db.Table.apply(Table.java:366)
at org.apache.cassandra.db.RowMutation.apply(RowMutation.java:294)
at 
org.apache.cassandra.service.StorageProxy$6.runMayThrow(StorageProxy.java:453)
at 
org.apache.cassandra.service.StorageProxy$DroppableRunnable.run(StorageProxy.java:1250)
... 3 more
ERROR [Selector-Thread-0] 2012-06-09 13:43:21,878 TNonblockingServer.java (line 
468) Read an invalid frame size of 0. Are you using TFramedTransport on the 
client side?
{noformat}

Also, the keys were generated with the following function (which had worked 
previously):

{code:borderStyle=solid}
public static UUID convertLegacyIdToUuid(long millis, long userId)
{
long time = millis * 1 + 0x01b21dd213814000L;
long timeLow = time & 0xL;
long timeMid = time & 0xL;
long timeHi = time & 0xfffL;
long upperLong = ( timeLow << 32 ) | ( timeMid >> 16 ) | ( 1 << 12 ) | 
( timeHi >> 48 );
return new UUID(upperLong, userId);
}
{code} 

  was:
I get the following exception when performing a query on two indexed columns 
(both UTF8Type) with TimeUUIDType as the column families key validation class:

{noformat}
java.lang.RuntimeException: java.lang.IndexOutOfBoundsException
at 
org.apache.cassandra.service.StorageProxy$DroppableRunnable.run(StorageProxy.java:1254)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.IndexOutOfBoundsException
at java.nio.Buffer.checkIndex(Unknown Source)
at java.nio.HeapByteBuffer.get(Unknown Source)
at 
org.apache.cassandra.db.marshal.TimeUUIDType.compareTimestampBytes(TimeUUIDType.java:76)
at 
org.apache.cassandra.db.marshal.TimeUUIDType.compare(TimeUUIDType.java:65)
at 
org.apache.cassandra.db.marshal.TimeUUIDType.compare(TimeUUIDType.java:37)
at org.apache.cassandra.dht.LocalToken.compareTo(LocalToken.java:45)
at org.apache.cassandra.db.DecoratedKey.compareTo(DecoratedKey.java:89)
at org.apache.cassandra.db.DecoratedKey.compareTo(DecoratedKey.java:38)
at java.util.concurrent.ConcurrentSkipListMap.findPredecessor(Unknown 
Source)
at java.util.concurrent.ConcurrentSkipListMap.findNode(Unknown Source)
at java.util.concurrent.ConcurrentSkipListMap.doGet(Unknown Source)
at java.util.concurrent.ConcurrentSkipListMap.get(Unknown Source)
at org.apache.cassandra.db.Memtable.resolve(Memtable.java:235)
at org.apache.cassandra.db.Memtable.put(Memtable.java:156)
   

[jira] [Updated] (CASSANDRA-4326) IndexOutOfBoundsException on TimeUUIDType.compareTimestampBytes

2012-06-09 Thread Kristoffer Carlson (JIRA)

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

Kristoffer Carlson updated CASSANDRA-4326:
--

Description: 
I get the following exception when performing a query on two indexed columns 
(both UTF8Type) with TimeUUIDType as the column families key validation class:

{noformat}
java.lang.RuntimeException: java.lang.IndexOutOfBoundsException
at 
org.apache.cassandra.service.StorageProxy$DroppableRunnable.run(StorageProxy.java:1254)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.IndexOutOfBoundsException
at java.nio.Buffer.checkIndex(Unknown Source)
at java.nio.HeapByteBuffer.get(Unknown Source)
at 
org.apache.cassandra.db.marshal.TimeUUIDType.compareTimestampBytes(TimeUUIDType.java:76)
at 
org.apache.cassandra.db.marshal.TimeUUIDType.compare(TimeUUIDType.java:65)
at 
org.apache.cassandra.db.marshal.TimeUUIDType.compare(TimeUUIDType.java:37)
at org.apache.cassandra.dht.LocalToken.compareTo(LocalToken.java:45)
at org.apache.cassandra.db.DecoratedKey.compareTo(DecoratedKey.java:89)
at org.apache.cassandra.db.DecoratedKey.compareTo(DecoratedKey.java:38)
at java.util.concurrent.ConcurrentSkipListMap.findPredecessor(Unknown 
Source)
at java.util.concurrent.ConcurrentSkipListMap.findNode(Unknown Source)
at java.util.concurrent.ConcurrentSkipListMap.doGet(Unknown Source)
at java.util.concurrent.ConcurrentSkipListMap.get(Unknown Source)
at org.apache.cassandra.db.Memtable.resolve(Memtable.java:235)
at org.apache.cassandra.db.Memtable.put(Memtable.java:156)
at 
org.apache.cassandra.db.ColumnFamilyStore.apply(ColumnFamilyStore.java:742)
at 
org.apache.cassandra.db.index.keys.KeysIndex.deleteColumn(KeysIndex.java:82)
at 
org.apache.cassandra.db.index.SecondaryIndexManager.applyIndexUpdates(SecondaryIndexManager.java:460)
at org.apache.cassandra.db.Table.apply(Table.java:441)
at org.apache.cassandra.db.Table.apply(Table.java:366)
at org.apache.cassandra.db.RowMutation.apply(RowMutation.java:294)
at 
org.apache.cassandra.service.StorageProxy$6.runMayThrow(StorageProxy.java:453)
at 
org.apache.cassandra.service.StorageProxy$DroppableRunnable.run(StorageProxy.java:1250)
... 3 more
ERROR [Selector-Thread-0] 2012-06-09 13:43:21,878 TNonblockingServer.java (line 
468) Read an invalid frame size of 0. Are you using TFramedTransport on the 
client side?
{noformat}

Also, the keys were generated with the following function (which had worked 
previously):

{code|borderStyle=solid}
public static UUID convertLegacyIdToUuid(long millis, long userId)
{
long time = millis * 1 + 0x01b21dd213814000L;
long timeLow = time & 0xL;
long timeMid = time & 0xL;
long timeHi = time & 0xfffL;
long upperLong = ( timeLow << 32 ) | ( timeMid >> 16 ) | ( 1 << 12 ) | 
( timeHi >> 48 );
return new UUID(upperLong, userId);
}
{code} 

  was:
I get the following exception when performing a query on two indexed columns 
(both UTF8Type) with TimeUUIDType as the column families key validation class:

{noformat}
java.lang.RuntimeException: java.lang.IndexOutOfBoundsException
at 
org.apache.cassandra.service.StorageProxy$DroppableRunnable.run(StorageProxy.java:1254)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.IndexOutOfBoundsException
at java.nio.Buffer.checkIndex(Unknown Source)
at java.nio.HeapByteBuffer.get(Unknown Source)
at 
org.apache.cassandra.db.marshal.TimeUUIDType.compareTimestampBytes(TimeUUIDType.java:76)
at 
org.apache.cassandra.db.marshal.TimeUUIDType.compare(TimeUUIDType.java:65)
at 
org.apache.cassandra.db.marshal.TimeUUIDType.compare(TimeUUIDType.java:37)
at org.apache.cassandra.dht.LocalToken.compareTo(LocalToken.java:45)
at org.apache.cassandra.db.DecoratedKey.compareTo(DecoratedKey.java:89)
at org.apache.cassandra.db.DecoratedKey.compareTo(DecoratedKey.java:38)
at java.util.concurrent.ConcurrentSkipListMap.findPredecessor(Unknown 
Source)
at java.util.concurrent.ConcurrentSkipListMap.findNode(Unknown Source)
at java.util.concurrent.ConcurrentSkipListMap.doGet(Unknown Source)
at java.util.concurrent.ConcurrentSkipListMap.get(Unknown Source)
at org.apache.cassandra.db.Memtable.resolve(Memtable.java:235)
at org.apache.cassandra.db.Memtable.put(Memtable.java:156)
   

[jira] [Updated] (CASSANDRA-4326) IndexOutOfBoundsException on TimeUUIDType.compareTimestampBytes

2012-06-09 Thread Kristoffer Carlson (JIRA)

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

Kristoffer Carlson updated CASSANDRA-4326:
--

Description: 
I get the following exception when performing a query on two indexed columns 
(both UTF8Type) with TimeUUIDType as the column families key validation class:

{noformat}
java.lang.RuntimeException: java.lang.IndexOutOfBoundsException
at 
org.apache.cassandra.service.StorageProxy$DroppableRunnable.run(StorageProxy.java:1254)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.IndexOutOfBoundsException
at java.nio.Buffer.checkIndex(Unknown Source)
at java.nio.HeapByteBuffer.get(Unknown Source)
at 
org.apache.cassandra.db.marshal.TimeUUIDType.compareTimestampBytes(TimeUUIDType.java:76)
at 
org.apache.cassandra.db.marshal.TimeUUIDType.compare(TimeUUIDType.java:65)
at 
org.apache.cassandra.db.marshal.TimeUUIDType.compare(TimeUUIDType.java:37)
at org.apache.cassandra.dht.LocalToken.compareTo(LocalToken.java:45)
at org.apache.cassandra.db.DecoratedKey.compareTo(DecoratedKey.java:89)
at org.apache.cassandra.db.DecoratedKey.compareTo(DecoratedKey.java:38)
at java.util.concurrent.ConcurrentSkipListMap.findPredecessor(Unknown 
Source)
at java.util.concurrent.ConcurrentSkipListMap.findNode(Unknown Source)
at java.util.concurrent.ConcurrentSkipListMap.doGet(Unknown Source)
at java.util.concurrent.ConcurrentSkipListMap.get(Unknown Source)
at org.apache.cassandra.db.Memtable.resolve(Memtable.java:235)
at org.apache.cassandra.db.Memtable.put(Memtable.java:156)
at 
org.apache.cassandra.db.ColumnFamilyStore.apply(ColumnFamilyStore.java:742)
at 
org.apache.cassandra.db.index.keys.KeysIndex.deleteColumn(KeysIndex.java:82)
at 
org.apache.cassandra.db.index.SecondaryIndexManager.applyIndexUpdates(SecondaryIndexManager.java:460)
at org.apache.cassandra.db.Table.apply(Table.java:441)
at org.apache.cassandra.db.Table.apply(Table.java:366)
at org.apache.cassandra.db.RowMutation.apply(RowMutation.java:294)
at 
org.apache.cassandra.service.StorageProxy$6.runMayThrow(StorageProxy.java:453)
at 
org.apache.cassandra.service.StorageProxy$DroppableRunnable.run(StorageProxy.java:1250)
... 3 more
ERROR [Selector-Thread-0] 2012-06-09 13:43:21,878 TNonblockingServer.java (line 
468) Read an invalid frame size of 0. Are you using TFramedTransport on the 
client side?
{noformat}

Also, the keys were generated with the following function (which had worked 
previously):

{code:title=Bar.java|borderStyle=solid}
public static UUID convertLegacyIdToUuid(long millis, long userId)
{
long time = millis * 1 + 0x01b21dd213814000L;
long timeLow = time & 0xL;
long timeMid = time & 0xL;
long timeHi = time & 0xfffL;
long upperLong = ( timeLow << 32 ) | ( timeMid >> 16 ) | ( 1 << 12 ) | 
( timeHi >> 48 );
return new UUID(upperLong, userId);
}
{code} 

  was:
I get the following exception when performing a query on two indexed columns 
(both UTF8Type) with TimeUUIDType as the column families key validation class:

{noformat}
java.lang.RuntimeException: java.lang.IndexOutOfBoundsException
at 
org.apache.cassandra.service.StorageProxy$DroppableRunnable.run(StorageProxy.java:1254)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.IndexOutOfBoundsException
at java.nio.Buffer.checkIndex(Unknown Source)
at java.nio.HeapByteBuffer.get(Unknown Source)
at 
org.apache.cassandra.db.marshal.TimeUUIDType.compareTimestampBytes(TimeUUIDType.java:76)
at 
org.apache.cassandra.db.marshal.TimeUUIDType.compare(TimeUUIDType.java:65)
at 
org.apache.cassandra.db.marshal.TimeUUIDType.compare(TimeUUIDType.java:37)
at org.apache.cassandra.dht.LocalToken.compareTo(LocalToken.java:45)
at org.apache.cassandra.db.DecoratedKey.compareTo(DecoratedKey.java:89)
at org.apache.cassandra.db.DecoratedKey.compareTo(DecoratedKey.java:38)
at java.util.concurrent.ConcurrentSkipListMap.findPredecessor(Unknown 
Source)
at java.util.concurrent.ConcurrentSkipListMap.findNode(Unknown Source)
at java.util.concurrent.ConcurrentSkipListMap.doGet(Unknown Source)
at java.util.concurrent.ConcurrentSkipListMap.get(Unknown Source)
at org.apache.cassandra.db.Memtable.resolve(Memtable.java:235)
at org.apache.cassandra.db.Memtable.put(Memtable.ja

[jira] [Updated] (CASSANDRA-4326) IndexOutOfBoundsException on TimeUUIDType.compareTimestampBytes

2012-06-09 Thread Kristoffer Carlson (JIRA)

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

Kristoffer Carlson updated CASSANDRA-4326:
--

Description: 
I get the following exception when performing a query on two indexed columns 
(both UTF8Type) with TimeUUIDType as the column families key validation class:

{noformat}
java.lang.RuntimeException: java.lang.IndexOutOfBoundsException
at 
org.apache.cassandra.service.StorageProxy$DroppableRunnable.run(StorageProxy.java:1254)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.IndexOutOfBoundsException
at java.nio.Buffer.checkIndex(Unknown Source)
at java.nio.HeapByteBuffer.get(Unknown Source)
at 
org.apache.cassandra.db.marshal.TimeUUIDType.compareTimestampBytes(TimeUUIDType.java:76)
at 
org.apache.cassandra.db.marshal.TimeUUIDType.compare(TimeUUIDType.java:65)
at 
org.apache.cassandra.db.marshal.TimeUUIDType.compare(TimeUUIDType.java:37)
at org.apache.cassandra.dht.LocalToken.compareTo(LocalToken.java:45)
at org.apache.cassandra.db.DecoratedKey.compareTo(DecoratedKey.java:89)
at org.apache.cassandra.db.DecoratedKey.compareTo(DecoratedKey.java:38)
at java.util.concurrent.ConcurrentSkipListMap.findPredecessor(Unknown 
Source)
at java.util.concurrent.ConcurrentSkipListMap.findNode(Unknown Source)
at java.util.concurrent.ConcurrentSkipListMap.doGet(Unknown Source)
at java.util.concurrent.ConcurrentSkipListMap.get(Unknown Source)
at org.apache.cassandra.db.Memtable.resolve(Memtable.java:235)
at org.apache.cassandra.db.Memtable.put(Memtable.java:156)
at 
org.apache.cassandra.db.ColumnFamilyStore.apply(ColumnFamilyStore.java:742)
at 
org.apache.cassandra.db.index.keys.KeysIndex.deleteColumn(KeysIndex.java:82)
at 
org.apache.cassandra.db.index.SecondaryIndexManager.applyIndexUpdates(SecondaryIndexManager.java:460)
at org.apache.cassandra.db.Table.apply(Table.java:441)
at org.apache.cassandra.db.Table.apply(Table.java:366)
at org.apache.cassandra.db.RowMutation.apply(RowMutation.java:294)
at 
org.apache.cassandra.service.StorageProxy$6.runMayThrow(StorageProxy.java:453)
at 
org.apache.cassandra.service.StorageProxy$DroppableRunnable.run(StorageProxy.java:1250)
... 3 more
ERROR [Selector-Thread-0] 2012-06-09 13:43:21,878 TNonblockingServer.java (line 
468) Read an invalid frame size of 0. Are you using TFramedTransport on the 
client side?
{ 

Also, the keys were generated with the following function (which had worked 
previously):
{noformat}
public static UUID convertLegacyIdToUuid(long millis, long userId)
{
long time = millis * 1 + 0x01b21dd213814000L;
long timeLow = time & 0xL;
long timeMid = time & 0xL;
long timeHi = time & 0xfffL;
long upperLong = ( timeLow << 32 ) | ( timeMid >> 16 ) | ( 1 << 12 ) | 
( timeHi >> 48 );
return new UUID(upperLong, userId);
}
{ 

  was:
I get the following exception when performing a query on two indexed columns 
(both UTF8Type) with TimeUUIDType as the column families key validation class:

java.lang.RuntimeException: java.lang.IndexOutOfBoundsException
at 
org.apache.cassandra.service.StorageProxy$DroppableRunnable.run(StorageProxy.java:1254)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.IndexOutOfBoundsException
at java.nio.Buffer.checkIndex(Unknown Source)
at java.nio.HeapByteBuffer.get(Unknown Source)
at 
org.apache.cassandra.db.marshal.TimeUUIDType.compareTimestampBytes(TimeUUIDType.java:76)
at 
org.apache.cassandra.db.marshal.TimeUUIDType.compare(TimeUUIDType.java:65)
at 
org.apache.cassandra.db.marshal.TimeUUIDType.compare(TimeUUIDType.java:37)
at org.apache.cassandra.dht.LocalToken.compareTo(LocalToken.java:45)
at org.apache.cassandra.db.DecoratedKey.compareTo(DecoratedKey.java:89)
at org.apache.cassandra.db.DecoratedKey.compareTo(DecoratedKey.java:38)
at java.util.concurrent.ConcurrentSkipListMap.findPredecessor(Unknown 
Source)
at java.util.concurrent.ConcurrentSkipListMap.findNode(Unknown Source)
at java.util.concurrent.ConcurrentSkipListMap.doGet(Unknown Source)
at java.util.concurrent.ConcurrentSkipListMap.get(Unknown Source)
at org.apache.cassandra.db.Memtable.resolve(Memtable.java:235)
at org.apache.cassandra.db.Memtable.put(Memtable.java:156)
at 
org.apache.cassandra.db.ColumnFami

[jira] [Created] (CASSANDRA-4326) IndexOutOfBoundsException on TimeUUIDType.compareTimestampBytes

2012-06-09 Thread Kristoffer Carlson (JIRA)
Kristoffer Carlson created CASSANDRA-4326:
-

 Summary: IndexOutOfBoundsException on 
TimeUUIDType.compareTimestampBytes
 Key: CASSANDRA-4326
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4326
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Affects Versions: 1.1.1
 Environment: Cassandra 1.1.1 running on CentOS 6.0 64bit. 5 nodes, 
mixed hardware.
Reporter: Kristoffer Carlson


I get the following exception when performing a query on two indexed columns 
(both UTF8Type) with TimeUUIDType as the column families key validation class:

java.lang.RuntimeException: java.lang.IndexOutOfBoundsException
at 
org.apache.cassandra.service.StorageProxy$DroppableRunnable.run(StorageProxy.java:1254)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.IndexOutOfBoundsException
at java.nio.Buffer.checkIndex(Unknown Source)
at java.nio.HeapByteBuffer.get(Unknown Source)
at 
org.apache.cassandra.db.marshal.TimeUUIDType.compareTimestampBytes(TimeUUIDType.java:76)
at 
org.apache.cassandra.db.marshal.TimeUUIDType.compare(TimeUUIDType.java:65)
at 
org.apache.cassandra.db.marshal.TimeUUIDType.compare(TimeUUIDType.java:37)
at org.apache.cassandra.dht.LocalToken.compareTo(LocalToken.java:45)
at org.apache.cassandra.db.DecoratedKey.compareTo(DecoratedKey.java:89)
at org.apache.cassandra.db.DecoratedKey.compareTo(DecoratedKey.java:38)
at java.util.concurrent.ConcurrentSkipListMap.findPredecessor(Unknown 
Source)
at java.util.concurrent.ConcurrentSkipListMap.findNode(Unknown Source)
at java.util.concurrent.ConcurrentSkipListMap.doGet(Unknown Source)
at java.util.concurrent.ConcurrentSkipListMap.get(Unknown Source)
at org.apache.cassandra.db.Memtable.resolve(Memtable.java:235)
at org.apache.cassandra.db.Memtable.put(Memtable.java:156)
at 
org.apache.cassandra.db.ColumnFamilyStore.apply(ColumnFamilyStore.java:742)
at 
org.apache.cassandra.db.index.keys.KeysIndex.deleteColumn(KeysIndex.java:82)
at 
org.apache.cassandra.db.index.SecondaryIndexManager.applyIndexUpdates(SecondaryIndexManager.java:460)
at org.apache.cassandra.db.Table.apply(Table.java:441)
at org.apache.cassandra.db.Table.apply(Table.java:366)
at org.apache.cassandra.db.RowMutation.apply(RowMutation.java:294)
at 
org.apache.cassandra.service.StorageProxy$6.runMayThrow(StorageProxy.java:453)
at 
org.apache.cassandra.service.StorageProxy$DroppableRunnable.run(StorageProxy.java:1250)
... 3 more
ERROR [Selector-Thread-0] 2012-06-09 13:43:21,878 TNonblockingServer.java (line 
468) Read an invalid frame size of 0. Are you using TFramedTransport on the 
client side?


Also, the keys were generated with the following function (which had worked 
previously):

public static UUID convertLegacyIdToUuid(long millis, long userId)
{
long time = millis * 1 + 0x01b21dd213814000L;
long timeLow = time & 0xL;
long timeMid = time & 0xL;
long timeHi = time & 0xfffL;
long upperLong = ( timeLow << 32 ) | ( timeMid >> 16 ) | ( 1 << 12 ) | 
( timeHi >> 48 );
return new UUID(upperLong, userId);
}


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Created] (CASSANDRA-4325) CQL unable to drop columnfamily

2012-06-09 Thread Jason Walkowicz (JIRA)
Jason Walkowicz created CASSANDRA-4325:
--

 Summary: CQL unable to drop columnfamily
 Key: CASSANDRA-4325
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4325
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Affects Versions: 1.1.0
 Environment: Debian 6.0.5 Squeeze
Reporter: Jason Walkowicz



cqlsh:x> DROP COLUMNFAMILY userstats ;
cqlsh:x> select * from userstats;
 key   | column1 | value
---+-+---
 jason |fans | 1


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira