[jira] [Created] (CASSANDRA-4642) Add offline scrub to debian package

2012-09-11 Thread Sylvain Lebresne (JIRA)
Sylvain Lebresne created CASSANDRA-4642:
---

 Summary: Add offline scrub to debian package
 Key: CASSANDRA-4642
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4642
 Project: Cassandra
  Issue Type: Improvement
Affects Versions: 1.1.2
Reporter: Sylvain Lebresne
Assignee: Sylvain Lebresne
Priority: Minor
 Fix For: 1.1.6


When we added the offline scrub in CASSANDRA-4321, we forgot to add the launch 
script to the debian package. We should.

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


[jira] [Updated] (CASSANDRA-4642) Add offline scrub to debian package

2012-09-11 Thread Sylvain Lebresne (JIRA)

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

Sylvain Lebresne updated CASSANDRA-4642:


Attachment: 4642.txt

 Add offline scrub to debian package
 ---

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

 Attachments: 4642.txt


 When we added the offline scrub in CASSANDRA-4321, we forgot to add the 
 launch script to the debian package. We should.

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


git commit: Avoid NPE (and cleanups)

2012-09-11 Thread slebresne
Updated Branches:
  refs/heads/trunk c4692a171 - c20b33c93


Avoid NPE (and cleanups)


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

Branch: refs/heads/trunk
Commit: c20b33c93775f62a638a8725dc07b00142aae252
Parents: c4692a1
Author: Sylvain Lebresne sylv...@datastax.com
Authored: Tue Sep 11 10:30:36 2012 +0200
Committer: Sylvain Lebresne sylv...@datastax.com
Committed: Tue Sep 11 10:30:56 2012 +0200

--
 .../cassandra/cql3/statements/BatchStatement.java  |4 ++--
 .../cassandra/cql3/statements/DeleteStatement.java |2 +-
 .../cql3/statements/ModificationStatement.java |   11 ---
 .../cassandra/cql3/statements/UpdateStatement.java |8 
 4 files changed, 15 insertions(+), 10 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/c20b33c9/src/java/org/apache/cassandra/cql3/statements/BatchStatement.java
--
diff --git a/src/java/org/apache/cassandra/cql3/statements/BatchStatement.java 
b/src/java/org/apache/cassandra/cql3/statements/BatchStatement.java
index 3a286fc..ac78c89 100644
--- a/src/java/org/apache/cassandra/cql3/statements/BatchStatement.java
+++ b/src/java/org/apache/cassandra/cql3/statements/BatchStatement.java
@@ -103,7 +103,7 @@ public class BatchStatement extends ModificationStatement
 for (ModificationStatement statement : statements)
 {
 if (isSetTimestamp())
-statement.timestamp = timestamp;
+statement.setTimestamp(getTimestamp(clientState));
 
 ListIMutation lm = statement.getMutations(clientState, 
variables);
 // Group mutation together, otherwise they won't get applied 
atomically
@@ -164,7 +164,7 @@ public class BatchStatement extends ModificationStatement
 
 public String toString()
 {
-return String.format(BatchStatement(statements=%s, consistency=%s), 
statements, cLevel);
+return String.format(BatchStatement(statements=%s, consistency=%s), 
statements, getConsistencyLevel());
 }
 
 private static class RowAndCounterMutation

http://git-wip-us.apache.org/repos/asf/cassandra/blob/c20b33c9/src/java/org/apache/cassandra/cql3/statements/DeleteStatement.java
--
diff --git a/src/java/org/apache/cassandra/cql3/statements/DeleteStatement.java 
b/src/java/org/apache/cassandra/cql3/statements/DeleteStatement.java
index cd0293a..73f7c0f 100644
--- a/src/java/org/apache/cassandra/cql3/statements/DeleteStatement.java
+++ b/src/java/org/apache/cassandra/cql3/statements/DeleteStatement.java
@@ -231,7 +231,7 @@ public class DeleteStatement extends ModificationStatement
 return String.format(DeleteStatement(name=%s, columns=%s, 
consistency=%s keys=%s),
  cfName,
  columns,
- cLevel,
+ getConsistencyLevel(),
  whereClause);
 }
 }

http://git-wip-us.apache.org/repos/asf/cassandra/blob/c20b33c9/src/java/org/apache/cassandra/cql3/statements/ModificationStatement.java
--
diff --git 
a/src/java/org/apache/cassandra/cql3/statements/ModificationStatement.java 
b/src/java/org/apache/cassandra/cql3/statements/ModificationStatement.java
index 00674e9..291ecd9 100644
--- a/src/java/org/apache/cassandra/cql3/statements/ModificationStatement.java
+++ b/src/java/org/apache/cassandra/cql3/statements/ModificationStatement.java
@@ -42,9 +42,9 @@ public abstract class ModificationStatement extends 
CFStatement implements CQLSt
 {
 public static final ConsistencyLevel defaultConsistency = 
ConsistencyLevel.ONE;
 
-protected final ConsistencyLevel cLevel;
-protected Long timestamp;
-protected final int timeToLive;
+private final ConsistencyLevel cLevel;
+private Long timestamp;
+private final int timeToLive;
 
 public ModificationStatement(CFName name, Attributes attrs)
 {
@@ -98,6 +98,11 @@ public abstract class ModificationStatement extends 
CFStatement implements CQLSt
 return timestamp == null ? clientState.getTimestamp() : timestamp;
 }
 
+public void setTimestamp(long timestamp)
+{
+this.timestamp = timestamp;
+}
+
 public boolean isSetTimestamp()
 {
 return timestamp != null;

http://git-wip-us.apache.org/repos/asf/cassandra/blob/c20b33c9/src/java/org/apache/cassandra/cql3/statements/UpdateStatement.java

[jira] [Created] (CASSANDRA-4643) AssertionError: DecoratedKey(-1, ) != DecoratedKey

2012-09-11 Thread Radim Kolar (JIRA)
Radim Kolar created CASSANDRA-4643:
--

 Summary: AssertionError: DecoratedKey(-1, ) != DecoratedKey
 Key: CASSANDRA-4643
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4643
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Affects Versions: 1.1.5
Reporter: Radim Kolar


i got lot of following errors: decorated key -1 != some number

 INFO [CompactionExecutor:10] 2012-09-11 02:22:13,586 CompactionController.java 
(line 172) Compacting large row 
system/HintsColumnFamily:67fd0f04ca3294558142a5b33a30f6f5 (241502947 bytes) 
incrementally
ERROR [ReadStage:44] 2012-09-11 02:22:13,992 AbstractCassandraDaemon.java (line 
135) Exception in thread Thread[ReadStage:44,5,main]
java.lang.AssertionError: DecoratedKey(-1, ) != 
DecoratedKey(133375303318769338050543368330356089660, ad4f) in 
c:\cassandra\data\test\sipdb\test-sipdb-he-5-Data.db
at 
org.apache.cassandra.db.columniterator.SSTableNamesIterator.init(SSTableNamesIterator.java:72)
at 
org.apache.cassandra.db.filter.NamesQueryFilter.getSSTableColumnIterator(NamesQueryFilter.java:61)
at 
org.apache.cassandra.db.filter.QueryFilter.getSSTableColumnIterator(QueryFilter.java:79)
at 
org.apache.cassandra.db.CollationController.collectTimeOrderedData(CollationController.java:124)
at 
org.apache.cassandra.db.CollationController.getTopLevelColumns(CollationController.java:64)
at 
org.apache.cassandra.db.ColumnFamilyStore.getTopLevelColumns(ColumnFamilyStore.java:1345)


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


[jira] [Updated] (CASSANDRA-4621) AssertionError in StorageProxy.getRestrictedRange

2012-09-11 Thread Sylvain Lebresne (JIRA)

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

Sylvain Lebresne updated CASSANDRA-4621:


Attachment: 4621.txt

Attaching patch that:
* Don't force positive tokens in Murmur3Partitioner (thus using all the bits of 
the LongToken).
* Exclude Long.MIN_VALUE from the possible tokens of a key (since it's now the 
MINIMUM token).

I note that this means tokens can be negative and that we'll have to update a 
number of documentation relating to computing tokens. Though this was already 
the case before this patch (but maybe to a slightly lesser extend). And 
hopefully vnodes will make (manual) token computations a thing of the past.

 AssertionError in StorageProxy.getRestrictedRange
 -

 Key: CASSANDRA-4621
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4621
 Project: Cassandra
  Issue Type: Bug
Affects Versions: 1.2.0 beta 1
 Environment: archlinux, openjdk7
Reporter: Pierre-Yves Ritschard
Assignee: Sylvain Lebresne
 Fix For: 1.2.0 beta 1

 Attachments: 4621.txt, 4621.txt


 On a freshly built cassandra from trunk, I can create a column family with a 
 composite row key using the syntax:
 for instance a standard eventlog CF:
  CREATE TABLE events (
facility text,
prio int,
message text,
PRIMARY KEY ( (facility, prio) )
  );
 A simple query will then generate exceptions:
 SELECT * FROM events; will yield:
 ERROR 15:33:40,383 Exception in thread Thread[Thrift:1,5,main]
 java.lang.AssertionError: [min(0),max(-8021625467324731134)]
   at org.apache.cassandra.dht.Bounds.init(Bounds.java:41)
   at org.apache.cassandra.dht.Bounds.split(Bounds.java:59)
   at 
 org.apache.cassandra.service.StorageProxy.getRestrictedRanges(StorageProxy.java:1073)
   at 
 org.apache.cassandra.service.StorageProxy.getRangeSlice(StorageProxy.java:879)
   at 
 org.apache.cassandra.cql3.statements.SelectStatement.multiRangeSlice(SelectStatement.java:209)
   at 
 org.apache.cassandra.cql3.statements.SelectStatement.executeInternal(SelectStatement.java:128)
   at 
 org.apache.cassandra.cql3.statements.SelectStatement.execute(SelectStatement.java:118)
   at 
 org.apache.cassandra.cql3.statements.SelectStatement.execute(SelectStatement.java:62)
   at 
 org.apache.cassandra.cql3.QueryProcessor.processStatement(QueryProcessor.java:107)
   at 
 org.apache.cassandra.cql3.QueryProcessor.process(QueryProcessor.java:115)
   at 
 org.apache.cassandra.thrift.CassandraServer.execute_cql_query(CassandraServer.java:1521)
   at 
 org.apache.cassandra.thrift.Cassandra$Processor$execute_cql_query.getResult(Cassandra.java:3618)
   at 
 org.apache.cassandra.thrift.Cassandra$Processor$execute_cql_query.getResult(Cassandra.java:3606)
   at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:32)
   at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:34)
   at 
 org.apache.cassandra.thrift.CustomTThreadPoolServer$WorkerProcess.run(CustomTThreadPoolServer.java:184)
   at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)

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


git commit: Accept all thrift update on CQL3 cf but don't expose their metadata

2012-09-11 Thread slebresne
Updated Branches:
  refs/heads/trunk c20b33c93 - 73a4b4685


Accept all thrift update on CQL3 cf but don't expose their metadata

patch by slebresne; reviewed by xedin for CASSANDRA-4377


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

Branch: refs/heads/trunk
Commit: 73a4b4685c61068986e597c1a9adb8641d4de793
Parents: c20b33c
Author: Sylvain Lebresne sylv...@datastax.com
Authored: Tue Sep 11 11:02:41 2012 +0200
Committer: Sylvain Lebresne sylv...@datastax.com
Committed: Tue Sep 11 11:02:41 2012 +0200

--
 CHANGES.txt|1 +
 .../org/apache/cassandra/config/CFMetaData.java|   22 +++---
 .../org/apache/cassandra/config/KSMetaData.java|6 +++-
 .../apache/cassandra/thrift/ThriftValidation.java  |   23 ++-
 4 files changed, 45 insertions(+), 7 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/73a4b468/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index f5ae4e3..98929cf 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -57,6 +57,7 @@
  * Rewrite nodetool help (CASSANDRA-2293)
  * Make CQL3 the default for CQL (CASSANDRA-4640)
  * update stress tool to be able to use CQL3 (CASSANDRA-4406)
+ * Accept all thrift update on CQL3 cf but don't expose their metadata 
(CASSANDRA-4377)
 
 
 1.1.6

http://git-wip-us.apache.org/repos/asf/cassandra/blob/73a4b468/src/java/org/apache/cassandra/config/CFMetaData.java
--
diff --git a/src/java/org/apache/cassandra/config/CFMetaData.java 
b/src/java/org/apache/cassandra/config/CFMetaData.java
index 4e29fc7..687b5f3 100644
--- a/src/java/org/apache/cassandra/config/CFMetaData.java
+++ b/src/java/org/apache/cassandra/config/CFMetaData.java
@@ -886,12 +886,7 @@ public final class CFMetaData
 def.setKey_alias(keyAliases.get(0));
 Listorg.apache.cassandra.thrift.ColumnDef column_meta = new 
ArrayListorg.apache.cassandra.thrift.ColumnDef(column_metadata.size());
 for (ColumnDefinition cd : column_metadata.values())
-{
-// Non-null componentIndex are only used by CQL (so far) so we 
don't expose
-// them through thrift
-if (cd.componentIndex == null)
 column_meta.add(cd.toThrift());
-}
 def.setColumn_metadata(column_meta);
 def.setCompaction_strategy(compactionStrategyClass.getName());
 def.setCompaction_strategy_options(new HashMapString, 
String(compactionStrategyOptions));
@@ -1425,6 +1420,23 @@ public final class CFMetaData
 return cqlCfDef;
 }
 
+/**
+ * Returns whether this CFMetaData has information non exposed on thrift so
+ * that it cannot be correctly handled automatically by thrift clients.
+ */
+public boolean isThriftIncompatible()
+{
+if (!cqlCfDef.isComposite)
+return false;
+
+for (ColumnDefinition columnDef : column_metadata.values())
+{
+if (columnDef.componentIndex != null)
+return true;
+}
+return false;
+}
+
 @Override
 public String toString()
 {

http://git-wip-us.apache.org/repos/asf/cassandra/blob/73a4b468/src/java/org/apache/cassandra/config/KSMetaData.java
--
diff --git a/src/java/org/apache/cassandra/config/KSMetaData.java 
b/src/java/org/apache/cassandra/config/KSMetaData.java
index 50cbb91..e700444 100644
--- a/src/java/org/apache/cassandra/config/KSMetaData.java
+++ b/src/java/org/apache/cassandra/config/KSMetaData.java
@@ -179,7 +179,11 @@ public final class KSMetaData
 {
 ListCfDef cfDefs = new ArrayListCfDef(cfMetaData.size());
 for (CFMetaData cfm : cfMetaData().values())
-cfDefs.add(cfm.toThrift());
+{
+// Don't expose CF that cannot be correctly handle by thrift; see 
CASSANDRA-4377 for further details
+if (!cfm.isThriftIncompatible())
+cfDefs.add(cfm.toThrift());
+}
 KsDef ksdef = new KsDef(name, strategyClass.getName(), cfDefs);
 ksdef.setStrategy_options(strategyOptions);
 ksdef.setDurable_writes(durableWrites);

http://git-wip-us.apache.org/repos/asf/cassandra/blob/73a4b468/src/java/org/apache/cassandra/thrift/ThriftValidation.java
--
diff --git a/src/java/org/apache/cassandra/thrift/ThriftValidation.java 
b/src/java/org/apache/cassandra/thrift/ThriftValidation.java

[jira] [Commented] (CASSANDRA-4049) Add generic way of adding SSTable components required custom compaction strategy

2012-09-11 Thread JIRA

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

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

Sorry for late reply, been busy fixing things in dse.

{quote}
{noformat}
catch (Exception e)
{
if (!snapshots.equals(name)  !backups.equals(name)
 !name.contains(.json))
logger.warn(Invalid file '{}' in data directory {}., name, 
dir);
return null;
}
{noformat}
What was the reasoning behind this? Not saying it's wrong to remove it, but I 
want to make sure we understand what it was supposed to do, before deciding we 
don't need it.
{quote}

This check was there before. Actually because this check was firing out 
warnings, we created this ticket ;)

-
 
{noformat}
catch (IOException e)
{
SetComponent components = 
Sets.newHashSetWithExpectedSize(Component.TYPES.size());
for (Component.Type componentType : Component.TYPES)
{
Component component = new Component(componentType);
if (new File(desc.filenameFor(component)).exists())
components.add(component);
}

saveTOC(desc, components);
return components;
}
{noformat}

This one is for backwards compatibility. If we find an SSTable without a TOC 
component (from previous version of C*), we just do what we always did - loop 
through all C* components. 


{quote}
Use FileUtils.closeQuietly{quote}

Oh, yeah. I was looking for IOUtils.closeQuietly, and couldn't find it. Thanks, 
that is what I needed!

{quote}
But probably simpler to just use Guava's Files.readLines{quote}

Ok, I fix it.


{quote}
Do we not know what components are necessary at construction time? Would 
strongly prefer an immutable set. Adding extra parameters to SSTW to do this is 
fine.{quote}

We do, but there is a chicken-and-egg problem here. CompactionStrategy knows. 
But CompactionStrategy needs a set of SSTables to be created. And to create 
SSTable readers you need to know the components. That is why I decided for a 
TOC component, that allows for reading the list of components at SSTable 
construction time.

The workflow of creating a new SSTable is currently as follows:

1. memtable is flushed to disk, with C* only components
2. compaction strategy is notified that a new sstable was created and gets an 
SSTableReader (with only default components)
3. compaction strategy adds its custom components to it; in order to do it, it 
has to read some components of SSTable (e.g. access the index or data file)

In order to make SSTableReader immutable, we had to ask currently installed 
compaction strategy for custom component list somewhere in the middle of this 
process, before creating SSTableReader. That is slightly more complex than what 
we have now (have to change the CS interface), but retaining full immutability 
is probably worth it.

{noformat}
public synchronized void addCustomComponent(Component component){noformat}

You are right that synchronized is wrong here. 

Thanks for great suggestions [~jbellis]. I look into improving my patch as soon 
as I'm done with the tickets I've got in the waiting queue for DSE 3.0.


 Add generic way of adding SSTable components required custom compaction 
 strategy
 

 Key: CASSANDRA-4049
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4049
 Project: Cassandra
  Issue Type: New Feature
  Components: Core
Reporter: Piotr Kołaczkowski
Assignee: Piotr Kołaczkowski
Priority: Minor
  Labels: compaction
 Fix For: 1.1.6

 Attachments: pluggable_custom_components-1.1.4.patch


 CFS compaction strategy coming up in the next DSE release needs to store some 
 important information in Tombstones.db and RemovedKeys.db files, one per 
 sstable. However, currently Cassandra issues warnings when these files are 
 found in the data directory. Additionally, when switched to 
 SizeTieredCompactionStrategy, the files are left in the data directory after 
 compaction.
 The attached patch adds new components to the Component class so Cassandra 
 knows about those files.

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


[jira] [Comment Edited] (CASSANDRA-4049) Add generic way of adding SSTable components required custom compaction strategy

2012-09-11 Thread JIRA

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

Piotr Kołaczkowski edited comment on CASSANDRA-4049 at 9/11/12 8:13 PM:


Sorry for late reply, been busy fixing things in dse.

{quote}
{noformat}
catch (Exception e)
{
if (!snapshots.equals(name)  !backups.equals(name)
 !name.contains(.json))
logger.warn(Invalid file '{}' in data directory {}., name, 
dir);
return null;
}
{noformat}
What was the reasoning behind this? Not saying it's wrong to remove it, but I 
want to make sure we understand what it was supposed to do, before deciding we 
don't need it.
{quote}

--This check was there before. Actually because this check was firing out 
warnings, we created this ticket ;)--
Oh, just noticed, you are referring to removed code. I think this one is not 
needed any more - it was to warn against some unknown files in the data 
directory.
I haven't removed the warning completely - just moved it elsewhere. Here it is 
(line 271):

{noformat}
if (!new File(descriptor.filenameFor(component)).exists())
logger.error(Missing component:  + 
descriptor.filenameFor(component));
{noformat}

-
 
{noformat}
catch (IOException e)
{
SetComponent components = 
Sets.newHashSetWithExpectedSize(Component.TYPES.size());
for (Component.Type componentType : Component.TYPES)
{
Component component = new Component(componentType);
if (new File(desc.filenameFor(component)).exists())
components.add(component);
}

saveTOC(desc, components);
return components;
}
{noformat}

This one is for backwards compatibility. If we find an SSTable without a TOC 
component (from previous version of C*), we just do what we always did - loop 
through all C* components. 


{quote}
Use FileUtils.closeQuietly{quote}

Oh, yeah. I was looking for IOUtils.closeQuietly, and couldn't find it. Thanks, 
that is what I needed!

{quote}
But probably simpler to just use Guava's Files.readLines{quote}

Ok, I fix it.


{quote}
Do we not know what components are necessary at construction time? Would 
strongly prefer an immutable set. Adding extra parameters to SSTW to do this is 
fine.{quote}

We do, but there is a chicken-and-egg problem here. CompactionStrategy knows. 
But CompactionStrategy needs a set of SSTables to be created. And to create 
SSTable readers you need to know the components. That is why I decided for a 
TOC component, that allows for reading the list of components at SSTable 
construction time.

The workflow of creating a new SSTable is currently as follows:

1. memtable is flushed to disk, with C* only components
2. compaction strategy is notified that a new sstable was created and gets an 
SSTableReader (with only default components)
3. compaction strategy adds its custom components to it; in order to do it, it 
has to read some components of SSTable (e.g. access the index or data file)

In order to make SSTableReader immutable, we had to ask currently installed 
compaction strategy for custom component list somewhere in the middle of this 
process, before creating SSTableReader. That is slightly more complex than what 
we have now (have to change the CS interface), but retaining full immutability 
is probably worth it.

{noformat}
public synchronized void addCustomComponent(Component component){noformat}

You are right that synchronized is wrong here. 

Thanks for great suggestions [~jbellis]. I look into improving my patch as soon 
as I'm done with the tickets I've got in the waiting queue for DSE 3.0.

  was (Author: pkolaczk):
Sorry for late reply, been busy fixing things in dse.

{quote}
{noformat}
catch (Exception e)
{
if (!snapshots.equals(name)  !backups.equals(name)
 !name.contains(.json))
logger.warn(Invalid file '{}' in data directory {}., name, 
dir);
return null;
}
{noformat}
What was the reasoning behind this? Not saying it's wrong to remove it, but I 
want to make sure we understand what it was supposed to do, before deciding we 
don't need it.
{quote}

This check was there before. Actually because this check was firing out 
warnings, we created this ticket ;)

-
 
