[jira] [Commented] (CASSANDRA-3728) Better error message when a column family creation fails

2012-01-25 Thread Pavel Yaskevich (Commented) (JIRA)

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

Pavel Yaskevich commented on CASSANDRA-3728:


Works for me on the current cassandra-1.0 branch

{noformat}
[git:CASSANDRA-3728?] (~/work/java/git-cassandra) → ./bin/cassandra-cli --host 
localhost
crConnected to: Test Cluster on localhost/9160
eWelcome to Cassandra CLI version 1.0.7-SNAPSHOT

Type 'help;' or '?' for help.
Type 'quit;' or 'exit;' to quit.

[default@unknown] create keyspace ks;
71997dc0-473c-11e1--242d50cf1fdd
Waiting for schema agreement...
... schemas agree across the cluster
[default@unknown] use ks;
Authenticated to keyspace: ks
[default@ks] create column family foo-bar;
Invalid column family name: foo-bar
[default@ks]
{noformat}

Yuki, can you please test too?

 Better error message when a column family creation fails
 

 Key: CASSANDRA-3728
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3728
 Project: Cassandra
  Issue Type: Bug
Reporter: Eric Lubow
Assignee: Pavel Yaskevich
Priority: Minor
  Labels: cli
 Fix For: 1.0.8


 Since '-' characters are not allowed in column family names, there should be 
 an error thrown on column family name validation.
 [default@linkcurrent] create column family foo-bar;
 null

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




[jira] [Commented] (CASSANDRA-2963) Add a convenient way to reset a node's schema

2012-01-25 Thread Pavel Yaskevich (Commented) (JIRA)

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

Pavel Yaskevich commented on CASSANDRA-2963:


Now when CASSANDRA-1391 is committed, to reset the schema you will just need to 
truncate schema_{keyspaces, columnfamilies, columns} and re-set Schema.instance 
to initial (blank) state.

 Add a convenient way to reset a node's schema
 -

 Key: CASSANDRA-2963
 URL: https://issues.apache.org/jira/browse/CASSANDRA-2963
 Project: Cassandra
  Issue Type: New Feature
  Components: Tools
Reporter: Brandon Williams
Assignee: Yuki Morishita
Priority: Minor
  Labels: lhf
 Fix For: 1.1

 Attachments: 0001-Add-resetlocalschema-to-nodetool.patch, 
 system_reset_schema.txt


 People often encounter a schema disagreement where just one node is out of 
 sync.  To get it back in sync, they shutdown the node, move the Schema* and 
 Migration* files out of the system ks, and then start it back up.  Rather 
 than go through this process, it would be nice if you could just tell the 
 node to reset its schema.

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




[jira] [Commented] (CASSANDRA-3559) CFMetaData conversions to Thrift/Avro should probably be inverse one of the other

2012-01-25 Thread Pavel Yaskevich (Commented) (JIRA)

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

Pavel Yaskevich commented on CASSANDRA-3559:


Now when CASSANDRA-1391 is committed we can close this issue because toAvro() 
methods were removed and fromAvro() methods were marked as @Deprecated so there 
is no requirement to change them ever again.

 CFMetaData conversions to Thrift/Avro should probably be inverse one of the 
 other
 -

 Key: CASSANDRA-3559
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3559
 Project: Cassandra
  Issue Type: Improvement
  Components: Core
Reporter: Sylvain Lebresne
Assignee: Sylvain Lebresne
Priority: Minor
  Labels: avro, thrift
 Fix For: 1.1

 Attachments: 3559.patch


 In other word, it would probably be a idea to have:
 {noformat}
   cfm == CFMetadata.fromThrift(cfm.toThrift())
   cfm == CFMetadata.fromAvro(cfm.toAvro())
 {noformat}
 In particular, we could have unit tests to check that, which would avoid 
 things like CASSANDRA-3558.
 It is not the case today for thrift because of the keyAlias. For some reason, 
 if the keyAlias is not set, we return with toThrift() the default alias. I 
 don't think this serves any purpose though.
 The goal of this ticket is to both fix that (unless there is a compelling 
 reason not to) and add unit tests for this.

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




[jira] [Issue Comment Edited] (CASSANDRA-3559) CFMetaData conversions to Thrift/Avro should probably be inverse one of the other

2012-01-25 Thread Pavel Yaskevich (Issue Comment Edited) (JIRA)

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

Pavel Yaskevich edited comment on CASSANDRA-3559 at 1/25/12 9:21 AM:
-

Now when CASSANDRA-1391 is committed we can skip Avro validation and 
concentrate on thrift part because toAvro() methods were removed and fromAvro() 
methods were marked as @Deprecated so there is no requirement to change them 
ever again.

  was (Author: xedin):
Now when CASSANDRA-1391 is committed we can close this issue because 
toAvro() methods were removed and fromAvro() methods were marked as @Deprecated 
so there is no requirement to change them ever again.
  
 CFMetaData conversions to Thrift/Avro should probably be inverse one of the 
 other
 -

 Key: CASSANDRA-3559
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3559
 Project: Cassandra
  Issue Type: Improvement
  Components: Core
Reporter: Sylvain Lebresne
Assignee: Sylvain Lebresne
Priority: Minor
  Labels: avro, thrift
 Fix For: 1.1

 Attachments: 3559.patch


 In other word, it would probably be a idea to have:
 {noformat}
   cfm == CFMetadata.fromThrift(cfm.toThrift())
   cfm == CFMetadata.fromAvro(cfm.toAvro())
 {noformat}
 In particular, we could have unit tests to check that, which would avoid 
 things like CASSANDRA-3558.
 It is not the case today for thrift because of the keyAlias. For some reason, 
 if the keyAlias is not set, we return with toThrift() the default alias. I 
 don't think this serves any purpose though.
 The goal of this ticket is to both fix that (unless there is a compelling 
 reason not to) and add unit tests for this.

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




[jira] [Updated] (CASSANDRA-3559) CFMetaData conversions to Thrift/Native schema should be inverse one of the other

2012-01-25 Thread Sylvain Lebresne (Updated) (JIRA)

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

Sylvain Lebresne updated CASSANDRA-3559:


Description: 
In other word, it would probably be a good idea to have:
{noformat}
  cfm == CFMetadata.fromThrift(cfm.toThrift())
  cfm == CFMetadata.fromSchema(cfm.toSchema())
{noformat}
In particular, we could have unit tests to check that, which would avoid things 
like CASSANDRA-3558.

It is not the case today for thrift because of the keyAlias. For some reason, 
if the keyAlias is not set, we return with toThrift() the default alias. I 
don't think this serves any purpose though.

  was:
In other word, it would probably be a idea to have:
{noformat}
  cfm == CFMetadata.fromThrift(cfm.toThrift())
  cfm == CFMetadata.fromAvro(cfm.toAvro())
{noformat}
In particular, we could have unit tests to check that, which would avoid things 
like CASSANDRA-3558.

It is not the case today for thrift because of the keyAlias. For some reason, 
if the keyAlias is not set, we return with toThrift() the default alias. I 
don't think this serves any purpose though.

The goal of this ticket is to both fix that (unless there is a compelling 
reason not to) and add unit tests for this.

   Priority: Major  (was: Minor)
Summary: CFMetaData conversions to Thrift/Native schema should be 
inverse one of the other  (was: CFMetaData conversions to Thrift/Avro should 
probably be inverse one of the other)

 CFMetaData conversions to Thrift/Native schema should be inverse one of the 
 other
 -

 Key: CASSANDRA-3559
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3559
 Project: Cassandra
  Issue Type: Improvement
  Components: Core
Reporter: Sylvain Lebresne
Assignee: Sylvain Lebresne
  Labels: avro, thrift
 Fix For: 1.1

 Attachments: 3559.patch, CASSANDRA-3559-v2.patch


 In other word, it would probably be a good idea to have:
 {noformat}
   cfm == CFMetadata.fromThrift(cfm.toThrift())
   cfm == CFMetadata.fromSchema(cfm.toSchema())
 {noformat}
 In particular, we could have unit tests to check that, which would avoid 
 things like CASSANDRA-3558.
 It is not the case today for thrift because of the keyAlias. For some reason, 
 if the keyAlias is not set, we return with toThrift() the default alias. I 
 don't think this serves any purpose though.

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




[jira] [Commented] (CASSANDRA-3559) CFMetaData conversions to Thrift/Native schema should be inverse one of the other

2012-01-25 Thread Pavel Yaskevich (Commented) (JIRA)

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

Pavel Yaskevich commented on CASSANDRA-3559:


+1

 CFMetaData conversions to Thrift/Native schema should be inverse one of the 
 other
 -

 Key: CASSANDRA-3559
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3559
 Project: Cassandra
  Issue Type: Improvement
  Components: Core
Reporter: Sylvain Lebresne
Assignee: Sylvain Lebresne
  Labels: avro, thrift
 Fix For: 1.1

 Attachments: 3559-v3.patch, 3559.patch, CASSANDRA-3559-v2.patch


 In other word, it would probably be a good idea to have:
 {noformat}
   cfm == CFMetadata.fromThrift(cfm.toThrift())
   cfm == CFMetadata.fromSchema(cfm.toSchema())
 {noformat}
 In particular, we could have unit tests to check that, which would avoid 
 things like CASSANDRA-3558.
 It is not the case today for thrift because of the keyAlias. For some reason, 
 if the keyAlias is not set, we return with toThrift() the default alias. I 
 don't think this serves any purpose though.

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




git commit: Add snapshot command to trigger snapshot on remote node

2012-01-25 Thread slebresne
Updated Branches:
  refs/heads/trunk 86a7a3d1a - 8142a2fe9


Add snapshot command to trigger snapshot on remote node

patch by vijay; reviewed by slebresne for CASSANDRA-3721 (first part)


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

Branch: refs/heads/trunk
Commit: 8142a2fe93d1ac517e2056b61d4c53c6a4da57ea
Parents: 86a7a3d
Author: Sylvain Lebresne sylv...@datastax.com
Authored: Wed Jan 25 11:58:47 2012 +0100
Committer: Sylvain Lebresne sylv...@datastax.com
Committed: Wed Jan 25 12:02:49 2012 +0100

--
 CHANGES.txt|1 +
 .../org/apache/cassandra/db/SnapshotCommand.java   |   81 +++
 .../cassandra/service/SnapshotVerbHandler.java |   52 +
 .../apache/cassandra/service/StorageService.java   |4 +
 4 files changed, 138 insertions(+), 0 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/8142a2fe/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 07b6213..c0ea71c 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -52,6 +52,7 @@
  * Fix BulkLoader to support new SSTable layout and add stream
throttling to prevent an NPE when there is no yaml config (CASSANDRA-3752)
  * Allow concurrent schema migrations (CASSANDRA-1391)
+ * Add SnapshotCommand to trigger snapshot on remote node (CASSANDRA-3721)
 
 
 1.0.8

http://git-wip-us.apache.org/repos/asf/cassandra/blob/8142a2fe/src/java/org/apache/cassandra/db/SnapshotCommand.java
--
diff --git a/src/java/org/apache/cassandra/db/SnapshotCommand.java 
b/src/java/org/apache/cassandra/db/SnapshotCommand.java
new file mode 100644
index 000..2b49874
--- /dev/null
+++ b/src/java/org/apache/cassandra/db/SnapshotCommand.java
@@ -0,0 +1,81 @@
+package org.apache.cassandra.db;
+
+import java.io.DataInput;
+import java.io.DataInputStream;
+import java.io.DataOutput;
+import java.io.IOException;
+import java.util.Arrays;
+
+import org.apache.cassandra.io.IVersionedSerializer;
+import org.apache.cassandra.io.util.DataOutputBuffer;
+import org.apache.cassandra.io.util.FastByteArrayInputStream;
+import org.apache.cassandra.net.Message;
+import org.apache.cassandra.net.MessageProducer;
+import org.apache.cassandra.service.StorageService;
+import org.apache.cassandra.utils.FBUtilities;
+
+public class SnapshotCommand implements MessageProducer
+{
+private static final SnapshotCommandSerializer serializer = new 
SnapshotCommandSerializer();
+
+public final String keyspace;
+public final String column_family;
+public final String snapshot_name;
+public final boolean clear_snapshot;
+
+public SnapshotCommand(String keyspace, String columnFamily, String 
snapshotName, boolean clearSnapshot)
+{
+this.keyspace = keyspace;
+this.column_family = columnFamily;
+this.snapshot_name = snapshotName;
+this.clear_snapshot = clearSnapshot;
+}
+
+public Message getMessage(Integer version) throws IOException
+{
+DataOutputBuffer dob = new DataOutputBuffer();
+serializer.serialize(this, dob, version);
+return new Message(FBUtilities.getBroadcastAddress(), 
StorageService.Verb.SNAPSHOT, Arrays.copyOf(dob.getData(), dob.getLength()), 
version);
+}
+
+public static SnapshotCommand read(Message message) throws IOException
+{
+byte[] bytes = message.getMessageBody();
+FastByteArrayInputStream bis = new FastByteArrayInputStream(bytes);
+return serializer.deserialize(new DataInputStream(bis), 
message.getVersion());
+}
+
+@Override
+public String toString()
+{
+return SnapshotCommand{ + keyspace=' + keyspace + '\'' +
+  , column_family=' + column_family + '\'' +
+  , snapshot_name= + snapshot_name +
+  , clear_snapshot= + clear_snapshot + '}';
+}
+}
+
+class SnapshotCommandSerializer implements 
IVersionedSerializerSnapshotCommand
+{
+public void serialize(SnapshotCommand snapshot_command, DataOutput dos, 
int version) throws IOException
+{
+dos.writeUTF(snapshot_command.keyspace);
+dos.writeUTF(snapshot_command.column_family);
+dos.writeUTF(snapshot_command.snapshot_name);
+dos.writeBoolean(snapshot_command.clear_snapshot);
+}
+
+public SnapshotCommand deserialize(DataInput dis, int version) throws 
IOException
+{
+String keyspace = dis.readUTF();
+String column_family = dis.readUTF();
+String 

[jira] [Commented] (CASSANDRA-3721) Staggering repair

2012-01-25 Thread Sylvain Lebresne (Commented) (JIRA)

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

Sylvain Lebresne commented on CASSANDRA-3721:
-

Ok, +1 on part 1 (add-snapshot-command). I've committed it. I'll look more 
closely at the rest soonish.

 Staggering repair
 -

 Key: CASSANDRA-3721
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3721
 Project: Cassandra
  Issue Type: Improvement
  Components: Core
Affects Versions: 1.1
Reporter: Vijay
Assignee: Vijay
Priority: Minor
 Fix For: 1.1

 Attachments: 0001-add-snapshot-command.patch, 
 0001-staggering-repair-with-snapshot.patch


 Currently repair runs on all the nodes at once and causing the range of data 
 to be hot (higher latency on reads).
 Sequence:
 1) Send a repair request to all of the nodes so we can hold the references of 
 the SSTables (point at which repair was initiated)
 2) Send Validation on one node at a time (once completed will release 
 references).
 3) Hold the reference of the tree in the requesting node and once everything 
 is complete start diff.
 We can also serialize the streaming part not more than 1 node is involved in 
 the streaming.

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




[jira] [Updated] (CASSANDRA-3761) CQL 3.0

2012-01-25 Thread Sylvain Lebresne (Updated) (JIRA)

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

Sylvain Lebresne updated CASSANDRA-3761:


Attachment: 0005-Rebase-after-CASSANDRA-1391.patch

bq. Anyway, I think what I'm advocating for is common-sense, and it doesn't 
sound like we disagree.

