[jira] [Updated] (CASSANDRA-4416) Include metadata for system keyspace itself in schema_* tables

2012-10-03 Thread Sylvain Lebresne (JIRA)

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

Sylvain Lebresne updated CASSANDRA-4416:


Attachment: 4416_fix.txt

The problem being, when we load the table from the system table, the system 
ones have already been loaded and shouldn't be loaded a second time. Attaching 
a patch that ignore the system keyspaces when reading schema tables (we only 
write those for client sake, we never need them internally, so let just do as 
if they weren't there).

 Include metadata for system keyspace itself in schema_* tables
 --

 Key: CASSANDRA-4416
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4416
 Project: Cassandra
  Issue Type: Improvement
  Components: Core
Affects Versions: 1.2.0 beta 1
Reporter: paul cannon
Assignee: Jonathan Ellis
Priority: Minor
  Labels: cql, cql3
 Fix For: 1.2.0 beta 2

 Attachments: 4416_fix.txt, 4416.txt


 The `system.schema_keyspaces`, `system.schema_columnfamilies`, and 
 `system.schema_columns` virtual tables allow clients to query schema and 
 layout information through CQL. This will be invaluable when users start to 
 make more use of the CQL-only protocol (CASSANDRA-2478), since there will be 
 no other way to determine certain information about available columnfamilies, 
 keyspaces, or show metadata about them.
 However, the system keyspace itself, and all the columnfamilies in it, are 
 not represented in the schema_* tables:
 {noformat}
 cqlsh select * from system.schema_keyspaces where keyspace = 'system';
 cqlsh 
 cqlsh select * from system.schema_columnfamilies where keyspace = 'system';
 cqlsh 
 cqlsh select * from system.schema_columns where keyspace = 'system';
 cqlsh 
 {noformat}
 It would be greatly helpful to clients which do more introspection than the 
 minimum (say, for example, cqlsh) to be able to get information on the 
 structure and availability of schema-definition tables.

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


[jira] [Updated] (CASSANDRA-4717) cqlsh fails to format values of ReversedType-wrapped classes

2012-10-03 Thread Sylvain Lebresne (JIRA)

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

Sylvain Lebresne updated CASSANDRA-4717:


Attachment: 4717-1.1.txt
4717.txt

Attaching patch to skip returning a ReversedType to CQL3 clients. I'm attaching 
a separate patch for 1.1 and trunk because they are different enough.

 cqlsh fails to format values of ReversedType-wrapped classes
 

 Key: CASSANDRA-4717
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4717
 Project: Cassandra
  Issue Type: Bug
  Components: Tools
Affects Versions: 1.1.0
Reporter: paul cannon
Assignee: paul cannon
Priority: Minor
  Labels: cqlsh
 Fix For: 1.1.6

 Attachments: 4717-1.1.txt, 4717.patch.txt, 4717-test.patch.txt, 
 4717.txt


 See the test case for CASSANDRA-4715, but run it on trunk. The 
 ReversedType-wrapped column (rdate) will be displayed as a floating-point 
 integer (it gets deserialized into a native type correctly, but cqlsh's 
 format-according-to-type machinery doesn't know how to handle the 
 cqltypes.ReversedType subclass.

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


git commit: fixing CliTest failure refer CASSANDRA-2858

2012-10-03 Thread vijay
Updated Branches:
  refs/heads/trunk f3e24bd51 - 447fcef48


fixing CliTest failure refer CASSANDRA-2858

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

Branch: refs/heads/trunk
Commit: 447fcef48630ea3f60a2c97f76910dbfa1a334f5
Parents: f3e24bd
Author: Vijay Parthasarathy vijay2...@gmail.com
Authored: Wed Oct 3 01:08:19 2012 -0700
Committer: Vijay Parthasarathy vijay2...@gmail.com
Committed: Wed Oct 3 01:08:19 2012 -0700

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


http://git-wip-us.apache.org/repos/asf/cassandra/blob/447fcef4/src/java/org/apache/cassandra/net/IncomingTcpConnection.java
--
diff --git a/src/java/org/apache/cassandra/net/IncomingTcpConnection.java 
b/src/java/org/apache/cassandra/net/IncomingTcpConnection.java
index eeb6b31..02b40d1 100644
--- a/src/java/org/apache/cassandra/net/IncomingTcpConnection.java
+++ b/src/java/org/apache/cassandra/net/IncomingTcpConnection.java
@@ -179,7 +179,7 @@ public class IncomingTcpConnection extends Thread
 
 String id = input.readUTF();
 long timestamp = version = MessagingService.VERSION_12
-   ? (System.currentTimeMillis()  0xL) | 
((input.readInt()  2)  2)
+   ? (System.currentTimeMillis()  0xL) | 
(((long) input.readInt()  2)  2)
: System.currentTimeMillis();
 
 MessageIn message = MessageIn.read(input, version, id);



[jira] [Commented] (CASSANDRA-2858) make request dropping more accurate

2012-10-03 Thread Vijay (JIRA)

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

Vijay commented on CASSANDRA-2858:
--

Looks like we still need a minor edit to 
822ee88a38b3862d60b50748382ddf7957907cec, after this change CliTest passes.

https://git-wip-us.apache.org/repos/asf?p=cassandra.git;a=blobdiff;f=src/java/org/apache/cassandra/net/IncomingTcpConnection.java;h=02b40d19855f87bbe82151c2f33b92119e32003c;hp=eeb6b317bfbbac71e4c6d3e0a2253cd57922e707;hb=447fcef48630ea3f60a2c97f76910dbfa1a334f5;hpb=f3e24bd5162eede8ad13abc9c85c90dd971fc110






 make request dropping more accurate
 ---

 Key: CASSANDRA-2858
 URL: https://issues.apache.org/jira/browse/CASSANDRA-2858
 Project: Cassandra
  Issue Type: Improvement
Reporter: Ryan King
Assignee: Jonathan Ellis
Priority: Minor
 Fix For: 1.2.0 beta 1

 Attachments: 2858.txt, 2858-v2.txt, 2858-v3.txt


 Based on the discussion in CASSANDRA-2819, we can make the bookkeeping for 
 request times more accurate.

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


buildbot success in ASF Buildbot on cassandra-trunk

2012-10-03 Thread buildbot
The Buildbot has detected a restored build on builder cassandra-trunk while 
building cassandra.
Full details are available at:
 http://ci.apache.org/builders/cassandra-trunk/builds/1888

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

Buildslave for this Build: portunus_ubuntu

Build Reason: scheduler
Build Source Stamp: [branch trunk] 447fcef48630ea3f60a2c97f76910dbfa1a334f5
Blamelist: Vijay Parthasarathy vijay2...@gmail.com

Build succeeded!

sincerely,
 -The Buildbot





[jira] [Created] (CASSANDRA-4751) User rpc_address for binary protocol and change default port

2012-10-03 Thread Sylvain Lebresne (JIRA)
Sylvain Lebresne created CASSANDRA-4751:
---

 Summary: User rpc_address for binary protocol and change default 
port
 Key: CASSANDRA-4751
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4751
 Project: Cassandra
  Issue Type: Bug
Reporter: Sylvain Lebresne
Assignee: Sylvain Lebresne
Priority: Minor


The events mechanism of the binary protocol require that we know the address on 
which other nodes can be joined (for the binary protocol). Hence 
CASSANDRA-4501. However, in 1.2 we've already burned all the padding in 1.1 
gossip, so we can't gossip a new info (the binary protocol address), so 
CASSANDRA-4501 will have to move to 1.3.

But we do already gossip the rpc_address value, so an option is to make the 
binary protocol bind on the rpc_address (but a specific port) rather than 
having it's own setting. This ticket suggests to do that. Imo, there is little 
downside to do it: the thrift and binary transport are not meant to be used 
together except during the transition from one to the other, and even then 
having to use the same network interface is hardly a limitation (in other 
words, even for 1.3, we might want to hold on CASSANDRA-4501 until someone 
comes with a compelling use case for it).

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


[jira] [Updated] (CASSANDRA-4501) Gossip the ip and port used by the binary protocol

2012-10-03 Thread Sylvain Lebresne (JIRA)

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

Sylvain Lebresne updated CASSANDRA-4501:


Fix Version/s: (was: 1.2.0)
   1.3

 Gossip the ip and port used by the binary protocol
 --

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


 Same as we gossip the rpc_address, we should add gossipping of the native 
 transport address (including the port). CASSANDRA-4480 has one reason why we 
 would want to do that.

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


[jira] [Updated] (CASSANDRA-4751) User rpc_address for binary protocol and change default port

2012-10-03 Thread Sylvain Lebresne (JIRA)

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

Sylvain Lebresne updated CASSANDRA-4751:


Attachment: 4751.txt

Attaching patch for this. The patch also change the default port from 8000 
since it's a bit crowded as a port number.

 User rpc_address for binary protocol and change default port
 

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

 Attachments: 4751.txt


 The events mechanism of the binary protocol require that we know the address 
 on which other nodes can be joined (for the binary protocol). Hence 
 CASSANDRA-4501. However, in 1.2 we've already burned all the padding in 1.1 
 gossip, so we can't gossip a new info (the binary protocol address), so 
 CASSANDRA-4501 will have to move to 1.3.
 But we do already gossip the rpc_address value, so an option is to make the 
 binary protocol bind on the rpc_address (but a specific port) rather than 
 having it's own setting. This ticket suggests to do that. Imo, there is 
 little downside to do it: the thrift and binary transport are not meant to be 
 used together except during the transition from one to the other, and even 
 then having to use the same network interface is hardly a limitation (in 
 other words, even for 1.3, we might want to hold on CASSANDRA-4501 until 
 someone comes with a compelling use case for it).

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


[jira] [Commented] (CASSANDRA-4501) Gossip the ip and port used by the binary protocol

2012-10-03 Thread Sylvain Lebresne (JIRA)

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

Sylvain Lebresne commented on CASSANDRA-4501:
-

bq. I should also note that for 1.2, we've added 5 gossip states, and we have 5 
padding states in 1.1, so we don't really have room to add anymore in this 
release

Alright, for 1.2 I've created CASSANDRA-4751 and so I'm moving this to 1.3. As 
said in CASSANDRA-4751, if nobody complains about having the same address for 
thrift and the binary protocol, I'm good skipping that altogether.

On the port issue, let it be clear that I don't care about allowing people to 
use different ports on different machines. I do still think however that we 
should start gossiping the ports if only to throw out an error (or a warning) 
if people do use different ports on different host. Because allowing it 
silently but not supporting it in other parts of the code is not the best user 
experience imho. But that's by all mean a minor issue and is not specific to 
the binary protocol.

 Gossip the ip and port used by the binary protocol
 --

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


 Same as we gossip the rpc_address, we should add gossipping of the native 
 transport address (including the port). CASSANDRA-4480 has one reason why we 
 would want to do that.

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


git commit: Fix bug in binary protocol

2012-10-03 Thread slebresne
Updated Branches:
  refs/heads/trunk 447fcef48 - 88ae22f38


Fix bug in binary protocol


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

Branch: refs/heads/trunk
Commit: 88ae22f3851fc253e3d02b34d53ea56c7fefe97f
Parents: 447fcef
Author: Sylvain Lebresne sylv...@datastax.com
Authored: Wed Oct 3 12:37:34 2012 +0200
Committer: Sylvain Lebresne sylv...@datastax.com
Committed: Wed Oct 3 12:37:34 2012 +0200

--
 src/java/org/apache/cassandra/transport/Frame.java |9 +
 1 files changed, 1 insertions(+), 8 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/88ae22f3/src/java/org/apache/cassandra/transport/Frame.java
--
diff --git a/src/java/org/apache/cassandra/transport/Frame.java 
b/src/java/org/apache/cassandra/transport/Frame.java
index b164998..8e3240b 100644
--- a/src/java/org/apache/cassandra/transport/Frame.java
+++ b/src/java/org/apache/cassandra/transport/Frame.java
@@ -156,7 +156,7 @@ public class Frame
 }
 
 @Override
-protected Object decode (ChannelHandlerContext ctx, Channel channel, 
ChannelBuffer buffer)
+protected Object decode(ChannelHandlerContext ctx, Channel channel, 
ChannelBuffer buffer)
 throws Exception
 {
 ChannelBuffer frame = (ChannelBuffer) super.decode(ctx, channel, 
buffer);
@@ -166,13 +166,6 @@ public class Frame
 }
 return Frame.create(frame, connection);
 }
-
-@Override
-protected ChannelBuffer extractFrame(ChannelBuffer buffer, int index, 
int length)
-{
-// Don't copy
-return buffer.slice(index, length);
-}
 }
 
 public static class Encoder extends OneToOneEncoder



[jira] [Created] (CASSANDRA-4752) Drop keyspace causes schema disagreement

2012-10-03 Thread Sam Tunnicliffe (JIRA)
Sam Tunnicliffe created CASSANDRA-4752:
--

 Summary: Drop keyspace causes schema disagreement 
 Key: CASSANDRA-4752
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4752
 Project: Cassandra
  Issue Type: Bug
Affects Versions: 1.1.6
Reporter: Sam Tunnicliffe


The fix for CASSANDRA-4698 introduced a bug whereby when drop keyspace is 
issued a schema disagreement immediately occurs. This seems to be because the 

{code}
ColumnFamily cf = 
ColumnFamily.create(modification.getValue().metadata());
{code}

in {{RowMutation.deserializeFixingTimestamps}} does not preserve deletion info 
for the cf in the modification. In most cases, this doesn't cause a problem, 
but for a drop keyspace modification, there are no columns in the cf, so the 
deletion info is effectively lost leading to an incorrect digest being created 
and ultimately a schema disagreement.

Replacing the {{create}} with {{cloneMeShallow}} does preserve the deletion 
info and avoids the schema disagreement issue.


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


[jira] [Updated] (CASSANDRA-4752) Drop keyspace causes schema disagreement

2012-10-03 Thread Sam Tunnicliffe (JIRA)

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

Sam Tunnicliffe updated CASSANDRA-4752:
---

Description: 
The fix for CASSANDRA-4698 introduced a bug whereby when drop keyspace is 
issued a schema disagreement immediately occurs. This seems to be because the 

{code}ColumnFamily cf = 
ColumnFamily.create(modification.getValue().metadata());{code}

in {{RowMutation.deserializeFixingTimestamps}} does not preserve deletion info 
for the cf in the modification. In most cases, this doesn't cause a problem, 
but for a drop keyspace modification, there are no columns in the cf, so the 
deletion info is effectively lost leading to an incorrect digest being created 
and ultimately a schema disagreement.

Replacing the {{create}} with {{cloneMeShallow}} does preserve the deletion 
info and avoids the schema disagreement issue.


  was:
The fix for CASSANDRA-4698 introduced a bug whereby when drop keyspace is 
issued a schema disagreement immediately occurs. This seems to be because the 

{code}
ColumnFamily cf = 
ColumnFamily.create(modification.getValue().metadata());
{code}

in {{RowMutation.deserializeFixingTimestamps}} does not preserve deletion info 
for the cf in the modification. In most cases, this doesn't cause a problem, 
but for a drop keyspace modification, there are no columns in the cf, so the 
deletion info is effectively lost leading to an incorrect digest being created 
and ultimately a schema disagreement.

Replacing the {{create}} with {{cloneMeShallow}} does preserve the deletion 
info and avoids the schema disagreement issue.



 Drop keyspace causes schema disagreement 
 -

 Key: CASSANDRA-4752
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4752
 Project: Cassandra
  Issue Type: Bug
Affects Versions: 1.1.6
Reporter: Sam Tunnicliffe

 The fix for CASSANDRA-4698 introduced a bug whereby when drop keyspace is 
 issued a schema disagreement immediately occurs. This seems to be because the 
 {code}ColumnFamily cf = 
 ColumnFamily.create(modification.getValue().metadata());{code}
 in {{RowMutation.deserializeFixingTimestamps}} does not preserve deletion 
 info for the cf in the modification. In most cases, this doesn't cause a 
 problem, but for a drop keyspace modification, there are no columns in the 
 cf, so the deletion info is effectively lost leading to an incorrect digest 
 being created and ultimately a schema disagreement.
 Replacing the {{create}} with {{cloneMeShallow}} does preserve the deletion 
 info and avoids the schema disagreement issue.

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


[jira] [Updated] (CASSANDRA-4752) Drop keyspace causes schema disagreement

2012-10-03 Thread Sam Tunnicliffe (JIRA)

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

Sam Tunnicliffe updated CASSANDRA-4752:
---

Attachment: 0001-CASSANDRA-4752.txt

 Drop keyspace causes schema disagreement 
 -

 Key: CASSANDRA-4752
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4752
 Project: Cassandra
  Issue Type: Bug