{noformat}
catch (IOException e)
{
SetComponent components = 
Sets.newHashSetWithExpectedSize(Component.TYPES.size());
for (Component.Type componentType : Component.TYPES)
{
Component component = new Component(componentType);
if (new File(desc.filenameFor(component)).exists())

[jira] [Comment Edited] (CASSANDRA-4049) Add generic way of adding SSTable components required custom compaction strategy

2012-09-11 Thread JIRA

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

Piotr Kołaczkowski edited comment on CASSANDRA-4049 at 9/11/12 8:16 PM:


Sorry for late reply, been busy fixing things in dse.

{quote}
{noformat}
catch (Exception e)
{
if (!snapshots.equals(name)  !backups.equals(name)
 !name.contains(.json))
logger.warn(Invalid file '{}' in data directory {}., name, 
dir);
return null;
}
{noformat}
What was the reasoning behind this? Not saying it's wrong to remove it, but I 
want to make sure we understand what it was supposed to do, before deciding we 
don't need it.
{quote}

--This check was there before. Actually because this check was firing out 
warnings, we created this ticket ;)--
Oh, just noticed, you are referring to removed code. [~slebresne] said he could 
live without them. But if you insist, I can think of bringing them back. Don't 
know how to do it yet, but if it is important, I can try.


{noformat}
if (!new File(descriptor.filenameFor(component)).exists())
logger.error(Missing component:  + 
descriptor.filenameFor(component));
{noformat}

-
 
{noformat}
catch (IOException e)
{
SetComponent components = 
Sets.newHashSetWithExpectedSize(Component.TYPES.size());
for (Component.Type componentType : Component.TYPES)
{
Component component = new Component(componentType);
if (new File(desc.filenameFor(component)).exists())
components.add(component);
}

saveTOC(desc, components);
return components;
}
{noformat}

This one is for backwards compatibility. If we find an SSTable without a TOC 
component (from previous version of C*), we just do what we always did - loop 
through all C* components. 


{quote}
Use FileUtils.closeQuietly{quote}

Oh, yeah. I was looking for IOUtils.closeQuietly, and couldn't find it. Thanks, 
that is what I needed!

{quote}
But probably simpler to just use Guava's Files.readLines{quote}

Ok, I fix it.


{quote}
Do we not know what components are necessary at construction time? Would 
strongly prefer an immutable set. Adding extra parameters to SSTW to do this is 
fine.{quote}

We do, but there is a chicken-and-egg problem here. CompactionStrategy knows. 
But CompactionStrategy needs a set of SSTables to be created. And to create 
SSTable readers you need to know the components. That is why I decided for a 
TOC component, that allows for reading the list of components at SSTable 
construction time.

The workflow of creating a new SSTable is currently as follows:

1. memtable is flushed to disk, with C* only components
2. compaction strategy is notified that a new sstable was created and gets an 
SSTableReader (with only default components)
3. compaction strategy adds its custom components to it; in order to do it, it 
has to read some components of SSTable (e.g. access the index or data file)

In order to make SSTableReader immutable, we had to ask currently installed 
compaction strategy for custom component list somewhere in the middle of this 
process, before creating SSTableReader. That is slightly more complex than what 
we have now (have to change the CS interface), but retaining full immutability 
is probably worth it.

{noformat}
public synchronized void addCustomComponent(Component component){noformat}

You are right that synchronized is wrong here. 

Thanks for great suggestions [~jbellis]. I look into improving my patch as soon 
as I'm done with the tickets I've got in the waiting queue for DSE 3.0.

  was (Author: pkolaczk):
Sorry for late reply, been busy fixing things in dse.

{quote}
{noformat}
catch (Exception e)
{
if (!snapshots.equals(name)  !backups.equals(name)
 !name.contains(.json))
logger.warn(Invalid file '{}' in data directory {}., name, 
dir);
return null;
}
{noformat}
What was the reasoning behind this? Not saying it's wrong to remove it, but I 
want to make sure we understand what it was supposed to do, before deciding we 
don't need it.
{quote}

--This check was there before. Actually because this check was firing out 
warnings, we created this ticket ;)--
Oh, just noticed, you are referring to removed code. I think this one is not 
needed any more - it was to warn against some unknown files in the data 
directory.
I haven't removed the warning completely - just moved it elsewhere. Here it is 
(line 271):

{noformat}
if (!new File(descriptor.filenameFor(component)).exists())
logger.error(Missing component:  + 
descriptor.filenameFor(component));
{noformat}


[jira] [Comment Edited] (CASSANDRA-4049) Add generic way of adding SSTable components required custom compaction strategy

2012-09-11 Thread JIRA

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

Piotr Kołaczkowski edited comment on CASSANDRA-4049 at 9/11/12 8:17 PM:


Sorry for late reply, been busy fixing things in dse.

{quote}
{noformat}
catch (Exception e)
{
if (!snapshots.equals(name)  !backups.equals(name)
 !name.contains(.json))
logger.warn(Invalid file '{}' in data directory {}., name, 
dir);
return null;
}
{noformat}
What was the reasoning behind this? Not saying it's wrong to remove it, but I 
want to make sure we understand what it was supposed to do, before deciding we 
don't need it.
{quote}

--This check was there before. Actually because this check was firing out 
warnings, we created this ticket ;)--
Oh, just noticed, you are referring to removed code. [~slebresne] said he could 
live without them. But if you insist, I can think of bringing them back. Don't 
know how to do it yet, but if it is important, I can try.

On the other hand, I left the warning about missing components (which is IMHO 
much more important than some spurious components):
{noformat}
if (!new File(descriptor.filenameFor(component)).exists())
logger.error(Missing component:  + 
descriptor.filenameFor(component));
{noformat}

-
 
{noformat}
catch (IOException e)
{
SetComponent components = 
Sets.newHashSetWithExpectedSize(Component.TYPES.size());
for (Component.Type componentType : Component.TYPES)
{
Component component = new Component(componentType);
if (new File(desc.filenameFor(component)).exists())
components.add(component);
}

saveTOC(desc, components);
return components;
}
{noformat}

This one is for backwards compatibility. If we find an SSTable without a TOC 
component (from previous version of C*), we just do what we always did - loop 
through all C* components. 


{quote}
Use FileUtils.closeQuietly{quote}

Oh, yeah. I was looking for IOUtils.closeQuietly, and couldn't find it. Thanks, 
that is what I needed!

{quote}
But probably simpler to just use Guava's Files.readLines{quote}

Ok, I fix it.


{quote}
Do we not know what components are necessary at construction time? Would 
strongly prefer an immutable set. Adding extra parameters to SSTW to do this is 
fine.{quote}

We do, but there is a chicken-and-egg problem here. CompactionStrategy knows. 
But CompactionStrategy needs a set of SSTables to be created. And to create 
SSTable readers you need to know the components. That is why I decided for a 
TOC component, that allows for reading the list of components at SSTable 
construction time.

The workflow of creating a new SSTable is currently as follows:

1. memtable is flushed to disk, with C* only components
2. compaction strategy is notified that a new sstable was created and gets an 
SSTableReader (with only default components)
3. compaction strategy adds its custom components to it; in order to do it, it 
has to read some components of SSTable (e.g. access the index or data file)

In order to make SSTableReader immutable, we had to ask currently installed 
compaction strategy for custom component list somewhere in the middle of this 
process, before creating SSTableReader. That is slightly more complex than what 
we have now (have to change the CS interface), but retaining full immutability 
is probably worth it.

{noformat}
public synchronized void addCustomComponent(Component component){noformat}

You are right that synchronized is wrong here. 

Thanks for great suggestions [~jbellis]. I look into improving my patch as soon 
as I'm done with the tickets I've got in the waiting queue for DSE 3.0.

  was (Author: pkolaczk):
Sorry for late reply, been busy fixing things in dse.

{quote}
{noformat}
catch (Exception e)
{
if (!snapshots.equals(name)  !backups.equals(name)
 !name.contains(.json))
logger.warn(Invalid file '{}' in data directory {}., name, 
dir);
return null;
}
{noformat}
What was the reasoning behind this? Not saying it's wrong to remove it, but I 
want to make sure we understand what it was supposed to do, before deciding we 
don't need it.
{quote}

--This check was there before. Actually because this check was firing out 
warnings, we created this ticket ;)--
Oh, just noticed, you are referring to removed code. [~slebresne] said he could 
live without them. But if you insist, I can think of bringing them back. Don't 
know how to do it yet, but if it is important, I can try.


{noformat}
if (!new File(descriptor.filenameFor(component)).exists())
  

[jira] [Commented] (CASSANDRA-4500) cqlsh: understand updated encodings for collections

2012-09-11 Thread Sylvain Lebresne (JIRA)

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

Sylvain Lebresne commented on CASSANDRA-4500:
-

This is a detail I suppose, but while updating dtests, I see that the python 
driver deserialize lists as python tuples rather than, well, lists. Was that on 
purpose? (one reason I can see is the fact that tuples are immutable, but it 
seems that maps are deserialized to dict which I believe are mutable, so I 
would think that it's not worth the probably less expected output in the list 
case).

 cqlsh: understand updated encodings for collections
 ---

 Key: CASSANDRA-4500
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4500
 Project: Cassandra
  Issue Type: Improvement
  Components: Tools
Affects Versions: 1.2.0 beta 1
Reporter: paul cannon
Assignee: paul cannon
  Labels: cqlsh
 Fix For: 1.2.0 beta 1

 Attachments: 4500.patch.txt


 After CASSANDRA-4453, collections will be represented using the binary 
 encoding in thrift CqlResults instead of json. Update cqlsh (and python-cql 
 as necessary) to support.

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


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

2012-09-11 Thread Sylvain Lebresne (JIRA)

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

Sylvain Lebresne commented on CASSANDRA-1337:
-

I haven't had the time yet to look at the new patches, but there may be 
something wrong with the revert because the test at 
https://github.com/riptano/cassandra-dtest/blob/master/cql_tests.py#L1736 is 
still broken on trunk, though now it simply doesn't complete. Haven't looked 
yet but the test passes alright in 1.1.

 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.1

 Attachments: 1137-bugfix.patch, 1337.patch, 1337-v4.patch, 
 ASF.LICENSE.NOT.GRANTED--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
For more information on JIRA, see: http://www.atlassian.com/software/jira


git commit: Add inet support in binary protocol

2012-09-11 Thread slebresne
Updated Branches:
  refs/heads/trunk 73a4b4685 - c6ddbea43


Add inet support in binary protocol

patch by slebresne; reviewed by thepaul for CASSANDRA-4627


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

Branch: refs/heads/trunk
Commit: c6ddbea4386d123354b07fb8ad7316abe483c0c5
Parents: 73a4b46
Author: Sylvain Lebresne sylv...@datastax.com
Authored: Tue Sep 11 12:10:27 2012 +0200
Committer: Sylvain Lebresne sylv...@datastax.com
Committed: Tue Sep 11 12:10:27 2012 +0200

--
 doc/cql3/CQL.textile   |2 ++
 doc/native_protocol.spec   |1 +
 .../org/apache/cassandra/transport/DataType.java   |1 +
 3 files changed, 4 insertions(+), 0 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/c6ddbea4/doc/cql3/CQL.textile
--
diff --git a/doc/cql3/CQL.textile b/doc/cql3/CQL.textile
index e0f25da..175bac0 100644
--- a/doc/cql3/CQL.textile
+++ b/doc/cql3/CQL.textile
@@ -652,6 +652,7 @@ bc(syntax)..
 | decimal
 | double
 | float
+| inet
 | int
 | text
 | timestamp
@@ -672,6 +673,7 @@ p. The following table gives additional informations on the 
native data types:
 |@decimal@  |Variable-precision decimal|
 |@double@   |64-bit IEEE-754 floating point|
 |@float@|32-bit IEEE-754 floating point|
+|@inet@ |An IP address. It can be either 4 bytes long (IPv4) or 16 bytes 
long (IPv6)|
 |@int@  |32-bit signed int|
 |@text@ |UTF8 encoded string|
 |@timestamp@|A timestamp. See Working with dates:#usingdates below for more 
information.|

http://git-wip-us.apache.org/repos/asf/cassandra/blob/c6ddbea4/doc/native_protocol.spec
--
diff --git a/doc/native_protocol.spec b/doc/native_protocol.spec
index 07d5c69..0dd5c14 100644
--- a/doc/native_protocol.spec
+++ b/doc/native_protocol.spec
@@ -384,6 +384,7 @@ Table of Contents
 0x000DVarchar
 0x000EVarint
 0x000FTimeuuid
+0x0010Inet
 0x0020List: the value is an [option], representing the type
 of the elements of the list.
 0x0021Map: the value is two [option], representing the types 
of the

http://git-wip-us.apache.org/repos/asf/cassandra/blob/c6ddbea4/src/java/org/apache/cassandra/transport/DataType.java
--
diff --git a/src/java/org/apache/cassandra/transport/DataType.java 
b/src/java/org/apache/cassandra/transport/DataType.java
index 29d7a93..0cb9d2d 100644
--- a/src/java/org/apache/cassandra/transport/DataType.java
+++ b/src/java/org/apache/cassandra/transport/DataType.java
@@ -48,6 +48,7 @@ public enum DataType implements 
OptionCodec.CodecableDataType
 VARCHAR  (13, UTF8Type.instance),
 VARINT   (14, IntegerType.instance),
 TIMEUUID (15, TimeUUIDType.instance),
+INET (16, InetAddressType.instance),
 LIST (32, null),
 MAP  (33, null),
 SET  (34, null);



[jira] [Commented] (CASSANDRA-4627) support inet data type

2012-09-11 Thread Sylvain Lebresne (JIRA)

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

Sylvain Lebresne commented on CASSANDRA-4627:
-

I know that was for cqlsh :)

Anyway, I've committed the patch but leaving that open until the driver is 
updated

 support inet data type
 --

 Key: CASSANDRA-4627
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4627
 Project: Cassandra
  Issue Type: Bug
  Components: Tools
Affects Versions: 1.2.0 beta 1
Reporter: paul cannon
Assignee: paul cannon
  Labels: cql, cqlsh
 Fix For: 1.2.0 beta 1

 Attachments: 4627.txt


 CASSANDRA-4018 introduced a new cassandra data type with a cql name inet, 
 which is not yet supported in cqlsh. Add support for decoding and formatting.

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


git commit: fix assumption error in CLI when updating/describing keyspace patch by Pavel Yaskevich; reviewed by Dave Brosius for CASSANDRA-4322

2012-09-11 Thread xedin
Updated Branches:
  refs/heads/cassandra-1.1 e172a9b73 - 98708d817


fix assumption error in CLI when updating/describing keyspace
patch by Pavel Yaskevich; reviewed by Dave Brosius for CASSANDRA-4322


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

Branch: refs/heads/cassandra-1.1
Commit: 98708d817f8df91be4cfcba06c9523027fab881c
Parents: e172a9b
Author: Pavel Yaskevich xe...@apache.org
Authored: Sat Sep 8 21:57:46 2012 +0300
Committer: Pavel Yaskevich xe...@apache.org
Committed: Tue Sep 11 14:11:36 2012 +0300

--
 CHANGES.txt  |1 +
 src/java/org/apache/cassandra/cli/CliClient.java |   38 +++-
 2 files changed, 27 insertions(+), 12 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/98708d81/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 246bc49..b6fe049 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,6 +1,7 @@
 1.1.6
  * Improve IAuthority interface by introducing fine-grained
access permissions and grant/revoke commands (CASSANDRA-4490)
+ * fix assumption error in CLI when updating/describing keyspace 
(CASSANDRA-4322)
 
 
 1.1.5

http://git-wip-us.apache.org/repos/asf/cassandra/blob/98708d81/src/java/org/apache/cassandra/cli/CliClient.java
--
diff --git a/src/java/org/apache/cassandra/cli/CliClient.java 
b/src/java/org/apache/cassandra/cli/CliClient.java
index 8296253..d0fb543 100644
--- a/src/java/org/apache/cassandra/cli/CliClient.java
+++ b/src/java/org/apache/cassandra/cli/CliClient.java
@@ -1068,7 +1068,7 @@ public class CliClient
 sessionState.out.println(mySchemaVersion);
 validateSchemaIsSettled(mySchemaVersion);
 keyspacesMap.remove(keyspaceName);