We don't.


I've committed the patches above. I had to rebase following CASSANDRA-1391 
which involved a few changes. I'm attaching those changes as patch 0005 here 
for reference.

I'me leaving this ticket open on purpose, so that it stays the main ticket for 
all the sub-tasks to get this to a 3.0 final.


 CQL 3.0
 ---

 Key: CASSANDRA-3761
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3761
 Project: Cassandra
  Issue Type: New Feature
  Components: API
Reporter: Sylvain Lebresne
Assignee: Sylvain Lebresne
Priority: Critical
  Labels: cql
 Fix For: 1.1

 Attachments: 0001-CQL-3.0-v2.patch, 0001-CQL-3.0.patch, 
 0002-Add-support-for-switching-the-CQL-version-v2.patch, 
 0002-Add-support-for-switching-the-CQL-version.patch, 
 0003-Makes-batches-atomic-v2.patch, 0003-Makes-batches-atomic.patch, 
 0004-Thrift-gen-files-v2.patch, 0004-Thrift-gen-files.patch, 
 0005-Rebase-after-CASSANDRA-1391.patch, cql_tests.py, create_cf_syntaxes.txt


 This ticket is a reformulation/generalization of CASSANDRA-2474. The core 
 change of CQL 3.0 is to introduce the new syntaxes that were discussed in 
 CASSANDRA-2474 that allow to:
 # Provide a better/more native support for wide rows, using the idea of 
 transposed vie.
 # The generalization to composite columns.
 The attached text file create_cf_syntaxes.txt recall the new syntaxes 
 introduced.
 The changes proposed above allow (and strongly suggest in some cases) a 
 number of other changes to the language that this ticket proposes to 
 explore/implement (more details coming in the comments).

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




[jira] [Commented] (CASSANDRA-3778) KEY IN (...) queries do not work

2012-01-25 Thread Sylvain Lebresne (Commented) (JIRA)

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

Sylvain Lebresne commented on CASSANDRA-3778:
-

I just tried with code I just committed on trunk and the test above passes. Not 
sure when/what fixed it though. Are you still able to reproduce on the last 
code?

 KEY IN (...) queries do not work
 

 Key: CASSANDRA-3778
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3778
 Project: Cassandra
  Issue Type: Sub-task
  Components: API
Affects Versions: 1.1
Reporter: Eric Evans
  Labels: cql
 Fix For: 1.1


 {{...KEY IN (...)}} queries fail due to faulty validation.  A pull request 
 for cassandra-dtest was opened that demonstrates this: 
 https://github.com/riptano/cassandra-dtest/pull/2

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




[jira] [Assigned] (CASSANDRA-3781) CQL support for altering key_validation_class in ALTER TABLE

2012-01-25 Thread Sylvain Lebresne (Assigned) (JIRA)

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

Sylvain Lebresne reassigned CASSANDRA-3781:
---

Assignee: Sylvain Lebresne  (was: paul cannon)

 CQL support for altering key_validation_class in ALTER TABLE
 

 Key: CASSANDRA-3781
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3781
 Project: Cassandra
  Issue Type: Improvement
Reporter: Rick Branson
Assignee: Sylvain Lebresne
 Attachments: 3781.patch


 There is currently no way to alter the key_validation_class from CQL. jbellis 
 suggested that this could be done by being able to ALTER the type of the KEY 
 alias.

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




[jira] [Updated] (CASSANDRA-3781) CQL support for altering key_validation_class in ALTER TABLE

2012-01-25 Thread Sylvain Lebresne (Updated) (JIRA)

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

Sylvain Lebresne updated CASSANDRA-3781:


Attachment: 3781.patch

I hope Paul won't mind but it's a two line change so patch attached against 1.1 
for both  cql 2.0 and cql 3.0. Pretty sure the cql 2.0 part can trivially be 
applied to 1.0. 

 CQL support for altering key_validation_class in ALTER TABLE
 

 Key: CASSANDRA-3781
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3781
 Project: Cassandra
  Issue Type: Improvement
Reporter: Rick Branson
Assignee: paul cannon
 Attachments: 3781.patch


 There is currently no way to alter the key_validation_class from CQL. jbellis 
 suggested that this could be done by being able to ALTER the type of the KEY 
 alias.

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




[jira] [Updated] (CASSANDRA-3781) CQL support for altering key_validation_class in ALTER TABLE

2012-01-25 Thread Sylvain Lebresne (Updated) (JIRA)

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

Sylvain Lebresne updated CASSANDRA-3781:


Reviewer: thepaul

 CQL support for altering key_validation_class in ALTER TABLE
 

 Key: CASSANDRA-3781
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3781
 Project: Cassandra
  Issue Type: Improvement
Reporter: Rick Branson
Assignee: Sylvain Lebresne
 Attachments: 3781.patch


 There is currently no way to alter the key_validation_class from CQL. jbellis 
 suggested that this could be done by being able to ALTER the type of the KEY 
 alias.

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




[jira] [Resolved] (CASSANDRA-3769) Allow for comments in a cassandra-cli file

2012-01-25 Thread Jonathan Ellis (Resolved) (JIRA)

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

Jonathan Ellis resolved CASSANDRA-3769.
---

Resolution: Not A Problem

 Allow for comments in a cassandra-cli file
 --

 Key: CASSANDRA-3769
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3769
 Project: Cassandra
  Issue Type: Improvement
  Components: Tools
Affects Versions: 1.0.6
 Environment: Amazon Linux w/ Apache Cassandra 1.0.6
Reporter: Andrew Halloran
Priority: Trivial
  Labels: cassandra-cli

 I use the cassandra-cli to create schemas, update schemas, and make other 
 calls to interrogate keyspaces and columns. I load pre-written statements 
 from files using the -f option, example: bin/cassandra-cli -host localhost 
 -port 9160 -f mystatements.txt. It would be useful if I could comment my 
 statement files with comments similar to how you can comment script and 
 C++/Java code.
 Example contents of mystatements.txt file:
 update column family users// This is my column which 
 holds all my user information
 with comparator = UTF8Type// My column names are all 
 strings so I will use UTF8Type
 and key_validation_class = UTF8Type   // My row key values are also 
 UTF8Type
 and default_validation_class = UTF8Type // Column values will be 
 UTF8Type
 and column_metadata = [
 {column_name: username, validation_class: UTF8Type}, // This 
 column stores the login name of the user
 {column_name: realname, validation_class: UTF8Type}];// This 
 column stores the real world name of user

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




[jira] [Resolved] (CASSANDRA-3728) Better error message when a column family creation fails

2012-01-25 Thread Jonathan Ellis (Resolved) (JIRA)

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

Jonathan Ellis resolved CASSANDRA-3728.
---

   Resolution: Cannot Reproduce
Fix Version/s: (was: 1.0.8)
 Reviewer:   (was: yukim)
 Assignee: (was: Pavel Yaskevich)

 Better error message when a column family creation fails
 

 Key: CASSANDRA-3728
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3728
 Project: Cassandra
  Issue Type: Bug
Reporter: Eric Lubow
Priority: Minor
  Labels: cli

 Since '-' characters are not allowed in column family names, there should be 
 an error thrown on column family name validation.
 [default@linkcurrent] create column family foo-bar;
 null

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




[jira] [Commented] (CASSANDRA-3264) Add wide row paging for ColumnFamilyInputFormat and ColumnFamilyOutputFormat

2012-01-25 Thread Jonathan Ellis (Commented) (JIRA)

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

Jonathan Ellis commented on CASSANDRA-3264:
---

Implemention posted to https://github.com/jbellis/cassandra/tree/3264-3

 Add wide row paging for ColumnFamilyInputFormat and ColumnFamilyOutputFormat
 

 Key: CASSANDRA-3264
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3264
 Project: Cassandra
  Issue Type: Improvement
  Components: Hadoop
Reporter: T Jake Luciani
Assignee: Jonathan Ellis
  Labels: lhf

 Hadoop input/output formats currently can OOM on wide rows.
 We can add a new option to the ConfigHelper like columnPagingSize with a 
 default of Integer.MAX_VALUE.
 The input format would page the row internally rather than pull it over at 
 once.
 The output format could also use this to avoid sending huge rows over at once.

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




[jira] [Updated] (CASSANDRA-3753) Update CqlPreparedResult to provide type information

2012-01-25 Thread Sylvain Lebresne (Updated) (JIRA)

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

Sylvain Lebresne updated CASSANDRA-3753:


Attachment: 0002-Thrift-gen-file-changes.patch
0001-3753-cql3.patch

Attaching patch for cql3. Most of the patch is a slight refactor of the class 
hierarchy to make all this fit better.

For the CqlPrepareResult, this adds an optional liststring of types. With 
that, the count is actually redundant, but I've kept it for compatibility with 
cql2, as it's unclear we'll be able to do the same thing.

I don't think drivers have much support of prepared statement so far so I 
didn't find a clean way to test this. But I did make a manual simple test to 
check it does return the right types in the right order.

 Update CqlPreparedResult to provide type information
 

 Key: CASSANDRA-3753
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3753
 Project: Cassandra
  Issue Type: Improvement
  Components: API
Affects Versions: 1.1
Reporter: Jonathan Ellis
Priority: Critical
  Labels: cql
 Fix For: 1.1

 Attachments: 0001-3753-cql3.patch, 0002-Thrift-gen-file-changes.patch


 As discussed on CASSANDRA-3634, adding type information to a prepared 
 statement would allow more client-side error checking.

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




[jira] [Created] (CASSANDRA-3782) Secondary indexes support for wide rows in CQL 3.0

2012-01-25 Thread Sylvain Lebresne (Created) (JIRA)
Secondary indexes support for wide rows in CQL 3.0
--

 Key: CASSANDRA-3782
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3782
 Project: Cassandra
  Issue Type: Sub-task
Reporter: Sylvain Lebresne
Assignee: Sylvain Lebresne


Currently, CQL 3.0 doesn't allow creating an index on a dynamic CF (with 
COMPACT STORAGE). The goal of this ticket is *not* to support the composite 
case however (CASSANDRA-3680 will tackle this).

I think changes needed to support this are only in the CQL side and covert two 
area:
* Finding a syntax for it
* Currently, the CQL 3 code consider that a CF with any column_metadata defined 
is a non-compact cf. Basically the problem is that we currently use 
column_metadata both for defining a name for a column in the static case, and 
store indexing information. Ideally, we would separate those informations, i.e. 
we could add a new map valueAliases (ByteBuffer - AbstractType) to CFMetadata 
(only used by static CF) and we would keep column_metadata for indexing purpose 
only. However that may be problematic for backward compatibility (with thrift 
in particular), so probably instead we can just add a new boolean 
isStaticColumnName to ColumnDefinition.

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




[jira] [Commented] (CASSANDRA-3782) Secondary indexes support for wide rows in CQL 3.0

2012-01-25 Thread Sylvain Lebresne (Commented) (JIRA)

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

Sylvain Lebresne commented on CASSANDRA-3782:
-

For the syntax, let's consider a typical dynamic CF in CQL 3.0:
{noformat}
CREATE TABLE timeline (
  key int,
  time timestamp,
  event text,
  PRIMARY KEY (key, time)
) WITH COMPACT STORAGE
{noformat}

then a syntax to declare an index could look like:
{noformat}
CREATE INDEX index_name ON timeline WHERE time = 0;
{noformat}
Alternatively, we could have it be:
{noformat}
CREATE INDEX index_name ON timeline(0);
{noformat}
but I feel that will be less intuitive.

There is obviously a lot of possible variation. Maybe it could be worth keeping 
CASSANDRA-3680 in mind too for this.

 Secondary indexes support for wide rows in CQL 3.0
 --

 Key: CASSANDRA-3782
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3782
 Project: Cassandra
  Issue Type: Sub-task
  Components: API
Reporter: Sylvain Lebresne
Assignee: Sylvain Lebresne
 Fix For: 1.1


 Currently, CQL 3.0 doesn't allow creating an index on a dynamic CF (with 
 COMPACT STORAGE). The goal of this ticket is *not* to support the composite 
 case however (CASSANDRA-3680 will tackle this).
 I think changes needed to support this are only in the CQL side and covert 
 two area:
 * Finding a syntax for it
 * Currently, the CQL 3 code consider that a CF with any column_metadata 
 defined is a non-compact cf. Basically the problem is that we currently use 
 column_metadata both for defining a name for a column in the static case, and 
 store indexing information. Ideally, we would separate those informations, 
 i.e. we could add a new map valueAliases (ByteBuffer - AbstractType) to 
 CFMetadata (only used by static CF) and we would keep column_metadata for 
 indexing purpose only. However that may be problematic for backward 
 compatibility (with thrift in particular), so probably instead we can just 
 add a new boolean isStaticColumnName to ColumnDefinition.

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




[jira] [Commented] (CASSANDRA-3762) AutoSaving KeyCache and System load time improvements.

2012-01-25 Thread Vijay (Commented) (JIRA)

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

Vijay commented on CASSANDRA-3762:
--

Bigger test with much spread out data showed some mixed results Tested on 
M24XL nodes in AWS, 8M Keys inserted via Stress tool 3 times to get 
distribution of the keys into the SST's


Trunk shows:
DEBUG [SSTableBatchOpen:1] 2012-01-25 09:48:28,098 SSTableReader.java (line 
193) INDEX LOAD TIME for 
/mnt/data/cassandra070/data/system/LocationInfo/system-LocationInfo-hc-17: 16 
ms.
DEBUG [SSTableBatchOpen:6] 2012-01-25 09:48:47,699 SSTableReader.java (line 
193) INDEX LOAD TIME for 
/mnt/data/cassandra070/data/Keyspace1/Standard1/Keyspace1-Standard1-hc-637: 
4289 ms.
DEBUG [SSTableBatchOpen:3] 2012-01-25 09:48:51,541 SSTableReader.java (line 
193) INDEX LOAD TIME for 
/mnt/data/cassandra070/data/Keyspace1/Standard1/Keyspace1-Standard1-hc-607: 
8136 ms.
DEBUG [SSTableBatchOpen:5] 2012-01-25 09:48:52,910 SSTableReader.java (line 
193) INDEX LOAD TIME for 
/mnt/data/cassandra070/data/Keyspace1/Standard1/Keyspace1-Standard1-hc-429: 
9504 ms.
DEBUG [SSTableBatchOpen:1] 2012-01-25 09:49:07,725 SSTableReader.java (line 
193) INDEX LOAD TIME for 
/mnt/data/cassandra070/data/Keyspace1/Standard1/Keyspace1-Standard1-hc-611: 
24321 ms.
DEBUG [SSTableBatchOpen:7] 2012-01-25 09:49:29,760 SSTableReader.java (line 
193) INDEX LOAD TIME for 
/mnt/data/cassandra070/data/Keyspace1/Standard1/Keyspace1-Standard1-hc-534: 
46348 ms.
DEBUG [SSTableBatchOpen:8] 2012-01-25 09:49:34,972 SSTableReader.java (line 
193) INDEX LOAD TIME for 
/mnt/data/cassandra070/data/Keyspace1/Standard1/Keyspace1-Standard1-hc-462: 
51560 ms.
DEBUG [SSTableBatchOpen:2] 2012-01-25 09:49:35,893 SSTableReader.java (line 
193) INDEX LOAD TIME for 
/mnt/data/cassandra070/data/Keyspace1/Standard1/Keyspace1-Standard1-hc-636: 
52488 ms.
DEBUG [SSTableBatchOpen:4] 2012-01-25 09:49:45,671 SSTableReader.java (line 
193) INDEX LOAD TIME for 
/mnt/data/cassandra070/data/Keyspace1/Standard1/Keyspace1-Standard1-hc-635: 
62258 ms

