[jira] [Commented] (CASSANDRA-4816) Broken get_paged_slice

2012-10-24 Thread Cathy Daw (JIRA)

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

Cathy Daw commented on CASSANDRA-4816:
--

+1 this version fixes my tests as well.

 Broken get_paged_slice 
 ---

 Key: CASSANDRA-4816
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4816
 Project: Cassandra
  Issue Type: Bug
Affects Versions: 1.1.6
Reporter: Piotr Kołaczkowski
Assignee: Sylvain Lebresne
Priority: Blocker
 Fix For: 1.1.7

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


 get_paged_slice doesn't reset the start column filter for the second returned 
 row sometimes. So instead of getting a slice:
 row 0: start_column...last_column_in_row
 row 1: first column in a row...last_column_in_row
 row 2: first column in a row...
 you sometimes get:
 row 0: start_column...last_column_in_row
 row 1: start_column...last_column_in_row
 row 2: first column in a 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-4816) Broken get_paged_slice

2012-10-24 Thread Sylvain Lebresne (JIRA)

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

Sylvain Lebresne commented on CASSANDRA-4816:
-

To be clear, I'm also good on version 3 but I'll let Jonathan review since I've 
wrote version 2 on which version 3 is based.

 Broken get_paged_slice 
 ---

 Key: CASSANDRA-4816
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4816
 Project: Cassandra
  Issue Type: Bug
Affects Versions: 1.1.6
Reporter: Piotr Kołaczkowski
Assignee: Sylvain Lebresne
Priority: Blocker
 Fix For: 1.1.7

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


 get_paged_slice doesn't reset the start column filter for the second returned 
 row sometimes. So instead of getting a slice:
 row 0: start_column...last_column_in_row
 row 1: first column in a row...last_column_in_row
 row 2: first column in a row...
 you sometimes get:
 row 0: start_column...last_column_in_row
 row 1: start_column...last_column_in_row
 row 2: first column in a 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-4800) cqlsh help is obsolete for cql3

2012-10-24 Thread Sylvain Lebresne (JIRA)

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

Sylvain Lebresne updated CASSANDRA-4800:


Summary: cqlsh help is obsolete for cql3  (was: cqlsh help is obsolete for 
cql3 DDL)

 cqlsh help is obsolete for cql3
 ---

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


 For example, new syntax for CREATE KEYSPACE is
 create keyspace foo with replication = {'class': 'SimpleStrategy', 
 'replication_factor': 1}

--
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-4800) cqlsh help is obsolete for cql3

2012-10-24 Thread Sylvain Lebresne (JIRA)

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

Sylvain Lebresne commented on CASSANDRA-4800:
-

I've updated the title to reflect my opinion :)

But basically, we need to fix all the cqlsh help for 1.2 release anyway, so I 
don't see a point in creating many different tickets.

 cqlsh help is obsolete for cql3
 ---

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


 For example, new syntax for CREATE KEYSPACE is
 create keyspace foo with replication = {'class': 'SimpleStrategy', 
 'replication_factor': 1}

--
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-4835) Appending/Prepending items to list using BATCH

2012-10-24 Thread Sylvain Lebresne (JIRA)

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

Sylvain Lebresne updated CASSANDRA-4835:


Attachment: 0002-Ensure-same-timestamp-in-batches.txt
0001-Fix-prepends-within-same-millis.txt

Alright, this is in fact a legit bug in prepend and is not specific to batches 
(though it's probably harder to reproduce without them). Basically the logic in 
prepend to make sure we were always generating a decreasing keys even in the 
same millisecond was broken. It was working only for the same update, but was 
broke for successive update in the same millisecond. Patch attached to fix that.

That being said, I do think that people should be very careful in assuming that 
statements in a batch are applied in order *even within the same row* because 
that's just not true in general. Batch applies everything at the same time.  
So for instance:
{noformat}
BEGIN BATCH
  UPDATE user SET name = 'Goo' WHERE userid = 1;
  UPDATE user SET name = 'Foo' WHERE userid = 1;
APPLY BATCH
{noformat}
will always (that's not quite true currently, see below) end up setting 'Goo' 
as the name because the way the reconciliation rules work, the biggest value 
wins for equal timestamp. Similarly,
{noformat}
BEGIN BATCH
  DELETE FROM user WHERE userid = 1;
  UPDATE user SET name = 'Foo' WHERE userid = 1;
APPLY BATCH
{noformat}
will always (again, see below) end up with the user deleted because on 
timestamp ties, tombstone wins.

In other words, there was indeed a bug with prepend, and append/prepend do 
respect the order in batches within the same partition key because we happen to 
process the statements of a batch in order and there is no good reason to do 
otherwise, but I don't think we should make that a guarantee either (as in, 
it's true now, it could change tomorrow, it's an implementation detail). And so 
user shouldn't rely on it, and if the order is important, they should combine 
into one statement.

Now, it is unrelated to lists, but when I said that
{noformat}
BEGIN BATCH
  UPDATE user SET name = 'Goo' WHERE userid = 1;
  UPDATE user SET name = 'Foo' WHERE userid = 1;
APPLY BATCH
{noformat}
will always end up with 'Goo', it's not quite true currently, because batches 
don't guarantee that all update will use the same timestamp (in other words, 
the result of the batch above randomly depends of the timing of the operation). 
 I think that *that* is a guarantee we should provide: that unless the 
timestamp is user provided, all statement of a batch uses the same timestamp. 
I'm attaching a second patch that implements that.


 Appending/Prepending items to list using BATCH
 --

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

 Attachments: 0001-Fix-prepends-within-same-millis.txt, 
 0002-Ensure-same-timestamp-in-batches.txt


 As I know, there is no any guarantee that commands that are inside BATCH 
 block will execute in same order, as they are stored in the BATCH block. 
 But...
 I have made two tests:
 First appends some items to the empty list, and the second one, prepends 
 items, also to the empty list. Both of them are using UPDATE commands stored 
 in the BATCH block. 
 Results of those tests are as follow:
 First:
   When appending new items to list, USING commands are executed in the 
 same order as they are stored i BATCH.
 Second:
   When prepending new items to list, USING commands are executed in 
 random order.  
 So, in other words below code:
 {code:xml}
 BEGIN BATCH
  UPDATE... list_name = list_name + [ '1' ]  
  UPDATE... list_name = list_name + [ '2' ]
  UPDATE... list_name = list_name + [ '3' ] 
 APPLY BATCH;{code}
  always results in [ '1', '2', '3' ],
  but this code:
 {code:xml}
 BEGIN BATCH
  UPDATE... list_name = [ '1' ] + list_name   
  UPDATE... list_name = [ '2' ] + list_name
  UPDATE... list_name = [ '3' ] + list_name
 APPLY BATCH;{code}
 results in randomly ordered list, like [ '2', '1', '3' ](expected result 
 is [ '3', '2', '1' ])
 So somehow, when appending items to list, commands from BATCH are executed in 
 order as they are stored, but when prepending, the order is random.

--
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-3306) Error in LeveledCompactionStrategy

2012-10-24 Thread Sylvain Lebresne (JIRA)

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

Sylvain Lebresne commented on CASSANDRA-3306:
-

Good analysis Yuki. I'm not really sure what is the right fix though. Given 
that this should very rarely happen (repair uses a much higher failure 
detection threshold than the normal one, though maybe we can increase it even 
more to make this even less likely) and that I don't seen any obvious way to 
avoid that kind of situation, maybe making DataTracker handle duplicate 
addition of a SSTableReader is the simplest thing to do. The obvious way to do 
that would be to change the View sstables List to a Set, which leads me to the 
current commentary in the code:
{noformat}
// We can't use a SortedSet here because the ordering maintained by a 
sorted set (whether or not an
// explicit comparator is provided) must be iconsistent with 
equals/i.  In particular,
// ImmutableSortedSet will ignore any objects that compare equally with 
an existing Set member.
// Obviously, dropping sstables whose max column timestamp happens to 
be equal to another's
// is not acceptable for us.  So, we use a List instead.
{noformat}
I think that comment is obsolete. Namely, it was added with CASSANDRA-2498 and 
at the time the list of sstable was kept in max timestamp order at all time. 
But since then, we've moved the sorting in max timestamp in CollationController 
directly (which is less fragile), so the order inside DataTracker doesn't 
matter anymore.

 Error in LeveledCompactionStrategy
 --

 Key: CASSANDRA-3306
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3306
 Project: Cassandra
  Issue Type: Bug
Affects Versions: 1.0.0
Reporter: Radim Kolar
Assignee: Yuki Morishita
 Attachments: 0001-CASSANDRA-3306-test.patch


 during stress testing, i always get this error making leveledcompaction 
 strategy unusable. Should be easy to reproduce - just write fast.
 ERROR [CompactionExecutor:6] 2011-10-04 15:48:52,179 
 AbstractCassandraDaemon.java (line 133) Fatal exception in thread 
 Thread[CompactionExecutor:6,5,main]
 java.lang.AssertionError
   at 
 org.apache.cassandra.db.DataTracker$View.newSSTables(DataTracker.java:580)
   at 
 org.apache.cassandra.db.DataTracker$View.replace(DataTracker.java:546)
   at org.apache.cassandra.db.DataTracker.replace(DataTracker.java:268)
   at 
 org.apache.cassandra.db.DataTracker.replaceCompactedSSTables(DataTracker.java:232)
   at 
 org.apache.cassandra.db.ColumnFamilyStore.replaceCompactedSSTables(ColumnFamilyStore.java:960)
   at 
 org.apache.cassandra.db.compaction.CompactionTask.execute(CompactionTask.java:199)
   at 
 org.apache.cassandra.db.compaction.LeveledCompactionTask.execute(LeveledCompactionTask.java:47)
   at 
 org.apache.cassandra.db.compaction.CompactionManager$1.call(CompactionManager.java:131)
   at 
 org.apache.cassandra.db.compaction.CompactionManager$1.call(CompactionManager.java:114)
   at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
   at java.util.concurrent.FutureTask.run(FutureTask.java:138)
   at 
 java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
   at 
 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
   at java.lang.Thread.run(Thread.java:662)
 and this is in json data for table:
 {
   generations : [ {
 generation : 0,
 members : [ 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 
 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484 ]
   }, {
 generation : 1,
 members : [ ]
   }, {
 generation : 2,
 members : [ ]
   }, {
 generation : 3,
 members : [ ]
   }, {
 generation : 4,
 members : [ ]
   }, {
 generation : 5,
 members : [ ]
   }, {
 generation : 6,
 members : [ ]
   }, {
 generation : 7,
 members : [ ]
   } ]
 }

--
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-4179) Add more general support for composites (to row key, column value)

2012-10-24 Thread Edward Capriolo (JIRA)

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

Edward Capriolo commented on CASSANDRA-4179:


I see that I am probably too late to this discussion, but did want to point out 
we may be mis-using  the term primary-key here. In my mind the CQL3 compound 
primary key is more like the M$ SQL Cluster index, which controls sorting.

This syntax might do more to say These fields are the primary key and these 
fields are the ones we sort by.
{noformat}
CREATE TABLE timeline (
name text,
month int,
ts timestamp,
value text,
PRIMARY KEY (name, month),
clustered index (name,month,tx)
)
{noformat}


 Add more general support for composites (to row key, column value)
 --

 Key: CASSANDRA-4179
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4179
 Project: Cassandra
  Issue Type: Sub-task
  Components: API
Reporter: Sylvain Lebresne
Assignee: Sylvain Lebresne
Priority: Minor
  Labels: cql3
 Fix For: 1.2.0 beta 1

 Attachments: 4179-2.txt, 4179.txt


 Currently CQL3 have a nice syntax for using composites in the column name 
 (it's more than that in fact, it creates a whole new abstraction but let's 
 say I'm talking implementation here). There is however 2 other place where 
 composites could be used (again implementation wise): the row key and the 
 column value. This ticket proposes to explore which of those make sense for 
 CQL3 and how.
 For the row key, I really think that CQL support makes sense. It's very 
 common (and useful) to want to stuff composite information in a row key. 
 Sharding a time serie (CASSANDRA-4176) is probably the best example but there 
 is other.
 For the column value it is less clear. CQL3 makes it very transparent and 
 convenient to store multiple related values into multiple columns so maybe 
 composites in a column value is much less needed. I do still see two cases 
 for which it could be handy:
 # to save some disk/memory space, if you do know it makes no sense to 
 insert/read two value separatly.
 # if you want to enforce that two values should not be inserted separatly. 
 I.e. to enforce a form of constraint to avoid programatic error.
 Those are not widely useful things, but my reasoning is that if whatever 
 syntax we come up for grouping row key in a composite trivially extends to 
 column values, why not support it.
 As for syntax I have 3 suggestions (that are just that, suggestions):
 # If we only care about allowing grouping for row keys:
 {noformat}
 CREATE TABLE timeline (
 name text,
 month int,
 ts timestamp,
 value text,
 PRIMARY KEY ((name, month), ts)
 )
 {noformat}
 # A syntax that could work for both grouping in row key and colum value:
 {noformat}
 CREATE TABLE timeline (
 name text,
 month int,
 ts timestamp,
 value1 text,
 value2 text,
 GROUP (name, month) as key,
 GROUP (value1, value2),
 PRIMARY KEY (key, ts)
 )
 {noformat}
 # An alternative to the preceding one:
 {noformat}
 CREATE TABLE timeline (
 name text,
 month int,
 ts timestamp,
 value1 text,
 value2 text,
 GROUP (name, month) as key,
 GROUP (value1, value2),
 PRIMARY KEY (key, ts)
 ) WITH GROUP (name, month) AS key
AND GROUP (value1, value2)
 {noformat}

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


[jira] [Created] (CASSANDRA-4853) composite row key

2012-10-24 Thread cristina rodriguez (JIRA)
cristina rodriguez created CASSANDRA-4853:
-

 Summary: composite row key
 Key: CASSANDRA-4853
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4853
 Project: Cassandra
  Issue Type: Task
  Components: Documentation  website
Affects Versions: 1.1.5
Reporter: cristina rodriguez


I have a columnfamily with a composite key,

create column family MyCF
with key_validation_class = 'CompositeType(UTF8Type, UTF8Type)'
and comparator = 'CompositeType(UTF8Type, UTF8Type)'
and default_validation_class='CompositeType(UTF8Type, UTF8Type)'
   
;

i store the row key with the value 1:1 ,1:2,1:3

---
RowKey: 1:1
= (column=colum1, value=value1, timestamp=1351093372962000)
---
RowKey: 2:2
= (column=colum1, value=value1, timestamp=1351093411137000)
---
RowKey: 1:3
= (column=colum1, value=value1, timestamp=135109338582)
---
RowKey: 2:1
= (column=colum1, value=value1, timestamp=1351093401162000)
---
RowKey: 1:2
= (column=colum1, value=value1, timestamp=1351093379274000)
---
RowKey: 2:3
= (column=colum1, value=value1, timestamp=1351093421393000)

i want to get all the row that estar wit 1,with cql  whit all that i read i 
thought it could be posible, but i coudn´t do it. 
i thought it would work with
select * from MyCF where key'1:';
any idea or example? 

--
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-4854) Can not select the Schema table

2012-10-24 Thread Edward Capriolo (JIRA)
Edward Capriolo created CASSANDRA-4854:
--

 Summary: Can not select the Schema table
 Key: CASSANDRA-4854
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4854
 Project: Cassandra
  Issue Type: Bug
Reporter: Edward Capriolo
Priority: Minor


Some system tables can be selected with data. Some return 0 rows. Schema seems 
impossible to select because it's name is Schema

{noformat}
cqlsh:system select * from schema_keyspaces;
 keyspace_name | durable_writes | strategy_class
   | strategy_options
---++--+
  testkeyspace |   True |  
org.apache.cassandra.locator.SimpleStrategy | {replication_factor:1}
testks |   True | 
org.apache.cassandra.locator.NetworkTopologyStrategy |
{datacenter1:1}

cqlsh:system select * from Schema;
Bad Request: line 1:14 no viable alternative at input 'Schema'
cqlsh:system select * from Schema;
cqlsh:system select * from `Schema`;
Invalid syntax at line 1, char 15
  select * from `Schema`;
^
cqlsh:system select * from `Schema`;
Invalid syntax at line 1, char 15
  select * from `Schema`;
^
cqlsh:system select * from 'Schema';
Bad Request: line 1:14 no viable alternative at input 'Schema'
Perhaps you meant to use CQL 2? Try using the -2 option when starting cqlsh.
{noformat}

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


[jira] [Commented] (CASSANDRA-4443) shuffle utility for vnodes

2012-10-24 Thread Brandon Williams (JIRA)

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

Brandon Williams commented on CASSANDRA-4443:
-

Hmm, I'm seeing this when trying to create:

{noformat}

Exception in thread main java.lang.RuntimeException: 
InvalidRequestException(why:no keyspace has been specified)
at org.apache.cassandra.tools.Shuffle.executeCqlQuery(Shuffle.java:532)
at org.apache.cassandra.tools.Shuffle.shuffle(Shuffle.java:375)
at org.apache.cassandra.tools.Shuffle.main(Shuffle.java:693)
Caused by: InvalidRequestException(why:no keyspace has been specified)
at 
org.apache.cassandra.thrift.Cassandra$execute_cql_query_result.read(Cassandra.java:36625)
at org.apache.thrift.TServiceClient.receiveBase(TServiceClient.java:78)
at 
org.apache.cassandra.thrift.Cassandra$Client.recv_execute_cql_query(Cassandra.java:1525)
at 
org.apache.cassandra.thrift.Cassandra$Client.execute_cql_query(Cassandra.java:1511)
at 
org.apache.cassandra.tools.CassandraClient.execute_cql_query(Shuffle.java:748)
at org.apache.cassandra.tools.Shuffle.executeCqlQuery(Shuffle.java:518)
... 2 more
{noformat}

 shuffle utility for vnodes
 --

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


 As mentioned on CASSANDRA-4127, for upgrades we need a 'shuffle' command to 
 split up the contiguous ranges.
 List discussion: http://thread.gmane.org/gmane.comp.db.cassandra.devel/6799
 _Edit0: Linked in mailing list discussion._
 _Edit1: Linked in patch information._
 _Edit2: Updated patch links._
 \\
 h3. Patches
 ||Compare||Raw diff||Description||
 |[060_shuffle_utility|https://github.com/acunu/cassandra/compare/top-bases/p/4443/060_shuffle_utility...p/4443/060_shuffle_utility]|[060_shuffle_utility.patch|https://github.com/acunu/cassandra/compare/top-bases/p/4443/060_shuffle_utility...p/4443/060_shuffle_utility.diff]|{{shuffle}}
  util to randomly remap ranges|
 
 _Note: These are branches managed with TopGit. If you are applying the patch 
 output manually, you will either need to filter the TopGit metadata files 
 (i.e. {{wget -O - url | filterdiff -x*.topdeps -x*.topmsg | patch -p1}}), 
 or remove them afterward ({{rm .topmsg .topdeps}})._

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


[jira] [Commented] (CASSANDRA-3799) cqlsh: ASSUME should also change how values are sent to cassandra

2012-10-24 Thread paul cannon (JIRA)

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

paul cannon commented on CASSANDRA-3799:


Just to clarify for others, it might not be as bad as it sounds, since cqlsh 
already parses every insert, update, and batch, including contained statements. 
The difficulty is just in making sure that cqlsh can marshal textual values 
(from user input) and then unmarshal them again, both in the same way that 
Cassandra will do for the same contexts.

 cqlsh: ASSUME should also change how values are sent to cassandra
 -

 Key: CASSANDRA-3799
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3799
 Project: Cassandra
  Issue Type: New Feature
  Components: Tools
Affects Versions: 1.0.3
Reporter: paul cannon
Assignee: Aleksey Yeschenko
Priority: Minor
  Labels: cqlsh
 Fix For: 1.3


 cqlsh's ASSUME command currently only changes how query *return* values are 
 deserialized, and never transforms user CQL text before sending to Cassandra.
 Apparently cassandra-cli also changes how values are interpreted and 
 marshaled for Cassandra, so user expectation is that cqlsh should also do 
 this.

--
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-4071) Topology changes can lead to bad counters (at RF=1)

2012-10-24 Thread Sylvain Lebresne (JIRA)

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

Sylvain Lebresne commented on CASSANDRA-4071:
-

I'm beginning to think we've made a mistake in the counters design. Namely, 
when we write a new increment to the leader, we write the increment, then 
read (which merge the new increments to the previous ones), then send that to 
the other replica. But that's why we have all the delta business that is the 
root cause for this and for CASSANDRA-4417 (and we're not even sure we 
understand all the case that can produce the error message of CASSANDRA-4417).

An alternative would be instead that when the leader receives a new increment, 
it reads, apply the increment to the value read, and write the result. If we do 
that, we don't need delta anymore, fixing this issue as well as CASSANDRA-4417. 
 We also don't ever have to renew nodeId, so we also fix the problem of 
increasing counter context. And overall we greatly simplify the code. There 
would be clear performance downsides however:
# we will have to lock during the read, apply increment, write result dance. 
# we still read before the first write, so replicate_on_write won't be an 
option anymore (I've always been clear how I personally feel about this option 
in the first place so that would almost be an advantage in my opinion, but some 
disagree). But it will also increase the latency of writes at CL.ONE.

But even if we decide to go that route, another thing to go into account is 
that I don't know how to support the upgrade to this new way of doing things 
without requiring a major compaction on upgrade (which is particularly a 
problem for LeveledCompaction because we don't even know how to major compact).

So definitively not perfect, but the best idea I've had so far.


 Topology changes can lead to bad counters (at RF=1)
 ---

 Key: CASSANDRA-4071
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4071
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Affects Versions: 1.0.0
Reporter: Sylvain Lebresne
  Labels: counters

 A counter is broken into shards (partitions), each shard being 'owned' by a 
 given replica (meaning that only this replica will increment that shard).  
 For a given node A, the resolution of 2 shards (having the same owner) 
 follows the following rules:
 * if the shards are owned by A, then sum the values (in the original patch, 
 'owned by A' was based on the machine IP address, in the current code, it's 
 based on the shard having a delta flag but the principle is the same)
 * otherwise, keep the maximum value (based on the shards clocks)
 During topology changes (boostrap/move/decommission), we transfer data from A 
 to B, but the shards owned by A are not owned by B (and we cannot make them 
 owned by B because during those operations (boostrap, ...) a given shard 
 would be owned by A and B which would break counters). But this means that B 
 won't interpret the streamed shards correctly.
 Concretely, if A receives a number of counter increments that end up in 
 different sstables (the shards should thus be summed) and then those 
 increments are streamed to B as part of boostrap, B will not sum the 
 increments but use the clocks to keep the maximum value.
 I've pushed a test that show the breakeage at 
 https://github.com/riptano/cassandra-dtest/commits/counters_test (the test 
 needs CASSANDRA-4070 to work correctly).
 Note that in practice, replication will hide this (even though B will have 
 the bad value after the boostrap, read or read/repair from the other replica 
 will repair it). This is a problem for RF=1 however.
 Another problem is that during repair, a node won't correctly repair other 
 nodes on it's own shards (unless everything is fully compacted).

--
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-4854) Can not select the Schema table

2012-10-24 Thread Sylvain Lebresne (JIRA)

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

Sylvain Lebresne resolved CASSANDRA-4854.
-

Resolution: Not A Problem

Schema is the old-style, pre-1.1 schema table so as soon as you've correctly 
started a 1.1 it is expected to be empty. So
{noformat}
select * from Schema
{noformat}
is correct and is working as expected.

The new-style schema tables are: schema_keyspaces, schema_columnfamilies and 
schema_columns.

 Can not select the Schema table
 -

 Key: CASSANDRA-4854
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4854
 Project: Cassandra
  Issue Type: Bug
Reporter: Edward Capriolo
Priority: Minor

 Some system tables can be selected with data. Some return 0 rows. Schema 
 seems impossible to select because it's name is Schema
 {noformat}
 cqlsh:system select * from schema_keyspaces;
  keyspace_name | durable_writes | strategy_class  
  | strategy_options
 ---++--+
   testkeyspace |   True |  
 org.apache.cassandra.locator.SimpleStrategy | {replication_factor:1}
 testks |   True | 
 org.apache.cassandra.locator.NetworkTopologyStrategy |
 {datacenter1:1}
 cqlsh:system select * from Schema;
 Bad Request: line 1:14 no viable alternative at input 'Schema'
 cqlsh:system select * from Schema;
 cqlsh:system select * from `Schema`;
 Invalid syntax at line 1, char 15
   select * from `Schema`;
 ^
 cqlsh:system select * from `Schema`;
 Invalid syntax at line 1, char 15
   select * from `Schema`;
 ^
 cqlsh:system select * from 'Schema';
 Bad Request: line 1:14 no viable alternative at input 'Schema'
 Perhaps you meant to use CQL 2? Try using the -2 option when starting cqlsh.
 {noformat}

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