-getKSMetaData(keySpace);
+getKSMetaData(keyspaceName);
 }
 catch (InvalidRequestException e)
 {
@@ -1879,15 +1879,19 @@ public class CliClient
  * Returns true if this.keySpace is set, false otherwise
  * @return boolean
  */
-private boolean hasKeySpace()
+private boolean hasKeySpace(boolean printError)
 {
-   if (keySpace == null)
-{
-sessionState.out.println(Not authenticated to a working 
keyspace.);
-return false;
-}
+boolean hasKeyspace = keySpace != null;
 
-return true;
+if (!hasKeyspace  printError)
+sessionState.err.println(Not authorized to a working keyspace.);
+
+return hasKeyspace;
+}
+
+private boolean hasKeySpace()
+{
+return hasKeySpace(true);
 }
 
 public String getKeySpace()
@@ -2142,9 +2146,19 @@ public class CliClient
 return;
 
 int argCount = statement.getChildCount();
-
-keyspacesMap.remove(keySpace);
-KsDef currentKeySpace = getKSMetaData(keySpace);
+
+if (keySpace == null  argCount == 0)
+{
+sessionState.out.println(Authenticate to a Keyspace, before using 
`describe` or `describe column_family`);
+return;
+}
+
+KsDef currentKeySpace = null;
+if (keySpace != null)
+{
+keyspacesMap.remove(keySpace);
+currentKeySpace = getKSMetaData(keySpace);
+}
 
 if (argCount  1) // in case somebody changes Cli grammar
 throw new RuntimeException(`describe` command take maximum one 
argument. See `help describe;`);
@@ -2996,7 +3010,7 @@ public class CliClient
 
 public void replayAssumptions(String keyspace)
 {
-if (!CliMain.isConnected() || !hasKeySpace())
+if (!CliMain.isConnected() || !hasKeySpace(false))
 return;
 
 MapString, MapString, String cfAssumes = 
assumptions.get(keyspace);



[2/2] git commit: fix assumption error in CLI when updating/describing keyspace patch by Pavel Yaskevich; reviewed by Dave Brosius for CASSANDRA-4322

2012-09-11 Thread xedin
fix assumption error in CLI when updating/describing keyspace
patch by Pavel Yaskevich; reviewed by Dave Brosius for CASSANDRA-4322


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

Branch: refs/heads/trunk
Commit: 98708d817f8df91be4cfcba06c9523027fab881c
Parents: e172a9b
Author: Pavel Yaskevich xe...@apache.org
Authored: Sat Sep 8 21:57:46 2012 +0300
Committer: Pavel Yaskevich xe...@apache.org
Committed: Tue Sep 11 14:11:36 2012 +0300

--
 CHANGES.txt  |1 +
 src/java/org/apache/cassandra/cli/CliClient.java |   38 +++-
 2 files changed, 27 insertions(+), 12 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/98708d81/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 246bc49..b6fe049 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,6 +1,7 @@
 1.1.6
  * Improve IAuthority interface by introducing fine-grained
access permissions and grant/revoke commands (CASSANDRA-4490)
+ * fix assumption error in CLI when updating/describing keyspace 
(CASSANDRA-4322)
 
 
 1.1.5

http://git-wip-us.apache.org/repos/asf/cassandra/blob/98708d81/src/java/org/apache/cassandra/cli/CliClient.java
--
diff --git a/src/java/org/apache/cassandra/cli/CliClient.java 
b/src/java/org/apache/cassandra/cli/CliClient.java
index 8296253..d0fb543 100644
--- a/src/java/org/apache/cassandra/cli/CliClient.java
+++ b/src/java/org/apache/cassandra/cli/CliClient.java
@@ -1068,7 +1068,7 @@ public class CliClient
 sessionState.out.println(mySchemaVersion);
 validateSchemaIsSettled(mySchemaVersion);
 keyspacesMap.remove(keyspaceName);
-getKSMetaData(keySpace);
+getKSMetaData(keyspaceName);
 }
 catch (InvalidRequestException e)
 {
@@ -1879,15 +1879,19 @@ public class CliClient
  * Returns true if this.keySpace is set, false otherwise
  * @return boolean
  */
-private boolean hasKeySpace()
+private boolean hasKeySpace(boolean printError)
 {
-   if (keySpace == null)
-{
-sessionState.out.println(Not authenticated to a working 
keyspace.);
-return false;
-}
+boolean hasKeyspace = keySpace != null;
 
-return true;
+if (!hasKeyspace  printError)
+sessionState.err.println(Not authorized to a working keyspace.);
+
+return hasKeyspace;
+}
+
+private boolean hasKeySpace()
+{
+return hasKeySpace(true);
 }
 
 public String getKeySpace()
@@ -2142,9 +2146,19 @@ public class CliClient
 return;
 
 int argCount = statement.getChildCount();
-
-keyspacesMap.remove(keySpace);
-KsDef currentKeySpace = getKSMetaData(keySpace);
+
+if (keySpace == null  argCount == 0)
+{
+sessionState.out.println(Authenticate to a Keyspace, before using 
`describe` or `describe column_family`);
+return;
+}
+
+KsDef currentKeySpace = null;
+if (keySpace != null)
+{
+keyspacesMap.remove(keySpace);
+currentKeySpace = getKSMetaData(keySpace);
+}
 
 if (argCount  1) // in case somebody changes Cli grammar
 throw new RuntimeException(`describe` command take maximum one 
argument. See `help describe;`);
@@ -2996,7 +3010,7 @@ public class CliClient
 
 public void replayAssumptions(String keyspace)
 {
-if (!CliMain.isConnected() || !hasKeySpace())
+if (!CliMain.isConnected() || !hasKeySpace(false))
 return;
 
 MapString, MapString, String cfAssumes = 
assumptions.get(keyspace);



[1/2] git commit: merge from 1.1

2012-09-11 Thread xedin
Updated Branches:
  refs/heads/trunk c6ddbea43 - b85c93e0a


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/b85c93e0
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/b85c93e0
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/b85c93e0

Branch: refs/heads/trunk
Commit: b85c93e0a89ace02b4a73d49a75976d7fbce6115
Parents: c6ddbea 98708d8
Author: Pavel Yaskevich xe...@apache.org
Authored: Tue Sep 11 14:16:22 2012 +0300
Committer: Pavel Yaskevich xe...@apache.org
Committed: Tue Sep 11 14:16:22 2012 +0300

--
 CHANGES.txt  |9 +---
 src/java/org/apache/cassandra/cli/CliClient.java |   36 +++-
 2 files changed, 28 insertions(+), 17 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/b85c93e0/CHANGES.txt
--
diff --cc CHANGES.txt
index 98929cf,b6fe049..00971a5
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,72 -1,7 +1,69 @@@
 +1.2-beta1
 + * add atomic_batch_mutate (CASSANDRA-4542, -4635)
 + * increase default max_hint_window_in_ms to 3h (CASSANDRA-4632)
 + * include message initiation time to replicas so they can more
 +   accurately drop timed-out requests (CASSANDRA-2858)
 + * fix clientutil.jar dependencies (CASSANDRA-4566)
 + * optimize WriteResponse (CASSANDRA-4548)
 + * new metrics (CASSANDRA-4009)
 + * redesign KEYS indexes to avoid read-before-write (CASSANDRA-2897)
 + * debug tracing (CASSANDRA-1123)
 + * parallelize row cache loading (CASSANDRA-4282)
 + * Make compaction, flush JBOD-aware (CASSANDRA-4292)
 + * run local range scans on the read stage (CASSANDRA-3687)
 + * clean up ioexceptions (CASSANDRA-2116)
 + * add disk_failure_policy (CASSANDRA-2118)
 + * Introduce new json format with row level deletion (CASSANDRA-4054)
 + * remove redundant name column from schema_keyspaces (CASSANDRA-4433)
 + * improve nodetool ring handling of multi-dc clusters (CASSANDRA-3047)
 + * update NTS calculateNaturalEndpoints to be O(N log N) (CASSANDRA-3881)
 + * add UseCondCardMark XX jvm settings on jdk 1.7 (CASSANDRA-4366)
 + * split up rpc timeout by operation type (CASSANDRA-2819)
 + * rewrite key cache save/load to use only sequential i/o (CASSANDRA-3762)
 + * update MS protocol with a version handshake + broadcast address id
 +   (CASSANDRA-4311)
 + * multithreaded hint replay (CASSANDRA-4189)
 + * add inter-node message compression (CASSANDRA-3127)
 + * remove COPP (CASSANDRA-2479)
 + * Track tombstone expiration and compact when tombstone content is
 +   higher than a configurable threshold, default 20% (CASSANDRA-3442, 4234)
 + * 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, 
4289)
 + * 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 unlimited by default 
(CASSANDRA-4277)
 + * Avoids double serialization of CF id in RowMutation messages
 +   (CASSANDRA-4293)
 + * stream compressed sstables directly with java nio (CASSANDRA-4297)
 + * Support multiple ranges in SliceQueryFilter (CASSANDRA-3885)
 + * Add column metadata to system column families (CASSANDRA-4018)
 + * (cql3) Always use composite types by default (CASSANDRA-4329)
 + * (cql3) Add support for set, map and list (CASSANDRA-3647)
 + * Validate date type correctly (CASSANDRA-4441)
 + * (cql3) Allow definitions with only a PK (CASSANDRA-4361)
 + * (cql3) Add support for row key composites (CASSANDRA-4179)
 + * improve DynamicEndpointSnitch by using reservoir sampling (CASSANDRA-4038)
 + * (cql3) Add support for 2ndary indexes (CASSANDRA-3680)
 + * (cql3) fix defining more than one PK to be invalid (CASSANDRA-4477)
 + * remove schema agreement checking from all external APIs (Thrift, CQL and 
CQL3) (CASSANDRA-4487)
 + * add Murmur3Partitioner and make it default for new installations 
(CASSANDRA-3772)
 + * (cql3) update pseudo-map syntax to use map syntax (CASSANDRA-4497)
 + * Finer grained exceptions hierarchy and provides error code with exceptions 
(CASSANDRA-3979)
 + * Adds events push to binary protocol (CASSANDRA-4480)
 + * Rewrite nodetool help (CASSANDRA-2293)
 + * Make CQL3 the default for CQL (CASSANDRA-4640)
 + * update stress tool to be able to use CQL3 (CASSANDRA-4406)
 + * Accept all thrift update on CQL3 cf but don't expose their metadata 
(CASSANDRA-4377)
 +
 +
  1.1.6
-   * (cql3) fix potential NPE with both equal and unequal 

[jira] [Assigned] (CASSANDRA-4622) corrupted saved caches

2012-09-11 Thread Brandon Williams (JIRA)

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

Brandon Williams reassigned CASSANDRA-4622:
---

Assignee: Vijay

 corrupted saved caches
 --

 Key: CASSANDRA-4622
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4622
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Reporter: Brandon Williams
Assignee: Vijay
 Fix For: 1.2.0


 I'm seeing this fairly frequently on trunk:
 {noformat}
  INFO 05:15:23,805 reading saved cache 
 /var/lib/cassandra/saved_caches/system-schema_columnfamilies-KeyCache-b.db
  WARN 05:15:23,808 error reading saved cache 
 /var/lib/cassandra/saved_caches/system-schema_columnfamilies-KeyCache-b.db
 java.lang.NullPointerException
 at 
 org.apache.cassandra.cache.AutoSavingCache.loadSaved(AutoSavingCache.java:151)
 at 
 org.apache.cassandra.db.ColumnFamilyStore.init(ColumnFamilyStore.java:247)
 at 
 org.apache.cassandra.db.ColumnFamilyStore.createColumnFamilyStore(ColumnFamilyStore.java:362)
 at 
 org.apache.cassandra.db.ColumnFamilyStore.createColumnFamilyStore(ColumnFamilyStore.java:334)
 at org.apache.cassandra.db.Table.initCf(Table.java:333)
 at org.apache.cassandra.db.Table.init(Table.java:271)
 at org.apache.cassandra.db.Table.open(Table.java:101)
 at org.apache.cassandra.db.Table.open(Table.java:79)
 at 
 org.apache.cassandra.db.SystemTable.checkHealth(SystemTable.java:285)
 at 
 org.apache.cassandra.service.CassandraDaemon.setup(CassandraDaemon.java:201)
 at 
 org.apache.cassandra.service.CassandraDaemon.activate(CassandraDaemon.java:349)
 at 
 org.apache.cassandra.service.CassandraDaemon.main(CassandraDaemon.java:392)
  INFO 05:15:23,858 Opening 
 /var/lib/cassandra/data/system/schema_keyspaces/system-schema_keyspaces-ia-5 
 (171 bytes)
  INFO 05:15:23,870 Opening 
 /var/lib/cassandra/data/system/peers/system-peers-ia-1 (7983 bytes)
  INFO 05:15:23,870 Opening 
 /var/lib/cassandra/data/system/peers/system-peers-ia-2 (7876 bytes)
  INFO 05:15:23,884 Opening 
 /var/lib/cassandra/data/system/local/system-local-ia-35 (4910 bytes)
  INFO 05:15:23,885 Opening 
 /var/lib/cassandra/data/system/local/system-local-ia-33 (75 bytes)
  INFO 05:15:23,885 Opening 
 /var/lib/cassandra/data/system/local/system-local-ia-34 (4676 bytes)
  INFO 05:15:23,912 reading saved cache 
 /var/lib/cassandra/saved_caches/system-local-KeyCache-b.db
  WARN 05:15:23,912 error reading saved cache 
 /var/lib/cassandra/saved_caches/system-local-KeyCache-b.db
 java.lang.NullPointerException
 at 
 org.apache.cassandra.cache.AutoSavingCache.loadSaved(AutoSavingCache.java:151)
 at 
 org.apache.cassandra.db.ColumnFamilyStore.init(ColumnFamilyStore.java:247)
 at 
 org.apache.cassandra.db.ColumnFamilyStore.createColumnFamilyStore(ColumnFamilyStore.java:362)
 at 
 org.apache.cassandra.db.ColumnFamilyStore.createColumnFamilyStore(ColumnFamilyStore.java:334)
 at org.apache.cassandra.db.Table.initCf(Table.java:333)
 at org.apache.cassandra.db.Table.init(Table.java:271)
 at org.apache.cassandra.db.Table.open(Table.java:101)
 at org.apache.cassandra.db.Table.open(Table.java:79)
 at 
 org.apache.cassandra.db.SystemTable.checkHealth(SystemTable.java:285)
 at 
 org.apache.cassandra.service.CassandraDaemon.setup(CassandraDaemon.java:201)
 at 
 org.apache.cassandra.service.CassandraDaemon.activate(CassandraDaemon.java:349)
 at 
 org.apache.cassandra.service.CassandraDaemon.main(CassandraDaemon.java:392)
 {noformat}

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


[jira] [Commented] (CASSANDRA-4417) invalid counter shard detected

2012-09-11 Thread Sylvain Lebresne (JIRA)

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

Sylvain Lebresne commented on CASSANDRA-4417:
-

That's a very good point. Counters do rely on the fact that nodes do not lose 
the increments they are leader for (or that they don't reuse the same nodeId 
if they do), but unless the commit log uses batch mode, this can happen. And 
that will lead to exactly the exception seen here, so I'd say there's a very 
good chance this is the problem.

I'll note that if that is indeed a problem, it's very possible that the error 
logged happens only much later (after the unclean shutdown) and on some other 
node than the one having died. So not being able to correlate the error to an 
unclean shutdown doesn't really indicate that it's not related.

The consequence of this happening is that the increments that have been lost 
with un-synced commit log are lost. Meaning that with the default 
configuration, one could lose up to 10 seconds of the increments (for which the 
dying node is leader). However, I think it is also possible to have results 
from read to miss slightly more than that, though that last part should fix 
itself if the counter is incremented again.

As for the error message logged, it's possible that lots of them are logged 
even though only a small number of counters are affected since it's print 
during column reconciliation and thus could be logged many time for the same 
counter.

A simple workaround is to use batch commit log, but that has a potentially 
important performance impact.

Another solution I've though of would be to try to detect unclean shutdown (by 
marking something during clean shutdown and checking for that at startup) and 
if we detect one, to renew the nodeId. The problem with that is that this 
potentially mean renewing the nodeId pretty often. And each time we do that, 
the internal representation of counter grow and I'm really afraid it will be a 
problem in that case. And while we have some mechanism to shrink back counter 
by merging sub-counts when the nodeId is renewed too often, that mechanism 
assumes that the node owning the nodeId has the more up-to-date value for this 
sub-count, which is exactly the problem here. So overall I don't have any good 
idea to fix this. Other ideas?


 invalid counter shard detected 
 ---

 Key: CASSANDRA-4417
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4417
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Affects Versions: 1.1.1
 Environment: Amazon Linux
Reporter: Senthilvel Rangaswamy

 Seeing errors like these:
 2012-07-06_07:00:27.22662 ERROR 07:00:27,226 invalid counter shard detected; 
 (17bfd850-ac52-11e1--6ecd0b5b61e7, 1, 13) and 
 (17bfd850-ac52-11e1--6ecd0b5b61e7, 1, 1) differ only in count; will pick 
 highest to self-heal; this indicates a bug or corruption generated a bad 
 counter shard
 What does it mean ?

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


[jira] [Commented] (CASSANDRA-3515) track tombstones skipped on read path

2012-09-11 Thread Pavel Yaskevich (JIRA)

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

Pavel Yaskevich commented on CASSANDRA-3515:


+1

 track tombstones skipped on read path
 -

 Key: CASSANDRA-3515
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3515
 Project: Cassandra
  Issue Type: Improvement
Reporter: Jackson Chung
Assignee: Jonathan Ellis
Priority: Minor
 Fix For: 1.2.0

 Attachments: 3515.txt


 i think summary says it all, but see further:
 {noformat}
  driftx x: I guess we could add a histogram of how many tombstones we 
 filtered on a read
  driftx x: @action: go for it in that context
  action jackson: thx!
  mdennis x: +1 on histogram of filtered tombstones
  driftx x: definitely useful for diagnosing the queue-like case
  driftx x: the histogram I mea
 {noformat}

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


[jira] [Commented] (CASSANDRA-4639) Incorrect counter values

2012-09-11 Thread Omid Aladini (JIRA)

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

Omid Aladini commented on CASSANDRA-4639:
-

This looks the same as CASSANDRA-4417 which is currently in progress.

 Incorrect counter values
 

 Key: CASSANDRA-4639
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4639
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Affects Versions: 1.1.2
 Environment: We've got a production 21 node cluster with 3 virtual 
 data centers. Keyspace that contains counter column families has a 
 replication 3 on DC1 and 1 on DC3. DC1 is using SSD drives, DC3 spinning hard 
 drives. We are using Ubuntu Server as an OS. Machines have 24GB of RAM. 
Reporter: Bartłomiej Romański
Priority: Critical

 Since yesterday almost all counters are incorrect. Usually about 4-5 times 
 higher than expected. In logs we've got this message:
 ERROR [MutationStage:15] 2012-09-10 13:47:13,280 CounterContext.java (line 
 381) invalid counter shard detected; (6de8e940-dd23-11e1--5233df6faaff, 
 7, 242) and (6de8e940-dd23-11e1--5233df6faaff, 7, 392) differ only in 
 count; will pick highest to self-heal; this indicates a bug or corruption 
 generated a bad counter shard
 every couple of seconds.
 This cluster was running without any serious problems for at least 2 months.
 Any ideas?

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


[jira] [Created] (CASSANDRA-4644) Compaction error with Cassandra 1.1.4 and LCS

2012-09-11 Thread Rudolf VanderLeeden (JIRA)
Rudolf VanderLeeden created CASSANDRA-4644:
--

 Summary: Compaction error with Cassandra 1.1.4 and LCS 
 Key: CASSANDRA-4644
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4644
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Affects Versions: 1.1.4
 Environment: Cassandra 1.1.4, Ubuntu Lucid (2.6.32-346), Amazon EC2 
m1.xlarge
Reporter: Rudolf VanderLeeden


In our 1.1.4 testcluster of 3 nodes with RF=3, KS=1, and CF=5, we are getting 
an asserting error when running 'nodetool compact highscores leaderboard'. This 
stops compactions on the 'leaderboard' CF summing up to 11835 pending 
compactions. This error is seen only one one node. 

The SSTables have originally been created on a 1.1.2 cluster with STCS and then 
copied to the testcluster also with 1.1.2. Repair, cleanup, compact were OK 
with STCS. Next, we changed to LCS and did again repair, cleanup, compact with 
success. 

Then we started to use this LCS-based testcluster intensively and created lots 
of data and also large keys with millions of columns. 

The assertion error in system.log :
 INFO [CompactionExecutor:8] 2012-09-11 14:20:45,043 CompactionController.java 
(line 172) Compacting large row 
highscores/leaderboard:4c422d64626331353166372d363464612d343235342d396130322d6535616365343337373532332d676c6f62616c2d30
 (72589650 bytes) incrementally
ERROR [CompactionExecutor:8] 2012-09-11 14:20:50,336 
AbstractCassandraDaemon.java (line 135) Exception in thread 
Thread[CompactionExecutor:8,1,RMI Runtime]
java.lang.AssertionError
at 
org.apache.cassandra.db.compaction.LeveledManifest.promote(LeveledManifest.java:214)
at 
org.apache.cassandra.db.compaction.LeveledCompactionStrategy.handleNotification(LeveledCompactionStrategy.java:158)
at 
org.apache.cassandra.db.DataTracker.notifySSTablesChanged(DataTracker.java:531)
at 
org.apache.cassandra.db.DataTracker.replaceCompactedSSTables(DataTracker.java:254)
at 
org.apache.cassandra.db.ColumnFamilyStore.replaceCompactedSSTables(ColumnFamilyStore.java:992)
at 
org.apache.cassandra.db.compaction.CompactionTask.execute(CompactionTask.java:200)
at 
org.apache.cassandra.db.compaction.LeveledCompactionTask.execute(LeveledCompactionTask.java:50)
at 
org.apache.cassandra.db.compaction.CompactionManager$6.runMayThrow(CompactionManager.java:288)
at 
org.apache.cassandra.utils.WrappedRunnable.run(WrappedRunnable.java:30)
at 
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)



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


[jira] [Commented] (CASSANDRA-4611) Add AlterKeyspace statement

2012-09-11 Thread Pavel Yaskevich (JIRA)

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

Pavel Yaskevich commented on CASSANDRA-4611:


Sylvain, can you please rebase?

 Add AlterKeyspace statement
 ---

 Key: CASSANDRA-4611
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4611
 Project: Cassandra
  Issue Type: New Feature
  Components: API
Affects Versions: 1.1.0
Reporter: Sylvain Lebresne
Assignee: Sylvain Lebresne
Priority: Minor
  Labels: cql3
 Fix For: 1.2.0 beta 1

 Attachments: 4611.txt


 Somehow we never added an ALTER KEYSPACE statement. We should.

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


[jira] [Created] (CASSANDRA-4645) (CQL3) Re-allow order by on non-selected columns

2012-09-11 Thread Sylvain Lebresne (JIRA)
Sylvain Lebresne created CASSANDRA-4645:
---

 Summary: (CQL3) Re-allow order by on non-selected columns
 Key: CASSANDRA-4645
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4645
 Project: Cassandra
  Issue Type: Bug
Affects Versions: 1.2.0 beta 1
Reporter: Sylvain Lebresne
Priority: Minor
 Fix For: 1.2.0


CASSANDRA-4612 added a limitation to ORDER BY query in that it requires the 
columns part of the ORDER BY to be in the select clause, while this wasn't the 
case previously.

The reason for that is that for ORDER BY with IN queries, the sorting is done 
post-query, and by the time we do the ordering, we've already cut down the 
result set to the select clause, so if the column are not in the select clause 
we cannot sort on them.

We should remove that that limitation however as this is a regression from what 
we had before. As far as 1.2.0 is concerned, at the very least we should lift 
the limitation for EQ queries since we don't do any post-query sorting in that 
case and that was working correctly pre-CASSANDRA-4612. But we should also 
remove that limitation for IN query, even if it's in a second time.

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


git commit: Remove merge markers in changelog

2012-09-11 Thread slebresne
Updated Branches:
  refs/heads/trunk b85c93e0a - 208d77b7a


Remove merge markers in changelog


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

Branch: refs/heads/trunk
Commit: 208d77b7a3ed06980f0077bdd3ffc91572a24c1e
Parents: b85c93e
Author: Sylvain Lebresne sylv...@datastax.com
Authored: Tue Sep 11 17:22:24 2012 +0200
Committer: Sylvain Lebresne sylv...@datastax.com
Committed: Tue Sep 11 17:22:24 2012 +0200

--
 CHANGES.txt |3 ---
 1 files changed, 0 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/208d77b7/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 00971a5..c06554f 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -100,10 +100,7 @@ Merged from 1.0:
  * (Hadoop) fix setting key length for old-style mapred api (CASSANDRA-4534)
  * (Hadoop) fix iterating through a resultset consisting entirely
of tombstoned rows (CASSANDRA-4466)
- HEAD
  * Fix multiple values for CurrentLocal NodeID (CASSANDRA-4626)
-===
- cassandra-1.1
 
 
  * munmap commitlog segments before rename (CASSANDRA-4337)



[jira] [Updated] (CASSANDRA-4611) Add AlterKeyspace statement

2012-09-11 Thread Sylvain Lebresne (JIRA)

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

Sylvain Lebresne updated CASSANDRA-4611:


Attachment: (was: 4611.txt)

 Add AlterKeyspace statement
 ---

 Key: CASSANDRA-4611
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4611
 Project: Cassandra
  Issue Type: New Feature
  Components: API
Affects Versions: 1.1.0
Reporter: Sylvain Lebresne
Assignee: Sylvain Lebresne
Priority: Minor
  Labels: cql3
 Fix For: 1.2.0 beta 1

 Attachments: 4611.txt


 Somehow we never added an ALTER KEYSPACE statement. We should.

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


[jira] [Updated] (CASSANDRA-4611) Add AlterKeyspace statement

2012-09-11 Thread Sylvain Lebresne (JIRA)

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

Sylvain Lebresne updated CASSANDRA-4611:


Attachment: 4611.txt

Damn, already. Ok, rebased patch attached.

 Add AlterKeyspace statement
 ---

 Key: CASSANDRA-4611
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4611
 Project: Cassandra
  Issue Type: New Feature
  Components: API
Affects Versions: 1.1.0
Reporter: Sylvain Lebresne
Assignee: Sylvain Lebresne
Priority: Minor
  Labels: cql3
 Fix For: 1.2.0 beta 1

 Attachments: 4611.txt


 Somehow we never added an ALTER KEYSPACE statement. We should.

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


[jira] [Commented] (CASSANDRA-4642) Add offline scrub to debian package

2012-09-11 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis commented on CASSANDRA-4642:
---

+1

 Add offline scrub to debian package
 ---

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

 Attachments: 4642.txt


 When we added the offline scrub in CASSANDRA-4321, we forgot to add the 
 launch script to the debian package. We should.

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


[jira] [Commented] (CASSANDRA-4644) Compaction error with Cassandra 1.1.4 and LCS

2012-09-11 Thread Omid Aladini (JIRA)

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

Omid Aladini commented on CASSANDRA-4644:
-

{quote}
The SSTables have originally been created on a 1.1.2 cluster with STCS and then 
copied to the testcluster also with 1.1.2. Repair, cleanup, compact were OK 
with STCS. _Next, we changed to LCS_ and did again repair, cleanup, compact 
with success.
{quote}

Just to double-check, as you mentioned in the mailing list, you upgraded to 
1.1.4 *before* changing to LCS, right?

 Compaction error with Cassandra 1.1.4 and LCS 
 --

 Key: CASSANDRA-4644
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4644
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Affects Versions: 1.1.4
 Environment: Cassandra 1.1.4, Ubuntu Lucid (2.6.32-346), Amazon EC2 
 m1.xlarge
Reporter: Rudolf VanderLeeden

 In our 1.1.4 testcluster of 3 nodes with RF=3, KS=1, and CF=5, we are getting 
 an asserting error when running 'nodetool compact highscores leaderboard'. 
 This stops compactions on the 'leaderboard' CF summing up to 11835 pending 
 compactions. This error is seen only one one node. 
 The SSTables have originally been created on a 1.1.2 cluster with STCS and 
 then copied to the testcluster also with 1.1.2. Repair, cleanup, compact were 
 OK with STCS. Next, we changed to LCS and did again repair, cleanup, compact 
 with success. 
 Then we started to use this LCS-based testcluster intensively and created 
 lots of data and also large keys with millions of columns. 
 The assertion error in system.log :
  INFO [CompactionExecutor:8] 2012-09-11 14:20:45,043 
 CompactionController.java (line 172) Compacting large row 
 highscores/leaderboard:4c422d64626331353166372d363464612d343235342d396130322d6535616365343337373532332d676c6f62616c2d30
  (72589650 bytes) incrementally
 ERROR [CompactionExecutor:8] 2012-09-11 14:20:50,336 
 AbstractCassandraDaemon.java (line 135) Exception in thread 
 Thread[CompactionExecutor:8,1,RMI Runtime]
 java.lang.AssertionError
 at 
 org.apache.cassandra.db.compaction.LeveledManifest.promote(LeveledManifest.java:214)
 at 
 org.apache.cassandra.db.compaction.LeveledCompactionStrategy.handleNotification(LeveledCompactionStrategy.java:158)
 at 
 org.apache.cassandra.db.DataTracker.notifySSTablesChanged(DataTracker.java:531)
 at 
 org.apache.cassandra.db.DataTracker.replaceCompactedSSTables(DataTracker.java:254)
 at 
 org.apache.cassandra.db.ColumnFamilyStore.replaceCompactedSSTables(ColumnFamilyStore.java:992)
 at 
 org.apache.cassandra.db.compaction.CompactionTask.execute(CompactionTask.java:200)
 at 
 org.apache.cassandra.db.compaction.LeveledCompactionTask.execute(LeveledCompactionTask.java:50)
 at 
 org.apache.cassandra.db.compaction.CompactionManager$6.runMayThrow(CompactionManager.java:288)
 at 
 org.apache.cassandra.utils.WrappedRunnable.run(WrappedRunnable.java:30)
 at 
 java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
 at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
 at java.util.concurrent.FutureTask.run(FutureTask.java:138)
 at 
 java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
 at 
 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
 at java.lang.Thread.run(Thread.java:662)

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


[jira] [Comment Edited] (CASSANDRA-4644) Compaction error with Cassandra 1.1.4 and LCS

2012-09-11 Thread Omid Aladini (JIRA)

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

Omid Aladini edited comment on CASSANDRA-4644 at 9/12/12 2:26 AM:
--