JMX key cache size:
01/25/2012 09:50:18 + org.archive.jmx.Client KeyCacheSize: 104857584

After this patch:
DEBUG [SSTableBatchOpen:6] 2012-01-25 18:22:33,343 SSTableReader.java (line 
195) INDEX LOAD TIME for 
/mnt/data/cassandra070/data/Keyspace1/Standard1/Keyspace1-Standard1-hc-637: 
5731 ms.
DEBUG [SSTableBatchOpen:6] 2012-01-25 18:22:33,344 SSTableReader.java (line 
198) key cache contains 2/2184533 keys
DEBUG [SSTableBatchOpen:3] 2012-01-25 18:22:34,291 SSTableReader.java (line 
195) INDEX LOAD TIME for 
/mnt/data/cassandra070/data/Keyspace1/Standard1/Keyspace1-Standard1-hc-607: 
6685 ms.
DEBUG [SSTableBatchOpen:3] 2012-01-25 18:22:34,291 SSTableReader.java (line 
198) key cache contains 7619/2184533 keys
DEBUG [SSTableBatchOpen:1] 2012-01-25 18:22:37,144 SSTableReader.java (line 
195) INDEX LOAD TIME for 
/mnt/data/cassandra070/data/Keyspace1/Standard1/Keyspace1-Standard1-hc-611: 
9541 ms.
DEBUG [SSTableBatchOpen:1] 2012-01-25 18:22:37,145 SSTableReader.java (line 
198) key cache contains 45172/2184533 keys
DEBUG [SSTableBatchOpen:5] 2012-01-25 18:22:37,275 SSTableReader.java (line 
195) INDEX LOAD TIME for 
/mnt/data/cassandra070/data/Keyspace1/Standard1/Keyspace1-Standard1-hc-429: 
9664 ms.
DEBUG [SSTableBatchOpen:5] 2012-01-25 18:22:37,276 SSTableReader.java (line 
198) key cache contains 48914/2184533 keys
DEBUG [SSTableBatchOpen:2] 2012-01-25 18:22:42,224 SSTableReader.java (line 
195) INDEX LOAD TIME for 
/mnt/data/cassandra070/data/Keyspace1/Standard1/Keyspace1-Standard1-hc-636: 
14620 ms.
DEBUG [SSTableBatchOpen:2] 2012-01-25 18:22:42,224 SSTableReader.java (line 
198) key cache contains 170841/2184533 keys
DEBUG [SSTableBatchOpen:4] 2012-01-25 18:22:45,053 SSTableReader.java (line 
195) INDEX LOAD TIME for 
/mnt/data/cassandra070/data/Keyspace1/Standard1/Keyspace1-Standard1-hc-635: 
17442 ms.
DEBUG [SSTableBatchOpen:4] 2012-01-25 18:22:45,053 SSTableReader.java (line 
198) key cache contains 241841/2184533 keys
DEBUG [SSTableBatchOpen:8] 2012-01-25 18:23:01,720 SSTableReader.java (line 
195) INDEX LOAD TIME for 
/mnt/data/cassandra070/data/Keyspace1/Standard1/Keyspace1-Standard1-hc-462: 
34107 ms.
DEBUG [SSTableBatchOpen:8] 2012-01-25 18:23:01,720 SSTableReader.java (line 
198) key cache contains 689699/2184533 keys
DEBUG [SSTableBatchOpen:7] 2012-01-25 18:24:19,975 SSTableReader.java (line 
195) INDEX LOAD TIME for 
/mnt/data/cassandra070/data/Keyspace1/Standard1/Keyspace1-Standard1-hc-534: 
112363 ms.
DEBUG [SSTableBatchOpen:7] 2012-01-25 18:24:19,975 SSTableReader.java (line 
198) key cache contains 2184533/2184533 keys

Sizes of the index:
1068
/mnt/data/cassandra070/data/Keyspace1/Standard1/Keyspace1-Standard1-hc-637-Index.db
7852
/mnt/data/cassandra070/data/Keyspace1/Standard1/Keyspace1-Standard1-hc-429-Index.db
20044   

[jira] [Commented] (CASSANDRA-3680) Add Support for Composite Secondary Indexes

2012-01-25 Thread Sylvain Lebresne (Commented) (JIRA)

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

Sylvain Lebresne commented on CASSANDRA-3680:
-

I think there is two things here: the composite parts and the transposed part. 
I've created CASSANDRA-3782 to handle the transposed part and to keep this one 
focused on the composite part. Both issues are not completely unrelated but I 
feel are sufficiently orthogonal to warrant 2 separate tickets.

I'll note however that for this issue we may want to keep the sparse case in 
mind. Typically, if I declare:
{noformat}
CREATE TABLE timeline (
   userid uuid,
   posted_at timestamp,
   body text,
   posted_by text,
   PRIMARY KEY (userid, posted_at)
);
{noformat}
then we want to be able to create an index on say posted_by. Which means it's 
really a PerColumnPrefixSecondaryIndex.

 Add Support for Composite Secondary Indexes
 ---

 Key: CASSANDRA-3680
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3680
 Project: Cassandra
  Issue Type: New Feature
Reporter: T Jake Luciani
  Labels: secondary_index

 CASSANDRA-2474 and CASSANDRA-3647 add the ability to transpose wide rows 
 differently, for efficiency and functionality secondary index api needs to be 
 altered to allow composite indexes.  
 I think this will require the IndexManager api to have a 
 maybeIndex(ByteBuffer column) method that SS can call and implement a 
 PerRowSecondaryIndex per column, break the composite into parts and index 
 specific bits, also including the base rowkey.
 Then a search against a TRANSPOSED row or DOCUMENT will be possible.
  

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




[jira] [Updated] (CASSANDRA-3680) Add Support for Composite Secondary Indexes

2012-01-25 Thread Sylvain Lebresne (Updated) (JIRA)

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

Sylvain Lebresne updated CASSANDRA-3680:


Issue Type: Sub-task  (was: New Feature)
Parent: CASSANDRA-3761

 Add Support for Composite Secondary Indexes
 ---

 Key: CASSANDRA-3680
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3680
 Project: Cassandra
  Issue Type: Sub-task
Reporter: T Jake Luciani
  Labels: cql3, secondary_index

 CASSANDRA-2474 and CASSANDRA-3647 add the ability to transpose wide rows 
 differently, for efficiency and functionality secondary index api needs to be 
 altered to allow composite indexes.  
 I think this will require the IndexManager api to have a 
 maybeIndex(ByteBuffer column) method that SS can call and implement a 
 PerRowSecondaryIndex per column, break the composite into parts and index 
 specific bits, also including the base rowkey.
 Then a search against a TRANSPOSED row or DOCUMENT will be possible.
  

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




[jira] [Updated] (CASSANDRA-3680) Add Support for Composite Secondary Indexes

2012-01-25 Thread Sylvain Lebresne (Updated) (JIRA)

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

Sylvain Lebresne updated CASSANDRA-3680:


Labels: cql3 secondary_index  (was: secondary_index)

 Add Support for Composite Secondary Indexes
 ---

 Key: CASSANDRA-3680
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3680
 Project: Cassandra
  Issue Type: New Feature
Reporter: T Jake Luciani
  Labels: cql3, secondary_index

 CASSANDRA-2474 and CASSANDRA-3647 add the ability to transpose wide rows 
 differently, for efficiency and functionality secondary index api needs to be 
 altered to allow composite indexes.  
 I think this will require the IndexManager api to have a 
 maybeIndex(ByteBuffer column) method that SS can call and implement a 
 PerRowSecondaryIndex per column, break the composite into parts and index 
 specific bits, also including the base rowkey.
 Then a search against a TRANSPOSED row or DOCUMENT will be possible.
  

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




[jira] [Commented] (CASSANDRA-2261) During Compaction, Corrupt SSTables with rows that cause failures should be identified and blacklisted.

2012-01-25 Thread Pavel Yaskevich (Commented) (JIRA)

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

Pavel Yaskevich commented on CASSANDRA-2261:


Patch overall looks good, has some code styling issues in files 
(LeveledManifest.java, SizeTieredCompactionStrategy.java).

And when you comment logger.debug(...) in ColumnFamilyStore.java:1332 you will 
be able to see following exception (one exception for each of the 
Keyspace1-Standard1 SSTables) shown by CompactionsTest.testBlacklisting():

{nofromat}
[junit] java.lang.RuntimeException: 
SSTableScanner(file=RandomAccessReader(filePath='/Users/xedin/work/java/cassandra/build/test/cassandra/data/Keyspace1/Standard1/Keyspace1-Standard1-hc-5-Data.db',
 skipIOCache=true) 
sstable=SSTableReader(path='build/test/cassandra/data/Keyspace1/Standard1/Keyspace1-Standard1-hc-5-Data.db')
 exhausted=false) failed to provide next columns from 
KeyScanningIterator(finishedAt:0)
[junit] at 
org.apache.cassandra.io.sstable.SSTableScanner$KeyScanningIterator.next(SSTableScanner.java:193)
[junit] at 
org.apache.cassandra.io.sstable.SSTableScanner$KeyScanningIterator.next(SSTableScanner.java:146)
[junit] at 
org.apache.cassandra.io.sstable.SSTableScanner.next(SSTableScanner.java:138)
[junit] at 
org.apache.cassandra.io.sstable.SSTableScanner.next(SSTableScanner.java:38)
[junit] at 
org.apache.cassandra.utils.MergeIterator$Candidate.advance(MergeIterator.java:149)
[junit] at 
org.apache.cassandra.utils.MergeIterator$ManyToOne.init(MergeIterator.java:90)
[junit] at 
org.apache.cassandra.utils.MergeIterator.get(MergeIterator.java:47)
[junit] at 
org.apache.cassandra.db.compaction.CompactionIterable.iterator(CompactionIterable.java:79)
[junit] at 
org.apache.cassandra.db.compaction.CompactionTask.execute(CompactionTask.java:129)
[junit] at 
org.apache.cassandra.db.compaction.CompactionManager$6.runMayThrow(CompactionManager.java:260)
[junit] at 
org.apache.cassandra.utils.WrappedRunnable.run(WrappedRunnable.java:30)
[junit] at 
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
[junit] at 
java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
[junit] at java.util.concurrent.FutureTask.run(FutureTask.java:138)
[junit] at 
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
[junit] at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
[junit] at java.lang.Thread.run(Thread.java:680)
[junit] Caused by: java.io.EOFException
[junit] at java.io.RandomAccessFile.readFully(RandomAccessFile.java:399)
[junit] at java.io.RandomAccessFile.readFully(RandomAccessFile.java:377)
[junit] at 
org.apache.cassandra.io.util.RandomAccessReader.readBytes(RandomAccessReader.java:324)
[junit] at 
org.apache.cassandra.utils.ByteBufferUtil.read(ByteBufferUtil.java:391)
[junit] at 
org.apache.cassandra.utils.ByteBufferUtil.readWithShortLength(ByteBufferUtil.java:373)
[junit] at 
org.apache.cassandra.io.sstable.SSTableScanner$KeyScanningIterator.next(SSTableScanner.java:173)
[junit] ... 16 more
{noformat}

Could you please investigate that cases them?

 During Compaction, Corrupt SSTables with rows that cause failures should be 
 identified and blacklisted.
 ---

 Key: CASSANDRA-2261
 URL: https://issues.apache.org/jira/browse/CASSANDRA-2261
 Project: Cassandra
  Issue Type: Improvement
  Components: Core
Reporter: Benjamin Coverston
Assignee: Benjamin Coverston
Priority: Minor
  Labels: not_a_pony
 Fix For: 1.1

 Attachments: 2261-v2.patch, 2261.patch


 When a compaction of a set of SSTables fails because of corruption it will 
 continue to try to compact that SSTable causing pending compactions to build 
 up.
 One way to mitigate this problem would be to log the error, then identify the 
 specific SSTable that caused the failure, subsequently blacklisting that 
 SSTable and ensuring that it is no longer included in future compactions. For 
 this we could simply store the problematic SSTable's name in memory.
 If it's not possible to identify the SSTable that caused the issue, then 
 perhaps blacklisting the (ordered) permutation of SSTables to be compacted 
 together is something that can be done to solve this problem in a more 
 general case, and avoid issues where two (or more) SSTables have trouble 
 compacting a particular row. For this option we would probably want to store 
 the lists of the bad combinations in the system table somewhere s.t. these 
 

[jira] [Issue Comment Edited] (CASSANDRA-2261) During Compaction, Corrupt SSTables with rows that cause failures should be identified and blacklisted.

2012-01-25 Thread Pavel Yaskevich (Issue Comment Edited) (JIRA)

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

Pavel Yaskevich edited comment on CASSANDRA-2261 at 1/25/12 6:42 PM:
-

Patch overall looks good, has some code styling issues in files 
(LeveledManifest.java, SizeTieredCompactionStrategy.java).

And when you comment logger.debug(...) in ColumnFamilyStore.java:1332 you will 
be able to see following exception (one exception for each of the 
Keyspace1-Standard1 SSTables) shown by CompactionsTest.testBlacklisting():

{noformat}
[junit] java.lang.RuntimeException: 
SSTableScanner(file=RandomAccessReader(filePath='/Users/xedin/work/java/cassandra/build/test/cassandra/data/Keyspace1/Standard1/Keyspace1-Standard1-hc-5-Data.db',
 skipIOCache=true) 
sstable=SSTableReader(path='build/test/cassandra/data/Keyspace1/Standard1/Keyspace1-Standard1-hc-5-Data.db')
 exhausted=false) failed to provide next columns from 
KeyScanningIterator(finishedAt:0)
[junit] at 
org.apache.cassandra.io.sstable.SSTableScanner$KeyScanningIterator.next(SSTableScanner.java:193)
[junit] at 
org.apache.cassandra.io.sstable.SSTableScanner$KeyScanningIterator.next(SSTableScanner.java:146)
[junit] at 
org.apache.cassandra.io.sstable.SSTableScanner.next(SSTableScanner.java:138)
[junit] at 
org.apache.cassandra.io.sstable.SSTableScanner.next(SSTableScanner.java:38)
[junit] at 
org.apache.cassandra.utils.MergeIterator$Candidate.advance(MergeIterator.java:149)
[junit] at 
org.apache.cassandra.utils.MergeIterator$ManyToOne.init(MergeIterator.java:90)
[junit] at 
org.apache.cassandra.utils.MergeIterator.get(MergeIterator.java:47)
[junit] at 
org.apache.cassandra.db.compaction.CompactionIterable.iterator(CompactionIterable.java:79)
[junit] at 
org.apache.cassandra.db.compaction.CompactionTask.execute(CompactionTask.java:129)
[junit] at 
org.apache.cassandra.db.compaction.CompactionManager$6.runMayThrow(CompactionManager.java:260)
[junit] at 
org.apache.cassandra.utils.WrappedRunnable.run(WrappedRunnable.java:30)
[junit] at 
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
[junit] at 
java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
[junit] at java.util.concurrent.FutureTask.run(FutureTask.java:138)
[junit] at 
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
[junit] at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
[junit] at java.lang.Thread.run(Thread.java:680)
[junit] Caused by: java.io.EOFException
[junit] at java.io.RandomAccessFile.readFully(RandomAccessFile.java:399)
[junit] at java.io.RandomAccessFile.readFully(RandomAccessFile.java:377)
[junit] at 
org.apache.cassandra.io.util.RandomAccessReader.readBytes(RandomAccessReader.java:324)
[junit] at 
org.apache.cassandra.utils.ByteBufferUtil.read(ByteBufferUtil.java:391)
[junit] at 
org.apache.cassandra.utils.ByteBufferUtil.readWithShortLength(ByteBufferUtil.java:373)
[junit] at 
org.apache.cassandra.io.sstable.SSTableScanner$KeyScanningIterator.next(SSTableScanner.java:173)
[junit] ... 16 more
{noformat}