Affects Versions: 1.1.6
Reporter: Sam Tunnicliffe
Assignee: Sam Tunnicliffe
 Attachments: 0001-CASSANDRA-4752.txt


 The fix for CASSANDRA-4698 introduced a bug whereby when drop keyspace is 
 issued a schema disagreement immediately occurs. This seems to be because the 
 {code}ColumnFamily cf = 
 ColumnFamily.create(modification.getValue().metadata());{code}
 in {{RowMutation.deserializeFixingTimestamps}} does not preserve deletion 
 info for the cf in the modification. In most cases, this doesn't cause a 
 problem, but for a drop keyspace modification, there are no columns in the 
 cf, so the deletion info is effectively lost leading to an incorrect digest 
 being created and ultimately a schema disagreement.
 Replacing the {{create}} with {{cloneMeShallow}} does preserve the deletion 
 info and avoids the schema disagreement issue.

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


[jira] [Commented] (CASSANDRA-4717) cqlsh fails to format values of ReversedType-wrapped classes

2012-10-03 Thread T Jake Luciani (JIRA)

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

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

+1 I like this idea

 cqlsh fails to format values of ReversedType-wrapped classes
 

 Key: CASSANDRA-4717
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4717
 Project: Cassandra
  Issue Type: Bug
  Components: Tools