{quote}
The SSTables have originally been created on a 1.1.2 cluster with STCS and then 
copied to the testcluster also with 1.1.2. Repair, cleanup, compact were OK 
with STCS. _Next, we changed to LCS_ and did again repair, cleanup, compact 
with success.
{quote}

Just to double-check, as you mentioned in the mailing list, you upgraded to 
1.1.4 before changing to LCS, right?

  was (Author: omid):
{quote}
The SSTables have originally been created on a 1.1.2 cluster with STCS and then 
copied to the testcluster also with 1.1.2. Repair, cleanup, compact were OK 
with STCS. _Next, we changed to LCS_ and did again repair, cleanup, compact 
with success.
{quote}

Just to double-check, as you mentioned in the mailing list, you upgraded to 
1.1.4 *before* changing to LCS, right?
  
 Compaction error with Cassandra 1.1.4 and LCS 
 --

 Key: CASSANDRA-4644
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4644
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Affects Versions: 1.1.4
 Environment: Cassandra 1.1.4, Ubuntu Lucid (2.6.32-346), Amazon EC2 
 m1.xlarge
Reporter: Rudolf VanderLeeden

 In our 1.1.4 testcluster of 3 nodes with RF=3, KS=1, and CF=5, we are getting 
 an asserting error when running 'nodetool compact highscores leaderboard'. 
 This stops compactions on the 'leaderboard' CF summing up to 11835 pending 
 compactions. This error is seen only one one node. 
 The SSTables have originally been created on a 1.1.2 cluster with STCS and 
 then copied to the testcluster also with 1.1.2. Repair, cleanup, compact were 
 OK with STCS. Next, we changed to LCS and did again repair, cleanup, compact 
 with success. 
 Then we started to use this LCS-based testcluster intensively and created 
 lots of data and also large keys with millions of columns. 
 The assertion error in system.log :
  INFO [CompactionExecutor:8] 2012-09-11 14:20:45,043 
 CompactionController.java (line 172) Compacting large row 
 highscores/leaderboard:4c422d64626331353166372d363464612d343235342d396130322d6535616365343337373532332d676c6f62616c2d30
  (72589650 bytes) incrementally
 ERROR [CompactionExecutor:8] 2012-09-11 14:20:50,336 
 AbstractCassandraDaemon.java (line 135) Exception in thread 
 Thread[CompactionExecutor:8,1,RMI Runtime]
 java.lang.AssertionError
 at 
 org.apache.cassandra.db.compaction.LeveledManifest.promote(LeveledManifest.java:214)
 at 
 org.apache.cassandra.db.compaction.LeveledCompactionStrategy.handleNotification(LeveledCompactionStrategy.java:158)
 at 
 org.apache.cassandra.db.DataTracker.notifySSTablesChanged(DataTracker.java:531)
 at 
 org.apache.cassandra.db.DataTracker.replaceCompactedSSTables(DataTracker.java:254)
 at 
 org.apache.cassandra.db.ColumnFamilyStore.replaceCompactedSSTables(ColumnFamilyStore.java:992)
 at 
 org.apache.cassandra.db.compaction.CompactionTask.execute(CompactionTask.java:200)
 at 
 org.apache.cassandra.db.compaction.LeveledCompactionTask.execute(LeveledCompactionTask.java:50)
 at 
 org.apache.cassandra.db.compaction.CompactionManager$6.runMayThrow(CompactionManager.java:288)
 at 
 org.apache.cassandra.utils.WrappedRunnable.run(WrappedRunnable.java:30)
 at 
 java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
 at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
 at java.util.concurrent.FutureTask.run(FutureTask.java:138)
 at 
 java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
 at 
 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
 at java.lang.Thread.run(Thread.java:662)

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


[jira] [Commented] (CASSANDRA-4621) AssertionError in StorageProxy.getRestrictedRange

2012-09-11 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis commented on CASSANDRA-4621:
---

LGTM.

 AssertionError in StorageProxy.getRestrictedRange
 -

 Key: CASSANDRA-4621
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4621
 Project: Cassandra
  Issue Type: Bug
Affects Versions: 1.2.0 beta 1
 Environment: archlinux, openjdk7
Reporter: Pierre-Yves Ritschard
Assignee: Sylvain Lebresne
 Fix For: 1.2.0 beta 1

 Attachments: 4621.txt, 4621.txt


 On a freshly built cassandra from trunk, I can create a column family with a 
 composite row key using the syntax:
 for instance a standard eventlog CF:
  CREATE TABLE events (
facility text,
prio int,
message text,
PRIMARY KEY ( (facility, prio) )
  );
 A simple query will then generate exceptions:
 SELECT * FROM events; will yield:
 ERROR 15:33:40,383 Exception in thread Thread[Thrift:1,5,main]
 java.lang.AssertionError: [min(0),max(-8021625467324731134)]
   at org.apache.cassandra.dht.Bounds.init(Bounds.java:41)
   at org.apache.cassandra.dht.Bounds.split(Bounds.java:59)
   at 
 org.apache.cassandra.service.StorageProxy.getRestrictedRanges(StorageProxy.java:1073)
   at 
 org.apache.cassandra.service.StorageProxy.getRangeSlice(StorageProxy.java:879)
   at 
 org.apache.cassandra.cql3.statements.SelectStatement.multiRangeSlice(SelectStatement.java:209)
   at 
 org.apache.cassandra.cql3.statements.SelectStatement.executeInternal(SelectStatement.java:128)
   at 
 org.apache.cassandra.cql3.statements.SelectStatement.execute(SelectStatement.java:118)
   at 
 org.apache.cassandra.cql3.statements.SelectStatement.execute(SelectStatement.java:62)
   at 
 org.apache.cassandra.cql3.QueryProcessor.processStatement(QueryProcessor.java:107)
   at 
 org.apache.cassandra.cql3.QueryProcessor.process(QueryProcessor.java:115)
   at 
 org.apache.cassandra.thrift.CassandraServer.execute_cql_query(CassandraServer.java:1521)
   at 
 org.apache.cassandra.thrift.Cassandra$Processor$execute_cql_query.getResult(Cassandra.java:3618)
   at 
 org.apache.cassandra.thrift.Cassandra$Processor$execute_cql_query.getResult(Cassandra.java:3606)
   at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:32)
   at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:34)
   at 
 org.apache.cassandra.thrift.CustomTThreadPoolServer$WorkerProcess.run(CustomTThreadPoolServer.java:184)
   at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)

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


[jira] [Resolved] (CASSANDRA-4639) Incorrect counter values

2012-09-11 Thread Sylvain Lebresne (JIRA)

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

Sylvain Lebresne resolved CASSANDRA-4639.
-

Resolution: Duplicate

Actually, while the logged error is likely due to CASSANDRA-4417, it's quite 
possible that the 'counters are about 4-5 times higher than they should be' is 
due to CASSANDRA-4436. In any case, it's tracked elsewhere and I would suggest 
an upgrade (to avoid CASSANDRA-4436).

 Incorrect counter values
 

 Key: CASSANDRA-4639
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4639
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Affects Versions: 1.1.2
 Environment: We've got a production 21 node cluster with 3 virtual 
 data centers. Keyspace that contains counter column families has a 
 replication 3 on DC1 and 1 on DC3. DC1 is using SSD drives, DC3 spinning hard 
 drives. We are using Ubuntu Server as an OS. Machines have 24GB of RAM. 
Reporter: Bartłomiej Romański
Priority: Critical

 Since yesterday almost all counters are incorrect. Usually about 4-5 times 
 higher than expected. In logs we've got this message:
 ERROR [MutationStage:15] 2012-09-10 13:47:13,280 CounterContext.java (line 
 381) invalid counter shard detected; (6de8e940-dd23-11e1--5233df6faaff, 
 7, 242) and (6de8e940-dd23-11e1--5233df6faaff, 7, 392) differ only in 
 count; will pick highest to self-heal; this indicates a bug or corruption 
 generated a bad counter shard
 every couple of seconds.
 This cluster was running without any serious problems for at least 2 months.
 Any ideas?

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


[jira] [Commented] (CASSANDRA-4417) invalid counter shard detected

2012-09-11 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis commented on CASSANDRA-4417:
---

Maybe it's time to make commitlog mode (off/periodic/batch) per-CF instead of 
mix of global and per-KS.  Then we could automatically force counter CF to 
batch.

 invalid counter shard detected 
 ---

 Key: CASSANDRA-4417
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4417
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Affects Versions: 1.1.1
 Environment: Amazon Linux
Reporter: Senthilvel Rangaswamy

 Seeing errors like these:
 2012-07-06_07:00:27.22662 ERROR 07:00:27,226 invalid counter shard detected; 
 (17bfd850-ac52-11e1--6ecd0b5b61e7, 1, 13) and 
 (17bfd850-ac52-11e1--6ecd0b5b61e7, 1, 1) differ only in count; will pick 
 highest to self-heal; this indicates a bug or corruption generated a bad 
 counter shard
 What does it mean ?

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


[jira] [Created] (CASSANDRA-4646) Cassandra 1.1.3 crashes on Solaris 10 SIGBUS (0xa) at pc=0xffffffff7e174780, pid=18537, tid=276

2012-09-11 Thread basanth gowda (JIRA)
basanth gowda created CASSANDRA-4646:


 Summary: Cassandra 1.1.3 crashes on Solaris 10 SIGBUS (0xa) at 
pc=0x7e174780, pid=18537, tid=276
 Key: CASSANDRA-4646
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4646
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Affects Versions: 1.1.3
 Environment: A ring of 2 Cassandra nodes on Solaris 10. It works 
perfectly when only 1 node is running, if the ring has both the nodes started, 
on connecting, one of the node crashes.
Reporter: basanth gowda


#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGBUS (0xa) at pc=0x7e174780, pid=18537, tid=276
#
# JRE version: 6.0_27-b07
# Java VM: Java HotSpot(TM) 64-Bit Server VM (20.2-b06 mixed mode solaris-sparc 
compressed oops)
# Problematic frame:
# V  [libjvm.so+0x974780]  Unsafe_GetLong+0x120
#
# If you would like to submit a bug report, please visit:
#   http://java.sun.com/webapps/bugreport/crash.jsp
#

---  T H R E A D  ---

Current thread (0x00010450f000):  JavaThread Thrift:3 daemon 
[_thread_in_vm, id=276, stack(0x6600,0x6610)]

siginfo:si_signo=SIGBUS: si_errno=0, si_code=1 (BUS_ADRALN), 
si_addr=0xfffe719cc082

Registers:
 G1=0x7e484788 G2=0x7e484790 G3=0x0007a788 
G4=0x0007a790
 G5=0x0007a400 G6=0xfffe6000e000 G7=0x74d0c200 
Y=0x
 O0=0x O1=0x O2=0x00080350 
O3=0x0008
 O4=0x O5=0x3000 O6=0x660fc9b1 
O7=0xfffe719cc070
 L0=0x000103b8f720 L1=0x7e4847a0 L2=0x 
L3=0x0006
 L4=0x10450f00 L5=0x1ffc L6=0x660ff860 
L7=0x7e48a350
 I0=0x I1=0x00010450f000 I2=0x000104551180 
I3=0x0012
 I4=0x7bd0 I5=0x7e40a000 I6=0x660fca61 
I7=0x77c0e1f4
 PC=0x7e174780 nPC=0x7e174784


Top of Stack: (sp=0x660fd1b0)
0x660fd1b0:   000103b8f720 7e4847a0
0x660fd1c0:    0006
0x660fd1d0:   10450f00 1ffc
0x660fd1e0:   660ff860 7e48a350
0x660fd1f0:    00010450f000
0x660fd200:   000104551180 0012
0x660fd210:   7bd0 7e40a000
0x660fd220:   660fca61 77c0e1f4
0x660fd230:   000104551200 00010450f000
0x660fd240:   000104551248 000104551208
0x660fd250:   77c04f90 0002719cbed8
0x660fd260:   660fd408 
0x660fd270:   600d7c70 660fd518
0x660fd280:   660fd410 77c0af6c
0x660fd290:   660fd410 00010450f000
0x660fd2a0:   05f9 660fd518 

Instructions: (pc=0x7e174780)
0x7e174760:   9e 10 20 00 f4 5d a0 10 10 80 00 05 e0 5d a0 08
0x7e174770:   de 5e a0 00 e0 5d a0 08 f4 5d a0 10 e4 5e a0 00
0x7e174780:   f0 5b c0 1b 02 c4 80 05 aa 10 20 07 7f e0 ca 99
0x7e174790:   90 10 00 1a f4 5d a0 10 f4 74 20 08 f8 5d a0 18 

Register to memory mapping:

G1=0x7e484788: __1cHnmethodG__vtbl_+0x1aa8 in 
/opt/app/t3atl1m5/tibco/tibcojre64/1.6.0_27/lib/sparcv9/server/libjvm.so at 
0x7d80
G2=0x7e484790: __1cHnmethodG__vtbl_+0x1ab0 in 
/opt/app/t3atl1m5/tibco/tibcojre64/1.6.0_27/lib/sparcv9/server/libjvm.so at 
0x7d80
G3=0x0007a788 is an unknown value
G4=0x0007a790 is an unknown value
G5=0x0007a400 is an unknown value
G6=0xfffe6000e000 is an unknown value
G7=0x74d0c200 is an unknown value

O0=0x is an unknown value
O1=0x is an unknown value
O2=0x00080350 is an unknown value
O3=0x0008 is an unknown value
O4=0x is an unknown value
O5=0x3000 is an unknown value
O6=0x660fc9b1 is pointing into the stack for thread: 0x00010450f000
O7=

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


git commit: Add sstablescrub to debian packaging

2012-09-11 Thread slebresne
Updated Branches:
  refs/heads/cassandra-1.1 98708d817 - 9eba7ab3b


Add sstablescrub to debian packaging

patch by slebresne; reviewed by jbellis for CASSANDRA-4642


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

Branch: refs/heads/cassandra-1.1
Commit: 9eba7ab3ba644afa485211b82884901ff09a8c14
Parents: 98708d8
Author: Sylvain Lebresne sylv...@datastax.com
Authored: Tue Sep 11 17:33:28 2012 +0200
Committer: Sylvain Lebresne sylv...@datastax.com
Committed: Tue Sep 11 17:33:28 2012 +0200

--
 CHANGES.txt  |1 +
 debian/cassandra.install |1 +
 2 files changed, 2 insertions(+), 0 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/9eba7ab3/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index b6fe049..7098320 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -2,6 +2,7 @@
  * Improve IAuthority interface by introducing fine-grained
access permissions and grant/revoke commands (CASSANDRA-4490)
  * fix assumption error in CLI when updating/describing keyspace 
(CASSANDRA-4322)
+ * Adds offline sstablescrub to debian packaging (CASSANDRA-4642)
 
 
 1.1.5

http://git-wip-us.apache.org/repos/asf/cassandra/blob/9eba7ab3/bin/sstablescrub
--
diff --git a/bin/sstablescrub b/bin/sstablescrub
old mode 100644
new mode 100755

http://git-wip-us.apache.org/repos/asf/cassandra/blob/9eba7ab3/debian/cassandra.install
--
diff --git a/debian/cassandra.install b/debian/cassandra.install
index 04e8d4f..8e3c20c 100644
--- a/debian/cassandra.install
+++ b/debian/cassandra.install
@@ -12,6 +12,7 @@ bin/sstable2json usr/bin
 bin/sstablekeys usr/bin
 bin/sstableloader usr/bin
 bin/cqlsh usr/bin