Could you please investigate that cases them?

  was (Author: xedin):
Patch overall looks good, has some code styling issues in files 
(LeveledManifest.java, SizeTieredCompactionStrategy.java).

And when you comment logger.debug(...) in ColumnFamilyStore.java:1332 you will 
be able to see following exception (one exception for each of the 
Keyspace1-Standard1 SSTables) shown by CompactionsTest.testBlacklisting():

{nofromat}
[junit] java.lang.RuntimeException: 
SSTableScanner(file=RandomAccessReader(filePath='/Users/xedin/work/java/cassandra/build/test/cassandra/data/Keyspace1/Standard1/Keyspace1-Standard1-hc-5-Data.db',
 skipIOCache=true) 
sstable=SSTableReader(path='build/test/cassandra/data/Keyspace1/Standard1/Keyspace1-Standard1-hc-5-Data.db')
 exhausted=false) failed to provide next columns from 
KeyScanningIterator(finishedAt:0)
[junit] at 
org.apache.cassandra.io.sstable.SSTableScanner$KeyScanningIterator.next(SSTableScanner.java:193)
[junit] at 
org.apache.cassandra.io.sstable.SSTableScanner$KeyScanningIterator.next(SSTableScanner.java:146)
[junit] at 
org.apache.cassandra.io.sstable.SSTableScanner.next(SSTableScanner.java:138)
[junit] at 
org.apache.cassandra.io.sstable.SSTableScanner.next(SSTableScanner.java:38)
[junit] at 
org.apache.cassandra.utils.MergeIterator$Candidate.advance(MergeIterator.java:149)
[junit] at 
org.apache.cassandra.utils.MergeIterator$ManyToOne.init(MergeIterator.java:90)
[junit] at 

[jira] [Created] (CASSANDRA-3783) Add 'null' support to CQL 3.0

2012-01-25 Thread Sylvain Lebresne (Created) (JIRA)
Add 'null' support to CQL 3.0
-

 Key: CASSANDRA-3783
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3783
 Project: Cassandra
  Issue Type: Sub-task
Reporter: Sylvain Lebresne
Priority: Minor


Dense composite supports adding records where only a prefix of all the 
component specifying the key is defined. In other words, with:
{noformat}
CREATE TABLE connections (
   userid int,
   ip text,
   port int,
   protocol text,
   time timestamp,
   PRIMARY KEY (userid, ip, port, protocol)
) WITH COMPACT STORAGE
{noformat}
you can insert
{noformat}
INSERT INTO connections (userid, ip, port, time) VALUES (2, '192.168.0.1', 80, 
123456789);
{noformat}

You cannot however select that column specifically (i.e, without selecting 
column (2, '192.168.0.1', 80, 'http') for instance).
This ticket proposes to allow that though 'null', i.e. to allow
{noformat}
SELECT * FROM connections WHERE userid = 2 AND ip = '192.168.0.1' AND port = 80 
AND protocol = null;
{noformat}

It would then also make sense to support:
{noformat}
INSERT INTO connections (userid, ip, port, protocol, time) VALUES (2, 
'192.168.0.1', 80, null, 123456789);
{noformat}
as an equivalent to the insert query above.

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




[jira] [Commented] (CASSANDRA-3264) Add wide row paging for ColumnFamilyInputFormat and ColumnFamilyOutputFormat

2012-01-25 Thread T Jake Luciani (Commented) (JIRA)

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

T Jake Luciani commented on CASSANDRA-3264:
---

updated patchset at: https://github.com/tjake/cassandra/tree/3264-3



 Add wide row paging for ColumnFamilyInputFormat and ColumnFamilyOutputFormat
 

 Key: CASSANDRA-3264
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3264
 Project: Cassandra
  Issue Type: Improvement
  Components: Hadoop
Reporter: T Jake Luciani
Assignee: Jonathan Ellis
  Labels: hadoop
 Fix For: 1.1


 Hadoop input/output formats currently can OOM on wide rows.
 We can add a new option to the ConfigHelper like columnPagingSize with a 
 default of Integer.MAX_VALUE.
 The input format would page the row internally rather than pull it over at 
 once.
 The output format could also use this to avoid sending huge rows over at once.

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




[jira] [Created] (CASSANDRA-3784) RangeTest.java compilation error on Range.rangeSet in Eclipse (not Ant or IntelliJ)

2012-01-25 Thread Kirk True (Created) (JIRA)
RangeTest.java compilation error on Range.rangeSet in Eclipse (not Ant or 
IntelliJ)
---

 Key: CASSANDRA-3784
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3784
 Project: Cassandra
  Issue Type: Bug
  Components: Tests
Affects Versions: 1.1
Reporter: Kirk True
Assignee: Kirk True
Priority: Trivial
 Fix For: 1.1


When building from trunk:

{noformat}
The method rangeSet(RangeT...) in the type Range is not applicable for the 
arguments (Range[])
RangeTest.java  /cassandra/test/unit/org/apache/cassandra/dht   line 184
{noformat}


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




[jira] [Created] (CASSANDRA-3785) Support slice with exclusive start and stop

2012-01-25 Thread Sylvain Lebresne (Created) (JIRA)
Support slice with exclusive start and stop
---

 Key: CASSANDRA-3785
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3785
 Project: Cassandra
  Issue Type: Improvement
  Components: Core
Reporter: Sylvain Lebresne
 Fix For: 1.2


Currently, slices are always start and end inclusive. However, for CQL 3.0, we 
already differenciate between inclusivity/exclusivity for the row key and for 
the component of composite columns. It would be nice to always support that 
distinction.

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




[jira] [Commented] (CASSANDRA-3785) Support slice with exclusive start and stop

2012-01-25 Thread Sylvain Lebresne (Commented) (JIRA)

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

Sylvain Lebresne commented on CASSANDRA-3785:
-

For CQL, we can likely get around by asking one more column and removing 
manually columns after the query to transform an inclusive into an exclusive. 
It does sound a little lame to me that we don't support this internally though 
(but I could leave with that).

 Support slice with exclusive start and stop
 ---

 Key: CASSANDRA-3785
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3785
 Project: Cassandra
  Issue Type: Improvement
  Components: Core
Reporter: Sylvain Lebresne
  Labels: cql3
 Fix For: 1.2


 Currently, slices are always start and end inclusive. However, for CQL 3.0, 
 we already differenciate between inclusivity/exclusivity for the row key and 
 for the component of composite columns. It would be nice to always support 
 that distinction.

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




[jira] [Commented] (CASSANDRA-3264) Add wide row paging for ColumnFamilyInputFormat and ColumnFamilyOutputFormat

2012-01-25 Thread Jonathan Ellis (Commented) (JIRA)

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

Jonathan Ellis commented on CASSANDRA-3264:
---

I think it makes a bit more sense to just skip the int columns instead of 
turning them into Strings, but either way, +1.

 Add wide row paging for ColumnFamilyInputFormat and ColumnFamilyOutputFormat
 

 Key: CASSANDRA-3264
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3264
 Project: Cassandra
  Issue Type: Improvement
  Components: Hadoop
Reporter: T Jake Luciani
Assignee: Jonathan Ellis
  Labels: hadoop
 Fix For: 1.1


 Hadoop input/output formats currently can OOM on wide rows.
 We can add a new option to the ConfigHelper like columnPagingSize with a 
 default of Integer.MAX_VALUE.
 The input format would page the row internally rather than pull it over at 
 once.
 The output format could also use this to avoid sending huge rows over at once.

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




[jira] [Updated] (CASSANDRA-3784) RangeTest.java compilation error on Range.rangeSet in Eclipse (not Ant or IntelliJ)

2012-01-25 Thread Kirk True (Updated) (JIRA)

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

Kirk True updated CASSANDRA-3784:
-

Attachment: CASSANDRA-3784.patch

Patch that adds a type for T such that we can pass the compiler's generics 
checks.

 RangeTest.java compilation error on Range.rangeSet in Eclipse (not Ant or 
 IntelliJ)
 ---

 Key: CASSANDRA-3784
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3784
 Project: Cassandra
  Issue Type: Bug
  Components: Tests
Affects Versions: 1.1
Reporter: Kirk True
Assignee: Kirk True
Priority: Trivial
 Fix For: 1.1

 Attachments: CASSANDRA-3784.patch


 When building from trunk:
 {noformat}
 The method rangeSet(RangeT...) in the type Range is not applicable for the 
 arguments (Range[])
 RangeTest.java/cassandra/test/unit/org/apache/cassandra/dht   line 184
 {noformat}

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




[3/3] Add wide row support to ColumnFamilyInputFormat

2012-01-25 Thread jake
http://git-wip-us.apache.org/repos/asf/cassandra/blob/fba541c0/interface/thrift/gen-java/org/apache/cassandra/thrift/Constants.java
--
diff --git 
a/interface/thrift/gen-java/org/apache/cassandra/thrift/Constants.java 
b/interface/thrift/gen-java/org/apache/cassandra/thrift/Constants.java
index be4e5aa..8227239 100644
--- a/interface/thrift/gen-java/org/apache/cassandra/thrift/Constants.java
+++ b/interface/thrift/gen-java/org/apache/cassandra/thrift/Constants.java
@@ -44,6 +44,6 @@ import org.slf4j.LoggerFactory;
 
 public class Constants {
 
-  public static final String VERSION = 19.26.0;
+  public static final String VERSION = 19.27.0;
 
 }

http://git-wip-us.apache.org/repos/asf/cassandra/blob/fba541c0/src/java/org/apache/cassandra/hadoop/ColumnFamilyRecordReader.java
--
diff --git a/src/java/org/apache/cassandra/hadoop/ColumnFamilyRecordReader.java 
b/src/java/org/apache/cassandra/hadoop/ColumnFamilyRecordReader.java
index 46b767a..e315ced 100644
--- a/src/java/org/apache/cassandra/hadoop/ColumnFamilyRecordReader.java
+++ b/src/java/org/apache/cassandra/hadoop/ColumnFamilyRecordReader.java
@@ -30,6 +30,9 @@ import java.nio.ByteBuffer;
 import java.util.*;
 
 import com.google.common.collect.AbstractIterator;
+import com.google.common.collect.ImmutableSortedMap;
+import com.google.common.collect.Iterables;
+import org.apache.commons.lang.ArrayUtils;
 
 import org.apache.cassandra.auth.IAuthenticator;
 import org.apache.cassandra.config.ConfigurationException;
@@ -41,7 +44,6 @@ import org.apache.cassandra.thrift.*;
 import org.apache.cassandra.utils.ByteBufferUtil;
 import org.apache.cassandra.utils.FBUtilities;
 import org.apache.cassandra.utils.Pair;
-import org.apache.commons.lang.ArrayUtils;
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.mapreduce.InputSplit;
 import org.apache.hadoop.mapreduce.RecordReader;
@@ -61,7 +63,7 @@ public class ColumnFamilyRecordReader extends 
RecordReaderByteBuffer, SortedMap
 private SlicePredicate predicate;
 private boolean isEmptyPredicate;
 private int totalRowCount; // total number of rows to fetch
-private int batchRowCount; // fetch this many per batch
+private int batchSize; // fetch this many per batch
 private String cfName;
 private String keyspace;
 private TSocket socket;
@@ -69,6 +71,7 @@ public class ColumnFamilyRecordReader extends 
RecordReaderByteBuffer, SortedMap
 private ConsistencyLevel consistencyLevel;
 private int keyBufferSize = 8192;
 private ListIndexExpression filter;
+private boolean widerows;
 
 public ColumnFamilyRecordReader()
 {
@@ -103,6 +106,7 @@ public class ColumnFamilyRecordReader extends 
RecordReaderByteBuffer, SortedMap
 
 public float getProgress()
 {
+// TODO this is totally broken for wide rows
 // the progress is likely to be reported slightly off the actual but 
close enough
 return ((float)iter.rowsRead()) / totalRowCount;
 }
@@ -135,9 +139,10 @@ public class ColumnFamilyRecordReader extends 
RecordReaderByteBuffer, SortedMap
 KeyRange jobRange = ConfigHelper.getInputKeyRange(conf);
 filter = jobRange == null ? null : jobRange.row_filter;
 predicate = ConfigHelper.getInputSlicePredicate(conf);
+widerows = ConfigHelper.getInputIsWide(conf);
 isEmptyPredicate = isEmptyPredicate(predicate);
 totalRowCount = ConfigHelper.getInputSplitSize(conf);
-batchRowCount = ConfigHelper.getRangeBatchSize(conf);
+batchSize = ConfigHelper.getRangeBatchSize(conf);
 cfName = ConfigHelper.getInputColumnFamily(conf);
 consistencyLevel = 
ConsistencyLevel.valueOf(ConfigHelper.getReadConsistencyLevel(conf));
 
@@ -173,7 +178,7 @@ public class ColumnFamilyRecordReader extends 
RecordReaderByteBuffer, SortedMap
 throw new RuntimeException(e);
 }
 
-iter = new RowIterator();
+iter = widerows ? new WideRowIterator() : new StaticRowIterator();
 }
 
 public boolean nextKeyValue() throws IOException
@@ -222,15 +227,15 @@ public class ColumnFamilyRecordReader extends 
RecordReaderByteBuffer, SortedMap
 return split.getLocations()[0];
 }
 