[jira] [Commented] (CASSANDRA-4837) IllegalStateException when upgrading schema

2012-10-24 Thread Wade Simmons (JIRA)

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

Wade Simmons commented on CASSANDRA-4837:
-

AL: I haven't been able to get it to work yet. Still trying to find a solution 
that works.

 IllegalStateException when upgrading schema
 ---

 Key: CASSANDRA-4837
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4837
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Affects Versions: 1.1.6
 Environment: Linux
Reporter: Wade Simmons
Assignee: Pavel Yaskevich

 I am upgrading a cluster from 1.1.2 to 1.1.6. When restarting a node with new 
 code, I am seeing this exception repeat in the logs:
 {code}
 ERROR [InternalResponseStage:21] 2012-10-19 00:41:26,794 
 AbstractCassandraDaemon.java (line 135) Exception in thread 
 Thread[InternalResponseStage:21,5,main]
 java.lang.IllegalStateException: One row required, 0 found
 at 
 org.apache.cassandra.cql3.UntypedResultSet.one(UntypedResultSet.java:50)
 at 
 org.apache.cassandra.config.KSMetaData.fromSchema(KSMetaData.java:258)
 at 
 org.apache.cassandra.db.DefsTable.mergeKeyspaces(DefsTable.java:406)
 at org.apache.cassandra.db.DefsTable.mergeSchema(DefsTable.java:355)
 at 
 org.apache.cassandra.db.DefsTable.mergeRemoteSchema(DefsTable.java:329)
 at 
 org.apache.cassandra.service.MigrationManager$MigrationTask$1.response(MigrationManager.java:449)
 at 
 org.apache.cassandra.net.ResponseVerbHandler.doVerb(ResponseVerbHandler.java:45)
 at 
 org.apache.cassandra.net.MessageDeliveryTask.run(MessageDeliveryTask.java:59)
 at 
 java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
 at 
 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
 at java.lang.Thread.run(Thread.java:662)
 {code}
 I added in some debugging logging to see what Row it was trying to load, and 
 I see this:
 {code}
 Unable to load keyspace schema: 
 Row(key=DecoratedKey(112573196966143652100562749464385838776, 
 5365676d656e7473496e746567726174696f6e54657374), 
 cf=ColumnFamily(schema_keyspaces -deleted at 1350665377628000- []))
 {code}
 The hex key translates to a schema that exists in schema_keyspaces when I 
 query on the rest of the cluster. I tried restarting one of the other nodes 
 without upgrading the jar and it restarted without exceptions.

--
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-4854) Can not select the Schema table

2012-10-24 Thread Edward Capriolo (JIRA)

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

Edward Capriolo edited comment on CASSANDRA-4854 at 10/24/12 5:48 PM:
--

You are right my mistake. I noticed something else. It seems like if you 
describe an empty keyspace you get this.

{noformat}
cqlsh:system describe schema;
USE testkeyspace;

expected string or buffer
{noformat}

Should we open another ticket for this? this is 1.2.0-beta btw.

  was (Author: appodictic):
You are right my mistake. I noticed something else. It seems like if you 
describe an empty keyspace you get this.

{noformat}
cqlsh:system describe schema;
USE testkeyspace;

expected string or buffer
{noformat}

Should we open another ticket for this?
  
 Can not select the Schema table
 -

 Key: CASSANDRA-4854
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4854
 Project: Cassandra
  Issue Type: Bug
Reporter: Edward Capriolo
Priority: Minor

 Some system tables can be selected with data. Some return 0 rows. Schema 
 seems impossible to select because it's name is Schema
 {noformat}
 cqlsh:system select * from schema_keyspaces;
  keyspace_name | durable_writes | strategy_class  
  | strategy_options
 ---++--+
   testkeyspace |   True |  
 org.apache.cassandra.locator.SimpleStrategy | {replication_factor:1}
 testks |   True | 
 org.apache.cassandra.locator.NetworkTopologyStrategy |
 {datacenter1:1}
 cqlsh:system select * from Schema;
 Bad Request: line 1:14 no viable alternative at input 'Schema'
 cqlsh:system select * from Schema;
 cqlsh:system select * from `Schema`;
 Invalid syntax at line 1, char 15
   select * from `Schema`;
 ^
 cqlsh:system select * from `Schema`;
 Invalid syntax at line 1, char 15
   select * from `Schema`;
 ^
 cqlsh:system select * from 'Schema';
 Bad Request: line 1:14 no viable alternative at input 'Schema'
 Perhaps you meant to use CQL 2? Try using the -2 option when starting cqlsh.
 {noformat}

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


[jira] [Commented] (CASSANDRA-4854) Can not select the Schema table

2012-10-24 Thread Edward Capriolo (JIRA)

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

Edward Capriolo commented on CASSANDRA-4854:


You are right my mistake. I noticed something else. It seems like if you 
describe an empty keyspace you get this.

{noformat}
cqlsh:system describe schema;
USE testkeyspace;

expected string or buffer
{noformat}

Should we open another ticket for this?

 Can not select the Schema table
 -

 Key: CASSANDRA-4854
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4854
 Project: Cassandra
  Issue Type: Bug
Reporter: Edward Capriolo
Priority: Minor

 Some system tables can be selected with data. Some return 0 rows. Schema 
 seems impossible to select because it's name is Schema
 {noformat}
 cqlsh:system select * from schema_keyspaces;
  keyspace_name | durable_writes | strategy_class  
  | strategy_options
 ---++--+
   testkeyspace |   True |  
 org.apache.cassandra.locator.SimpleStrategy | {replication_factor:1}
 testks |   True | 
 org.apache.cassandra.locator.NetworkTopologyStrategy |
 {datacenter1:1}
 cqlsh:system select * from Schema;
 Bad Request: line 1:14 no viable alternative at input 'Schema'
 cqlsh:system select * from Schema;
 cqlsh:system select * from `Schema`;
 Invalid syntax at line 1, char 15
   select * from `Schema`;
 ^
 cqlsh:system select * from `Schema`;
 Invalid syntax at line 1, char 15
   select * from `Schema`;
 ^
 cqlsh:system select * from 'Schema';
 Bad Request: line 1:14 no viable alternative at input 'Schema'
 Perhaps you meant to use CQL 2? Try using the -2 option when starting cqlsh.
 {noformat}

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


[jira] [Commented] (CASSANDRA-4837) IllegalStateException when upgrading schema

2012-10-24 Thread Pavel Yaskevich (JIRA)

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

Pavel Yaskevich commented on CASSANDRA-4837:


[~wadey] Can you please attach schema_* directories here so I can take a look 
what is going on there?

 IllegalStateException when upgrading schema
 ---

 Key: CASSANDRA-4837
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4837
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Affects Versions: 1.1.6
 Environment: Linux
Reporter: Wade Simmons
Assignee: Pavel Yaskevich

 I am upgrading a cluster from 1.1.2 to 1.1.6. When restarting a node with new 
 code, I am seeing this exception repeat in the logs:
 {code}
 ERROR [InternalResponseStage:21] 2012-10-19 00:41:26,794 
 AbstractCassandraDaemon.java (line 135) Exception in thread 
 Thread[InternalResponseStage:21,5,main]
 java.lang.IllegalStateException: One row required, 0 found
 at 
 org.apache.cassandra.cql3.UntypedResultSet.one(UntypedResultSet.java:50)
 at 
 org.apache.cassandra.config.KSMetaData.fromSchema(KSMetaData.java:258)
 at 
 org.apache.cassandra.db.DefsTable.mergeKeyspaces(DefsTable.java:406)
 at org.apache.cassandra.db.DefsTable.mergeSchema(DefsTable.java:355)
 at 
 org.apache.cassandra.db.DefsTable.mergeRemoteSchema(DefsTable.java:329)
 at 
 org.apache.cassandra.service.MigrationManager$MigrationTask$1.response(MigrationManager.java:449)
 at 
 org.apache.cassandra.net.ResponseVerbHandler.doVerb(ResponseVerbHandler.java:45)
 at 
 org.apache.cassandra.net.MessageDeliveryTask.run(MessageDeliveryTask.java:59)
 at 
 java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
 at 
 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
 at java.lang.Thread.run(Thread.java:662)
 {code}
 I added in some debugging logging to see what Row it was trying to load, and 
 I see this:
 {code}
 Unable to load keyspace schema: 
 Row(key=DecoratedKey(112573196966143652100562749464385838776, 
 5365676d656e7473496e746567726174696f6e54657374), 
 cf=ColumnFamily(schema_keyspaces -deleted at 1350665377628000- []))
 {code}
 The hex key translates to a schema that exists in schema_keyspaces when I 
 query on the rest of the cluster. I tried restarting one of the other nodes 
 without upgrading the jar and it restarted without exceptions.

--
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-4842) DateType in Column MetaData causes server crash

2012-10-24 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis commented on CASSANDRA-4842:
---

+1

 DateType in Column MetaData causes server crash
 ---

 Key: CASSANDRA-4842
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4842
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Affects Versions: 1.1.0
 Environment: All
Reporter: Russell Bradberry
Assignee: Sylvain Lebresne
Priority: Minor
 Fix For: 1.1.7, 1.2.0

 Attachments: 4842.txt


 when creating a column family with column metadata containing a date, there 
 is a server crash that will prevent startup.
 To recreate from the cli:
 {code}
 create keyspace test;
 use test;
 create column family foo
   with column_type = 'Standard'
   and comparator = 'CompositeType(LongType,DateType)'
   and default_validation_class = 'UTF8Type'
   and key_validation_class = 'UTF8Type'
   and column_metadata = [ 
 { column_name : '1234:1350695443433', validation_class : BooleanType} 
   ];
 {code}
 Produces this error in the logs:
 {code}
 ERROR 21:11:18,795 Error occurred during processing of message.
 java.lang.RuntimeException: java.util.concurrent.ExecutionException: 
 org.apache.cassandra.db.marshal.MarshalException: unable to coerce 
 '2012-10-19 21' to a  formatted date (long)
   at 
 org.apache.cassandra.utils.FBUtilities.waitOnFuture(FBUtilities.java:373)
   at 
 org.apache.cassandra.service.MigrationManager.announce(MigrationManager.java:194)
   at 
 org.apache.cassandra.service.MigrationManager.announceNewColumnFamily(MigrationManager.java:141)
   at 
 org.apache.cassandra.thrift.CassandraServer.system_add_column_family(CassandraServer.java:931)
   at 
 org.apache.cassandra.thrift.Cassandra$Processor$system_add_column_family.getResult(Cassandra.java:3410)
   at 
 org.apache.cassandra.thrift.Cassandra$Processor$system_add_column_family.getResult(Cassandra.java:3398)
   at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:32)
   at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:34)
   at 
 org.apache.cassandra.thrift.CustomTThreadPoolServer$WorkerProcess.run(CustomTThreadPoolServer.java:186)
   at 
 java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
   at 
 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
   at java.lang.Thread.run(Thread.java:680)
 Caused by: java.util.concurrent.ExecutionException: 
 org.apache.cassandra.db.marshal.MarshalException: unable to coerce 
 '2012-10-19 21' to a  formatted date (long)
   at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:222)
   at java.util.concurrent.FutureTask.get(FutureTask.java:83)
   at 
 org.apache.cassandra.utils.FBUtilities.waitOnFuture(FBUtilities.java:369)
   ... 11 more
 Caused by: org.apache.cassandra.db.marshal.MarshalException: unable to coerce 
 '2012-10-19 21' to a  formatted date (long)
   at 
 org.apache.cassandra.db.marshal.DateType.dateStringToTimestamp(DateType.java:117)
   at org.apache.cassandra.db.marshal.DateType.fromString(DateType.java:85)
   at 
 org.apache.cassandra.db.marshal.AbstractCompositeType.fromString(AbstractCompositeType.java:213)
   at 
 org.apache.cassandra.config.ColumnDefinition.fromSchema(ColumnDefinition.java:257)
   at 
 org.apache.cassandra.config.CFMetaData.addColumnDefinitionSchema(CFMetaData.java:1318)
   at 
 org.apache.cassandra.config.CFMetaData.fromSchema(CFMetaData.java:1250)
   at 
 org.apache.cassandra.config.KSMetaData.deserializeColumnFamilies(KSMetaData.java:299)
   at 
 org.apache.cassandra.db.DefsTable.mergeColumnFamilies(DefsTable.java:434)
   at org.apache.cassandra.db.DefsTable.mergeSchema(DefsTable.java:346)
   at 
 org.apache.cassandra.service.MigrationManager$1.call(MigrationManager.java:217)
   at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
   at java.util.concurrent.FutureTask.run(FutureTask.java:138)
   ... 3 more
 Caused by: java.text.ParseException: Unable to parse the date: 2012-10-19 21
   at org.apache.commons.lang.time.DateUtils.parseDate(DateUtils.java:285)
   at 
 org.apache.cassandra.db.marshal.DateType.dateStringToTimestamp(DateType.java:113)
   ... 14 more
 ERROR 21:11:18,795 Exception in thread Thread[MigrationStage:1,5,main]
 org.apache.cassandra.db.marshal.MarshalException: unable to coerce 
 '2012-10-19 21' to a  formatted date (long)
   at 
 org.apache.cassandra.db.marshal.DateType.dateStringToTimestamp(DateType.java:117)
   at org.apache.cassandra.db.marshal.DateType.fromString(DateType.java:85)
 

git commit: Fix CompositeType.{get/from}String methods

2012-10-24 Thread slebresne
Updated Branches:
  refs/heads/cassandra-1.1 95fb613bf - 5d5207b91


Fix CompositeType.{get/from}String methods

patch by slebresne; reviewed by jbellis for CASSANDRA-4842


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

Branch: refs/heads/cassandra-1.1
Commit: 5d5207b9111ddbc576d67153175e5a6e27994b73
Parents: 95fb613
Author: Sylvain Lebresne sylv...@datastax.com
Authored: Wed Oct 24 20:35:32 2012 +0200
Committer: Sylvain Lebresne sylv...@datastax.com
Committed: Wed Oct 24 20:35:32 2012 +0200

--
 CHANGES.txt|1 +
 .../db/marshal/AbstractCompositeType.java  |  115 ++-
 .../cassandra/db/marshal/CompositeTypeTest.java|   35 +-
 3 files changed, 115 insertions(+), 36 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/5d5207b9/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index f309ef1..95feb9b 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -6,6 +6,7 @@
  * fix wrong leveled compaction progress calculation (CASSANDRA-4807)
  * add a close() method to CRAR to prevent leaking file descriptors 
(CASSANDRA-4820)
  * fix potential infinite loop in get_count (CASSANDRA-4833)
+ * fix compositeType.{get/from}String methods (CASSANDRA-4842)
 
 1.1.6
  * Wait for writes on synchronous read digest mismatch (CASSANDRA-4792)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/5d5207b9/src/java/org/apache/cassandra/db/marshal/AbstractCompositeType.java
--
diff --git 
a/src/java/org/apache/cassandra/db/marshal/AbstractCompositeType.java 
b/src/java/org/apache/cassandra/db/marshal/AbstractCompositeType.java
index dac94e2..5c58c8e 100644
--- a/src/java/org/apache/cassandra/db/marshal/AbstractCompositeType.java
+++ b/src/java/org/apache/cassandra/db/marshal/AbstractCompositeType.java
@@ -20,6 +20,7 @@ package org.apache.cassandra.db.marshal;
 
 import java.nio.ByteBuffer;
 import java.util.ArrayList;
+import java.util.Collections;
 import java.util.List;
 
 /**
@@ -125,33 +126,6 @@ public abstract class AbstractCompositeType extends 
AbstractTypeByteBuffer
 return l.toArray(new ByteBuffer[l.size()]);
 }
 
-public String getString(ByteBuffer bytes)
-{
-StringBuilder sb = new StringBuilder();
-ByteBuffer bb = bytes.duplicate();
-int i = 0;
-
-while (bb.remaining()  0)
-{
-if (bb.remaining() != bytes.remaining())
-sb.append(:);
-
-AbstractType? comparator = getAndAppendNextComparator(i, bb, sb);
-ByteBuffer value = getWithShortLength(bb);
-
-sb.append(comparator.getString(value));
-
-byte b = bb.get();
-if (b != 0)
-{
-sb.append(:!);
-break;
-}
-++i;
-}
-return sb.toString();
-}
-
 public static class CompositeComponent
 {
 public AbstractType comparator;
@@ -185,16 +159,87 @@ public abstract class AbstractCompositeType extends 
AbstractTypeByteBuffer
 }
 
 /*
- * FIXME: this would break if some of the component string representation
- * contains ':'. None of our current comparator do so, so this is probably
- * not an urgent matter, but this could break for custom comparator.
- * (DynamicCompositeType would break on '@' too)
+ * Escapes all occurences of the ':' character from the input, replacing 
them by \:.
+ * Furthermore, if the last character is '\' or '!', a '!' is appended.
+ */
+static String escape(String input)
+{
+if (input.isEmpty())
+return input;
+
+String res = input.replaceAll(:, :);
+char last = res.charAt(res.length() - 1);
+return last == '\\' || last == '!' ? res + '!' : res;
+}
+
+/*
+ * Reverses the effect of espace().
+ * Replaces all occurences of \: by : and remove last character if it 
is '!'.
  */