+bin/sstablescrub usr/bin
 tools/bin/cassandra-stress usr/bin
 tools/bin/token-generator usr/bin
 lib/*.jar usr/share/cassandra/lib



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

2012-09-11 Thread slebresne
Updated Branches:
  refs/heads/trunk 208d77b7a - 55df844e0


Merge branch 'cassandra-1.1' into trunk


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

Branch: refs/heads/trunk
Commit: 55df844e0793782f23a5f760989a362786058681
Parents: 208d77b 9eba7ab
Author: Sylvain Lebresne sylv...@datastax.com
Authored: Tue Sep 11 17:34:22 2012 +0200
Committer: Sylvain Lebresne sylv...@datastax.com
Committed: Tue Sep 11 17:34:22 2012 +0200

--
 CHANGES.txt  |1 +
 debian/cassandra.install |1 +
 2 files changed, 2 insertions(+), 0 deletions(-)
--


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



[2/2] git commit: Add sstablescrub to debian packaging

2012-09-11 Thread slebresne
Add sstablescrub to debian packaging

patch by slebresne; reviewed by jbellis for CASSANDRA-4642


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

Branch: refs/heads/trunk
Commit: 9eba7ab3ba644afa485211b82884901ff09a8c14
Parents: 98708d8
Author: Sylvain Lebresne sylv...@datastax.com
Authored: Tue Sep 11 17:33:28 2012 +0200
Committer: Sylvain Lebresne sylv...@datastax.com
Committed: Tue Sep 11 17:33:28 2012 +0200

--
 CHANGES.txt  |1 +
 debian/cassandra.install |1 +
 2 files changed, 2 insertions(+), 0 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/9eba7ab3/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index b6fe049..7098320 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -2,6 +2,7 @@
  * Improve IAuthority interface by introducing fine-grained
access permissions and grant/revoke commands (CASSANDRA-4490)
  * fix assumption error in CLI when updating/describing keyspace 
(CASSANDRA-4322)
+ * Adds offline sstablescrub to debian packaging (CASSANDRA-4642)
 
 
 1.1.5

http://git-wip-us.apache.org/repos/asf/cassandra/blob/9eba7ab3/bin/sstablescrub
--
diff --git a/bin/sstablescrub b/bin/sstablescrub
old mode 100644
new mode 100755

http://git-wip-us.apache.org/repos/asf/cassandra/blob/9eba7ab3/debian/cassandra.install
--
diff --git a/debian/cassandra.install b/debian/cassandra.install
index 04e8d4f..8e3c20c 100644
--- a/debian/cassandra.install
+++ b/debian/cassandra.install
@@ -12,6 +12,7 @@ bin/sstable2json usr/bin
 bin/sstablekeys usr/bin
 bin/sstableloader usr/bin
 bin/cqlsh usr/bin
+bin/sstablescrub usr/bin
 tools/bin/cassandra-stress usr/bin
 tools/bin/token-generator usr/bin
 lib/*.jar usr/share/cassandra/lib



[jira] [Resolved] (CASSANDRA-4646) Cassandra 1.1.3 crashes on Solaris 10 SIGBUS (0xa) at pc=0xffffffff7e174780, pid=18537, tid=276

2012-09-11 Thread Brandon Williams (JIRA)

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

Brandon Williams resolved CASSANDRA-4646.
-

Resolution: Invalid

This is a problem with your jvm, not cassandra.  Try upgrading to the latest 
jvm.

 Cassandra 1.1.3 crashes on Solaris 10 SIGBUS (0xa) at pc=0x7e174780, 
 pid=18537, tid=276
 ---

 Key: CASSANDRA-4646
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4646
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Affects Versions: 1.1.3
 Environment: A ring of 2 Cassandra nodes on Solaris 10. It works 
 perfectly when only 1 node is running, if the ring has both the nodes 
 started, on connecting, one of the node crashes.
Reporter: basanth gowda
  Labels: crashes, solaris

 #
 # A fatal error has been detected by the Java Runtime Environment:
 #
 #  SIGBUS (0xa) at pc=0x7e174780, pid=18537, tid=276
 #
 # JRE version: 6.0_27-b07
 # Java VM: Java HotSpot(TM) 64-Bit Server VM (20.2-b06 mixed mode 
 solaris-sparc compressed oops)
 # Problematic frame:
 # V  [libjvm.so+0x974780]  Unsafe_GetLong+0x120
 #
 # If you would like to submit a bug report, please visit:
 #   http://java.sun.com/webapps/bugreport/crash.jsp
 #
 ---  T H R E A D  ---
 Current thread (0x00010450f000):  JavaThread Thrift:3 daemon 
 [_thread_in_vm, id=276, stack(0x6600,0x6610)]
 siginfo:si_signo=SIGBUS: si_errno=0, si_code=1 (BUS_ADRALN), 
 si_addr=0xfffe719cc082
 Registers:
  G1=0x7e484788 G2=0x7e484790 G3=0x0007a788 
 G4=0x0007a790
  G5=0x0007a400 G6=0xfffe6000e000 G7=0x74d0c200 
 Y=0x
  O0=0x O1=0x O2=0x00080350 
 O3=0x0008
  O4=0x O5=0x3000 O6=0x660fc9b1 
 O7=0xfffe719cc070
  L0=0x000103b8f720 L1=0x7e4847a0 L2=0x 
 L3=0x0006
  L4=0x10450f00 L5=0x1ffc L6=0x660ff860 
 L7=0x7e48a350
  I0=0x I1=0x00010450f000 I2=0x000104551180 
 I3=0x0012
  I4=0x7bd0 I5=0x7e40a000 I6=0x660fca61 
 I7=0x77c0e1f4
  PC=0x7e174780 nPC=0x7e174784
 Top of Stack: (sp=0x660fd1b0)
 0x660fd1b0:   000103b8f720 7e4847a0
 0x660fd1c0:    0006
 0x660fd1d0:   10450f00 1ffc
 0x660fd1e0:   660ff860 7e48a350
 0x660fd1f0:    00010450f000
 0x660fd200:   000104551180 0012
 0x660fd210:   7bd0 7e40a000
 0x660fd220:   660fca61 77c0e1f4
 0x660fd230:   000104551200 00010450f000
 0x660fd240:   000104551248 000104551208
 0x660fd250:   77c04f90 0002719cbed8
 0x660fd260:   660fd408 
 0x660fd270:   600d7c70 660fd518
 0x660fd280:   660fd410 77c0af6c
 0x660fd290:   660fd410 00010450f000
 0x660fd2a0:   05f9 660fd518 
 Instructions: (pc=0x7e174780)
 0x7e174760:   9e 10 20 00 f4 5d a0 10 10 80 00 05 e0 5d a0 08
 0x7e174770:   de 5e a0 00 e0 5d a0 08 f4 5d a0 10 e4 5e a0 00
 0x7e174780:   f0 5b c0 1b 02 c4 80 05 aa 10 20 07 7f e0 ca 99
 0x7e174790:   90 10 00 1a f4 5d a0 10 f4 74 20 08 f8 5d a0 18 
 Register to memory mapping:
 G1=0x7e484788: __1cHnmethodG__vtbl_+0x1aa8 in 
 /opt/app/t3atl1m5/tibco/tibcojre64/1.6.0_27/lib/sparcv9/server/libjvm.so at 
 0x7d80
 G2=0x7e484790: __1cHnmethodG__vtbl_+0x1ab0 in 
 /opt/app/t3atl1m5/tibco/tibcojre64/1.6.0_27/lib/sparcv9/server/libjvm.so at 
 0x7d80
 G3=0x0007a788 is an unknown value
 G4=0x0007a790 is an unknown value
 G5=0x0007a400 is an unknown value
 G6=0xfffe6000e000 is an unknown value
 G7=0x74d0c200 is an unknown value
 O0=0x is an unknown value
 O1=0x is an unknown value
 O2=0x00080350 is an unknown value
 O3=0x0008 is an unknown value
 O4=0x is an unknown value
 O5=0x3000 is an unknown value
 O6=0x660fc9b1 is pointing into the stack for thread: 
 0x00010450f000
 O7=

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


[jira] [Updated] (CASSANDRA-4646) Cassandra 1.1.3 crashes on Solaris 10 SIGBUS (0xa) at pc=0xffffffff7e174780, pid=18537, tid=276

2012-09-11 Thread Brandon Williams (JIRA)

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

Brandon Williams updated CASSANDRA-4646:


Labels: solaris  (was: crashes solaris)

 Cassandra 1.1.3 crashes on Solaris 10 SIGBUS (0xa) at pc=0x7e174780, 
 pid=18537, tid=276
 ---

 Key: CASSANDRA-4646
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4646
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Affects Versions: 1.1.3
 Environment: A ring of 2 Cassandra nodes on Solaris 10. It works 
 perfectly when only 1 node is running, if the ring has both the nodes 
 started, on connecting, one of the node crashes.
Reporter: basanth gowda
  Labels: solaris

 #
 # A fatal error has been detected by the Java Runtime Environment:
 #
 #  SIGBUS (0xa) at pc=0x7e174780, pid=18537, tid=276
 #
 # JRE version: 6.0_27-b07
 # Java VM: Java HotSpot(TM) 64-Bit Server VM (20.2-b06 mixed mode 
 solaris-sparc compressed oops)
 # Problematic frame:
 # V  [libjvm.so+0x974780]  Unsafe_GetLong+0x120
 #
 # If you would like to submit a bug report, please visit:
 #   http://java.sun.com/webapps/bugreport/crash.jsp
 #
 ---  T H R E A D  ---
 Current thread (0x00010450f000):  JavaThread Thrift:3 daemon 
 [_thread_in_vm, id=276, stack(0x6600,0x6610)]
 siginfo:si_signo=SIGBUS: si_errno=0, si_code=1 (BUS_ADRALN), 
 si_addr=0xfffe719cc082
 Registers:
  G1=0x7e484788 G2=0x7e484790 G3=0x0007a788 
 G4=0x0007a790
  G5=0x0007a400 G6=0xfffe6000e000 G7=0x74d0c200 
 Y=0x
  O0=0x O1=0x O2=0x00080350 
 O3=0x0008
  O4=0x O5=0x3000 O6=0x660fc9b1 
 O7=0xfffe719cc070
  L0=0x000103b8f720 L1=0x7e4847a0 L2=0x 
 L3=0x0006
  L4=0x10450f00 L5=0x1ffc L6=0x660ff860 
 L7=0x7e48a350
  I0=0x I1=0x00010450f000 I2=0x000104551180 
 I3=0x0012
  I4=0x7bd0 I5=0x7e40a000 I6=0x660fca61 
 I7=0x77c0e1f4
  PC=0x7e174780 nPC=0x7e174784
 Top of Stack: (sp=0x660fd1b0)
 0x660fd1b0:   000103b8f720 7e4847a0
 0x660fd1c0:    0006
 0x660fd1d0:   10450f00 1ffc
 0x660fd1e0:   660ff860 7e48a350
 0x660fd1f0:    00010450f000
 0x660fd200:   000104551180 0012
 0x660fd210:   7bd0 7e40a000
 0x660fd220:   660fca61 77c0e1f4
 0x660fd230:   000104551200 00010450f000
 0x660fd240:   000104551248 000104551208
 0x660fd250:   77c04f90 0002719cbed8
 0x660fd260:   660fd408 
 0x660fd270:   600d7c70 660fd518
 0x660fd280:   660fd410 77c0af6c
 0x660fd290:   660fd410 00010450f000
 0x660fd2a0:   05f9 660fd518 
 Instructions: (pc=0x7e174780)
 0x7e174760:   9e 10 20 00 f4 5d a0 10 10 80 00 05 e0 5d a0 08
 0x7e174770:   de 5e a0 00 e0 5d a0 08 f4 5d a0 10 e4 5e a0 00
 0x7e174780:   f0 5b c0 1b 02 c4 80 05 aa 10 20 07 7f e0 ca 99
 0x7e174790:   90 10 00 1a f4 5d a0 10 f4 74 20 08 f8 5d a0 18 
 Register to memory mapping:
 G1=0x7e484788: __1cHnmethodG__vtbl_+0x1aa8 in 
 /opt/app/t3atl1m5/tibco/tibcojre64/1.6.0_27/lib/sparcv9/server/libjvm.so at 
 0x7d80
 G2=0x7e484790: __1cHnmethodG__vtbl_+0x1ab0 in 
 /opt/app/t3atl1m5/tibco/tibcojre64/1.6.0_27/lib/sparcv9/server/libjvm.so at 
 0x7d80
 G3=0x0007a788 is an unknown value
 G4=0x0007a790 is an unknown value
 G5=0x0007a400 is an unknown value
 G6=0xfffe6000e000 is an unknown value
 G7=0x74d0c200 is an unknown value
 O0=0x is an unknown value
 O1=0x is an unknown value
 O2=0x00080350 is an unknown value
 O3=0x0008 is an unknown value
 O4=0x is an unknown value
 O5=0x3000 is an unknown value
 O6=0x660fc9b1 is pointing into the stack for thread: 
 0x00010450f000
 O7=

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


[jira] [Commented] (CASSANDRA-4417) invalid counter shard detected

2012-09-11 Thread Brandon Williams (JIRA)

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

Brandon Williams commented on CASSANDRA-4417:
-

Under multiple-CF concurrency, wouldn't you effectively end up with batch mode?

 invalid counter shard detected 
 ---

 Key: CASSANDRA-4417
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4417
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Affects Versions: 1.1.1
 Environment: Amazon Linux
Reporter: Senthilvel Rangaswamy

 Seeing errors like these:
 2012-07-06_07:00:27.22662 ERROR 07:00:27,226 invalid counter shard detected; 
 (17bfd850-ac52-11e1--6ecd0b5b61e7, 1, 13) and 
 (17bfd850-ac52-11e1--6ecd0b5b61e7, 1, 1) differ only in count; will pick 
 highest to self-heal; this indicates a bug or corruption generated a bad 
 counter shard
 What does it mean ?

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


git commit: Fix assertion in getRestrictedRange with Murmur3Partitioner

2012-09-11 Thread slebresne
Updated Branches:
  refs/heads/trunk 55df844e0 - 93685a478


Fix assertion in getRestrictedRange with Murmur3Partitioner

patch by slebresne; reviewed by jbellis for CASSANDRA-4621


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

Branch: refs/heads/trunk
Commit: 93685a4780f2b03319f49a6cba17ef98ea22728e
Parents: 55df844
Author: Sylvain Lebresne sylv...@datastax.com
Authored: Tue Sep 11 17:43:08 2012 +0200
Committer: Sylvain Lebresne sylv...@datastax.com
Committed: Tue Sep 11 17:43:08 2012 +0200

--
 CHANGES.txt|2 +-
 .../apache/cassandra/dht/Murmur3Partitioner.java   |   24 +-
 2 files changed, 16 insertions(+), 10 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/93685a47/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 5fcc7a4..58b3272 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -50,7 +50,7 @@
  * (cql3) Add support for 2ndary indexes (CASSANDRA-3680)
  * (cql3) fix defining more than one PK to be invalid (CASSANDRA-4477)
  * remove schema agreement checking from all external APIs (Thrift, CQL and 
CQL3) (CASSANDRA-4487)
- * add Murmur3Partitioner and make it default for new installations 
(CASSANDRA-3772)
+ * add Murmur3Partitioner and make it default for new installations 
(CASSANDRA-3772, 4621)
  * (cql3) update pseudo-map syntax to use map syntax (CASSANDRA-4497)
  * Finer grained exceptions hierarchy and provides error code with exceptions 
(CASSANDRA-3979)
  * Adds events push to binary protocol (CASSANDRA-4480)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/93685a47/src/java/org/apache/cassandra/dht/Murmur3Partitioner.java
--
diff --git a/src/java/org/apache/cassandra/dht/Murmur3Partitioner.java 
b/src/java/org/apache/cassandra/dht/Murmur3Partitioner.java
index 3a3972b..440b159 100644
--- a/src/java/org/apache/cassandra/dht/Murmur3Partitioner.java
+++ b/src/java/org/apache/cassandra/dht/Murmur3Partitioner.java
@@ -35,7 +35,7 @@ import org.apache.cassandra.utils.MurmurHash;
  */
 public class Murmur3Partitioner extends AbstractPartitionerLongToken
 {
-public static final LongToken MINIMUM = new LongToken(0L);
+public static final LongToken MINIMUM = new LongToken(Long.MIN_VALUE);
 public static final long MAXIMUM = Long.MAX_VALUE;
 
 public DecoratedKey convertFromDiskFormat(ByteBuffer key)
@@ -74,18 +74,30 @@ public class Murmur3Partitioner extends 
AbstractPartitionerLongToken
 return MINIMUM;
 }
 
+/**
+ * Generate the token of a key.
+ * Note that we need to ensure all generated token are strictly bigger 
than MINIMUM.
+ * In particular we don't want MINIMUM to correspond to any key because 
the range (MINIMUM, X] doesn't
+ * include MINIMUM but we use such range to select all data whose token is 
smaller than X.
+ */
 public LongToken getToken(ByteBuffer key)
 {
 if (key.remaining() == 0)
 return MINIMUM;
 
 long hash = MurmurHash.hash3_x64_128(key, key.position(), 
key.remaining(), 0)[0];
-return new LongToken((hash  0) ? -hash : hash);
+return new LongToken(normalize(hash));
 }
 
 public LongToken getRandomToken()
 {
-return new LongToken(FBUtilities.threadLocalRandom().nextLong());
+return new 
LongToken(normalize(FBUtilities.threadLocalRandom().nextLong()));
+}
+
+private long normalize(long v)
+{
+// We exclude the MINIMUM value; see getToken()
+return v == Long.MIN_VALUE ? Long.MAX_VALUE : v;
 }
 
 public boolean preservesOrder()
@@ -154,12 +166,6 @@ public class Murmur3Partitioner extends 
AbstractPartitionerLongToken
 try
 {
 Long i = Long.valueOf(token);
-
-if (i.compareTo(MINIMUM.token)  0)
-throw new ConfigurationException(Token must be = 0);
-
-if (i.compareTo(MAXIMUM)  0)
-throw new ConfigurationException(Token must be =  + 
Long.MAX_VALUE);
 }
 catch (NumberFormatException e)
 {



[jira] [Commented] (CASSANDRA-4417) invalid counter shard detected

2012-09-11 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis commented on CASSANDRA-4417:
---

You would do more fsyncs, but only the CFs in actual batch mode would have to 
block for them.  Periodic mode just queues the CL op and moves on to memtable 
append immediately.

 invalid counter shard detected 
 ---

 Key: CASSANDRA-4417
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4417
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Affects Versions: 1.1.1
 Environment: Amazon Linux
Reporter: Senthilvel Rangaswamy

 Seeing errors like these:
 2012-07-06_07:00:27.22662 ERROR 07:00:27,226 invalid counter shard detected; 
 (17bfd850-ac52-11e1--6ecd0b5b61e7, 1, 13) and 
 (17bfd850-ac52-11e1--6ecd0b5b61e7, 1, 1) differ only in count; will pick 
 highest to self-heal; this indicates a bug or corruption generated a bad 
 counter shard
 What does it mean ?

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


[jira] [Commented] (CASSANDRA-4643) AssertionError: DecoratedKey(-1, ) != DecoratedKey

2012-09-11 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis commented on CASSANDRA-4643:
---

Possibly related: 
http://www.mail-archive.com/user@cassandra.apache.org/msg24782.html (against 
1.1.4)

 AssertionError: DecoratedKey(-1, ) != DecoratedKey
 --

 Key: CASSANDRA-4643
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4643
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Affects Versions: 1.1.5
Reporter: Radim Kolar

 i got lot of following errors: decorated key -1 != some number
  INFO [CompactionExecutor:10] 2012-09-11 02:22:13,586 
 CompactionController.java (line 172) Compacting large row 
 system/HintsColumnFamily:67fd0f04ca3294558142a5b33a30f6f5 (241502947 bytes) 
 incrementally
 ERROR [ReadStage:44] 2012-09-11 02:22:13,992 AbstractCassandraDaemon.java 
 (line 135) Exception in thread Thread[ReadStage:44,5,main]
 java.lang.AssertionError: DecoratedKey(-1, ) != 
 DecoratedKey(133375303318769338050543368330356089660, ad4f) in 
 c:\cassandra\data\test\sipdb\test-sipdb-he-5-Data.db
 at 
 org.apache.cassandra.db.columniterator.SSTableNamesIterator.init(SSTableNamesIterator.java:72)
 at 
 org.apache.cassandra.db.filter.NamesQueryFilter.getSSTableColumnIterator(NamesQueryFilter.java:61)
 at 
 org.apache.cassandra.db.filter.QueryFilter.getSSTableColumnIterator(QueryFilter.java:79)
 at 
 org.apache.cassandra.db.CollationController.collectTimeOrderedData(CollationController.java:124)
 at 
 org.apache.cassandra.db.CollationController.getTopLevelColumns(CollationController.java:64)
 at 
 org.apache.cassandra.db.ColumnFamilyStore.getTopLevelColumns(ColumnFamilyStore.java:1345)

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


[jira] [Commented] (CASSANDRA-4417) invalid counter shard detected

2012-09-11 Thread Sylvain Lebresne (JIRA)

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

Sylvain Lebresne commented on CASSANDRA-4417:
-

That's an option. Though not an exactly short term one (I suspect mixing 
periodic and batch cf on the same commit log might require a bit of care; 
unless you were thinking of having multiple commit logs, but I'm not sure that 
would be a good thing).