-private class RowIterator extends AbstractIteratorPairByteBuffer, 
SortedMapByteBuffer, IColumn
+private abstract class RowIterator extends 
AbstractIteratorPairByteBuffer, SortedMapByteBuffer, IColumn
 {
-private ListKeySlice rows;
-private String startToken;
-private int totalRead = 0;
-private int i = 0;
-private final AbstractType? comparator;
-private final AbstractType? subComparator;
-private final IPartitioner partitioner;
+protected ListKeySlice rows;
+protected KeySlice lastRow;
+protected int totalRead = 0;
+

[1/3] git commit: Add wide row support to ColumnFamilyInputFormat

2012-01-25 Thread jake
Updated Branches:
  refs/heads/trunk 087d24a9d - fba541c0c


Add wide row support to ColumnFamilyInputFormat

Patch by jbellis; reviewed by tjake for CASSANDRA-3264


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

Branch: refs/heads/trunk
Commit: fba541c0c33a2e966c0cb23cb1cdabce9c330d26
Parents: 087d24a
Author: T Jake Luciani jak...@gmail.com
Authored: Wed Jan 25 15:43:55 2012 -0500
Committer: T Jake Luciani jak...@gmail.com
Committed: Wed Jan 25 15:43:55 2012 -0500

--
 CHANGES.txt|1 +
 examples/hadoop_word_count/src/WordCount.java  |   42 +-
 examples/hadoop_word_count/src/WordCountSetup.java |2 +-
 interface/cassandra.thrift |   11 +-
 .../org/apache/cassandra/thrift/Cassandra.java | 3273 ++-
 .../org/apache/cassandra/thrift/Constants.java |2 +-
 .../cassandra/hadoop/ColumnFamilyRecordReader.java |  243 +-
 .../org/apache/cassandra/hadoop/ConfigHelper.java  |   31 +-
 .../apache/cassandra/thrift/CassandraServer.java   |   55 +
 9 files changed, 2606 insertions(+), 1054 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/fba541c0/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 03d2e69..74ee0e9 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -56,6 +56,7 @@
  * Make CFMetaData conversions to/from thrift/native schema inverses
(CASSANDRA_3559)
  * Add initial code for CQL 3.0-beta (CASSANDRA-3781)
+ * Add wide row support for ColumnFamilyInputFormat (CASSANDRA-3264)
 
 
 1.0.8

http://git-wip-us.apache.org/repos/asf/cassandra/blob/fba541c0/examples/hadoop_word_count/bin/word_count_counters
--
diff --git a/examples/hadoop_word_count/bin/word_count_counters 
b/examples/hadoop_word_count/bin/word_count_counters
old mode 100644
new mode 100755

http://git-wip-us.apache.org/repos/asf/cassandra/blob/fba541c0/examples/hadoop_word_count/src/WordCount.java
--
diff --git a/examples/hadoop_word_count/src/WordCount.java 
b/examples/hadoop_word_count/src/WordCount.java
index e1c70bb..d3cee0e 100644
--- a/examples/hadoop_word_count/src/WordCount.java
+++ b/examples/hadoop_word_count/src/WordCount.java
@@ -25,8 +25,6 @@ import org.apache.cassandra.hadoop.ColumnFamilyOutputFormat;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import static com.google.common.base.Charsets.UTF_8;
-
 import org.apache.cassandra.db.IColumn;
 import org.apache.cassandra.hadoop.ColumnFamilyInputFormat;
 import org.apache.cassandra.hadoop.ConfigHelper;
@@ -81,22 +79,28 @@ public class WordCount extends Configured implements Tool
 protected void setup(org.apache.hadoop.mapreduce.Mapper.Context 
context)
 throws IOException, InterruptedException
 {
-sourceColumn = 
ByteBufferUtil.bytes(context.getConfiguration().get(CONF_COLUMN_NAME));
 }
 
 public void map(ByteBuffer key, SortedMapByteBuffer, IColumn 
columns, Context context) throws IOException, InterruptedException
 {
-IColumn column = columns.get(sourceColumn);
-if (column == null)
-return;
-String value = ByteBufferUtil.string(column.value());
-logger.debug(read  + key + : + value +  from  + 
context.getInputSplit());
-
-StringTokenizer itr = new StringTokenizer(value);
-while (itr.hasMoreTokens())
+for (IColumn column : columns.values())
 {
-word.set(itr.nextToken());
-context.write(word, one);
+String name  = ByteBufferUtil.string(column.name());
+String value = null;
+
+if (name.contains(int))
+value = 
String.valueOf(ByteBufferUtil.toInt(column.value()));
+else
+value = ByteBufferUtil.string(column.value());
+   
+System.err.println(read  + ByteBufferUtil.string(key) + : 
+name + : + value +  from  + context.getInputSplit());
+
+StringTokenizer itr = new StringTokenizer(value);
+while (itr.hasMoreTokens())
+{
+word.set(itr.nextToken());
+context.write(word, one);
+}
 }
 }
 }
@@ -155,10 +159,12 @@ public class WordCount extends Configured implements Tool
 }
 logger.info(output 

[jira] [Commented] (CASSANDRA-3623) use MMapedBuffer in CompressedSegmentedFile.getSegment

2012-01-25 Thread Jonathan Ellis (Commented) (JIRA)

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

Jonathan Ellis commented on CASSANDRA-3623:
---

What's the verdict here?  Do we need to get a 3rd opinion?

 use MMapedBuffer in CompressedSegmentedFile.getSegment
 --

 Key: CASSANDRA-3623
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3623
 Project: Cassandra
  Issue Type: Improvement
  Components: Core
Affects Versions: 1.1
Reporter: Vijay
Assignee: Vijay
  Labels: compression
 Fix For: 1.1

 Attachments: 0001-MMaped-Compression-segmented-file-v2.patch, 
 0001-MMaped-Compression-segmented-file-v3.patch, 
 0001-MMaped-Compression-segmented-file.patch, 
 0002-tests-for-MMaped-Compression-segmented-file-v2.patch, 
 0002-tests-for-MMaped-Compression-segmented-file-v3.patch, CRC+MMapIO.xlsx, 
 MMappedIO-Performance.docx


 CompressedSegmentedFile.getSegment seem to open a new file and doesnt seem to 
 use the MMap and hence a higher CPU on the nodes and higher latencies on 
 reads. 
 This ticket is to implement the TODO mentioned in CompressedRandomAccessReader
 // TODO refactor this to separate concept of buffer to avoid lots of read() 
 syscalls and compression buffer
 but i think a separate class for the Buffer will be better.

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




git commit: Fix RangeTest.java compilation error on Range.rangeSet in Eclipse

2012-01-25 Thread jake
Updated Branches:
  refs/heads/trunk fba541c0c - 45e1d5188


Fix RangeTest.java compilation error on Range.rangeSet in Eclipse

Patch by Kirk True; reviewed by tjake for CASSANDRA-3784


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

Branch: refs/heads/trunk
Commit: 45e1d5188c42dd0220a51af1b574af3c4d8378ea
Parents: fba541c
Author: T Jake Luciani jak...@gmail.com
Authored: Wed Jan 25 16:26:02 2012 -0500
Committer: T Jake Luciani jak...@gmail.com
Committed: Wed Jan 25 16:26:02 2012 -0500

--
 test/unit/org/apache/cassandra/dht/RangeTest.java |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/45e1d518/test/unit/org/apache/cassandra/dht/RangeTest.java
--
diff --git a/test/unit/org/apache/cassandra/dht/RangeTest.java 
b/test/unit/org/apache/cassandra/dht/RangeTest.java
index dc951f8..42554c0 100644
--- a/test/unit/org/apache/cassandra/dht/RangeTest.java
+++ b/test/unit/org/apache/cassandra/dht/RangeTest.java
@@ -179,9 +179,9 @@ public class RangeTest
 assert not.intersects(twowrap);
 }
 