Affects Versions: 1.1.0
Reporter: paul cannon
Assignee: paul cannon
Priority: Minor
  Labels: cqlsh
 Fix For: 1.1.6

 Attachments: 4717-1.1.txt, 4717.patch.txt, 4717-test.patch.txt, 
 4717.txt


 See the test case for CASSANDRA-4715, but run it on trunk. The 
 ReversedType-wrapped column (rdate) will be displayed as a floating-point 
 integer (it gets deserialized into a native type correctly, but cqlsh's 
 format-according-to-type machinery doesn't know how to handle the 
 cqltypes.ReversedType subclass.

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


[jira] [Updated] (CASSANDRA-4741) Cassandra stops persisting or flushing data

2012-10-03 Thread Mauri Melato (JIRA)

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

Mauri Melato updated CASSANDRA-4741:


Summary: Cassandra stops persisting or flushing data  (was: Cassandra stops 
persisting data on 32 bit windows)

 Cassandra stops persisting or flushing data
 ---

 Key: CASSANDRA-4741
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4741
 Project: Cassandra
  Issue Type: Bug
 Environment: Windows XP 32 bit
 Cassandra 1.1.4 or 1.1.5
Reporter: Mauri Melato
 Fix For: 1.1.4, 1.1.5

 Attachments: cassandra-data.minimal.zip


 Hello,
  
  we have a Cassandra instance running on a single node with Windows XP 32bit.
 After some time of normal working and some restart, Cassandra seems to stop 
 to persist data into the keyspace without raising any error.
 It's possible to update/insert rows or columns and you can query and see the 
 updated keyspace but if you stop and start Cassandra, you get a keyspace 
 'from the past', always from the same point in the past.
 We were not able to understand how to trigger this inconsistency in the first 
 place but once you get it, you can't get rid of it if not removing the data 
 directories.
 Here in attachment you can find a complete set of Cassandra data directories: 
 {code}
cassandra-data/
|-- commitlog
|-- data
`-- saved_caches
 {code}
 with which it's possible test the inconsistent scenario. 
 We tried this on another clean Win Xp 32 machine and we could get the same 
 issue from the first run.
 On a Win XP 64 and the same dir set, Cassandra didn't get into this issue, 
 but from the log we saw a difference in the disk access mode:
 * XP/64: {{DiskAccessMode 'auto' determined to be mmap, indexAccessMode is 
 mmap instead of 'standard'}}
 * XP/32: {{DiskAccessMode 'auto' determined to be standard, indexAccessMode 
 is standard}}
 Not sure this is the key factor, nevertheless in another test bed we 
 experimented the same issue even on a WinXP 64 node but we couldn't collect 
 the dataset.
 Here a short cassandra-cli history to show the issue:
 {code}
 [default@NEUTRO_Keyspace] connect 192.168.1.33/9160;
 Connected to: NEUTRO Cluster on 192.168.1.33/9160
 [default@unknown] use neutro_keyspace;
 Authenticated to keyspace: NEUTRO_Keyspace
 [default@NEUTRO_Keyspace] describe;
 Keyspace: NEUTRO_Keyspace:
   Replication Strategy: org.apache.cassandra.locator.SimpleStrategy
   Durable Writes: true
 Options: [replication_factor:1]
   Column Families:
 ColumnFamily: TaskId
   Key Validation Class: org.apache.cassandra.db.marshal.AsciiType
   Default column value validator: org.apache.cassandra.db.marshal.UTF8Type
   Columns sorted by: org.apache.cassandra.db.marshal.AsciiType
   GC grace seconds: 864000
   Compaction min/max thresholds: 4/32
   Read repair chance: 1.0
   DC Local Read repair chance: 0.0
   Replicate on write: true
   Caching: KEYS_ONLY
   Bloom Filter FP chance: default
   Built indexes: []
   Column Metadata:
 Column Name: taskId
   Validation Class: org.apache.cassandra.db.marshal.LongType
   Compaction Strategy: 
 org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy
   Compression Options:
 sstable_compression: org.apache.cassandra.io.compress.SnappyCompressor
 [default@NEUTRO_Keyspace] list TaskId;
 Using default limit of 100
 Using default column limit of 100
 ---
 RowKey: NE_MASTER_TASK_ID
 = (column=taskId, value=47, timestamp=1349090424494000)
 1 Row Returned.
 Elapsed time: 93 msec(s).
 [default@NEUTRO_Keyspace] set  taskid['NE_MASTER_TASK_ID']['taskId']='55';
 Value inserted.
 Elapsed time: 31 msec(s).
 [default@NEUTRO_Keyspace] list TaskId;
 Using default limit of 100
 Using default column limit of 100
 ---
 RowKey: NE_MASTER_TASK_ID
 = (column=taskId, value=55, timestamp=1349108488164000)
 1 Row Returned.
 Elapsed time: 31 msec(s).
 {code}
 ...Stop and Start Cassandra...
 {code}
 [default@NEUTRO_Keyspace] connect 192.168.1.33/9160;
 Connected to: NEUTRO Cluster on 192.168.1.33/9160
 [default@unknown] use neutro_keyspace;
 Authenticated to keyspace: NEUTRO_Keyspace
 [default@NEUTRO_Keyspace] list TaskId;
 Using default limit of 100
 Using default column limit of 100
 ---
 RowKey: NE_MASTER_TASK_ID
 = (column=taskId, value=47, timestamp=1349090424494000)
 1 Row Returned.
 Elapsed time: 110 msec(s).
 {code}
 Thanks for your attention

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


[jira] [Commented] (CASSANDRA-4416) Include metadata for system keyspace itself in schema_* tables

2012-10-03 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis commented on CASSANDRA-4416:
---

+1

 Include metadata for system keyspace itself in schema_* tables
 --

 Key: CASSANDRA-4416
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4416
 Project: Cassandra
  Issue Type: Improvement
  Components: Core
Affects Versions: 1.2.0 beta 1
Reporter: paul cannon
Assignee: Jonathan Ellis
Priority: Minor
  Labels: cql, cql3
 Fix For: 1.2.0 beta 2

 Attachments: 4416_fix.txt, 4416.txt


 The `system.schema_keyspaces`, `system.schema_columnfamilies`, and 
 `system.schema_columns` virtual tables allow clients to query schema and 
 layout information through CQL. This will be invaluable when users start to 
 make more use of the CQL-only protocol (CASSANDRA-2478), since there will be 
 no other way to determine certain information about available columnfamilies, 
 keyspaces, or show metadata about them.
 However, the system keyspace itself, and all the columnfamilies in it, are 
 not represented in the schema_* tables:
 {noformat}
 cqlsh select * from system.schema_keyspaces where keyspace = 'system';
 cqlsh 
 cqlsh select * from system.schema_columnfamilies where keyspace = 'system';
 cqlsh 
 cqlsh select * from system.schema_columns where keyspace = 'system';
 cqlsh 
 {noformat}
 It would be greatly helpful to clients which do more introspection than the 
 minimum (say, for example, cqlsh) to be able to get information on the 
 structure and availability of schema-definition tables.

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


git commit: Don't return ReversedType in CQL3 resultSet

2012-10-03 Thread slebresne
Updated Branches:
  refs/heads/cassandra-1.1 6ddcf0388 - 0e0213b60


Don't return ReversedType in CQL3 resultSet

patch by slebresne; reviewed by tjake for CASSANDRA-4717


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

Branch: refs/heads/cassandra-1.1
Commit: 0e0213b60468232b43b3d9661c75b1021564a853
Parents: 6ddcf03
Author: Sylvain Lebresne sylv...@datastax.com
Authored: Wed Oct 3 17:24:23 2012 +0200
Committer: Sylvain Lebresne sylv...@datastax.com
Committed: Wed Oct 3 17:24:43 2012 +0200

--
 CHANGES.txt|1 +
 .../org/apache/cassandra/cql3/QueryProcessor.java  |2 +-
 .../cassandra/cql3/statements/SelectStatement.java |   21 ++-
 .../apache/cassandra/db/marshal/ReversedType.java  |3 +-
 4 files changed, 17 insertions(+), 10 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/0e0213b6/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index e922c3c..292db49 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -14,6 +14,7 @@
  * (CLI) display elapsed time in 2 fraction digits (CASSANDRA-3460)
  * add authentication support to sstableloader (CASSANDRA-4712)
  * Fix CQL3 'is reversed' logic (CASSANDRA-4716)
+ * (CQL3) Don't return ReversedType in result set metadata (CASSANDRA-4717)
 Merged from 1.0:
  * Switch from NBHM to CHM in MessagingService's callback map, which
prevents OOM in long-running instances (CASSANDRA-4708)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/0e0213b6/src/java/org/apache/cassandra/cql3/QueryProcessor.java
--
diff --git a/src/java/org/apache/cassandra/cql3/QueryProcessor.java 
b/src/java/org/apache/cassandra/cql3/QueryProcessor.java
index 6c155ed..9522c61 100644
--- a/src/java/org/apache/cassandra/cql3/QueryProcessor.java
+++ b/src/java/org/apache/cassandra/cql3/QueryProcessor.java
@@ -206,7 +206,7 @@ public class QueryProcessor
 ListString var_names = new 
ArrayListString(prepared.boundNames.size());
 for (CFDefinition.Name n : prepared.boundNames)
 {
-var_types.add(TypeParser.getShortName(n.type));
+var_types.add(SelectStatement.getShortTypeName(n.type));
 var_names.add(n.name.toString());
 }
 

http://git-wip-us.apache.org/repos/asf/cassandra/blob/0e0213b6/src/java/org/apache/cassandra/cql3/statements/SelectStatement.java
--
diff --git a/src/java/org/apache/cassandra/cql3/statements/SelectStatement.java 
b/src/java/org/apache/cassandra/cql3/statements/SelectStatement.java
index fac0deb..d288294 100644
--- a/src/java/org/apache/cassandra/cql3/statements/SelectStatement.java
+++ b/src/java/org/apache/cassandra/cql3/statements/SelectStatement.java
@@ -168,12 +168,19 @@ public class SelectStatement implements CQLStatement
 return process(rows, createSchema(), 
Collections.ByteBufferemptyList());
 }
 
+public static String getShortTypeName(AbstractType? type)
+{
+if (type instanceof ReversedType)
+type = ((ReversedType)type).baseType;
+return TypeParser.getShortName(type);
+}
+
 private CqlMetadata createSchema()
 {
 return new CqlMetadata(new HashMapByteBuffer, String(),
new HashMapByteBuffer, String(),
-   TypeParser.getShortName(cfDef.cfm.comparator),
-   
TypeParser.getShortName(cfDef.cfm.getDefaultValidator()));
+   getShortTypeName(cfDef.cfm.comparator),
+   
getShortTypeName(cfDef.cfm.getDefaultValidator()));
 }
 
 public String keyspace()
@@ -616,22 +623,22 @@ public class SelectStatement implements CQLStatement
 if (p.right.hasFunction())
 {
 ByteBuffer nameAsRequested = 
ByteBufferUtil.bytes(p.right.toString());
-schema.name_types.put(nameAsRequested, 
TypeParser.getShortName(cfDef.definitionType));
+schema.name_types.put(nameAsRequested, 
getShortTypeName(cfDef.definitionType));
 switch (p.right.function())
 {
 case WRITE_TIME:
-schema.value_types.put(nameAsRequested, 
TypeParser.getShortName(LongType.instance));
+schema.value_types.put(nameAsRequested, 
getShortTypeName(LongType.instance));
 break;
 case TTL:
-schema.value_types.put(nameAsRequested, 

[jira] [Commented] (CASSANDRA-2858) make request dropping more accurate

2012-10-03 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis commented on CASSANDRA-2858:
---

Thanks Vijay!

 make request dropping more accurate
 ---

 Key: CASSANDRA-2858
 URL: https://issues.apache.org/jira/browse/CASSANDRA-2858
 Project: Cassandra
  Issue Type: Improvement
Reporter: Ryan King
Assignee: Jonathan Ellis
Priority: Minor
 Fix For: 1.2.0 beta 1

 Attachments: 2858.txt, 2858-v2.txt, 2858-v3.txt


 Based on the discussion in CASSANDRA-2819, we can make the bookkeeping for 
 request times more accurate.

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


[3/3] git commit: Don't return ReversedType in CQL3 resultSet

2012-10-03 Thread slebresne
Don't return ReversedType in CQL3 resultSet

patch by slebresne; reviewed by tjake for CASSANDRA-4717


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

Branch: refs/heads/trunk
Commit: 0e0213b60468232b43b3d9661c75b1021564a853
Parents: 6ddcf03
Author: Sylvain Lebresne sylv...@datastax.com
Authored: Wed Oct 3 17:24:23 2012 +0200
Committer: Sylvain Lebresne sylv...@datastax.com
Committed: Wed Oct 3 17:24:43 2012 +0200

--
 CHANGES.txt|1 +
 .../org/apache/cassandra/cql3/QueryProcessor.java  |2 +-
 .../cassandra/cql3/statements/SelectStatement.java |   21 ++-
 .../apache/cassandra/db/marshal/ReversedType.java  |3 +-
 4 files changed, 17 insertions(+), 10 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/0e0213b6/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index e922c3c..292db49 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -14,6 +14,7 @@
  * (CLI) display elapsed time in 2 fraction digits (CASSANDRA-3460)
  * add authentication support to sstableloader (CASSANDRA-4712)
  * Fix CQL3 'is reversed' logic (CASSANDRA-4716)
+ * (CQL3) Don't return ReversedType in result set metadata (CASSANDRA-4717)
 Merged from 1.0:
  * Switch from NBHM to CHM in MessagingService's callback map, which
prevents OOM in long-running instances (CASSANDRA-4708)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/0e0213b6/src/java/org/apache/cassandra/cql3/QueryProcessor.java
--
diff --git a/src/java/org/apache/cassandra/cql3/QueryProcessor.java 
b/src/java/org/apache/cassandra/cql3/QueryProcessor.java
index 6c155ed..9522c61 100644
--- a/src/java/org/apache/cassandra/cql3/QueryProcessor.java
+++ b/src/java/org/apache/cassandra/cql3/QueryProcessor.java
@@ -206,7 +206,7 @@ public class QueryProcessor
 ListString var_names = new 
ArrayListString(prepared.boundNames.size());
 for (CFDefinition.Name n : prepared.boundNames)
 {
-var_types.add(TypeParser.getShortName(n.type));
+var_types.add(SelectStatement.getShortTypeName(n.type));
 var_names.add(n.name.toString());
 }
 

http://git-wip-us.apache.org/repos/asf/cassandra/blob/0e0213b6/src/java/org/apache/cassandra/cql3/statements/SelectStatement.java
--
diff --git a/src/java/org/apache/cassandra/cql3/statements/SelectStatement.java 
b/src/java/org/apache/cassandra/cql3/statements/SelectStatement.java
index fac0deb..d288294 100644
--- a/src/java/org/apache/cassandra/cql3/statements/SelectStatement.java
+++ b/src/java/org/apache/cassandra/cql3/statements/SelectStatement.java
@@ -168,12 +168,19 @@ public class SelectStatement implements CQLStatement
 return process(rows, createSchema(), 
Collections.ByteBufferemptyList());
 }
 
+public static String getShortTypeName(AbstractType? type)
+{
+if (type instanceof ReversedType)
+type = ((ReversedType)type).baseType;
+return TypeParser.getShortName(type);
+}
+
 private CqlMetadata createSchema()
 {
 return new CqlMetadata(new HashMapByteBuffer, String(),
new HashMapByteBuffer, String(),
-   TypeParser.getShortName(cfDef.cfm.comparator),
-   
TypeParser.getShortName(cfDef.cfm.getDefaultValidator()));
+   getShortTypeName(cfDef.cfm.comparator),
+   
getShortTypeName(cfDef.cfm.getDefaultValidator()));
 }
 
 public String keyspace()
@@ -616,22 +623,22 @@ public class SelectStatement implements CQLStatement
 if (p.right.hasFunction())
 {
 ByteBuffer nameAsRequested = 
ByteBufferUtil.bytes(p.right.toString());
-schema.name_types.put(nameAsRequested, 
TypeParser.getShortName(cfDef.definitionType));
+schema.name_types.put(nameAsRequested, 
getShortTypeName(cfDef.definitionType));
 switch (p.right.function())
 {
 case WRITE_TIME:
-schema.value_types.put(nameAsRequested, 
TypeParser.getShortName(LongType.instance));
+schema.value_types.put(nameAsRequested, 
getShortTypeName(LongType.instance));
 break;
 case TTL:
-schema.value_types.put(nameAsRequested, 
TypeParser.getShortName(Int32Type.instance));
+

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

2012-10-03 Thread slebresne
Merge branch 'cassandra-1.1' into trunk

Conflicts:
src/java/org/apache/cassandra/cql3/QueryProcessor.java
src/java/org/apache/cassandra/cql3/statements/SelectStatement.java


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

Branch: refs/heads/trunk
Commit: fe57553cf61f5f3aff510c6c80f6502b42dc7fef
Parents: 88ae22f 0e0213b
Author: Sylvain Lebresne sylv...@datastax.com
Authored: Wed Oct 3 17:28:33 2012 +0200
Committer: Sylvain Lebresne sylv...@datastax.com
Committed: Wed Oct 3 17:28:33 2012 +0200

--
 CHANGES.txt|1 +
 src/java/org/apache/cassandra/cql3/ResultSet.java  |5 -
 .../apache/cassandra/db/marshal/ReversedType.java  |3 +--
 .../org/apache/cassandra/transport/DataType.java   |5 +
 4 files changed, 11 insertions(+), 3 deletions(-)
--


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

http://git-wip-us.apache.org/repos/asf/cassandra/blob/fe57553c/src/java/org/apache/cassandra/cql3/ResultSet.java
--
diff --cc src/java/org/apache/cassandra/cql3/ResultSet.java
index 2b51469,000..66b0c5a
mode 100644,00..100644
--- a/src/java/org/apache/cassandra/cql3/ResultSet.java
+++ b/src/java/org/apache/cassandra/cql3/ResultSet.java
@@@ -1,340 -1,0 +1,343 @@@
 +/*
 + * Licensed to the Apache Software Foundation (ASF) under one
 + * or more contributor license agreements.  See the NOTICE file
 + * distributed with this work for additional information
 + * regarding copyright ownership.  The ASF licenses this file
 + * to you under the Apache License, Version 2.0 (the
 + * License); you may not use this file except in compliance
 + * with the License.  You may obtain a copy of the License at
 + *
 + * http://www.apache.org/licenses/LICENSE-2.0
 + *
 + * Unless required by applicable law or agreed to in writing, software
 + * distributed under the License is distributed on an AS IS BASIS,
 + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 + * See the License for the specific language governing permissions and
 + * limitations under the License.
 + */
 +package org.apache.cassandra.cql3;
 +
 +import java.nio.ByteBuffer;
 +import java.util.*;
 +
 +import org.jboss.netty.buffer.ChannelBuffer;
 +import org.jboss.netty.buffer.ChannelBuffers;
 +
 +import org.apache.cassandra.transport.*;
 +import org.apache.cassandra.db.marshal.AbstractType;
 +import org.apache.cassandra.db.marshal.LongType;
++import org.apache.cassandra.db.marshal.ReversedType;
 +import org.apache.cassandra.db.marshal.TypeParser;
 +import org.apache.cassandra.thrift.Column;
 +import org.apache.cassandra.thrift.CqlMetadata;
 +import org.apache.cassandra.thrift.CqlResult;
 +import org.apache.cassandra.thrift.CqlResultType;
 +import org.apache.cassandra.thrift.CqlRow;
 +import org.apache.cassandra.utils.ByteBufferUtil;
 +import org.apache.cassandra.utils.FBUtilities;
 +
 +public class ResultSet
 +{
 +public static final Codec codec = new Codec();
 +private static final ColumnIdentifier COUNT_COLUMN = new 
ColumnIdentifier(count, false);
 +
 +public final Metadata metadata;
 +public final ListListByteBuffer rows;
 +
 +public ResultSet(ListColumnSpecification metadata)
 +{
 +this(new Metadata(metadata), new ArrayListListByteBuffer());
 +}
 +
 +private ResultSet(Metadata metadata, ListListByteBuffer rows)
 +{
 +this.metadata = metadata;
 +this.rows = rows;
 +}
 +
 +public int size()
 +{
 +return rows.size();
 +}
 +
 +public void addColumnValue(ByteBuffer value)
 +{
 +if (rows.isEmpty() || lastRow().size() == metadata.names.size())
 +rows.add(new ArrayListByteBuffer(metadata.names.size()));
 +
 +lastRow().add(value);
 +}
 +
 +private ListByteBuffer lastRow()
 +{
 +return rows.get(rows.size() - 1);
 +}
 +
 +public void reverse()
 +{
 +Collections.reverse(rows);
 +}
 +
 +public void trim(int limit)
 +{
 +int toRemove = rows.size() - limit;
 +if (toRemove  0)
 +{
 +for (int i = 0; i  toRemove; i++)
 +rows.remove(rows.size() - 1);
 +}
 +}
 +
 +public ResultSet makeCountResult()
 +{
 +String ksName = metadata.names.get(0).ksName;
 +String cfName = metadata.names.get(0).cfName;
 +metadata.names.clear();
 +metadata.names.add(new ColumnSpecification(ksName, cfName, 

[1/3] git commit: Fix regression from #4416

2012-10-03 Thread slebresne
Updated Branches:
  refs/heads/trunk 88ae22f38 - 7833db260


Fix regression from #4416

patch by slebresne; reviewed by jbellis for CASSANDRA-4416


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

Branch: refs/heads/trunk
Commit: 7833db26050eafcee928f6ca7b8becf64a9c5563
Parents: fe57553
Author: Sylvain Lebresne sylv...@datastax.com
Authored: Wed Oct 3 17:29:20 2012 +0200
Committer: Sylvain Lebresne sylv...@datastax.com
Committed: Wed Oct 3 17:29:20 2012 +0200

--
 src/java/org/apache/cassandra/db/DefsTable.java |   15 ++-
 1 files changed, 14 insertions(+), 1 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/7833db26/src/java/org/apache/cassandra/db/DefsTable.java
--
diff --git a/src/java/org/apache/cassandra/db/DefsTable.java 
b/src/java/org/apache/cassandra/db/DefsTable.java
index 3deac35..e696ad5 100644
--- a/src/java/org/apache/cassandra/db/DefsTable.java
+++ b/src/java/org/apache/cassandra/db/DefsTable.java
@@ -19,6 +19,7 @@ package org.apache.cassandra.db;
 
 import java.io.IOException;
 import java.nio.ByteBuffer;
+import java.nio.charset.CharacterCodingException;
 import java.util.*;
 import java.util.concurrent.ExecutionException;
 import java.util.concurrent.Future;
@@ -149,7 +150,7 @@ public class DefsTable
 
 for (Row row : serializedSchema)
 {
-if (invalidSchemaRow(row))
+if (invalidSchemaRow(row) || ignoredSchemaRow(row))
 continue;
 
 keyspaces.add(KSMetaData.fromSchema(row, 
serializedColumnFamilies(row.key)));
@@ -232,6 +233,18 @@ public class DefsTable
 return row.cf == null || (row.cf.isMarkedForDelete()  
row.cf.isEmpty());
 }
 
+private static boolean ignoredSchemaRow(Row row)
+{
+try
+{
+return 
Schema.systemKeyspaceNames.contains(ByteBufferUtil.string(row.key.key));
+}
+catch (CharacterCodingException e)
+{
+throw new RuntimeException(e);
+}
+}
+
 public static ByteBuffer searchComposite(String name, boolean start)
 {
 assert name != null;



[jira] [Resolved] (CASSANDRA-4416) Include metadata for system keyspace itself in schema_* tables

2012-10-03 Thread Sylvain Lebresne (JIRA)

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

Sylvain Lebresne resolved CASSANDRA-4416.
-

Resolution: Fixed

Alright, fix committed.

 Include metadata for system keyspace itself in schema_* tables
 --

 Key: CASSANDRA-4416
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4416
 Project: Cassandra
  Issue Type: Improvement
  Components: Core
Affects Versions: 1.2.0 beta 1
Reporter: paul cannon
Assignee: Jonathan Ellis
Priority: Minor
  Labels: cql, cql3
 Fix For: 1.2.0 beta 2

 Attachments: 4416_fix.txt, 4416.txt


 The `system.schema_keyspaces`, `system.schema_columnfamilies`, and 
 `system.schema_columns` virtual tables allow clients to query schema and 
 layout information through CQL. This will be invaluable when users start to 
 make more use of the CQL-only protocol (CASSANDRA-2478), since there will be 
 no other way to determine certain information about available columnfamilies, 
 keyspaces, or show metadata about them.
 However, the system keyspace itself, and all the columnfamilies in it, are 
 not represented in the schema_* tables:
 {noformat}
 cqlsh select * from system.schema_keyspaces where keyspace = 'system';
 cqlsh 
 cqlsh select * from system.schema_columnfamilies where keyspace = 'system';
 cqlsh 
 cqlsh select * from system.schema_columns where keyspace = 'system';
 cqlsh 
 {noformat}
 It would be greatly helpful to clients which do more introspection than the 
 minimum (say, for example, cqlsh) to be able to get information on the 
 structure and availability of schema-definition tables.

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


[jira] [Updated] (CASSANDRA-4752) Drop keyspace causes schema disagreement

2012-10-03 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis updated CASSANDRA-4752:
--

Reviewer: jbellis

 Drop keyspace causes schema disagreement 
 -

 Key: CASSANDRA-4752
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4752
 Project: Cassandra
  Issue Type: Bug
Affects Versions: 1.1.6
Reporter: Sam Tunnicliffe
Assignee: Sam Tunnicliffe
 Attachments: 0001-CASSANDRA-4752.txt, 4752-v2.txt


 The fix for CASSANDRA-4698 introduced a bug whereby when drop keyspace is 
 issued a schema disagreement immediately occurs. This seems to be because the 
 {code}ColumnFamily cf = 
 ColumnFamily.create(modification.getValue().metadata());{code}
 in {{RowMutation.deserializeFixingTimestamps}} does not preserve deletion 
 info for the cf in the modification. In most cases, this doesn't cause a 
 problem, but for a drop keyspace modification, there are no columns in the 
 cf, so the deletion info is effectively lost leading to an incorrect digest 
 being created and ultimately a schema disagreement.
 Replacing the {{create}} with {{cloneMeShallow}} does preserve the deletion 
 info and avoids the schema disagreement issue.

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


[jira] [Updated] (CASSANDRA-4752) Drop keyspace causes schema disagreement

2012-10-03 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis updated CASSANDRA-4752:
--

Attachment: 4752-v2.txt

Thanks, Sam!  I think you nailed it with your diagnosis of the problem.  But 
the fix will not actually correct the timestamp (neither did the original 
code).  Attaching v2 that makes the code do what I think was originally 
intended -- copy the old timestamp into the clone, or cap it at current time if 
necessary.

 Drop keyspace causes schema disagreement 
 -

 Key: CASSANDRA-4752
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4752
 Project: Cassandra
  Issue Type: Bug
Affects Versions: 1.1.6
Reporter: Sam Tunnicliffe
Assignee: Sam Tunnicliffe
 Attachments: 0001-CASSANDRA-4752.txt, 4752-v2.txt


 The fix for CASSANDRA-4698 introduced a bug whereby when drop keyspace is 
 issued a schema disagreement immediately occurs. This seems to be because the 
 {code}ColumnFamily cf = 
 ColumnFamily.create(modification.getValue().metadata());{code}
 in {{RowMutation.deserializeFixingTimestamps}} does not preserve deletion 
 info for the cf in the modification. In most cases, this doesn't cause a 
 problem, but for a drop keyspace modification, there are no columns in the 
 cf, so the deletion info is effectively lost leading to an incorrect digest 
 being created and ultimately a schema disagreement.
 Replacing the {{create}} with {{cloneMeShallow}} does preserve the deletion 
 info and avoids the schema disagreement issue.

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


[jira] [Created] (CASSANDRA-4753) Timeout reporter writes hints for the local node

2012-10-03 Thread Aleksey Yeschenko (JIRA)
Aleksey Yeschenko created CASSANDRA-4753:


 Summary: Timeout reporter writes hints for the local node
 Key: CASSANDRA-4753
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4753
 Project: Cassandra
  Issue Type: Bug
Affects Versions: 1.2.0 beta 1
Reporter: Aleksey Yeschenko
Assignee: Jonathan Ellis
 Fix For: 1.2.0 beta 2


MessagingService.java:330 calls StorageProxy.scheduleLocalHint() without 
checking if the local node is the target. This causes 
StorageProxy.scheduleLocalHint to throw AssertionError sometimes.

Got this error when some batches are timed out. This can happen because even 
local batches now go through StorageProxy.sendMessages and aren't just 
rm.apply()'d.

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


[jira] [Commented] (CASSANDRA-4753) Timeout reporter writes hints for the local node

2012-10-03 Thread Aleksey Yeschenko (JIRA)

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

Aleksey Yeschenko commented on CASSANDRA-4753:
--

See 
https://issues.apache.org/jira/browse/CASSANDRA-4542?focusedCommentId=13451479page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-13451479
and 
https://issues.apache.org/jira/browse/CASSANDRA-4542?focusedCommentId=13451486page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-13451486



 Timeout reporter writes hints for the local node
 

 Key: CASSANDRA-4753
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4753
 Project: Cassandra
  Issue Type: Bug
Affects Versions: 1.2.0 beta 1
Reporter: Aleksey Yeschenko
Assignee: Jonathan Ellis
 Fix For: 1.2.0 beta 2


 MessagingService.java:330 calls StorageProxy.scheduleLocalHint() without 
 checking if the local node is the target. This causes 
 StorageProxy.scheduleLocalHint to throw AssertionError sometimes.
 Got this error when some batches are timed out. This can happen because even 
 local batches now go through StorageProxy.sendMessages and aren't just 
 rm.apply()'d.

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


[jira] [Commented] (CASSANDRA-4753) Timeout reporter writes hints for the local node

2012-10-03 Thread Aleksey Yeschenko (JIRA)

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

Aleksey Yeschenko commented on CASSANDRA-4753:
--

Special-casing for local inserts might be worth it now that abm is the default 
and we went even futher with CASSANDRA-4738.

 Timeout reporter writes hints for the local node
 

 Key: CASSANDRA-4753
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4753
 Project: Cassandra
  Issue Type: Bug
Affects Versions: 1.2.0 beta 1
Reporter: Aleksey Yeschenko
Assignee: Jonathan Ellis
 Fix For: 1.2.0 beta 2


 MessagingService.java:330 calls StorageProxy.scheduleLocalHint() without 
 checking if the local node is the target. This causes 
 StorageProxy.scheduleLocalHint to throw AssertionError sometimes.
 Got this error when some batches are timed out. This can happen because even 
 local batches now go through StorageProxy.sendMessages and aren't just 
 rm.apply()'d.

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


[jira] [Commented] (CASSANDRA-4753) Timeout reporter writes hints for the local node

2012-10-03 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis commented on CASSANDRA-4753:
---

Sounds like the right solution is to add a local-only apply the way we do for 
normal Mutations.

 Timeout reporter writes hints for the local node
 

 Key: CASSANDRA-4753
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4753
 Project: Cassandra
  Issue Type: Bug
Affects Versions: 1.2.0 beta 1
Reporter: Aleksey Yeschenko
Assignee: Jonathan Ellis
 Fix For: 1.2.0 beta 2


 MessagingService.java:330 calls StorageProxy.scheduleLocalHint() without 
 checking if the local node is the target. This causes 
 StorageProxy.scheduleLocalHint to throw AssertionError sometimes.
 Got this error when some batches are timed out. This can happen because even 
 local batches now go through StorageProxy.sendMessages and aren't just 
 rm.apply()'d.

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


[jira] [Created] (CASSANDRA-4754) There is an inconsistency between default configuration in cassandra.yaml and java code

2012-10-03 Thread Alexey Zotov (JIRA)
Alexey Zotov created CASSANDRA-4754:
---

 Summary: There is an inconsistency between default configuration 
in cassandra.yaml and java code
 Key: CASSANDRA-4754
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4754
 Project: Cassandra
  Issue Type: Bug
Affects Versions: 1.1.4
Reporter: Alexey Zotov
Assignee: Alexey Zotov
Priority: Trivial


Options max_hint_window_in_ms and in_memory_compaction_limit_in_mb have 
different values in cassandra.yaml and in java code. I suggest to lead java 
code values to cassandra.yaml values.

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


[jira] [Updated] (CASSANDRA-4754) There is an inconsistency between default configuration in cassandra.yaml and java code

2012-10-03 Thread Alexey Zotov (JIRA)

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

Alexey Zotov updated CASSANDRA-4754:


Attachment: cassandra-1.1-4754_default_configs.txt

 There is an inconsistency between default configuration in cassandra.yaml and 
 java code
 ---

 Key: CASSANDRA-4754
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4754
 Project: Cassandra
  Issue Type: Bug
Affects Versions: 1.1.4
Reporter: Alexey Zotov
Assignee: Alexey Zotov
Priority: Trivial
  Labels: configurations, docs
 Attachments: cassandra-1.1-4754_default_configs.txt


 Options max_hint_window_in_ms and in_memory_compaction_limit_in_mb have 
 different values in cassandra.yaml and in java code. I suggest to lead java 
 code values to cassandra.yaml values.

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


[jira] [Commented] (CASSANDRA-4751) User rpc_address for binary protocol and change default port

2012-10-03 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis commented on CASSANDRA-4751:
---

I don't follow 
{{InetAddress.getByName(StorageService.instance.getRpcaddress(endpoint));}} -- 
why convert it to a String, to convert back w/ getByName?

 User rpc_address for binary protocol and change default port
 

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

 Attachments: 4751.txt


 The events mechanism of the binary protocol require that we know the address 
 on which other nodes can be joined (for the binary protocol). Hence 
 CASSANDRA-4501. However, in 1.2 we've already burned all the padding in 1.1 
 gossip, so we can't gossip a new info (the binary protocol address), so 
 CASSANDRA-4501 will have to move to 1.3.
 But we do already gossip the rpc_address value, so an option is to make the 
 binary protocol bind on the rpc_address (but a specific port) rather than 
 having it's own setting. This ticket suggests to do that. Imo, there is 
 little downside to do it: the thrift and binary transport are not meant to be 
 used together except during the transition from one to the other, and even 
 then having to use the same network interface is hardly a limitation (in 
 other words, even for 1.3, we might want to hold on CASSANDRA-4501 until 
 someone comes with a compelling use case for it).

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


[jira] [Commented] (CASSANDRA-4636) Create atomic batch dtests

2012-10-03 Thread Aleksey Yeschenko (JIRA)

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

Aleksey Yeschenko commented on CASSANDRA-4636:
--

Now that ABM is the default BATCH behaviour, all dtests that use BATCH queries 
are 'atomic batch dtests'.

Here are things I can (and should) test:
- BATCH and UNLOGGED BATCH rejecting counter mutations
- COUNTER BATCH rejecting regular mutations
- UnavailableException if there aren't enough reachable nodes to store the 
serialized batch
- absence of UnavailableException in a single-node cluster
- proper acknowledge_by value in different scenarios 
(https://issues.apache.org/jira/browse/CASSANDRA-4544)

What I should but can't test deterministically (and tests MUST be 
deterministic):
- batch replay in case of coordinator death (there is no way to kill the node 
exactly after the batch has been written, but before any mutations have been 
applied). Which is a bummer, but I don't see any ways around it. 

 Create atomic batch dtests
 --

 Key: CASSANDRA-4636
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4636
 Project: Cassandra
  Issue Type: Sub-task
  Components: Core
Affects Versions: 1.2.0 beta 1
Reporter: Jonathan Ellis
Assignee: Aleksey Yeschenko
 Fix For: 1.2.0


 Need to add distributed tests: https://github.com/riptano/cassandra-dtest

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


[jira] [Commented] (CASSANDRA-4751) User rpc_address for binary protocol and change default port

2012-10-03 Thread Sylvain Lebresne (JIRA)

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

Sylvain Lebresne commented on CASSANDRA-4751:
-

{{endpoint}} is the listen_address of the node, but for event, we want to 
provide the address on which the node can be joined by a client, hence 
StorageService.instance.getRpcaddress.

 User rpc_address for binary protocol and change default port
 

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

 Attachments: 4751.txt


 The events mechanism of the binary protocol require that we know the address 
 on which other nodes can be joined (for the binary protocol). Hence 
 CASSANDRA-4501. However, in 1.2 we've already burned all the padding in 1.1 
 gossip, so we can't gossip a new info (the binary protocol address), so 
 CASSANDRA-4501 will have to move to 1.3.
 But we do already gossip the rpc_address value, so an option is to make the 
 binary protocol bind on the rpc_address (but a specific port) rather than 
 having it's own setting. This ticket suggests to do that. Imo, there is 
 little downside to do it: the thrift and binary transport are not meant to be 
 used together except during the transition from one to the other, and even 
 then having to use the same network interface is hardly a limitation (in 
 other words, even for 1.3, we might want to hold on CASSANDRA-4501 until 
 someone comes with a compelling use case for it).

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


[3/3] git commit: Fix inconsistencies between yaml and code defaults. Patch by Alexey Zotov, reviewed by brandonwilliams for CASSANDRA-4754

2012-10-03 Thread brandonwilliams
Fix inconsistencies between yaml and code defaults.
Patch by Alexey Zotov, reviewed by brandonwilliams for CASSANDRA-4754


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

Branch: refs/heads/cassandra-1.1
Commit: d170a7a99dfc04499e8bb8cbca0fc4e14aa1fc26
Parents: 0e0213b
Author: Brandon Williams brandonwilli...@apache.org
Authored: Wed Oct 3 13:44:45 2012 -0500
Committer: Brandon Williams brandonwilli...@apache.org
Committed: Wed Oct 3 13:44:45 2012 -0500

--
 src/java/org/apache/cassandra/config/Config.java |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/d170a7a9/src/java/org/apache/cassandra/config/Config.java
--
diff --git a/src/java/org/apache/cassandra/config/Config.java 
b/src/java/org/apache/cassandra/config/Config.java
index f749db6..dc16622 100644
--- a/src/java/org/apache/cassandra/config/Config.java
+++ b/src/java/org/apache/cassandra/config/Config.java
@@ -34,7 +34,7 @@ public class Config
 
 public Boolean auto_bootstrap = true;
 public Boolean hinted_handoff_enabled = true;
-public Integer max_hint_window_in_ms = Integer.MAX_VALUE;
+public Integer max_hint_window_in_ms = 3600 * 1000; // one hour
 
 public SeedProviderDef seed_provider;
 public DiskAccessMode disk_access_mode = DiskAccessMode.auto;
@@ -82,7 +82,7 @@ public class Config
 
 /* if the size of columns or super-columns are more than this, indexing 
will kick in */
 public Integer column_index_size_in_kb = 64;
-public Integer in_memory_compaction_limit_in_mb = 256;
+public Integer in_memory_compaction_limit_in_mb = 64;
 public Integer concurrent_compactors = 
Runtime.getRuntime().availableProcessors();
 public Integer compaction_throughput_mb_per_sec = 16;
 public Boolean multithreaded_compaction = false;



[2/3] git commit: Fix inconsistencies between yaml and code defaults. Patch by Alexey Zotov, reviewed by brandonwilliams for CASSANDRA-4754

2012-10-03 Thread brandonwilliams
Fix inconsistencies between yaml and code defaults.
Patch by Alexey Zotov, reviewed by brandonwilliams for CASSANDRA-4754


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

Branch: refs/heads/trunk
Commit: d170a7a99dfc04499e8bb8cbca0fc4e14aa1fc26
Parents: 0e0213b
Author: Brandon Williams brandonwilli...@apache.org
Authored: Wed Oct 3 13:44:45 2012 -0500
Committer: Brandon Williams brandonwilli...@apache.org
Committed: Wed Oct 3 13:44:45 2012 -0500

--
 src/java/org/apache/cassandra/config/Config.java |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/d170a7a9/src/java/org/apache/cassandra/config/Config.java
--
diff --git a/src/java/org/apache/cassandra/config/Config.java 
b/src/java/org/apache/cassandra/config/Config.java
index f749db6..dc16622 100644
--- a/src/java/org/apache/cassandra/config/Config.java
+++ b/src/java/org/apache/cassandra/config/Config.java
@@ -34,7 +34,7 @@ public class Config
 
 public Boolean auto_bootstrap = true;
 public Boolean hinted_handoff_enabled = true;
-public Integer max_hint_window_in_ms = Integer.MAX_VALUE;
+public Integer max_hint_window_in_ms = 3600 * 1000; // one hour
 
 public SeedProviderDef seed_provider;
 public DiskAccessMode disk_access_mode = DiskAccessMode.auto;
@@ -82,7 +82,7 @@ public class Config
 
 /* if the size of columns or super-columns are more than this, indexing 
will kick in */
 public Integer column_index_size_in_kb = 64;
-public Integer in_memory_compaction_limit_in_mb = 256;
+public Integer in_memory_compaction_limit_in_mb = 64;
 public Integer concurrent_compactors = 
Runtime.getRuntime().availableProcessors();
 public Integer compaction_throughput_mb_per_sec = 16;
 public Boolean multithreaded_compaction = false;



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

2012-10-03 Thread brandonwilliams
Updated Branches:
  refs/heads/cassandra-1.1 0e0213b60 - d170a7a99
  refs/heads/trunk 7833db260 - dbcf00df8


Merge branch 'cassandra-1.1' into trunk

Conflicts:
src/java/org/apache/cassandra/config/Config.java


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

Branch: refs/heads/trunk
Commit: dbcf00df829aefb59cfddd97602e87e58b763cb9
Parents: 7833db2 d170a7a
Author: Brandon Williams brandonwilli...@apache.org
Authored: Wed Oct 3 13:46:50 2012 -0500
Committer: Brandon Williams brandonwilli...@apache.org
Committed: Wed Oct 3 13:46:50 2012 -0500

--
 src/java/org/apache/cassandra/config/Config.java |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/dbcf00df/src/java/org/apache/cassandra/config/Config.java
--
diff --cc src/java/org/apache/cassandra/config/Config.java
index 83c18a4,dc16622..4f551ad
--- a/src/java/org/apache/cassandra/config/Config.java
+++ b/src/java/org/apache/cassandra/config/Config.java
@@@ -34,8 -33,8 +34,8 @@@ public class Confi
  public String partitioner;
  
  public Boolean auto_bootstrap = true;
 -public Boolean hinted_handoff_enabled = true;
 -public Integer max_hint_window_in_ms = 3600 * 1000; // one hour
 +public volatile Boolean hinted_handoff_enabled = true;
- public volatile Integer max_hint_window_in_ms = Integer.MAX_VALUE;
++public volatile Integer max_hint_window_in_ms = 3600 * 1000; // one hour
  
  public SeedProviderDef seed_provider;
  public DiskAccessMode disk_access_mode = DiskAccessMode.auto;
@@@ -94,9 -82,9 +94,9 @@@
  
  /* if the size of columns or super-columns are more than this, indexing 
will kick in */
  public Integer column_index_size_in_kb = 64;
- public Integer in_memory_compaction_limit_in_mb = 256;
+ public Integer in_memory_compaction_limit_in_mb = 64;
  public Integer concurrent_compactors = 
Runtime.getRuntime().availableProcessors();
 -public Integer compaction_throughput_mb_per_sec = 16;
 +public volatile Integer compaction_throughput_mb_per_sec = 16;
  public Boolean multithreaded_compaction = false;
  
  public Integer max_streaming_retries = 3;



[jira] [Commented] (CASSANDRA-4739) Prepared Statements don't support collections

2012-10-03 Thread Jonathan Rudenberg (JIRA)

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

Jonathan Rudenberg commented on CASSANDRA-4739:
---

I've been testing this patch out a bit, and it's mostly working, but I ran into 
an issue when using a maptimestamp,int ({1349286846012: 2}):

Expected 8 or 0 byte long for date (4)

The map is encoded in the exact same format that I get from the server when 
querying the same value:

{noformat}
00 01 00 08 00 00 01 3a 27 c3 5e 3c 00 04 00 00 00 02
{noformat}

 Prepared Statements don't support collections
 -

 Key: CASSANDRA-4739
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4739
 Project: Cassandra
  Issue Type: Bug
Affects Versions: 1.2.0 beta 1
 Environment: Cassandra 937f15e1
 OS X 10.8.2
 java version 1.6.0_35
 Java(TM) SE Runtime Environment (build 1.6.0_35-b10-428-11M3811)
 Java HotSpot(TM) 64-Bit Server VM (build 20.10-b01-428, mixed mode)
Reporter: Jonathan Rudenberg
Assignee: Sylvain Lebresne
 Fix For: 1.2.0 beta 2

 Attachments: 4739.txt


 I'm putting a collection onto the wire in an EXECUTE request with exactly the 
 same bytes that Cassandra encodes the same data in a response:
 Can't apply operation on column with 
 org.apache.cassandra.db.marshal.SetType(org.apache.cassandra.db.marshal.UTF8Type)
  type
 Here's the full trace log from cassandra:
 {noformat}
 DEBUG 19:24:15,414 Received: PREPARE INSERT INTO things (id, set_text) VALUES 
 (?, ?);
 TRACE 19:24:15,414 CQL QUERY: INSERT INTO things (id, set_text) VALUES (?, ?);
 TRACE 19:24:15,415 Stored prepared statement #413587006 with 2 bind markers
 DEBUG 19:24:15,415 Responding: RESULT PREPARED 413587006 
 [id(gocql_collections, things), 
 org.apache.cassandra.db.marshal.TimeUUIDType][set_text(gocql_collections, 
 things), 
 org.apache.cassandra.db.marshal.SetType(org.apache.cassandra.db.marshal.UTF8Type)]
 DEBUG 19:24:15,416 Received: EXECUTE 413587006 with 2 values
 TRACE 19:24:15,416 [1] 'java.nio.HeapByteBuffer[pos=18 lim=34 cap=53]'
 TRACE 19:24:15,416 [2] 'java.nio.HeapByteBuffer[pos=38 lim=51 cap=53]'
 DEBUG 19:24:15,417 Responding: ERROR INVALID: Can't apply operation on column 
 with 
 org.apache.cassandra.db.marshal.SetType(org.apache.cassandra.db.marshal.UTF8Type)
  type.
 {noformat}
 The prepared statement is:
 {noformat}
 INSERT INTO things (id, set_text) VALUES (?, ?);
 {noformat}
 and the collection value ({'asdf', 'sdf'}) is encoded as:
 {noformat}
 00 02 00 04 61 73 64 66 00 03 73 64 66
 {noformat}
 which is byte-for-byte exactly the same as what I get from Cassandra off the 
 wire when I do a query for the same data.
 I already have the driver working with other queries/inserts with all other 
 types, so this is just a collection encoding problem.

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


[jira] [Commented] (CASSANDRA-4740) Phantom TCP connections, failing hinted handoff

2012-10-03 Thread John Watson (JIRA)

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

John Watson commented on CASSANDRA-4740:


Not exactly the same way, but very similar. I noticed any nodes having HH 
timeouts only had 3 connections open on port 7000 whereas stable nodes had 4. 
Didn't notice any phantom connections, but I didn't really look very hard

 Phantom TCP connections, failing hinted handoff
 ---

 Key: CASSANDRA-4740
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4740
 Project: Cassandra
  Issue Type: Bug
Affects Versions: 1.1.2
 Environment: Linux 3.4.9, java 1.6.0_35-b10
Reporter: Mina Naguib
Priority: Minor
  Labels: connection, handoff, hinted, orphan, phantom, tcp, zombie
 Attachments: write_latency.png


 IP addresses in report anonymized:
 Had a server running cassandra (1.1.1.10) reboot ungracefully.  Reboot and 
 startup was successful and uneventful.  cassandra went back into service ok.
 From that point onwards however, several (but not all) machines in the 
 cassandra cluster started having difficulty with hinted handoff to that 
 machine.  This was despite nodetool ring showing Up across the board.
 Here's an example of an attempt, every 10 minutes, by a node (1.1.1.11) to 
 replay hints to the node that was rebooted:
 {code}
 INFO [HintedHandoff:1] 2012-10-01 11:07:23,293 HintedHandOffManager.java 
 (line 294) Started hinted handoff for token: 
 122879743610338889583996386017027409691 with IP: /1.1.1.10
 INFO [HintedHandoff:1] 2012-10-01 11:07:33,295 HintedHandOffManager.java 
 (line 372) Timed out replaying hints to /1.1.1.10; aborting further deliveries
 INFO [HintedHandoff:1] 2012-10-01 11:07:33,295 HintedHandOffManager.java 
 (line 390) Finished hinted handoff of 0 rows to endpoint /1.1.1.10
 INFO [HintedHandoff:1] 2012-10-01 11:17:23,312 HintedHandOffManager.java 
 (line 294) Started hinted handoff for token: 
 122879743610338889583996386017027409691 with IP: /1.1.1.10
 INFO [HintedHandoff:1] 2012-10-01 11:17:33,319 HintedHandOffManager.java 
 (line 372) Timed out replaying hints to /1.1.1.10; aborting further deliveries
 INFO [HintedHandoff:1] 2012-10-01 11:17:33,319 HintedHandOffManager.java 
 (line 390) Finished hinted handoff of 0 rows to endpoint /1.1.1.10
 INFO [HintedHandoff:1] 2012-10-01 11:27:23,335 HintedHandOffManager.java 
 (line 294) Started hinted handoff for token: 
 122879743610338889583996386017027409691 with IP: /1.1.1.10
 INFO [HintedHandoff:1] 2012-10-01 11:27:33,337 HintedHandOffManager.java 
 (line 372) Timed out replaying hints to /1.1.1.10; aborting further deliveries
 INFO [HintedHandoff:1] 2012-10-01 11:27:33,337 HintedHandOffManager.java 
 (line 390) Finished hinted handoff of 0 rows to endpoint /1.1.1.10
 INFO [HintedHandoff:1] 2012-10-01 11:37:23,357 HintedHandOffManager.java 
 (line 294) Started hinted handoff for token: 
 122879743610338889583996386017027409691 with IP: /1.1.1.10
 INFO [HintedHandoff:1] 2012-10-01 11:37:33,358 HintedHandOffManager.java 
 (line 372) Timed out replaying hints to /1.1.1.10; aborting further deliveries
 INFO [HintedHandoff:1] 2012-10-01 11:37:33,359 HintedHandOffManager.java 
 (line 390) Finished hinted handoff of 0 rows to endpoint /1.1.1.10
 INFO [HintedHandoff:1] 2012-10-01 11:47:23,412 HintedHandOffManager.java 
 (line 294) Started hinted handoff for token: 
 122879743610338889583996386017027409691 with IP: /1.1.1.10
 INFO [HintedHandoff:1] 2012-10-01 11:47:33,414 HintedHandOffManager.java 
 (line 372) Timed out replaying hints to /1.1.1.10; aborting further deliveries
 INFO [HintedHandoff:1] 2012-10-01 11:47:33,414 HintedHandOffManager.java 
 (line 390) Finished hinted handoff of 0 rows to endpoint /1.1.1.10
 {code}
 I started poking around, and discovered that several nodes held ESTABLISHED 
 TCP connections that didn't have a live endpoint on the rebooted node.  My 
 guess is they were live prior to the reboot, and after the reboot the nodes 
 still see them as live and unsuccessfully try to use them.
 Example, on the node that was rebooted:
 {code}
 .10 ~ # netstat -tn | grep 1.1.1.11
 tcp0  0 1.1.1.10:70001.1.1.11:40960ESTABLISHED
 tcp0  0 1.1.1.10:34370   1.1.1.11:7000 ESTABLISHED
 tcp0  0 1.1.1.10:45518   1.1.1.11:7000 ESTABLISHED
 {code}
 While on the node that's failing to hint to it:
 {code}
 .11 ~ # netstat -tn | grep 1.1.1.10
 tcp0  0 1.1.1.11:7000 1.1.1.10:34370   ESTABLISHED
 tcp0  0 1.1.1.11:7000 1.1.1.10:45518   ESTABLISHED
 tcp0  0 1.1.1.11:7000 1.1.1.10:53316   ESTABLISHED
 tcp0  0 1.1.1.11:7000 1.1.1.10:43239   

[jira] [Updated] (CASSANDRA-4584) Add cqlsh syntax to enable request tracing

2012-10-03 Thread Aleksey Yeschenko (JIRA)

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

Aleksey Yeschenko updated CASSANDRA-4584:
-

Attachment: CASSANDRA-4584-INCOMPLETE.txt

 Add cqlsh syntax to enable request tracing
 --

 Key: CASSANDRA-4584
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4584
 Project: Cassandra
  Issue Type: Sub-task
Affects Versions: 1.2.0 beta 1
Reporter: Jonathan Ellis
Assignee: Aleksey Yeschenko
  Labels: cql3
 Fix For: 1.2.0 beta 2

 Attachments: 4584.patch, 4584.patch, 4584.patch, 4584.patch, 
 4584.patch, CASSANDRA-4584-INCOMPLETE.txt




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


[jira] [Commented] (CASSANDRA-4584) Add cqlsh syntax to enable request tracing

2012-10-03 Thread Aleksey Yeschenko (JIRA)

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

Aleksey Yeschenko commented on CASSANDRA-4584:
--

I've attached an incomplete version of the patch. Please don't commit it.
This version lacks pretty trace events output, otherwise that's it.

use 'tracing on' to enable tracing and 'tracing off' to disable it. see 'help 
tracing'.

I really don't like the info we are gathering now - what we have isn't really 
useful.

 Add cqlsh syntax to enable request tracing
 --

 Key: CASSANDRA-4584
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4584
 Project: Cassandra
  Issue Type: Sub-task
Affects Versions: 1.2.0 beta 1
Reporter: Jonathan Ellis
Assignee: Aleksey Yeschenko
  Labels: cql3
 Fix For: 1.2.0 beta 2

 Attachments: 4584.patch, 4584.patch, 4584.patch, 4584.patch, 
 4584.patch, CASSANDRA-4584-INCOMPLETE.txt




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


[jira] [Commented] (CASSANDRA-4584) Add cqlsh syntax to enable request tracing

2012-10-03 Thread Aleksey Yeschenko (JIRA)

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

Aleksey Yeschenko commented on CASSANDRA-4584:
--

Try tracing CREATE KEYSPACE or CREATE TABLE - there is too much information, 
all in inconsistent formats. No idea how to display that properly.
Or trace INSERT or SELECT - there isn't as much output, but it's pretty useless 
and inconsistent.
Also, unrelated to that: requesting tracing info immediately after the query 
doesn't show all the events. Tracing is async. Making is synchronous is 
probably a bad idea, so some artificial delay needs to be introduced.

 Add cqlsh syntax to enable request tracing
 --

 Key: CASSANDRA-4584
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4584
 Project: Cassandra
  Issue Type: Sub-task
Affects Versions: 1.2.0 beta 1
Reporter: Jonathan Ellis
Assignee: Aleksey Yeschenko
  Labels: cql3
 Fix For: 1.2.0 beta 2

 Attachments: 4584.patch, 4584.patch, 4584.patch, 4584.patch, 
 4584.patch, CASSANDRA-4584-INCOMPLETE.txt




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


[jira] [Created] (CASSANDRA-4755) Bulk loader won't work with CQL3

2012-10-03 Thread Nick Bailey (JIRA)
Nick Bailey created CASSANDRA-4755:
--

 Summary: Bulk loader won't work with CQL3
 Key: CASSANDRA-4755
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4755
 Project: Cassandra
  Issue Type: Bug
  Components: Tools
Affects Versions: 1.2.0 beta 1
Reporter: Nick Bailey
 Fix For: 1.2.0


Currently the bulk loader uses thrift to get the schema and validate it before 
bulk loading a cf. Since we stopped returning cql3 cfs through 
describe_keyspaces, the bulk loader will be unable to load those cfs.

If we figure out/add a way to validate the schema over jmx, we could use that 
for getting token ranges as well and drop thrift completely from the bulk 
loader.

Another option might be querying system tables manually to validate things.

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


[jira] [Updated] (CASSANDRA-4584) Add cqlsh syntax to enable request tracing

2012-10-03 Thread Aleksey Yeschenko (JIRA)

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

Aleksey Yeschenko updated CASSANDRA-4584:
-

Attachment: (was: CASSANDRA-4584-INCOMPLETE.txt)

 Add cqlsh syntax to enable request tracing
 --

 Key: CASSANDRA-4584
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4584
 Project: Cassandra
  Issue Type: Sub-task
Affects Versions: 1.2.0 beta 1
Reporter: Jonathan Ellis
Assignee: Aleksey Yeschenko
  Labels: cql3
 Fix For: 1.2.0 beta 2

 Attachments: 4584.patch, 4584.patch, 4584.patch, 4584.patch, 
 4584.patch, CASSANDRA-4584-INCOMPLETE.txt




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


[jira] [Updated] (CASSANDRA-4584) Add cqlsh syntax to enable request tracing

2012-10-03 Thread Aleksey Yeschenko (JIRA)

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

Aleksey Yeschenko updated CASSANDRA-4584:
-

Attachment: CASSANDRA-4584-INCOMPLETE.txt

 Add cqlsh syntax to enable request tracing
 --

 Key: CASSANDRA-4584
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4584
 Project: Cassandra
  Issue Type: Sub-task
Affects Versions: 1.2.0 beta 1
Reporter: Jonathan Ellis
Assignee: Aleksey Yeschenko
  Labels: cql3
 Fix For: 1.2.0 beta 2

 Attachments: 4584.patch, 4584.patch, 4584.patch, 4584.patch, 
 4584.patch, CASSANDRA-4584-INCOMPLETE.txt




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


[jira] [Created] (CASSANDRA-4756) Bulk loading snapshots creates RF^2 copies of the data

2012-10-03 Thread Nick Bailey (JIRA)
Nick Bailey created CASSANDRA-4756:
--

 Summary: Bulk loading snapshots creates RF^2 copies of the data
 Key: CASSANDRA-4756
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4756
 Project: Cassandra
  Issue Type: Improvement
Affects Versions: 1.2.0 beta 1
Reporter: Nick Bailey


Since a cluster snapshot will contain rf copies of each piece of data, 
bulkloading all of those snapshots will create rf^2 copies of each piece of 
data.

Not sure what the solution here is. Ideally we would merge the RF copies of the 
data before sending to the cluster. This would solve any inconsistencies that 
existed when the snapshot was taken.

A more naive approach of only loading one of the RF copies and assuming there 
are no inconsistencies might be an easier goal for the near term though.

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


[jira] [Created] (CASSANDRA-4757) Expose bulk loading progress/status over jmx

2012-10-03 Thread Nick Bailey (JIRA)
Nick Bailey created CASSANDRA-4757:
--

 Summary: Expose bulk loading progress/status over jmx
 Key: CASSANDRA-4757
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4757
 Project: Cassandra
  Issue Type: Improvement
Reporter: Nick Bailey


The bulk loading interface should be exposing some progress or status 
information over jmx. This shouldn't be too difficult and should be exposed in 
a way that the information is available whether you are using the separate 
sstableloader utility or calling the bulkload jmx call.

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


[jira] [Commented] (CASSANDRA-4667) optimize memtable deletions for batchlog

2012-10-03 Thread Aleksey Yeschenko (JIRA)

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

Aleksey Yeschenko commented on CASSANDRA-4667:
--

Don't see it trunk. Have you forgotten to push?

 optimize memtable deletions for batchlog
 

 Key: CASSANDRA-4667
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4667
 Project: Cassandra
  Issue Type: Sub-task
Reporter: Aleksey Yeschenko
Assignee: Aleksey Yeschenko
 Fix For: 1.2.0 beta 2

 Attachments: CASSANDRA-4667-v1.1.patch, CASSANDRA-4667-v2.patch, 
 CASSANDRA-4667-v3.txt, CASSANDRA-4667-v4.txt


 Batchlog writes with the same key are never retried. This means that if a 
 batchlog row is in the memtable, it can't be in any of the sstables, ever. In 
 such cases we don't need to write a tombstone to disk. We can purge the row 
 completely from the memtable and only write a tombstone if the row had been 
 flushed already (if it's not in the memtable then it must be in one of the 
 sstables).

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


[jira] [Created] (CASSANDRA-4758) Allow throttling bulk load separately from streaming

2012-10-03 Thread Nick Bailey (JIRA)
Nick Bailey created CASSANDRA-4758:
--

 Summary: Allow throttling bulk load separately from streaming
 Key: CASSANDRA-4758
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4758
 Project: Cassandra
  Issue Type: Improvement
Reporter: Nick Bailey


Currently when you call the bulkload jmx call, the only way to achieve 
throttling is by tuning the streaming throttle in general, which affects all 
streaming operations.

It would be nice to be able to throttle bulk loading separately.

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


[jira] [Commented] (CASSANDRA-4584) Add cqlsh syntax to enable request tracing

2012-10-03 Thread Aleksey Yeschenko (JIRA)

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

Aleksey Yeschenko commented on CASSANDRA-4584:
--

Also there is no way to calculate how much time each step has taken, which 
makes this tracing almost useless.
This definitely won't do.

 Add cqlsh syntax to enable request tracing
 --

 Key: CASSANDRA-4584
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4584
 Project: Cassandra
  Issue Type: Sub-task
Affects Versions: 1.2.0 beta 1
Reporter: Jonathan Ellis
Assignee: Aleksey Yeschenko
  Labels: cql3
 Fix For: 1.2.0 beta 2

 Attachments: 4584.patch, 4584.patch, 4584.patch, 4584.patch, 
 4584.patch, CASSANDRA-4584-INCOMPLETE.txt




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


[jira] [Commented] (CASSANDRA-4584) Add cqlsh syntax to enable request tracing

2012-10-03 Thread Aleksey Yeschenko (JIRA)

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

Aleksey Yeschenko commented on CASSANDRA-4584:
--

I'm putting this on hold for now. I won't bother with formatting tracing events 
output until there is reasonable data to work with.
Feel free to apply/commit the patch though, since this might help the person 
who will be working on fixing the tracing.

 Add cqlsh syntax to enable request tracing
 --

 Key: CASSANDRA-4584
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4584
 Project: Cassandra
  Issue Type: Sub-task
Affects Versions: 1.2.0 beta 1
Reporter: Jonathan Ellis
Assignee: Aleksey Yeschenko
  Labels: cql3
 Fix For: 1.2.0 beta 2

 Attachments: 4584.patch, 4584.patch, 4584.patch, 4584.patch, 
 4584.patch, CASSANDRA-4584-INCOMPLETE.txt




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


[jira] [Comment Edited] (CASSANDRA-4584) Add cqlsh syntax to enable request tracing

2012-10-03 Thread Aleksey Yeschenko (JIRA)

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

Aleksey Yeschenko edited comment on CASSANDRA-4584 at 10/4/12 8:04 AM:
---

I'm putting this on hold for now. I won't bother with formatting tracing events 
output until there is reasonable data to work with.
Feel free to apply/commit the patch though, since this might help the person 
who will be working on fixing the tracing.

Edit: this patch depends on 
https://code.google.com/a/apache-extras.org/p/cassandra-dbapi2/issues/detail?id=26
 to work. It's not yet in any published cassandra-dbapi2 release. This needs to 
happen first - DON'T commit the patch until then.

  was (Author: iamaleksey):
I'm putting this on hold for now. I won't bother with formatting tracing 
events output until there is reasonable data to work with.
Feel free to apply/commit the patch though, since this might help the person 
who will be working on fixing the tracing.
  
 Add cqlsh syntax to enable request tracing
 --

 Key: CASSANDRA-4584
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4584
 Project: Cassandra
  Issue Type: Sub-task
Affects Versions: 1.2.0 beta 1
Reporter: Jonathan Ellis
Assignee: Aleksey Yeschenko
  Labels: cql3
 Fix For: 1.2.0 beta 2

 Attachments: 4584.patch, 4584.patch, 4584.patch, 4584.patch, 
 4584.patch, CASSANDRA-4584-INCOMPLETE.txt




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


[jira] [Updated] (CASSANDRA-4584) Add cqlsh syntax to enable request tracing

2012-10-03 Thread Aleksey Yeschenko (JIRA)

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

Aleksey Yeschenko updated CASSANDRA-4584:
-

Attachment: cql-internal-only-1.2.4584.zip

Don't commit this.

 Add cqlsh syntax to enable request tracing
 --

 Key: CASSANDRA-4584
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4584
 Project: Cassandra
  Issue Type: Sub-task
Affects Versions: 1.2.0 beta 1
Reporter: Jonathan Ellis
Assignee: Aleksey Yeschenko
  Labels: cql3
 Fix For: 1.2.0 beta 2

 Attachments: 4584.patch, 4584.patch, 4584.patch, 4584.patch, 
 4584.patch, CASSANDRA-4584-INCOMPLETE.txt, cql-internal-only-1.2.4584.zip




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


[jira] [Created] (CASSANDRA-4759) CQL3 Predicate logic bug when using composite columns

2012-10-03 Thread T Jake Luciani (JIRA)
T Jake Luciani created CASSANDRA-4759:
-

 Summary: CQL3 Predicate logic bug when using composite columns
 Key: CASSANDRA-4759
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4759
 Project: Cassandra
  Issue Type: Bug
Reporter: T Jake Luciani


Looks like a predicate logic bug that only happens when you have  2 primary 
keys and use COMPACT STORAGE (meaning its using composite columns under the 
hood)

First I'll show it works with just 2 
{code}
cqlsh:dev CREATE TABLE testrev (
   ...  key text,
   ...  rdate timestamp,
   ...  num double,
   ...  PRIMARY KEY(key,rdate)
   ...  ) WITH COMPACT STORAGE
   ...AND CLUSTERING ORDER BY(rdate DESC);

cqlsh:dev INSERT INTO testrev(key,rdate,num) VALUES ('foo','2012-01-01',10.5);
cqlsh:dev select * from testrev where key='foo' and rdate  '2012-01-01';
cqlsh:dev select * from testrev where key='foo' and rdate = '2012-01-01';
 key | rdate| num
-+--+--
 foo | 2012-01-01 00:00:00-0500 | 10.5
{code}

Now we create with 3 parts to the PRIMARY KEY
{code}
cqlsh:dev drop TABLE testrev ;
cqlsh:dev CREATE TABLE testrev (
   ...  key text,
   ...  rdate timestamp,
   ...  rdate2 timestamp,
   ...  num double,
   ...  PRIMARY KEY(key,rdate,rdate2)
   ...  ) WITH COMPACT STORAGE
   ...  AND CLUSTERING ORDER BY(rdate DESC);

cqlsh:dev INSERT INTO testrev(key,rdate,rdate2,num) VALUES 
('foo','2012-01-01','2012-01-01',10.5);
cqlsh:dev select * from testrev where key='foo' and rdate  '2012-01-01';
 key | rdate| rdate2   | num
-+--+--+--
 foo | 2012-01-01 00:00:00-0500 | 2012-01-01 00:00:00-0500 | 10.5

cqlsh:dev select * from testrev where key='foo' and rdate = '2012-01-01';
{code}

The last query should return the row...


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


[jira] [Commented] (CASSANDRA-4759) CQL3 Predicate logic bug when using composite columns

2012-10-03 Thread T Jake Luciani (JIRA)

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

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

Also the first query in the second example is wrong, it should return nothing.

 CQL3 Predicate logic bug when using composite columns
 -

 Key: CASSANDRA-4759
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4759
 Project: Cassandra
  Issue Type: Bug
Reporter: T Jake Luciani

 Looks like a predicate logic bug that only happens when you have  2 primary 
 keys and use COMPACT STORAGE (meaning its using composite columns under the 
 hood)
 First I'll show it works with just 2 
 {code}
 cqlsh:dev CREATE TABLE testrev (
...  key text,
...  rdate timestamp,
...  num double,
...  PRIMARY KEY(key,rdate)
...  ) WITH COMPACT STORAGE
...AND CLUSTERING ORDER BY(rdate DESC);
 cqlsh:dev INSERT INTO testrev(key,rdate,num) VALUES 
 ('foo','2012-01-01',10.5);
 cqlsh:dev select * from testrev where key='foo' and rdate  '2012-01-01';
 cqlsh:dev select * from testrev where key='foo' and rdate = '2012-01-01';
  key | rdate| num
 -+--+--
  foo | 2012-01-01 00:00:00-0500 | 10.5
 {code}
 Now we create with 3 parts to the PRIMARY KEY
 {code}
 cqlsh:dev drop TABLE testrev ;
 cqlsh:dev CREATE TABLE testrev (
...  key text,
...  rdate timestamp,
...  rdate2 timestamp,
...  num double,
...  PRIMARY KEY(key,rdate,rdate2)
...  ) WITH COMPACT STORAGE
...  AND CLUSTERING ORDER BY(rdate DESC);
 cqlsh:dev INSERT INTO testrev(key,rdate,rdate2,num) VALUES 
 ('foo','2012-01-01','2012-01-01',10.5);
 cqlsh:dev select * from testrev where key='foo' and rdate  '2012-01-01';
  key | rdate| rdate2   | num
 -+--+--+--
  foo | 2012-01-01 00:00:00-0500 | 2012-01-01 00:00:00-0500 | 10.5
 cqlsh:dev select * from testrev where key='foo' and rdate = '2012-01-01';
 {code}
 The last query should return the row...

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


git commit: optimize batchlog flushing to skip successful batches patch by Aleksey Yeschenko; reviewed by jbellis for CASSANDRA-4667

2012-10-03 Thread jbellis
Updated Branches:
  refs/heads/trunk dbcf00df8 - 637af9d78


optimize batchlog flushing to skip successful batches
patch by Aleksey Yeschenko; reviewed by jbellis for CASSANDRA-4667


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

Branch: refs/heads/trunk
Commit: 637af9d78272d4c849d865a5cfe4b041ba86f35e
Parents: dbcf00d
Author: Jonathan Ellis jbel...@apache.org
Authored: Wed Oct 3 12:47:45 2012 -0500
Committer: Jonathan Ellis jbel...@apache.org
Committed: Wed Oct 3 16:30:13 2012 -0500

--
 CHANGES.txt|1 +
 .../org/apache/cassandra/config/CFMetaData.java|3 +-
 .../org/apache/cassandra/db/BatchlogManager.java   |   31 ---
 src/java/org/apache/cassandra/db/Memtable.java |8 
 4 files changed, 36 insertions(+), 7 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/637af9d7/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 3fa5997..01e03d7 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 1.2-beta2
+ * optimize batchlog flushing to skip successful batches (CASSANDRA-4667)
  * include metadata for system keyspace itself in schema tables 
(CASSANDRA-4416)
  * add check to PropertyFileSnitch to verify presence of location for
local node (CASSANDRA-4728)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/637af9d7/src/java/org/apache/cassandra/config/CFMetaData.java
--
diff --git a/src/java/org/apache/cassandra/config/CFMetaData.java 
b/src/java/org/apache/cassandra/config/CFMetaData.java
index 8aa4422..6abeb33 100644
--- a/src/java/org/apache/cassandra/config/CFMetaData.java
+++ b/src/java/org/apache/cassandra/config/CFMetaData.java
@@ -198,7 +198,8 @@ public final class CFMetaData
 + id uuid PRIMARY 
KEY,
 + written_at 
timestamp,
 + data blob
-+ ) WITH 
COMMENT='uncommited batches' AND gc_grace_seconds=0);
++ ) WITH 
COMMENT='uncommited batches' AND gc_grace_seconds=0 
++ AND 
COMPACTION={'class' : 'SizeTieredCompactionStrategy', 'min_threshold' : 2});
 
 public static final CFMetaData RangeXfersCf = compile(17, CREATE TABLE  
+ SystemTable.RANGE_XFERS_CF +  (
   + token_bytes 
blob PRIMARY KEY,

http://git-wip-us.apache.org/repos/asf/cassandra/blob/637af9d7/src/java/org/apache/cassandra/db/BatchlogManager.java
--
diff --git a/src/java/org/apache/cassandra/db/BatchlogManager.java 
b/src/java/org/apache/cassandra/db/BatchlogManager.java
index f732ece..e2a9c0d 100644
--- a/src/java/org/apache/cassandra/db/BatchlogManager.java
+++ b/src/java/org/apache/cassandra/db/BatchlogManager.java
@@ -22,6 +22,7 @@ import java.lang.management.ManagementFactory;
 import java.net.InetAddress;
 import java.nio.ByteBuffer;
 import java.util.*;
+import java.util.concurrent.ExecutionException;
 import java.util.concurrent.TimeUnit;
 import java.util.concurrent.atomic.AtomicBoolean;
 import java.util.concurrent.atomic.AtomicLong;
@@ -35,6 +36,7 @@ import org.slf4j.LoggerFactory;
 
 import org.apache.cassandra.config.CFMetaData;
 import org.apache.cassandra.config.DatabaseDescriptor;
+import org.apache.cassandra.db.compaction.CompactionManager;
 import org.apache.cassandra.db.filter.IFilter;
 import org.apache.cassandra.db.filter.NamesQueryFilter;
 import org.apache.cassandra.db.filter.QueryFilter;
@@ -46,12 +48,15 @@ import org.apache.cassandra.dht.AbstractBounds;
 import org.apache.cassandra.dht.IPartitioner;
 import org.apache.cassandra.dht.Range;
 import org.apache.cassandra.dht.Token;
+import org.apache.cassandra.io.sstable.Descriptor;
+import org.apache.cassandra.io.sstable.SSTableReader;
 import org.apache.cassandra.io.util.FastByteArrayOutputStream;
 import org.apache.cassandra.net.MessagingService;
 import org.apache.cassandra.service.StorageProxy;
 import org.apache.cassandra.service.StorageService;
 import org.apache.cassandra.utils.ByteBufferUtil;
 import org.apache.cassandra.utils.FBUtilities;
+import org.apache.cassandra.utils.WrappedRunnable;
 
 public class BatchlogManager implements BatchlogManagerMBean
 {
@@ -81,9 +86,9 @@ 

[jira] [Commented] (CASSANDRA-4751) User rpc_address for binary protocol and change default port

2012-10-03 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis commented on CASSANDRA-4751:
---

Feels a bit hackish but since we're not doing it in performance critical areas, 
+1

 User rpc_address for binary protocol and change default port
 

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

 Attachments: 4751.txt


 The events mechanism of the binary protocol require that we know the address 
 on which other nodes can be joined (for the binary protocol). Hence 
 CASSANDRA-4501. However, in 1.2 we've already burned all the padding in 1.1 
 gossip, so we can't gossip a new info (the binary protocol address), so 
 CASSANDRA-4501 will have to move to 1.3.
 But we do already gossip the rpc_address value, so an option is to make the 
 binary protocol bind on the rpc_address (but a specific port) rather than 
 having it's own setting. This ticket suggests to do that. Imo, there is 
 little downside to do it: the thrift and binary transport are not meant to be 
 used together except during the transition from one to the other, and even 
 then having to use the same network interface is hardly a limitation (in 
 other words, even for 1.3, we might want to hold on CASSANDRA-4501 until 
 someone comes with a compelling use case for it).

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


[jira] [Commented] (CASSANDRA-4667) optimize memtable deletions for batchlog

2012-10-03 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis commented on CASSANDRA-4667:
---

Yes.

 optimize memtable deletions for batchlog
 

 Key: CASSANDRA-4667
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4667
 Project: Cassandra
  Issue Type: Sub-task
Reporter: Aleksey Yeschenko
Assignee: Aleksey Yeschenko
 Fix For: 1.2.0 beta 2

 Attachments: CASSANDRA-4667-v1.1.patch, CASSANDRA-4667-v2.patch, 
 CASSANDRA-4667-v3.txt, CASSANDRA-4667-v4.txt


 Batchlog writes with the same key are never retried. This means that if a 
 batchlog row is in the memtable, it can't be in any of the sstables, ever. In 
 such cases we don't need to write a tombstone to disk. We can purge the row 
 completely from the memtable and only write a tombstone if the row had been 
 flushed already (if it's not in the memtable then it must be in one of the 
 sstables).

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


[jira] [Updated] (CASSANDRA-4759) CQL3 Predicate logic bug when using composite columns

2012-10-03 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis updated CASSANDRA-4759:
--

Assignee: Sylvain Lebresne

Is this 1.1 or 1.2?

 CQL3 Predicate logic bug when using composite columns
 -

 Key: CASSANDRA-4759
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4759
 Project: Cassandra
  Issue Type: Bug
Reporter: T Jake Luciani
Assignee: Sylvain Lebresne

 Looks like a predicate logic bug that only happens when you have  2 primary 
 keys and use COMPACT STORAGE (meaning its using composite columns under the 
 hood)
 First I'll show it works with just 2 
 {code}
 cqlsh:dev CREATE TABLE testrev (
...  key text,
...  rdate timestamp,
...  num double,
...  PRIMARY KEY(key,rdate)
...  ) WITH COMPACT STORAGE
...AND CLUSTERING ORDER BY(rdate DESC);
 cqlsh:dev INSERT INTO testrev(key,rdate,num) VALUES 
 ('foo','2012-01-01',10.5);
 cqlsh:dev select * from testrev where key='foo' and rdate  '2012-01-01';
 cqlsh:dev select * from testrev where key='foo' and rdate = '2012-01-01';
  key | rdate| num
 -+--+--
  foo | 2012-01-01 00:00:00-0500 | 10.5
 {code}
 Now we create with 3 parts to the PRIMARY KEY
 {code}
 cqlsh:dev drop TABLE testrev ;
 cqlsh:dev CREATE TABLE testrev (
...  key text,
...  rdate timestamp,
...  rdate2 timestamp,
...  num double,
...  PRIMARY KEY(key,rdate,rdate2)
...  ) WITH COMPACT STORAGE
...  AND CLUSTERING ORDER BY(rdate DESC);
 cqlsh:dev INSERT INTO testrev(key,rdate,rdate2,num) VALUES 
 ('foo','2012-01-01','2012-01-01',10.5);
 cqlsh:dev select * from testrev where key='foo' and rdate  '2012-01-01';
  key | rdate| rdate2   | num
 -+--+--+--
  foo | 2012-01-01 00:00:00-0500 | 2012-01-01 00:00:00-0500 | 10.5
 cqlsh:dev select * from testrev where key='foo' and rdate = '2012-01-01';
 {code}
 The last query should return the row...

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


[jira] [Updated] (CASSANDRA-4755) Bulk loader won't work with CQL3

2012-10-03 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis updated CASSANDRA-4755:
--

Reviewer: yukim
Assignee: Aleksey Yeschenko

I think I'd prefer just converting that code to use a CQL query or two, all it 
cares about is is this ks/cf pair valid, which isn't a big deal to fix.

Side note: looks like some code duplication in BulkLoader.ExternalClient and 
BulkRecordWriter.External client, be nice to clean that up.

 Bulk loader won't work with CQL3
 

 Key: CASSANDRA-4755
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4755
 Project: Cassandra
  Issue Type: Bug
  Components: Tools
Affects Versions: 1.2.0 beta 1
Reporter: Nick Bailey
Assignee: Aleksey Yeschenko
 Fix For: 1.2.0


 Currently the bulk loader uses thrift to get the schema and validate it 
 before bulk loading a cf. Since we stopped returning cql3 cfs through 
 describe_keyspaces, the bulk loader will be unable to load those cfs.
 If we figure out/add a way to validate the schema over jmx, we could use that 
 for getting token ranges as well and drop thrift completely from the bulk 
 loader.
 Another option might be querying system tables manually to validate things.

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


[jira] [Updated] (CASSANDRA-4610) Add thrift transport factory impl to cqlsh

2012-10-03 Thread Aleksey Yeschenko (JIRA)

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

Aleksey Yeschenko updated CASSANDRA-4610:
-

Attachment: (was: CASSANDRA-4610-1.2-patch.txt)

 Add thrift transport factory impl to cqlsh
 --

 Key: CASSANDRA-4610
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4610
 Project: Cassandra
  Issue Type: Sub-task
Reporter: T Jake Luciani
Assignee: Aleksey Yeschenko
 Attachments: CASSANDRA-4610-1.1-patch.txt, 
 cql-internal-only-1.0.11-for-1.1-patch.txt, cql-internal-only-1.0.11.zip, 
 cql-internal-only-1.2.1-for-1.2-patch.txt, cql-internal-only-1.2.1.zip




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


[jira] [Updated] (CASSANDRA-4610) Add thrift transport factory impl to cqlsh

2012-10-03 Thread Aleksey Yeschenko (JIRA)

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

Aleksey Yeschenko updated CASSANDRA-4610:
-

Attachment: CASSANDRA-4610-1.1-v2.txt

 Add thrift transport factory impl to cqlsh
 --

 Key: CASSANDRA-4610
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4610
 Project: Cassandra
  Issue Type: Sub-task
Reporter: T Jake Luciani
Assignee: Aleksey Yeschenko
 Attachments: CASSANDRA-4610-1.1-patch.txt, CASSANDRA-4610-1.1-v2.txt, 
 cql-internal-only-1.0.11-for-1.1-patch.txt, cql-internal-only-1.0.11.zip, 
 cql-internal-only-1.2.1-for-1.2-patch.txt, cql-internal-only-1.2.1.zip




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


[jira] [Created] (CASSANDRA-4760) CQL3 equality is broken when using composites and clustering order by

2012-10-03 Thread T Jake Luciani (JIRA)
T Jake Luciani created CASSANDRA-4760:
-

 Summary: CQL3 equality is broken when using composites and 
clustering order by
 Key: CASSANDRA-4760
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4760
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Reporter: T Jake Luciani
 Fix For: 1.1.6


The following query is broken when you specify the second order by

{code}
cqlsh:dev DROP TABLE testrev ;
cqlsh:dev CREATE TABLE testrev (
   ...  key text,
   ...  rdate timestamp,
   ...  rdate2 timestamp,
   ...  num double,
   ...  PRIMARY KEY(key,rdate,rdate2)
   ...  ) WITH COMPACT STORAGE
   ...  AND CLUSTERING ORDER BY(rdate DESC, rdate2 DESC);
cqlsh:dev INSERT INTO testrev(key,rdate,rdate2,num) VALUES 
('foo','2012-01-01','2012-01-01',10.5);
cqlsh:dev select * from testrev where key='foo' and rdate = '2012-01-01';
Bad Request: Range finish must come after start in traversal order
Perhaps you meant to use CQL 2? Try using the -2 option when starting cqlsh.
cqlsh:dev 
{code}

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


[jira] [Updated] (CASSANDRA-4610) Add thrift transport factory impl to cqlsh

2012-10-03 Thread Aleksey Yeschenko (JIRA)

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

Aleksey Yeschenko updated CASSANDRA-4610:
-

Attachment: CASSANDRA-4610-1.2-v2.txt

 Add thrift transport factory impl to cqlsh
 --

 Key: CASSANDRA-4610
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4610
 Project: Cassandra
  Issue Type: Sub-task
Reporter: T Jake Luciani
Assignee: Aleksey Yeschenko
 Attachments: CASSANDRA-4610-1.1-v2.txt, CASSANDRA-4610-1.2-v2.txt, 
 cql-internal-only-1.0.11-for-1.1-patch.txt, cql-internal-only-1.0.11.zip, 
 cql-internal-only-1.2.1-for-1.2-patch.txt, cql-internal-only-1.2.1.zip




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


[jira] [Updated] (CASSANDRA-4610) Add thrift transport factory impl to cqlsh

2012-10-03 Thread Aleksey Yeschenko (JIRA)

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

Aleksey Yeschenko updated CASSANDRA-4610:
-

Attachment: (was: CASSANDRA-4610-1.1-patch.txt)

 Add thrift transport factory impl to cqlsh
 --

 Key: CASSANDRA-4610
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4610
 Project: Cassandra
  Issue Type: Sub-task
Reporter: T Jake Luciani
Assignee: Aleksey Yeschenko
 Attachments: CASSANDRA-4610-1.1-v2.txt, CASSANDRA-4610-1.2-v2.txt, 
 cql-internal-only-1.0.11-for-1.1-patch.txt, cql-internal-only-1.0.11.zip, 
 cql-internal-only-1.2.1-for-1.2-patch.txt, cql-internal-only-1.2.1.zip




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


[jira] [Resolved] (CASSANDRA-4758) Allow throttling bulk load separately from streaming

2012-10-03 Thread Brandon Williams (JIRA)

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

Brandon Williams resolved CASSANDRA-4758.
-

Resolution: Not A Problem

I already did this for BOF.  It's part of sstableloader too:

{noformat}
 -t,--throttle throttle throttle speed in Mbits (default unlimited)
{noformat}

 Allow throttling bulk load separately from streaming
 

 Key: CASSANDRA-4758
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4758
 Project: Cassandra
  Issue Type: Improvement
Reporter: Nick Bailey
  Labels: ponies

 Currently when you call the bulkload jmx call, the only way to achieve 
 throttling is by tuning the streaming throttle in general, which affects all 
 streaming operations.
 It would be nice to be able to throttle bulk loading separately.

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


[jira] [Reopened] (CASSANDRA-4758) Allow throttling bulk load separately from streaming

2012-10-03 Thread Brandon Williams (JIRA)

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

Brandon Williams reopened CASSANDRA-4758:
-


Oh, but for the jmx method... hmm, I guess we could add a new method that takes 
a throttle arg, I'd hate to add another config option just for that.

 Allow throttling bulk load separately from streaming
 

 Key: CASSANDRA-4758
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4758
 Project: Cassandra
  Issue Type: Improvement
Reporter: Nick Bailey
  Labels: ponies

 Currently when you call the bulkload jmx call, the only way to achieve 
 throttling is by tuning the streaming throttle in general, which affects all 
 streaming operations.
 It would be nice to be able to throttle bulk loading separately.

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


[jira] [Commented] (CASSANDRA-4758) Allow throttling bulk load separately from streaming

2012-10-03 Thread Nick Bailey (JIRA)

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

Nick Bailey commented on CASSANDRA-4758:


Yeah I know. I was referring to the jmx bulk load call.

 Allow throttling bulk load separately from streaming
 

 Key: CASSANDRA-4758
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4758
 Project: Cassandra
  Issue Type: Improvement
Reporter: Nick Bailey
  Labels: ponies

 Currently when you call the bulkload jmx call, the only way to achieve 
 throttling is by tuning the streaming throttle in general, which affects all 
 streaming operations.
 It would be nice to be able to throttle bulk loading separately.

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


[jira] [Updated] (CASSANDRA-4610) Add thrift transport factory impl to cqlsh

2012-10-03 Thread Aleksey Yeschenko (JIRA)

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

Aleksey Yeschenko updated CASSANDRA-4610:
-

Attachment: CASSANDRA-4610-1.1-v3.txt

 Add thrift transport factory impl to cqlsh
 --

 Key: CASSANDRA-4610
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4610
 Project: Cassandra
  Issue Type: Sub-task
Reporter: T Jake Luciani
Assignee: Aleksey Yeschenko
 Attachments: CASSANDRA-4610-1.1-v2.txt, CASSANDRA-4610-1.1-v3.txt, 
 CASSANDRA-4610-1.2-v2.txt, cql-internal-only-1.0.11-for-1.1-patch.txt, 
 cql-internal-only-1.0.11.zip, cql-internal-only-1.2.1-for-1.2-patch.txt, 
 cql-internal-only-1.2.1.zip




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


[jira] [Updated] (CASSANDRA-4610) Add thrift transport factory impl to cqlsh

2012-10-03 Thread Aleksey Yeschenko (JIRA)

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

Aleksey Yeschenko updated CASSANDRA-4610:
-

Attachment: CASSANDRA-4610-1.2-v3.txt

 Add thrift transport factory impl to cqlsh
 --

 Key: CASSANDRA-4610
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4610
 Project: Cassandra
  Issue Type: Sub-task
Reporter: T Jake Luciani
Assignee: Aleksey Yeschenko
 Attachments: CASSANDRA-4610-1.1-v3.txt, CASSANDRA-4610-1.2-v3.txt, 
 cql-internal-only-1.0.11-for-1.1-patch.txt, cql-internal-only-1.0.11.zip, 
 cql-internal-only-1.2.1-for-1.2-patch.txt, cql-internal-only-1.2.1.zip




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


[jira] [Updated] (CASSANDRA-4610) Add thrift transport factory impl to cqlsh

2012-10-03 Thread Aleksey Yeschenko (JIRA)

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

Aleksey Yeschenko updated CASSANDRA-4610:
-

Attachment: (was: CASSANDRA-4610-1.2-v2.txt)

 Add thrift transport factory impl to cqlsh
 --

 Key: CASSANDRA-4610
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4610
 Project: Cassandra
  Issue Type: Sub-task
Reporter: T Jake Luciani
Assignee: Aleksey Yeschenko
 Attachments: CASSANDRA-4610-1.1-v3.txt, CASSANDRA-4610-1.2-v3.txt, 
 cql-internal-only-1.0.11-for-1.1-patch.txt, cql-internal-only-1.0.11.zip, 
 cql-internal-only-1.2.1-for-1.2-patch.txt, cql-internal-only-1.2.1.zip




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


[jira] [Updated] (CASSANDRA-4610) Add thrift transport factory impl to cqlsh

2012-10-03 Thread Aleksey Yeschenko (JIRA)

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

Aleksey Yeschenko updated CASSANDRA-4610:
-

Attachment: (was: CASSANDRA-4610-1.1-v2.txt)

 Add thrift transport factory impl to cqlsh
 --

 Key: CASSANDRA-4610
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4610
 Project: Cassandra
  Issue Type: Sub-task
Reporter: T Jake Luciani
Assignee: Aleksey Yeschenko
 Attachments: CASSANDRA-4610-1.1-v3.txt, CASSANDRA-4610-1.2-v3.txt, 
 cql-internal-only-1.0.11-for-1.1-patch.txt, cql-internal-only-1.0.11.zip, 
 cql-internal-only-1.2.1-for-1.2-patch.txt, cql-internal-only-1.2.1.zip




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


git commit: replace long cast with 0xFFFFFFFFL

2012-10-03 Thread vijay
Updated Branches:
  refs/heads/trunk 637af9d78 - 5df99327e


replace long cast with  0xL


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

Branch: refs/heads/trunk
Commit: 5df99327e6c3b7cf809f6a5088580ae8dad5e669
Parents: 637af9d
Author: Vijay Parthasarathy vijay2...@gmail.com
Authored: Wed Oct 3 15:51:48 2012 -0700
Committer: Vijay Parthasarathy vijay2...@gmail.com
Committed: Wed Oct 3 15:52:15 2012 -0700

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


http://git-wip-us.apache.org/repos/asf/cassandra/blob/5df99327/src/java/org/apache/cassandra/net/IncomingTcpConnection.java
--
diff --git a/src/java/org/apache/cassandra/net/IncomingTcpConnection.java 
b/src/java/org/apache/cassandra/net/IncomingTcpConnection.java
index 02b40d1..949c5b6 100644
--- a/src/java/org/apache/cassandra/net/IncomingTcpConnection.java
+++ b/src/java/org/apache/cassandra/net/IncomingTcpConnection.java
@@ -179,7 +179,7 @@ public class IncomingTcpConnection extends Thread
 
 String id = input.readUTF();
 long timestamp = version = MessagingService.VERSION_12
-   ? (System.currentTimeMillis()  0xL) | 
(((long) input.readInt()  2)  2)
+   ? (System.currentTimeMillis()  0xL) | 
(((input.readInt()  0xL)  2)  2)
: System.currentTimeMillis();
 
 MessageIn message = MessageIn.read(input, version, id);



[jira] [Updated] (CASSANDRA-4705) Speculative execution for CL_ONE

2012-10-03 Thread Vijay (JIRA)

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

Vijay updated CASSANDRA-4705:
-

Attachment: 0001-CASSANDRA-4705.patch

Hi Jonathan, the custom value is kind of better in the cases where users can 
say, My SLA is 20 MS and i want co-ordinator to retry the reads after 15 MS, or 
more aggressively retry after 10 MS.

Attached patch supports the following:

- ALL
- auto95 (Default)
- auto98
- auto99
- auto999
- autoMean
- NONE (current behavior)


 Speculative execution for CL_ONE
 

 Key: CASSANDRA-4705
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4705
 Project: Cassandra
  Issue Type: Improvement
Affects Versions: 1.2.0
Reporter: Vijay
Assignee: Vijay
Priority: Minor
 Attachments: 0001-CASSANDRA-4705.patch


 When read_repair is not 1.0, we send the request to one node for some of the 
 requests. When a node goes down or when a node is too busy the client has to 
 wait for the timeout before it can retry. 
 It would be nice to watch for latency and execute an additional request to a 
 different node, if the response is not received within average/99% of the 
 response times recorded in the past.
 CASSANDRA-2540 might be able to solve the variance when read_repair is set to 
 1.0
 1) May be we need to use metrics-core to record various Percentiles
 2) Modify ReadCallback.get to execute additional request speculatively.

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


[jira] [Updated] (CASSANDRA-4609) Add thrift transport factory impl to cassandra-cli

2012-10-03 Thread Pavel Yaskevich (JIRA)

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

Pavel Yaskevich updated CASSANDRA-4609:
---

Attachment: CASSANDRA-4609-v2.patch

attaching v2 to show how I want transport-factories to be done for CLI, what do 
you think Jason?

 Add thrift transport factory impl to cassandra-cli
 --

 Key: CASSANDRA-4609
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4609
 Project: Cassandra
  Issue Type: Sub-task
Reporter: T Jake Luciani
Assignee: Jason Brown
 Fix For: 1.1.6

 Attachments: 
 0003-CASSANDRA-4609-add-thrift-transport-factory-support-.patch, 
 4609_cass1.1.patch, CASSANDRA-4609-v2.patch




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


[jira] [Updated] (CASSANDRA-4610) Add thrift transport factory impl to cqlsh

2012-10-03 Thread Aleksey Yeschenko (JIRA)

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

Aleksey Yeschenko updated CASSANDRA-4610:
-

Attachment: (was: cql-internal-only-1.2.1-for-1.2-patch.txt)

 Add thrift transport factory impl to cqlsh
 --

 Key: CASSANDRA-4610
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4610
 Project: Cassandra
  Issue Type: Sub-task
Reporter: T Jake Luciani
Assignee: Aleksey Yeschenko
 Attachments: CASSANDRA-4610-1.1-v3.txt, CASSANDRA-4610-1.2-v3.txt, 
 cql-internal-only-1.0.11-for-1.1-patch.txt, cql-internal-only-1.0.11.zip, 
 cql-internal-only-1.3.0.zip




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


[jira] [Updated] (CASSANDRA-4610) Add thrift transport factory impl to cqlsh

2012-10-03 Thread Aleksey Yeschenko (JIRA)

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

Aleksey Yeschenko updated CASSANDRA-4610:
-

Attachment: (was: cql-internal-only-1.2.1.zip)

 Add thrift transport factory impl to cqlsh
 --

 Key: CASSANDRA-4610
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4610
 Project: Cassandra
  Issue Type: Sub-task
Reporter: T Jake Luciani
Assignee: Aleksey Yeschenko
 Attachments: CASSANDRA-4610-1.1-v3.txt, CASSANDRA-4610-1.2-v3.txt, 
 cql-internal-only-1.0.11-for-1.1-patch.txt, cql-internal-only-1.0.11.zip, 
 cql-internal-only-1.3.0.zip




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


[jira] [Updated] (CASSANDRA-4610) Add thrift transport factory impl to cqlsh

2012-10-03 Thread Aleksey Yeschenko (JIRA)

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

Aleksey Yeschenko updated CASSANDRA-4610:
-

Attachment: cql-internal-only-1.3.0.zip

 Add thrift transport factory impl to cqlsh
 --

 Key: CASSANDRA-4610
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4610
 Project: Cassandra
  Issue Type: Sub-task
Reporter: T Jake Luciani
Assignee: Aleksey Yeschenko
 Attachments: CASSANDRA-4610-1.1-v3.txt, CASSANDRA-4610-1.2-v3.txt, 
 cql-internal-only-1.0.11-for-1.1-patch.txt, cql-internal-only-1.0.11.zip, 
 cql-internal-only-1.3.0.zip




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


[jira] [Updated] (CASSANDRA-4610) Add thrift transport factory impl to cqlsh

2012-10-03 Thread Aleksey Yeschenko (JIRA)

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

Aleksey Yeschenko updated CASSANDRA-4610:
-

Attachment: cql-internal-only-1.0.10-4610.zip

 Add thrift transport factory impl to cqlsh
 --

 Key: CASSANDRA-4610
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4610
 Project: Cassandra
  Issue Type: Sub-task
Reporter: T Jake Luciani
Assignee: Aleksey Yeschenko
 Attachments: CASSANDRA-4610-1.1-v3.txt, CASSANDRA-4610-1.2-v3.txt, 
 cql-internal-only-1.0.10-4610.zip, cql-internal-only-1.3.0.zip




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


[jira] [Updated] (CASSANDRA-4610) Add thrift transport factory impl to cqlsh

2012-10-03 Thread Aleksey Yeschenko (JIRA)

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

Aleksey Yeschenko updated CASSANDRA-4610:
-

Attachment: (was: cql-internal-only-1.0.11.zip)

 Add thrift transport factory impl to cqlsh
 --

 Key: CASSANDRA-4610
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4610
 Project: Cassandra
  Issue Type: Sub-task
Reporter: T Jake Luciani
Assignee: Aleksey Yeschenko
 Attachments: CASSANDRA-4610-1.1-v3.txt, CASSANDRA-4610-1.2-v3.txt, 
 cql-internal-only-1.0.10-4610.zip, cql-internal-only-1.3.0.zip




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


[jira] [Updated] (CASSANDRA-4610) Add thrift transport factory impl to cqlsh

2012-10-03 Thread Aleksey Yeschenko (JIRA)

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

Aleksey Yeschenko updated CASSANDRA-4610:
-

Attachment: (was: cql-internal-only-1.0.11-for-1.1-patch.txt)

 Add thrift transport factory impl to cqlsh
 --

 Key: CASSANDRA-4610
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4610
 Project: Cassandra
  Issue Type: Sub-task
Reporter: T Jake Luciani
Assignee: Aleksey Yeschenko
 Attachments: CASSANDRA-4610-1.1-v3.txt, CASSANDRA-4610-1.2-v3.txt, 
 cql-internal-only-1.0.10-4610.zip, cql-internal-only-1.3.0.zip




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


[jira] [Commented] (CASSANDRA-4610) Add thrift transport factory impl to cqlsh

2012-10-03 Thread Aleksey Yeschenko (JIRA)

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

Aleksey Yeschenko commented on CASSANDRA-4610:
--

cql-internal-only-1.3.0.zip is for trunk, cql-internal-only-1.0.10-4610.zip is 
for 1.1 branch. Decided against pushing an official 1.0.10+ release, this will 
be internal-only.

 Add thrift transport factory impl to cqlsh
 --

 Key: CASSANDRA-4610
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4610
 Project: Cassandra
  Issue Type: Sub-task
Reporter: T Jake Luciani
Assignee: Aleksey Yeschenko
 Attachments: CASSANDRA-4610-1.1-v3.txt, CASSANDRA-4610-1.2-v3.txt, 
 cql-internal-only-1.0.10-4610.zip, cql-internal-only-1.3.0.zip




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


[jira] [Updated] (CASSANDRA-4608) Add thrift server factory to CassandraDaemon

2012-10-03 Thread Pavel Yaskevich (JIRA)

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

Pavel Yaskevich updated CASSANDRA-4608:
---

Reviewer: xedin

 Add thrift server factory to CassandraDaemon
 

 Key: CASSANDRA-4608
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4608
 Project: Cassandra
  Issue Type: Sub-task
Reporter: T Jake Luciani
Assignee: Jason Brown
 Fix For: 1.1.6, 1.2.0 beta 2

 Attachments: 
 0002-CASSANDRA-4608-Add-thrift-server-factory-to-Cassandr.patch, 
 4608_cassandra-1.1.patch, 4608_cassandra-1.2.patch


 Add factory class for CassandraServer
 Default impl will be the current thrift server types.

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


[jira] [Commented] (CASSANDRA-4609) Add thrift transport factory impl to cassandra-cli

2012-10-03 Thread Jason Brown (JIRA)

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

Jason Brown commented on CASSANDRA-4609:


Yes, looks a little simpler than mine (which used the CliTransportFactory as an 
intermediary factory). LGTM, +1.

 Add thrift transport factory impl to cassandra-cli
 --

 Key: CASSANDRA-4609
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4609
 Project: Cassandra
  Issue Type: Sub-task
Reporter: T Jake Luciani
Assignee: Jason Brown
 Fix For: 1.1.6

 Attachments: 
 0003-CASSANDRA-4609-add-thrift-transport-factory-support-.patch, 
 4609_cass1.1.patch, CASSANDRA-4609-v2.patch




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


git commit: Pluggable Thrift transport factories for CLI patch by Jason Brown and Pavel Yaskevich; reviewed by Pavel Yaskevich for CASSANDRA-4609

2012-10-03 Thread xedin
Updated Branches:
  refs/heads/cassandra-1.1 d170a7a99 - 59a6a5d82


Pluggable Thrift transport factories for CLI
patch by Jason Brown and Pavel Yaskevich; reviewed by Pavel Yaskevich for 
CASSANDRA-4609


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

Branch: refs/heads/cassandra-1.1
Commit: 59a6a5d82dc088dac8f1d98bc48a6426d75dc1a2
Parents: d170a7a
Author: Pavel Yaskevich xe...@apache.org
Authored: Tue Oct 2 18:13:01 2012 -0700
Committer: Pavel Yaskevich xe...@apache.org
Committed: Wed Oct 3 22:16:56 2012 -0700

--
 CHANGES.txt|1 +
 src/java/org/apache/cassandra/cli/CliMain.java |   14 +-
 src/java/org/apache/cassandra/cli/CliOptions.java  |   28 +
 .../org/apache/cassandra/cli/CliSessionState.java  |8 +++-
 .../cli/transport/FramedTransportFactory.java  |   30 ++
 .../cli/transport/SimpleTransportFactory.java  |   32 +++
 6 files changed, 100 insertions(+), 13 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/59a6a5d8/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 292db49..d803c0f 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -15,6 +15,7 @@
  * add authentication support to sstableloader (CASSANDRA-4712)
  * Fix CQL3 'is reversed' logic (CASSANDRA-4716)
  * (CQL3) Don't return ReversedType in result set metadata (CASSANDRA-4717)
+ * Pluggable Thrift transport factories for CLI (CASSANDRA-4609)
 Merged from 1.0:
  * Switch from NBHM to CHM in MessagingService's callback map, which
prevents OOM in long-running instances (CASSANDRA-4708)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/59a6a5d8/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 2d900ba..9baf676 100644
--- a/src/java/org/apache/cassandra/cli/CliMain.java
+++ b/src/java/org/apache/cassandra/cli/CliMain.java
@@ -31,7 +31,6 @@ import org.apache.cassandra.auth.IAuthenticator;
 import org.apache.cassandra.thrift.*;
 import org.apache.thrift.TException;
 import org.apache.thrift.protocol.TBinaryProtocol;
-import org.apache.thrift.transport.TFramedTransport;
 import org.apache.thrift.transport.TSocket;
 import org.apache.thrift.transport.TTransport;
 
@@ -62,21 +61,14 @@ public class CliMain
 if (transport != null)
 transport.close();
 
-if (sessionState.framed)
-{
-transport = new TFramedTransport(socket);
-}
-else
-{
-transport = socket;
-}
-
+transport = sessionState.transportFactory.getTransport(socket);
 TBinaryProtocol binaryProtocol = new TBinaryProtocol(transport, true, 
true);
 Cassandra.Client cassandraClient = new 
Cassandra.Client(binaryProtocol);
 
 try
 {
-transport.open();
+if (!transport.isOpen())
+transport.open();
 }
 catch (Exception e)
 {

http://git-wip-us.apache.org/repos/asf/cassandra/blob/59a6a5d8/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 c582728..982daf5 100644
--- a/src/java/org/apache/cassandra/cli/CliOptions.java
+++ b/src/java/org/apache/cassandra/cli/CliOptions.java
@@ -17,7 +17,9 @@
  */
 package org.apache.cassandra.cli;
 
+import org.apache.cassandra.cli.transport.SimpleTransportFactory;
 import org.apache.commons.cli.*;
+import org.apache.thrift.transport.TTransportFactory;
 
 /**
  *
@@ -35,6 +37,7 @@ public class CliOptions
 private static final String HOST_OPTION = host;
 private static final String PORT_OPTION = port;
 private static final String UNFRAME_OPTION = unframed;
+private static final String TRANSPORT_FACTORY = transport-factory;
 private static final String DEBUG_OPTION = debug;
 private static final String USERNAME_OPTION = username;
 private static final String PASSWORD_OPTION = password;
@@ -64,6 +67,7 @@ public class CliOptions
 options.addOption(f,  FILE_OPTION, FILENAME, load statements 
from the specific file);
 options.addOption(null, JMX_PORT_OPTION, JMX-PORT, JMX service 
port);
 options.addOption(null, SCHEMA_MIGRATION_WAIT_TIME,  TIME, Schema 
migration wait time (secs.), default is 10 secs);
+ 

[1/2] git commit: merge from 1.1

2012-10-03 Thread xedin
Updated Branches:
  refs/heads/trunk 5df99327e - 51e6c7c0a


merge from 1.1


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

Branch: refs/heads/trunk
Commit: 51e6c7c0a840fc039cb847937f55ab58c26a79f7
Parents: 5df9932 59a6a5d
Author: Pavel Yaskevich xe...@apache.org
Authored: Wed Oct 3 22:24:54 2012 -0700
Committer: Pavel Yaskevich xe...@apache.org
Committed: Wed Oct 3 22:24:54 2012 -0700

--
 CHANGES.txt|1 +
 src/java/org/apache/cassandra/cli/CliMain.java |7 +--
 src/java/org/apache/cassandra/cli/CliOptions.java  |   23 ++
 .../org/apache/cassandra/cli/CliSessionState.java  |8 +++-
 .../cli/transport/FramedTransportFactory.java  |   30 ++
 .../cli/transport/SimpleTransportFactory.java  |   32 +++
 6 files changed, 95 insertions(+), 6 deletions(-)
--


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

http://git-wip-us.apache.org/repos/asf/cassandra/blob/51e6c7c0/src/java/org/apache/cassandra/cli/CliMain.java
--

http://git-wip-us.apache.org/repos/asf/cassandra/blob/51e6c7c0/src/java/org/apache/cassandra/cli/CliOptions.java
--
diff --cc src/java/org/apache/cassandra/cli/CliOptions.java
index b32833e,982daf5..b905336
--- a/src/java/org/apache/cassandra/cli/CliOptions.java
+++ b/src/java/org/apache/cassandra/cli/CliOptions.java
@@@ -17,7 -17,9 +17,8 @@@
   */
  package org.apache.cassandra.cli;
  
 -import org.apache.cassandra.cli.transport.SimpleTransportFactory;
  import org.apache.commons.cli.*;
+ import org.apache.thrift.transport.TTransportFactory;
  
  /**
   *
@@@ -34,6 -36,8 +35,7 @@@ public class CliOption
  // Command line options
  private static final String HOST_OPTION = host;
  private static final String PORT_OPTION = port;
 -private static final String UNFRAME_OPTION = unframed;
+ private static final String TRANSPORT_FACTORY = transport-factory;
  private static final String DEBUG_OPTION = debug;
  private static final String USERNAME_OPTION = username;
  private static final String PASSWORD_OPTION = password;
@@@ -93,6 -99,20 +96,9 @@@
  css.hostName = DEFAULT_HOST;
  }
  
 -// Look to see if frame has been specified
 -if (cmd.hasOption(UNFRAME_OPTION))
 -{
 -if (cmd.hasOption(TRANSPORT_FACTORY))
 -throw new IllegalArgumentException(--unframed and 
--transport-factory options should not be fixed.);
 -
 -css.framed = false;
 -css.transportFactory = new SimpleTransportFactory();
 -}
 -
+ if (cmd.hasOption(TRANSPORT_FACTORY))
+ css.transportFactory = 
validateAndSetTransportFactory(cmd.getOptionValue(TRANSPORT_FACTORY));
+ 
 -// Look to see if frame has been specified
  if (cmd.hasOption(DEBUG_OPTION))
  {
  css.debug = true;

http://git-wip-us.apache.org/repos/asf/cassandra/blob/51e6c7c0/src/java/org/apache/cassandra/cli/CliSessionState.java
--
diff --cc src/java/org/apache/cassandra/cli/CliSessionState.java
index a0ef4e2,0284239..5f29186
--- a/src/java/org/apache/cassandra/cli/CliSessionState.java
+++ b/src/java/org/apache/cassandra/cli/CliSessionState.java
@@@ -15,10 -15,9 +15,8 @@@
   * See the License for the specific language governing permissions and
   * limitations under the License.
   */
 -
  package org.apache.cassandra.cli;
  
- import org.apache.cassandra.tools.NodeProbe;
- 
  import java.io.InputStream;
  import java.io.PrintStream;
  



[2/2] git commit: Pluggable Thrift transport factories for CLI patch by Jason Brown and Pavel Yaskevich; reviewed by Pavel Yaskevich for CASSANDRA-4609

2012-10-03 Thread xedin
Pluggable Thrift transport factories for CLI
patch by Jason Brown and Pavel Yaskevich; reviewed by Pavel Yaskevich for 
CASSANDRA-4609


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

Branch: refs/heads/trunk
Commit: 59a6a5d82dc088dac8f1d98bc48a6426d75dc1a2
Parents: d170a7a
Author: Pavel Yaskevich xe...@apache.org
Authored: Tue Oct 2 18:13:01 2012 -0700
Committer: Pavel Yaskevich xe...@apache.org
Committed: Wed Oct 3 22:16:56 2012 -0700

--
 CHANGES.txt|1 +
 src/java/org/apache/cassandra/cli/CliMain.java |   14 +-
 src/java/org/apache/cassandra/cli/CliOptions.java  |   28 +
 .../org/apache/cassandra/cli/CliSessionState.java  |8 +++-
 .../cli/transport/FramedTransportFactory.java  |   30 ++
 .../cli/transport/SimpleTransportFactory.java  |   32 +++
 6 files changed, 100 insertions(+), 13 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/59a6a5d8/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 292db49..d803c0f 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -15,6 +15,7 @@
  * add authentication support to sstableloader (CASSANDRA-4712)
  * Fix CQL3 'is reversed' logic (CASSANDRA-4716)
  * (CQL3) Don't return ReversedType in result set metadata (CASSANDRA-4717)
+ * Pluggable Thrift transport factories for CLI (CASSANDRA-4609)
 Merged from 1.0:
  * Switch from NBHM to CHM in MessagingService's callback map, which
prevents OOM in long-running instances (CASSANDRA-4708)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/59a6a5d8/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 2d900ba..9baf676 100644
--- a/src/java/org/apache/cassandra/cli/CliMain.java
+++ b/src/java/org/apache/cassandra/cli/CliMain.java
@@ -31,7 +31,6 @@ import org.apache.cassandra.auth.IAuthenticator;
 import org.apache.cassandra.thrift.*;
 import org.apache.thrift.TException;
 import org.apache.thrift.protocol.TBinaryProtocol;
-import org.apache.thrift.transport.TFramedTransport;
 import org.apache.thrift.transport.TSocket;
 import org.apache.thrift.transport.TTransport;
 
@@ -62,21 +61,14 @@ public class CliMain
 if (transport != null)
 transport.close();
 
-if (sessionState.framed)
-{
-transport = new TFramedTransport(socket);
-}
-else
-{
-transport = socket;
-}
-
+transport = sessionState.transportFactory.getTransport(socket);
 TBinaryProtocol binaryProtocol = new TBinaryProtocol(transport, true, 
true);
 Cassandra.Client cassandraClient = new 
Cassandra.Client(binaryProtocol);
 
 try
 {
-transport.open();
+if (!transport.isOpen())
+transport.open();
 }
 catch (Exception e)
 {

http://git-wip-us.apache.org/repos/asf/cassandra/blob/59a6a5d8/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 c582728..982daf5 100644
--- a/src/java/org/apache/cassandra/cli/CliOptions.java
+++ b/src/java/org/apache/cassandra/cli/CliOptions.java
@@ -17,7 +17,9 @@
  */
 package org.apache.cassandra.cli;
 
+import org.apache.cassandra.cli.transport.SimpleTransportFactory;
 import org.apache.commons.cli.*;
+import org.apache.thrift.transport.TTransportFactory;
 
 /**
  *
@@ -35,6 +37,7 @@ public class CliOptions
 private static final String HOST_OPTION = host;
 private static final String PORT_OPTION = port;
 private static final String UNFRAME_OPTION = unframed;
+private static final String TRANSPORT_FACTORY = transport-factory;
 private static final String DEBUG_OPTION = debug;
 private static final String USERNAME_OPTION = username;
 private static final String PASSWORD_OPTION = password;
@@ -64,6 +67,7 @@ public class CliOptions
 options.addOption(f,  FILE_OPTION, FILENAME, load statements 
from the specific file);
 options.addOption(null, JMX_PORT_OPTION, JMX-PORT, JMX service 
port);
 options.addOption(null, SCHEMA_MIGRATION_WAIT_TIME,  TIME, Schema 
migration wait time (secs.), default is 10 secs);
+options.addOption(tf, TRANSPORT_FACTORY, TRANSPORT-FACTORY,