But hey, I don't have a much better solution so far, so looking at that option 
is definitively worth it (since it's generally useful anyway).

 invalid counter shard detected 
 ---

 Key: CASSANDRA-4417
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4417
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Affects Versions: 1.1.1
 Environment: Amazon Linux
Reporter: Senthilvel Rangaswamy

 Seeing errors like these:
 2012-07-06_07:00:27.22662 ERROR 07:00:27,226 invalid counter shard detected; 
 (17bfd850-ac52-11e1--6ecd0b5b61e7, 1, 13) and 
 (17bfd850-ac52-11e1--6ecd0b5b61e7, 1, 1) differ only in count; will pick 
 highest to self-heal; this indicates a bug or corruption generated a bad 
 counter shard
 What does it mean ?

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


[jira] [Commented] (CASSANDRA-4611) Add AlterKeyspace statement

2012-09-11 Thread Pavel Yaskevich (JIRA)

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

Pavel Yaskevich commented on CASSANDRA-4611:


Ok, here is the few problems:

 - if no 'replication' options where given NPE is thrown e.g. `alter keyspace 
ks with durable_writes = false'.
 - if one would specify ks/cf options in uppercase e.g. 'CLASS' it wouldn't be 
recognized on validate.

 Add AlterKeyspace statement
 ---

 Key: CASSANDRA-4611
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4611
 Project: Cassandra
  Issue Type: New Feature
  Components: API
Affects Versions: 1.1.0
Reporter: Sylvain Lebresne
Assignee: Sylvain Lebresne
Priority: Minor
  Labels: cql3
 Fix For: 1.2.0 beta 1

 Attachments: 4611.txt


 Somehow we never added an ALTER KEYSPACE statement. We should.

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


[jira] [Commented] (CASSANDRA-4139) Add varint encoding to Messaging service

2012-09-11 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis commented on CASSANDRA-4139:
---

(Vijay reports that he still has problems getting my branch to work over SSL.)

 Add varint encoding to Messaging service
 

 Key: CASSANDRA-4139
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4139
 Project: Cassandra
  Issue Type: Sub-task
  Components: Core
Reporter: Vijay
Assignee: Vijay
 Fix For: 1.3

 Attachments: 0001-CASSANDRA-4139-v1.patch, 
 0001-CASSANDRA-4139-v2.patch, 0001-CASSANDRA-4139-v4.patch, 
 0002-add-bytes-written-metric.patch, 4139-Test.rtf, 
 ASF.LICENSE.NOT.GRANTED--0001-CASSANDRA-4139-v3.patch




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


[jira] [Updated] (CASSANDRA-4541) Replace Throttle with Guava's RateLimiter

2012-09-11 Thread Pavel Yaskevich (JIRA)

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

Pavel Yaskevich updated CASSANDRA-4541:
---

Fix Version/s: 1.2.0 beta 1

 Replace Throttle with Guava's RateLimiter
 -

 Key: CASSANDRA-4541
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4541
 Project: Cassandra
  Issue Type: Improvement
  Components: Core
Reporter: Michaël Figuière
Assignee: Aleksey Yeschenko
Priority: Minor
 Fix For: 1.2.0 beta 1

 Attachments: CASSANDRA-4541.patch


 Guava 13 introduced {{RateLimiter}} [1] which should be a good replacement 
 for {{o.a.c.utils.Throttle}} that is used in Compaction and Streaming as a 
 throughput limiter.
 [1] 
 [http://code.google.com/p/guava-libraries/source/browse/guava/src/com/google/common/util/concurrent/RateLimiter.java]

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


[jira] [Updated] (CASSANDRA-4611) Add AlterKeyspace statement

2012-09-11 Thread Sylvain Lebresne (JIRA)

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

Sylvain Lebresne updated CASSANDRA-4611:


Attachment: 4611-v2.txt

Attached v2 fixes both problems.

 Add AlterKeyspace statement
 ---

 Key: CASSANDRA-4611
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4611
 Project: Cassandra
  Issue Type: New Feature
  Components: API
Affects Versions: 1.1.0
Reporter: Sylvain Lebresne
Assignee: Sylvain Lebresne
Priority: Minor
  Labels: cql3
 Fix For: 1.2.0 beta 1

 Attachments: 4611.txt, 4611-v2.txt


 Somehow we never added an ALTER KEYSPACE statement. We should.

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


[jira] [Updated] (CASSANDRA-4622) corrupted saved caches

2012-09-11 Thread Vijay (JIRA)

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

Vijay updated CASSANDRA-4622:
-

Attachment: 0001-CASSANDRA-4622.patch

Moved the null check to be checked before adding to the future list.

 corrupted saved caches
 --

 Key: CASSANDRA-4622
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4622
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Reporter: Brandon Williams
Assignee: Vijay
 Fix For: 1.2.0

 Attachments: 0001-CASSANDRA-4622.patch


 I'm seeing this fairly frequently on trunk:
 {noformat}
  INFO 05:15:23,805 reading saved cache 
 /var/lib/cassandra/saved_caches/system-schema_columnfamilies-KeyCache-b.db
  WARN 05:15:23,808 error reading saved cache 
 /var/lib/cassandra/saved_caches/system-schema_columnfamilies-KeyCache-b.db
 java.lang.NullPointerException
 at 
 org.apache.cassandra.cache.AutoSavingCache.loadSaved(AutoSavingCache.java:151)
 at 
 org.apache.cassandra.db.ColumnFamilyStore.init(ColumnFamilyStore.java:247)
 at 
 org.apache.cassandra.db.ColumnFamilyStore.createColumnFamilyStore(ColumnFamilyStore.java:362)
 at 
 org.apache.cassandra.db.ColumnFamilyStore.createColumnFamilyStore(ColumnFamilyStore.java:334)
 at org.apache.cassandra.db.Table.initCf(Table.java:333)
 at org.apache.cassandra.db.Table.init(Table.java:271)
 at org.apache.cassandra.db.Table.open(Table.java:101)
 at org.apache.cassandra.db.Table.open(Table.java:79)
 at 
 org.apache.cassandra.db.SystemTable.checkHealth(SystemTable.java:285)
 at 
 org.apache.cassandra.service.CassandraDaemon.setup(CassandraDaemon.java:201)
 at 
 org.apache.cassandra.service.CassandraDaemon.activate(CassandraDaemon.java:349)
 at 
 org.apache.cassandra.service.CassandraDaemon.main(CassandraDaemon.java:392)
  INFO 05:15:23,858 Opening 
 /var/lib/cassandra/data/system/schema_keyspaces/system-schema_keyspaces-ia-5 
 (171 bytes)
  INFO 05:15:23,870 Opening 
 /var/lib/cassandra/data/system/peers/system-peers-ia-1 (7983 bytes)
  INFO 05:15:23,870 Opening 
 /var/lib/cassandra/data/system/peers/system-peers-ia-2 (7876 bytes)
  INFO 05:15:23,884 Opening 
 /var/lib/cassandra/data/system/local/system-local-ia-35 (4910 bytes)
  INFO 05:15:23,885 Opening 
 /var/lib/cassandra/data/system/local/system-local-ia-33 (75 bytes)
  INFO 05:15:23,885 Opening 
 /var/lib/cassandra/data/system/local/system-local-ia-34 (4676 bytes)
  INFO 05:15:23,912 reading saved cache 
 /var/lib/cassandra/saved_caches/system-local-KeyCache-b.db
  WARN 05:15:23,912 error reading saved cache 
 /var/lib/cassandra/saved_caches/system-local-KeyCache-b.db
 java.lang.NullPointerException
 at 
 org.apache.cassandra.cache.AutoSavingCache.loadSaved(AutoSavingCache.java:151)
 at 
 org.apache.cassandra.db.ColumnFamilyStore.init(ColumnFamilyStore.java:247)
 at 
 org.apache.cassandra.db.ColumnFamilyStore.createColumnFamilyStore(ColumnFamilyStore.java:362)
 at 
 org.apache.cassandra.db.ColumnFamilyStore.createColumnFamilyStore(ColumnFamilyStore.java:334)
 at org.apache.cassandra.db.Table.initCf(Table.java:333)
 at org.apache.cassandra.db.Table.init(Table.java:271)
 at org.apache.cassandra.db.Table.open(Table.java:101)
 at org.apache.cassandra.db.Table.open(Table.java:79)
 at 
 org.apache.cassandra.db.SystemTable.checkHealth(SystemTable.java:285)
 at 
 org.apache.cassandra.service.CassandraDaemon.setup(CassandraDaemon.java:201)
 at 
 org.apache.cassandra.service.CassandraDaemon.activate(CassandraDaemon.java:349)
 at 
 org.apache.cassandra.service.CassandraDaemon.main(CassandraDaemon.java:392)
 {noformat}

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


[jira] [Created] (CASSANDRA-4647) Rename NodeId to CounterId

2012-09-11 Thread Sylvain Lebresne (JIRA)
Sylvain Lebresne created CASSANDRA-4647:
---

 Summary: Rename NodeId to CounterId
 Key: CASSANDRA-4647
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4647
 Project: Cassandra
  Issue Type: Improvement
Reporter: Sylvain Lebresne
Assignee: Sylvain Lebresne
Priority: Minor
 Fix For: 1.2.0 beta 1


NodeId is pretty close to the hostId introduced by vnodes, so let's rename 
NodeId to CounterId to avoid any potential confusion. It's probably a better 
name anyway.

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


[jira] [Updated] (CASSANDRA-4622) corrupted saved caches

2012-09-11 Thread Vijay (JIRA)

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

Vijay updated CASSANDRA-4622:
-

Reviewer: jbellis

 corrupted saved caches
 --

 Key: CASSANDRA-4622
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4622
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Reporter: Brandon Williams
Assignee: Vijay
 Fix For: 1.2.0

 Attachments: 0001-CASSANDRA-4622.patch


 I'm seeing this fairly frequently on trunk:
 {noformat}
  INFO 05:15:23,805 reading saved cache 
 /var/lib/cassandra/saved_caches/system-schema_columnfamilies-KeyCache-b.db
  WARN 05:15:23,808 error reading saved cache 
 /var/lib/cassandra/saved_caches/system-schema_columnfamilies-KeyCache-b.db
 java.lang.NullPointerException
 at 
 org.apache.cassandra.cache.AutoSavingCache.loadSaved(AutoSavingCache.java:151)
 at 
 org.apache.cassandra.db.ColumnFamilyStore.init(ColumnFamilyStore.java:247)
 at 
 org.apache.cassandra.db.ColumnFamilyStore.createColumnFamilyStore(ColumnFamilyStore.java:362)
 at 
 org.apache.cassandra.db.ColumnFamilyStore.createColumnFamilyStore(ColumnFamilyStore.java:334)
 at org.apache.cassandra.db.Table.initCf(Table.java:333)
 at org.apache.cassandra.db.Table.init(Table.java:271)
 at org.apache.cassandra.db.Table.open(Table.java:101)
 at org.apache.cassandra.db.Table.open(Table.java:79)
 at 
 org.apache.cassandra.db.SystemTable.checkHealth(SystemTable.java:285)
 at 
 org.apache.cassandra.service.CassandraDaemon.setup(CassandraDaemon.java:201)
 at 
 org.apache.cassandra.service.CassandraDaemon.activate(CassandraDaemon.java:349)
 at 
 org.apache.cassandra.service.CassandraDaemon.main(CassandraDaemon.java:392)
  INFO 05:15:23,858 Opening 
 /var/lib/cassandra/data/system/schema_keyspaces/system-schema_keyspaces-ia-5 
 (171 bytes)
  INFO 05:15:23,870 Opening 
 /var/lib/cassandra/data/system/peers/system-peers-ia-1 (7983 bytes)
  INFO 05:15:23,870 Opening 
 /var/lib/cassandra/data/system/peers/system-peers-ia-2 (7876 bytes)
  INFO 05:15:23,884 Opening 
 /var/lib/cassandra/data/system/local/system-local-ia-35 (4910 bytes)
  INFO 05:15:23,885 Opening 
 /var/lib/cassandra/data/system/local/system-local-ia-33 (75 bytes)
  INFO 05:15:23,885 Opening 
 /var/lib/cassandra/data/system/local/system-local-ia-34 (4676 bytes)
  INFO 05:15:23,912 reading saved cache 
 /var/lib/cassandra/saved_caches/system-local-KeyCache-b.db
  WARN 05:15:23,912 error reading saved cache 
 /var/lib/cassandra/saved_caches/system-local-KeyCache-b.db
 java.lang.NullPointerException
 at 
 org.apache.cassandra.cache.AutoSavingCache.loadSaved(AutoSavingCache.java:151)
 at 
 org.apache.cassandra.db.ColumnFamilyStore.init(ColumnFamilyStore.java:247)
 at 
 org.apache.cassandra.db.ColumnFamilyStore.createColumnFamilyStore(ColumnFamilyStore.java:362)
 at 
 org.apache.cassandra.db.ColumnFamilyStore.createColumnFamilyStore(ColumnFamilyStore.java:334)
 at org.apache.cassandra.db.Table.initCf(Table.java:333)
 at org.apache.cassandra.db.Table.init(Table.java:271)
 at org.apache.cassandra.db.Table.open(Table.java:101)
 at org.apache.cassandra.db.Table.open(Table.java:79)
 at 
 org.apache.cassandra.db.SystemTable.checkHealth(SystemTable.java:285)
 at 
 org.apache.cassandra.service.CassandraDaemon.setup(CassandraDaemon.java:201)
 at 
 org.apache.cassandra.service.CassandraDaemon.activate(CassandraDaemon.java:349)
 at 
 org.apache.cassandra.service.CassandraDaemon.main(CassandraDaemon.java:392)
 {noformat}

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


[jira] [Updated] (CASSANDRA-4647) Rename NodeId to CounterId

2012-09-11 Thread Sylvain Lebresne (JIRA)

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

Sylvain Lebresne updated CASSANDRA-4647:


Attachment: 4647.txt

Patch attached that does the renaming pretty much everywhere. I even edited the 
comments (at least for those returned by a simple grep). The only thing that 
still has NodeId is the system table NodeIdInfo, since changing the name would 
require migrating it's data.

 Rename NodeId to CounterId
 --

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

 Attachments: 4647.txt


 NodeId is pretty close to the hostId introduced by vnodes, so let's rename 
 NodeId to CounterId to avoid any potential confusion. It's probably a better 
 name anyway.

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


[jira] [Commented] (CASSANDRA-4647) Rename NodeId to CounterId

2012-09-11 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis commented on CASSANDRA-4647:
---

+1

 Rename NodeId to CounterId
 --

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

 Attachments: 4647.txt


 NodeId is pretty close to the hostId introduced by vnodes, so let's rename 
 NodeId to CounterId to avoid any potential confusion. It's probably a better 
 name anyway.

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


[jira] [Commented] (CASSANDRA-4622) corrupted saved caches

2012-09-11 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis commented on CASSANDRA-4622:
---

+1

 corrupted saved caches
 --

 Key: CASSANDRA-4622
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4622
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Reporter: Brandon Williams
Assignee: Vijay
 Fix For: 1.2.0

 Attachments: 0001-CASSANDRA-4622.patch


 I'm seeing this fairly frequently on trunk:
 {noformat}
  INFO 05:15:23,805 reading saved cache 
 /var/lib/cassandra/saved_caches/system-schema_columnfamilies-KeyCache-b.db
  WARN 05:15:23,808 error reading saved cache 
 /var/lib/cassandra/saved_caches/system-schema_columnfamilies-KeyCache-b.db
 java.lang.NullPointerException
 at 
 org.apache.cassandra.cache.AutoSavingCache.loadSaved(AutoSavingCache.java:151)
 at 
 org.apache.cassandra.db.ColumnFamilyStore.init(ColumnFamilyStore.java:247)
 at 
 org.apache.cassandra.db.ColumnFamilyStore.createColumnFamilyStore(ColumnFamilyStore.java:362)
 at 
 org.apache.cassandra.db.ColumnFamilyStore.createColumnFamilyStore(ColumnFamilyStore.java:334)
 at org.apache.cassandra.db.Table.initCf(Table.java:333)
 at org.apache.cassandra.db.Table.init(Table.java:271)
 at org.apache.cassandra.db.Table.open(Table.java:101)
 at org.apache.cassandra.db.Table.open(Table.java:79)
 at 
 org.apache.cassandra.db.SystemTable.checkHealth(SystemTable.java:285)
 at 
 org.apache.cassandra.service.CassandraDaemon.setup(CassandraDaemon.java:201)
 at 
 org.apache.cassandra.service.CassandraDaemon.activate(CassandraDaemon.java:349)
 at 
 org.apache.cassandra.service.CassandraDaemon.main(CassandraDaemon.java:392)
  INFO 05:15:23,858 Opening 
 /var/lib/cassandra/data/system/schema_keyspaces/system-schema_keyspaces-ia-5 
 (171 bytes)
  INFO 05:15:23,870 Opening 
 /var/lib/cassandra/data/system/peers/system-peers-ia-1 (7983 bytes)
  INFO 05:15:23,870 Opening 
 /var/lib/cassandra/data/system/peers/system-peers-ia-2 (7876 bytes)
  INFO 05:15:23,884 Opening 
 /var/lib/cassandra/data/system/local/system-local-ia-35 (4910 bytes)
  INFO 05:15:23,885 Opening 
 /var/lib/cassandra/data/system/local/system-local-ia-33 (75 bytes)
  INFO 05:15:23,885 Opening 
 /var/lib/cassandra/data/system/local/system-local-ia-34 (4676 bytes)
  INFO 05:15:23,912 reading saved cache 
 /var/lib/cassandra/saved_caches/system-local-KeyCache-b.db
  WARN 05:15:23,912 error reading saved cache 
 /var/lib/cassandra/saved_caches/system-local-KeyCache-b.db
 java.lang.NullPointerException
 at 
 org.apache.cassandra.cache.AutoSavingCache.loadSaved(AutoSavingCache.java:151)
 at 
 org.apache.cassandra.db.ColumnFamilyStore.init(ColumnFamilyStore.java:247)
 at 
 org.apache.cassandra.db.ColumnFamilyStore.createColumnFamilyStore(ColumnFamilyStore.java:362)
 at 
 org.apache.cassandra.db.ColumnFamilyStore.createColumnFamilyStore(ColumnFamilyStore.java:334)
 at org.apache.cassandra.db.Table.initCf(Table.java:333)
 at org.apache.cassandra.db.Table.init(Table.java:271)
 at org.apache.cassandra.db.Table.open(Table.java:101)
 at org.apache.cassandra.db.Table.open(Table.java:79)
 at 
 org.apache.cassandra.db.SystemTable.checkHealth(SystemTable.java:285)
 at 
 org.apache.cassandra.service.CassandraDaemon.setup(CassandraDaemon.java:201)
 at 
 org.apache.cassandra.service.CassandraDaemon.activate(CassandraDaemon.java:349)
 at 
 org.apache.cassandra.service.CassandraDaemon.main(CassandraDaemon.java:392)
 {noformat}

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


[2/2] Rename NodeId to CounterId

2012-09-11 Thread slebresne
http://git-wip-us.apache.org/repos/asf/cassandra/blob/3b13457d/test/unit/org/apache/cassandra/db/context/CounterContextTest.java
--
diff --git a/test/unit/org/apache/cassandra/db/context/CounterContextTest.java 
b/test/unit/org/apache/cassandra/db/context/CounterContextTest.java
index b976065..e3b5e4c 100644
--- a/test/unit/org/apache/cassandra/db/context/CounterContextTest.java
+++ b/test/unit/org/apache/cassandra/db/context/CounterContextTest.java
@@ -45,7 +45,7 @@ public class CounterContextTest
 
 static
 {
-idLength   = NodeId.LENGTH; // size of int
+idLength   = CounterId.LENGTH; // size of int
 clockLength= 8; // size of long
 countLength= 8; // size of long
 stepLength = idLength + clockLength + countLength;
@@ -85,9 +85,9 @@ public class CounterContextTest
 ContextState right;
 
 // equality: equal nodes, all counts same
-left.writeElement(NodeId.fromInt(3), 3L, 0L);
-left.writeElement(NodeId.fromInt(6), 2L, 0L);
-left.writeElement(NodeId.fromInt(9), 1L, 0L);
+left.writeElement(CounterId.fromInt(3), 3L, 0L);
+left.writeElement(CounterId.fromInt(6), 2L, 0L);
+left.writeElement(CounterId.fromInt(9), 1L, 0L);
 right = new ContextState(ByteBufferUtil.clone(left.context), 
left.headerLength);
 
 assert ContextRelationship.EQUAL ==
@@ -95,171 +95,171 @@ public class CounterContextTest
 
 // greater than: left has superset of nodes (counts equal)
 left = ContextState.allocate(4, 0, allocator);
-left.writeElement(NodeId.fromInt(3),  3L, 0L);
-left.writeElement(NodeId.fromInt(6),  2L, 0L);
-left.writeElement(NodeId.fromInt(9),  1L, 0L);
-left.writeElement(NodeId.fromInt(12), 0L, 0L);
+left.writeElement(CounterId.fromInt(3),  3L, 0L);
+left.writeElement(CounterId.fromInt(6),  2L, 0L);
+left.writeElement(CounterId.fromInt(9),  1L, 0L);
+left.writeElement(CounterId.fromInt(12), 0L, 0L);
 
 right = ContextState.allocate(3, 0, allocator);
-right.writeElement(NodeId.fromInt(3), 3L, 0L);
-right.writeElement(NodeId.fromInt(6), 2L, 0L);
-right.writeElement(NodeId.fromInt(9), 1L, 0L);
+right.writeElement(CounterId.fromInt(3), 3L, 0L);
+right.writeElement(CounterId.fromInt(6), 2L, 0L);
+right.writeElement(CounterId.fromInt(9), 1L, 0L);
 
 assert ContextRelationship.GREATER_THAN ==
 cc.diff(left.context, right.context);
 
 // less than: left has subset of nodes (counts equal)
 left = ContextState.allocate(3, 0, allocator);
-left.writeElement(NodeId.fromInt(3), 3L, 0L);
-left.writeElement(NodeId.fromInt(6), 2L, 0L);
-left.writeElement(NodeId.fromInt(9), 1L, 0L);
+left.writeElement(CounterId.fromInt(3), 3L, 0L);
+left.writeElement(CounterId.fromInt(6), 2L, 0L);
+left.writeElement(CounterId.fromInt(9), 1L, 0L);
 
 right = ContextState.allocate(4, 0, allocator);
-right.writeElement(NodeId.fromInt(3),  3L, 0L);
-right.writeElement(NodeId.fromInt(6),  2L, 0L);
-right.writeElement(NodeId.fromInt(9),  1L, 0L);
-right.writeElement(NodeId.fromInt(12), 0L, 0L);
+right.writeElement(CounterId.fromInt(3),  3L, 0L);
+right.writeElement(CounterId.fromInt(6),  2L, 0L);
+right.writeElement(CounterId.fromInt(9),  1L, 0L);
+right.writeElement(CounterId.fromInt(12), 0L, 0L);
 
 assert ContextRelationship.LESS_THAN ==
 cc.diff(left.context, right.context);
 
 // greater than: equal nodes, but left has higher counts
 left = ContextState.allocate(3, 0, allocator);
-left.writeElement(NodeId.fromInt(3), 3L, 0L);
-left.writeElement(NodeId.fromInt(6), 2L, 0L);
-left.writeElement(NodeId.fromInt(9), 3L, 0L);
+left.writeElement(CounterId.fromInt(3), 3L, 0L);
+left.writeElement(CounterId.fromInt(6), 2L, 0L);
+left.writeElement(CounterId.fromInt(9), 3L, 0L);
 
 right = ContextState.allocate(3, 0, allocator);
-right.writeElement(NodeId.fromInt(3), 3L, 0L);
-right.writeElement(NodeId.fromInt(6), 2L, 0L);
-right.writeElement(NodeId.fromInt(9), 1L, 0L);
+right.writeElement(CounterId.fromInt(3), 3L, 0L);
+right.writeElement(CounterId.fromInt(6), 2L, 0L);
+right.writeElement(CounterId.fromInt(9), 1L, 0L);
 
 assert ContextRelationship.GREATER_THAN ==
 cc.diff(left.context, right.context);
 
 // less than: equal nodes, but right has higher counts
 left = ContextState.allocate(3, 0, allocator);
-left.writeElement(NodeId.fromInt(3), 3L, 0L);
-left.writeElement(NodeId.fromInt(6), 2L, 0L);
-left.writeElement(NodeId.fromInt(9), 3L, 0L);
+

git commit: corrupted saved caches patch by Vijay; reviewed by jbellis for CASSANDRA-4622

2012-09-11 Thread vijay
Updated Branches:
  refs/heads/trunk 3b13457dd - 2c250c660


corrupted saved caches
patch by Vijay; reviewed by jbellis for CASSANDRA-4622


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

Branch: refs/heads/trunk
Commit: 2c250c660f628d54ad57edd90d4c8ff5a4a407ee
Parents: 3b13457
Author: Vijay Parthasarathy vijay2...@gmail.com
Authored: Tue Sep 11 10:42:53 2012 -0700
Committer: Vijay Parthasarathy vijay2...@gmail.com
Committed: Tue Sep 11 10:56:13 2012 -0700

--
 .../apache/cassandra/cache/AutoSavingCache.java|   10 +-
 1 files changed, 5 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/2c250c66/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 7805340..14c379c 100644
--- a/src/java/org/apache/cassandra/cache/AutoSavingCache.java
+++ b/src/java/org/apache/cassandra/cache/AutoSavingCache.java
@@ -20,7 +20,6 @@ package org.apache.cassandra.cache;
 import java.io.*;
 import java.nio.ByteBuffer;
 import java.util.*;
-import java.util.concurrent.atomic.AtomicBoolean;
 import java.util.concurrent.Future;
 import java.util.concurrent.ScheduledFuture;
 import java.util.concurrent.TimeUnit;
@@ -142,16 +141,17 @@ public class AutoSavingCacheK extends CacheKey, V 
extends InstrumentingCacheK
 ListFuturePairK, V futures = new 
ArrayListFuturePairK, V();
 while (in.available()  0)
 {
-futures.add(cacheLoader.deserialize(in, cfs));
+FuturePairK, V entry = cacheLoader.deserialize(in, 
cfs);
+// Key cache entry can return null, if the SSTable doesn't 
exist.
+if (entry == null)
+continue;
+futures.add(entry);
 count++;
 }
 
 for (FuturePairK, V future : futures)
 {
 PairK, V entry = future.get();
-// Key cache entry can return null, if the SSTable doesn't 
exist.
-if (entry == null)
-continue;
 put(entry.left, entry.right);
 }
 }



[jira] [Commented] (CASSANDRA-4537) We should emit number of sstables in each level from JMX

2012-09-11 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis commented on CASSANDRA-4537:
---

+1, lgtm

nit: getLevelSize call is a little confusing since it handles i  
generations.length, inlining to generations[i].size might be more clear

 We should emit number of sstables in each level from JMX
 

 Key: CASSANDRA-4537
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4537
 Project: Cassandra
  Issue Type: Bug
Affects Versions: 1.0.0
Reporter: sankalp kohli
Assignee: Yuki Morishita
Priority: Minor
  Labels: compaction, leveled
 Fix For: 1.2.1

 Attachments: 4537.txt, 4537-v2.txt

   Original Estimate: 12h
  Remaining Estimate: 12h

 We should add methods to this Mbean 
 org.apache.cassandra.db.ColumnFamilyStoreMBean
 These metrics will be helpful to see how sstables are distributed in 
 different levels and how they move to higher level with time. 
 Currently we can see this by looking at the json file but with JMX, we can 
 monitor the historic values over time using any monitoring tool.  

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


git commit: Revert Make vnodes default.

2012-09-11 Thread jbellis
Updated Branches:
  refs/heads/trunk 2c250c660 - b983c816c


Revert Make vnodes default.

This reverts commit 94509cbd7ea1c0b4ab6f3bad9f6b0cac68928a74.


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

Branch: refs/heads/trunk
Commit: b983c816cb0c1614eaeed1cc1bcee90b0d724cc1
Parents: 2c250c6
Author: Jonathan Ellis jbel...@apache.org
Authored: Tue Sep 11 14:33:13 2012 -0500
Committer: Jonathan Ellis jbel...@apache.org
Committed: Tue Sep 11 14:33:13 2012 -0500

--
 conf/cassandra.yaml |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/b983c816/conf/cassandra.yaml
--
diff --git a/conf/cassandra.yaml b/conf/cassandra.yaml
index 2b20edf..058cd81 100644
--- a/conf/cassandra.yaml
+++ b/conf/cassandra.yaml
@@ -21,7 +21,7 @@ cluster_name: 'Test Cluster'
 #
 # If you already have a cluster with 1 token per node, and wish to migrate to 
 # multiple tokens per node, see http://wiki.apache.org/cassandra/Operations
-num_tokens: 256
+# num_tokens: 256
 
 # If you haven't specified num_tokens, or have set it to the default of 1 then
 # you should always specify InitialToken when setting up a production



[jira] [Resolved] (CASSANDRA-4641) Make upgrade to vnodes only happen on new installs

2012-09-11 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis resolved CASSANDRA-4641.
---

   Resolution: Fixed
Fix Version/s: (was: 1.2.0 beta 1)
 Reviewer:   (was: brandon.williams)
 Assignee: (was: Eric Evans)

done by reverting 94509cbd7ea1c0b4ab6f3bad9f6b0cac68928a74

 Make upgrade to vnodes only happen on new installs
 --

 Key: CASSANDRA-4641
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4641
 Project: Cassandra
  Issue Type: Improvement
Reporter: Brandon Williams

 We should make vnodes be the default for new installs, however, just enabling 
 the 'num_tokens' parameter for upgrading is too flimsy.  Instead, we should 
 have a jmx/nodetool operation to do the upgrading.

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


[jira] [Created] (CASSANDRA-4648) Unable to start Cassandra with simple authentication enabled

2012-09-11 Thread John Sanda (JIRA)
John Sanda created CASSANDRA-4648:
-

 Summary: Unable to start Cassandra with simple authentication 
enabled
 Key: CASSANDRA-4648
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4648
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Affects Versions: 1.2.0
 Environment: Mac OS X
Reporter: John Sanda


I followed the steps for enabling simple authentication as described here, 
http://www.datastax.com/docs/1.1/configuration/authentication. I tried starting 
Cassandra with, 

cassandra -f -Dpasswd.properties=conf/passwd.properties 
-Daccess.properties=conf/access.properties

Start up failed with this exception in my log:

ERROR [main] 2012-09-11 15:03:04,642 CassandraDaemon.java (line 403) Exception 
encountered during startup
java.lang.AssertionError: 
org.apache.cassandra.exceptions.InvalidRequestException: You have not logged in
at 
org.apache.cassandra.cql3.QueryProcessor.processInternal(QueryProcessor.java:136)
at org.apache.cassandra.db.SystemTable.checkHealth(SystemTable.java:298)
at 
org.apache.cassandra.service.CassandraDaemon.setup(CassandraDaemon.java:203)
at 
org.apache.cassandra.service.CassandraDaemon.activate(CassandraDaemon.java:386)
at 
org.apache.cassandra.service.CassandraDaemon.main(CassandraDaemon.java:429)
Caused by: org.apache.cassandra.exceptions.InvalidRequestException: You have 
not logged in
at 
org.apache.cassandra.service.ClientState.validateLogin(ClientState.java:254)
at 
org.apache.cassandra.service.ClientState.hasColumnFamilyAccess(ClientState.java:235)
at 
org.apache.cassandra.cql3.statements.SelectStatement.checkAccess(SelectStatement.java:105)
at 
org.apache.cassandra.cql3.QueryProcessor.processStatement(QueryProcessor.java:106)
at 
org.apache.cassandra.cql3.QueryProcessor.processInternal(QueryProcessor.java:124)
... 4 more

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


[jira] [Updated] (CASSANDRA-4633) cassandra-stress: --enable-cql does not work with COUNTER_ADD

2012-09-11 Thread Aleksey Yeschenko (JIRA)

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

Aleksey Yeschenko updated CASSANDRA-4633:
-

Attachment: CASSANDRA-4633.patch

 cassandra-stress:  --enable-cql does not work with COUNTER_ADD
 --

 Key: CASSANDRA-4633
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4633
 Project: Cassandra
  Issue Type: Bug
  Components: Tools
Reporter: Cathy Daw
Assignee: Aleksey Yeschenko
Priority: Minor
 Fix For: 1.2.0

 Attachments: CASSANDRA-4633.patch


 When I remove --enable-cql the following runs successfully.
 Note:  INSERT/READ are fine.
 {code}
 ./cassandra-stress --operation=COUNTER_ADD --enable-cql 
 --replication-factor=3 --consistency-level=ONE --num-keys=1  --columns=20 
 total,interval_op_rate,interval_key_rate,avg_latency,elapsed_time
 Operation [1] retried 10 times - error incrementing key 0001 
 ((InvalidRequestException): cannot parse 'C58' as hex bytes)
 Operation [0] retried 10 times - error incrementing key  
 ((InvalidRequestException): cannot parse 'C58' as hex bytes)
 0,0,0,NaN,0
 FAILURE
 {code}

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


git commit: fix counter add/get using CQL2 and CQL3 in stress tool patch by Aleksey Yeschenko; reviewed by Pavel Yaskevich for CASSANDRA-4633

2012-09-11 Thread xedin
Updated Branches:
  refs/heads/trunk b983c816c - c5df20832


fix counter add/get using CQL2 and CQL3 in stress tool
patch by Aleksey Yeschenko; reviewed by Pavel Yaskevich for CASSANDRA-4633


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

Branch: refs/heads/trunk
Commit: c5df208327826dd197f1a9f743243bcd53de50f5
Parents: b983c81
Author: Pavel Yaskevich xe...@apache.org
Authored: Tue Sep 11 22:52:01 2012 +0300
Committer: Pavel Yaskevich xe...@apache.org
Committed: Tue Sep 11 22:52:01 2012 +0300

--
 CHANGES.txt|1 +
 .../src/org/apache/cassandra/stress/Session.java   |   47 +--
 .../stress/operations/CqlCounterAdder.java |9 ++-
 .../stress/operations/CqlCounterGetter.java|   17 -
 4 files changed, 62 insertions(+), 12 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/c5df2083/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 1af1a4a..8d373cf 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -59,6 +59,7 @@
  * update stress tool to be able to use CQL3 (CASSANDRA-4406)
  * Accept all thrift update on CQL3 cf but don't expose their metadata 
(CASSANDRA-4377)
  * Replace Throttle with Guava's RateLimiter for HintedHandOff (CASSANDRA-4541)
+ * fix counter add/get using CQL2 and CQL3 in stress tool (CASSANDRA-4633)
 
 
 1.1.6

http://git-wip-us.apache.org/repos/asf/cassandra/blob/c5df2083/tools/stress/src/org/apache/cassandra/stress/Session.java
--
diff --git a/tools/stress/src/org/apache/cassandra/stress/Session.java 
b/tools/stress/src/org/apache/cassandra/stress/Session.java
index eb1a902..8148522 100644
--- a/tools/stress/src/org/apache/cassandra/stress/Session.java
+++ b/tools/stress/src/org/apache/cassandra/stress/Session.java
@@ -47,6 +47,7 @@ public class Session implements Serializable
 // command line options
 public static final Options availableOptions = new Options();
 
+public static final String KEYSPACE_NAME = Keyspace1;
 public static final String DEFAULT_COMPARATOR = AsciiType;
 public static final String DEFAULT_VALIDATOR  = BytesType;
 
@@ -535,7 +536,7 @@ public class Session implements Serializable
 }
 
 /**
- * Create Keyspace1 with Standard1 and Super1 column families
+ * Create Keyspace with Standard and Super/Counter column families
  */
 public void createKeySpaces()
 {
@@ -543,7 +544,7 @@ public class Session implements Serializable
 String defaultComparator = comparator == null ? DEFAULT_COMPARATOR : 
comparator;
 
 // column family for standard columns
-CfDef standardCfDef = new CfDef(Keyspace1, Standard1);
+CfDef standardCfDef = new CfDef(KEYSPACE_NAME, Standard1);
 MapString, String compressionOptions = new HashMapString, String();
 if (compression != null)
 compressionOptions.put(sstable_compression, compression);
@@ -568,19 +569,27 @@ public class Session implements Serializable
 }
 
 // column family with super columns
-CfDef superCfDef = new CfDef(Keyspace1, 
Super1).setColumn_type(Super);
+CfDef superCfDef = new CfDef(KEYSPACE_NAME, 
Super1).setColumn_type(Super);
 superCfDef.setComparator_type(DEFAULT_COMPARATOR)
   .setSubcomparator_type(defaultComparator)
   .setDefault_validation_class(DEFAULT_VALIDATOR)
   .setCompression_options(compressionOptions);
 
 // column family for standard counters
-CfDef counterCfDef = new CfDef(Keyspace1, 
Counter1).setDefault_validation_class(CounterColumnType).setReplicate_on_write(replicateOnWrite).setCompression_options(compressionOptions);
+CfDef counterCfDef = new CfDef(KEYSPACE_NAME, 
Counter1).setComparator_type(defaultComparator)
+ 
.setComparator_type(defaultComparator)
+ 
.setDefault_validation_class(CounterColumnType)
+ 
.setReplicate_on_write(replicateOnWrite)
+ 
.setCompression_options(compressionOptions);
 
 // column family with counter super columns
-CfDef counterSuperCfDef = new CfDef(Keyspace1, 

[jira] [Commented] (CASSANDRA-4617) OPTIMIZE_LOCAL_REQUESTS=false no longer works

2012-09-11 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis commented on CASSANDRA-4617:
---

Related: CASSANDRA-4648

 OPTIMIZE_LOCAL_REQUESTS=false no longer works
 -

 Key: CASSANDRA-4617
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4617
 Project: Cassandra
  Issue Type: Bug
Affects Versions: 1.2.0 beta 1
Reporter: Jonathan Ellis
Assignee: Sylvain Lebresne
Priority: Trivial
 Fix For: 1.2.0


 SystemTable.checkHealth is called before starting to listen for intra-cluster 
 RPC requests, so since QueryProcessor compiles down to StorageProxy calls, it 
 will time out and fail the server startup.

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


[jira] [Updated] (CASSANDRA-4648) Unable to start Cassandra with simple authentication enabled

2012-09-11 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis updated CASSANDRA-4648:
--

Affects Version/s: (was: 1.2.0)
   1.2.0 beta 1
Fix Version/s: 1.2.0
 Assignee: Sylvain Lebresne

Related: CASSANDRA-4617

I think we need to either not use QP internally, or add a 
compile-and-local-query only mode that skips StorageProxy and auth.

 Unable to start Cassandra with simple authentication enabled
 

 Key: CASSANDRA-4648
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4648
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Affects Versions: 1.2.0 beta 1
 Environment: Mac OS X
Reporter: John Sanda
Assignee: Sylvain Lebresne
  Labels: security
 Fix For: 1.2.0


 I followed the steps for enabling simple authentication as described here, 
 http://www.datastax.com/docs/1.1/configuration/authentication. I tried 
 starting Cassandra with, 
 cassandra -f -Dpasswd.properties=conf/passwd.properties 
 -Daccess.properties=conf/access.properties
 Start up failed with this exception in my log:
 ERROR [main] 2012-09-11 15:03:04,642 CassandraDaemon.java (line 403) 
 Exception encountered during startup
 java.lang.AssertionError: 
 org.apache.cassandra.exceptions.InvalidRequestException: You have not logged 
 in
 at 
 org.apache.cassandra.cql3.QueryProcessor.processInternal(QueryProcessor.java:136)
 at 
 org.apache.cassandra.db.SystemTable.checkHealth(SystemTable.java:298)
 at 
 org.apache.cassandra.service.CassandraDaemon.setup(CassandraDaemon.java:203)
 at 
 org.apache.cassandra.service.CassandraDaemon.activate(CassandraDaemon.java:386)
 at 
 org.apache.cassandra.service.CassandraDaemon.main(CassandraDaemon.java:429)
 Caused by: org.apache.cassandra.exceptions.InvalidRequestException: You have 
 not logged in
 at 
 org.apache.cassandra.service.ClientState.validateLogin(ClientState.java:254)
 at 
 org.apache.cassandra.service.ClientState.hasColumnFamilyAccess(ClientState.java:235)
 at 
 org.apache.cassandra.cql3.statements.SelectStatement.checkAccess(SelectStatement.java:105)
 at 
 org.apache.cassandra.cql3.QueryProcessor.processStatement(QueryProcessor.java:106)
 at 
 org.apache.cassandra.cql3.QueryProcessor.processInternal(QueryProcessor.java:124)
 ... 4 more

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


[jira] [Commented] (CASSANDRA-4500) cqlsh: understand updated encodings for collections

2012-09-11 Thread paul cannon (JIRA)

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

paul cannon commented on CASSANDRA-4500:


Yeah, it was on purpose. I'd have used an immutable dict for the maps as well, 
if it were readily available. I don't think there should be any expectations 
that the thing called a list in CQL parlance is the same thing as a list in 
Python.

 cqlsh: understand updated encodings for collections
 ---

 Key: CASSANDRA-4500
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4500
 Project: Cassandra
  Issue Type: Improvement
  Components: Tools
Affects Versions: 1.2.0 beta 1
Reporter: paul cannon
Assignee: paul cannon
  Labels: cqlsh
 Fix For: 1.2.0 beta 1

 Attachments: 4500.patch.txt


 After CASSANDRA-4453, collections will be represented using the binary 
 encoding in thrift CqlResults instead of json. Update cqlsh (and python-cql 
 as necessary) to support.

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


[jira] [Reopened] (CASSANDRA-4565) TTL columns with older then gcgrace do not need to flush

2012-09-11 Thread Aleksey Yeschenko (JIRA)

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

Aleksey Yeschenko reopened CASSANDRA-4565:
--


 TTL columns with older then gcgrace do not need to flush
 

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

 Attachments: cassandra-4565.patch.1.txt


 With memcache many people are willing to sacrifice durability for 
 performance. Cassandra has a TimeToLive feature that can be used in caching 
 scenarios with low values for gc_grace_seconds. However from a code dive it 
 seems that cassandra will always write TTL to disk, even those that are 
 beyond gc_grace_seconds. If a use case very large memtables,small ttl, and 
 small gc_grace it is possible that flushing these columns to disk can be 
 skipped entirely in some scenarios. 

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


[jira] [Updated] (CASSANDRA-4565) TTL columns with older then gcgrace do not need to flush

2012-09-11 Thread Aleksey Yeschenko (JIRA)

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

Aleksey Yeschenko updated CASSANDRA-4565:
-

Reviewer: jbellis

 TTL columns with older then gcgrace do not need to flush
 

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

 Attachments: cassandra-4565.patch.1.txt


 With memcache many people are willing to sacrifice durability for 
 performance. Cassandra has a TimeToLive feature that can be used in caching 
 scenarios with low values for gc_grace_seconds. However from a code dive it 
 seems that cassandra will always write TTL to disk, even those that are 
 beyond gc_grace_seconds. If a use case very large memtables,small ttl, and 
 small gc_grace it is possible that flushing these columns to disk can be 
 skipped entirely in some scenarios. 

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


git commit: Add SSTable count per level to cfstats patch by yukim; reviewed by jbellis for CASSANDRA-4537

2012-09-11 Thread yukim
Updated Branches:
  refs/heads/trunk c5df20832 - c64d975cd


Add SSTable count per level to cfstats patch by yukim; reviewed by jbellis for 
CASSANDRA-4537


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

Branch: refs/heads/trunk
Commit: c64d975cdf9eebddb04801573035a7272f779fed
Parents: c5df208
Author: Yuki Morishita yu...@apache.org
Authored: Tue Sep 11 17:22:49 2012 -0500
Committer: Yuki Morishita yu...@apache.org
Committed: Tue Sep 11 17:22:49 2012 -0500

--
 CHANGES.txt|1 +
 .../org/apache/cassandra/db/ColumnFamilyStore.java |7 +
 .../cassandra/db/ColumnFamilyStoreMBean.java   |6 
 .../db/compaction/LeveledCompactionStrategy.java   |5 +++
 .../cassandra/db/compaction/LeveledManifest.java   |8 +
 src/java/org/apache/cassandra/tools/NodeCmd.java   |   21 +++
 6 files changed, 48 insertions(+), 0 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/c64d975c/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 8d373cf..630ae18 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -60,6 +60,7 @@
  * Accept all thrift update on CQL3 cf but don't expose their metadata 
(CASSANDRA-4377)
  * Replace Throttle with Guava's RateLimiter for HintedHandOff (CASSANDRA-4541)
  * fix counter add/get using CQL2 and CQL3 in stress tool (CASSANDRA-4633)
+ * Add sstable count per level to cfstats (CASSANDRA-4537)
 
 
 1.1.6

http://git-wip-us.apache.org/repos/asf/cassandra/blob/c64d975c/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
--
diff --git a/src/java/org/apache/cassandra/db/ColumnFamilyStore.java 
b/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
index d292a63..b539228 100644
--- a/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
+++ b/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
@@ -2000,6 +2000,13 @@ public class ColumnFamilyStore implements 
ColumnFamilyStoreMBean
: 0;
 }
 
+public int[] getSSTableCountPerLevel()
+{
+return compactionStrategy instanceof LeveledCompactionStrategy
+   ? ((LeveledCompactionStrategy) 
compactionStrategy).getAllLevelSize()
+   : null;
+}
+
 public static class ViewFragment
 {
 public final ListSSTableReader sstables;

http://git-wip-us.apache.org/repos/asf/cassandra/blob/c64d975c/src/java/org/apache/cassandra/db/ColumnFamilyStoreMBean.java
--
diff --git a/src/java/org/apache/cassandra/db/ColumnFamilyStoreMBean.java 
b/src/java/org/apache/cassandra/db/ColumnFamilyStoreMBean.java
index b9fee05..9b18c23 100644
--- a/src/java/org/apache/cassandra/db/ColumnFamilyStoreMBean.java
+++ b/src/java/org/apache/cassandra/db/ColumnFamilyStoreMBean.java
@@ -323,4 +323,10 @@ public interface ColumnFamilyStoreMBean
  * @return the number of SSTables in L0.  Always return 0 if Leveled 
compaction is not enabled.
  */
 public int getUnleveledSSTables();
+
+/**
+ * @return sstable count for each level. null unless leveled compaction is 
used.
+ * array index corresponds to level(int[0] is for level 0, ...).
+ */
+public int[] getSSTableCountPerLevel();
 }

http://git-wip-us.apache.org/repos/asf/cassandra/blob/c64d975c/src/java/org/apache/cassandra/db/compaction/LeveledCompactionStrategy.java
--
diff --git 
a/src/java/org/apache/cassandra/db/compaction/LeveledCompactionStrategy.java 
b/src/java/org/apache/cassandra/db/compaction/LeveledCompactionStrategy.java
index f6b0d6d..ced79aa 100644
--- a/src/java/org/apache/cassandra/db/compaction/LeveledCompactionStrategy.java
+++ b/src/java/org/apache/cassandra/db/compaction/LeveledCompactionStrategy.java
@@ -88,6 +88,11 @@ public class LeveledCompactionStrategy extends 
AbstractCompactionStrategy implem
 return manifest.getLevelSize(i);
 }
 
+public int[] getAllLevelSize()
+{
+return manifest.getAllLevelSize();
+}
+
 /**
  * the only difference between background and maximal in LCS is that 
maximal is still allowed
  * (by explicit user request) even when compaction is disabled.

http://git-wip-us.apache.org/repos/asf/cassandra/blob/c64d975c/src/java/org/apache/cassandra/db/compaction/LeveledManifest.java
--
diff --git 

[jira] [Resolved] (CASSANDRA-4537) We should emit number of sstables in each level from JMX

2012-09-11 Thread Yuki Morishita (JIRA)

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

Yuki Morishita resolved CASSANDRA-4537.
---

   Resolution: Fixed
Fix Version/s: (was: 1.2.1)
   1.2.0 beta 1

Committed with above nit fixed.

 We should emit number of sstables in each level from JMX
 

 Key: CASSANDRA-4537
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4537
 Project: Cassandra
  Issue Type: Bug
Affects Versions: 1.0.0
Reporter: sankalp kohli
Assignee: Yuki Morishita
Priority: Minor
  Labels: compaction, leveled
 Fix For: 1.2.0 beta 1

 Attachments: 4537.txt, 4537-v2.txt

   Original Estimate: 12h
  Remaining Estimate: 12h

 We should add methods to this Mbean 
 org.apache.cassandra.db.ColumnFamilyStoreMBean
 These metrics will be helpful to see how sstables are distributed in 
 different levels and how they move to higher level with time. 
 Currently we can see this by looking at the json file but with JMX, we can 
 monitor the historic values over time using any monitoring tool.  

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


[jira] [Created] (CASSANDRA-4649) Cassandra 1.2 should not accept CQL version 3.0.0-beta1

2012-09-11 Thread paul cannon (JIRA)
paul cannon created CASSANDRA-4649:
--

 Summary: Cassandra 1.2 should not accept CQL version 3.0.0-beta1
 Key: CASSANDRA-4649
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4649
 Project: Cassandra
  Issue Type: Bug
  Components: API
Affects Versions: 1.2.0
Reporter: paul cannon
Priority: Minor




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


[jira] [Updated] (CASSANDRA-4559) implement token relocation

2012-09-11 Thread Brandon Williams (JIRA)

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

Brandon Williams updated CASSANDRA-4559:


Attachment: (was: 4559.txt)

 implement token relocation
 --

 Key: CASSANDRA-4559
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4559
 Project: Cassandra
  Issue Type: Sub-task
  Components: Core, Tools
Affects Versions: 1.2.0 beta 1
Reporter: Eric Evans
Assignee: Eric Evans
  Labels: vnodes
 Fix For: 1.2.0 beta 1


 Whatever the specifics of a _shuffle_ (see CASSANDRA-4443), it will be 
 necessary to relocate a range from one node to another.
 _Edit0: Linked in new patch containing tests._
 
 h3. Patches
 ||Compare||Raw diff||Description||
 |[010_refactor_range_move|https://github.com/acunu/cassandra/compare/top-bases/p/4443/010_refactor_range_move...p/4443/010_refactor_range_move]|[010_refactor_range_move.patch|https://github.com/acunu/cassandra/compare/top-bases/p/4443/010_refactor_range_move...p/4443/010_refactor_range_move.diff]|No
  Description|
 |[020_calculate_pending|https://github.com/acunu/cassandra/compare/top-bases/p/4443/020_calculate_pending...p/4443/020_calculate_pending]|[020_calculate_pending.patch|https://github.com/acunu/cassandra/compare/top-bases/p/4443/020_calculate_pending...p/4443/020_calculate_pending.diff]|No
  Description|
 |[030_relocate_token|https://github.com/acunu/cassandra/compare/top-bases/p/4443/030_relocate_token...p/4443/030_relocate_token]|[030_relocate_token.patch|https://github.com/acunu/cassandra/compare/top-bases/p/4443/030_relocate_token...p/4443/030_relocate_token.diff]|No
  Description|
 |[040_tests|https://github.com/acunu/cassandra/compare/top-bases/p/4443/040_tests...p/4443/040_tests]|[040_tests.patch|https://github.com/acunu/cassandra/compare/top-bases/p/4443/040_tests...p/4443/040_tests.diff]|No
  Description|
 
 _Note: These are branches managed with TopGit. If you are applying the patch 
 output manually, you will either need to filter the TopGit metadata files 
 (i.e. {{wget -O - url | filterdiff -x*.topdeps -x*.topmsg | patch -p1}}), 
 or remove them afterward ({{rm .topmsg .topdeps}})._

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


[jira] [Updated] (CASSANDRA-4559) implement token relocation

2012-09-11 Thread Brandon Williams (JIRA)

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

Brandon Williams updated CASSANDRA-4559:


Attachment: 4559.txt

At least one problem is that cloneAfterAllSettled doesn't take into account 
relocating tokens, only moving tokens.  Updated patch fixes that, but there's 
still something wrong, however nodes at least stream out now.

 implement token relocation
 --

 Key: CASSANDRA-4559
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4559
 Project: Cassandra
  Issue Type: Sub-task
  Components: Core, Tools
Affects Versions: 1.2.0 beta 1
Reporter: Eric Evans
Assignee: Eric Evans
  Labels: vnodes
 Fix For: 1.2.0 beta 1

 Attachments: 4559.txt


 Whatever the specifics of a _shuffle_ (see CASSANDRA-4443), it will be 
 necessary to relocate a range from one node to another.
 _Edit0: Linked in new patch containing tests._
 
 h3. Patches
 ||Compare||Raw diff||Description||
 |[010_refactor_range_move|https://github.com/acunu/cassandra/compare/top-bases/p/4443/010_refactor_range_move...p/4443/010_refactor_range_move]|[010_refactor_range_move.patch|https://github.com/acunu/cassandra/compare/top-bases/p/4443/010_refactor_range_move...p/4443/010_refactor_range_move.diff]|No
  Description|
 |[020_calculate_pending|https://github.com/acunu/cassandra/compare/top-bases/p/4443/020_calculate_pending...p/4443/020_calculate_pending]|[020_calculate_pending.patch|https://github.com/acunu/cassandra/compare/top-bases/p/4443/020_calculate_pending...p/4443/020_calculate_pending.diff]|No
  Description|
 |[030_relocate_token|https://github.com/acunu/cassandra/compare/top-bases/p/4443/030_relocate_token...p/4443/030_relocate_token]|[030_relocate_token.patch|https://github.com/acunu/cassandra/compare/top-bases/p/4443/030_relocate_token...p/4443/030_relocate_token.diff]|No
  Description|
 |[040_tests|https://github.com/acunu/cassandra/compare/top-bases/p/4443/040_tests...p/4443/040_tests]|[040_tests.patch|https://github.com/acunu/cassandra/compare/top-bases/p/4443/040_tests...p/4443/040_tests.diff]|No
  Description|
 
 _Note: These are branches managed with TopGit. If you are applying the patch 
 output manually, you will either need to filter the TopGit metadata files 
 (i.e. {{wget -O - url | filterdiff -x*.topdeps -x*.topmsg | patch -p1}}), 
 or remove them afterward ({{rm .topmsg .topdeps}})._

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


[jira] [Updated] (CASSANDRA-4649) Cassandra 1.2 should not accept CQL version 3.0.0-beta1

2012-09-11 Thread paul cannon (JIRA)

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

paul cannon updated CASSANDRA-4649:
---

Description: 
During Cassandra 1.1's whole lifecycle, the CREATE KEYSPACE syntax was pretty 
dramatically and incompatibly different from what is there now for 1.2. That's 
ok, since we explicitly said there could be breaking changes in the syntax 
before 3.0.0 final, but at least we should make it clear that 3.0.0 is not 
compatible with the 3.0.0-beta1 syntax we had out for quite a while.

If we don't want to reject connections asking for 3.0.0-beta1, we should bump 
the version number to 3.0.1 or something.
 Labels: cql3  (was: )

 Cassandra 1.2 should not accept CQL version 3.0.0-beta1
 -

 Key: CASSANDRA-4649
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4649
 Project: Cassandra
  Issue Type: Bug
  Components: API
Affects Versions: 1.2.0
Reporter: paul cannon
Priority: Minor
  Labels: cql3

 During Cassandra 1.1's whole lifecycle, the CREATE KEYSPACE syntax was pretty 
 dramatically and incompatibly different from what is there now for 1.2. 
 That's ok, since we explicitly said there could be breaking changes in the 
 syntax before 3.0.0 final, but at least we should make it clear that 3.0.0 is 
 not compatible with the 3.0.0-beta1 syntax we had out for quite a while.
 If we don't want to reject connections asking for 3.0.0-beta1, we should bump 
 the version number to 3.0.1 or something.

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


[jira] [Commented] (CASSANDRA-4417) invalid counter shard detected

2012-09-11 Thread Omid Aladini (JIRA)

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

Omid Aladini commented on CASSANDRA-4417:
-

{quote}
A simple workaround is to use batch commit log, but that has a potentially 
important performance impact.
{quote}

I'm a bit confused why batch commit would solve the problem. If cassandra 
crashes before the batch is fsynced, the counter mutations which it was the 
leader for will still be lost although they might have been applied on other 
replicas. The difference would be that the mutations won't be acknowledged to 
the client, and since counters aren't idempotent, the client won't know weather 
to retry or not. Am I missing something?

 invalid counter shard detected 
 ---

 Key: CASSANDRA-4417
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4417
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Affects Versions: 1.1.1
 Environment: Amazon Linux
Reporter: Senthilvel Rangaswamy

 Seeing errors like these:
 2012-07-06_07:00:27.22662 ERROR 07:00:27,226 invalid counter shard detected; 
 (17bfd850-ac52-11e1--6ecd0b5b61e7, 1, 13) and 
 (17bfd850-ac52-11e1--6ecd0b5b61e7, 1, 1) differ only in count; will pick 
 highest to self-heal; this indicates a bug or corruption generated a bad 
 counter shard
 What does it mean ?

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


[jira] [Commented] (CASSANDRA-4537) We should emit number of sstables in each level from JMX

2012-09-11 Thread Hudson (JIRA)

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

Hudson commented on CASSANDRA-4537:
---

Integrated in Cassandra #2090 (See 
[https://builds.apache.org/job/Cassandra/2090/])
Add SSTable count per level to cfstats patch by yukim; reviewed by jbellis 
for CASSANDRA-4537 (Revision c64d975cdf9eebddb04801573035a7272f779fed)

 Result = ABORTED
yukim : 
Files : 
* src/java/org/apache/cassandra/db/compaction/LeveledManifest.java
* src/java/org/apache/cassandra/tools/NodeCmd.java
* src/java/org/apache/cassandra/db/ColumnFamilyStoreMBean.java
* CHANGES.txt
* src/java/org/apache/cassandra/db/ColumnFamilyStore.java
* src/java/org/apache/cassandra/db/compaction/LeveledCompactionStrategy.java


 We should emit number of sstables in each level from JMX
 

 Key: CASSANDRA-4537
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4537
 Project: Cassandra
  Issue Type: Bug
Affects Versions: 1.0.0
Reporter: sankalp kohli
Assignee: Yuki Morishita
Priority: Minor
  Labels: compaction, leveled
 Fix For: 1.2.0 beta 1

 Attachments: 4537.txt, 4537-v2.txt

   Original Estimate: 12h
  Remaining Estimate: 12h

 We should add methods to this Mbean 
 org.apache.cassandra.db.ColumnFamilyStoreMBean
 These metrics will be helpful to see how sstables are distributed in 
 different levels and how they move to higher level with time. 
 Currently we can see this by looking at the json file but with JMX, we can 
 monitor the historic values over time using any monitoring tool.  

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


[jira] [Comment Edited] (CASSANDRA-4417) invalid counter shard detected

2012-09-11 Thread Omid Aladini (JIRA)

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

Omid Aladini edited comment on CASSANDRA-4417 at 9/12/12 10:18 AM:
---

{quote}
A simple workaround is to use batch commit log, but that has a potentially 
important performance impact.
{quote}

I'm a bit confused why batch commit would solve the problem. If cassandra 
crashes before the batch is fsynced, the counter mutations in the batch which 
it was the leader for will still be lost although they might have been applied 
on other replicas. The difference would be that the mutations won't be 
acknowledged to the client, and since counters aren't idempotent, the client 
won't know weather to retry or not. Am I missing something?

  was (Author: omid):
{quote}
A simple workaround is to use batch commit log, but that has a potentially 
important performance impact.
{quote}

I'm a bit confused why batch commit would solve the problem. If cassandra 
crashes before the batch is fsynced, the counter mutations which it was the 
leader for will still be lost although they might have been applied on other 
replicas. The difference would be that the mutations won't be acknowledged to 
the client, and since counters aren't idempotent, the client won't know weather 
to retry or not. Am I missing something?
  
 invalid counter shard detected 
 ---

 Key: CASSANDRA-4417
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4417
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Affects Versions: 1.1.1
 Environment: Amazon Linux
Reporter: Senthilvel Rangaswamy

 Seeing errors like these:
 2012-07-06_07:00:27.22662 ERROR 07:00:27,226 invalid counter shard detected; 
 (17bfd850-ac52-11e1--6ecd0b5b61e7, 1, 13) and 
 (17bfd850-ac52-11e1--6ecd0b5b61e7, 1, 1) differ only in count; will pick 
 highest to self-heal; this indicates a bug or corruption generated a bad 
 counter shard
 What does it mean ?

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


[jira] [Commented] (CASSANDRA-4565) TTL columns with older then gcgrace do not need to flush

2012-09-11 Thread Aleksey Yeschenko (JIRA)

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

Aleksey Yeschenko commented on CASSANDRA-4565:
--

Currently ExpiringColumns are replaced with DeletedColumns in 
ExpiringColumn#create method, which is called when deserializing columns during 
sstable reads.
So expired columns with ttl are being turned into tombstones during compaction, 
but NOT at memtable flush time.
We can turn them into tombstones at flush time too - this should save some 
space but will require additional logic.
But we can't just dismiss them completely no matter how small gcgs is - for the 
same reason that we still write row-level tombstones that are beyond gcgs 
period.
Which is that it can result in unexpected behaviour where deletes never make it 
to disk, as they are lost, and so cannot override existing column values in 
existing sstables.

Do you want to leave it as is or add [expired column with ttl - column 
tombstone] conversion at memtable flush time?

 TTL columns with older then gcgrace do not need to flush
 

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

 Attachments: cassandra-4565.patch.1.txt


 With memcache many people are willing to sacrifice durability for 
 performance. Cassandra has a TimeToLive feature that can be used in caching 
 scenarios with low values for gc_grace_seconds. However from a code dive it 
 seems that cassandra will always write TTL to disk, even those that are 
 beyond gc_grace_seconds. If a use case very large memtables,small ttl, and 
 small gc_grace it is possible that flushing these columns to disk can be 
 skipped entirely in some scenarios. 

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


[Cassandra Wiki] Trivial Update of ZKimberly by ZKimberly

2012-09-11 Thread Apache Wiki
Dear Wiki user,

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

The ZKimberly page has been changed by ZKimberly:
http://wiki.apache.org/cassandra/ZKimberly

New page:
Name: Kimberly LevinBRMy age: 18BRCountry: NetherlandsBRCity: 
Heijningen BRPost code: 4794 RLBRAddress: Stadsedijk 66BRBRAlso 
visit my page - [[http://codblackops2beta.us|call of duty black ops 2 beta]]


[jira] [Created] (CASSANDRA-4650) RangeStreamer should be smarter when picking endpoints for streaming in case of N =3 in each DC.

2012-09-11 Thread sankalp kohli (JIRA)
sankalp kohli created CASSANDRA-4650:


 Summary: RangeStreamer should be smarter when picking endpoints 
for streaming in case of N =3 in each DC.  
 Key: CASSANDRA-4650
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4650
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Affects Versions: 1.1.5
Reporter: sankalp kohli
Priority: Minor


getRangeFetchMap method in RangeStreamer should pick unique nodes to stream 
data from when number of replicas in each DC is three or more. 
When N=3 in a DC, there are two options for streaming a range. Consider an 
example of 4 nodes in one datacenter and replication factor of 3. 
If a node goes down, it needs to recover 3 ranges of data. With current code, 
two nodes could get selected as it orders the node by proximity. 
We ideally will want to select 3 nodes for streaming the data. We can do this 
by selecting unique nodes for each range.  

Advantages:
This will increase the performance of bootstrapping a node and will also put 
less pressure on nodes serving the data. 

Note: This does not affect if N  3 in each DC as then it streams data from 
only 2 nodes. 

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


[jira] [Created] (CASSANDRA-4651) RangeStreamer fails the bootstrap process if any node streaming data fails.

2012-09-11 Thread sankalp kohli (JIRA)
sankalp kohli created CASSANDRA-4651:


 Summary: RangeStreamer fails the bootstrap process if any node 
streaming data fails.
 Key: CASSANDRA-4651
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4651
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Affects Versions: 1.1.5
Reporter: sankalp kohli
Priority: Minor


If any node streaming the data fails, RangeStreamer throws a Runtime exception 
and aborts the bootstrap. If the N = 3, it can stream data from some other 
node and need not fail the bootstrap process. 

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


[jira] [Commented] (CASSANDRA-4559) implement token relocation

2012-09-11 Thread Brandon Williams (JIRA)

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

Brandon Williams commented on CASSANDRA-4559:
-

bq. Updated patch fixes that, but there's still something wrong, however nodes 
at least stream out now.

I take it back that something is still wrong, replicas are all going to right 
places now.  The remaining problems that I see are the aforementioned NPE (very 
rare) and sometimes I see nodes incorrectly fall back to generation comparison 
on token conflicts instead of relocating, leading to different views of the 
ring on different nodes.  I'm not really sure what is causing either of these 
yet.

 implement token relocation
 --

 Key: CASSANDRA-4559
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4559
 Project: Cassandra
  Issue Type: Sub-task
  Components: Core, Tools
Affects Versions: 1.2.0 beta 1
Reporter: Eric Evans
Assignee: Eric Evans
  Labels: vnodes
 Fix For: 1.2.0 beta 1

 Attachments: 4559.txt


 Whatever the specifics of a _shuffle_ (see CASSANDRA-4443), it will be 
 necessary to relocate a range from one node to another.
 _Edit0: Linked in new patch containing tests._
 
 h3. Patches
 ||Compare||Raw diff||Description||
 |[010_refactor_range_move|https://github.com/acunu/cassandra/compare/top-bases/p/4443/010_refactor_range_move...p/4443/010_refactor_range_move]|[010_refactor_range_move.patch|https://github.com/acunu/cassandra/compare/top-bases/p/4443/010_refactor_range_move...p/4443/010_refactor_range_move.diff]|No
  Description|
 |[020_calculate_pending|https://github.com/acunu/cassandra/compare/top-bases/p/4443/020_calculate_pending...p/4443/020_calculate_pending]|[020_calculate_pending.patch|https://github.com/acunu/cassandra/compare/top-bases/p/4443/020_calculate_pending...p/4443/020_calculate_pending.diff]|No
  Description|
 |[030_relocate_token|https://github.com/acunu/cassandra/compare/top-bases/p/4443/030_relocate_token...p/4443/030_relocate_token]|[030_relocate_token.patch|https://github.com/acunu/cassandra/compare/top-bases/p/4443/030_relocate_token...p/4443/030_relocate_token.diff]|No
  Description|
 |[040_tests|https://github.com/acunu/cassandra/compare/top-bases/p/4443/040_tests...p/4443/040_tests]|[040_tests.patch|https://github.com/acunu/cassandra/compare/top-bases/p/4443/040_tests...p/4443/040_tests.diff]|No
  Description|
 
 _Note: These are branches managed with TopGit. If you are applying the patch 
 output manually, you will either need to filter the TopGit metadata files 
 (i.e. {{wget -O - url | filterdiff -x*.topdeps -x*.topmsg | patch -p1}}), 
 or remove them afterward ({{rm .topmsg .topdeps}})._

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


[Cassandra Wiki] Update of RunningCassandraInEclipse by ManuZhang

2012-09-11 Thread Apache Wiki
Dear Wiki user,

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

The RunningCassandraInEclipse page has been changed by ManuZhang:
http://wiki.apache.org/cassandra/RunningCassandraInEclipse?action=diffrev1=37rev2=38

  }}}
  
  Make sure to change the storage-config property so it defines the path to 
your storage-conf.xml file.
-  
+ 
+ Add the following JMX configurations if you want to use nodetool
+ {{{
+ -Djava.rmi.server.hostname=jmx_host
+ -Dcom.sun.management.jmxremote.port=7199
+ -Dcom.sun.management.jmxremote.ssl=false
+ -Dcom.sun.management.jmxremote.authenticate=false
+ }}} 
  
  That should be it. After running the newly created run configuration you 
should see something like this in the console view.
  


[Cassandra Wiki] Update of RunningCassandraInEclipse by ManuZhang

2012-09-11 Thread Apache Wiki
Dear Wiki user,

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

The RunningCassandraInEclipse page has been changed by ManuZhang:
http://wiki.apache.org/cassandra/RunningCassandraInEclipse?action=diffrev1=38rev2=39

  
  Make sure to change the storage-config property so it defines the path to 
your storage-conf.xml file.
  
- Add the following JMX configurations if you want to use nodetool
+ Add the following VM arguments if you want to use nodetool
  {{{
- -Djava.rmi.server.hostname=jmx_host
+ -Djava.rmi.server.hostname=$JMX_HOST
- -Dcom.sun.management.jmxremote.port=7199
+ -Dcom.sun.management.jmxremote.port=$JMX_PORT
  -Dcom.sun.management.jmxremote.ssl=false
  -Dcom.sun.management.jmxremote.authenticate=false
  }}} 
+ 
+ replace $JMX_HOST and $JMX_PORT with your own configurations.
  
  That should be it. After running the newly created run configuration you 
should see something like this in the console view.
  


[jira] [Commented] (CASSANDRA-4565) TTL columns with older then gcgrace do not need to flush

2012-09-11 Thread Edward Capriolo (JIRA)

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

Edward Capriolo commented on CASSANDRA-4565:


I was originally thinking that total columns would have less of a chance of a 
lost delete issue. Since if they exist they will self delete. Not sure how this 
will work if a total column with a shorter total shadows a title column with a 
longer ttl. Then lost update might be an issue.

 TTL columns with older then gcgrace do not need to flush
 

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

 Attachments: cassandra-4565.patch.1.txt


 With memcache many people are willing to sacrifice durability for 
 performance. Cassandra has a TimeToLive feature that can be used in caching 
 scenarios with low values for gc_grace_seconds. However from a code dive it 
 seems that cassandra will always write TTL to disk, even those that are 
 beyond gc_grace_seconds. If a use case very large memtables,small ttl, and 
 small gc_grace it is possible that flushing these columns to disk can be 
 skipped entirely in some scenarios. 

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


[jira] [Created] (CASSANDRA-4652) cqlsh previous command handling

2012-09-11 Thread Dave Finnegan (JIRA)
Dave Finnegan created CASSANDRA-4652:


 Summary: cqlsh previous command handling
 Key: CASSANDRA-4652
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4652
 Project: Cassandra
  Issue Type: Improvement
Reporter: Dave Finnegan
Priority: Minor


In a terminal shell commands can be entered in multi-line mode, similar to 
cqlsh. However, the previous command prompt (up arrow, ^p) provides the 
previous command as a single line which can then be edited without having to 
type the previous command key stroke for each of the multiple lines that were 
originally entered.

So, rather than entering a 5 line command and then hitting the previous line 
keystroke 5 times to reissue the command, then 5 times to reissue the second 
line of the command (which you may edit), then 5 times again for line 3, 5x for 
ln4, 5x for ln5 and finally completing the command, you can simply hit the 
previous command keystroke, edit this (now complex) line, and reissue.

It would be nice if cqlsh would include this same sort of behavior for previous 
command prompting as there are many cases where the previous command is used 
and these commands are often multi-line.

I know that I could just type the original command as one, long, complex 
command line, but cqlsh really wants to take multi-line commands.

So, this is a simple ease of use request.

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


[jira] [Commented] (CASSANDRA-4565) TTL columns with older then gcgrace do not need to flush

2012-09-11 Thread Aleksey Yeschenko (JIRA)

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

Aleksey Yeschenko commented on CASSANDRA-4565:
--

bq. Not sure how this will work if a total column with a shorter total shadows 
a title column with a longer ttl. Then lost update might be an issue.

Or a column with tll shadowing a regular column with no ttl at all. This ttl 
change will be lost.
I'm certain that nothing can be done about it. Turning them into tombstones is 
an option though.

[~jbellis] there is a solution for 4542, but only because we know that if a row 
is in the memtable it can't exist in any of the sstables. I can implement that 
at least.

 TTL columns with older then gcgrace do not need to flush
 

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

 Attachments: cassandra-4565.patch.1.txt


 With memcache many people are willing to sacrifice durability for 
 performance. Cassandra has a TimeToLive feature that can be used in caching 
 scenarios with low values for gc_grace_seconds. However from a code dive it 
 seems that cassandra will always write TTL to disk, even those that are 
 beyond gc_grace_seconds. If a use case very large memtables,small ttl, and 
 small gc_grace it is possible that flushing these columns to disk can be 
 skipped entirely in some scenarios. 

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


[jira] [Created] (CASSANDRA-4653) nodetool cfstats Lantecy unit is wrong , it should be sec (seconds) instead of ms (micro seconds)

2012-09-11 Thread laneser kuo (JIRA)
laneser kuo created CASSANDRA-4653:
--

 Summary: nodetool cfstats Lantecy unit is wrong , it should be sec 
(seconds) instead of ms (micro seconds)
 Key: CASSANDRA-4653
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4653
 Project: Cassandra
  Issue Type: Bug
  Components: Tools
Reporter: laneser kuo
Priority: Trivial


I was mislead by the nodetool cfstats Read Latency and Write Latency data.
Until I read the source code, it should display sec instead of ms.
for example:

outs.println(\t\tRead Latency:  + String.format(%01.3f, 
cfstore.getRecentReadLatencyMicros() / 1000) +  ms.);


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


[jira] [Updated] (CASSANDRA-4650) RangeStreamer should be smarter when picking endpoints for streaming in case of N =3 in each DC.

2012-09-11 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis updated CASSANDRA-4650:
--

Issue Type: Improvement  (was: Bug)

 RangeStreamer should be smarter when picking endpoints for streaming in case 
 of N =3 in each DC.  
 ---

 Key: CASSANDRA-4650
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4650
 Project: Cassandra
  Issue Type: Improvement
  Components: Core
Affects Versions: 1.1.5
Reporter: sankalp kohli
Priority: Minor
  Labels: performance
   Original Estimate: 24h
  Remaining Estimate: 24h

 getRangeFetchMap method in RangeStreamer should pick unique nodes to stream 
 data from when number of replicas in each DC is three or more. 
 When N=3 in a DC, there are two options for streaming a range. Consider an 
 example of 4 nodes in one datacenter and replication factor of 3. 
 If a node goes down, it needs to recover 3 ranges of data. With current code, 
 two nodes could get selected as it orders the node by proximity. 
 We ideally will want to select 3 nodes for streaming the data. We can do this 
 by selecting unique nodes for each range.  
 Advantages:
 This will increase the performance of bootstrapping a node and will also put 
 less pressure on nodes serving the data. 
 Note: This does not affect if N  3 in each DC as then it streams data from 
 only 2 nodes. 

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


[jira] [Updated] (CASSANDRA-4651) RangeStreamer fails the bootstrap process if any node streaming data fails.

2012-09-11 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis updated CASSANDRA-4651:
--

Issue Type: Improvement  (was: Bug)

 RangeStreamer fails the bootstrap process if any node streaming data fails.
 ---

 Key: CASSANDRA-4651
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4651
 Project: Cassandra
  Issue Type: Improvement
  Components: Core
Affects Versions: 1.1.5
Reporter: sankalp kohli
Priority: Minor

 If any node streaming the data fails, RangeStreamer throws a Runtime 
 exception and aborts the bootstrap. If the N = 3, it can stream data from 
 some other node and need not fail the bootstrap process. 

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


[jira] [Commented] (CASSANDRA-4565) TTL columns with older then gcgrace do not need to flush

2012-09-11 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis commented on CASSANDRA-4565:
---

You're right, can't really generalize this...  still worth special casing 
batchlog probably.

 TTL columns with older then gcgrace do not need to flush
 

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

 Attachments: cassandra-4565.patch.1.txt


 With memcache many people are willing to sacrifice durability for 
 performance. Cassandra has a TimeToLive feature that can be used in caching 
 scenarios with low values for gc_grace_seconds. However from a code dive it 
 seems that cassandra will always write TTL to disk, even those that are 
 beyond gc_grace_seconds. If a use case very large memtables,small ttl, and 
 small gc_grace it is possible that flushing these columns to disk can be 
 skipped entirely in some scenarios. 

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


[jira] [Created] (CASSANDRA-4654) Using CQL 3.0

2012-09-11 Thread Nguyen Manh Hung (JIRA)
Nguyen Manh Hung created CASSANDRA-4654:
---

 Summary: Using CQL 3.0
 Key: CASSANDRA-4654
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4654
 Project: Cassandra
  Issue Type: Bug
 Environment: Linux Ubuntu
Reporter: Nguyen Manh Hung


How to use CQL 3.0 with php?
help me, pls

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


[jira] [Updated] (CASSANDRA-4653) nodetool cfstats Lantecy unit is wrong , it should be sec (seconds) instead of ms (micro seconds)

2012-09-11 Thread laneser kuo (JIRA)

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

laneser kuo updated CASSANDRA-4653:
---

Attachment: mstosec.txt

a simple patch for the issue.

 nodetool cfstats Lantecy unit is wrong , it should be sec (seconds) instead 
 of ms (micro seconds)
 -

 Key: CASSANDRA-4653
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4653
 Project: Cassandra
  Issue Type: Bug
  Components: Tools
Reporter: laneser kuo
Priority: Trivial
 Attachments: mstosec.txt


 I was mislead by the nodetool cfstats Read Latency and Write Latency data.
 Until I read the source code, it should display sec instead of ms.
 for example:
 outs.println(\t\tRead Latency:  + String.format(%01.3f, 
 cfstore.getRecentReadLatencyMicros() / 1000) +  ms.);

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


[jira] [Updated] (CASSANDRA-4653) nodetool cfstats Lantecy unit is wrong , it should be sec (seconds) instead of ms (micro seconds)

2012-09-11 Thread laneser kuo (JIRA)

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

laneser kuo updated CASSANDRA-4653:
---

Comment: was deleted

(was: a simple patch.)

 nodetool cfstats Lantecy unit is wrong , it should be sec (seconds) instead 
 of ms (micro seconds)
 -

 Key: CASSANDRA-4653
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4653
 Project: Cassandra
  Issue Type: Bug
  Components: Tools
Reporter: laneser kuo
Priority: Trivial
 Attachments: mstosec.txt


 I was mislead by the nodetool cfstats Read Latency and Write Latency data.
 Until I read the source code, it should display sec instead of ms.
 for example:
 outs.println(\t\tRead Latency:  + String.format(%01.3f, 
 cfstore.getRecentReadLatencyMicros() / 1000) +  ms.);

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