+static String unescape(String input)
+{
+if (input.isEmpty())
+return input;
+
+String res = input.replaceAll(:, :);
+char last = res.charAt(res.length() - 1);
+return last == '!' ? res.substring(0, res.length() - 1) : res;
+}
+
+/*
+ * Split the input on character ':', unless the previous character is '\'.
+ */
+static ListString split(String input)
+{
+if (input.isEmpty())
+return Collections.StringemptyList();
+
+ListString res = new 

[2/2] git commit: Fix CompositeType.{get/from}String methods

2012-10-24 Thread slebresne
Fix CompositeType.{get/from}String methods

patch by slebresne; reviewed by jbellis for CASSANDRA-4842


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

Branch: refs/heads/trunk
Commit: 5d5207b9111ddbc576d67153175e5a6e27994b73
Parents: 95fb613
Author: Sylvain Lebresne sylv...@datastax.com
Authored: Wed Oct 24 20:35:32 2012 +0200
Committer: Sylvain Lebresne sylv...@datastax.com
Committed: Wed Oct 24 20:35:32 2012 +0200

--
 CHANGES.txt|1 +
 .../db/marshal/AbstractCompositeType.java  |  115 ++-
 .../cassandra/db/marshal/CompositeTypeTest.java|   35 +-
 3 files changed, 115 insertions(+), 36 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/5d5207b9/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index f309ef1..95feb9b 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -6,6 +6,7 @@
  * fix wrong leveled compaction progress calculation (CASSANDRA-4807)
  * add a close() method to CRAR to prevent leaking file descriptors 
(CASSANDRA-4820)
  * fix potential infinite loop in get_count (CASSANDRA-4833)
+ * fix compositeType.{get/from}String methods (CASSANDRA-4842)
 
 1.1.6
  * Wait for writes on synchronous read digest mismatch (CASSANDRA-4792)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/5d5207b9/src/java/org/apache/cassandra/db/marshal/AbstractCompositeType.java
--
diff --git 
a/src/java/org/apache/cassandra/db/marshal/AbstractCompositeType.java 
b/src/java/org/apache/cassandra/db/marshal/AbstractCompositeType.java
index dac94e2..5c58c8e 100644
--- a/src/java/org/apache/cassandra/db/marshal/AbstractCompositeType.java
+++ b/src/java/org/apache/cassandra/db/marshal/AbstractCompositeType.java
@@ -20,6 +20,7 @@ package org.apache.cassandra.db.marshal;
 
 import java.nio.ByteBuffer;
 import java.util.ArrayList;
+import java.util.Collections;
 import java.util.List;
 
 /**
@@ -125,33 +126,6 @@ public abstract class AbstractCompositeType extends 
AbstractTypeByteBuffer
 return l.toArray(new ByteBuffer[l.size()]);
 }
 
-public String getString(ByteBuffer bytes)
-{
-StringBuilder sb = new StringBuilder();
-ByteBuffer bb = bytes.duplicate();
-int i = 0;
-
-while (bb.remaining()  0)
-{
-if (bb.remaining() != bytes.remaining())
-sb.append(:);
-
-AbstractType? comparator = getAndAppendNextComparator(i, bb, sb);
-ByteBuffer value = getWithShortLength(bb);
-
-sb.append(comparator.getString(value));
-
-byte b = bb.get();
-if (b != 0)
-{
-sb.append(:!);
-break;
-}
-++i;
-}
-return sb.toString();
-}
-
 public static class CompositeComponent
 {
 public AbstractType comparator;
@@ -185,16 +159,87 @@ public abstract class AbstractCompositeType extends 
AbstractTypeByteBuffer
 }
 
 /*
- * FIXME: this would break if some of the component string representation
- * contains ':'. None of our current comparator do so, so this is probably
- * not an urgent matter, but this could break for custom comparator.
- * (DynamicCompositeType would break on '@' too)
+ * Escapes all occurences of the ':' character from the input, replacing 
them by \:.
+ * Furthermore, if the last character is '\' or '!', a '!' is appended.
+ */
+static String escape(String input)
+{
+if (input.isEmpty())
+return input;
+
+String res = input.replaceAll(:, :);
+char last = res.charAt(res.length() - 1);
+return last == '\\' || last == '!' ? res + '!' : res;
+}
+
+/*
+ * Reverses the effect of espace().
+ * Replaces all occurences of \: by : and remove last character if it 
is '!'.
  */
+static String unescape(String input)
+{
+if (input.isEmpty())
+return input;
+
+String res = input.replaceAll(:, :);
+char last = res.charAt(res.length() - 1);
+return last == '!' ? res.substring(0, res.length() - 1) : res;
+}
+
+/*
+ * Split the input on character ':', unless the previous character is '\'.
+ */
+static ListString split(String input)
+{
+if (input.isEmpty())
+return Collections.StringemptyList();
+
+ListString res = new ArrayListString();
+int prev = 0;
+for (int i = 0; i  input.length(); i++)
+   

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

2012-10-24 Thread slebresne
Updated Branches:
  refs/heads/trunk 95f94a4da - c86a7f8ca


Merge branch 'cassandra-1.1' into trunk

Conflicts:
src/java/org/apache/cassandra/db/marshal/AbstractCompositeType.java


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

Branch: refs/heads/trunk
Commit: c86a7f8ca5cbd48f6fba94599449ed17107d8b23
Parents: 95f94a4 5d5207b
Author: Sylvain Lebresne sylv...@datastax.com
Authored: Wed Oct 24 20:41:08 2012 +0200
Committer: Sylvain Lebresne sylv...@datastax.com
Committed: Wed Oct 24 20:41:08 2012 +0200

--
 CHANGES.txt|1 +
 .../db/marshal/AbstractCompositeType.java  |  115 ++-
 .../cassandra/db/marshal/CompositeTypeTest.java|   35 +-
 3 files changed, 115 insertions(+), 36 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/c86a7f8c/CHANGES.txt
--
diff --cc CHANGES.txt
index faf4e31,95feb9b..e6c1d1a
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -43,76 -6,8 +43,77 @@@ Merged from 1.1
   * fix wrong leveled compaction progress calculation (CASSANDRA-4807)
   * add a close() method to CRAR to prevent leaking file descriptors 
(CASSANDRA-4820)
   * fix potential infinite loop in get_count (CASSANDRA-4833)
+  * fix compositeType.{get/from}String methods (CASSANDRA-4842)
  
 +
 +1.2-beta1
 + * add atomic_batch_mutate (CASSANDRA-4542, -4635)
 + * increase default max_hint_window_in_ms to 3h (CASSANDRA-4632)
 + * include message initiation time to replicas so they can more
 +   accurately drop timed-out requests (CASSANDRA-2858)
 + * fix clientutil.jar dependencies (CASSANDRA-4566)
 + * optimize WriteResponse (CASSANDRA-4548)
 + * new metrics (CASSANDRA-4009)
 + * redesign KEYS indexes to avoid read-before-write (CASSANDRA-2897)
 + * debug tracing (CASSANDRA-1123)
 + * parallelize row cache loading (CASSANDRA-4282)
 + * Make compaction, flush JBOD-aware (CASSANDRA-4292)
 + * run local range scans on the read stage (CASSANDRA-3687)
 + * clean up ioexceptions (CASSANDRA-2116)
 + * add disk_failure_policy (CASSANDRA-2118)
 + * Introduce new json format with row level deletion (CASSANDRA-4054)
 + * remove redundant name column from schema_keyspaces (CASSANDRA-4433)
 + * improve nodetool ring handling of multi-dc clusters (CASSANDRA-3047)
 + * update NTS calculateNaturalEndpoints to be O(N log N) (CASSANDRA-3881)
 + * add UseCondCardMark XX jvm settings on jdk 1.7 (CASSANDRA-4366)
 + * split up rpc timeout by operation type (CASSANDRA-2819)
 + * rewrite key cache save/load to use only sequential i/o (CASSANDRA-3762)
 + * update MS protocol with a version handshake + broadcast address id
 +   (CASSANDRA-4311)
 + * multithreaded hint replay (CASSANDRA-4189)
 + * add inter-node message compression (CASSANDRA-3127)
 + * remove COPP (CASSANDRA-2479)
 + * Track tombstone expiration and compact when tombstone content is
 +   higher than a configurable threshold, default 20% (CASSANDRA-3442, 4234)
 + * update MurmurHash to version 3 (CASSANDRA-2975)
 + * (CLI) track elapsed time for `delete' operation (CASSANDRA-4060)
 + * (CLI) jline version is bumped to 1.0 to properly  support
 +   'delete' key function (CASSANDRA-4132)
 + * Save IndexSummary into new SSTable 'Summary' component (CASSANDRA-2392, 
4289)
 + * Add support for range tombstones (CASSANDRA-3708)
 + * Improve MessagingService efficiency (CASSANDRA-3617)
 + * Avoid ID conflicts from concurrent schema changes (CASSANDRA-3794)
 + * Set thrift HSHA server thread limit to unlimited by default 
(CASSANDRA-4277)
 + * Avoids double serialization of CF id in RowMutation messages
 +   (CASSANDRA-4293)
 + * stream compressed sstables directly with java nio (CASSANDRA-4297)
 + * Support multiple ranges in SliceQueryFilter (CASSANDRA-3885)
 + * Add column metadata to system column families (CASSANDRA-4018)
 + * (cql3) Always use composite types by default (CASSANDRA-4329)
 + * (cql3) Add support for set, map and list (CASSANDRA-3647)
 + * Validate date type correctly (CASSANDRA-4441)
 + * (cql3) Allow definitions with only a PK (CASSANDRA-4361)
 + * (cql3) Add support for row key composites (CASSANDRA-4179)
 + * improve DynamicEndpointSnitch by using reservoir sampling (CASSANDRA-4038)
 + * (cql3) Add support for 2ndary indexes (CASSANDRA-3680)
 + * (cql3) fix defining more than one PK to be invalid (CASSANDRA-4477)
 + * remove schema agreement checking from all external APIs (Thrift, CQL and 
CQL3) (CASSANDRA-4487)
 + * add Murmur3Partitioner and make it default for new installations 
(CASSANDRA-3772, 4621)
 + * (cql3) update pseudo-map syntax to use map 

buildbot failure in ASF Buildbot on cassandra-trunk

2012-10-24 Thread buildbot
The Buildbot has detected a new failure on builder cassandra-trunk while 
building cassandra.
Full details are available at:
 http://ci.apache.org/builders/cassandra-trunk/builds/1985

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

Buildslave for this Build: portunus_ubuntu

Build Reason: scheduler
Build Source Stamp: [branch trunk] c86a7f8ca5cbd48f6fba94599449ed17107d8b23
Blamelist: Sylvain Lebresne sylv...@datastax.com

BUILD FAILED: failed compile

sincerely,
 -The Buildbot





git commit: Fix build

2012-10-24 Thread slebresne
Updated Branches:
  refs/heads/trunk c86a7f8ca - 0f255da32


Fix build


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

Branch: refs/heads/trunk
Commit: 0f255da32f23b5e00dcd08dcbd8bca02bf190d8e
Parents: c86a7f8
Author: Sylvain Lebresne sylv...@datastax.com
Authored: Wed Oct 24 20:52:32 2012 +0200
Committer: Sylvain Lebresne sylv...@datastax.com
Committed: Wed Oct 24 20:52:32 2012 +0200

--
 .../db/marshal/AbstractCompositeType.java  |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/0f255da3/src/java/org/apache/cassandra/db/marshal/AbstractCompositeType.java
--
diff --git 
a/src/java/org/apache/cassandra/db/marshal/AbstractCompositeType.java 
b/src/java/org/apache/cassandra/db/marshal/AbstractCompositeType.java
index 3e5f7cc..12ecd9f 100644
--- a/src/java/org/apache/cassandra/db/marshal/AbstractCompositeType.java
+++ b/src/java/org/apache/cassandra/db/marshal/AbstractCompositeType.java
@@ -222,7 +222,7 @@ public abstract class AbstractCompositeType extends 
AbstractTypeByteBuffer
 if (bb.remaining() != bytes.remaining())
 sb.append(:);
 
-AbstractType? comparator = getAndAppendNextComparator(i, bb, sb);
+AbstractType? comparator = getAndAppendComparator(i, bb, sb);
 ByteBuffer value = getWithShortLength(bb);
 
 sb.append(escape(comparator.getString(value)));



[jira] [Commented] (CASSANDRA-4839) Online toggle for node write-only status

2012-10-24 Thread Rick Branson (JIRA)

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

Rick Branson commented on CASSANDRA-4839:
-

For some reason I was confused about thrift -- there seems to be a lack of 
information about exactly what goes over the storage port and what goes over 
thrift. Originally I was correct -- that it's any internode communication, but 
then I read CASSANDRA-4162 and for some reason it gave me the idea that thrift 
was also used for stream  hint delivery. Oh well.

I think it would be something like wait N seconds on boot to receive hints, and 
then wait until any in-progress hint deliveries finished or timed out before 
taking reads. It doesn't have to be perfect, but would significantly increase 
the consistency of CL.ONE reads during reboots, which along with the other 
tickets that cover faster table loading, would promote more productive restarts 
-- think tuning and minor upgrades for both C* and the JVM.

Either way, I think that automatically doing that would be great but isn't 
coupled to the original idea. Just getting the ability to do this from JMX 
would be great.

 Online toggle for node write-only status
 

 Key: CASSANDRA-4839
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4839
 Project: Cassandra
  Issue Type: Improvement
  Components: Core
Reporter: Rick Branson
Priority: Minor

 It would be really great if users could disable/enable reads on a given node, 
 while still allowing write operations to take place. This would be similar to 
 how we enable/disable thrift and gossip using JMX.
 The scenario for using this is that often a node needs to be brought down for 
 maintenance for a few minutes, and while the node is catching up from hints, 
 which can take 10-30 minutes depending on write load, it will serve stale 
 data. Do the math for a rolling restart of a large cluster and you have 
 potential windows of hours or days where a large amount of inconsistency is 
 surfacing.
 Avoiding this large time gap of inconsistency during regular maintenance 
 alleviates concerns about inconsistent data surfaced to users during normal, 
 planned activities. While a read consistency ONE can indeed be used to 
 prevent any inconsistency from the scenario above, it seems ridiculous to 
 always incur the cost to cover the 0.1% case.
 In addition, it would open up the ability for a node to (optionally) 
 automatically go dark for reads while it's receiving hints after joining 
 the cluster or perhaps during repair. These obviously have their own 
 complications and justify separate tickets.

--
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-24 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/1986

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

Buildslave for this Build: portunus_ubuntu

Build Reason: scheduler
Build Source Stamp: [branch trunk] 0f255da32f23b5e00dcd08dcbd8bca02bf190d8e
Blamelist: Sylvain Lebresne sylv...@datastax.com

Build succeeded!

sincerely,
 -The Buildbot





[jira] [Created] (CASSANDRA-4855) Debian packaging doesn't do auto-reloading of log4j properties file

2012-10-24 Thread Rick Branson (JIRA)
Rick Branson created CASSANDRA-4855:
---

 Summary: Debian packaging doesn't do auto-reloading of log4j 
properties file
 Key: CASSANDRA-4855
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4855
 Project: Cassandra
  Issue Type: Bug
Affects Versions: 1.1.5
Reporter: Rick Branson
Priority: Minor


Cassandra isn't starting the log4j auto-reload thread because it requires 
-Dlog4j.defaultInitOverride=true on initialization. Is there a reason to not do 
this when installed from the Debian package?

--
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-4855) Debian packaging doesn't do auto-reloading of log4j properties file

2012-10-24 Thread Rick Branson (JIRA)

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

Rick Branson updated CASSANDRA-4855:


Component/s: Packaging

 Debian packaging doesn't do auto-reloading of log4j properties file
 ---

 Key: CASSANDRA-4855
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4855
 Project: Cassandra
  Issue Type: Bug
  Components: Packaging
Affects Versions: 1.1.5
Reporter: Rick Branson
Priority: Minor

 Cassandra isn't starting the log4j auto-reload thread because it requires 
 -Dlog4j.defaultInitOverride=true on initialization. Is there a reason to not 
 do this when installed from the Debian package?

--
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-4816) Broken get_paged_slice

2012-10-24 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis updated CASSANDRA-4816:
--

 Reviewer: slebresne  (was: jbellis)
 Priority: Major  (was: Blocker)
Affects Version/s: (was: 1.1.6)
   1.1.0
Fix Version/s: 1.2.0 beta 2
 Assignee: Piotr Kołaczkowski  (was: Sylvain Lebresne)

 Broken get_paged_slice 
 ---

 Key: CASSANDRA-4816
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4816
 Project: Cassandra
  Issue Type: Bug
Affects Versions: 1.1.0
Reporter: Piotr Kołaczkowski
Assignee: Piotr Kołaczkowski
 Fix For: 1.1.7, 1.2.0 beta 2

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


 get_paged_slice doesn't reset the start column filter for the second returned 
 row sometimes. So instead of getting a slice:
 row 0: start_column...last_column_in_row
 row 1: first column in a row...last_column_in_row
 row 2: first column in a row...
 you sometimes get:
 row 0: start_column...last_column_in_row
 row 1: start_column...last_column_in_row
 row 2: first column in a 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


[1/3] git commit: merge from 1.1

2012-10-24 Thread jbellis
Updated Branches:
  refs/heads/cassandra-1.1 5d5207b91 - 6f31aba0e
  refs/heads/trunk 0f255da32 - 8cf1259b3


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

Branch: refs/heads/trunk
Commit: 8cf1259b367c5b910ef70996191dc10ef0987657
Parents: 0f255da 6f31aba
Author: Jonathan Ellis jbel...@apache.org
Authored: Wed Oct 24 14:45:05 2012 -0500
Committer: Jonathan Ellis jbel...@apache.org
Committed: Wed Oct 24 14:48:22 2012 -0500

--
 CHANGES.txt|1 +
 .../apache/cassandra/db/RowIteratorFactory.java|   43 --
 .../db/columniterator/IColumnIteratorFactory.java  |6 ++
 .../db/columniterator/LazyColumnIterator.java  |   62 +++
 .../cassandra/io/sstable/SSTableScanner.java   |   18 +++-
 5 files changed, 117 insertions(+), 13 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/8cf1259b/CHANGES.txt
--
diff --cc CHANGES.txt
index e6c1d1a,0857259..3ef9530
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,41 -1,5 +1,42 @@@
 -1.1.7
 +1.2-beta2
 + * make TRACE verb droppable (CASSANDRA-4672)
 + * fix BulkLoader recognition of CQL3 columnfamilies (CASSANDRA-4755)
 + * Sort commitlog segments for replay by id instead of mtime (CASSANDRA-4793)
 + * Make hint delivery asynchronous (CASSANDRA-4761)
 + * Pluggable Thrift transport factories for CLI and cqlsh (CASSANDRA-4609, 
4610)
 + * cassandra-cli: allow Double value type to be inserted to a column 
(CASSANDRA-4661)
 + * Add ability to use custom TServerFactory implementations (CASSANDRA-4608)
 + * 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)
 + * add PBSPredictor consistency modeler (CASSANDRA-4261)
 + * remove vestiges of Thrift unframed mode (CASSANDRA-4729)
 + * optimize single-row PK lookups (CASSANDRA-4710)
 + * adjust blockFor calculation to account for pending ranges due to node 
 +   movement (CASSANDRA-833)
 + * Change CQL version to 3.0.0 and stop accepting 3.0.0-beta1 (CASSANDRA-4649)
 + * (CQL3) Make prepared statement global instead of per connection 
 +   (CASSANDRA-4449)
 + * Fix scrubbing of CQL3 created tables (CASSANDRA-4685)
 + * (CQL3) Fix validation when using counter and regular columns in the same 
 +   table (CASSANDRA-4706)
 + * Fix bug starting Cassandra with simple authentication (CASSANDRA-4648)
 + * Add support for batchlog in CQL3 (CASSANDRA-4545, 4738)
 + * Add support for multiple column family outputs in CFOF (CASSANDRA-4208)
 + * Support repairing only the local DC nodes (CASSANDRA-4747)
 + * Use rpc_address for binary protocol and change default port (CASSANRA-4751)
 + * Fix use of collections in prepared statements (CASSANDRA-4739)
 + * Store more information into peers table (CASSANDRA-4351, 4814)
 + * Configurable bucket size for size tiered compaction (CASSANDRA-4704)
 + * Run leveled compaction in parallel (CASSANDRA-4310)
 + * Fix potential NPE during CFS reload (CASSANDRA-4786)
 + * Composite indexes may miss results (CASSANDRA-4796)
 + * Move consistency level to the protocol level (CASSANDRA-4734, 4824)
 + * Fix Subcolumn slice ends not respected (CASSANDRA-4826)
 + * Fix Assertion error in cql3 select (CASSANDRA-4783)
 +Merged from 1.1:
+  * fix get_paged_slice to wrap to next row correctly (CASSANDRA-4816)
   * fix indexing empty column values (CASSANDRA-4832)
   * allow JdbcDate to compose null Date objects (CASSANDRA-4830)
   * fix possible stackoverflow when compacting 1000s of sstables

http://git-wip-us.apache.org/repos/asf/cassandra/blob/8cf1259b/src/java/org/apache/cassandra/db/RowIteratorFactory.java
--
diff --cc src/java/org/apache/cassandra/db/RowIteratorFactory.java
index 547e27d,5a53c4a..229a08f
--- a/src/java/org/apache/cassandra/db/RowIteratorFactory.java
+++ b/src/java/org/apache/cassandra/db/RowIteratorFactory.java
@@@ -19,9 -19,9 +19,17 @@@ package org.apache.cassandra.db
  
  import java.util.*;
  
- import com.google.common.collect.AbstractIterator;
++ HEAD
 +
 +import org.apache.cassandra.db.columniterator.OnDiskAtomIterator;
++||| merged common ancestors
++
++import org.apache.cassandra.db.columniterator.IColumnIterator;
++===
+ import org.apache.cassandra.db.columniterator.IColumnIterator;
+ import org.apache.cassandra.db.columniterator.IColumnIteratorFactory;
+ import 

[2/3] git commit: initialize column iteration lazily so filter will be ready when it's first used patch by slebresne and Piotr Kołaczkowski; reviewed by jbellis for CASSANDRA-4816

2012-10-24 Thread jbellis
initialize column iteration lazily so filter will be ready when it's first used
patch by slebresne and Piotr Kołaczkowski; reviewed by jbellis for 
CASSANDRA-4816


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

Branch: refs/heads/trunk
Commit: 6f31aba0e1183a9ad3977bd8e0ed97b42bc7d1d5
Parents: 5d5207b
Author: Jonathan Ellis jbel...@apache.org
Authored: Wed Oct 24 14:41:22 2012 -0500
Committer: Jonathan Ellis jbel...@apache.org
Committed: Wed Oct 24 14:41:29 2012 -0500

--
 CHANGES.txt|1 +
 .../apache/cassandra/db/RowIteratorFactory.java|   38 +++---
 .../db/columniterator/IColumnIteratorFactory.java  |6 ++
 .../db/columniterator/LazyColumnIterator.java  |   62 +++
 .../cassandra/io/sstable/SSTableScanner.java   |   16 +++-
 5 files changed, 109 insertions(+), 14 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/6f31aba0/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 95feb9b..0857259 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 1.1.7
+ * fix get_paged_slice to wrap to next row correctly (CASSANDRA-4816)
  * fix indexing empty column values (CASSANDRA-4832)
  * allow JdbcDate to compose null Date objects (CASSANDRA-4830)
  * fix possible stackoverflow when compacting 1000s of sstables

http://git-wip-us.apache.org/repos/asf/cassandra/blob/6f31aba0/src/java/org/apache/cassandra/db/RowIteratorFactory.java
--
diff --git a/src/java/org/apache/cassandra/db/RowIteratorFactory.java 
b/src/java/org/apache/cassandra/db/RowIteratorFactory.java
index b5c57ff..5a53c4a 100644
--- a/src/java/org/apache/cassandra/db/RowIteratorFactory.java
+++ b/src/java/org/apache/cassandra/db/RowIteratorFactory.java
@@ -17,12 +17,11 @@
  */
 package org.apache.cassandra.db;
 
-import java.io.Closeable;
 import java.util.*;
 
-import com.google.common.collect.AbstractIterator;
-
 import org.apache.cassandra.db.columniterator.IColumnIterator;
+import org.apache.cassandra.db.columniterator.IColumnIteratorFactory;
+import org.apache.cassandra.db.columniterator.LazyColumnIterator;
 import org.apache.cassandra.db.filter.QueryFilter;
 import org.apache.cassandra.io.sstable.SSTableReader;
 import org.apache.cassandra.io.sstable.SSTableScanner;
@@ -123,7 +122,7 @@ public class RowIteratorFactory
 /**
  * Get a ColumnIterator for a specific key in the memtable.
  */
-private static class ConvertToColumnIterator extends 
AbstractIteratorIColumnIterator implements CloseableIteratorIColumnIterator
+private static class ConvertToColumnIterator implements 
CloseableIteratorIColumnIterator
 {
 private final QueryFilter filter;
 private final IteratorMap.EntryDecoratedKey, ColumnFamily iter;
@@ -134,14 +133,33 @@ public class RowIteratorFactory
 this.iter = iter;
 }
 
-public IColumnIterator computeNext()
+public boolean hasNext()
 {
-if (iter.hasNext())
+return iter.hasNext();
+}
+
+/*
+ * Note that when doing get_paged_slice, we reset the start of the 
queryFilter after we've fetched the
+ * first row. This means that this iterator should not use in any way 
the filter to fetch a row before
+ * we call next(). Which prevents us for using guava AbstractIterator.
+ * This is obviously rather fragile and we should consider refactoring 
that code, but such refactor will go
+ * deep into the storage engine code so this will have to do until 
then.
+ */
+public IColumnIterator next()
+{
+final Map.EntryDecoratedKey, ColumnFamily entry = iter.next();
+return new LazyColumnIterator(entry.getKey(), new 
IColumnIteratorFactory()
 {
-Map.EntryDecoratedKey, ColumnFamily entry = iter.next();
-return filter.getMemtableColumnIterator(entry.getValue(), 
entry.getKey());
-}
-return endOfData();
+public IColumnIterator create()
+{
+return filter.getMemtableColumnIterator(entry.getValue(), 
entry.getKey());
+}
+});
+}
+
+public void remove()
+{
+throw new UnsupportedOperationException();
 }
 
 public void close()

http://git-wip-us.apache.org/repos/asf/cassandra/blob/6f31aba0/src/java/org/apache/cassandra/db/columniterator/IColumnIteratorFactory.java

[3/3] git commit: initialize column iteration lazily so filter will be ready when it's first used patch by slebresne and Piotr Kołaczkowski; reviewed by jbellis for CASSANDRA-4816

2012-10-24 Thread jbellis
initialize column iteration lazily so filter will be ready when it's first used
patch by slebresne and Piotr Kołaczkowski; reviewed by jbellis for 
CASSANDRA-4816


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

Branch: refs/heads/cassandra-1.1
Commit: 6f31aba0e1183a9ad3977bd8e0ed97b42bc7d1d5
Parents: 5d5207b
Author: Jonathan Ellis jbel...@apache.org
Authored: Wed Oct 24 14:41:22 2012 -0500
Committer: Jonathan Ellis jbel...@apache.org
Committed: Wed Oct 24 14:41:29 2012 -0500

--
 CHANGES.txt|1 +
 .../apache/cassandra/db/RowIteratorFactory.java|   38 +++---
 .../db/columniterator/IColumnIteratorFactory.java  |6 ++
 .../db/columniterator/LazyColumnIterator.java  |   62 +++
 .../cassandra/io/sstable/SSTableScanner.java   |   16 +++-
 5 files changed, 109 insertions(+), 14 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/6f31aba0/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 95feb9b..0857259 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 1.1.7
+ * fix get_paged_slice to wrap to next row correctly (CASSANDRA-4816)
  * fix indexing empty column values (CASSANDRA-4832)
  * allow JdbcDate to compose null Date objects (CASSANDRA-4830)
  * fix possible stackoverflow when compacting 1000s of sstables

http://git-wip-us.apache.org/repos/asf/cassandra/blob/6f31aba0/src/java/org/apache/cassandra/db/RowIteratorFactory.java
--
diff --git a/src/java/org/apache/cassandra/db/RowIteratorFactory.java 
b/src/java/org/apache/cassandra/db/RowIteratorFactory.java
index b5c57ff..5a53c4a 100644
--- a/src/java/org/apache/cassandra/db/RowIteratorFactory.java
+++ b/src/java/org/apache/cassandra/db/RowIteratorFactory.java
@@ -17,12 +17,11 @@
  */
 package org.apache.cassandra.db;
 
-import java.io.Closeable;
 import java.util.*;
 
-import com.google.common.collect.AbstractIterator;
-
 import org.apache.cassandra.db.columniterator.IColumnIterator;
+import org.apache.cassandra.db.columniterator.IColumnIteratorFactory;
+import org.apache.cassandra.db.columniterator.LazyColumnIterator;
 import org.apache.cassandra.db.filter.QueryFilter;
 import org.apache.cassandra.io.sstable.SSTableReader;
 import org.apache.cassandra.io.sstable.SSTableScanner;
@@ -123,7 +122,7 @@ public class RowIteratorFactory
 /**
  * Get a ColumnIterator for a specific key in the memtable.
  */
-private static class ConvertToColumnIterator extends 
AbstractIteratorIColumnIterator implements CloseableIteratorIColumnIterator
+private static class ConvertToColumnIterator implements 
CloseableIteratorIColumnIterator
 {
 private final QueryFilter filter;
 private final IteratorMap.EntryDecoratedKey, ColumnFamily iter;
@@ -134,14 +133,33 @@ public class RowIteratorFactory
 this.iter = iter;
 }
 
-public IColumnIterator computeNext()
+public boolean hasNext()
 {
-if (iter.hasNext())
+return iter.hasNext();
+}
+
+/*
+ * Note that when doing get_paged_slice, we reset the start of the 
queryFilter after we've fetched the
+ * first row. This means that this iterator should not use in any way 
the filter to fetch a row before
+ * we call next(). Which prevents us for using guava AbstractIterator.
+ * This is obviously rather fragile and we should consider refactoring 
that code, but such refactor will go
+ * deep into the storage engine code so this will have to do until 
then.
+ */
+public IColumnIterator next()
+{
+final Map.EntryDecoratedKey, ColumnFamily entry = iter.next();
+return new LazyColumnIterator(entry.getKey(), new 
IColumnIteratorFactory()
 {
-Map.EntryDecoratedKey, ColumnFamily entry = iter.next();
-return filter.getMemtableColumnIterator(entry.getValue(), 
entry.getKey());
-}
-return endOfData();
+public IColumnIterator create()
+{
+return filter.getMemtableColumnIterator(entry.getValue(), 
entry.getKey());
+}
+});
+}
+
+public void remove()
+{
+throw new UnsupportedOperationException();
 }
 
 public void close()


buildbot failure in ASF Buildbot on cassandra-trunk

2012-10-24 Thread buildbot
The Buildbot has detected a new failure on builder cassandra-trunk while 
building cassandra.
Full details are available at:
 http://ci.apache.org/builders/cassandra-trunk/builds/1987

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

Buildslave for this Build: portunus_ubuntu

Build Reason: scheduler
Build Source Stamp: [branch trunk] 8cf1259b367c5b910ef70996191dc10ef0987657
Blamelist: Jonathan Ellis jbel...@apache.org

BUILD FAILED: failed compile

sincerely,
 -The Buildbot





git commit: fix merge

2012-10-24 Thread jbellis
Updated Branches:
  refs/heads/trunk 8cf1259b3 - 565c57684


fix merge


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

Branch: refs/heads/trunk
Commit: 565c57684bc7423491512b0a71e76680ec2400bf
Parents: 8cf1259
Author: Jonathan Ellis jbel...@apache.org
Authored: Wed Oct 24 14:52:55 2012 -0500
Committer: Jonathan Ellis jbel...@apache.org
Committed: Wed Oct 24 14:52:55 2012 -0500

--
 .../apache/cassandra/db/RowIteratorFactory.java|   10 +-
 1 files changed, 1 insertions(+), 9 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/565c5768/src/java/org/apache/cassandra/db/RowIteratorFactory.java
--
diff --git a/src/java/org/apache/cassandra/db/RowIteratorFactory.java 
b/src/java/org/apache/cassandra/db/RowIteratorFactory.java
index 229a08f..937c496 100644
--- a/src/java/org/apache/cassandra/db/RowIteratorFactory.java
+++ b/src/java/org/apache/cassandra/db/RowIteratorFactory.java
@@ -19,17 +19,9 @@ package org.apache.cassandra.db;
 
 import java.util.*;
 
- HEAD
-
-import org.apache.cassandra.db.columniterator.OnDiskAtomIterator;
-||| merged common ancestors
-
-import org.apache.cassandra.db.columniterator.IColumnIterator;
-===
-import org.apache.cassandra.db.columniterator.IColumnIterator;
 import org.apache.cassandra.db.columniterator.IColumnIteratorFactory;
 import org.apache.cassandra.db.columniterator.LazyColumnIterator;
- cassandra-1.1
+import org.apache.cassandra.db.columniterator.OnDiskAtomIterator;
 import org.apache.cassandra.db.filter.QueryFilter;
 import org.apache.cassandra.io.sstable.SSTableReader;
 import org.apache.cassandra.io.sstable.SSTableScanner;



[jira] [Commented] (CASSANDRA-4803) CFRR wide row iterators improvements

2012-10-24 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis commented on CASSANDRA-4803:
---

Not sure about 04 -- I'm a fan of the simplifications we get from letting CFRR 
only need to deal with non-wrapping splits.

 CFRR wide row iterators improvements
 

 Key: CASSANDRA-4803
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4803
 Project: Cassandra
  Issue Type: Bug
  Components: Hadoop
Affects Versions: 1.1.0
Reporter: Piotr Kołaczkowski
Assignee: Piotr Kołaczkowski
 Fix For: 1.1.7, 1.2.0 beta 2

 Attachments: 0001-Wide-row-iterator-counts-rows-not-columns.patch, 
 0002-Fixed-bugs-in-describe_splits.-CFRR-uses-row-counts-.patch, 
 0003-Fixed-get_paged_slice-memtable-and-sstable-column-it.patch, 
 0004-Better-token-range-wrap-around-handling-in-CFIF-CFRR.patch, 
 0005-Fixed-handling-of-start_key-end_token-in-get_range_s.patch, 
 0006-Code-cleanup-refactoring-in-CFRR.-Fixed-bug-with-mis.patch


 {code}
  public float getProgress()
 {
 // TODO this is totally broken for wide rows
 // the progress is likely to be reported slightly off the actual but 
 close enough
 float progress = ((float) iter.rowsRead() / totalRowCount);
 return progress  1.0F ? 1.0F : progress;
 }
 {code}
 The problem is iter.rowsRead() does not return the number of rows read from 
 the wide row iterator, but returns number of *columns* (every row is counted 
 multiple times). 

--
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-4803) CFRR wide row iterators improvements

2012-10-24 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis edited comment on CASSANDRA-4803 at 10/24/12 7:58 PM:
-

03 committed in CASSANDRA-4816.

Not sure about 04 -- I'm a fan of the simplifications we get from letting CFRR 
only need to deal with non-wrapping splits.

  was (Author: jbellis):
Not sure about 04 -- I'm a fan of the simplifications we get from letting 
CFRR only need to deal with non-wrapping splits.
  
 CFRR wide row iterators improvements
 

 Key: CASSANDRA-4803
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4803
 Project: Cassandra
  Issue Type: Bug
  Components: Hadoop
Affects Versions: 1.1.0
Reporter: Piotr Kołaczkowski
Assignee: Piotr Kołaczkowski
 Fix For: 1.1.7, 1.2.0 beta 2

 Attachments: 0001-Wide-row-iterator-counts-rows-not-columns.patch, 
 0002-Fixed-bugs-in-describe_splits.-CFRR-uses-row-counts-.patch, 
 0003-Fixed-get_paged_slice-memtable-and-sstable-column-it.patch, 
 0004-Better-token-range-wrap-around-handling-in-CFIF-CFRR.patch, 
 0005-Fixed-handling-of-start_key-end_token-in-get_range_s.patch, 
 0006-Code-cleanup-refactoring-in-CFRR.-Fixed-bug-with-mis.patch


 {code}
  public float getProgress()
 {
 // TODO this is totally broken for wide rows
 // the progress is likely to be reported slightly off the actual but 
 close enough
 float progress = ((float) iter.rowsRead() / totalRowCount);
 return progress  1.0F ? 1.0F : progress;
 }
 {code}
 The problem is iter.rowsRead() does not return the number of rows read from 
 the wide row iterator, but returns number of *columns* (every row is counted 
 multiple times). 

--
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-24 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/1988

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

Buildslave for this Build: portunus_ubuntu

Build Reason: scheduler
Build Source Stamp: [branch trunk] 565c57684bc7423491512b0a71e76680ec2400bf
Blamelist: Jonathan Ellis jbel...@apache.org

Build succeeded!

sincerely,
 -The Buildbot





[jira] [Commented] (CASSANDRA-4822) CQL3: Allow renaming PK columns to ease upgrade from thrift

2012-10-24 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis commented on CASSANDRA-4822:
---

I think this is backwards:

+newList.add(i  l.size() ? null : l.get(i));

Nits: would prefer {{l}} to be given a more meaningful name, like {{oldNames}}. 
 Comments for the aliases lists that they can be null-padded would be nice.

 CQL3: Allow renaming PK columns to ease upgrade from thrift
 ---

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

 Attachments: 4822.txt


 Say you have a clicks CF in thrift storing for each user a timeline of which 
 links it clicked on. It may have a definition like:
 {noformat}
 create column family clicks with key_validation_class = UUIDType and 
 comparator = TimeUUIDType and default_validation_class = UTF8Type
 {noformat}
 In CQL3, you can access that thrift created CF as if it had been defined by:
 {noformat}
 CREATE TABLE clicks (
   key uuid,
   column timeuuid,
   value text,
   PRIMARY KEY (key, column)
 ) WITH COMPACT STORAGE
 {noformat}
 In other words, CQL3 will pick default names for the key_alias, 
 column_aliases and value_alias metadata. It's ok but it would be more user 
 friendly to use if the user could rename those to something better. Today, 
 the only solution would be to remove the schema and re-create the table in 
 CQL3. We can make that simpler by adding support for:
 {noformat}
 ALTER TABLE clicks RENAME key to user_id;
 ALTER TABLE clicks RENAME column to insertion_time;
 ALTER TABLE clicks RENAME value to url_clicked; 
 {noformat}
 Of course such rename statement won't be applicable to all columns. Namely, 
 we can only allow renaming PK columns and in some compact storage cases the 
 value. But that's probably still worth adding.

--
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-4856) Thrift daemon is crashing the server

2012-10-24 Thread Michael Yeh (JIRA)
Michael Yeh created CASSANDRA-4856:
--

 Summary: Thrift daemon is crashing the server
 Key: CASSANDRA-4856
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4856
 Project: Cassandra
  Issue Type: Bug
Affects Versions: 1.1.6
 Environment: MacOS 10.8.2
Reporter: Michael Yeh


I'm new to cassandra and was looking at using the kundera thrift client.  I was 
able to get the sample code working without any issues.  After upgrading to 
mountain lion on my mac, I didn't realize I had lost the /var/lib/cassandra 
directory.  When I tried to run the previously working sample code, it would 
crash cassandra with the following stack trace:
INFO 12:55:37,147 Listening for thrift clients...
ERROR 12:55:43,545 Exception in thread Thread[Thread-3,5,main]
java.lang.OutOfMemoryError: unable to create new native thread
at java.lang.Thread.start0(Native Method)
at java.lang.Thread.start(Thread.java:658)
at 
java.util.concurrent.ThreadPoolExecutor.addIfUnderMaximumPoolSize(ThreadPoolExecutor.java:727)
at 
java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:657)
at 
org.apache.cassandra.thrift.CustomTThreadPoolServer.serve(CustomTThreadPoolServer.java:103)
at 
org.apache.cassandra.thrift.CassandraDaemon$ThriftServer.run(CassandraDaemon.java:213)

After realizing that I needed to recreate the keyspace and column families, 
everything started to work again.  Although I'm no longer blocked with my 
issue, no clients should ever be able to crash a server even if it is user 
error.

--
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-4837) IllegalStateException when upgrading schema

2012-10-24 Thread Wade Simmons (JIRA)

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

Wade Simmons updated CASSANDRA-4837:


Attachment: schematables.tar.gz

schematables from 1.1.2 node. Trying to upgrade one node in the cluster to 
1.1.6 causes migration errors from nodes that have these tables.

 IllegalStateException when upgrading schema
 ---

 Key: CASSANDRA-4837
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4837
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Affects Versions: 1.1.6
 Environment: Linux
Reporter: Wade Simmons
Assignee: Pavel Yaskevich
 Attachments: schematables.tar.gz


 I am upgrading a cluster from 1.1.2 to 1.1.6. When restarting a node with new 
 code, I am seeing this exception repeat in the logs:
 {code}
 ERROR [InternalResponseStage:21] 2012-10-19 00:41:26,794 
 AbstractCassandraDaemon.java (line 135) Exception in thread 
 Thread[InternalResponseStage:21,5,main]
 java.lang.IllegalStateException: One row required, 0 found
 at 
 org.apache.cassandra.cql3.UntypedResultSet.one(UntypedResultSet.java:50)
 at 
 org.apache.cassandra.config.KSMetaData.fromSchema(KSMetaData.java:258)
 at 
 org.apache.cassandra.db.DefsTable.mergeKeyspaces(DefsTable.java:406)
 at org.apache.cassandra.db.DefsTable.mergeSchema(DefsTable.java:355)
 at 
 org.apache.cassandra.db.DefsTable.mergeRemoteSchema(DefsTable.java:329)
 at 
 org.apache.cassandra.service.MigrationManager$MigrationTask$1.response(MigrationManager.java:449)
 at 
 org.apache.cassandra.net.ResponseVerbHandler.doVerb(ResponseVerbHandler.java:45)
 at 
 org.apache.cassandra.net.MessageDeliveryTask.run(MessageDeliveryTask.java:59)
 at 
 java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
 at 
 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
 at java.lang.Thread.run(Thread.java:662)
 {code}
 I added in some debugging logging to see what Row it was trying to load, and 
 I see this:
 {code}
 Unable to load keyspace schema: 
 Row(key=DecoratedKey(112573196966143652100562749464385838776, 
 5365676d656e7473496e746567726174696f6e54657374), 
 cf=ColumnFamily(schema_keyspaces -deleted at 1350665377628000- []))
 {code}
 The hex key translates to a schema that exists in schema_keyspaces when I 
 query on the rest of the cluster. I tried restarting one of the other nodes 
 without upgrading the jar and it restarted without exceptions.

--
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-4837) IllegalStateException when upgrading schema

2012-10-24 Thread Wade Simmons (JIRA)

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

Wade Simmons edited comment on CASSANDRA-4837 at 10/24/12 8:24 PM:
---

schematables from 1.1.2 node. Trying to upgrade one node in the cluster to 
1.1.6 causes migration errors from nodes that have these tables.

You will notice that we have a modification in our system to allow @ chars in 
CF names, but that shouldn't be causing the issue here.

  was (Author: wadey):
schematables from 1.1.2 node. Trying to upgrade one node in the cluster to 
1.1.6 causes migration errors from nodes that have these tables.
  
 IllegalStateException when upgrading schema
 ---

 Key: CASSANDRA-4837
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4837
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Affects Versions: 1.1.6
 Environment: Linux
Reporter: Wade Simmons
Assignee: Pavel Yaskevich
 Attachments: schematables.tar.gz


 I am upgrading a cluster from 1.1.2 to 1.1.6. When restarting a node with new 
 code, I am seeing this exception repeat in the logs:
 {code}
 ERROR [InternalResponseStage:21] 2012-10-19 00:41:26,794 
 AbstractCassandraDaemon.java (line 135) Exception in thread 
 Thread[InternalResponseStage:21,5,main]
 java.lang.IllegalStateException: One row required, 0 found
 at 
 org.apache.cassandra.cql3.UntypedResultSet.one(UntypedResultSet.java:50)
 at 
 org.apache.cassandra.config.KSMetaData.fromSchema(KSMetaData.java:258)
 at 
 org.apache.cassandra.db.DefsTable.mergeKeyspaces(DefsTable.java:406)
 at org.apache.cassandra.db.DefsTable.mergeSchema(DefsTable.java:355)
 at 
 org.apache.cassandra.db.DefsTable.mergeRemoteSchema(DefsTable.java:329)
 at 
 org.apache.cassandra.service.MigrationManager$MigrationTask$1.response(MigrationManager.java:449)
 at 
 org.apache.cassandra.net.ResponseVerbHandler.doVerb(ResponseVerbHandler.java:45)
 at 
 org.apache.cassandra.net.MessageDeliveryTask.run(MessageDeliveryTask.java:59)
 at 
 java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
 at 
 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
 at java.lang.Thread.run(Thread.java:662)
 {code}
 I added in some debugging logging to see what Row it was trying to load, and 
 I see this:
 {code}
 Unable to load keyspace schema: 
 Row(key=DecoratedKey(112573196966143652100562749464385838776, 
 5365676d656e7473496e746567726174696f6e54657374), 
 cf=ColumnFamily(schema_keyspaces -deleted at 1350665377628000- []))
 {code}
 The hex key translates to a schema that exists in schema_keyspaces when I 
 query on the rest of the cluster. I tried restarting one of the other nodes 
 without upgrading the jar and it restarted without exceptions.

--
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-4835) Appending/Prepending items to list using BATCH

2012-10-24 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis commented on CASSANDRA-4835:
---

+1

 Appending/Prepending items to list using BATCH
 --

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

 Attachments: 0001-Fix-prepends-within-same-millis.txt, 
 0002-Ensure-same-timestamp-in-batches.txt


 As I know, there is no any guarantee that commands that are inside BATCH 
 block will execute in same order, as they are stored in the BATCH block. 
 But...
 I have made two tests:
 First appends some items to the empty list, and the second one, prepends 
 items, also to the empty list. Both of them are using UPDATE commands stored 
 in the BATCH block. 
 Results of those tests are as follow:
 First:
   When appending new items to list, USING commands are executed in the 
 same order as they are stored i BATCH.
 Second:
   When prepending new items to list, USING commands are executed in 
 random order.  
 So, in other words below code:
 {code:xml}
 BEGIN BATCH
  UPDATE... list_name = list_name + [ '1' ]  
  UPDATE... list_name = list_name + [ '2' ]
  UPDATE... list_name = list_name + [ '3' ] 
 APPLY BATCH;{code}
  always results in [ '1', '2', '3' ],
  but this code:
 {code:xml}
 BEGIN BATCH
  UPDATE... list_name = [ '1' ] + list_name   
  UPDATE... list_name = [ '2' ] + list_name
  UPDATE... list_name = [ '3' ] + list_name
 APPLY BATCH;{code}
 results in randomly ordered list, like [ '2', '1', '3' ](expected result 
 is [ '3', '2', '1' ])
 So somehow, when appending items to list, commands from BATCH are executed in 
 order as they are stored, but when prepending, the order is random.

--
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-3306) Error in LeveledCompactionStrategy

2012-10-24 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis commented on CASSANDRA-3306:
---

bq. This typically happens when source node is marked as dead by 
FailureDetector during streaming session(GC storm is the one I saw) and keep 
sending file in same session after the node comes back

But we close the session on confict, so shouldn't it start a new one?

 Error in LeveledCompactionStrategy
 --

 Key: CASSANDRA-3306
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3306
 Project: Cassandra
  Issue Type: Bug
Affects Versions: 1.0.0
Reporter: Radim Kolar
Assignee: Yuki Morishita
 Attachments: 0001-CASSANDRA-3306-test.patch


 during stress testing, i always get this error making leveledcompaction 
 strategy unusable. Should be easy to reproduce - just write fast.
 ERROR [CompactionExecutor:6] 2011-10-04 15:48:52,179 
 AbstractCassandraDaemon.java (line 133) Fatal exception in thread 
 Thread[CompactionExecutor:6,5,main]
 java.lang.AssertionError
   at 
 org.apache.cassandra.db.DataTracker$View.newSSTables(DataTracker.java:580)
   at 
 org.apache.cassandra.db.DataTracker$View.replace(DataTracker.java:546)
   at org.apache.cassandra.db.DataTracker.replace(DataTracker.java:268)
   at 
 org.apache.cassandra.db.DataTracker.replaceCompactedSSTables(DataTracker.java:232)
   at 
 org.apache.cassandra.db.ColumnFamilyStore.replaceCompactedSSTables(ColumnFamilyStore.java:960)
   at 
 org.apache.cassandra.db.compaction.CompactionTask.execute(CompactionTask.java:199)
   at 
 org.apache.cassandra.db.compaction.LeveledCompactionTask.execute(LeveledCompactionTask.java:47)
   at 
 org.apache.cassandra.db.compaction.CompactionManager$1.call(CompactionManager.java:131)
   at 
 org.apache.cassandra.db.compaction.CompactionManager$1.call(CompactionManager.java:114)
   at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
   at java.util.concurrent.FutureTask.run(FutureTask.java:138)
   at 
 java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
   at 
 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
   at java.lang.Thread.run(Thread.java:662)
 and this is in json data for table:
 {
   generations : [ {
 generation : 0,
 members : [ 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 
 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484 ]
   }, {
 generation : 1,
 members : [ ]
   }, {
 generation : 2,
 members : [ ]
   }, {
 generation : 3,
 members : [ ]
   }, {
 generation : 4,
 members : [ ]
   }, {
 generation : 5,
 members : [ ]
   }, {
 generation : 6,
 members : [ ]
   }, {
 generation : 7,
 members : [ ]
   } ]
 }

--
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-3306) Error in LeveledCompactionStrategy

2012-10-24 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis edited comment on CASSANDRA-3306 at 10/24/12 8:46 PM:
-

bq. This typically happens when source node is marked as dead by 
FailureDetector during streaming session(GC storm is the one I saw) and keep 
sending file in same session after the node comes back

But we close the session on convict, so shouldn't it start a new one?

  was (Author: jbellis):
bq. This typically happens when source node is marked as dead by 
FailureDetector during streaming session(GC storm is the one I saw) and keep 
sending file in same session after the node comes back

But we close the session on confict, so shouldn't it start a new one?
  
 Error in LeveledCompactionStrategy
 --

 Key: CASSANDRA-3306
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3306
 Project: Cassandra
  Issue Type: Bug
Affects Versions: 1.0.0
Reporter: Radim Kolar
Assignee: Yuki Morishita
 Attachments: 0001-CASSANDRA-3306-test.patch


 during stress testing, i always get this error making leveledcompaction 
 strategy unusable. Should be easy to reproduce - just write fast.
 ERROR [CompactionExecutor:6] 2011-10-04 15:48:52,179 
 AbstractCassandraDaemon.java (line 133) Fatal exception in thread 
 Thread[CompactionExecutor:6,5,main]
 java.lang.AssertionError
   at 
 org.apache.cassandra.db.DataTracker$View.newSSTables(DataTracker.java:580)
   at 
 org.apache.cassandra.db.DataTracker$View.replace(DataTracker.java:546)
   at org.apache.cassandra.db.DataTracker.replace(DataTracker.java:268)
   at 
 org.apache.cassandra.db.DataTracker.replaceCompactedSSTables(DataTracker.java:232)
   at 
 org.apache.cassandra.db.ColumnFamilyStore.replaceCompactedSSTables(ColumnFamilyStore.java:960)
   at 
 org.apache.cassandra.db.compaction.CompactionTask.execute(CompactionTask.java:199)
   at 
 org.apache.cassandra.db.compaction.LeveledCompactionTask.execute(LeveledCompactionTask.java:47)
   at 
 org.apache.cassandra.db.compaction.CompactionManager$1.call(CompactionManager.java:131)
   at 
 org.apache.cassandra.db.compaction.CompactionManager$1.call(CompactionManager.java:114)
   at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
   at java.util.concurrent.FutureTask.run(FutureTask.java:138)
   at 
 java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
   at 
 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
   at java.lang.Thread.run(Thread.java:662)
 and this is in json data for table:
 {
   generations : [ {
 generation : 0,
 members : [ 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 
 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484 ]
   }, {
 generation : 1,
 members : [ ]
   }, {
 generation : 2,
 members : [ ]
   }, {
 generation : 3,
 members : [ ]
   }, {
 generation : 4,
 members : [ ]
   }, {
 generation : 5,
 members : [ ]
   }, {
 generation : 6,
 members : [ ]
   }, {
 generation : 7,
 members : [ ]
   } ]
 }

--
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-4179) Add more general support for composites (to row key, column value)

2012-10-24 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis commented on CASSANDRA-4179:
---

It's actually exactly like a real PK; you can have exactly one row 
(collection of cells) per combination of those columns.

 Add more general support for composites (to row key, column value)
 --

 Key: CASSANDRA-4179
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4179
 Project: Cassandra
  Issue Type: Sub-task
  Components: API
Reporter: Sylvain Lebresne
Assignee: Sylvain Lebresne
Priority: Minor
  Labels: cql3
 Fix For: 1.2.0 beta 1

 Attachments: 4179-2.txt, 4179.txt


 Currently CQL3 have a nice syntax for using composites in the column name 
 (it's more than that in fact, it creates a whole new abstraction but let's 
 say I'm talking implementation here). There is however 2 other place where 
 composites could be used (again implementation wise): the row key and the 
 column value. This ticket proposes to explore which of those make sense for 
 CQL3 and how.
 For the row key, I really think that CQL support makes sense. It's very 
 common (and useful) to want to stuff composite information in a row key. 
 Sharding a time serie (CASSANDRA-4176) is probably the best example but there 
 is other.
 For the column value it is less clear. CQL3 makes it very transparent and 
 convenient to store multiple related values into multiple columns so maybe 
 composites in a column value is much less needed. I do still see two cases 
 for which it could be handy:
 # to save some disk/memory space, if you do know it makes no sense to 
 insert/read two value separatly.
 # if you want to enforce that two values should not be inserted separatly. 
 I.e. to enforce a form of constraint to avoid programatic error.
 Those are not widely useful things, but my reasoning is that if whatever 
 syntax we come up for grouping row key in a composite trivially extends to 
 column values, why not support it.
 As for syntax I have 3 suggestions (that are just that, suggestions):
 # If we only care about allowing grouping for row keys:
 {noformat}
 CREATE TABLE timeline (
 name text,
 month int,
 ts timestamp,
 value text,
 PRIMARY KEY ((name, month), ts)
 )
 {noformat}
 # A syntax that could work for both grouping in row key and colum value:
 {noformat}
 CREATE TABLE timeline (
 name text,
 month int,
 ts timestamp,
 value1 text,
 value2 text,
 GROUP (name, month) as key,
 GROUP (value1, value2),
 PRIMARY KEY (key, ts)
 )
 {noformat}
 # An alternative to the preceding one:
 {noformat}
 CREATE TABLE timeline (
 name text,
 month int,
 ts timestamp,
 value1 text,
 value2 text,
 GROUP (name, month) as key,
 GROUP (value1, value2),
 PRIMARY KEY (key, ts)
 ) WITH GROUP (name, month) AS key
AND GROUP (value1, value2)
 {noformat}

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


[jira] [Resolved] (CASSANDRA-4853) composite row key

2012-10-24 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis resolved CASSANDRA-4853.
---

Resolution: Invalid

Please ask on the mailing list; this is for development.

 composite row key
 -

 Key: CASSANDRA-4853
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4853
 Project: Cassandra
  Issue Type: Task
  Components: Documentation  website
Affects Versions: 1.1.5
Reporter: cristina rodriguez

 I have a columnfamily with a composite key,
 create column family MyCF
 with key_validation_class = 'CompositeType(UTF8Type, UTF8Type)'
 and comparator = 'CompositeType(UTF8Type, UTF8Type)'
 and default_validation_class='CompositeType(UTF8Type, UTF8Type)'

 ;
 i store the row key with the value 1:1 ,1:2,1:3
 ---
 RowKey: 1:1
 = (column=colum1, value=value1, timestamp=1351093372962000)
 ---
 RowKey: 2:2
 = (column=colum1, value=value1, timestamp=1351093411137000)
 ---
 RowKey: 1:3
 = (column=colum1, value=value1, timestamp=135109338582)
 ---
 RowKey: 2:1
 = (column=colum1, value=value1, timestamp=1351093401162000)
 ---
 RowKey: 1:2
 = (column=colum1, value=value1, timestamp=1351093379274000)
 ---
 RowKey: 2:3
 = (column=colum1, value=value1, timestamp=1351093421393000)
 i want to get all the row that estar wit 1,with cql  whit all that i read i 
 thought it could be posible, but i coudn´t do it. 
 i thought it would work with
 select * from MyCF where key'1:';
 any idea or example? 

--
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-4856) Thrift daemon is crashing the server

2012-10-24 Thread Brandon Williams (JIRA)

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

Brandon Williams resolved CASSANDRA-4856.
-

Resolution: Invalid

unable to create new native thread means the OS denied java.  It was probably 
related to your OS upgrade somehow.

 Thrift daemon is crashing the server
 

 Key: CASSANDRA-4856
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4856
 Project: Cassandra
  Issue Type: Bug
Affects Versions: 1.1.6
 Environment: MacOS 10.8.2
Reporter: Michael Yeh

 I'm new to cassandra and was looking at using the kundera thrift client.  I 
 was able to get the sample code working without any issues.  After upgrading 
 to mountain lion on my mac, I didn't realize I had lost the 
 /var/lib/cassandra directory.  When I tried to run the previously working 
 sample code, it would crash cassandra with the following stack trace:
 INFO 12:55:37,147 Listening for thrift clients...
 ERROR 12:55:43,545 Exception in thread Thread[Thread-3,5,main]
 java.lang.OutOfMemoryError: unable to create new native thread
   at java.lang.Thread.start0(Native Method)
   at java.lang.Thread.start(Thread.java:658)
   at 
 java.util.concurrent.ThreadPoolExecutor.addIfUnderMaximumPoolSize(ThreadPoolExecutor.java:727)
   at 
 java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:657)
   at 
 org.apache.cassandra.thrift.CustomTThreadPoolServer.serve(CustomTThreadPoolServer.java:103)
   at 
 org.apache.cassandra.thrift.CassandraDaemon$ThriftServer.run(CassandraDaemon.java:213)
 After realizing that I needed to recreate the keyspace and column families, 
 everything started to work again.  Although I'm no longer blocked with my 
 issue, no clients should ever be able to crash a server even if it is user 
 error.

--
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-4857) FileNotFoundException after create-drop-create keyspace

2012-10-24 Thread Tyler Patterson (JIRA)
Tyler Patterson created CASSANDRA-4857:
--

 Summary: FileNotFoundException after create-drop-create keyspace
 Key: CASSANDRA-4857
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4857
 Project: Cassandra
  Issue Type: Bug
 Environment: Cassandra trunk (565c576)
Reporter: Tyler Patterson


{code}
 INFO [CompactionExecutor:28] 2012-10-24 14:32:22,756 CompactionTask.java (line 
116) Compacting 
[SSTableReader(path='/var/lib/cassandra/data/Twissandra/Tweet/Twissandra-Tweet-ia-1-Data.db'),
 
SSTableReader(path='/var/lib/cassandra/data/Twissandra/Tweet/Twissandra-Tweet-ia-6-Data.db'),
 
SSTableReader(path='/var/lib/cassandra/data/Twissandra/Tweet/Twissandra-Tweet-ia-4-Data.db'),
 
SSTableReader(path='/var/lib/cassandra/data/Twissandra/Tweet/Twissandra-Tweet-ia-3-Data.db'),
 
SSTableReader(path='/var/lib/cassandra/data/Twissandra/Tweet/Twissandra-Tweet-ia-2-Data.db')]
ERROR [CompactionExecutor:28] 2012-10-24 14:32:22,758 CassandraDaemon.java 
(line 132) Exception in thread Thread[CompactionExecutor:28,1,main]
java.lang.RuntimeException: java.io.FileNotFoundException: 
/var/lib/cassandra/data/Twissandra/Tweet/Twissandra-Tweet-ia-1-Data.db (No such 
file or directory)
at 
org.apache.cassandra.io.compress.CompressedRandomAccessReader.open(CompressedRandomAccessReader.java:51)
at 
org.apache.cassandra.io.sstable.SSTableReader.openDataReader(SSTableReader.java:1094)
at 
org.apache.cassandra.io.sstable.SSTableScanner.init(SSTableScanner.java:51)
at 
org.apache.cassandra.io.sstable.SSTableReader.getDirectScanner(SSTableReader.java:937)
at 
org.apache.cassandra.io.sstable.SSTableReader.getDirectScanner(SSTableReader.java:949)
at 
org.apache.cassandra.db.compaction.AbstractCompactionStrategy.getScanners(AbstractCompactionStrategy.java:127)
at 
org.apache.cassandra.db.compaction.AbstractCompactionStrategy.getScanners(AbstractCompactionStrategy.java:133)
at 
org.apache.cassandra.db.compaction.CompactionTask.runWith(CompactionTask.java:128)
at 
org.apache.cassandra.io.util.DiskAwareRunnable.runMayThrow(DiskAwareRunnable.java:48)
at 
org.apache.cassandra.utils.WrappedRunnable.run(WrappedRunnable.java:28)
at 
org.apache.cassandra.db.compaction.CompactionTask.execute(CompactionTask.java:69)
at 
org.apache.cassandra.db.compaction.CompactionManager$BackgroundCompactionTask.run(CompactionManager.java:179)
at 
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:680)
Caused by: java.io.FileNotFoundException: 
/var/lib/cassandra/data/Twissandra/Tweet/Twissandra-Tweet-ia-1-Data.db (No such 
file or directory)
at java.io.RandomAccessFile.open(Native Method)
at java.io.RandomAccessFile.init(RandomAccessFile.java:216)
at 
org.apache.cassandra.io.util.RandomAccessReader.init(RandomAccessReader.java:64)
at 
org.apache.cassandra.io.compress.CompressedRandomAccessReader.init(CompressedRandomAccessReader.java:70)
at 
org.apache.cassandra.io.compress.CompressedRandomAccessReader.open(CompressedRandomAccessReader.java:47)
... 17 more
{code}

This error has been happening consistently using a modified version of the 
twissandra project. We have a script that loads in a bunch of tweet data. The 
error happens when I drop the keyspace, then recreate it and the 
columnfamilies, and rerun the script to load the data again.

--
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-4857) FileNotFoundException after create-drop-create keyspace

2012-10-24 Thread Tyler Patterson (JIRA)

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

Tyler Patterson updated CASSANDRA-4857:
---

Attachment: system.log

My full system.log 

 FileNotFoundException after create-drop-create keyspace
 ---

 Key: CASSANDRA-4857
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4857
 Project: Cassandra
  Issue Type: Bug
 Environment: Cassandra trunk (565c576)
Reporter: Tyler Patterson
 Attachments: system.log


 {code}
  INFO [CompactionExecutor:28] 2012-10-24 14:32:22,756 CompactionTask.java 
 (line 116) Compacting 
 [SSTableReader(path='/var/lib/cassandra/data/Twissandra/Tweet/Twissandra-Tweet-ia-1-Data.db'),
  
 SSTableReader(path='/var/lib/cassandra/data/Twissandra/Tweet/Twissandra-Tweet-ia-6-Data.db'),
  
 SSTableReader(path='/var/lib/cassandra/data/Twissandra/Tweet/Twissandra-Tweet-ia-4-Data.db'),
  
 SSTableReader(path='/var/lib/cassandra/data/Twissandra/Tweet/Twissandra-Tweet-ia-3-Data.db'),
  
 SSTableReader(path='/var/lib/cassandra/data/Twissandra/Tweet/Twissandra-Tweet-ia-2-Data.db')]
 ERROR [CompactionExecutor:28] 2012-10-24 14:32:22,758 CassandraDaemon.java 
 (line 132) Exception in thread Thread[CompactionExecutor:28,1,main]
 java.lang.RuntimeException: java.io.FileNotFoundException: 
 /var/lib/cassandra/data/Twissandra/Tweet/Twissandra-Tweet-ia-1-Data.db (No 
 such file or directory)
   at 
 org.apache.cassandra.io.compress.CompressedRandomAccessReader.open(CompressedRandomAccessReader.java:51)
   at 
 org.apache.cassandra.io.sstable.SSTableReader.openDataReader(SSTableReader.java:1094)
   at 
 org.apache.cassandra.io.sstable.SSTableScanner.init(SSTableScanner.java:51)
   at 
 org.apache.cassandra.io.sstable.SSTableReader.getDirectScanner(SSTableReader.java:937)
   at 
 org.apache.cassandra.io.sstable.SSTableReader.getDirectScanner(SSTableReader.java:949)
   at 
 org.apache.cassandra.db.compaction.AbstractCompactionStrategy.getScanners(AbstractCompactionStrategy.java:127)
   at 
 org.apache.cassandra.db.compaction.AbstractCompactionStrategy.getScanners(AbstractCompactionStrategy.java:133)
   at 
 org.apache.cassandra.db.compaction.CompactionTask.runWith(CompactionTask.java:128)
   at 
 org.apache.cassandra.io.util.DiskAwareRunnable.runMayThrow(DiskAwareRunnable.java:48)
   at 
 org.apache.cassandra.utils.WrappedRunnable.run(WrappedRunnable.java:28)
   at 
 org.apache.cassandra.db.compaction.CompactionTask.execute(CompactionTask.java:69)
   at 
 org.apache.cassandra.db.compaction.CompactionManager$BackgroundCompactionTask.run(CompactionManager.java:179)
   at 
 java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439)
   at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
   at java.util.concurrent.FutureTask.run(FutureTask.java:138)
   at 
 java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
   at 
 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
   at java.lang.Thread.run(Thread.java:680)
 Caused by: java.io.FileNotFoundException: 
 /var/lib/cassandra/data/Twissandra/Tweet/Twissandra-Tweet-ia-1-Data.db (No 
 such file or directory)
   at java.io.RandomAccessFile.open(Native Method)
   at java.io.RandomAccessFile.init(RandomAccessFile.java:216)
   at 
 org.apache.cassandra.io.util.RandomAccessReader.init(RandomAccessReader.java:64)
   at 
 org.apache.cassandra.io.compress.CompressedRandomAccessReader.init(CompressedRandomAccessReader.java:70)
   at 
 org.apache.cassandra.io.compress.CompressedRandomAccessReader.open(CompressedRandomAccessReader.java:47)
   ... 17 more
 {code}
 This error has been happening consistently using a modified version of the 
 twissandra project. We have a script that loads in a bunch of tweet data. The 
 error happens when I drop the keyspace, then recreate it and the 
 columnfamilies, and rerun the script to load the data again.

--
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-4854) Can not select the Schema table

2012-10-24 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis commented on CASSANDRA-4854:
---

Not sure if that's the problem, it works for me on current trunk:

{noformat}
...
CREATE KEYSPACE empty WITH replication = {
  'class': 'NetworkTopologyStrategy',
  'datacenter1': '1'
};
...
{noformat}


 Can not select the Schema table
 -

 Key: CASSANDRA-4854
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4854
 Project: Cassandra
  Issue Type: Bug
Reporter: Edward Capriolo
Priority: Minor

 Some system tables can be selected with data. Some return 0 rows. Schema 
 seems impossible to select because it's name is Schema
 {noformat}
 cqlsh:system select * from schema_keyspaces;
  keyspace_name | durable_writes | strategy_class  
  | strategy_options
 ---++--+
   testkeyspace |   True |  
 org.apache.cassandra.locator.SimpleStrategy | {replication_factor:1}
 testks |   True | 
 org.apache.cassandra.locator.NetworkTopologyStrategy |
 {datacenter1:1}
 cqlsh:system select * from Schema;
 Bad Request: line 1:14 no viable alternative at input 'Schema'
 cqlsh:system select * from Schema;
 cqlsh:system select * from `Schema`;
 Invalid syntax at line 1, char 15
   select * from `Schema`;
 ^
 cqlsh:system select * from `Schema`;
 Invalid syntax at line 1, char 15
   select * from `Schema`;
 ^
 cqlsh:system select * from 'Schema';
 Bad Request: line 1:14 no viable alternative at input 'Schema'
 Perhaps you meant to use CQL 2? Try using the -2 option when starting cqlsh.
 {noformat}

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


[jira] [Commented] (CASSANDRA-4856) Thrift daemon is crashing the server

2012-10-24 Thread Michael Yeh (JIRA)

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

Michael Yeh commented on CASSANDRA-4856:


Why did it work again once I recreated the keyspace and column family then?

 Thrift daemon is crashing the server
 

 Key: CASSANDRA-4856
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4856
 Project: Cassandra
  Issue Type: Bug
Affects Versions: 1.1.6
 Environment: MacOS 10.8.2
Reporter: Michael Yeh

 I'm new to cassandra and was looking at using the kundera thrift client.  I 
 was able to get the sample code working without any issues.  After upgrading 
 to mountain lion on my mac, I didn't realize I had lost the 
 /var/lib/cassandra directory.  When I tried to run the previously working 
 sample code, it would crash cassandra with the following stack trace:
 INFO 12:55:37,147 Listening for thrift clients...
 ERROR 12:55:43,545 Exception in thread Thread[Thread-3,5,main]
 java.lang.OutOfMemoryError: unable to create new native thread
   at java.lang.Thread.start0(Native Method)
   at java.lang.Thread.start(Thread.java:658)
   at 
 java.util.concurrent.ThreadPoolExecutor.addIfUnderMaximumPoolSize(ThreadPoolExecutor.java:727)
   at 
 java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:657)
   at 
 org.apache.cassandra.thrift.CustomTThreadPoolServer.serve(CustomTThreadPoolServer.java:103)
   at 
 org.apache.cassandra.thrift.CassandraDaemon$ThriftServer.run(CassandraDaemon.java:213)
 After realizing that I needed to recreate the keyspace and column families, 
 everything started to work again.  Although I'm no longer blocked with my 
 issue, no clients should ever be able to crash a server even if it is user 
 error.

--
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-4856) Thrift daemon is crashing the server

2012-10-24 Thread Michael Yeh (JIRA)

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

Michael Yeh edited comment on CASSANDRA-4856 at 10/24/12 9:00 PM:
--

Why did it work again once I recreated the keyspace and column family then?  
Did you at least try to repro it?

  was (Author: myeh):
Why did it work again once I recreated the keyspace and column family then?
  
 Thrift daemon is crashing the server
 

 Key: CASSANDRA-4856
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4856
 Project: Cassandra
  Issue Type: Bug
Affects Versions: 1.1.6
 Environment: MacOS 10.8.2
Reporter: Michael Yeh

 I'm new to cassandra and was looking at using the kundera thrift client.  I 
 was able to get the sample code working without any issues.  After upgrading 
 to mountain lion on my mac, I didn't realize I had lost the 
 /var/lib/cassandra directory.  When I tried to run the previously working 
 sample code, it would crash cassandra with the following stack trace:
 INFO 12:55:37,147 Listening for thrift clients...
 ERROR 12:55:43,545 Exception in thread Thread[Thread-3,5,main]
 java.lang.OutOfMemoryError: unable to create new native thread
   at java.lang.Thread.start0(Native Method)
   at java.lang.Thread.start(Thread.java:658)
   at 
 java.util.concurrent.ThreadPoolExecutor.addIfUnderMaximumPoolSize(ThreadPoolExecutor.java:727)
   at 
 java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:657)
   at 
 org.apache.cassandra.thrift.CustomTThreadPoolServer.serve(CustomTThreadPoolServer.java:103)
   at 
 org.apache.cassandra.thrift.CassandraDaemon$ThriftServer.run(CassandraDaemon.java:213)
 After realizing that I needed to recreate the keyspace and column families, 
 everything started to work again.  Although I'm no longer blocked with my 
 issue, no clients should ever be able to crash a server even if it is user 
 error.

--
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] [Assigned] (CASSANDRA-4855) Debian packaging doesn't do auto-reloading of log4j properties file

2012-10-24 Thread Brandon Williams (JIRA)

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

Brandon Williams reassigned CASSANDRA-4855:
---

Assignee: Brandon Williams

 Debian packaging doesn't do auto-reloading of log4j properties file
 ---

 Key: CASSANDRA-4855
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4855
 Project: Cassandra
  Issue Type: Bug
  Components: Packaging
Affects Versions: 1.1.5
Reporter: Rick Branson
Assignee: Brandon Williams
Priority: Minor
 Attachments: 4855.txt


 Cassandra isn't starting the log4j auto-reload thread because it requires 
 -Dlog4j.defaultInitOverride=true on initialization. Is there a reason to not 
 do this when installed from the Debian package?

--
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-4855) Debian packaging doesn't do auto-reloading of log4j properties file

2012-10-24 Thread Brandon Williams (JIRA)

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

Brandon Williams updated CASSANDRA-4855:


Attachment: 4855.txt

I don't see why not.  I guess when we added the reloading to bin/cassandra we 
neglected to also add it to the init.

 Debian packaging doesn't do auto-reloading of log4j properties file
 ---

 Key: CASSANDRA-4855
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4855
 Project: Cassandra
  Issue Type: Bug
  Components: Packaging
Affects Versions: 1.1.5
Reporter: Rick Branson
Assignee: Brandon Williams
Priority: Minor
 Attachments: 4855.txt


 Cassandra isn't starting the log4j auto-reload thread because it requires 
 -Dlog4j.defaultInitOverride=true on initialization. Is there a reason to not 
 do this when installed from the Debian package?

--
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-4852) make trace output pretty

2012-10-24 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis commented on CASSANDRA-4852:
---

Can you make {{Tracing session}} bold as well?

 make trace output pretty
 

 Key: CASSANDRA-4852
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4852
 Project: Cassandra
  Issue Type: Improvement
  Components: Tools
Affects Versions: 1.2.0 beta 1
Reporter: Jonathan Ellis
Assignee: Aleksey Yeschenko
Priority: Minor
 Fix For: 1.2.0

 Attachments: CASSANDRA-4852.txt


 In 069de3d0357fde037f3d9a25c7cef38b5ae5e5a8 I changed trace output to only 
 show activity, source, and source elapsed.  This is fairly usable but we can 
 do better.

--
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-4855) Debian packaging doesn't do auto-reloading of log4j properties file

2012-10-24 Thread Brandon Williams (JIRA)

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

Brandon Williams updated CASSANDRA-4855:


 Reviewer: rbranson
Affects Version/s: (was: 1.1.5)
Fix Version/s: 1.1.7

 Debian packaging doesn't do auto-reloading of log4j properties file
 ---

 Key: CASSANDRA-4855
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4855
 Project: Cassandra
  Issue Type: Bug
  Components: Packaging
Reporter: Rick Branson
Assignee: Brandon Williams
Priority: Minor
 Fix For: 1.1.7

 Attachments: 4855.txt


 Cassandra isn't starting the log4j auto-reload thread because it requires 
 -Dlog4j.defaultInitOverride=true on initialization. Is there a reason to not 
 do this when installed from the Debian package?

--
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-4858) Coverage analysis for low-CL queries

2012-10-24 Thread Jonathan Ellis (JIRA)
Jonathan Ellis created CASSANDRA-4858:
-

 Summary: Coverage analysis for low-CL queries
 Key: CASSANDRA-4858
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4858
 Project: Cassandra
  Issue Type: Improvement
  Components: Core
Reporter: Jonathan Ellis
 Fix For: 1.3


There are many cases where getRangeSlice creates more
RangeSliceCommand than it should, because it always creates one for each range
returned by getRestrictedRange.  Especially for CL.ONE this does not take
the replication factor into account and is potentially pretty wasteful.
A range slice at CL.ONE on a 3 node cluster with RF=3 should only
ever create one RangeSliceCommand.


--
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: mv cqlshrc example out of bin

2012-10-24 Thread brandonwilliams
Updated Branches:
  refs/heads/cassandra-1.1 6f31aba0e - e4fc1ebba


mv cqlshrc example out of bin


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

Branch: refs/heads/cassandra-1.1
Commit: e4fc1ebbad6391a7075dee6f1c6a3a9bf57c3b44
Parents: 6f31aba
Author: Brandon Williams brandonwilli...@apache.org
Authored: Wed Oct 24 16:27:22 2012 -0500
Committer: Brandon Williams brandonwilli...@apache.org
Committed: Wed Oct 24 16:27:27 2012 -0500

--
 bin/cqlshrc.sample  |   35 ---
 conf/cqlshrc.sample |   35 +++
 2 files changed, 35 insertions(+), 35 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/e4fc1ebb/bin/cqlshrc.sample
--
diff --git a/bin/cqlshrc.sample b/bin/cqlshrc.sample
deleted file mode 100644
index 07cf73f..000
--- a/bin/cqlshrc.sample
+++ /dev/null
@@ -1,35 +0,0 @@
-; 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.
-;
-; Sample ~/.cqlshrc file.
-
-[authentication]
-username = fred
-password = !!bang!!$
-
-[ui]
-color = on
-completekey = tab
-
-[connection]
-hostname = 127.0.0.1
-port = 9160
-
-[cql]
-version = 2.0
-
-; vim: set ft=dosini :

http://git-wip-us.apache.org/repos/asf/cassandra/blob/e4fc1ebb/conf/cqlshrc.sample
--
diff --git a/conf/cqlshrc.sample b/conf/cqlshrc.sample
new file mode 100644
index 000..07cf73f
--- /dev/null
+++ b/conf/cqlshrc.sample
@@ -0,0 +1,35 @@
+; 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.
+;
+; Sample ~/.cqlshrc file.
+
+[authentication]
+username = fred
+password = !!bang!!$
+
+[ui]
+color = on
+completekey = tab
+
+[connection]
+hostname = 127.0.0.1
+port = 9160
+
+[cql]
+version = 2.0
+
+; vim: set ft=dosini :



[1/3] git commit: Add ssl support to cqlsh. Patch by Aleksey Yeschenko, reviewed by brandonwilliams for CASSANDRA-4610

2012-10-24 Thread brandonwilliams
Updated Branches:
  refs/heads/trunk 565c57684 - bc4df221e


Add ssl support to cqlsh.
Patch by Aleksey Yeschenko, reviewed by brandonwilliams for
CASSANDRA-4610


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

Branch: refs/heads/trunk
Commit: bc4df221ef39383f387438928688bceee4f42153
Parents: 98effbf
Author: Brandon Williams brandonwilli...@apache.org
Authored: Wed Oct 24 16:35:29 2012 -0500
Committer: Brandon Williams brandonwilli...@apache.org
Committed: Wed Oct 24 16:35:29 2012 -0500

--
 conf/cqlshrc.sample   |   17 +-
 pylib/cqlshlib/ssl.py |   70 
 2 files changed, 85 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/bc4df221/conf/cqlshrc.sample
--
diff --git a/conf/cqlshrc.sample b/conf/cqlshrc.sample
index 07cf73f..365defd 100644
--- a/conf/cqlshrc.sample
+++ b/conf/cqlshrc.sample
@@ -25,11 +25,24 @@ password = !!bang!!$
 color = on
 completekey = tab
 
+[cql]
+version = 3.0
+
 [connection]
 hostname = 127.0.0.1
 port = 9160
+; enable below for ssl
+;factory = cqlshlib.ssl.ssl_transport_factory
+
+;[ssl]
+;certfile = ~/keys/cassandra.cert
+;; optional - true by default.
+;validate = true
+
+;; optional section, overrides default certfile in [ssl] section, if present
+;[certfiles]
+;192.168.1.3 = ~/keys/cassandra01.cert
+;192.168.1.4 = ~/keys/cassandra02.cert
 
-[cql]
-version = 2.0
 
 ; vim: set ft=dosini :

http://git-wip-us.apache.org/repos/asf/cassandra/blob/bc4df221/pylib/cqlshlib/ssl.py
--
diff --git a/pylib/cqlshlib/ssl.py b/pylib/cqlshlib/ssl.py
new file mode 100644
index 000..3400b40
--- /dev/null
+++ b/pylib/cqlshlib/ssl.py
@@ -0,0 +1,70 @@
+# 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.
+
+import os
+import sys
+import ConfigParser
+from thrift.transport import TSSLSocket, TTransport
+
+def ssl_transport_factory(host, port, env, config_file):
+
+SSL Thrift transport factory function.
+
+Params:
+* host .: hostname of Cassandra node.
+* port .: port number to connect to.
+* env ..: environment variables. SSL factory will use, if passed,
+  SSL_CERTFILE and SSL_VALIDATE variables.
+* config_file ..: path to cqlsh config file (usually ~/.cqlshrc).
+  SSL factory will use, if set, certfile and validate
+  options in [ssl] section, as well as host to certfile
+  mapping in [certfiles] section.
+
+[certfiles] section is optional, 'validate' setting in [ssl] section is
+optional too. If validation is enabled then SSL certfile must be provided
+either in the config file or as an environment variable.
+Environment variables override any options set in cqlsh config file.
+
+configs = ConfigParser.SafeConfigParser()
+configs.read(config_file)
+
+def get_option(section, option):
+try:
+return configs.get(section, option)
+except ConfigParser.Error:
+return None
+
+ssl_validate = env.get('SSL_VALIDATE')
+if ssl_validate is None:
+ssl_validate = get_option('ssl', 'validate')
+ssl_validate = ssl_validate is None or ssl_validate.lower() != 'false'
+
+ssl_certfile = env.get('SSL_CERTFILE')
+if ssl_certfile is None:
+ssl_certfile = get_option('certfiles', host)
+if ssl_certfile is None:
+ssl_certfile = get_option('ssl', 'certfile')
+if ssl_validate and ssl_certfile is None:
+sys.exit(Validation is enabled; SSL transport factory requires a 
valid certfile 
+ to be specified. Please provide path to the certfile in 
[ssl] section 
+ as 'certfile' option in %s (or use [certfiles] section) or 
set 

[3/3] git commit: mv cqlshrc example out of bin

2012-10-24 Thread brandonwilliams
mv cqlshrc example out of bin


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

Branch: refs/heads/trunk
Commit: e4fc1ebbad6391a7075dee6f1c6a3a9bf57c3b44
Parents: 6f31aba
Author: Brandon Williams brandonwilli...@apache.org
Authored: Wed Oct 24 16:27:22 2012 -0500
Committer: Brandon Williams brandonwilli...@apache.org
Committed: Wed Oct 24 16:27:27 2012 -0500

--
 bin/cqlshrc.sample  |   35 ---
 conf/cqlshrc.sample |   35 +++
 2 files changed, 35 insertions(+), 35 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/e4fc1ebb/bin/cqlshrc.sample
--
diff --git a/bin/cqlshrc.sample b/bin/cqlshrc.sample
deleted file mode 100644
index 07cf73f..000
--- a/bin/cqlshrc.sample
+++ /dev/null
@@ -1,35 +0,0 @@
-; 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.
-;
-; Sample ~/.cqlshrc file.
-
-[authentication]
-username = fred
-password = !!bang!!$
-
-[ui]
-color = on
-completekey = tab
-
-[connection]
-hostname = 127.0.0.1
-port = 9160
-
-[cql]
-version = 2.0
-
-; vim: set ft=dosini :

http://git-wip-us.apache.org/repos/asf/cassandra/blob/e4fc1ebb/conf/cqlshrc.sample
--
diff --git a/conf/cqlshrc.sample b/conf/cqlshrc.sample
new file mode 100644
index 000..07cf73f
--- /dev/null
+++ b/conf/cqlshrc.sample
@@ -0,0 +1,35 @@
+; 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.
+;
+; Sample ~/.cqlshrc file.
+
+[authentication]
+username = fred
+password = !!bang!!$
+
+[ui]
+color = on
+completekey = tab
+
+[connection]
+hostname = 127.0.0.1
+port = 9160
+
+[cql]
+version = 2.0
+
+; vim: set ft=dosini :



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

2012-10-24 Thread brandonwilliams
Merge branch 'cassandra-1.1' into trunk


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

Branch: refs/heads/trunk
Commit: 98effbf617bd1790e0ffbf7d4214ce018d7045d0
Parents: 565c576 e4fc1eb
Author: Brandon Williams brandonwilli...@apache.org
Authored: Wed Oct 24 16:29:27 2012 -0500
Committer: Brandon Williams brandonwilli...@apache.org
Committed: Wed Oct 24 16:29:27 2012 -0500

--
 bin/cqlshrc.sample  |   35 ---
 conf/cqlshrc.sample |   35 +++
 2 files changed, 35 insertions(+), 35 deletions(-)
--




[jira] [Created] (CASSANDRA-4859) Include number of entries in CachedService

2012-10-24 Thread Chris Burroughs (JIRA)
Chris Burroughs created CASSANDRA-4859:
--

 Summary: Include number of entries in CachedService
 Key: CASSANDRA-4859
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4859
 Project: Cassandra
  Issue Type: Improvement
  Components: Core
Affects Versions: 1.1.6
Reporter: Chris Burroughs
Assignee: Chris Burroughs
Priority: Minor
 Fix For: 1.1.7


CacheServiceMBean only includes the weighted size, but not the number of 
entries.  In addition to (I think) being generally useful information it's hard 
to make sense of cache performance from pre-mem0estimation C* versions without 
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-4859) Include number of entries in CachedService

2012-10-24 Thread Chris Burroughs (JIRA)

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

Chris Burroughs updated CASSANDRA-4859:
---

Attachment: 1.1-4859.txt

 Include number of entries in CachedService
 --

 Key: CASSANDRA-4859
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4859
 Project: Cassandra
  Issue Type: Improvement
  Components: Core
Affects Versions: 1.1.6
Reporter: Chris Burroughs
Assignee: Chris Burroughs
Priority: Minor
 Fix For: 1.1.7

 Attachments: 1.1-4859.txt


 CacheServiceMBean only includes the weighted size, but not the number of 
 entries.  In addition to (I think) being generally useful information it's 
 hard to make sense of cache performance from pre-mem0estimation C* versions 
 without 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-4852) make trace output pretty

2012-10-24 Thread Aleksey Yeschenko (JIRA)

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

Aleksey Yeschenko commented on CASSANDRA-4852:
--

There is no bold, there is only 'bright', but many people seem to use 'bold', 
so whatever.
We already have that color in bold (MAGENTA instead of DARK_MAGENTA, which is 
the color of the column headers as you requested initially). Attaching a new 
patch..


 make trace output pretty
 

 Key: CASSANDRA-4852
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4852
 Project: Cassandra
  Issue Type: Improvement
  Components: Tools
Affects Versions: 1.2.0 beta 1
Reporter: Jonathan Ellis
Assignee: Aleksey Yeschenko
Priority: Minor
 Fix For: 1.2.0

 Attachments: CASSANDRA-4852.txt


 In 069de3d0357fde037f3d9a25c7cef38b5ae5e5a8 I changed trace output to only 
 show activity, source, and source elapsed.  This is fairly usable but we can 
 do better.

--
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-4852) make trace output pretty

2012-10-24 Thread Aleksey Yeschenko (JIRA)

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

Aleksey Yeschenko updated CASSANDRA-4852:
-

Attachment: CASSANDRA-4852.txt

 make trace output pretty
 

 Key: CASSANDRA-4852
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4852
 Project: Cassandra
  Issue Type: Improvement
  Components: Tools
Affects Versions: 1.2.0 beta 1
Reporter: Jonathan Ellis
Assignee: Aleksey Yeschenko
Priority: Minor
 Fix For: 1.2.0

 Attachments: CASSANDRA-4852.txt


 In 069de3d0357fde037f3d9a25c7cef38b5ae5e5a8 I changed trace output to only 
 show activity, source, and source elapsed.  This is fairly usable but we can 
 do better.

--
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-4852) make trace output pretty

2012-10-24 Thread Aleksey Yeschenko (JIRA)

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

Aleksey Yeschenko updated CASSANDRA-4852:
-

Attachment: (was: CASSANDRA-4852.txt)

 make trace output pretty
 

 Key: CASSANDRA-4852
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4852
 Project: Cassandra
  Issue Type: Improvement
  Components: Tools
Affects Versions: 1.2.0 beta 1
Reporter: Jonathan Ellis
Assignee: Aleksey Yeschenko
Priority: Minor
 Fix For: 1.2.0

 Attachments: CASSANDRA-4852.txt


 In 069de3d0357fde037f3d9a25c7cef38b5ae5e5a8 I changed trace output to only 
 show activity, source, and source elapsed.  This is fairly usable but we can 
 do better.

--
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-4785) Secondary Index Sporadically Doesn't Return Rows

2012-10-24 Thread Arya Goudarzi (JIRA)

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

Arya Goudarzi updated CASSANDRA-4785:
-

Affects Version/s: 1.1.6

 Secondary Index Sporadically Doesn't Return Rows
 

 Key: CASSANDRA-4785
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4785
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Affects Versions: 1.1.5, 1.1.6
 Environment: Ubuntu 10.04
 Java 6 Sun
 Cassandra 1.1.5 upgraded from 1.1.2 - 1.1.3 - 1.1.5
Reporter: Arya Goudarzi

 I have a ColumnFamily with caching = ALL. I have 2 secondary indexes on it. I 
 have noticed if I query using the secondary index in the where clause, 
 sometimes I get the results and sometimes I don't. Until 2 weeks ago, the 
 caching option on this CF was set to NONE. So, I suspect something happened 
 in secondary index caching scheme. 
 Here are things I tried:
 1. I rebuild indexes for that CF on all nodes;
 2. I set the caching to KEYS_ONLY and rebuild the index again;
 3. I set the caching to NONE and rebuild the index again;
 None of the above helped. I suppose the caching still exists as this behavior 
 looks like cache mistmatch.
 I did a bit research, and found CASSANDRA-4197 that could be related.
 Please advice.

--
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-4856) Thrift daemon is crashing the server

2012-10-24 Thread Michael Yeh (JIRA)

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

Michael Yeh reopened CASSANDRA-4856:



Brandon's comment suggesting it was environment specific was incorrect.  It 
worked correctly once the namespace and column family was created.  The server 
should never crash even if was not initialized correctly.

 Thrift daemon is crashing the server
 

 Key: CASSANDRA-4856
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4856
 Project: Cassandra
  Issue Type: Bug
Affects Versions: 1.1.6
 Environment: MacOS 10.8.2
Reporter: Michael Yeh

 I'm new to cassandra and was looking at using the kundera thrift client.  I 
 was able to get the sample code working without any issues.  After upgrading 
 to mountain lion on my mac, I didn't realize I had lost the 
 /var/lib/cassandra directory.  When I tried to run the previously working 
 sample code, it would crash cassandra with the following stack trace:
 INFO 12:55:37,147 Listening for thrift clients...
 ERROR 12:55:43,545 Exception in thread Thread[Thread-3,5,main]
 java.lang.OutOfMemoryError: unable to create new native thread
   at java.lang.Thread.start0(Native Method)
   at java.lang.Thread.start(Thread.java:658)
   at 
 java.util.concurrent.ThreadPoolExecutor.addIfUnderMaximumPoolSize(ThreadPoolExecutor.java:727)
   at 
 java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:657)
   at 
 org.apache.cassandra.thrift.CustomTThreadPoolServer.serve(CustomTThreadPoolServer.java:103)
   at 
 org.apache.cassandra.thrift.CassandraDaemon$ThriftServer.run(CassandraDaemon.java:213)
 After realizing that I needed to recreate the keyspace and column families, 
 everything started to work again.  Although I'm no longer blocked with my 
 issue, no clients should ever be able to crash a server even if it is user 
 error.

--
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-3306) Error in LeveledCompactionStrategy

2012-10-24 Thread Yuki Morishita (JIRA)

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

Yuki Morishita commented on CASSANDRA-3306:
---

bq. But we close the session on convict, so shouldn't it start a new one?

Yes, StreamInSession gets closed and removed on convict _once_. But if GC pause 
happens in the middle of streaming session, the node resumes streaming in the 
same session after GC. Since resumed stream carries session ID that is once 
closed on receiver side, StreamInSession is created again with the same old 
session ID and this time just 1 file to receive.
This continues again and again until source node's StreamingOutSession sends 
all files.
You can see this in receiver's log file like below:

{code}
INFO [Thread-50] 2012-10-20 13:13:26,574 StreamInSession.java (line 214) 
Finished streaming session 10 from /10.xx.xx.xx
INFO [Thread-51] 2012-10-20 13:13:29,691 StreamInSession.java (line 214) 
Finished streaming session 10 from /10.xx.xx.xx
INFO [Thread-52] 2012-10-20 13:13:32,957 StreamInSession.java (line 214) 
Finished streaming session 10 from /10.xx.xx.xx
{code}

Duplication happens during this partially broken streaming session. Because 
StreamInSession is removed after sending SESSION_FINISHED reply, and 
StreamOutSession keeps sending files, sometimes the same StreamInSession 
instance receives more than 1 file and calls closeIfFinished every time it 
received the file.
(Sorry, this is hard to explain in words.
https://github.com/apache/cassandra/blob/cassandra-1.1.6/src/java/org/apache/cassandra/streaming/StreamInSession.java#L181
 this part is executed multiple times with _readers_ growing by received new 
file.)

So as Sylvain stated above, changing DataTracker.View's sstable to Set is one 
way to eliminate duplicate reference and we should do it. In addition, I'm 
thinking not to create duplicate StreamInSession by checking 
StreamHeader.pendingFiles because this field is only filled when initiating 
streaming.

 Error in LeveledCompactionStrategy
 --

 Key: CASSANDRA-3306
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3306
 Project: Cassandra
  Issue Type: Bug
Affects Versions: 1.0.0
Reporter: Radim Kolar
Assignee: Yuki Morishita
 Attachments: 0001-CASSANDRA-3306-test.patch


 during stress testing, i always get this error making leveledcompaction 
 strategy unusable. Should be easy to reproduce - just write fast.
 ERROR [CompactionExecutor:6] 2011-10-04 15:48:52,179 
 AbstractCassandraDaemon.java (line 133) Fatal exception in thread 
 Thread[CompactionExecutor:6,5,main]
 java.lang.AssertionError
   at 
 org.apache.cassandra.db.DataTracker$View.newSSTables(DataTracker.java:580)
   at 
 org.apache.cassandra.db.DataTracker$View.replace(DataTracker.java:546)
   at org.apache.cassandra.db.DataTracker.replace(DataTracker.java:268)
   at 
 org.apache.cassandra.db.DataTracker.replaceCompactedSSTables(DataTracker.java:232)
   at 
 org.apache.cassandra.db.ColumnFamilyStore.replaceCompactedSSTables(ColumnFamilyStore.java:960)
   at 
 org.apache.cassandra.db.compaction.CompactionTask.execute(CompactionTask.java:199)
   at 
 org.apache.cassandra.db.compaction.LeveledCompactionTask.execute(LeveledCompactionTask.java:47)
   at 
 org.apache.cassandra.db.compaction.CompactionManager$1.call(CompactionManager.java:131)
   at 
 org.apache.cassandra.db.compaction.CompactionManager$1.call(CompactionManager.java:114)
   at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
   at java.util.concurrent.FutureTask.run(FutureTask.java:138)
   at 
 java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
   at 
 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
   at java.lang.Thread.run(Thread.java:662)
 and this is in json data for table:
 {
   generations : [ {
 generation : 0,
 members : [ 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 
 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484 ]
   }, {
 generation : 1,
 members : [ ]
   }, {
 generation : 2,
 members : [ ]
   }, {
 generation : 3,
 members : [ ]
   }, {
 generation : 4,
 members : [ ]
   }, {
 generation : 5,
 members : [ ]
   }, {
 generation : 6,
 members : [ ]
   }, {
 generation : 7,
 members : [ ]
   } ]
 }

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


[1/2] git commit: include range bounds in debug logging of range and index scans

2012-10-24 Thread jbellis
Updated Branches:
  refs/heads/trunk bc4df221e - 8f46176e9


include range bounds in debug logging of range and index scans


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

Branch: refs/heads/trunk
Commit: 0d10424a7f577c9f7c654e87f05e83ad36373e35
Parents: bc4df22
Author: Jonathan Ellis jbel...@apache.org
Authored: Wed Oct 24 16:20:00 2012 -0500
Committer: Jonathan Ellis jbel...@apache.org
Committed: Wed Oct 24 17:03:46 2012 -0500

--
 .../org/apache/cassandra/db/ColumnFamilyStore.java |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/0d10424a/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
--
diff --git a/src/java/org/apache/cassandra/db/ColumnFamilyStore.java 
b/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
index 5f326d5..fae37a2 100644
--- a/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
+++ b/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
@@ -1438,7 +1438,7 @@ public class ColumnFamilyStore implements 
ColumnFamilyStoreMBean
 
 public ListRow getRangeSlice(ByteBuffer superColumn, final 
AbstractBoundsRowPosition range, int maxResults, IFilter columnFilter, 
ListIndexExpression rowFilter, boolean maxIsColumns, boolean isPaging)
 {
-logger.debug(Executing seq scan);
+logger.debug(Executing seq scan for {}..{}, range.left, range.right);
 return filter(getSequentialIterator(superColumn, range, columnFilter), 
ExtendedFilter.create(this, columnFilter, rowFilter, maxResults, maxIsColumns, 
isPaging));
 }
 
@@ -1449,7 +1449,7 @@ public class ColumnFamilyStore implements 
ColumnFamilyStoreMBean
 
 public ListRow search(ListIndexExpression clause, 
AbstractBoundsRowPosition range, int maxResults, IFilter dataFilter, boolean 
maxIsColumns)
 {
-logger.debug(Executing indexed scan);
+logger.debug(Executing indexed scan for {}..{}, range.left, 
range.right);
 return indexManager.search(clause, range, maxResults, dataFilter, 
maxIsColumns);
 }
 



[2/2] git commit: make trace output pretty patch by Aleksey Yeschenko; reviewed by jbellis for CASSANDRA-4852

2012-10-24 Thread jbellis
make trace output pretty
patch by Aleksey Yeschenko; reviewed by jbellis for CASSANDRA-4852


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

Branch: refs/heads/trunk
Commit: 8f46176e988f1e05a6eb54d238ff7fb32ad0861b
Parents: 0d10424
Author: Jonathan Ellis jbel...@apache.org
Authored: Wed Oct 24 17:03:26 2012 -0500
Committer: Jonathan Ellis jbel...@apache.org
Committed: Wed Oct 24 17:03:46 2012 -0500

--
 bin/cqlsh |   28 
 1 files changed, 24 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/8f46176e/bin/cqlsh
--
diff --git a/bin/cqlsh b/bin/cqlsh
index 4229b81..0b0d6f8 100755
--- a/bin/cqlsh
+++ b/bin/cqlsh
@@ -106,7 +106,7 @@ if os.path.isdir(cqlshlibdir):
 sys.path.insert(0, cqlshlibdir)
 
 from cqlshlib import cqlhandling, cql3handling, pylexotron
-from cqlshlib.displaying import (RED, BLUE, ANSI_RESET, COLUMN_NAME_COLORS,
+from cqlshlib.displaying import (MAGENTA, RED, BLUE, ANSI_RESET, 
COLUMN_NAME_COLORS,
  FormattedValue, colorme)
 from cqlshlib.formatting import format_by_type
 from cqlshlib.util import trim_if_present
@@ -1021,9 +1021,13 @@ class Shell(cmd.Cmd):
 return True
 
 def print_trace(self, session_id):
-out = self.query_out
-out.write('\nTracing session: %s\n\n' % session_id)
-self.perform_statement_untraced(SELECT activity, source, 
source_elapsed FROM system_traces.events WHERE session_id = '%s' % session_id)
+self.writeresult('Tracing session: ', color=MAGENTA, newline=False)
+self.writeresult(session_id)
+self.writeresult('')
+self.perform_statement_untraced(SELECT activity, event_id, source, 
source_elapsed 
+FROM system_traces.events 
+WHERE session_id = '%s' % 
(session_id,),
+decoder=TraceSchemaDecoder)
 
 # these next two functions are not guaranteed perfect; just checks if the
 # statement parses fully according to cqlsh's own understanding of the
@@ -2644,6 +2648,22 @@ class 
ErrorHandlingSchemaDecoder(OverrideableSchemaDecoder):
 def value_decode_error(self, err, namebytes, valuebytes, expectedtype):
 return DecodeError(valuebytes, err, expectedtype, colname=namebytes)
 
+class TraceSchemaDecoder(cql.decoders.SchemaDecoder):
+def __init__(self, schema):
+cql.decoders.SchemaDecoder.__init__(self, schema)
+
+def decode_metadata_and_type(self, namebytes):
+# override event_id columnname and type.
+if namebytes == 'event_id':
+return u'timestamp', 'timestamp', cql.cqltypes.UTF8Type, 
cql.cqltypes.UTF8Type
+return cql.decoders.SchemaDecoder.decode_metadata_and_type(self, 
namebytes)
+
+def decode_value(self, valbytes, vtype, colname):
+if colname == 'timestamp':
+millis = (UUID(bytes=valbytes).get_time() - 0x01b21dd213814000) / 
1
+s, ms = divmod(millis, 1000)
+return time.strftime('%H:%M:%S', time.localtime(s)) + ',' + 
str(ms).rjust(3, '0')
+return cql.decoders.SchemaDecoder.decode_value(self, valbytes, vtype, 
colname)
 
 def option_with_default(cparser_getter, section, option, default=None):
 try:



[jira] [Comment Edited] (CASSANDRA-4837) IllegalStateException when upgrading schema

2012-10-24 Thread Wade Simmons (JIRA)

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

Wade Simmons edited comment on CASSANDRA-4837 at 10/24/12 10:04 PM:


schematables from 1.1.2 node. Trying to upgrade one node in the cluster to 
1.1.6 causes migration errors from 1.1.2 nodes that have these tables.

You will notice that we have a modification in our system to allow @ chars in 
CF names, but that shouldn't be causing the issue here.

  was (Author: wadey):
schematables from 1.1.2 node. Trying to upgrade one node in the cluster to 
1.1.6 causes migration errors from nodes that have these tables.

You will notice that we have a modification in our system to allow @ chars in 
CF names, but that shouldn't be causing the issue here.
  
 IllegalStateException when upgrading schema
 ---

 Key: CASSANDRA-4837
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4837
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Affects Versions: 1.1.6
 Environment: Linux
Reporter: Wade Simmons
Assignee: Pavel Yaskevich
 Attachments: schematables.tar.gz


 I am upgrading a cluster from 1.1.2 to 1.1.6. When restarting a node with new 
 code, I am seeing this exception repeat in the logs:
 {code}
 ERROR [InternalResponseStage:21] 2012-10-19 00:41:26,794 
 AbstractCassandraDaemon.java (line 135) Exception in thread 
 Thread[InternalResponseStage:21,5,main]
 java.lang.IllegalStateException: One row required, 0 found
 at 
 org.apache.cassandra.cql3.UntypedResultSet.one(UntypedResultSet.java:50)
 at 
 org.apache.cassandra.config.KSMetaData.fromSchema(KSMetaData.java:258)
 at 
 org.apache.cassandra.db.DefsTable.mergeKeyspaces(DefsTable.java:406)
 at org.apache.cassandra.db.DefsTable.mergeSchema(DefsTable.java:355)
 at 
 org.apache.cassandra.db.DefsTable.mergeRemoteSchema(DefsTable.java:329)
 at 
 org.apache.cassandra.service.MigrationManager$MigrationTask$1.response(MigrationManager.java:449)
 at 
 org.apache.cassandra.net.ResponseVerbHandler.doVerb(ResponseVerbHandler.java:45)
 at 
 org.apache.cassandra.net.MessageDeliveryTask.run(MessageDeliveryTask.java:59)
 at 
 java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
 at 
 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
 at java.lang.Thread.run(Thread.java:662)
 {code}
 I added in some debugging logging to see what Row it was trying to load, and 
 I see this:
 {code}
 Unable to load keyspace schema: 
 Row(key=DecoratedKey(112573196966143652100562749464385838776, 
 5365676d656e7473496e746567726174696f6e54657374), 
 cf=ColumnFamily(schema_keyspaces -deleted at 1350665377628000- []))
 {code}
 The hex key translates to a schema that exists in schema_keyspaces when I 
 query on the rest of the cluster. I tried restarting one of the other nodes 
 without upgrading the jar and it restarted without exceptions.

--
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-4860) Estimated Row Cache Entry size incorrect (always 24?)

2012-10-24 Thread Chris Burroughs (JIRA)
Chris Burroughs created CASSANDRA-4860:
--

 Summary: Estimated Row Cache Entry size incorrect (always 24?)
 Key: CASSANDRA-4860
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4860
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Affects Versions: 1.1.6
Reporter: Chris Burroughs


After running for several hours the RowCacheSize was suspicious low (ie 70 
something MB)  I used  CASSANDRA-4859 to measure the size and number of entries 
on a node:

In [3]: 1560504./65021
Out[3]: 24.0

In [4]: 2149464./89561
Out[4]: 24.0

In [6]: 7216096./300785
Out[6]: 23.990877204647838


That's RowCacheSize/RowCacheNumEntires  .  Just to prove I don't have crazy 
small rows the mean size of the row *keys* in the saved cache is 67 and 
Compacted row mean size: 355.  No jamm errors in the log

Config notes:
row_cache_provider: ConcurrentLinkedHashCacheProvider
row_cache_size_in_mb: 2048

Version info:
 * C*: 1.1.6
 * centos 2.6.32-220.13.1.el6.x86_64
 * java 6u31 Java HotSpot(TM) 64-Bit Server VM (build 20.6-b01, mixed mode)

--
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-4857) FileNotFoundException after create-drop-create keyspace

2012-10-24 Thread Brandon Williams (JIRA)

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

Brandon Williams commented on CASSANDRA-4857:
-

This can be simplified to on drop, we don't do anything with the actual 
files. We just flush the schema, don't even snapshot.

 FileNotFoundException after create-drop-create keyspace
 ---

 Key: CASSANDRA-4857
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4857
 Project: Cassandra
  Issue Type: Bug
 Environment: Cassandra trunk (565c576)
Reporter: Tyler Patterson
 Attachments: system.log


 {code}
  INFO [CompactionExecutor:28] 2012-10-24 14:32:22,756 CompactionTask.java 
 (line 116) Compacting 
 [SSTableReader(path='/var/lib/cassandra/data/Twissandra/Tweet/Twissandra-Tweet-ia-1-Data.db'),
  
 SSTableReader(path='/var/lib/cassandra/data/Twissandra/Tweet/Twissandra-Tweet-ia-6-Data.db'),
  
 SSTableReader(path='/var/lib/cassandra/data/Twissandra/Tweet/Twissandra-Tweet-ia-4-Data.db'),
  
 SSTableReader(path='/var/lib/cassandra/data/Twissandra/Tweet/Twissandra-Tweet-ia-3-Data.db'),
  
 SSTableReader(path='/var/lib/cassandra/data/Twissandra/Tweet/Twissandra-Tweet-ia-2-Data.db')]
 ERROR [CompactionExecutor:28] 2012-10-24 14:32:22,758 CassandraDaemon.java 
 (line 132) Exception in thread Thread[CompactionExecutor:28,1,main]
 java.lang.RuntimeException: java.io.FileNotFoundException: 
 /var/lib/cassandra/data/Twissandra/Tweet/Twissandra-Tweet-ia-1-Data.db (No 
 such file or directory)
   at 
 org.apache.cassandra.io.compress.CompressedRandomAccessReader.open(CompressedRandomAccessReader.java:51)
   at 
 org.apache.cassandra.io.sstable.SSTableReader.openDataReader(SSTableReader.java:1094)
   at 
 org.apache.cassandra.io.sstable.SSTableScanner.init(SSTableScanner.java:51)
   at 
 org.apache.cassandra.io.sstable.SSTableReader.getDirectScanner(SSTableReader.java:937)
   at 
 org.apache.cassandra.io.sstable.SSTableReader.getDirectScanner(SSTableReader.java:949)
   at 
 org.apache.cassandra.db.compaction.AbstractCompactionStrategy.getScanners(AbstractCompactionStrategy.java:127)
   at 
 org.apache.cassandra.db.compaction.AbstractCompactionStrategy.getScanners(AbstractCompactionStrategy.java:133)
   at 
 org.apache.cassandra.db.compaction.CompactionTask.runWith(CompactionTask.java:128)
   at 
 org.apache.cassandra.io.util.DiskAwareRunnable.runMayThrow(DiskAwareRunnable.java:48)
   at 
 org.apache.cassandra.utils.WrappedRunnable.run(WrappedRunnable.java:28)
   at 
 org.apache.cassandra.db.compaction.CompactionTask.execute(CompactionTask.java:69)
   at 
 org.apache.cassandra.db.compaction.CompactionManager$BackgroundCompactionTask.run(CompactionManager.java:179)
   at 
 java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439)
   at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
   at java.util.concurrent.FutureTask.run(FutureTask.java:138)
   at 
 java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
   at 
 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
   at java.lang.Thread.run(Thread.java:680)
 Caused by: java.io.FileNotFoundException: 
 /var/lib/cassandra/data/Twissandra/Tweet/Twissandra-Tweet-ia-1-Data.db (No 
 such file or directory)
   at java.io.RandomAccessFile.open(Native Method)
   at java.io.RandomAccessFile.init(RandomAccessFile.java:216)
   at 
 org.apache.cassandra.io.util.RandomAccessReader.init(RandomAccessReader.java:64)
   at 
 org.apache.cassandra.io.compress.CompressedRandomAccessReader.init(CompressedRandomAccessReader.java:70)
   at 
 org.apache.cassandra.io.compress.CompressedRandomAccessReader.open(CompressedRandomAccessReader.java:47)
   ... 17 more
 {code}
 This error has been happening consistently using a modified version of the 
 twissandra project. We have a script that loads in a bunch of tweet data. The 
 error happens when I drop the keyspace, then recreate it and the 
 columnfamilies, and rerun the script to load the data again.

--
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] [Assigned] (CASSANDRA-4857) FileNotFoundException after create-drop-create keyspace

2012-10-24 Thread Brandon Williams (JIRA)

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

Brandon Williams reassigned CASSANDRA-4857:
---

Assignee: Pavel Yaskevich

 FileNotFoundException after create-drop-create keyspace
 ---

 Key: CASSANDRA-4857
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4857
 Project: Cassandra
  Issue Type: Bug
 Environment: Cassandra trunk (565c576)
Reporter: Tyler Patterson
Assignee: Pavel Yaskevich
 Attachments: system.log


 {code}
  INFO [CompactionExecutor:28] 2012-10-24 14:32:22,756 CompactionTask.java 
 (line 116) Compacting 
 [SSTableReader(path='/var/lib/cassandra/data/Twissandra/Tweet/Twissandra-Tweet-ia-1-Data.db'),
  
 SSTableReader(path='/var/lib/cassandra/data/Twissandra/Tweet/Twissandra-Tweet-ia-6-Data.db'),
  
 SSTableReader(path='/var/lib/cassandra/data/Twissandra/Tweet/Twissandra-Tweet-ia-4-Data.db'),
  
 SSTableReader(path='/var/lib/cassandra/data/Twissandra/Tweet/Twissandra-Tweet-ia-3-Data.db'),
  
 SSTableReader(path='/var/lib/cassandra/data/Twissandra/Tweet/Twissandra-Tweet-ia-2-Data.db')]
 ERROR [CompactionExecutor:28] 2012-10-24 14:32:22,758 CassandraDaemon.java 
 (line 132) Exception in thread Thread[CompactionExecutor:28,1,main]
 java.lang.RuntimeException: java.io.FileNotFoundException: 
 /var/lib/cassandra/data/Twissandra/Tweet/Twissandra-Tweet-ia-1-Data.db (No 
 such file or directory)
   at 
 org.apache.cassandra.io.compress.CompressedRandomAccessReader.open(CompressedRandomAccessReader.java:51)
   at 
 org.apache.cassandra.io.sstable.SSTableReader.openDataReader(SSTableReader.java:1094)
   at 
 org.apache.cassandra.io.sstable.SSTableScanner.init(SSTableScanner.java:51)
   at 
 org.apache.cassandra.io.sstable.SSTableReader.getDirectScanner(SSTableReader.java:937)
   at 
 org.apache.cassandra.io.sstable.SSTableReader.getDirectScanner(SSTableReader.java:949)
   at 
 org.apache.cassandra.db.compaction.AbstractCompactionStrategy.getScanners(AbstractCompactionStrategy.java:127)
   at 
 org.apache.cassandra.db.compaction.AbstractCompactionStrategy.getScanners(AbstractCompactionStrategy.java:133)
   at 
 org.apache.cassandra.db.compaction.CompactionTask.runWith(CompactionTask.java:128)
   at 
 org.apache.cassandra.io.util.DiskAwareRunnable.runMayThrow(DiskAwareRunnable.java:48)
   at 
 org.apache.cassandra.utils.WrappedRunnable.run(WrappedRunnable.java:28)
   at 
 org.apache.cassandra.db.compaction.CompactionTask.execute(CompactionTask.java:69)
   at 
 org.apache.cassandra.db.compaction.CompactionManager$BackgroundCompactionTask.run(CompactionManager.java:179)
   at 
 java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439)
   at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
   at java.util.concurrent.FutureTask.run(FutureTask.java:138)
   at 
 java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
   at 
 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
   at java.lang.Thread.run(Thread.java:680)
 Caused by: java.io.FileNotFoundException: 
 /var/lib/cassandra/data/Twissandra/Tweet/Twissandra-Tweet-ia-1-Data.db (No 
 such file or directory)
   at java.io.RandomAccessFile.open(Native Method)
   at java.io.RandomAccessFile.init(RandomAccessFile.java:216)
   at 
 org.apache.cassandra.io.util.RandomAccessReader.init(RandomAccessReader.java:64)
   at 
 org.apache.cassandra.io.compress.CompressedRandomAccessReader.init(CompressedRandomAccessReader.java:70)
   at 
 org.apache.cassandra.io.compress.CompressedRandomAccessReader.open(CompressedRandomAccessReader.java:47)
   ... 17 more
 {code}
 This error has been happening consistently using a modified version of the 
 twissandra project. We have a script that loads in a bunch of tweet data. The 
 error happens when I drop the keyspace, then recreate it and the 
 columnfamilies, and rerun the script to load the data again.

--
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-4857) FileNotFoundException after create-drop-create keyspace

2012-10-24 Thread Brandon Williams (JIRA)

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

Brandon Williams updated CASSANDRA-4857:


Fix Version/s: 1.2.0

 FileNotFoundException after create-drop-create keyspace
 ---

 Key: CASSANDRA-4857
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4857
 Project: Cassandra
  Issue Type: Bug
 Environment: Cassandra trunk (565c576)
Reporter: Tyler Patterson
Assignee: Pavel Yaskevich
 Fix For: 1.2.0

 Attachments: system.log


 {code}
  INFO [CompactionExecutor:28] 2012-10-24 14:32:22,756 CompactionTask.java 
 (line 116) Compacting 
 [SSTableReader(path='/var/lib/cassandra/data/Twissandra/Tweet/Twissandra-Tweet-ia-1-Data.db'),
  
 SSTableReader(path='/var/lib/cassandra/data/Twissandra/Tweet/Twissandra-Tweet-ia-6-Data.db'),
  
 SSTableReader(path='/var/lib/cassandra/data/Twissandra/Tweet/Twissandra-Tweet-ia-4-Data.db'),
  
 SSTableReader(path='/var/lib/cassandra/data/Twissandra/Tweet/Twissandra-Tweet-ia-3-Data.db'),
  
 SSTableReader(path='/var/lib/cassandra/data/Twissandra/Tweet/Twissandra-Tweet-ia-2-Data.db')]
 ERROR [CompactionExecutor:28] 2012-10-24 14:32:22,758 CassandraDaemon.java 
 (line 132) Exception in thread Thread[CompactionExecutor:28,1,main]
 java.lang.RuntimeException: java.io.FileNotFoundException: 
 /var/lib/cassandra/data/Twissandra/Tweet/Twissandra-Tweet-ia-1-Data.db (No 
 such file or directory)
   at 
 org.apache.cassandra.io.compress.CompressedRandomAccessReader.open(CompressedRandomAccessReader.java:51)
   at 
 org.apache.cassandra.io.sstable.SSTableReader.openDataReader(SSTableReader.java:1094)
   at 
 org.apache.cassandra.io.sstable.SSTableScanner.init(SSTableScanner.java:51)
   at 
 org.apache.cassandra.io.sstable.SSTableReader.getDirectScanner(SSTableReader.java:937)
   at 
 org.apache.cassandra.io.sstable.SSTableReader.getDirectScanner(SSTableReader.java:949)
   at 
 org.apache.cassandra.db.compaction.AbstractCompactionStrategy.getScanners(AbstractCompactionStrategy.java:127)
   at 
 org.apache.cassandra.db.compaction.AbstractCompactionStrategy.getScanners(AbstractCompactionStrategy.java:133)
   at 
 org.apache.cassandra.db.compaction.CompactionTask.runWith(CompactionTask.java:128)
   at 
 org.apache.cassandra.io.util.DiskAwareRunnable.runMayThrow(DiskAwareRunnable.java:48)
   at 
 org.apache.cassandra.utils.WrappedRunnable.run(WrappedRunnable.java:28)
   at 
 org.apache.cassandra.db.compaction.CompactionTask.execute(CompactionTask.java:69)
   at 
 org.apache.cassandra.db.compaction.CompactionManager$BackgroundCompactionTask.run(CompactionManager.java:179)
   at 
 java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439)
   at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
   at java.util.concurrent.FutureTask.run(FutureTask.java:138)
   at 
 java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
   at 
 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
   at java.lang.Thread.run(Thread.java:680)
 Caused by: java.io.FileNotFoundException: 
 /var/lib/cassandra/data/Twissandra/Tweet/Twissandra-Tweet-ia-1-Data.db (No 
 such file or directory)
   at java.io.RandomAccessFile.open(Native Method)
   at java.io.RandomAccessFile.init(RandomAccessFile.java:216)
   at 
 org.apache.cassandra.io.util.RandomAccessReader.init(RandomAccessReader.java:64)
   at 
 org.apache.cassandra.io.compress.CompressedRandomAccessReader.init(CompressedRandomAccessReader.java:70)
   at 
 org.apache.cassandra.io.compress.CompressedRandomAccessReader.open(CompressedRandomAccessReader.java:47)
   ... 17 more
 {code}
 This error has been happening consistently using a modified version of the 
 twissandra project. We have a script that loads in a bunch of tweet data. The 
 error happens when I drop the keyspace, then recreate it and the 
 columnfamilies, and rerun the script to load the data again.

--
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-4856) Thrift daemon is crashing the server

2012-10-24 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis resolved CASSANDRA-4856.
---

Resolution: Invalid

Brandon's diagnosis of your error message is accurate.

 Thrift daemon is crashing the server
 

 Key: CASSANDRA-4856
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4856
 Project: Cassandra
  Issue Type: Bug
Affects Versions: 1.1.6
 Environment: MacOS 10.8.2
Reporter: Michael Yeh

 I'm new to cassandra and was looking at using the kundera thrift client.  I 
 was able to get the sample code working without any issues.  After upgrading 
 to mountain lion on my mac, I didn't realize I had lost the 
 /var/lib/cassandra directory.  When I tried to run the previously working 
 sample code, it would crash cassandra with the following stack trace:
 INFO 12:55:37,147 Listening for thrift clients...
 ERROR 12:55:43,545 Exception in thread Thread[Thread-3,5,main]
 java.lang.OutOfMemoryError: unable to create new native thread
   at java.lang.Thread.start0(Native Method)
   at java.lang.Thread.start(Thread.java:658)
   at 
 java.util.concurrent.ThreadPoolExecutor.addIfUnderMaximumPoolSize(ThreadPoolExecutor.java:727)
   at 
 java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:657)
   at 
 org.apache.cassandra.thrift.CustomTThreadPoolServer.serve(CustomTThreadPoolServer.java:103)
   at 
 org.apache.cassandra.thrift.CassandraDaemon$ThriftServer.run(CassandraDaemon.java:213)
 After realizing that I needed to recreate the keyspace and column families, 
 everything started to work again.  Although I'm no longer blocked with my 
 issue, no clients should ever be able to crash a server even if it is user 
 error.

--
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-4856) Thrift daemon is crashing the server

2012-10-24 Thread Brandon Williams (JIRA)

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

Brandon Williams commented on CASSANDRA-4856:
-

Does this reproduce reliably for you?

 Thrift daemon is crashing the server
 

 Key: CASSANDRA-4856
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4856
 Project: Cassandra
  Issue Type: Bug
Affects Versions: 1.1.6
 Environment: MacOS 10.8.2
Reporter: Michael Yeh

 I'm new to cassandra and was looking at using the kundera thrift client.  I 
 was able to get the sample code working without any issues.  After upgrading 
 to mountain lion on my mac, I didn't realize I had lost the 
 /var/lib/cassandra directory.  When I tried to run the previously working 
 sample code, it would crash cassandra with the following stack trace:
 INFO 12:55:37,147 Listening for thrift clients...
 ERROR 12:55:43,545 Exception in thread Thread[Thread-3,5,main]
 java.lang.OutOfMemoryError: unable to create new native thread
   at java.lang.Thread.start0(Native Method)
   at java.lang.Thread.start(Thread.java:658)
   at 
 java.util.concurrent.ThreadPoolExecutor.addIfUnderMaximumPoolSize(ThreadPoolExecutor.java:727)
   at 
 java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:657)
   at 
 org.apache.cassandra.thrift.CustomTThreadPoolServer.serve(CustomTThreadPoolServer.java:103)
   at 
 org.apache.cassandra.thrift.CassandraDaemon$ThriftServer.run(CassandraDaemon.java:213)
 After realizing that I needed to recreate the keyspace and column families, 
 everything started to work again.  Although I'm no longer blocked with my 
 issue, no clients should ever be able to crash a server even if it is user 
 error.

--
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-4857) FileNotFoundException after create-drop-create keyspace

2012-10-24 Thread Pavel Yaskevich (JIRA)

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

Pavel Yaskevich commented on CASSANDRA-4857:


So this looks exactly like CASSANDRA-4221 and we can't do much about it.

 FileNotFoundException after create-drop-create keyspace
 ---

 Key: CASSANDRA-4857
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4857
 Project: Cassandra
  Issue Type: Bug
 Environment: Cassandra trunk (565c576)
Reporter: Tyler Patterson
Assignee: Pavel Yaskevich
 Fix For: 1.2.0

 Attachments: system.log


 {code}
  INFO [CompactionExecutor:28] 2012-10-24 14:32:22,756 CompactionTask.java 
 (line 116) Compacting 
 [SSTableReader(path='/var/lib/cassandra/data/Twissandra/Tweet/Twissandra-Tweet-ia-1-Data.db'),
  
 SSTableReader(path='/var/lib/cassandra/data/Twissandra/Tweet/Twissandra-Tweet-ia-6-Data.db'),
  
 SSTableReader(path='/var/lib/cassandra/data/Twissandra/Tweet/Twissandra-Tweet-ia-4-Data.db'),
  
 SSTableReader(path='/var/lib/cassandra/data/Twissandra/Tweet/Twissandra-Tweet-ia-3-Data.db'),
  
 SSTableReader(path='/var/lib/cassandra/data/Twissandra/Tweet/Twissandra-Tweet-ia-2-Data.db')]
 ERROR [CompactionExecutor:28] 2012-10-24 14:32:22,758 CassandraDaemon.java 
 (line 132) Exception in thread Thread[CompactionExecutor:28,1,main]
 java.lang.RuntimeException: java.io.FileNotFoundException: 
 /var/lib/cassandra/data/Twissandra/Tweet/Twissandra-Tweet-ia-1-Data.db (No 
 such file or directory)
   at 
 org.apache.cassandra.io.compress.CompressedRandomAccessReader.open(CompressedRandomAccessReader.java:51)
   at 
 org.apache.cassandra.io.sstable.SSTableReader.openDataReader(SSTableReader.java:1094)
   at 
 org.apache.cassandra.io.sstable.SSTableScanner.init(SSTableScanner.java:51)
   at 
 org.apache.cassandra.io.sstable.SSTableReader.getDirectScanner(SSTableReader.java:937)
   at 
 org.apache.cassandra.io.sstable.SSTableReader.getDirectScanner(SSTableReader.java:949)
   at 
 org.apache.cassandra.db.compaction.AbstractCompactionStrategy.getScanners(AbstractCompactionStrategy.java:127)
   at 
 org.apache.cassandra.db.compaction.AbstractCompactionStrategy.getScanners(AbstractCompactionStrategy.java:133)
   at 
 org.apache.cassandra.db.compaction.CompactionTask.runWith(CompactionTask.java:128)
   at 
 org.apache.cassandra.io.util.DiskAwareRunnable.runMayThrow(DiskAwareRunnable.java:48)
   at 
 org.apache.cassandra.utils.WrappedRunnable.run(WrappedRunnable.java:28)
   at 
 org.apache.cassandra.db.compaction.CompactionTask.execute(CompactionTask.java:69)
   at 
 org.apache.cassandra.db.compaction.CompactionManager$BackgroundCompactionTask.run(CompactionManager.java:179)
   at 
 java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439)
   at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
   at java.util.concurrent.FutureTask.run(FutureTask.java:138)
   at 
 java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
   at 
 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
   at java.lang.Thread.run(Thread.java:680)
 Caused by: java.io.FileNotFoundException: 
 /var/lib/cassandra/data/Twissandra/Tweet/Twissandra-Tweet-ia-1-Data.db (No 
 such file or directory)
   at java.io.RandomAccessFile.open(Native Method)
   at java.io.RandomAccessFile.init(RandomAccessFile.java:216)
   at 
 org.apache.cassandra.io.util.RandomAccessReader.init(RandomAccessReader.java:64)
   at 
 org.apache.cassandra.io.compress.CompressedRandomAccessReader.init(CompressedRandomAccessReader.java:70)
   at 
 org.apache.cassandra.io.compress.CompressedRandomAccessReader.open(CompressedRandomAccessReader.java:47)
   ... 17 more
 {code}
 This error has been happening consistently using a modified version of the 
 twissandra project. We have a script that loads in a bunch of tweet data. The 
 error happens when I drop the keyspace, then recreate it and the 
 columnfamilies, and rerun the script to load the data again.

--
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-4857) FileNotFoundException after create-drop-create keyspace

2012-10-24 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis resolved CASSANDRA-4857.
---

   Resolution: Won't Fix
Fix Version/s: (was: 1.2.0)

+1, fix is to use truncate instead of drop + recreate.

 FileNotFoundException after create-drop-create keyspace
 ---

 Key: CASSANDRA-4857
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4857
 Project: Cassandra
  Issue Type: Bug
 Environment: Cassandra trunk (565c576)
Reporter: Tyler Patterson
Assignee: Pavel Yaskevich
 Attachments: system.log


 {code}
  INFO [CompactionExecutor:28] 2012-10-24 14:32:22,756 CompactionTask.java 
 (line 116) Compacting 
 [SSTableReader(path='/var/lib/cassandra/data/Twissandra/Tweet/Twissandra-Tweet-ia-1-Data.db'),
  
 SSTableReader(path='/var/lib/cassandra/data/Twissandra/Tweet/Twissandra-Tweet-ia-6-Data.db'),
  
 SSTableReader(path='/var/lib/cassandra/data/Twissandra/Tweet/Twissandra-Tweet-ia-4-Data.db'),
  
 SSTableReader(path='/var/lib/cassandra/data/Twissandra/Tweet/Twissandra-Tweet-ia-3-Data.db'),
  
 SSTableReader(path='/var/lib/cassandra/data/Twissandra/Tweet/Twissandra-Tweet-ia-2-Data.db')]
 ERROR [CompactionExecutor:28] 2012-10-24 14:32:22,758 CassandraDaemon.java 
 (line 132) Exception in thread Thread[CompactionExecutor:28,1,main]
 java.lang.RuntimeException: java.io.FileNotFoundException: 
 /var/lib/cassandra/data/Twissandra/Tweet/Twissandra-Tweet-ia-1-Data.db (No 
 such file or directory)
   at 
 org.apache.cassandra.io.compress.CompressedRandomAccessReader.open(CompressedRandomAccessReader.java:51)
   at 
 org.apache.cassandra.io.sstable.SSTableReader.openDataReader(SSTableReader.java:1094)
   at 
 org.apache.cassandra.io.sstable.SSTableScanner.init(SSTableScanner.java:51)
   at 
 org.apache.cassandra.io.sstable.SSTableReader.getDirectScanner(SSTableReader.java:937)
   at 
 org.apache.cassandra.io.sstable.SSTableReader.getDirectScanner(SSTableReader.java:949)
   at 
 org.apache.cassandra.db.compaction.AbstractCompactionStrategy.getScanners(AbstractCompactionStrategy.java:127)
   at 
 org.apache.cassandra.db.compaction.AbstractCompactionStrategy.getScanners(AbstractCompactionStrategy.java:133)
   at 
 org.apache.cassandra.db.compaction.CompactionTask.runWith(CompactionTask.java:128)
   at 
 org.apache.cassandra.io.util.DiskAwareRunnable.runMayThrow(DiskAwareRunnable.java:48)
   at 
 org.apache.cassandra.utils.WrappedRunnable.run(WrappedRunnable.java:28)
   at 
 org.apache.cassandra.db.compaction.CompactionTask.execute(CompactionTask.java:69)
   at 
 org.apache.cassandra.db.compaction.CompactionManager$BackgroundCompactionTask.run(CompactionManager.java:179)
   at 
 java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439)
   at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
   at java.util.concurrent.FutureTask.run(FutureTask.java:138)
   at 
 java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
   at 
 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
   at java.lang.Thread.run(Thread.java:680)
 Caused by: java.io.FileNotFoundException: 
 /var/lib/cassandra/data/Twissandra/Tweet/Twissandra-Tweet-ia-1-Data.db (No 
 such file or directory)
   at java.io.RandomAccessFile.open(Native Method)
   at java.io.RandomAccessFile.init(RandomAccessFile.java:216)
   at 
 org.apache.cassandra.io.util.RandomAccessReader.init(RandomAccessReader.java:64)
   at 
 org.apache.cassandra.io.compress.CompressedRandomAccessReader.init(CompressedRandomAccessReader.java:70)
   at 
 org.apache.cassandra.io.compress.CompressedRandomAccessReader.open(CompressedRandomAccessReader.java:47)
   ... 17 more
 {code}
 This error has been happening consistently using a modified version of the 
 twissandra project. We have a script that loads in a bunch of tweet data. The 
 error happens when I drop the keyspace, then recreate it and the 
 columnfamilies, and rerun the script to load the data again.

--
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-4856) Thrift daemon is crashing the server

2012-10-24 Thread Michael Yeh (JIRA)

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

Michael Yeh commented on CASSANDRA-4856:


Yes it does.  If I delete /var/lib/cassandra and don't create the namespace 
I'll get the same error message.

If you really think it's specific to my machine, point me to a cassandra server 
that I can access and I can point my thrift client to to it and see if it 
repros.

 Thrift daemon is crashing the server
 

 Key: CASSANDRA-4856
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4856
 Project: Cassandra
  Issue Type: Bug
Affects Versions: 1.1.6
 Environment: MacOS 10.8.2
Reporter: Michael Yeh

 I'm new to cassandra and was looking at using the kundera thrift client.  I 
 was able to get the sample code working without any issues.  After upgrading 
 to mountain lion on my mac, I didn't realize I had lost the 
 /var/lib/cassandra directory.  When I tried to run the previously working 
 sample code, it would crash cassandra with the following stack trace:
 INFO 12:55:37,147 Listening for thrift clients...
 ERROR 12:55:43,545 Exception in thread Thread[Thread-3,5,main]
 java.lang.OutOfMemoryError: unable to create new native thread
   at java.lang.Thread.start0(Native Method)
   at java.lang.Thread.start(Thread.java:658)
   at 
 java.util.concurrent.ThreadPoolExecutor.addIfUnderMaximumPoolSize(ThreadPoolExecutor.java:727)
   at 
 java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:657)
   at 
 org.apache.cassandra.thrift.CustomTThreadPoolServer.serve(CustomTThreadPoolServer.java:103)
   at 
 org.apache.cassandra.thrift.CassandraDaemon$ThriftServer.run(CassandraDaemon.java:213)
 After realizing that I needed to recreate the keyspace and column families, 
 everything started to work again.  Although I'm no longer blocked with my 
 issue, no clients should ever be able to crash a server even if it is user 
 error.

--
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-4856) Thrift daemon is crashing the server

2012-10-24 Thread Michael Yeh (JIRA)

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

Michael Yeh commented on CASSANDRA-4856:


Upgrading the OS is a red herring.  What it did was it wiped out my cassandra 
directory and I basically started with a fresh install.

 Thrift daemon is crashing the server
 

 Key: CASSANDRA-4856
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4856
 Project: Cassandra
  Issue Type: Bug
Affects Versions: 1.1.6
 Environment: MacOS 10.8.2
Reporter: Michael Yeh

 I'm new to cassandra and was looking at using the kundera thrift client.  I 
 was able to get the sample code working without any issues.  After upgrading 
 to mountain lion on my mac, I didn't realize I had lost the 
 /var/lib/cassandra directory.  When I tried to run the previously working 
 sample code, it would crash cassandra with the following stack trace:
 INFO 12:55:37,147 Listening for thrift clients...
 ERROR 12:55:43,545 Exception in thread Thread[Thread-3,5,main]
 java.lang.OutOfMemoryError: unable to create new native thread
   at java.lang.Thread.start0(Native Method)
   at java.lang.Thread.start(Thread.java:658)
   at 
 java.util.concurrent.ThreadPoolExecutor.addIfUnderMaximumPoolSize(ThreadPoolExecutor.java:727)
   at 
 java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:657)
   at 
 org.apache.cassandra.thrift.CustomTThreadPoolServer.serve(CustomTThreadPoolServer.java:103)
   at 
 org.apache.cassandra.thrift.CassandraDaemon$ThriftServer.run(CassandraDaemon.java:213)
 After realizing that I needed to recreate the keyspace and column families, 
 everything started to work again.  Although I'm no longer blocked with my 
 issue, no clients should ever be able to crash a server even if it is user 
 error.

--
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-4844) cqlsh help for CQL3 Create (and probably Alter) statements needs to be updated for Map syntax change

2012-10-24 Thread Aleksey Yeschenko (JIRA)

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

Aleksey Yeschenko commented on CASSANDRA-4844:
--

This is a duplicate of CASSANDRA-4800.

 cqlsh help for CQL3 Create (and probably Alter) statements needs to be 
 updated for Map syntax change
 

 Key: CASSANDRA-4844
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4844
 Project: Cassandra
  Issue Type: Bug
Affects Versions: 1.2.0 beta 1
Reporter: Edward Capriolo
Assignee: Aleksey Yeschenko
Priority: Minor

 Following the advice here.
 http://www.datastax.com/docs/1.1/dml/using_cql
 {noformat}
 [edward@tablitha apache-cassandra-1.2.0-beta1]$ bin/cqlsh -3
 Connected to Test Cluster at localhost:9160.
 [cqlsh 2.2.0 | Cassandra 1.2.0-beta1 | CQL spec 3.0.0 | Thrift protocol 
 19.34.0]
 Use HELP for help.
 cqlsh CREATE KEYSPACE demodb  WITH strategy_class = 
 'org.apache.cassandra.locator.SimpleStrategy'  AND 
 strategy_options:replication_factor='1' ;
 Bad Request: line 1:129 mismatched input ':' expecting '='
 Perhaps you meant to use CQL 2? Try using the -2 option when starting cqlsh.
 {noformat}
 http://www.datastax.com/docs/1.1/references/cql/CREATE_KEYSPACE
 {noformat}
 cqlsh CREATE KEYSPACE Excelsior WITH strategy_class = 'SimpleStrategy'
...   AND strategy_options:replication_factor = 1;
 Bad Request: line 2:22 mismatched input ':' expecting '='
 {noformat}
 It seems that in Cassandra 1.2 I am no longer able to create a keyspace.

--
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-4844) cqlsh help for CQL3 Create (and probably Alter) statements needs to be updated for Map syntax change

2012-10-24 Thread Aleksey Yeschenko (JIRA)

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

Aleksey Yeschenko resolved CASSANDRA-4844.
--

Resolution: Duplicate

See CASSANDRA-4800.

 cqlsh help for CQL3 Create (and probably Alter) statements needs to be 
 updated for Map syntax change
 

 Key: CASSANDRA-4844
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4844
 Project: Cassandra
  Issue Type: Bug
Affects Versions: 1.2.0 beta 1
Reporter: Edward Capriolo
Assignee: Aleksey Yeschenko
Priority: Minor

 Following the advice here.
 http://www.datastax.com/docs/1.1/dml/using_cql
 {noformat}
 [edward@tablitha apache-cassandra-1.2.0-beta1]$ bin/cqlsh -3
 Connected to Test Cluster at localhost:9160.
 [cqlsh 2.2.0 | Cassandra 1.2.0-beta1 | CQL spec 3.0.0 | Thrift protocol 
 19.34.0]
 Use HELP for help.
 cqlsh CREATE KEYSPACE demodb  WITH strategy_class = 
 'org.apache.cassandra.locator.SimpleStrategy'  AND 
 strategy_options:replication_factor='1' ;
 Bad Request: line 1:129 mismatched input ':' expecting '='
 Perhaps you meant to use CQL 2? Try using the -2 option when starting cqlsh.
 {noformat}
 http://www.datastax.com/docs/1.1/references/cql/CREATE_KEYSPACE
 {noformat}
 cqlsh CREATE KEYSPACE Excelsior WITH strategy_class = 'SimpleStrategy'
...   AND strategy_options:replication_factor = 1;
 Bad Request: line 2:22 mismatched input ':' expecting '='
 {noformat}
 It seems that in Cassandra 1.2 I am no longer able to create a keyspace.

--
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-4362) cqlsh can't display reversed type values properly

2012-10-24 Thread Aleksey Yeschenko (JIRA)

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

Aleksey Yeschenko commented on CASSANDRA-4362:
--

cqlsh:db select * from t1;
 a | b  | c  | d
---+++---
 1 | 41 | u3 |  fgh1
 1 | 31 | u2 |   1gh
 1 | 21 | u3 | ghfgh f1g
 1 | 15 | u1 |d1
 1 | 10 | u1 |s1


I assume this it not a problem anymore.

 cqlsh can't display reversed type values properly
 -

 Key: CASSANDRA-4362
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4362
 Project: Cassandra
  Issue Type: Bug
  Components: Tools
Affects Versions: 1.1.1
Reporter: Ahmet AKYOL
Assignee: Aleksey Yeschenko
Priority: Minor
  Labels: cqlsh
 Fix For: 1.2.0


 Here is table and data:
 CREATE TABLE t1 (
   a int,
   b bigint,
   c varchar,
   d varchar,
   PRIMARY KEY (a,b,c)
 ) WITH CLUSTERING ORDER BY (b DESC, c DESC);
 INSERT INTO db.t1 (a,b,c,d)  VALUES (1,10,'u1','s1');
 INSERT INTO db.t1 (a,b,c,d)  VALUES (1,15,'u1','d1');
 INSERT INTO db.t1 (a,b,c,d)  VALUES (1,21,'u3','ghfgh f1g');
 INSERT INTO db.t1 (a,b,c,d)  VALUES (1,31,'u2','1gh');
 INSERT INTO db.t1 (a,b,c,d)  VALUES (1,41,'u3','fgh1');
 And here's the query
 cqlsh:db SELECT * FROM t1;
  a | b| c  | d
 ---+--++---
  1 |\x00\x00\x00\x00\x00\x00\x00) | u3 |  fgh1
  1 | \x00\x00\x00\x00\x00\x00\x00\x1f | u2 |   1gh
  1 | \x00\x00\x00\x00\x00\x00\x00\x15 | u3 | ghfgh f1g
  1 | \x00\x00\x00\x00\x00\x00\x00\x0f | u1 |d1
  1 |   \x00\x00\x00\x00\x00\x00\x00\n | u1 |s1
 As you can see, cqlsh can't display reversed type values properly ...

--
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-4362) cqlsh can't display reversed type values properly

2012-10-24 Thread Aleksey Yeschenko (JIRA)

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

Aleksey Yeschenko edited comment on CASSANDRA-4362 at 10/25/12 1:27 AM:


cqlsh:db select * from t1;
 a | b  | c  | d
---+++---
 1 | 41 | u3 |  fgh1
 1 | 31 | u2 |   1gh
 1 | 21 | u3 | ghfgh f1g
 1 | 15 | u1 |d1
 1 | 10 | u1 |s1


I assume this is not a problem anymore.

  was (Author: iamaleksey):
cqlsh:db select * from t1;
 a | b  | c  | d
---+++---
 1 | 41 | u3 |  fgh1
 1 | 31 | u2 |   1gh
 1 | 21 | u3 | ghfgh f1g
 1 | 15 | u1 |d1
 1 | 10 | u1 |s1


I assume this it not a problem anymore.
  
 cqlsh can't display reversed type values properly
 -

 Key: CASSANDRA-4362
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4362
 Project: Cassandra
  Issue Type: Bug
  Components: Tools
Affects Versions: 1.1.1
Reporter: Ahmet AKYOL
Assignee: Aleksey Yeschenko
Priority: Minor
  Labels: cqlsh
 Fix For: 1.2.0


 Here is table and data:
 CREATE TABLE t1 (
   a int,
   b bigint,
   c varchar,
   d varchar,
   PRIMARY KEY (a,b,c)
 ) WITH CLUSTERING ORDER BY (b DESC, c DESC);
 INSERT INTO db.t1 (a,b,c,d)  VALUES (1,10,'u1','s1');
 INSERT INTO db.t1 (a,b,c,d)  VALUES (1,15,'u1','d1');
 INSERT INTO db.t1 (a,b,c,d)  VALUES (1,21,'u3','ghfgh f1g');
 INSERT INTO db.t1 (a,b,c,d)  VALUES (1,31,'u2','1gh');
 INSERT INTO db.t1 (a,b,c,d)  VALUES (1,41,'u3','fgh1');
 And here's the query
 cqlsh:db SELECT * FROM t1;
  a | b| c  | d
 ---+--++---
  1 |\x00\x00\x00\x00\x00\x00\x00) | u3 |  fgh1
  1 | \x00\x00\x00\x00\x00\x00\x00\x1f | u2 |   1gh
  1 | \x00\x00\x00\x00\x00\x00\x00\x15 | u3 | ghfgh f1g
  1 | \x00\x00\x00\x00\x00\x00\x00\x0f | u1 |d1
  1 |   \x00\x00\x00\x00\x00\x00\x00\n | u1 |s1
 As you can see, cqlsh can't display reversed type values properly ...

--
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-4362) cqlsh can't display reversed type values properly

2012-10-24 Thread Aleksey Yeschenko (JIRA)

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

Aleksey Yeschenko resolved CASSANDRA-4362.
--

Resolution: Not A Problem

 cqlsh can't display reversed type values properly
 -

 Key: CASSANDRA-4362
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4362
 Project: Cassandra
  Issue Type: Bug
  Components: Tools
Affects Versions: 1.1.1
Reporter: Ahmet AKYOL
Assignee: Aleksey Yeschenko
Priority: Minor
  Labels: cqlsh
 Fix For: 1.2.0


 Here is table and data:
 CREATE TABLE t1 (
   a int,
   b bigint,
   c varchar,
   d varchar,
   PRIMARY KEY (a,b,c)
 ) WITH CLUSTERING ORDER BY (b DESC, c DESC);
 INSERT INTO db.t1 (a,b,c,d)  VALUES (1,10,'u1','s1');
 INSERT INTO db.t1 (a,b,c,d)  VALUES (1,15,'u1','d1');
 INSERT INTO db.t1 (a,b,c,d)  VALUES (1,21,'u3','ghfgh f1g');
 INSERT INTO db.t1 (a,b,c,d)  VALUES (1,31,'u2','1gh');
 INSERT INTO db.t1 (a,b,c,d)  VALUES (1,41,'u3','fgh1');
 And here's the query
 cqlsh:db SELECT * FROM t1;
  a | b| c  | d
 ---+--++---
  1 |\x00\x00\x00\x00\x00\x00\x00) | u3 |  fgh1
  1 | \x00\x00\x00\x00\x00\x00\x00\x1f | u2 |   1gh
  1 | \x00\x00\x00\x00\x00\x00\x00\x15 | u3 | ghfgh f1g
  1 | \x00\x00\x00\x00\x00\x00\x00\x0f | u1 |d1
  1 |   \x00\x00\x00\x00\x00\x00\x00\n | u1 |s1
 As you can see, cqlsh can't display reversed type values properly ...

--
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-4443) shuffle utility for vnodes

2012-10-24 Thread Eric Evans (JIRA)

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

Eric Evans commented on CASSANDRA-4443:
---

This has been fixed

 shuffle utility for vnodes
 --

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


 As mentioned on CASSANDRA-4127, for upgrades we need a 'shuffle' command to 
 split up the contiguous ranges.
 List discussion: http://thread.gmane.org/gmane.comp.db.cassandra.devel/6799
 _Edit0: Linked in mailing list discussion._
 _Edit1: Linked in patch information._
 _Edit2: Updated patch links._
 \\
 h3. Patches
 ||Compare||Raw diff||Description||
 |[060_shuffle_utility|https://github.com/acunu/cassandra/compare/top-bases/p/4443/060_shuffle_utility...p/4443/060_shuffle_utility]|[060_shuffle_utility.patch|https://github.com/acunu/cassandra/compare/top-bases/p/4443/060_shuffle_utility...p/4443/060_shuffle_utility.diff]|{{shuffle}}
  util to randomly remap ranges|
 
 _Note: These are branches managed with TopGit. If you are applying the patch 
 output manually, you will either need to filter the TopGit metadata files 
 (i.e. {{wget -O - url | filterdiff -x*.topdeps -x*.topmsg | patch -p1}}), 
 or remove them afterward ({{rm .topmsg .topdeps}})._

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


[jira] [Commented] (CASSANDRA-4776) Inconsistent use of quotes for CQL 3 reserved words

2012-10-24 Thread Aleksey Yeschenko (JIRA)

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

Aleksey Yeschenko commented on CASSANDRA-4776:
--

I agree with making true/false valid identifiers, but don't understand what's 
otherwise expected from this issue. It's a documentation bug, and that doc has 
quite some outdated stuff (assuming it's intended to reflect latest CQL3 and 
not 3.0.0-beta1).

 Inconsistent use of quotes for CQL 3 reserved words
 ---

 Key: CASSANDRA-4776
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4776
 Project: Cassandra
  Issue Type: Bug
Affects Versions: 1.1.5
 Environment: Mac OS X, Fedora 16
Reporter: John Sanda
Assignee: Aleksey Yeschenko
Priority: Minor

 The docs at http://cassandra.apache.org/doc/cql3/CQL.html#identifiers 
 describe using double quotes for an identifier that is a reserved word. The 
 following works as expected,
 cqlsh:test select columnfamily from system.schema_columnfamilies;
 I have a table with a boolean column. In order to insert a boolean value, I 
 have to enclose it in single quotes. The table looks like,
 CREATE TABLE bool_test (
   id int PRIMARY KEY,
   val boolean
 );
 Here is what happens when I try using double quotes,
 cqlsh:rhq insert into bool_test (id, val) values (4, false);
 Bad Request: line 1:43 no viable alternative at input 'false'
 The use of single quotes here seems inconsistent with what is described in 
 the docs, and makes things a bit confusing. It would be nice if single or 
 double quotes could be used for identifiers that are reserved words. I also 
 think it is a bit counter-intuitive to require quotes for true and false 
 which are literal 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-4785) Secondary Index Sporadically Doesn't Return Rows

2012-10-24 Thread Arya Goudarzi (JIRA)

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

Arya Goudarzi commented on CASSANDRA-4785:
--

OK, I did disable the cache and restarted the nodes. It worked fine. Right 
after I enabled key cache for the CF in question, I started getting mixed 
numbers when querying with secondary indexes. 

 Secondary Index Sporadically Doesn't Return Rows
 

 Key: CASSANDRA-4785
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4785
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Affects Versions: 1.1.5, 1.1.6
 Environment: Ubuntu 10.04
 Java 6 Sun
 Cassandra 1.1.5 upgraded from 1.1.2 - 1.1.3 - 1.1.5
Reporter: Arya Goudarzi

 I have a ColumnFamily with caching = ALL. I have 2 secondary indexes on it. I 
 have noticed if I query using the secondary index in the where clause, 
 sometimes I get the results and sometimes I don't. Until 2 weeks ago, the 
 caching option on this CF was set to NONE. So, I suspect something happened 
 in secondary index caching scheme. 
 Here are things I tried:
 1. I rebuild indexes for that CF on all nodes;
 2. I set the caching to KEYS_ONLY and rebuild the index again;
 3. I set the caching to NONE and rebuild the index again;
 None of the above helped. I suppose the caching still exists as this behavior 
 looks like cache mistmatch.
 I did a bit research, and found CASSANDRA-4197 that could be related.
 Please advice.

--
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-4776) Don't require quotes for true and false

2012-10-24 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis updated CASSANDRA-4776:
--

  Component/s: Core
Affects Version/s: (was: 1.1.5)
Fix Version/s: 1.2.1
   Labels: cql3  (was: )
  Summary: Don't require quotes for true and false  (was: 
Inconsistent use of quotes for CQL 3 reserved words)

 Don't require quotes for true and false
 ---

 Key: CASSANDRA-4776
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4776
 Project: Cassandra
  Issue Type: Bug
  Components: Core
 Environment: Mac OS X, Fedora 16
Reporter: John Sanda
Assignee: Aleksey Yeschenko
Priority: Minor
  Labels: cql3
 Fix For: 1.2.1


 The docs at http://cassandra.apache.org/doc/cql3/CQL.html#identifiers 
 describe using double quotes for an identifier that is a reserved word. The 
 following works as expected,
 cqlsh:test select columnfamily from system.schema_columnfamilies;
 I have a table with a boolean column. In order to insert a boolean value, I 
 have to enclose it in single quotes. The table looks like,
 CREATE TABLE bool_test (
   id int PRIMARY KEY,
   val boolean
 );
 Here is what happens when I try using double quotes,
 cqlsh:rhq insert into bool_test (id, val) values (4, false);
 Bad Request: line 1:43 no viable alternative at input 'false'
 The use of single quotes here seems inconsistent with what is described in 
 the docs, and makes things a bit confusing. It would be nice if single or 
 double quotes could be used for identifiers that are reserved words. I also 
 think it is a bit counter-intuitive to require quotes for true and false 
 which are literal 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-4776) Don't require quotes for true and false

2012-10-24 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis commented on CASSANDRA-4776:
---

Updated title.

 Don't require quotes for true and false
 ---

 Key: CASSANDRA-4776
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4776
 Project: Cassandra
  Issue Type: Bug
  Components: Core
 Environment: Mac OS X, Fedora 16
Reporter: John Sanda
Assignee: Aleksey Yeschenko
Priority: Minor
  Labels: cql3
 Fix For: 1.2.1


 The docs at http://cassandra.apache.org/doc/cql3/CQL.html#identifiers 
 describe using double quotes for an identifier that is a reserved word. The 
 following works as expected,
 cqlsh:test select columnfamily from system.schema_columnfamilies;
 I have a table with a boolean column. In order to insert a boolean value, I 
 have to enclose it in single quotes. The table looks like,
 CREATE TABLE bool_test (
   id int PRIMARY KEY,
   val boolean
 );
 Here is what happens when I try using double quotes,
 cqlsh:rhq insert into bool_test (id, val) values (4, false);
 Bad Request: line 1:43 no viable alternative at input 'false'
 The use of single quotes here seems inconsistent with what is described in 
 the docs, and makes things a bit confusing. It would be nice if single or 
 double quotes could be used for identifiers that are reserved words. I also 
 think it is a bit counter-intuitive to require quotes for true and false 
 which are literal 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-4776) Don't require quotes for true and false

2012-10-24 Thread John Sanda (JIRA)

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

John Sanda commented on CASSANDRA-4776:
---

Where/how can I access the latest CQL3 docs? I just ran ant generate-cql-html 
from trunk where my HEAD is a commit from 10/17. I am not sure how different 
that is from the doc I cited in the description. 

 Don't require quotes for true and false
 ---

 Key: CASSANDRA-4776
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4776
 Project: Cassandra
  Issue Type: Bug
  Components: Core
 Environment: Mac OS X, Fedora 16
Reporter: John Sanda
Assignee: Aleksey Yeschenko
Priority: Minor
  Labels: cql3
 Fix For: 1.2.1


 The docs at http://cassandra.apache.org/doc/cql3/CQL.html#identifiers 
 describe using double quotes for an identifier that is a reserved word. The 
 following works as expected,
 cqlsh:test select columnfamily from system.schema_columnfamilies;
 I have a table with a boolean column. In order to insert a boolean value, I 
 have to enclose it in single quotes. The table looks like,
 CREATE TABLE bool_test (
   id int PRIMARY KEY,
   val boolean
 );
 Here is what happens when I try using double quotes,
 cqlsh:rhq insert into bool_test (id, val) values (4, false);
 Bad Request: line 1:43 no viable alternative at input 'false'
 The use of single quotes here seems inconsistent with what is described in 
 the docs, and makes things a bit confusing. It would be nice if single or 
 double quotes could be used for identifiers that are reserved words. I also 
 think it is a bit counter-intuitive to require quotes for true and false 
 which are literal 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