-static void assertIntersection(Range one, Range two, Range ... ranges)
+static T extends RingPosition void assertIntersection(Range one, Range 
two, RangeT ... ranges)
 {
-SetRange correct = Range.rangeSet(ranges);
+SetRangeT correct = Range.rangeSet(ranges);
 SetRange result1 = one.intersectionWith(two);
 assert result1.equals(correct) : String.format(%s != %s,

StringUtils.join(result1, ,),



[2/2] git commit: Clean up isMarkedForDelete to avoid relying on the current time where possible patch by slebresne; reviewed by jbellis for CASSANDRA-3716

2012-01-25 Thread jbellis
Clean up isMarkedForDelete to avoid relying on the current time where possible
patch by slebresne; reviewed by jbellis for CASSANDRA-3716


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

Branch: refs/heads/trunk
Commit: e0aec20f451515d23c84d1ce61666b43dd928f11
Parents: 45e1d51
Author: Jonathan Ellis jbel...@apache.org
Authored: Wed Jan 25 15:46:48 2012 -0600
Committer: Jonathan Ellis jbel...@apache.org
Committed: Wed Jan 25 15:58:26 2012 -0600

--
 .../cassandra/db/AbstractColumnContainer.java  |2 +-
 src/java/org/apache/cassandra/db/Column.java   |6 ++--
 .../org/apache/cassandra/db/ColumnFamilyStore.java |7 +
 .../org/apache/cassandra/db/DeletedColumn.java |6 -
 .../org/apache/cassandra/db/ExpiringColumn.java|   18 ---
 src/java/org/apache/cassandra/db/IColumn.java  |5 
 .../apache/cassandra/db/filter/QueryFilter.java|2 +-
 7 files changed, 12 insertions(+), 34 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/e0aec20f/src/java/org/apache/cassandra/db/AbstractColumnContainer.java
--
diff --git a/src/java/org/apache/cassandra/db/AbstractColumnContainer.java 
b/src/java/org/apache/cassandra/db/AbstractColumnContainer.java
index 3baba86..a87985e 100644
--- a/src/java/org/apache/cassandra/db/AbstractColumnContainer.java
+++ b/src/java/org/apache/cassandra/db/AbstractColumnContainer.java
@@ -197,7 +197,7 @@ public abstract class AbstractColumnContainer implements 
IColumnContainer, IIter
 
 public boolean hasExpiredTombstones(int gcBefore)
 {
-if (isMarkedForDelete()  getLocalDeletionTime()  gcBefore)
+if (getLocalDeletionTime()  gcBefore)
 return true;
 
 for (IColumn column : columns)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/e0aec20f/src/java/org/apache/cassandra/db/Column.java
--
diff --git a/src/java/org/apache/cassandra/db/Column.java 
b/src/java/org/apache/cassandra/db/Column.java
index 367cc13..c5735dd 100644
--- a/src/java/org/apache/cassandra/db/Column.java
+++ b/src/java/org/apache/cassandra/db/Column.java
@@ -106,7 +106,7 @@ public class Column implements IColumn
 
 public boolean isMarkedForDelete()
 {
-return false;
+return (int) (System.currentTimeMillis() / 1000) = 
getLocalDeletionTime();
 }
 
 public long getMarkedForDeleteAt()
@@ -185,7 +185,7 @@ public class Column implements IColumn
 
 public int getLocalDeletionTime()
 {
-throw new IllegalStateException(column is not marked for delete);
+return Integer.MAX_VALUE;
 }
 
 public IColumn reconcile(IColumn column)
@@ -278,7 +278,7 @@ public class Column implements IColumn
 
 public boolean hasExpiredTombstones(int gcBefore)
 {
-return isMarkedForDelete()  getLocalDeletionTime()  gcBefore;
+return getLocalDeletionTime()  gcBefore;
 }
 }
 

http://git-wip-us.apache.org/repos/asf/cassandra/blob/e0aec20f/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 0edae3f..15a0b64 100644
--- a/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
+++ b/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
@@ -750,10 +750,7 @@ public class ColumnFamilyStore implements 
ColumnFamilyStoreMBean
 // remove columns if
 // (a) the column itself is tombstoned or
 // (b) the CF is tombstoned and the column is not newer than it
-//
-// Note that we need the inequality below for case (a) to be 
strict for expiring columns
-// to work correctly  -- see the comment in 
ExpiringColumn.isMarkedForDelete().
-if ((c.isMarkedForDelete()  c.getLocalDeletionTime()  gcBefore)
+if (c.getLocalDeletionTime()  gcBefore
 || c.timestamp() = cf.getMarkedForDeleteAt())
 {
 iter.remove();
@@ -779,7 +776,7 @@ public class ColumnFamilyStore implements 
ColumnFamilyStoreMBean
 // (a) the subcolumn itself is tombstoned or
 // (b) the supercolumn is tombstoned and the subcolumn is not 
newer than it
 if (subColumn.timestamp() = minTimestamp
-|| (subColumn.isMarkedForDelete()  
subColumn.getLocalDeletionTime()  gcBefore))
+|| 

[1/2] git commit: use microsecond timestamps in SystemTable patch by Aaron Morton; reviewed by jbellis for CASSANDRA-3692

2012-01-25 Thread jbellis
Updated Branches:
  refs/heads/trunk 45e1d5188 - cf0b69ff5


use microsecond timestamps in SystemTable
patch by Aaron Morton; reviewed by jbellis for CASSANDRA-3692


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

Branch: refs/heads/trunk
Commit: cf0b69ff5d09d91c91f7663011c48a5a5178243f
Parents: e0aec20
Author: Jonathan Ellis jbel...@apache.org
Authored: Wed Jan 25 15:56:58 2012 -0600
Committer: Jonathan Ellis jbel...@apache.org
Committed: Wed Jan 25 15:58:27 2012 -0600

--
 src/java/org/apache/cassandra/db/SystemTable.java |   27 +---
 src/java/org/apache/cassandra/utils/NodeId.java   |4 +-
 2 files changed, 17 insertions(+), 14 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/cf0b69ff/src/java/org/apache/cassandra/db/SystemTable.java
--
diff --git a/src/java/org/apache/cassandra/db/SystemTable.java 
b/src/java/org/apache/cassandra/db/SystemTable.java
index 99c343b..58ff41e 100644
--- a/src/java/org/apache/cassandra/db/SystemTable.java
+++ b/src/java/org/apache/cassandra/db/SystemTable.java
@@ -88,19 +88,19 @@ public class SystemTable
 
 rm = new RowMutation(Table.SYSTEM_TABLE, 
ByteBufferUtil.bytes(build));
 cf = ColumnFamily.create(Table.SYSTEM_TABLE, VERSION_CF);
-cf.addColumn(new Column(ByteBufferUtil.bytes(version), 
ByteBufferUtil.bytes(FBUtilities.getReleaseVersionString(;
+cf.addColumn(new Column(ByteBufferUtil.bytes(version), 
ByteBufferUtil.bytes(FBUtilities.getReleaseVersionString()), 
FBUtilities.timestampMicros()));
 rm.add(cf);
 rm.apply();
 
 rm = new RowMutation(Table.SYSTEM_TABLE, ByteBufferUtil.bytes(cql));
 cf = ColumnFamily.create(Table.SYSTEM_TABLE, VERSION_CF);
-cf.addColumn(new Column(ByteBufferUtil.bytes(version), 
ByteBufferUtil.bytes(QueryProcessor.CQL_VERSION.toString(;
+cf.addColumn(new Column(ByteBufferUtil.bytes(version), 
ByteBufferUtil.bytes(QueryProcessor.CQL_VERSION.toString()), 
FBUtilities.timestampMicros()));
 rm.add(cf);
 rm.apply();
 
 rm = new RowMutation(Table.SYSTEM_TABLE, 
ByteBufferUtil.bytes(thrift));
 cf = ColumnFamily.create(Table.SYSTEM_TABLE, VERSION_CF);
-cf.addColumn(new Column(ByteBufferUtil.bytes(version), 
ByteBufferUtil.bytes(Constants.VERSION)));
+cf.addColumn(new Column(ByteBufferUtil.bytes(version), 
ByteBufferUtil.bytes(Constants.VERSION), FBUtilities.timestampMicros()));
 rm.add(cf);
 rm.apply();
 }
@@ -134,7 +134,7 @@ public class SystemTable
 }
 logger.debug(Marking pre-1.0 hints purged);
 RowMutation rm = new RowMutation(Table.SYSTEM_TABLE, COOKIE_KEY);
-rm.add(new QueryPath(STATUS_CF, null, upgradeMarker), 
ByteBufferUtil.bytes(oh yes, they were purged), System.currentTimeMillis());
+rm.add(new QueryPath(STATUS_CF, null, upgradeMarker), 
ByteBufferUtil.bytes(oh yes, they were purged), 
FBUtilities.timestampMicros());
 rm.apply();
 }
 
@@ -150,7 +150,7 @@ public class SystemTable
 }
 IPartitioner p = StorageService.getPartitioner();
 ColumnFamily cf = ColumnFamily.create(Table.SYSTEM_TABLE, STATUS_CF);
-cf.addColumn(new Column(p.getTokenFactory().toByteArray(token), 
ByteBuffer.wrap(ep.getAddress()), System.currentTimeMillis()));
+cf.addColumn(new Column(p.getTokenFactory().toByteArray(token), 
ByteBuffer.wrap(ep.getAddress()), FBUtilities.timestampMicros()));
 RowMutation rm = new RowMutation(Table.SYSTEM_TABLE, RING_KEY);
 rm.add(cf);
 try
@@ -171,7 +171,7 @@ public class SystemTable
 {
 IPartitioner p = StorageService.getPartitioner();
 RowMutation rm = new RowMutation(Table.SYSTEM_TABLE, RING_KEY);
-rm.delete(new QueryPath(STATUS_CF, null, 
p.getTokenFactory().toByteArray(token)), System.currentTimeMillis());
+rm.delete(new QueryPath(STATUS_CF, null, 
p.getTokenFactory().toByteArray(token)), FBUtilities.timestampMicros());
 try
 {
 rm.apply();
@@ -190,7 +190,7 @@ public class SystemTable
 {
 IPartitioner p = StorageService.getPartitioner();
 ColumnFamily cf = ColumnFamily.create(Table.SYSTEM_TABLE, STATUS_CF);
-cf.addColumn(new Column(SystemTable.TOKEN, 
p.getTokenFactory().toByteArray(token), System.currentTimeMillis()));
+cf.addColumn(new Column(SystemTable.TOKEN, 
p.getTokenFactory().toByteArray(token), FBUtilities.timestampMicros()));
 RowMutation rm = new RowMutation(Table.SYSTEM_TABLE, 

[jira] [Commented] (CASSANDRA-3623) use MMapedBuffer in CompressedSegmentedFile.getSegment

2012-01-25 Thread Vijay (Commented) (JIRA)

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

Vijay commented on CASSANDRA-3623:
--

Hi Jonathan,
The env which i was testing was on XFS and NOOP scheduler (with JVM heap of 
12/2). I also have a lot of memory (70G) to spare on those boxes...
Having said that I am not sure if it is was just me who will be benefited by 
this patch... may be a 3rd opinion might help.

 use MMapedBuffer in CompressedSegmentedFile.getSegment
 --

 Key: CASSANDRA-3623
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3623
 Project: Cassandra
  Issue Type: Improvement
  Components: Core
Affects Versions: 1.1
Reporter: Vijay
Assignee: Vijay
  Labels: compression
 Fix For: 1.1

 Attachments: 0001-MMaped-Compression-segmented-file-v2.patch, 
 0001-MMaped-Compression-segmented-file-v3.patch, 
 0001-MMaped-Compression-segmented-file.patch, 
 0002-tests-for-MMaped-Compression-segmented-file-v2.patch, 
 0002-tests-for-MMaped-Compression-segmented-file-v3.patch, CRC+MMapIO.xlsx, 
 MMappedIO-Performance.docx


 CompressedSegmentedFile.getSegment seem to open a new file and doesnt seem to 
 use the MMap and hence a higher CPU on the nodes and higher latencies on 
 reads. 
 This ticket is to implement the TODO mentioned in CompressedRandomAccessReader
 // TODO refactor this to separate concept of buffer to avoid lots of read() 
 syscalls and compression buffer
 but i think a separate class for the Buffer will be better.

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




[jira] [Commented] (CASSANDRA-3665) [patch] allow for clientutil.jar to be used without the base cassandra.jar for client applications

2012-01-25 Thread Eric Evans (Commented) (JIRA)

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

Eric Evans commented on CASSANDRA-3665:
---

Where does this list of additional classes come from?  Was it tested, and if 
so, against which version?

I'm not sure if it's the best tool, but according to tattletale 
(http://www.jboss.org/tattletale), the classes we are missing are 
{{o.a.c.io.util.FileDataInput}}, {{o.a.c.io.util.FileUtils}}, and 
{{o.a.c.utils.FBUtilities}}.  That's not including transitive dependencies, 
(for which {{FBUtilities}} alone is a nightmare).

Even manually searching through the code I can't see where 
{{o.a.c.utils.ClosableIterator}} or {{o.a.c.config.ConfigurationException}} are 
needed.

TL;DR Let me know if I'm missing something, but it looks like this patch is 
adding classes which are not needed, and missing some which are.

{{FBUtilities}} is being pulled in by {{ByteBufferUtil}}, so I think the right 
answer there is to refactor, and move the relevant bits out, either into 
{{ByteBufferUtil}}, or into another class entirely.

 [patch] allow for clientutil.jar to be used without the base cassandra.jar 
 for client applications
 --

 Key: CASSANDRA-3665
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3665
 Project: Cassandra
  Issue Type: Improvement
Affects Versions: 1.0.6
Reporter: Dave Brosius
Assignee: Dave Brosius
 Attachments: fix_client_util_jar.diff


 clientutil.jar can't be run from a client by itself without the presence of 
 cassandra.jar which seems wrong. Added needed classes to run by itself.

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




[jira] [Commented] (CASSANDRA-3665) [patch] allow for clientutil.jar to be used without the base cassandra.jar for client applications

2012-01-25 Thread Rick Shaw (Commented) (JIRA)

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

Rick Shaw commented on CASSANDRA-3665:
--

The Cassandra-jdbc client does not require the full cassandra jar? It builds 
and runs just fine. clientutil.jar was built for just such a purpose?

 [patch] allow for clientutil.jar to be used without the base cassandra.jar 
 for client applications
 --

 Key: CASSANDRA-3665
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3665
 Project: Cassandra
  Issue Type: Improvement
Affects Versions: 1.0.6
Reporter: Dave Brosius
Assignee: Dave Brosius
 Attachments: fix_client_util_jar.diff


 clientutil.jar can't be run from a client by itself without the presence of 
 cassandra.jar which seems wrong. Added needed classes to run by itself.

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




[jira] [Commented] (CASSANDRA-3665) [patch] allow for clientutil.jar to be used without the base cassandra.jar for client applications

2012-01-25 Thread Dave Brosius (Commented) (JIRA)

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

Dave Brosius commented on CASSANDRA-3665:
-

I basically kept adding classes until the NoClassDefFoundExceptions stopped.

 [patch] allow for clientutil.jar to be used without the base cassandra.jar 
 for client applications
 --

 Key: CASSANDRA-3665
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3665
 Project: Cassandra
  Issue Type: Improvement
Affects Versions: 1.0.6
Reporter: Dave Brosius
Assignee: Dave Brosius
 Attachments: fix_client_util_jar.diff


 clientutil.jar can't be run from a client by itself without the presence of 
 cassandra.jar which seems wrong. Added needed classes to run by itself.

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




[jira] [Commented] (CASSANDRA-3665) [patch] allow for clientutil.jar to be used without the base cassandra.jar for client applications

2012-01-25 Thread Dave Brosius (Commented) (JIRA)

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

Dave Brosius commented on CASSANDRA-3665:
-

Sorry i should have added that at the time, it was post 1.0 for sure. But i 
still see it now, I am using

UUIDGen.makeType1UUIDFromHost

and it's throwing exceptions


UUIDGen.makeNode(InetAddress) line: 198 
UUIDGen.getClockSeqAndNode(InetAddress) line: 158
UUIDGen.makeType1UUIDFromHost(InetAddress) line: 61 




 [patch] allow for clientutil.jar to be used without the base cassandra.jar 
 for client applications
 --

 Key: CASSANDRA-3665
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3665
 Project: Cassandra
  Issue Type: Improvement
Affects Versions: 1.0.6
Reporter: Dave Brosius
Assignee: Dave Brosius
 Attachments: fix_client_util_jar.diff


 clientutil.jar can't be run from a client by itself without the presence of 
 cassandra.jar which seems wrong. Added needed classes to run by itself.

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




[jira] [Updated] (CASSANDRA-3623) use MMapedBuffer in CompressedSegmentedFile.getSegment

2012-01-25 Thread Jonathan Ellis (Updated) (JIRA)

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

Jonathan Ellis updated CASSANDRA-3623:
--

Reviewer: yukim  (was: xedin)

I'll ask Yuki to take a look.

 use MMapedBuffer in CompressedSegmentedFile.getSegment
 --

 Key: CASSANDRA-3623
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3623
 Project: Cassandra
  Issue Type: Improvement
  Components: Core
Affects Versions: 1.1
Reporter: Vijay
Assignee: Vijay
  Labels: compression
 Fix For: 1.1

 Attachments: 0001-MMaped-Compression-segmented-file-v2.patch, 
 0001-MMaped-Compression-segmented-file-v3.patch, 
 0001-MMaped-Compression-segmented-file.patch, 
 0002-tests-for-MMaped-Compression-segmented-file-v2.patch, 
 0002-tests-for-MMaped-Compression-segmented-file-v3.patch, CRC+MMapIO.xlsx, 
 MMappedIO-Performance.docx


 CompressedSegmentedFile.getSegment seem to open a new file and doesnt seem to 
 use the MMap and hence a higher CPU on the nodes and higher latencies on 
 reads. 
 This ticket is to implement the TODO mentioned in CompressedRandomAccessReader
 // TODO refactor this to separate concept of buffer to avoid lots of read() 
 syscalls and compression buffer
 but i think a separate class for the Buffer will be better.

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




[jira] [Updated] (CASSANDRA-3568) cassandra-cli and nodetool should connect to localhost by default

2012-01-25 Thread Jonathan Ellis (Updated) (JIRA)

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

Jonathan Ellis updated CASSANDRA-3568:
--

Component/s: (was: Core)
 Tools

 cassandra-cli and nodetool should connect to localhost by default
 -

 Key: CASSANDRA-3568
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3568
 Project: Cassandra
  Issue Type: Improvement
  Components: Tools
Reporter: Rick Branson
Assignee: Rick Branson
Priority: Minor
 Fix For: 1.1

 Attachments: 3568-v2.txt, 3568.txt


 The command line tools (cassandra-cli and noetool) should connect by default 
 to localhost. This behavior is a bit more user-friendly and reflects somewhat 
 of a convention among command-line database tools for popular open source 
 databases such as MySQL and PostgreSQL.

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




[jira] [Updated] (CASSANDRA-3703) log Compaction Active tasks in StatusLogger instead of n/a

2012-01-25 Thread Jonathan Ellis (Updated) (JIRA)

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

Jonathan Ellis updated CASSANDRA-3703:
--

Reviewer: slebresne  (was: cywjackson)

 log Compaction Active tasks in StatusLogger instead of n/a
 --

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

 Attachments: 3703.txt


 currently StatusLogger log:
 {noformat}
 logger.info(String.format(%-25s%10s%10s,
   CompactionManager, n/a, 
 CompactionManager.instance.getPendingTasks()));
 {noformat}
 It'd be great if it could actually log the number of active tasks being 
 processed. Without looking into the code, I thought there was no compaction 
 running when reading the log.
 {code: title=CompactionManager.java}
 public int getActiveCompactions()
 {
 return CompactionExecutor.compactions.size();
 }
 {code}

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




[jira] [Updated] (CASSANDRA-3479) add read from/write to file support to cqlsh

2012-01-25 Thread Jonathan Ellis (Updated) (JIRA)

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

Jonathan Ellis updated CASSANDRA-3479:
--

Reviewer: brandon.williams

 add read from/write to file support to cqlsh
 

 Key: CASSANDRA-3479
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3479
 Project: Cassandra
  Issue Type: Improvement
Reporter: Jonathan Ellis
Assignee: paul cannon
Priority: Minor
  Labels: cql
 Fix For: 1.1

 Attachments: 3479.patch.txt

   Original Estimate: 2h
  Remaining Estimate: 2h



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




git commit: Nodetool and CLI connect to localhost by default patch by Rick Branson; reviewed by jbellis for CASSANDRA-3568

2012-01-25 Thread jbellis
Updated Branches:
  refs/heads/trunk cf0b69ff5 - eec230926


Nodetool and CLI connect to localhost by default
patch by Rick Branson; reviewed by jbellis for CASSANDRA-3568


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

Branch: refs/heads/trunk
Commit: eec2309266be044acd4538a9b445301ae3a02f41
Parents: cf0b69f
Author: Jonathan Ellis jbel...@apache.org
Authored: Wed Jan 25 19:15:01 2012 -0600
Committer: Jonathan Ellis jbel...@apache.org
Committed: Wed Jan 25 19:15:01 2012 -0600

--
 CHANGES.txt   |1 +
 src/java/org/apache/cassandra/cli/CliMain.java|2 --
 src/java/org/apache/cassandra/cli/CliOptions.java |6 ++
 src/java/org/apache/cassandra/tools/NodeCmd.java  |7 +--
 4 files changed, 8 insertions(+), 8 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/eec23092/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 74ee0e9..082ca73 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 1.1-dev
+ * Nodetool and CLI connect to localhost by default (CASSANDRA-3568)
  * Reduce memory used by primary index sample (CASSANDRA-3743)
  * (Hadoop) separate input/output configurations (CASSANDRA-3197, 3765)
  * avoid returning internal Cassandra classes over JMX (CASSANDRA-2805)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/eec23092/src/java/org/apache/cassandra/cli/CliMain.java
--
diff --git a/src/java/org/apache/cassandra/cli/CliMain.java 
b/src/java/org/apache/cassandra/cli/CliMain.java
index b83728d..5d2e633 100644
--- a/src/java/org/apache/cassandra/cli/CliMain.java
+++ b/src/java/org/apache/cassandra/cli/CliMain.java
@@ -57,7 +57,6 @@ public class CliMain
  */
 public static void connect(String server, int port)
 {
-
 TSocket socket = new TSocket(server, port);
 
 if (transport != null)
@@ -258,7 +257,6 @@ public class CliMain
 catch (RuntimeException e)
 {
 sessionState.err.println(e.getMessage());
-System.exit(-1);
 }
 }
 

http://git-wip-us.apache.org/repos/asf/cassandra/blob/eec23092/src/java/org/apache/cassandra/cli/CliOptions.java
--
diff --git a/src/java/org/apache/cassandra/cli/CliOptions.java 
b/src/java/org/apache/cassandra/cli/CliOptions.java
index c3cfab6..7f13347 100644
--- a/src/java/org/apache/cassandra/cli/CliOptions.java
+++ b/src/java/org/apache/cassandra/cli/CliOptions.java
@@ -47,6 +47,7 @@ public class CliOptions
 private static final String SCHEMA_MIGRATION_WAIT_TIME = schema-mwt;
 
 // Default values for optional command line arguments
+private static final String DEFAULT_HOST= 127.0.0.1;
 private static final intDEFAULT_THRIFT_PORT = 9160;
 
 // Register the command line options and their properties (such as
@@ -91,10 +92,7 @@ public class CliOptions
 }
 else
 {
-// host name not specified in command line.
-// In this case, we don't implicitly connect at CLI startup. 
In this case,
-// the user must use the connect CLI statement to connect.
-css.hostName = null;
+css.hostName = DEFAULT_HOST;
 }
 
 // Look to see if frame has been specified

http://git-wip-us.apache.org/repos/asf/cassandra/blob/eec23092/src/java/org/apache/cassandra/tools/NodeCmd.java
--
diff --git a/src/java/org/apache/cassandra/tools/NodeCmd.java 
b/src/java/org/apache/cassandra/tools/NodeCmd.java
index 22939db..7692cd0 100644
--- a/src/java/org/apache/cassandra/tools/NodeCmd.java
+++ b/src/java/org/apache/cassandra/tools/NodeCmd.java
@@ -53,6 +53,8 @@ public class NodeCmd
 private static final PairString, String PASSWORD_OPT = new PairString, 
String(pw, password);
 private static final PairString, String TAG_OPT = new PairString, 
String(t, tag);
 private static final PairString, String PRIMARY_RANGE_OPT = new 
PairString, String(pr, partitioner-range);
+
+private static final String DEFAULT_HOST = 127.0.0.1;
 private static final int DEFAULT_PORT = 7199;
 
 private static ToolOptions options = null;
@@ -63,7 +65,7 @@ public class NodeCmd
 {
 options = new ToolOptions();
 
-options.addOption(HOST_OPT, true, node hostname or ip address, 
true);
+

[jira] [Updated] (CASSANDRA-3706) Back up configuration files on startup

2012-01-25 Thread Dave Brosius (Updated) (JIRA)

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

Dave Brosius updated CASSANDRA-3706:


Attachment: save_configuration_6.diff

Move the Configuration column family to a separate system_configuration 
keyspace that uses SimpleStrategy and RF=1.

Added a Schema.instance.getSystemTables() method and use that for filtering out 
client queries.

de-emphasize the use of Table.SYSTEM_TABLE where possible, use the inferred 
keyspace name.

Very possible i missed something here due to ignorance, so a thorough review 
would be appreciated.



 Back up configuration files on startup
 --

 Key: CASSANDRA-3706
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3706
 Project: Cassandra
  Issue Type: New Feature
  Components: Tools
Reporter: Jonathan Ellis
Assignee: Dave Brosius
Priority: Minor
  Labels: lhf
 Fix For: 1.1

 Attachments: save_configuration.diff, save_configuration_2.diff, 
 save_configuration_3.diff, save_configuration_4.diff, 
 save_configuration_6.diff


 Snapshot can backup user data, but it's also nice to be able to have 
 known-good configurations saved as well in case of accidental snafus or even 
 catastrophic loss of a cluster.  If we check for changes to cassandra.yaml, 
 cassandra-env.sh, and maybe log4j-server.properties on startup, we can back 
 them up to a columnfamily that can then be handled by normal snapshot/backup 
 procedures.

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




[jira] [Updated] (CASSANDRA-3786) [patch] fix bad comparison of IColumn to ByteBuffer

2012-01-25 Thread Dave Brosius (Updated) (JIRA)

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

Dave Brosius updated CASSANDRA-3786:


Attachment: bad_compare.diff

 [patch] fix bad comparison of IColumn to ByteBuffer
 ---

 Key: CASSANDRA-3786
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3786
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Affects Versions: 1.0.7
Reporter: Dave Brosius
Priority: Trivial
 Attachments: bad_compare.diff


 Code does
 firstColumn.equals(startKey)
 changed to 
 firstColumn.name().equals(startKey)

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




[jira] [Created] (CASSANDRA-3787) [patch] fix bad comparison of column name against * or 1

2012-01-25 Thread Dave Brosius (Created) (JIRA)
[patch] fix bad comparison of column name against * or 1


 Key: CASSANDRA-3787
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3787
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Affects Versions: 1.0.7
Reporter: Dave Brosius
Priority: Trivial
 Attachments: bad_column_compare.diff

code does 

(!selectClause.get(0).equals(*)  !selectClause.get(0).equals(1)))

which is a ColumnDefinition against a string 

changed to

String columnName = selectClause.get(0).toString();
if (!columnName.equals(*)  !columnName.equals(1))

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




[jira] [Updated] (CASSANDRA-3787) [patch] fix bad comparison of column name against * or 1

2012-01-25 Thread Dave Brosius (Updated) (JIRA)

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

Dave Brosius updated CASSANDRA-3787:


Attachment: bad_column_compare.diff

 [patch] fix bad comparison of column name against * or 1
 

 Key: CASSANDRA-3787
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3787
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Affects Versions: 1.0.7
Reporter: Dave Brosius
Priority: Trivial
 Attachments: bad_column_compare.diff


 code does 
 (!selectClause.get(0).equals(*)  !selectClause.get(0).equals(1)))
 which is a ColumnDefinition against a string 
 changed to
 String columnName = selectClause.get(0).toString();
 if (!columnName.equals(*)  !columnName.equals(1))

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




[jira] [Created] (CASSANDRA-3788) [patch] fix bad comparison in hadoop cf recorder reader

2012-01-25 Thread Dave Brosius (Created) (JIRA)
[patch] fix bad comparison in hadoop cf recorder reader
---

 Key: CASSANDRA-3788
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3788
 Project: Cassandra
  Issue Type: Bug
  Components: Contrib
Affects Versions: 1.0.7
Reporter: Dave Brosius
Priority: Trivial
 Attachments: bad_column_name_compare.diff

code does

rows.get(0).columns.get(0).column.equals(startColumn)

which is a Column against a ByteBuffer

changed to 

rows.get(0).columns.get(0).column.name.equals(startColumn)

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




[jira] [Updated] (CASSANDRA-3788) [patch] fix bad comparison in hadoop cf recorder reader

2012-01-25 Thread Dave Brosius (Updated) (JIRA)

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

Dave Brosius updated CASSANDRA-3788:


Attachment: bad_column_name_compare.diff

 [patch] fix bad comparison in hadoop cf recorder reader
 ---

 Key: CASSANDRA-3788
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3788
 Project: Cassandra
  Issue Type: Bug
  Components: Contrib
Affects Versions: 1.0.7
Reporter: Dave Brosius
Priority: Trivial
 Attachments: bad_column_name_compare.diff


 code does
 rows.get(0).columns.get(0).column.equals(startColumn)
 which is a Column against a ByteBuffer
 changed to 
 rows.get(0).columns.get(0).column.name.equals(startColumn)

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




[jira] [Created] (CASSANDRA-3789) [patch] fix bad validator lookup (bad key type)

2012-01-25 Thread Dave Brosius (Created) (JIRA)
[patch] fix bad validator lookup (bad key type)
---

 Key: CASSANDRA-3789
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3789
 Project: Cassandra
  Issue Type: Bug
  Components: Hadoop
Affects Versions: 1.0.7
Reporter: Dave Brosius
Priority: Trivial


code looks up an entry in a map by a byte[] even tho the map is keyed by 
ByteBuffer, add a ByteBuffer.wrap call to the key.

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




[jira] [Commented] (CASSANDRA-3744) Nodetool.bat double quotes classpath

2012-01-25 Thread Nick Bailey (Commented) (JIRA)

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

Nick Bailey commented on CASSANDRA-3744:


lgtm.

Tested all tools with a space in the classpath.

 Nodetool.bat double quotes classpath
 

 Key: CASSANDRA-3744
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3744
 Project: Cassandra
  Issue Type: Bug
  Components: Tools
 Environment: Windows
Reporter: Nick Bailey
Assignee: Nick Bailey
Priority: Minor
 Fix For: 1.0.8

 Attachments: 0001-Don-t-double-quote-classpath.patch, 3744-v2.txt


 Windows sucks and double quoting things breaks stuff.

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




[jira] [Updated] (CASSANDRA-3790) [patch] allow compaction score to be a floating pt value

2012-01-25 Thread Dave Brosius (Updated) (JIRA)

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

Dave Brosius updated CASSANDRA-3790:


Attachment: use_double_score.diff

 [patch] allow compaction score to be a floating pt value
 

 Key: CASSANDRA-3790
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3790
 Project: Cassandra
  Issue Type: Improvement
  Components: Core
Affects Versions: 1.0.7
Reporter: Dave Brosius
Priority: Trivial
 Attachments: use_double_score.diff


 compaction score is computed with integer math, making the need for 
 compaction under reported. Use floating pt math instead.

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




[jira] [Updated] (CASSANDRA-3458) Add cqlsh to deb and rpm packaging

2012-01-25 Thread paul cannon (Updated) (JIRA)

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

paul cannon updated CASSANDRA-3458:
---

Fix Version/s: (was: 1.0.8)
   1.1

 Add cqlsh to deb and rpm packaging
 --

 Key: CASSANDRA-3458
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3458
 Project: Cassandra
  Issue Type: Improvement
  Components: Packaging
Affects Versions: 1.0.3
Reporter: paul cannon
Assignee: paul cannon
Priority: Minor
 Fix For: 1.1

 Attachments: 3458.patch-debian.txt


 Once (if?) CASSANDRA-3188 is committed, cqlsh will be distributed with the 
 cassandra tarballs, but not in the debs or rpms. (Actually, it looks like the 
 cqlsh script will get put in the rpm by accident, but not its associated 
 libraries).
 We might even want to break cqlsh out into a separate package from the same 
 source, so that it can be installed on machines only intended to be used as 
 cassandra clients, not servers.
 Maybe that doesn't make sense without including nodetool and cassandra-cli 
 too, and then we'd need yet another package to hold the jars that are common 
 between cassandra and cassandra-client... maybe it's not worth it for now.
 Either way, make sure installing cassandra debs and rpms ends up with a 
 working cqlsh.

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




[jira] [Updated] (CASSANDRA-3458) Add cqlsh to deb and rpm packaging

2012-01-25 Thread paul cannon (Updated) (JIRA)

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

paul cannon updated CASSANDRA-3458:
---

Attachment: (was: 3458.patch-debian.txt)

 Add cqlsh to deb and rpm packaging
 --

 Key: CASSANDRA-3458
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3458
 Project: Cassandra
  Issue Type: Improvement
  Components: Packaging
Affects Versions: 1.0.3
Reporter: paul cannon
Assignee: paul cannon
Priority: Minor
 Fix For: 1.1


 Once (if?) CASSANDRA-3188 is committed, cqlsh will be distributed with the 
 cassandra tarballs, but not in the debs or rpms. (Actually, it looks like the 
 cqlsh script will get put in the rpm by accident, but not its associated 
 libraries).
 We might even want to break cqlsh out into a separate package from the same 
 source, so that it can be installed on machines only intended to be used as 
 cassandra clients, not servers.
 Maybe that doesn't make sense without including nodetool and cassandra-cli 
 too, and then we'd need yet another package to hold the jars that are common 
 between cassandra and cassandra-client... maybe it's not worth it for now.
 Either way, make sure installing cassandra debs and rpms ends up with a 
 working cqlsh.

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




[jira] [Updated] (CASSANDRA-3458) Add cqlsh to deb and rpm packaging

2012-01-25 Thread paul cannon (Updated) (JIRA)

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

paul cannon updated CASSANDRA-3458:
---

Attachment: 0001-add-cqlsh-to-Debian-package.patch.txt

Updated patch applies against trunk, AFTER applying the patch from 
CASSANDRA-3507.

Now ships bundled python-cql and thrift libraries in deb, in accordance with 
the 3507 approach.

For better convenience, use my 3458 branch at

https://github.com/thepaul/cassandra/tree/3458

(commit 0a9555e3f596c340ab9c8f648919bbfbf3b85841, in case the branch goes away 
or changes).

 Add cqlsh to deb and rpm packaging
 --

 Key: CASSANDRA-3458
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3458
 Project: Cassandra
  Issue Type: Improvement
  Components: Packaging
Affects Versions: 1.0.3
Reporter: paul cannon
Assignee: paul cannon
Priority: Minor
 Fix For: 1.1

 Attachments: 0001-add-cqlsh-to-Debian-package.patch.txt


 Once (if?) CASSANDRA-3188 is committed, cqlsh will be distributed with the 
 cassandra tarballs, but not in the debs or rpms. (Actually, it looks like the 
 cqlsh script will get put in the rpm by accident, but not its associated 
 libraries).
 We might even want to break cqlsh out into a separate package from the same 
 source, so that it can be installed on machines only intended to be used as 
 cassandra clients, not servers.
 Maybe that doesn't make sense without including nodetool and cassandra-cli 
 too, and then we'd need yet another package to hold the jars that are common 
 between cassandra and cassandra-client... maybe it's not worth it for now.
 Either way, make sure installing cassandra debs and rpms ends up with a 
 working cqlsh.

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




[jira] [Commented] (CASSANDRA-3786) [patch] fix bad comparison of IColumn to ByteBuffer

2012-01-25 Thread Jonathan Ellis (Commented) (JIRA)

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

Jonathan Ellis commented on CASSANDRA-3786:
---

This is tagged affects 1.0.7 but patch only applies to trunk for me.  Do we 
need a different patch for 1.0 branch, or should this be affects-1.1?

 [patch] fix bad comparison of IColumn to ByteBuffer
 ---

 Key: CASSANDRA-3786
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3786
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Affects Versions: 1.0.7
Reporter: Dave Brosius
Priority: Trivial
 Attachments: bad_compare.diff


 Code does
 firstColumn.equals(startKey)
 changed to 
 firstColumn.name().equals(startKey)

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




[jira] [Updated] (CASSANDRA-3786) [patch] fix bad comparison of IColumn to ByteBuffer

2012-01-25 Thread Jonathan Ellis (Updated) (JIRA)

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

Jonathan Ellis updated CASSANDRA-3786:
--

Affects Version/s: (was: 1.0.7)
   1.1
Fix Version/s: 1.1
 Assignee: Dave Brosius

looks to me like the latter -- will commit on that basis, please reopen if I'm 
wrong

 [patch] fix bad comparison of IColumn to ByteBuffer
 ---

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

 Attachments: bad_compare.diff


 Code does
 firstColumn.equals(startKey)
 changed to 
 firstColumn.name().equals(startKey)

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




[jira] [Resolved] (CASSANDRA-3786) [patch] fix bad comparison of IColumn to ByteBuffer

2012-01-25 Thread Jonathan Ellis (Resolved) (JIRA)

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

Jonathan Ellis resolved CASSANDRA-3786.
---

Resolution: Fixed
  Reviewer: jbellis

 [patch] fix bad comparison of IColumn to ByteBuffer
 ---

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

 Attachments: bad_compare.diff


 Code does
 firstColumn.equals(startKey)
 changed to 
 firstColumn.name().equals(startKey)

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




[jira] [Commented] (CASSANDRA-3787) [patch] fix bad comparison of column name against * or 1

2012-01-25 Thread Jonathan Ellis (Commented) (JIRA)

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

Jonathan Ellis commented on CASSANDRA-3787:
---

This doesn't quite preserve the intent which is to throw on *either* more than 
1 clause, or the count body mismatch.  Updated to this on commit:

{code}
.   if (selectClause.size() != 1)
throw new InvalidRequestException(Only COUNT(*) and 
COUNT(1) operations are currently supported.);
String columnName = selectClause.get(0).toString();
if (!columnName.equals(*)  !columnName.equals(1))
throw new InvalidRequestException(Only COUNT(*) and 
COUNT(1) operations are currently supported.);
{code}


 [patch] fix bad comparison of column name against * or 1
 

 Key: CASSANDRA-3787
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3787
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Affects Versions: 1.1
Reporter: Dave Brosius
Priority: Trivial
  Labels: cql
 Fix For: 1.1

 Attachments: bad_column_compare.diff


 code does 
 (!selectClause.get(0).equals(*)  !selectClause.get(0).equals(1)))
 which is a ColumnDefinition against a string 
 changed to
 String columnName = selectClause.get(0).toString();
 if (!columnName.equals(*)  !columnName.equals(1))

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




[jira] [Updated] (CASSANDRA-3787) [patch] fix bad comparison of column name against * or 1

2012-01-25 Thread Jonathan Ellis (Updated) (JIRA)

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

Jonathan Ellis updated CASSANDRA-3787:
--

 Reviewer: jbellis
Affects Version/s: (was: 1.0.7)
   1.1
Fix Version/s: 1.1
 Assignee: Dave Brosius
   Labels: cql  (was: )

 [patch] fix bad comparison of column name against * or 1
 

 Key: CASSANDRA-3787
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3787
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Affects Versions: 1.1
Reporter: Dave Brosius
Assignee: Dave Brosius
Priority: Trivial
  Labels: cql
 Fix For: 1.1

 Attachments: bad_column_compare.diff


 code does 
 (!selectClause.get(0).equals(*)  !selectClause.get(0).equals(1)))
 which is a ColumnDefinition against a string 
 changed to
 String columnName = selectClause.get(0).toString();
 if (!columnName.equals(*)  !columnName.equals(1))

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




[jira] [Updated] (CASSANDRA-3788) [patch] fix bad comparison in hadoop cf recorder reader

2012-01-25 Thread Jonathan Ellis (Updated) (JIRA)

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

Jonathan Ellis updated CASSANDRA-3788:
--

Affects Version/s: (was: 1.0.7)
   1.1
Fix Version/s: 1.1
 Assignee: Dave Brosius
   Labels: hadoop  (was: )

 [patch] fix bad comparison in hadoop cf recorder reader
 ---

 Key: CASSANDRA-3788
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3788
 Project: Cassandra
  Issue Type: Bug
  Components: Contrib
Affects Versions: 1.1
Reporter: Dave Brosius
Assignee: Dave Brosius
Priority: Trivial
  Labels: hadoop
 Fix For: 1.1

 Attachments: bad_column_name_compare.diff


 code does
 rows.get(0).columns.get(0).column.equals(startColumn)
 which is a Column against a ByteBuffer
 changed to 
 rows.get(0).columns.get(0).column.name.equals(startColumn)

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




[jira] [Resolved] (CASSANDRA-3788) [patch] fix bad comparison in hadoop cf recorder reader

2012-01-25 Thread Jonathan Ellis (Resolved) (JIRA)

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

Jonathan Ellis resolved CASSANDRA-3788.
---

Resolution: Fixed
  Reviewer: jbellis

committed, thanks!

 [patch] fix bad comparison in hadoop cf recorder reader
 ---

 Key: CASSANDRA-3788
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3788
 Project: Cassandra
  Issue Type: Bug
  Components: Contrib
Affects Versions: 1.1
Reporter: Dave Brosius
Assignee: Dave Brosius
Priority: Trivial
  Labels: hadoop
 Fix For: 1.1

 Attachments: bad_column_name_compare.diff


 code does
 rows.get(0).columns.get(0).column.equals(startColumn)
 which is a Column against a ByteBuffer
 changed to 
 rows.get(0).columns.get(0).column.name.equals(startColumn)

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




[2/2] git commit: fix bad validator lookup patch by dbrosius; reviewed by jbellis for CASSANDRA-3789

2012-01-25 Thread jbellis
fix bad validator lookup
patch by dbrosius; reviewed by jbellis for CASSANDRA-3789


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

Branch: refs/heads/cassandra-1.0
Commit: 1a0102751b55f9365fff3f25ab3d7b83e657422b
Parents: 5c66bd9
Author: Jonathan Ellis jbel...@apache.org
Authored: Thu Jan 26 01:24:35 2012 -0600
Committer: Jonathan Ellis jbel...@apache.org
Committed: Thu Jan 26 01:25:53 2012 -0600

--
 .../cassandra/hadoop/pig/CassandraStorage.java |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/1a010275/contrib/pig/src/java/org/apache/cassandra/hadoop/pig/CassandraStorage.java
--
diff --git 
a/contrib/pig/src/java/org/apache/cassandra/hadoop/pig/CassandraStorage.java 
b/contrib/pig/src/java/org/apache/cassandra/hadoop/pig/CassandraStorage.java
index 61f23dd..4513783 100644
--- a/contrib/pig/src/java/org/apache/cassandra/hadoop/pig/CassandraStorage.java
+++ b/contrib/pig/src/java/org/apache/cassandra/hadoop/pig/CassandraStorage.java
@@ -373,7 +373,7 @@ public class CassandraStorage extends LoadFunc implements 
StoreFuncInterface, Lo
 tupleFields.add(colSchema);
 
 valSchema = new ResourceFieldSchema();
-validator = validators.get(cdef.getName());
+validator = validators.get(ByteBuffer.wrap(cdef.getName()));
 if (validator == null)
 validator = marshallers.get(1);
 valSchema.setName(value);



[1/2] git commit: Compute more accurate compaction score per level patch by dbrosius; reviewed by jbellis for CASSANDRA-3790

2012-01-25 Thread jbellis
Updated Branches:
  refs/heads/cassandra-1.0 5c66bd9d3 - b66321057


Compute more accurate compaction score per level
patch by dbrosius; reviewed by jbellis for CASSANDRA-3790


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

Branch: refs/heads/cassandra-1.0
Commit: b663210576a2ca9534d17d2c757e87a8726a8d0c
Parents: 1a01027
Author: Jonathan Ellis jbel...@apache.org
Authored: Thu Jan 26 01:31:38 2012 -0600
Committer: Jonathan Ellis jbel...@apache.org
Committed: Thu Jan 26 01:31:38 2012 -0600

--
 CHANGES.txt|1 +
 .../cassandra/db/compaction/LeveledManifest.java   |2 +-
 2 files changed, 2 insertions(+), 1 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/b6632105/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index cbe8498..2c7db76 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 1.0.8
+ * Compute more accurate compaction score per level (CASSANDRA-3790)
  * Return InvalidRequest when using a keyspace that doesn't exist
(CASSANDRA-3764)
  * disallow user modification of System keyspace (CASSANDRA-3738)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/b6632105/src/java/org/apache/cassandra/db/compaction/LeveledManifest.java
--
diff --git a/src/java/org/apache/cassandra/db/compaction/LeveledManifest.java 
b/src/java/org/apache/cassandra/db/compaction/LeveledManifest.java
index 40a0a17..189de8e 100644
--- a/src/java/org/apache/cassandra/db/compaction/LeveledManifest.java
+++ b/src/java/org/apache/cassandra/db/compaction/LeveledManifest.java
@@ -241,7 +241,7 @@ public class LeveledManifest
 ListSSTableReader sstables = generations[i];
 if (sstables.isEmpty())
 continue; // mostly this just avoids polluting the debug log 
with zero scores
-double score = SSTableReader.getTotalBytes(sstables) / 
maxBytesForLevel(i);
+double score = (double)SSTableReader.getTotalBytes(sstables) / 
(double)maxBytesForLevel(i);
 logger.debug(Compaction score for level {} is {}, i, score);
 
 // L0 gets a special case that if we don't have anything more 
important to do,



[4/6] git commit: fix bad comparison in hadoop cf recorder reader patch by dbrosius; reviewed by jbellis for CASSANDRA-3788

2012-01-25 Thread jbellis
fix bad comparison in hadoop cf recorder reader
patch by dbrosius; reviewed by jbellis for CASSANDRA-3788


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

Branch: refs/heads/trunk
Commit: b60101c9aa2ef123e7c38dc8397e4e415b34cb8c
Parents: f5f3065
Author: Jonathan Ellis jbel...@apache.org
Authored: Thu Jan 26 01:19:38 2012 -0600
Committer: Jonathan Ellis jbel...@apache.org
Committed: Thu Jan 26 01:33:23 2012 -0600

--
 .../cassandra/hadoop/ColumnFamilyRecordReader.java |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/b60101c9/src/java/org/apache/cassandra/hadoop/ColumnFamilyRecordReader.java
--
diff --git a/src/java/org/apache/cassandra/hadoop/ColumnFamilyRecordReader.java 
b/src/java/org/apache/cassandra/hadoop/ColumnFamilyRecordReader.java
index e315ced..3c0360d 100644
--- a/src/java/org/apache/cassandra/hadoop/ColumnFamilyRecordReader.java
+++ b/src/java/org/apache/cassandra/hadoop/ColumnFamilyRecordReader.java
@@ -461,7 +461,7 @@ public class ColumnFamilyRecordReader extends 
RecordReaderByteBuffer, SortedMap
 }
 
 // nothing new? reached the end
-if (lastRow != null  (rows.get(0).key.equals(lastRow.key) || 
rows.get(0).columns.get(0).column.equals(startColumn)))
+if (lastRow != null  (rows.get(0).key.equals(lastRow.key) || 
rows.get(0).columns.get(0).column.name.equals(startColumn)))
 {
 rows = null;
 return;



[2/6] git commit: fix bad validator lookup patch by dbrosius; reviewed by jbellis for CASSANDRA-3789

2012-01-25 Thread jbellis
fix bad validator lookup
patch by dbrosius; reviewed by jbellis for CASSANDRA-3789


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

Branch: refs/heads/trunk
Commit: a43c1ebbfc7808f3202e2a721326802bf7dc
Parents: b60101c
Author: Jonathan Ellis jbel...@apache.org
Authored: Thu Jan 26 01:24:35 2012 -0600
Committer: Jonathan Ellis jbel...@apache.org
Committed: Thu Jan 26 01:33:24 2012 -0600

--
 .../cassandra/hadoop/pig/CassandraStorage.java |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/a43c1ebb/src/java/org/apache/cassandra/hadoop/pig/CassandraStorage.java
--
diff --git a/src/java/org/apache/cassandra/hadoop/pig/CassandraStorage.java 
b/src/java/org/apache/cassandra/hadoop/pig/CassandraStorage.java
index 9a84646..faf1679 100644
--- a/src/java/org/apache/cassandra/hadoop/pig/CassandraStorage.java
+++ b/src/java/org/apache/cassandra/hadoop/pig/CassandraStorage.java
@@ -397,7 +397,7 @@ public class CassandraStorage extends LoadFunc implements 
StoreFuncInterface, Lo
 tupleFields.add(colSchema);
 
 valSchema = new ResourceFieldSchema();
-validator = validators.get(cdef.getName());
+validator = validators.get(ByteBuffer.wrap(cdef.getName()));
 if (validator == null)
 validator = marshallers.get(1);
 valSchema.setName(value);



[5/6] git commit: fix bad comparison of IColumn to ByteBuffer patch by Dave Brosius; reviewed by jbellis for CASSANDRA-3786

2012-01-25 Thread jbellis
fix bad comparison of IColumn to ByteBuffer
patch by Dave Brosius; reviewed by jbellis for CASSANDRA-3786


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

Branch: refs/heads/trunk
Commit: 2f879f278d77608d23891920bf1c95f697b6a25b
Parents: 671a0c9
Author: Jonathan Ellis jbel...@apache.org
Authored: Thu Jan 26 01:10:50 2012 -0600
Committer: Jonathan Ellis jbel...@apache.org
Committed: Thu Jan 26 01:33:22 2012 -0600

--
 .../cassandra/db/index/keys/KeysSearcher.java  |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/2f879f27/src/java/org/apache/cassandra/db/index/keys/KeysSearcher.java
--
diff --git a/src/java/org/apache/cassandra/db/index/keys/KeysSearcher.java 
b/src/java/org/apache/cassandra/db/index/keys/KeysSearcher.java
index cdf9856..124169a 100644
--- a/src/java/org/apache/cassandra/db/index/keys/KeysSearcher.java
+++ b/src/java/org/apache/cassandra/db/index/keys/KeysSearcher.java
@@ -162,7 +162,7 @@ public class KeysSearcher extends SecondaryIndexSearcher
 columnsRead--;
 logger.debug(Skipping {}, 
baseCfs.metadata.getKeyValidator().getString(firstColumn.name()));
 }
-else if (range instanceof Range  
indexColumns.hasNext()  firstColumn.equals(startKey))
+else if (range instanceof Range  
indexColumns.hasNext()  firstColumn.name().equals(startKey))
 {
 // skip key excluded by range
 indexColumns.next();



[1/6] git commit: Compute more accurate compaction score per level patch by dbrosius; reviewed by jbellis for CASSANDRA-3790

2012-01-25 Thread jbellis
Updated Branches:
  refs/heads/trunk d5979b301 - 26083f71f


Compute more accurate compaction score per level
patch by dbrosius; reviewed by jbellis for CASSANDRA-3790


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

Branch: refs/heads/trunk
Commit: 26083f71f1fa39b74fbc6ffbad1a0abfb60fdd9b
Parents: a43c1eb
Author: Jonathan Ellis jbel...@apache.org
Authored: Thu Jan 26 01:31:38 2012 -0600
Committer: Jonathan Ellis jbel...@apache.org
Committed: Thu Jan 26 01:33:26 2012 -0600

--
 CHANGES.txt|1 +
 .../cassandra/db/compaction/LeveledManifest.java   |2 +-
 2 files changed, 2 insertions(+), 1 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/26083f71/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 082ca73..53a6c67 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -61,6 +61,7 @@
 
 
 1.0.8
+ * Compute more accurate compaction score per level (CASSANDRA-3790)
  * Return InvalidRequest when using a keyspace that doesn't exist
(CASSANDRA-3764)
  * disallow user modification of System keyspace (CASSANDRA-3738)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/26083f71/src/java/org/apache/cassandra/db/compaction/LeveledManifest.java
--
diff --git a/src/java/org/apache/cassandra/db/compaction/LeveledManifest.java 
b/src/java/org/apache/cassandra/db/compaction/LeveledManifest.java
index 6c3d8c3..f7bc3ec 100644
--- a/src/java/org/apache/cassandra/db/compaction/LeveledManifest.java
+++ b/src/java/org/apache/cassandra/db/compaction/LeveledManifest.java
@@ -242,7 +242,7 @@ public class LeveledManifest
 ListSSTableReader sstables = generations[i];
 if (sstables.isEmpty())
 continue; // mostly this just avoids polluting the debug log 
with zero scores
-double score = SSTableReader.getTotalBytes(sstables) / 
maxBytesForLevel(i);
+double score = (double)SSTableReader.getTotalBytes(sstables) / 
(double)maxBytesForLevel(i);
 logger.debug(Compaction score for level {} is {}, i, score);
 
 // L0 gets a special case that if we don't have anything more 
important to do,



[6/6] git commit: Return InvalidRequest when using a keyspace that doesn't exist patch by jbellis; reviewed by pcannon for CASSANDRA-3764

2012-01-25 Thread jbellis
Return InvalidRequest when using a keyspace that doesn't exist
patch by jbellis; reviewed by pcannon for CASSANDRA-3764


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

Branch: refs/heads/trunk
Commit: 671a0c9631e9fcf5310ac904f554647d2c7e0280
Parents: d5979b3
Author: Jonathan Ellis jbel...@apache.org
Authored: Tue Jan 24 18:52:14 2012 -0600
Committer: Jonathan Ellis jbel...@apache.org
Committed: Thu Jan 26 01:33:21 2012 -0600

--
 .../org/apache/cassandra/service/ClientState.java  |1 -
 1 files changed, 0 insertions(+), 1 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/671a0c96/src/java/org/apache/cassandra/service/ClientState.java
--
diff --git a/src/java/org/apache/cassandra/service/ClientState.java 
b/src/java/org/apache/cassandra/service/ClientState.java
index c66d99f..603e51a 100644
--- a/src/java/org/apache/cassandra/service/ClientState.java
+++ b/src/java/org/apache/cassandra/service/ClientState.java
@@ -20,7 +20,6 @@ package org.apache.cassandra.service;
 
 import java.util.*;
 
-import com.google.common.collect.Sets;
 import org.apache.commons.lang.StringUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;



[jira] [Resolved] (CASSANDRA-3790) [patch] allow compaction score to be a floating pt value

2012-01-25 Thread Jonathan Ellis (Resolved) (JIRA)

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

Jonathan Ellis resolved CASSANDRA-3790.
---

   Resolution: Fixed
Fix Version/s: 1.0.8
 Reviewer: jbellis
 Assignee: Dave Brosius

committed, thanks!

 [patch] allow compaction score to be a floating pt value
 

 Key: CASSANDRA-3790
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3790
 Project: Cassandra
  Issue Type: Improvement
  Components: Core
Affects Versions: 1.0.7
Reporter: Dave Brosius
Assignee: Dave Brosius
Priority: Trivial
 Fix For: 1.0.8

 Attachments: use_double_score.diff


 compaction score is computed with integer math, making the need for 
 compaction under reported. Use floating pt math instead.

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