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

2013-02-20 Thread JIRA

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

Michał Michalski updated CASSANDRA-3783:


Attachment: 3783-v2.patch

OK, here's the patch. In general I've added possibility to check TYPE of 
classes implementing Term.Raw and use it in Operations classes implementing 
RawUpdate (one of them, actually). If Term Type is NULL, return 
Constants.Deleter Operation when preparing operation.

Quick explaination:

Why, among all the classes containing nested Literal classes implementing 
Term.Raw, only one checks for Term Type and rest of them return false by 
default?
* Constants: it checks the Type because, obviously, this is the main null-value 
use case
* Sets, Lists, Maps: If one of them is set to null it's matched (by parser) as 
a null-based Constant (which seems to be fine from my point of view, doesn't 
it?), so none of them can be of type null itself
* TypeCast, FunctionCall, AbstractMarker: it just doesn't make sense for them 
to be null

Why only SetValue (among other RawUpdate interfaces) checks if Term is NULL and 
returns Deleter if yes:
* RawUpdate:
SetValue: obviously, this was the main use case here
SetElement: setting collections' values to null might make sense, but do we 
want it?
Addition, Substraction, Prepend: adding null to existing column's contents 
etc. doesn't make sense for me
* RawDeletion: If we do not support nulls in SELECTs because of the indexing 
reasons, I guess it can't be done in DELETEs too


 Add 'null' support to CQL 3.0
 -

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

 Attachments: 3783-v2.patch, 3783-wip-v1.patch


 Dense composite supports adding records where only a prefix of all the 
 component specifying the key is defined. In other words, with:
 {noformat}
 CREATE TABLE connections (
userid int,
ip text,
port int,
protocol text,
time timestamp,
PRIMARY KEY (userid, ip, port, protocol)
 ) WITH COMPACT STORAGE
 {noformat}
 you can insert
 {noformat}
 INSERT INTO connections (userid, ip, port, time) VALUES (2, '192.168.0.1', 
 80, 123456789);
 {noformat}
 You cannot however select that column specifically (i.e, without selecting 
 column (2, '192.168.0.1', 80, 'http') for instance).
 This ticket proposes to allow that though 'null', i.e. to allow
 {noformat}
 SELECT * FROM connections WHERE userid = 2 AND ip = '192.168.0.1' AND port = 
 80 AND protocol = null;
 {noformat}
 It would then also make sense to support:
 {noformat}
 INSERT INTO connections (userid, ip, port, protocol, time) VALUES (2, 
 '192.168.0.1', 80, null, 123456789);
 {noformat}
 as an equivalent to the insert query above.

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


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

2013-02-20 Thread JIRA

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

Michał Michalski edited comment on CASSANDRA-3783 at 2/20/13 9:08 AM:
--

OK, here's the patch. In general I've added possibility to check TYPE of 
classes implementing Term.Raw (more precise: checking if they're NULLs) and use 
it in Operations classes implementing RawUpdate (in one of these classes, 
actually). If Term Type is NULL, return Constants.Deleter Operation when 
preparing operation.

Quick explaination:

Why, among all the classes containing nested Literal classes implementing 
Term.Raw, only one checks for Term Type and rest of them return false by 
default?
* Constants: it checks the Type because, obviously, this is the main null-value 
use case
* Sets, Lists, Maps: If one of them is set to null it's matched (by parser) as 
a null-based Constant (which seems to be fine from my point of view, doesn't 
it?), so none of them can be of type null itself
* TypeCast, FunctionCall, AbstractMarker: it just doesn't make sense for them 
to be null

Why only SetValue (among other RawUpdate interfaces) checks if Term is NULL and 
returns Deleter if yes:
* RawUpdate:
SetValue: obviously, this was the main use case here
SetElement: setting collections' values to null might make sense, but do we 
want it?
Addition, Substraction, Prepend: adding null to existing column's contents 
etc. doesn't make sense for me
* RawDeletion: If we do not support nulls in SELECTs because of the indexing 
reasons, I guess it can't be done in DELETEs too


  was (Author: michalm):
OK, here's the patch. In general I've added possibility to check TYPE of 
classes implementing Term.Raw and use it in Operations classes implementing 
RawUpdate (one of them, actually). If Term Type is NULL, return 
Constants.Deleter Operation when preparing operation.

Quick explaination:

Why, among all the classes containing nested Literal classes implementing 
Term.Raw, only one checks for Term Type and rest of them return false by 
default?
* Constants: it checks the Type because, obviously, this is the main null-value 
use case
* Sets, Lists, Maps: If one of them is set to null it's matched (by parser) as 
a null-based Constant (which seems to be fine from my point of view, doesn't 
it?), so none of them can be of type null itself
* TypeCast, FunctionCall, AbstractMarker: it just doesn't make sense for them 
to be null

Why only SetValue (among other RawUpdate interfaces) checks if Term is NULL and 
returns Deleter if yes:
* RawUpdate:
SetValue: obviously, this was the main use case here
SetElement: setting collections' values to null might make sense, but do we 
want it?
Addition, Substraction, Prepend: adding null to existing column's contents 
etc. doesn't make sense for me
* RawDeletion: If we do not support nulls in SELECTs because of the indexing 
reasons, I guess it can't be done in DELETEs too

  
 Add 'null' support to CQL 3.0
 -

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

 Attachments: 3783-v2.patch, 3783-wip-v1.patch


 Dense composite supports adding records where only a prefix of all the 
 component specifying the key is defined. In other words, with:
 {noformat}
 CREATE TABLE connections (
userid int,
ip text,
port int,
protocol text,
time timestamp,
PRIMARY KEY (userid, ip, port, protocol)
 ) WITH COMPACT STORAGE
 {noformat}
 you can insert
 {noformat}
 INSERT INTO connections (userid, ip, port, time) VALUES (2, '192.168.0.1', 
 80, 123456789);
 {noformat}
 You cannot however select that column specifically (i.e, without selecting 
 column (2, '192.168.0.1', 80, 'http') for instance).
 This ticket proposes to allow that though 'null', i.e. to allow
 {noformat}
 SELECT * FROM connections WHERE userid = 2 AND ip = '192.168.0.1' AND port = 
 80 AND protocol = null;
 {noformat}
 It would then also make sense to support:
 {noformat}
 INSERT INTO connections (userid, ip, port, protocol, time) VALUES (2, 
 '192.168.0.1', 80, null, 123456789);
 {noformat}
 as an equivalent to the insert query above.

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


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

2013-02-20 Thread JIRA

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

Michał Michalski edited comment on CASSANDRA-3783 at 2/20/13 9:09 AM:
--

OK, here's the patch. In general I've added possibility to check TYPE of 
classes implementing Term.Raw (more precise: checking if they're NULLs) and use 
it in Operations classes implementing RawUpdate (in one of these classes, 
actually). If Term Type is NULL, return Constants.Deleter Operation when 
preparing operation.

Quick explaination:

Why, among all the classes containing nested Literal classes implementing 
Term.Raw, only one checks for Term Type and rest of them return false by 
default?
* Constants: it checks the Type because, obviously, this is the main null-value 
use case
* Sets, Lists, Maps: If one of them is set to null it's matched (by parser) as 
a null-based Constant (which seems to be fine from my point of view, doesn't 
it?), so none of them can be of type null itself
* TypeCast, FunctionCall, AbstractMarker: it just doesn't make sense for them 
to be null

Why only SetValue (among other RawUpdate interfaces) checks if Term is NULL and 
returns Deleter if yes:
* RawUpdate:
SetValue: obviously, this was the main use case here
SetElement: setting collections' values to null might make sense, but do we 
want it?
Addition, Substraction, Prepend: adding null to existing column's contents 
etc. doesn't make sense for me
* RawDeletion: If we do not support nulls in SELECTs because of the indexing 
reasons, I guess it can't be done in DELETEs too

Additionally I renamed NULL to K_NULL, as suggested.

  was (Author: michalm):
OK, here's the patch. In general I've added possibility to check TYPE of 
classes implementing Term.Raw (more precise: checking if they're NULLs) and use 
it in Operations classes implementing RawUpdate (in one of these classes, 
actually). If Term Type is NULL, return Constants.Deleter Operation when 
preparing operation.

Quick explaination:

Why, among all the classes containing nested Literal classes implementing 
Term.Raw, only one checks for Term Type and rest of them return false by 
default?
* Constants: it checks the Type because, obviously, this is the main null-value 
use case
* Sets, Lists, Maps: If one of them is set to null it's matched (by parser) as 
a null-based Constant (which seems to be fine from my point of view, doesn't 
it?), so none of them can be of type null itself
* TypeCast, FunctionCall, AbstractMarker: it just doesn't make sense for them 
to be null

Why only SetValue (among other RawUpdate interfaces) checks if Term is NULL and 
returns Deleter if yes:
* RawUpdate:
SetValue: obviously, this was the main use case here
SetElement: setting collections' values to null might make sense, but do we 
want it?
Addition, Substraction, Prepend: adding null to existing column's contents 
etc. doesn't make sense for me
* RawDeletion: If we do not support nulls in SELECTs because of the indexing 
reasons, I guess it can't be done in DELETEs too

  
 Add 'null' support to CQL 3.0
 -

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

 Attachments: 3783-v2.patch, 3783-wip-v1.patch


 Dense composite supports adding records where only a prefix of all the 
 component specifying the key is defined. In other words, with:
 {noformat}
 CREATE TABLE connections (
userid int,
ip text,
port int,
protocol text,
time timestamp,
PRIMARY KEY (userid, ip, port, protocol)
 ) WITH COMPACT STORAGE
 {noformat}
 you can insert
 {noformat}
 INSERT INTO connections (userid, ip, port, time) VALUES (2, '192.168.0.1', 
 80, 123456789);
 {noformat}
 You cannot however select that column specifically (i.e, without selecting 
 column (2, '192.168.0.1', 80, 'http') for instance).
 This ticket proposes to allow that though 'null', i.e. to allow
 {noformat}
 SELECT * FROM connections WHERE userid = 2 AND ip = '192.168.0.1' AND port = 
 80 AND protocol = null;
 {noformat}
 It would then also make sense to support:
 {noformat}
 INSERT INTO connections (userid, ip, port, protocol, time) VALUES (2, 
 '192.168.0.1', 80, null, 123456789);
 {noformat}
 as an equivalent to the insert query above.

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


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

2013-02-20 Thread JIRA

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

Michał Michalski reassigned CASSANDRA-3783:
---

Assignee: Michał Michalski

 Add 'null' support to CQL 3.0
 -

 Key: CASSANDRA-3783
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3783
 Project: Cassandra
  Issue Type: Sub-task
  Components: API
Reporter: Sylvain Lebresne
Assignee: Michał Michalski
Priority: Minor
  Labels: cql3
 Fix For: 1.2.2

 Attachments: 3783-v2.patch, 3783-wip-v1.patch


 Dense composite supports adding records where only a prefix of all the 
 component specifying the key is defined. In other words, with:
 {noformat}
 CREATE TABLE connections (
userid int,
ip text,
port int,
protocol text,
time timestamp,
PRIMARY KEY (userid, ip, port, protocol)
 ) WITH COMPACT STORAGE
 {noformat}
 you can insert
 {noformat}
 INSERT INTO connections (userid, ip, port, time) VALUES (2, '192.168.0.1', 
 80, 123456789);
 {noformat}
 You cannot however select that column specifically (i.e, without selecting 
 column (2, '192.168.0.1', 80, 'http') for instance).
 This ticket proposes to allow that though 'null', i.e. to allow
 {noformat}
 SELECT * FROM connections WHERE userid = 2 AND ip = '192.168.0.1' AND port = 
 80 AND protocol = null;
 {noformat}
 It would then also make sense to support:
 {noformat}
 INSERT INTO connections (userid, ip, port, protocol, time) VALUES (2, 
 '192.168.0.1', 80, null, 123456789);
 {noformat}
 as an equivalent to the insert query above.

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


[jira] [Created] (CASSANDRA-5273) Hanging system after OutOfMemory. Server cannot die due to uncaughtException handling

2013-02-20 Thread Ignace Desimpel (JIRA)
Ignace Desimpel created CASSANDRA-5273:
--

 Summary: Hanging system after OutOfMemory. Server cannot die due 
to uncaughtException handling
 Key: CASSANDRA-5273
 URL: https://issues.apache.org/jira/browse/CASSANDRA-5273
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Affects Versions: 1.2.1
 Environment: linux, 64 bit
Reporter: Ignace Desimpel
Priority: Minor




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


[jira] [Updated] (CASSANDRA-5273) Hanging system after OutOfMemory. Server cannot die due to uncaughtException handling

2013-02-20 Thread Ignace Desimpel (JIRA)

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

Ignace Desimpel updated CASSANDRA-5273:
---

Description: On out of memory exception, there is an uncaughtexception 
handler that is calling System.exit(). However, multiple threads are calling 
this handler causing a deadlock and the server cannot stop working

 Hanging system after OutOfMemory. Server cannot die due to uncaughtException 
 handling
 -

 Key: CASSANDRA-5273
 URL: https://issues.apache.org/jira/browse/CASSANDRA-5273
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Affects Versions: 1.2.1
 Environment: linux, 64 bit
Reporter: Ignace Desimpel
Priority: Minor

 On out of memory exception, there is an uncaughtexception handler that is 
 calling System.exit(). However, multiple threads are calling this handler 
 causing a deadlock and the server cannot stop working

--
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-5273) Hanging system after OutOfMemory. Server cannot die due to uncaughtException handling

2013-02-20 Thread Ignace Desimpel (JIRA)

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

Ignace Desimpel updated CASSANDRA-5273:
---

Description: On out of memory exception, there is an uncaughtexception 
handler that is calling System.exit(). However, multiple threads are calling 
this handler causing a deadlock and the server cannot stop working. See 
http://www.mail-archive.com/user@cassandra.apache.org/msg27898.html  (was: On 
out of memory exception, there is an uncaughtexception handler that is calling 
System.exit(). However, multiple threads are calling this handler causing a 
deadlock and the server cannot stop working)

 Hanging system after OutOfMemory. Server cannot die due to uncaughtException 
 handling
 -

 Key: CASSANDRA-5273
 URL: https://issues.apache.org/jira/browse/CASSANDRA-5273
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Affects Versions: 1.2.1
 Environment: linux, 64 bit
Reporter: Ignace Desimpel
Priority: Minor

 On out of memory exception, there is an uncaughtexception handler that is 
 calling System.exit(). However, multiple threads are calling this handler 
 causing a deadlock and the server cannot stop working. See 
 http://www.mail-archive.com/user@cassandra.apache.org/msg27898.html

--
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-5273) Hanging system after OutOfMemory. Server cannot die due to uncaughtException handling

2013-02-20 Thread Ignace Desimpel (JIRA)

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

Ignace Desimpel updated CASSANDRA-5273:
---

Attachment: CassHangs.txt

Stack trace hanging system

 Hanging system after OutOfMemory. Server cannot die due to uncaughtException 
 handling
 -

 Key: CASSANDRA-5273
 URL: https://issues.apache.org/jira/browse/CASSANDRA-5273
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Affects Versions: 1.2.1
 Environment: linux, 64 bit
Reporter: Ignace Desimpel
Priority: Minor
 Attachments: CassHangs.txt


 On out of memory exception, there is an uncaughtexception handler that is 
 calling System.exit(). However, multiple threads are calling this handler 
 causing a deadlock and the server cannot stop working. See 
 http://www.mail-archive.com/user@cassandra.apache.org/msg27898.html

--
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-5273) Hanging system after OutOfMemory. Server cannot die due to uncaughtException handling

2013-02-20 Thread Ignace Desimpel (JIRA)

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

Ignace Desimpel updated CASSANDRA-5273:
---

Description: On out of memory exception, there is an uncaughtexception 
handler that is calling System.exit(). However, multiple threads are calling 
this handler causing a deadlock and the server cannot stop working. See 
http://www.mail-archive.com/user@cassandra.apache.org/msg27898.html. And see 
stack trace in attachement.  (was: On out of memory exception, there is an 
uncaughtexception handler that is calling System.exit(). However, multiple 
threads are calling this handler causing a deadlock and the server cannot stop 
working. See 
http://www.mail-archive.com/user@cassandra.apache.org/msg27898.html)

 Hanging system after OutOfMemory. Server cannot die due to uncaughtException 
 handling
 -

 Key: CASSANDRA-5273
 URL: https://issues.apache.org/jira/browse/CASSANDRA-5273
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Affects Versions: 1.2.1
 Environment: linux, 64 bit
Reporter: Ignace Desimpel
Priority: Minor
 Attachments: CassHangs.txt


 On out of memory exception, there is an uncaughtexception handler that is 
 calling System.exit(). However, multiple threads are calling this handler 
 causing a deadlock and the server cannot stop working. See 
 http://www.mail-archive.com/user@cassandra.apache.org/msg27898.html. And see 
 stack trace in attachement.

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


[Cassandra Wiki] Trivial Update of DarnellAb by DarnellAb

2013-02-20 Thread Apache Wiki
Dear Wiki user,

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

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

New page:
Hey fellas !! The name is MACKENZIE EMERSON. I belong to Danbury.BR
I might take night schooling in The Endorsed Military School which has a branch 
in Lacey. My papa name is Ryan and he is a Game Show Host. My mom is a 
Welder.BR
BR
my page; [[http://www.majorchanelhandbags.com|chanel purses]]


[jira] [Commented] (CASSANDRA-5240) CQL3 has error with Compund row keys when secondray index involved

2013-02-20 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis commented on CASSANDRA-5240:
---

+1 (send to Testing for unit test after commit)

 CQL3 has error with Compund row keys when secondray index involved
 --

 Key: CASSANDRA-5240
 URL: https://issues.apache.org/jira/browse/CASSANDRA-5240
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Affects Versions: 1.2.1
 Environment: Linux centos 6.3
Reporter: Shahryar Sedghi
Assignee: Sylvain Lebresne
 Fix For: 1.2.2

 Attachments: 5240.patch


 CREATE TABLE  test(
 interval text,
 seq int,
 id int,
 severity int,
 PRIMARY KEY ((interval, seq), id))
 WITH CLUSTERING ORDER BY (id DESC);
 --
 CREATE INDEX ON test(severity);
 insert into test(interval, seq, id , severity) values('t',1, 1, 1);
 insert into test(interval, seq, id , severity) values('t',1, 2, 1);
 insert into test(interval, seq, id , severity) values('t',1, 3, 2);
 insert into test(interval, seq, id , severity) values('t',1, 4, 3);
 insert into test(interval, seq, id , severity) values('t',2, 1, 3);
 insert into test(interval, seq, id , severity) values('t',2, 2, 3);
 insert into test(interval, seq, id , severity) values('t',2, 3, 1);
 insert into test(interval, seq, id , severity) values('t',2, 4, 2);
 select * from test where severity = 3 and  interval = 't' and seq =1;
 Bad Request: Start key sorts after end key. This is not allowed; you probably 
 should not specify end key at all under random partitioner
 The following works fine
 CREATE TABLE  test(
 interval text,
 id int,
 severity int,
 PRIMARY KEY (interval, id))
 WITH CLUSTERING ORDER BY (id DESC);
 --
 CREATE INDEX ON test(severity);
 insert into test(interval, id , severity) values('t1', 4, 1);
 insert into test(interval, id , severity) values('t1', 1, 3);
 insert into test(interval, id , severity) values('t1', 2, 2);
 insert into test(interval, id , severity) values('t1', 3, 3);
 insert into test(interval, id , severity) values('t2', 3, 3);
  insert into test(interval, id , severity) values('t2', 1, 3);
  insert into test(interval, id , severity) values('t2', 2, 1);
 select * from test where severity = 3 and  interval = 't1';
 interval | id | severity
 --++--
t1 |  3 |3
t1 |  1 |3

--
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-5230) cql3 doesn't support multiple clauses on primary key components

2013-02-20 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis commented on CASSANDRA-5230:
---

+1

 cql3 doesn't support multiple clauses on primary key components
 ---

 Key: CASSANDRA-5230
 URL: https://issues.apache.org/jira/browse/CASSANDRA-5230
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Affects Versions: 1.2.0
Reporter: Brandon Williams
Assignee: Sylvain Lebresne
 Fix For: 1.2.2

 Attachments: 5230.patch


 In trying to write a dtest for CASSANDRA-5225, I noticed that given a table 
 such as:
 {noformat}
 CREATE TABLE foo (
   key text,
   c text,
   v text,
   PRIMARY KEY (key, c)
 )
 {noformat}
 It is possible to slice the values of 1 or 2 for c:
 {noformat}
 select c from foo where key = 'foo' and c  '0' and c  '3';
 {noformat}
 However, there is no way to get these explicitly by name, even though it 
 should be possible:
 {noformat}
 cqlsh:Keyspace1 select c from foo where key = 'foo' and c in ('1', '2');
 Bad Request: PRIMARY KEY part c cannot be restricted by IN relation
 {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


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

2013-02-20 Thread jbellis
Updated Branches:
  refs/heads/cassandra-1.2 457b546e6 - 686f516cc
  refs/heads/trunk 89e250b8b - 4042ef2dc


Merge branch 'cassandra-1.2' into trunk


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

Branch: refs/heads/trunk
Commit: 4042ef2dccd0fa8cec3cdc8f94439fdf9795ac8d
Parents: 89e250b 686f516
Author: Jonathan Ellis jbel...@apache.org
Authored: Wed Feb 20 05:39:14 2013 -0800
Committer: Jonathan Ellis jbel...@apache.org
Committed: Wed Feb 20 05:39:14 2013 -0800

--
 CHANGES.txt|2 +
 .../org/apache/cassandra/db/ColumnFamilyStore.java |1 -
 .../db/compaction/AbstractCompactionStrategy.java  |8 ++
 .../db/compaction/AbstractCompactionTask.java  |   34 ++--
 .../cassandra/db/compaction/CompactionManager.java |   67 +++---
 .../cassandra/db/compaction/CompactionTask.java|8 +--
 .../db/compaction/LeveledCompactionStrategy.java   |   43 +-
 .../compaction/SizeTieredCompactionStrategy.java   |   42 +++---
 .../LongLeveledCompactionStrategyTest.java |9 +--
 test/unit/org/apache/cassandra/Util.java   |4 +-
 .../db/compaction/CompactionsPurgeTest.java|4 +-
 11 files changed, 114 insertions(+), 108 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/4042ef2d/CHANGES.txt
--
diff --cc CHANGES.txt
index 6f9d076,0489968..30a861f
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,17 -1,6 +1,19 @@@
 +1.3
 + * Move sstable level information into the Stats component, removing the
 +   need for a separate Manifest file (CASSANDRA-4872)
 + * avoid serializing to byte[] on commitlog append (CASSANDRA-5199)
 + * make index_interval configurable per columnfamily (CASSANDRA-3961)
 + * add default_tim_to_live (CASSANDRA-3974)
 + * add memtable_flush_period_in_ms (CASSANDRA-4237)
 + * replace supercolumns internally by composites (CASSANDRA-3237, 5123)
 + * upgrade thrift to 0.9.0 (CASSANDRA-3719)
 + * drop unnecessary keyspace from user-defined compaction API (CASSANDRA-5139)
 + * more robust solution to incomplete compactions + counters (CASSANDRA-5151)
 +
 +
  1.2.2
+  * fix potential for multiple concurrent compactions of the same sstables
+(CASSANDRA-5256)
   * avoid no-op caching of byte[] on commitlog append (CASSANDRA-5199)
   * fix symlinks under data dir not working (CASSANDRA-5185)
   * fix bug in compact storage metadata handling (CASSANDRA-5189)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/4042ef2d/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
--

http://git-wip-us.apache.org/repos/asf/cassandra/blob/4042ef2d/src/java/org/apache/cassandra/db/compaction/AbstractCompactionStrategy.java
--

http://git-wip-us.apache.org/repos/asf/cassandra/blob/4042ef2d/src/java/org/apache/cassandra/db/compaction/CompactionManager.java
--

http://git-wip-us.apache.org/repos/asf/cassandra/blob/4042ef2d/src/java/org/apache/cassandra/db/compaction/CompactionTask.java
--

http://git-wip-us.apache.org/repos/asf/cassandra/blob/4042ef2d/src/java/org/apache/cassandra/db/compaction/LeveledCompactionStrategy.java
--

http://git-wip-us.apache.org/repos/asf/cassandra/blob/4042ef2d/src/java/org/apache/cassandra/db/compaction/SizeTieredCompactionStrategy.java
--

http://git-wip-us.apache.org/repos/asf/cassandra/blob/4042ef2d/test/long/org/apache/cassandra/db/compaction/LongLeveledCompactionStrategyTest.java
--

http://git-wip-us.apache.org/repos/asf/cassandra/blob/4042ef2d/test/unit/org/apache/cassandra/Util.java
--

http://git-wip-us.apache.org/repos/asf/cassandra/blob/4042ef2d/test/unit/org/apache/cassandra/db/compaction/CompactionsPurgeTest.java
--
diff --cc test/unit/org/apache/cassandra/db/compaction/CompactionsPurgeTest.java
index 6bc6e8b,827257f..9344ec3
--- a/test/unit/org/apache/cassandra/db/compaction/CompactionsPurgeTest.java
+++ b/test/unit/org/apache/cassandra/db/compaction/CompactionsPurgeTest.java
@@@ -132,20 -134,20 +132,20 @@@ public class 

[1/3] git commit: fix potential for multiple concurrent compactions of the same sstables patch by jbellis and yukim; reviewed by slebresne for CASSANDRA-5256

2013-02-20 Thread jbellis
fix potential for multiple concurrent compactions of the same sstables
patch by jbellis and yukim; reviewed by slebresne for CASSANDRA-5256


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

Branch: refs/heads/cassandra-1.2
Commit: 686f516ccb887fe977238b53b9be307b56432b8c
Parents: 457b546
Author: Jonathan Ellis jbel...@apache.org
Authored: Mon Feb 18 15:31:49 2013 -0600
Committer: Jonathan Ellis jbel...@apache.org
Committed: Wed Feb 20 05:38:57 2013 -0800

--
 CHANGES.txt|2 +
 .../org/apache/cassandra/db/ColumnFamilyStore.java |1 -
 .../db/compaction/AbstractCompactionStrategy.java  |8 ++
 .../db/compaction/AbstractCompactionTask.java  |   34 ++--
 .../cassandra/db/compaction/CompactionManager.java |   67 +++---
 .../cassandra/db/compaction/CompactionTask.java|8 +--
 .../db/compaction/LeveledCompactionStrategy.java   |   43 +-
 .../compaction/SizeTieredCompactionStrategy.java   |   42 +++---
 .../LongLeveledCompactionStrategyTest.java |9 +--
 test/unit/org/apache/cassandra/Util.java   |4 +-
 .../db/compaction/CompactionsPurgeTest.java|4 +-
 11 files changed, 114 insertions(+), 108 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/686f516c/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index a543ac1..0489968 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,6 @@
 1.2.2
+ * fix potential for multiple concurrent compactions of the same sstables
+   (CASSANDRA-5256)
  * avoid no-op caching of byte[] on commitlog append (CASSANDRA-5199)
  * fix symlinks under data dir not working (CASSANDRA-5185)
  * fix bug in compact storage metadata handling (CASSANDRA-5189)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/686f516c/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 c08224e..84ed1a1 100644
--- a/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
+++ b/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
@@ -879,7 +879,6 @@ public class ColumnFamilyStore implements 
ColumnFamilyStoreMBean
 for (SSTableReader sstable : sstables)
 {
 SetSSTableReader overlaps = 
ImmutableSet.copyOf(tree.search(Interval.RowPosition, 
SSTableReadercreate(sstable.first, sstable.last)));
-assert overlaps.contains(sstable);
 results = results == null ? overlaps : Sets.union(results, 
overlaps).immutableCopy();
 }
 results = Sets.difference(results, ImmutableSet.copyOf(sstables));

http://git-wip-us.apache.org/repos/asf/cassandra/blob/686f516c/src/java/org/apache/cassandra/db/compaction/AbstractCompactionStrategy.java
--
diff --git 
a/src/java/org/apache/cassandra/db/compaction/AbstractCompactionStrategy.java 
b/src/java/org/apache/cassandra/db/compaction/AbstractCompactionStrategy.java
index 356289c..cb15109 100644
--- 
a/src/java/org/apache/cassandra/db/compaction/AbstractCompactionStrategy.java
+++ 
b/src/java/org/apache/cassandra/db/compaction/AbstractCompactionStrategy.java
@@ -85,23 +85,31 @@ public abstract class AbstractCompactionStrategy
 
 /**
  * @param gcBefore throw away tombstones older than this
+ *
  * @return the next background/minor compaction task to run; null if 
nothing to do.
+ *
  * Is responsible for marking its sstables as compaction-pending.
  */
 public abstract AbstractCompactionTask getNextBackgroundTask(final int 
gcBefore);
 
 /**
  * @param gcBefore throw away tombstones older than this
+ *
  * @return a compaction task that should be run to compact this 
columnfamilystore
  * as much as possible.  Null if nothing to do.
+ *
+ * Is responsible for marking its sstables as compaction-pending.
  */
 public abstract AbstractCompactionTask getMaximalTask(final int gcBefore);
 
 /**
  * @param sstables SSTables to compact. Must be marked as compacting.
  * @param gcBefore throw away tombstones older than this
+ *
  * @return a compaction task corresponding to the requested sstables.
  * Will not be null. (Will throw if user requests an invalid compaction.)
+ *
+ * Is responsible for marking its sstables as compaction-pending.
  */
 public abstract AbstractCompactionTask 

[2/3] git commit: fix potential for multiple concurrent compactions of the same sstables patch by jbellis and yukim; reviewed by slebresne for CASSANDRA-5256

2013-02-20 Thread jbellis
fix potential for multiple concurrent compactions of the same sstables
patch by jbellis and yukim; reviewed by slebresne for CASSANDRA-5256


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

Branch: refs/heads/trunk
Commit: 686f516ccb887fe977238b53b9be307b56432b8c
Parents: 457b546
Author: Jonathan Ellis jbel...@apache.org
Authored: Mon Feb 18 15:31:49 2013 -0600
Committer: Jonathan Ellis jbel...@apache.org
Committed: Wed Feb 20 05:38:57 2013 -0800

--
 CHANGES.txt|2 +
 .../org/apache/cassandra/db/ColumnFamilyStore.java |1 -
 .../db/compaction/AbstractCompactionStrategy.java  |8 ++
 .../db/compaction/AbstractCompactionTask.java  |   34 ++--
 .../cassandra/db/compaction/CompactionManager.java |   67 +++---
 .../cassandra/db/compaction/CompactionTask.java|8 +--
 .../db/compaction/LeveledCompactionStrategy.java   |   43 +-
 .../compaction/SizeTieredCompactionStrategy.java   |   42 +++---
 .../LongLeveledCompactionStrategyTest.java |9 +--
 test/unit/org/apache/cassandra/Util.java   |4 +-
 .../db/compaction/CompactionsPurgeTest.java|4 +-
 11 files changed, 114 insertions(+), 108 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/686f516c/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index a543ac1..0489968 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,6 @@
 1.2.2
+ * fix potential for multiple concurrent compactions of the same sstables
+   (CASSANDRA-5256)
  * avoid no-op caching of byte[] on commitlog append (CASSANDRA-5199)
  * fix symlinks under data dir not working (CASSANDRA-5185)
  * fix bug in compact storage metadata handling (CASSANDRA-5189)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/686f516c/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 c08224e..84ed1a1 100644
--- a/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
+++ b/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
@@ -879,7 +879,6 @@ public class ColumnFamilyStore implements 
ColumnFamilyStoreMBean
 for (SSTableReader sstable : sstables)
 {
 SetSSTableReader overlaps = 
ImmutableSet.copyOf(tree.search(Interval.RowPosition, 
SSTableReadercreate(sstable.first, sstable.last)));
-assert overlaps.contains(sstable);
 results = results == null ? overlaps : Sets.union(results, 
overlaps).immutableCopy();
 }
 results = Sets.difference(results, ImmutableSet.copyOf(sstables));

http://git-wip-us.apache.org/repos/asf/cassandra/blob/686f516c/src/java/org/apache/cassandra/db/compaction/AbstractCompactionStrategy.java
--
diff --git 
a/src/java/org/apache/cassandra/db/compaction/AbstractCompactionStrategy.java 
b/src/java/org/apache/cassandra/db/compaction/AbstractCompactionStrategy.java
index 356289c..cb15109 100644
--- 
a/src/java/org/apache/cassandra/db/compaction/AbstractCompactionStrategy.java
+++ 
b/src/java/org/apache/cassandra/db/compaction/AbstractCompactionStrategy.java
@@ -85,23 +85,31 @@ public abstract class AbstractCompactionStrategy
 
 /**
  * @param gcBefore throw away tombstones older than this
+ *
  * @return the next background/minor compaction task to run; null if 
nothing to do.
+ *
  * Is responsible for marking its sstables as compaction-pending.
  */
 public abstract AbstractCompactionTask getNextBackgroundTask(final int 
gcBefore);
 
 /**
  * @param gcBefore throw away tombstones older than this
+ *
  * @return a compaction task that should be run to compact this 
columnfamilystore
  * as much as possible.  Null if nothing to do.
+ *
+ * Is responsible for marking its sstables as compaction-pending.
  */
 public abstract AbstractCompactionTask getMaximalTask(final int gcBefore);
 
 /**
  * @param sstables SSTables to compact. Must be marked as compacting.
  * @param gcBefore throw away tombstones older than this
+ *
  * @return a compaction task corresponding to the requested sstables.
  * Will not be null. (Will throw if user requests an invalid compaction.)
+ *
+ * Is responsible for marking its sstables as compaction-pending.
  */
 public abstract AbstractCompactionTask 

[jira] [Created] (CASSANDRA-5274) Option to disable scientific notation in cqlsh

2013-02-20 Thread J.B. Langston (JIRA)
J.B. Langston created CASSANDRA-5274:


 Summary: Option to disable scientific notation in cqlsh
 Key: CASSANDRA-5274
 URL: https://issues.apache.org/jira/browse/CASSANDRA-5274
 Project: Cassandra
  Issue Type: Bug
  Components: Tools
Affects Versions: 1.2.1, 1.1.10
Reporter: J.B. Langston


Currently cqlsh automatically displays large numbers using scientific notation. 
Customers have requested the option to disable 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] [Updated] (CASSANDRA-5274) Option to disable scientific notation in cqlsh

2013-02-20 Thread J.B. Langston (JIRA)

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

J.B. Langston updated CASSANDRA-5274:
-

Priority: Minor  (was: Major)

 Option to disable scientific notation in cqlsh
 --

 Key: CASSANDRA-5274
 URL: https://issues.apache.org/jira/browse/CASSANDRA-5274
 Project: Cassandra
  Issue Type: Bug
  Components: Tools
Affects Versions: 1.1.10, 1.2.1
Reporter: J.B. Langston
Priority: Minor

 Currently cqlsh automatically displays large numbers using scientific 
 notation. Customers have requested the option to disable 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-5267) Index organized table

2013-02-20 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis commented on CASSANDRA-5267:
---

I don't understand.

bq. Benefit is that we don't need to read original CF for other data when we 
query by index

This sounds like a covered index query, but 

bq. In the background we could have a CF having only (key, indexed_value), in 
this case (posted_at, blog_id) so that we can maintain our index when we delete 
a row or change blog_id, and we would store other values within the index

sounds like you want to change how the actual table data is stored.

 Index organized table
 -

 Key: CASSANDRA-5267
 URL: https://issues.apache.org/jira/browse/CASSANDRA-5267
 Project: Cassandra
  Issue Type: Improvement
Reporter: Srdjan Mitrovic
Priority: Minor

 The purpose is to enable very fast scans for queries which use WHERE 
 indexed_column_value='foo';
 We could borrow syntax from Oracle (with a small difference).
 {noformat}CREATE TABLE blog_entries (
 posted_at timestamp,
 blog_id int
 author text,
 content text,
 PRIMARY KEY (posted_at)
 )
 ORGANIZATION INDEX ON (blog_id);
 {noformat}
 In the background we could have a CF having only (key, indexed_value), in 
 this case (posted_at, blog_id) so that we can maintain our index when we 
 delete a row or change blog_id, and we would store other values within the 
 index.

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


[Cassandra Wiki] Trivial Update of IngridWas by IngridWas

2013-02-20 Thread Apache Wiki
Dear Wiki user,

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

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

New page:
Yo bros !! The name is JULIO BENNETT. I reside in Liverpool.BR
BR
I might take night schooling in The New Preparatory situated in South Bend. I 
also like to Paintball. My daddy name is Stephen  and he is a Gondolier. My 
momy is a Computer hardware engineer.BR
BR
Feel free to surf to my blog post: [[http://www.foundbeatsbydre.com|beats 
monster]]


[Cassandra Wiki] Trivial Update of ElsaLjc by ElsaLjc

2013-02-20 Thread Apache Wiki
Dear Wiki user,

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

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

New page:
Wassp People !! The name is CURTIS MCCARTHY. I am staying at Newport.BR
My school's name is The Wide Institute which has a branch in Carlisle. I want 
to become a Geophysicist. One day i would want to do Calendars.BR
BR
Here is my page :: [[http://beats-bydre-cheap2013.blinkweb.com|beats headphones 
review]]


[1/2] git commit: Fix CQL3 composite partition key error

2013-02-20 Thread slebresne
Fix CQL3 composite partition key error

patch by slebresne; reviewed by jbellis for CASSANDRA-5240


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

Branch: refs/heads/cassandra-1.2
Commit: 03b4c2794c4c0f5e11ec9a24b52b523d8746fbb5
Parents: 686f516
Author: Sylvain Lebresne sylv...@datastax.com
Authored: Wed Feb 20 17:49:41 2013 +0100
Committer: Sylvain Lebresne sylv...@datastax.com
Committed: Wed Feb 20 17:49:41 2013 +0100

--
 CHANGES.txt|1 +
 .../cassandra/cql3/statements/SelectStatement.java |9 +++--
 2 files changed, 8 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/03b4c279/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 0489968..f684747 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -28,6 +28,7 @@
  * cli: Add JMX authentication support (CASSANDRA-5080)
  * Fix forceFlush behavior (CASSANDRA-5241)
  * cqlsh: Add username autocompletion (CASSANDRA-5231)
+ * Fix CQL3 composite partition key error (CASSANDRA-5240)
 
 
 1.2.1

http://git-wip-us.apache.org/repos/asf/cassandra/blob/03b4c279/src/java/org/apache/cassandra/cql3/statements/SelectStatement.java
--
diff --git a/src/java/org/apache/cassandra/cql3/statements/SelectStatement.java 
b/src/java/org/apache/cassandra/cql3/statements/SelectStatement.java
index 4491394..4badb8e 100644
--- a/src/java/org/apache/cassandra/cql3/statements/SelectStatement.java
+++ b/src/java/org/apache/cassandra/cql3/statements/SelectStatement.java
@@ -357,7 +357,7 @@ public class SelectStatement implements CQLStatement
 
 private ByteBuffer getKeyBound(Bound b, ListByteBuffer variables) throws 
InvalidRequestException
 {
-return buildBound(b, cfDef.keys.values(), keyRestrictions, isReversed, 
cfDef.getKeyNameBuilder(), variables);
+return buildBound(b, cfDef.keys.values(), keyRestrictions, false, 
cfDef.getKeyNameBuilder(), variables);
 }
 
 private Token getTokenBound(Bound b, ListByteBuffer variables, 
IPartitioner? p) throws InvalidRequestException
@@ -521,7 +521,12 @@ public class SelectStatement implements CQLStatement
 }
 }
 // Means no relation at all or everything was an equal
-return (bound == Bound.END) ? builder.buildAsEndOfRange() : 
builder.build();
+// Note: if the builder is full, there is no need to use the 
end-of-component bit. For columns selection,
+// it would be harmless to do it. However, we use this method got the 
partition key too. And when a query
+// with 2ndary index is done, and with the the partition provided with 
an EQ, we'll end up here, and in that
+// case using the eoc would be bad, since for the random partitioner 
we have no guarantee that
+// builder.buildAsEndOfRange() will sort after builder.build() (see 
#5240).
+return (bound == Bound.END  builder.remainingCount()  0) ? 
builder.buildAsEndOfRange() : builder.build();
 }
 
 private ByteBuffer getRequestedBound(Bound b, ListByteBuffer variables) 
throws InvalidRequestException



[2/2] git commit: Allow IN clause for last clustering key

2013-02-20 Thread slebresne
Updated Branches:
  refs/heads/cassandra-1.2 686f516cc - 89ab670eb


Allow IN clause for last clustering key

patch by slebresne; reviewed by jbellis for CASSANDRA-5230


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

Branch: refs/heads/cassandra-1.2
Commit: 89ab670eb54fe267afa83a56f9d90bb4cd10b9e5
Parents: 03b4c27
Author: Sylvain Lebresne sylv...@datastax.com
Authored: Wed Feb 20 17:51:20 2013 +0100
Committer: Sylvain Lebresne sylv...@datastax.com
Committed: Wed Feb 20 17:51:20 2013 +0100

--
 CHANGES.txt|1 +
 .../cassandra/cql3/statements/SelectStatement.java |   23 ++
 2 files changed, 17 insertions(+), 7 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/89ab670e/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index f684747..8e77bf7 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -29,6 +29,7 @@
  * Fix forceFlush behavior (CASSANDRA-5241)
  * cqlsh: Add username autocompletion (CASSANDRA-5231)
  * Fix CQL3 composite partition key error (CASSANDRA-5240)
+ * Allow IN clause on last clustering key (CASSANDRA-5230)
 
 
 1.2.1

http://git-wip-us.apache.org/repos/asf/cassandra/blob/89ab670e/src/java/org/apache/cassandra/cql3/statements/SelectStatement.java
--
diff --git a/src/java/org/apache/cassandra/cql3/statements/SelectStatement.java 
b/src/java/org/apache/cassandra/cql3/statements/SelectStatement.java
index 4badb8e..825844a 100644
--- a/src/java/org/apache/cassandra/cql3/statements/SelectStatement.java
+++ b/src/java/org/apache/cassandra/cql3/statements/SelectStatement.java
@@ -419,16 +419,20 @@ public class SelectStatement implements CQLStatement
 assert r != null  r.isEquality();
 if (r.eqValues.size()  1)
 {
-assert cfDef.isCompact;
-// We have a IN. We only support this for the last column, so 
just create all columns and return.
+// We have a IN, which we only support for the last column.
+// If compact, just add all values and we're done. Otherwise,
+// for each value of the IN, creates all the columns 
corresponding to the selection.
 SortedSetByteBuffer columns = new 
TreeSetByteBuffer(cfDef.cfm.comparator);
 IteratorTerm iter = r.eqValues.iterator();
 while (iter.hasNext())
 {
 Term v = iter.next();
 ColumnNameBuilder b = iter.hasNext() ? builder.copy() : 
builder;
-ByteBuffer cname = b.add(v.bindAndGet(variables)).build();
-columns.add(cname);
+b.add(v.bindAndGet(variables));
+if (cfDef.isCompact)
+columns.add(b.build());
+else
+columns.addAll(addSelectedColumns(b));
 }
 return columns;
 }
@@ -438,6 +442,11 @@ public class SelectStatement implements CQLStatement
 }
 }
 
+return addSelectedColumns(builder);
+}
+
+private SortedSetByteBuffer addSelectedColumns(ColumnNameBuilder builder)
+{
 if (cfDef.isCompact)
 {
 return FBUtilities.singleton(builder.build());
@@ -947,9 +956,9 @@ public class SelectStatement implements CQLStatement
 if (!cfDef.isComposite  
(!restriction.isInclusive(Bound.START) || !restriction.isInclusive(Bound.END)))
 stmt.sliceRestriction = restriction;
 }
-// We only support IN for the last name and for compact 
storage so far
-// TODO: #3885 allows us to extend to non compact as well, but 
that remains to be done
-else if (restriction.eqValues.size()  1  (!cfDef.isCompact 
|| i != stmt.columnRestrictions.length - 1))
+// We only support IN for the last name so far
+// TODO: #3885 allows us to extend to other parts (cf. #4762)
+else if (restriction.eqValues.size()  1  i != 
stmt.columnRestrictions.length - 1)
 {
 throw new InvalidRequestException(String.format(PRIMARY 
KEY part %s cannot be restricted by IN relation, cname));
 }



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

2013-02-20 Thread slebresne
Updated Branches:
  refs/heads/trunk 4042ef2dc - b6062a5ca


Merge branch 'cassandra-1.2' into trunk


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

Branch: refs/heads/trunk
Commit: b6062a5ca5068453ee67afc711a8953ab78bfa91
Parents: 4042ef2 89ab670
Author: Sylvain Lebresne sylv...@datastax.com
Authored: Wed Feb 20 17:52:56 2013 +0100
Committer: Sylvain Lebresne sylv...@datastax.com
Committed: Wed Feb 20 17:52:56 2013 +0100

--
 CHANGES.txt|2 +
 .../cassandra/cql3/statements/SelectStatement.java |   32 ++
 2 files changed, 25 insertions(+), 9 deletions(-)
--


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

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



[1/3] git commit: Fix CQL3 composite partition key error

2013-02-20 Thread slebresne
Fix CQL3 composite partition key error

patch by slebresne; reviewed by jbellis for CASSANDRA-5240


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

Branch: refs/heads/trunk
Commit: 03b4c2794c4c0f5e11ec9a24b52b523d8746fbb5
Parents: 686f516
Author: Sylvain Lebresne sylv...@datastax.com
Authored: Wed Feb 20 17:49:41 2013 +0100
Committer: Sylvain Lebresne sylv...@datastax.com
Committed: Wed Feb 20 17:49:41 2013 +0100

--
 CHANGES.txt|1 +
 .../cassandra/cql3/statements/SelectStatement.java |9 +++--
 2 files changed, 8 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/03b4c279/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 0489968..f684747 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -28,6 +28,7 @@
  * cli: Add JMX authentication support (CASSANDRA-5080)
  * Fix forceFlush behavior (CASSANDRA-5241)
  * cqlsh: Add username autocompletion (CASSANDRA-5231)
+ * Fix CQL3 composite partition key error (CASSANDRA-5240)
 
 
 1.2.1

http://git-wip-us.apache.org/repos/asf/cassandra/blob/03b4c279/src/java/org/apache/cassandra/cql3/statements/SelectStatement.java
--
diff --git a/src/java/org/apache/cassandra/cql3/statements/SelectStatement.java 
b/src/java/org/apache/cassandra/cql3/statements/SelectStatement.java
index 4491394..4badb8e 100644
--- a/src/java/org/apache/cassandra/cql3/statements/SelectStatement.java
+++ b/src/java/org/apache/cassandra/cql3/statements/SelectStatement.java
@@ -357,7 +357,7 @@ public class SelectStatement implements CQLStatement
 
 private ByteBuffer getKeyBound(Bound b, ListByteBuffer variables) throws 
InvalidRequestException
 {
-return buildBound(b, cfDef.keys.values(), keyRestrictions, isReversed, 
cfDef.getKeyNameBuilder(), variables);
+return buildBound(b, cfDef.keys.values(), keyRestrictions, false, 
cfDef.getKeyNameBuilder(), variables);
 }
 
 private Token getTokenBound(Bound b, ListByteBuffer variables, 
IPartitioner? p) throws InvalidRequestException
@@ -521,7 +521,12 @@ public class SelectStatement implements CQLStatement
 }
 }
 // Means no relation at all or everything was an equal
-return (bound == Bound.END) ? builder.buildAsEndOfRange() : 
builder.build();
+// Note: if the builder is full, there is no need to use the 
end-of-component bit. For columns selection,
+// it would be harmless to do it. However, we use this method got the 
partition key too. And when a query
+// with 2ndary index is done, and with the the partition provided with 
an EQ, we'll end up here, and in that
+// case using the eoc would be bad, since for the random partitioner 
we have no guarantee that
+// builder.buildAsEndOfRange() will sort after builder.build() (see 
#5240).
+return (bound == Bound.END  builder.remainingCount()  0) ? 
builder.buildAsEndOfRange() : builder.build();
 }
 
 private ByteBuffer getRequestedBound(Bound b, ListByteBuffer variables) 
throws InvalidRequestException



[2/3] git commit: Allow IN clause for last clustering key

2013-02-20 Thread slebresne
Allow IN clause for last clustering key

patch by slebresne; reviewed by jbellis for CASSANDRA-5230


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

Branch: refs/heads/trunk
Commit: 89ab670eb54fe267afa83a56f9d90bb4cd10b9e5
Parents: 03b4c27
Author: Sylvain Lebresne sylv...@datastax.com
Authored: Wed Feb 20 17:51:20 2013 +0100
Committer: Sylvain Lebresne sylv...@datastax.com
Committed: Wed Feb 20 17:51:20 2013 +0100

--
 CHANGES.txt|1 +
 .../cassandra/cql3/statements/SelectStatement.java |   23 ++
 2 files changed, 17 insertions(+), 7 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/89ab670e/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index f684747..8e77bf7 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -29,6 +29,7 @@
  * Fix forceFlush behavior (CASSANDRA-5241)
  * cqlsh: Add username autocompletion (CASSANDRA-5231)
  * Fix CQL3 composite partition key error (CASSANDRA-5240)
+ * Allow IN clause on last clustering key (CASSANDRA-5230)
 
 
 1.2.1

http://git-wip-us.apache.org/repos/asf/cassandra/blob/89ab670e/src/java/org/apache/cassandra/cql3/statements/SelectStatement.java
--
diff --git a/src/java/org/apache/cassandra/cql3/statements/SelectStatement.java 
b/src/java/org/apache/cassandra/cql3/statements/SelectStatement.java
index 4badb8e..825844a 100644
--- a/src/java/org/apache/cassandra/cql3/statements/SelectStatement.java
+++ b/src/java/org/apache/cassandra/cql3/statements/SelectStatement.java
@@ -419,16 +419,20 @@ public class SelectStatement implements CQLStatement
 assert r != null  r.isEquality();
 if (r.eqValues.size()  1)
 {
-assert cfDef.isCompact;
-// We have a IN. We only support this for the last column, so 
just create all columns and return.
+// We have a IN, which we only support for the last column.
+// If compact, just add all values and we're done. Otherwise,
+// for each value of the IN, creates all the columns 
corresponding to the selection.
 SortedSetByteBuffer columns = new 
TreeSetByteBuffer(cfDef.cfm.comparator);
 IteratorTerm iter = r.eqValues.iterator();
 while (iter.hasNext())
 {
 Term v = iter.next();
 ColumnNameBuilder b = iter.hasNext() ? builder.copy() : 
builder;
-ByteBuffer cname = b.add(v.bindAndGet(variables)).build();
-columns.add(cname);
+b.add(v.bindAndGet(variables));
+if (cfDef.isCompact)
+columns.add(b.build());
+else
+columns.addAll(addSelectedColumns(b));
 }
 return columns;
 }
@@ -438,6 +442,11 @@ public class SelectStatement implements CQLStatement
 }
 }
 
+return addSelectedColumns(builder);
+}
+
+private SortedSetByteBuffer addSelectedColumns(ColumnNameBuilder builder)
+{
 if (cfDef.isCompact)
 {
 return FBUtilities.singleton(builder.build());
@@ -947,9 +956,9 @@ public class SelectStatement implements CQLStatement
 if (!cfDef.isComposite  
(!restriction.isInclusive(Bound.START) || !restriction.isInclusive(Bound.END)))
 stmt.sliceRestriction = restriction;
 }
-// We only support IN for the last name and for compact 
storage so far
-// TODO: #3885 allows us to extend to non compact as well, but 
that remains to be done
-else if (restriction.eqValues.size()  1  (!cfDef.isCompact 
|| i != stmt.columnRestrictions.length - 1))
+// We only support IN for the last name so far
+// TODO: #3885 allows us to extend to other parts (cf. #4762)
+else if (restriction.eqValues.size()  1  i != 
stmt.columnRestrictions.length - 1)
 {
 throw new InvalidRequestException(String.format(PRIMARY 
KEY part %s cannot be restricted by IN relation, cname));
 }



[Cassandra Wiki] Trivial Update of KathyPaul by KathyPaul

2013-02-20 Thread Apache Wiki
Dear Wiki user,

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

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

New page:
I might take night schooling in The Colorful Military School built at 
Huntsville.BR
I am planning to become a Xylophonist. I am a fan of Knifemaking. My papa name 
is Peter and he is a Pedologist. My mother is a Deputy.BR
BR
Also visit my web page; [[http://www.foundbeatsbydre.com|beats by dre on sale]]


[Cassandra Wiki] Trivial Update of MarianneR by MarianneR

2013-02-20 Thread Apache Wiki
Dear Wiki user,

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

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

New page:
Howdy !! I am EVONNE WHEELER. I reside in Fort Smith. I might join The Windy 
Military School situated in Salford.BR
I have a job as Pastor. One day i would want to do Tetris.BR
BR
Here is my website [[http://beats-bydre-cheap2013.blinkweb.com|beats by dr dre 
headphones]]


[jira] [Updated] (CASSANDRA-5233) Add cqlsh help for auth statements

2013-02-20 Thread Aleksey Yeschenko (JIRA)

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

Aleksey Yeschenko updated CASSANDRA-5233:
-

Attachment: (was: 5231.txt)

 Add cqlsh help for auth statements
 --

 Key: CASSANDRA-5233
 URL: https://issues.apache.org/jira/browse/CASSANDRA-5233
 Project: Cassandra
  Issue Type: Improvement
  Components: Tools
Reporter: Aleksey Yeschenko
Assignee: Aleksey Yeschenko
Priority: Trivial
 Fix For: 1.2.2

 Attachments: 5233.txt


 Add cqlsh help for CREATE USER/DROP USER/GRANT/REVOKE etc.

--
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-5233) Add cqlsh help for auth statements

2013-02-20 Thread Aleksey Yeschenko (JIRA)

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

Aleksey Yeschenko updated CASSANDRA-5233:
-

Attachment: 5231.txt

 Add cqlsh help for auth statements
 --

 Key: CASSANDRA-5233
 URL: https://issues.apache.org/jira/browse/CASSANDRA-5233
 Project: Cassandra
  Issue Type: Improvement
  Components: Tools
Reporter: Aleksey Yeschenko
Assignee: Aleksey Yeschenko
Priority: Trivial
 Fix For: 1.2.2

 Attachments: 5233.txt


 Add cqlsh help for CREATE USER/DROP USER/GRANT/REVOKE etc.

--
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-5233) Add cqlsh help for auth statements

2013-02-20 Thread Aleksey Yeschenko (JIRA)

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

Aleksey Yeschenko updated CASSANDRA-5233:
-

Attachment: 5233.txt

 Add cqlsh help for auth statements
 --

 Key: CASSANDRA-5233
 URL: https://issues.apache.org/jira/browse/CASSANDRA-5233
 Project: Cassandra
  Issue Type: Improvement
  Components: Tools
Reporter: Aleksey Yeschenko
Assignee: Aleksey Yeschenko
Priority: Trivial
 Fix For: 1.2.2

 Attachments: 5233.txt


 Add cqlsh help for CREATE USER/DROP USER/GRANT/REVOKE etc.

--
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-5228) Track maximum ttl and use to expire entire sstables

2013-02-20 Thread Bryan Talbot (JIRA)

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

Bryan Talbot commented on CASSANDRA-5228:
-

It sounds like this would be an Age Tiered Compaction Strategy?

One of our busiest use cases involves logging performance data with the same 
TTL for all columns of a row.  The row is never updated once all columns are 
written to once.  For example, metrics per-second might be kept for 3 days, 
metrics per-minute kept for 3 weeks, and metrics per-hour or day kept longer.  
It would be great to avoid all the excess compaction IO work on rows that never 
change and haven't expired yet.  This sounds like it would greatly extend the 
performance of cassandra (by reducing compaction-IO overhead) for us and many 
other similar workloads.


 Track maximum ttl and use to expire entire sstables
 ---

 Key: CASSANDRA-5228
 URL: https://issues.apache.org/jira/browse/CASSANDRA-5228
 Project: Cassandra
  Issue Type: Bug
Reporter: Jonathan Ellis
Priority: Minor

 It would be nice to be able to throw away entire sstables worth of data when 
 we know that it's all expired.

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


[Cassandra Wiki] Trivial Update of MelisaLyo by MelisaLyo

2013-02-20 Thread Apache Wiki
Dear Wiki user,

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

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

New page:
Yo bros !! The name is LIZA KNOWLES. I am from City of London.BR
This feb i will be 20. I and my sister go to The Puzzled Academy of Guaranteed 
Education built at Amarillo. I have a job as Clerk. I like to do Calligraphy. 
My dad name is   Lance and he is a Innkeeper. My mom is a Poetrist.BR
BR
Look at my web page :: [[http://www.approachlouisvuittonoutlet.com|lv belt]]


git commit: Add cqlsh help for auth statement

2013-02-20 Thread slebresne
Updated Branches:
  refs/heads/cassandra-1.2 89ab670eb - 5f8ce62b2


Add cqlsh help for auth statement

patch by iamaleksey; reviewed by slebresne for CASSANDRA-5233


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

Branch: refs/heads/cassandra-1.2
Commit: 5f8ce62b283a08cf284b07f647c04896970a026a
Parents: 89ab670
Author: Sylvain Lebresne sylv...@datastax.com
Authored: Wed Feb 20 22:03:43 2013 +0100
Committer: Sylvain Lebresne sylv...@datastax.com
Committed: Wed Feb 20 22:03:43 2013 +0100

--
 pylib/cqlshlib/helptopics.py |  126 +
 1 files changed, 126 insertions(+), 0 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/5f8ce62b/pylib/cqlshlib/helptopics.py
--
diff --git a/pylib/cqlshlib/helptopics.py b/pylib/cqlshlib/helptopics.py
index 77a111e..775c7de 100644
--- a/pylib/cqlshlib/helptopics.py
+++ b/pylib/cqlshlib/helptopics.py
@@ -897,3 +897,129 @@ class CQL3HelpTopics(CQLHelpTopics):
 
 Currently, COUNT is the only function supported by CQL.
 
+
+def help_create(self):
+super(CQL3HelpTopics, self).help_create()
+print   HELP CREATE_USER;
+
+def help_alter(self):
+super(CQL3HelpTopics, self).help_alter()
+print   HELP ALTER_USER;
+
+def help_drop(self):
+super(CQL3HelpTopics, self).help_drop()
+print   HELP DROP_USER;
+
+def help_list(self):
+print 
+There are different variants of LIST. For more information, see
+one of the following:
+
+  HELP LIST_USERS;
+  HELP LIST_PERMISSIONS;
+
+
+def help_create_user(self):
+print 
+CREATE USER username [WITH PASSWORD 'password'] [NOSUPERUSER | 
SUPERUSER];
+
+CREATE USER creates a new Cassandra user account.
+Only superusers can issue CREATE USER requests.
+To create a superuser account use SUPERUSER option (NOSUPERUSER is the 
default).
+
+WITH PASSWORD clause should only be used with password-based 
authenticators,
+e.g. PasswordAuthenticator, SimpleAuthenticator.
+
+
+def help_alter_user(self):
+print 
+ALTER USER username [WITH PASSWORD 'password'] [NOSUPERUSER | 
SUPERUSER];
+
+Use ALTER USER to change a user's superuser status and/or password 
(only
+with password-based authenticators).
+Superusers can change a user's password or superuser status (except 
their own).
+Users cannot change their own superuser status. Ordinary users can 
only change their
+password (if the configured authenticator is password-based).
+
+
+def help_drop_user(self):
+print 
+DROP USER username;
+
+DROP USER removes an existing user. You have to be logged in as a 
superuser
+to issue a DROP USER statement. A user cannot drop themselves.
+
+
+def help_list_users(self):
+print 
+LIST USERS;
+
+List existing users and their superuser status.
+
+
+def help_grant(self):
+print 
+GRANT (permission [PERMISSION] | ALL [PERMISSIONS])
+  ON ALL KEYSPACES
+   | KEYSPACE keyspace
+   | [TABLE] [keyspace.]table
+  TO username
+
+Grant the specified permission (or all permissions) on a resource
+to a user.
+
+To be able to grant a permission on some resource you have to
+have that permission yourself and also AUTHORIZE permission on it,
+or on one of its parent resources.
+
+See HELP PERMISSIONS for more info on the available permissions.
+
+
+def help_revoke(self):
+print 
+REVOKE (permission [PERMISSION] | ALL [PERMISSIONS])
+  ON ALL KEYSPACES
+   | KEYSPACE keyspace
+   | [TABLE] [keyspace.]table
+  FROM username
+
+Revokes the specified permission (or all permissions) on a resource
+from a user.
+
+To be able to revoke a permission on some resource you have to
+have that permission yourself and also AUTHORIZE permission on it,
+or on one of its parent resources.
+
+See HELP PERMISSIONS for more info on the available permissions.
+
+
+def help_list_permissions(self):
+print 
+LIST (permission [PERMISSION] | ALL [PERMISSIONS])
+  [ON ALL KEYSPACES
+| KEYSPACE keyspace
+| [TABLE] [keyspace.]table]
+

[Cassandra Wiki] Trivial Update of ShavonneA by ShavonneA

2013-02-20 Thread Apache Wiki
Dear Wiki user,

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

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

New page:
Hey fellas !! I am ESTA STRONG. I reside in Richmond County.BR
BR
I and my sister go to The Foggy Academy of Useful Education located in Fort 
Worth. I work as a Judge. I like to do Owning An Antique Car.BR
BR
Look into my weblog: [[http://beats-bydre-cheap2013.blinkweb.com|beats by dr 
dre]]


[Cassandra Wiki] Trivial Update of ZacharyDe by ZacharyDe

2013-02-20 Thread Apache Wiki
Dear Wiki user,

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

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

New page:
Yo bros !! The name is MARLO HEBERT. My parents want me to join The Scarce 
Institute of Fuzzy People in St Davids.BR
I have a job as Secretary General. I am a fan of Backpacking. My dad name is 
Ryan  and he is a Shoemaker. My mummy is a Manager.BR
BR
Stop by my homepage; [[http://cheap-replica-watches.yolasite.com|fake swiss 
watches]]


git commit: Update debian version for 1.2.2 release

2013-02-20 Thread slebresne
Updated Branches:
  refs/heads/cassandra-1.2 5f8ce62b2 - 9bea226fb


Update debian version for 1.2.2 release


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

Branch: refs/heads/cassandra-1.2
Commit: 9bea226fb16878cc43d07992d1a49896366e5219
Parents: 5f8ce62
Author: Sylvain Lebresne sylv...@datastax.com
Authored: Wed Feb 20 23:30:03 2013 +0100
Committer: Sylvain Lebresne sylv...@datastax.com
Committed: Wed Feb 20 23:30:03 2013 +0100

--
 debian/changelog |6 ++
 1 files changed, 6 insertions(+), 0 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/9bea226f/debian/changelog
--
diff --git a/debian/changelog b/debian/changelog
index 0310c90..0a71ffb 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+cassandra (1.2.2) unstable; urgency=low
+
+  * New release
+
+ -- Sylvain Lebresne slebre...@apache.org  Wed, 20 Feb 2013 23:28:10 +0100
+
 cassandra (1.2.1) unstable; urgency=low
 
   * New release



[jira] [Commented] (CASSANDRA-5146) repair -pr hangs

2013-02-20 Thread Yuki Morishita (JIRA)

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

Yuki Morishita commented on CASSANDRA-5146:
---

From the code, I see two points where repair can hang.

- Merkle tree calculation failure
- Data streaming failure

Those have been addressed in CASSANDRA-3112, so let's revisit that issue.
For point one, we need to change message to report back failure, so we have to 
do that in next major release.
But point two more likely to happen than point one, fix that alone should be in 
minor release.

 repair -pr hangs
 

 Key: CASSANDRA-5146
 URL: https://issues.apache.org/jira/browse/CASSANDRA-5146
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Affects Versions: 1.2.0
 Environment: Ubuntu 12.04
Reporter: Michael Kjellman
Assignee: Sylvain Lebresne
 Fix For: 1.2.2


 while running a repair -pr the repair seems to hang after getting a merkle 
 tree
 {code}
  INFO [AntiEntropySessions:9] 2013-01-10 18:23:01,652 AntiEntropyService.java 
 (line 652) [repair #d29fd100-5b95-11e2-b9c7-dd50a26832ff] new session: will 
 sync /10.8.25.101, /10.8.30.14 on range 
 (28356863910078205288614550619314017620,42535295865117307932921825928971026436]
  for evidence.[fingerprints, messages]
  INFO [AntiEntropySessions:9] 2013-01-10 18:23:01,653 AntiEntropyService.java 
 (line 857) [repair #d29fd100-5b95-11e2-b9c7-dd50a26832ff] requesting merkle 
 trees for fingerprints (to [/10.8.30.14, /10.8.25.101])
  INFO [ValidationExecutor:7] 2013-01-10 18:23:01,654 ColumnFamilyStore.java 
 (line 647) Enqueuing flush of 
 Memtable-fingerprints@500862962(12960712/12960712 serialized/live bytes, 469 
 ops)
  INFO [FlushWriter:25] 2013-01-10 18:23:01,655 Memtable.java (line 424) 
 Writing Memtable-fingerprints@500862962(12960712/12960712 serialized/live 
 bytes, 469 ops)
  INFO [FlushWriter:25] 2013-01-10 18:23:02,058 Memtable.java (line 458) 
 Completed flushing 
 /data2/cassandra/evidence/fingerprints/evidence-fingerprints-ib-192-Data.db 
 (11413718 bytes) for commitlog position 
 ReplayPosition(segmentId=1357767160463, position=8921654)
  INFO [AntiEntropyStage:1] 2013-01-10 18:25:52,735 AntiEntropyService.java 
 (line 214) [repair #d29fd100-5b95-11e2-b9c7-dd50a26832ff] Received merkle 
 tree for fingerprints from /10.8.25.101
 {code}

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


[jira] [Created] (CASSANDRA-5275) Error validating row DecoratedKey(..., ...)

2013-02-20 Thread David Sauer (JIRA)
David Sauer created CASSANDRA-5275:
--

 Summary: Error validating row DecoratedKey(..., ...)
 Key: CASSANDRA-5275
 URL: https://issues.apache.org/jira/browse/CASSANDRA-5275
 Project: Cassandra
  Issue Type: Bug
Affects Versions: 1.2.1
 Environment: 3 nodes, each 22GB, using internode ssl
Reporter: David Sauer


after upgrading from 1.1.9 to 1.2.1 this happend many times.

 WARN [CompactionExecutor:699] 2013-02-19 19:31:18,940 OutputHandler.java (line 
57) Non-fatal error reading row (stacktrace follows)
java.lang.RuntimeException: Error validating row 
DecoratedKey(21728933070208571032820692349722239108, 
32303133303132382d323133322d6c6f6767696e67)
at 
org.apache.cassandra.io.sstable.SSTableIdentityIterator.getColumnFamilyWithColumns(SSTableIdentityIterator.java:244)
at 
org.apache.cassandra.db.compaction.PrecompactedRow.merge(PrecompactedRow.java:109)
at 
org.apache.cassandra.db.compaction.PrecompactedRow.init(PrecompactedRow.java:93)
at 
org.apache.cassandra.db.compaction.CompactionController.getCompactedRow(CompactionController.java:162)
at 
org.apache.cassandra.db.compaction.CompactionController.getCompactedRow(CompactionController.java:168)
at org.apache.cassandra.db.compaction.Scrubber.scrub(Scrubber.java:173)
at 
org.apache.cassandra.db.compaction.CompactionManager.scrubOne(CompactionManager.java:544)
at 
org.apache.cassandra.db.compaction.CompactionManager.doScrub(CompactionManager.java:533)
at 
org.apache.cassandra.db.compaction.CompactionManager.access$400(CompactionManager.java:75)
at 
org.apache.cassandra.db.compaction.CompactionManager$3.perform(CompactionManager.java:270)
at 
org.apache.cassandra.db.compaction.CompactionManager$2.call(CompactionManager.java:240)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:722)
Caused by: org.apache.cassandra.db.marshal.MarshalException: String didn't 
validate.
at org.apache.cassandra.db.marshal.UTF8Type.validate(UTF8Type.java:65)
at org.apache.cassandra.db.Column.validateFields(Column.java:292)
at 
org.apache.cassandra.db.ColumnFamily.validateColumnFields(ColumnFamily.java:377)
at 
org.apache.cassandra.io.sstable.SSTableIdentityIterator.getColumnFamilyWithColumns(SSTableIdentityIterator.java:240)
... 15 more
 WARN [CompactionExecutor:699] 2013-02-19 19:31:18,941 OutputHandler.java (line 
52) Row at 2464413 is unreadable; skipping to next


--
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-5146) repair -pr hangs

2013-02-20 Thread Michael Kjellman (JIRA)

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

Michael Kjellman commented on CASSANDRA-5146:
-

I agree that the vast majority of repair issues are actually caused by a 
streaming failures which is why i thought 5105 would fix it.

i'm thinking that #5151 might have created another exception which once again 
appeared to break repairs. After reverting 5151 and keeping the other fixes 
repair seems much more stable.

 repair -pr hangs
 

 Key: CASSANDRA-5146
 URL: https://issues.apache.org/jira/browse/CASSANDRA-5146
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Affects Versions: 1.2.0
 Environment: Ubuntu 12.04
Reporter: Michael Kjellman
Assignee: Sylvain Lebresne
 Fix For: 1.2.2


 while running a repair -pr the repair seems to hang after getting a merkle 
 tree
 {code}
  INFO [AntiEntropySessions:9] 2013-01-10 18:23:01,652 AntiEntropyService.java 
 (line 652) [repair #d29fd100-5b95-11e2-b9c7-dd50a26832ff] new session: will 
 sync /10.8.25.101, /10.8.30.14 on range 
 (28356863910078205288614550619314017620,42535295865117307932921825928971026436]
  for evidence.[fingerprints, messages]
  INFO [AntiEntropySessions:9] 2013-01-10 18:23:01,653 AntiEntropyService.java 
 (line 857) [repair #d29fd100-5b95-11e2-b9c7-dd50a26832ff] requesting merkle 
 trees for fingerprints (to [/10.8.30.14, /10.8.25.101])
  INFO [ValidationExecutor:7] 2013-01-10 18:23:01,654 ColumnFamilyStore.java 
 (line 647) Enqueuing flush of 
 Memtable-fingerprints@500862962(12960712/12960712 serialized/live bytes, 469 
 ops)
  INFO [FlushWriter:25] 2013-01-10 18:23:01,655 Memtable.java (line 424) 
 Writing Memtable-fingerprints@500862962(12960712/12960712 serialized/live 
 bytes, 469 ops)
  INFO [FlushWriter:25] 2013-01-10 18:23:02,058 Memtable.java (line 458) 
 Completed flushing 
 /data2/cassandra/evidence/fingerprints/evidence-fingerprints-ib-192-Data.db 
 (11413718 bytes) for commitlog position 
 ReplayPosition(segmentId=1357767160463, position=8921654)
  INFO [AntiEntropyStage:1] 2013-01-10 18:25:52,735 AntiEntropyService.java 
 (line 214) [repair #d29fd100-5b95-11e2-b9c7-dd50a26832ff] Received merkle 
 tree for fingerprints from /10.8.25.101
 {code}

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


git commit: Fix pessimistic unit tests post-4671

2013-02-20 Thread slebresne
Updated Branches:
  refs/heads/cassandra-1.2 9bea226fb - 068b53dd5


Fix pessimistic unit tests post-4671

Conflicts:
test/unit/org/apache/cassandra/db/compaction/CompactionsPurgeTest.java


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

Branch: refs/heads/cassandra-1.2
Commit: 068b53dd5de928fd80815b54963af796f51f1c38
Parents: 9bea226
Author: Sylvain Lebresne sylv...@datastax.com
Authored: Sat Feb 16 00:21:35 2013 +0100
Committer: Sylvain Lebresne sylv...@datastax.com
Committed: Wed Feb 20 23:57:45 2013 +0100

--
 .../db/compaction/CompactionsPurgeTest.java|   14 +++---
 1 files changed, 7 insertions(+), 7 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/068b53dd/test/unit/org/apache/cassandra/db/compaction/CompactionsPurgeTest.java
--
diff --git 
a/test/unit/org/apache/cassandra/db/compaction/CompactionsPurgeTest.java 
b/test/unit/org/apache/cassandra/db/compaction/CompactionsPurgeTest.java
index 827257f..ea9763a 100644
--- a/test/unit/org/apache/cassandra/db/compaction/CompactionsPurgeTest.java
+++ b/test/unit/org/apache/cassandra/db/compaction/CompactionsPurgeTest.java
@@ -139,15 +139,15 @@ public class CompactionsPurgeTest extends SchemaLoader
 cfs.forceBlockingFlush();
 cfs.getCompactionStrategy().getUserDefinedTask(sstablesIncomplete, 
Integer.MAX_VALUE).execute(null);
 
-// verify that minor compaction does not GC when key is present
-// in a non-compacted sstable
-ColumnFamily cf = 
cfs.getColumnFamily(QueryFilter.getIdentityFilter(key1, new QueryPath(cfName)));
-Assert.assertEquals(10, cf.getColumnCount());
-
 // verify that minor compaction does GC when key is provably not
 // present in a non-compacted sstable
-cf = cfs.getColumnFamily(QueryFilter.getIdentityFilter(key2, new 
QueryPath(cfName)));
+ColumnFamily cf = 
cfs.getColumnFamily(QueryFilter.getIdentityFilter(key2, new QueryPath(cfName)));
 assert cf == null;
+
+// verify that minor compaction still GC when key is present
+// in a non-compacted sstable but the timestamp ensures we won't miss 
anything
+cf = cfs.getColumnFamily(QueryFilter.getIdentityFilter(key1, new 
QueryPath(cfName)));
+Assert.assertEquals(1, cf.getColumnCount());
 }
 
 @Test
@@ -182,7 +182,7 @@ public class CompactionsPurgeTest extends SchemaLoader
 
 ColumnFamily cf = 
cfs.getColumnFamily(QueryFilter.getIdentityFilter(key3, new QueryPath(cfName)));
 Assert.assertTrue(!cf.getColumn(ByteBufferUtil.bytes(c2)).isLive());
-Assert.assertEquals(1, cf.getColumnCount());
+Assert.assertEquals(2, cf.getColumnCount());
 }
 
 @Test



[4/4] git commit: Merge branch 'cassandra-1.2' into trunk

2013-02-20 Thread slebresne
Updated Branches:
  refs/heads/trunk b6062a5ca - acf2fd47f


Merge branch 'cassandra-1.2' into trunk

Conflicts:
test/unit/org/apache/cassandra/db/compaction/CompactionsPurgeTest.java


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

Branch: refs/heads/trunk
Commit: acf2fd47f6f1a7f6a9f301ac14f601dd09b98225
Parents: b6062a5 068b53d
Author: Sylvain Lebresne sylv...@datastax.com
Authored: Wed Feb 20 23:58:58 2013 +0100
Committer: Sylvain Lebresne sylv...@datastax.com
Committed: Wed Feb 20 23:58:58 2013 +0100

--
 debian/changelog |6 ++
 pylib/cqlshlib/helptopics.py |  126 +
 2 files changed, 132 insertions(+), 0 deletions(-)
--




[2/4] git commit: Update debian version for 1.2.2 release

2013-02-20 Thread slebresne
Update debian version for 1.2.2 release


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

Branch: refs/heads/trunk
Commit: 9bea226fb16878cc43d07992d1a49896366e5219
Parents: 5f8ce62
Author: Sylvain Lebresne sylv...@datastax.com
Authored: Wed Feb 20 23:30:03 2013 +0100
Committer: Sylvain Lebresne sylv...@datastax.com
Committed: Wed Feb 20 23:30:03 2013 +0100

--
 debian/changelog |6 ++
 1 files changed, 6 insertions(+), 0 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/9bea226f/debian/changelog
--
diff --git a/debian/changelog b/debian/changelog
index 0310c90..0a71ffb 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+cassandra (1.2.2) unstable; urgency=low
+
+  * New release
+
+ -- Sylvain Lebresne slebre...@apache.org  Wed, 20 Feb 2013 23:28:10 +0100
+
 cassandra (1.2.1) unstable; urgency=low
 
   * New release



[3/4] git commit: Fix pessimistic unit tests post-4671

2013-02-20 Thread slebresne
Fix pessimistic unit tests post-4671

Conflicts:
test/unit/org/apache/cassandra/db/compaction/CompactionsPurgeTest.java


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

Branch: refs/heads/trunk
Commit: 068b53dd5de928fd80815b54963af796f51f1c38
Parents: 9bea226
Author: Sylvain Lebresne sylv...@datastax.com
Authored: Sat Feb 16 00:21:35 2013 +0100
Committer: Sylvain Lebresne sylv...@datastax.com
Committed: Wed Feb 20 23:57:45 2013 +0100

--
 .../db/compaction/CompactionsPurgeTest.java|   14 +++---
 1 files changed, 7 insertions(+), 7 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/068b53dd/test/unit/org/apache/cassandra/db/compaction/CompactionsPurgeTest.java
--
diff --git 
a/test/unit/org/apache/cassandra/db/compaction/CompactionsPurgeTest.java 
b/test/unit/org/apache/cassandra/db/compaction/CompactionsPurgeTest.java
index 827257f..ea9763a 100644
--- a/test/unit/org/apache/cassandra/db/compaction/CompactionsPurgeTest.java
+++ b/test/unit/org/apache/cassandra/db/compaction/CompactionsPurgeTest.java
@@ -139,15 +139,15 @@ public class CompactionsPurgeTest extends SchemaLoader
 cfs.forceBlockingFlush();
 cfs.getCompactionStrategy().getUserDefinedTask(sstablesIncomplete, 
Integer.MAX_VALUE).execute(null);
 
-// verify that minor compaction does not GC when key is present
-// in a non-compacted sstable
-ColumnFamily cf = 
cfs.getColumnFamily(QueryFilter.getIdentityFilter(key1, new QueryPath(cfName)));
-Assert.assertEquals(10, cf.getColumnCount());
-
 // verify that minor compaction does GC when key is provably not
 // present in a non-compacted sstable
-cf = cfs.getColumnFamily(QueryFilter.getIdentityFilter(key2, new 
QueryPath(cfName)));
+ColumnFamily cf = 
cfs.getColumnFamily(QueryFilter.getIdentityFilter(key2, new QueryPath(cfName)));
 assert cf == null;
+
+// verify that minor compaction still GC when key is present
+// in a non-compacted sstable but the timestamp ensures we won't miss 
anything
+cf = cfs.getColumnFamily(QueryFilter.getIdentityFilter(key1, new 
QueryPath(cfName)));
+Assert.assertEquals(1, cf.getColumnCount());
 }
 
 @Test
@@ -182,7 +182,7 @@ public class CompactionsPurgeTest extends SchemaLoader
 
 ColumnFamily cf = 
cfs.getColumnFamily(QueryFilter.getIdentityFilter(key3, new QueryPath(cfName)));
 Assert.assertTrue(!cf.getColumn(ByteBufferUtil.bytes(c2)).isLive());
-Assert.assertEquals(1, cf.getColumnCount());
+Assert.assertEquals(2, cf.getColumnCount());
 }
 
 @Test



[1/4] git commit: Add cqlsh help for auth statement

2013-02-20 Thread slebresne
Add cqlsh help for auth statement

patch by iamaleksey; reviewed by slebresne for CASSANDRA-5233


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

Branch: refs/heads/trunk
Commit: 5f8ce62b283a08cf284b07f647c04896970a026a
Parents: 89ab670
Author: Sylvain Lebresne sylv...@datastax.com
Authored: Wed Feb 20 22:03:43 2013 +0100
Committer: Sylvain Lebresne sylv...@datastax.com
Committed: Wed Feb 20 22:03:43 2013 +0100

--
 pylib/cqlshlib/helptopics.py |  126 +
 1 files changed, 126 insertions(+), 0 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/5f8ce62b/pylib/cqlshlib/helptopics.py
--
diff --git a/pylib/cqlshlib/helptopics.py b/pylib/cqlshlib/helptopics.py
index 77a111e..775c7de 100644
--- a/pylib/cqlshlib/helptopics.py
+++ b/pylib/cqlshlib/helptopics.py
@@ -897,3 +897,129 @@ class CQL3HelpTopics(CQLHelpTopics):
 
 Currently, COUNT is the only function supported by CQL.
 
+
+def help_create(self):
+super(CQL3HelpTopics, self).help_create()
+print   HELP CREATE_USER;
+
+def help_alter(self):
+super(CQL3HelpTopics, self).help_alter()
+print   HELP ALTER_USER;
+
+def help_drop(self):
+super(CQL3HelpTopics, self).help_drop()
+print   HELP DROP_USER;
+
+def help_list(self):
+print 
+There are different variants of LIST. For more information, see
+one of the following:
+
+  HELP LIST_USERS;
+  HELP LIST_PERMISSIONS;
+
+
+def help_create_user(self):
+print 
+CREATE USER username [WITH PASSWORD 'password'] [NOSUPERUSER | 
SUPERUSER];
+
+CREATE USER creates a new Cassandra user account.
+Only superusers can issue CREATE USER requests.
+To create a superuser account use SUPERUSER option (NOSUPERUSER is the 
default).
+
+WITH PASSWORD clause should only be used with password-based 
authenticators,
+e.g. PasswordAuthenticator, SimpleAuthenticator.
+
+
+def help_alter_user(self):
+print 
+ALTER USER username [WITH PASSWORD 'password'] [NOSUPERUSER | 
SUPERUSER];
+
+Use ALTER USER to change a user's superuser status and/or password 
(only
+with password-based authenticators).
+Superusers can change a user's password or superuser status (except 
their own).
+Users cannot change their own superuser status. Ordinary users can 
only change their
+password (if the configured authenticator is password-based).
+
+
+def help_drop_user(self):
+print 
+DROP USER username;
+
+DROP USER removes an existing user. You have to be logged in as a 
superuser
+to issue a DROP USER statement. A user cannot drop themselves.
+
+
+def help_list_users(self):
+print 
+LIST USERS;
+
+List existing users and their superuser status.
+
+
+def help_grant(self):
+print 
+GRANT (permission [PERMISSION] | ALL [PERMISSIONS])
+  ON ALL KEYSPACES
+   | KEYSPACE keyspace
+   | [TABLE] [keyspace.]table
+  TO username
+
+Grant the specified permission (or all permissions) on a resource
+to a user.
+
+To be able to grant a permission on some resource you have to
+have that permission yourself and also AUTHORIZE permission on it,
+or on one of its parent resources.
+
+See HELP PERMISSIONS for more info on the available permissions.
+
+
+def help_revoke(self):
+print 
+REVOKE (permission [PERMISSION] | ALL [PERMISSIONS])
+  ON ALL KEYSPACES
+   | KEYSPACE keyspace
+   | [TABLE] [keyspace.]table
+  FROM username
+
+Revokes the specified permission (or all permissions) on a resource
+from a user.
+
+To be able to revoke a permission on some resource you have to
+have that permission yourself and also AUTHORIZE permission on it,
+or on one of its parent resources.
+
+See HELP PERMISSIONS for more info on the available permissions.
+
+
+def help_list_permissions(self):
+print 
+LIST (permission [PERMISSION] | ALL [PERMISSIONS])
+  [ON ALL KEYSPACES
+| KEYSPACE keyspace
+| [TABLE] [keyspace.]table]
+  [OF username]
+  [NORECURSIVE]
+
+

[jira] [Created] (CASSANDRA-5276) Clean up StreamHeader/StreamOutSession

2013-02-20 Thread Jonathan Ellis (JIRA)
Jonathan Ellis created CASSANDRA-5276:
-

 Summary: Clean up StreamHeader/StreamOutSession
 Key: CASSANDRA-5276
 URL: https://issues.apache.org/jira/browse/CASSANDRA-5276
 Project: Cassandra
  Issue Type: Task
  Components: Core
Reporter: Jonathan Ellis
Assignee: Yuki Morishita
Priority: Minor
 Fix For: 2.0


StreamHeader splits first file ({PendingFile file}) from remaining files 
({CollectionPendingFile pendingFiles}).  There doesn't seem to be a 
compelling reason for this distinction.

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

2013-02-20 Thread slebresne
Updated Tags:  refs/tags/1.2.2-tentative [created] 068b53dd5


[Cassandra Wiki] Trivial Update of Tracy7665 by Tracy7665

2013-02-20 Thread Apache Wiki
Dear Wiki user,

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

The Tracy7665 page has been changed by Tracy7665:
http://wiki.apache.org/cassandra/Tracy7665?action=diffrev1=2rev2=3

- Hey !! The name is VIVAN CASTANEDA. I have a house in Norwalk.BR
- I and my sister go to The Patient Institute situated in North Charleston. I 
like to do Bringing Food To The Disabled. My father name is Boyd  and he is a 
Webmaster. My mother is a Servant.BR
+ Wassp People !! I am ROSELLA WORKMAN. I live in Antioch.BR
+ I might take night schooling in The Enormous Preparatory which has a branch 
in Bridgeport. I also like to Decoupage. My father name is Matthew  and he is a 
Engine Fitter. My mummy is a Herder.BR
  BR
- My page ... [[http://louis-vuittonhandbags.blinkweb.com|louis vuitton 
neverfull]]
+ Feel free to visit my blog post :: 
[[http://louis-vuittonhandbags.blinkweb.com|cheap louis vuitton bags]]
  


[Cassandra Wiki] Trivial Update of Jayqkcpg5 by Jayqkcpg5

2013-02-20 Thread Apache Wiki
Dear Wiki user,

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

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

New page:
Howdy !! The name is ILEEN HARDY. I am staying at Norwalk.BR
One day i would want to do Amateur Astronomy. My daddy name is Ian  and he is a 
Physiognomist. My mummy is a Engineer.BR
BR
my site; [[http://www.conreplicahandbags.com|replica designer handbags]]


[jira] [Created] (CASSANDRA-5277) rename AntiEntropyService

2013-02-20 Thread Jonathan Ellis (JIRA)
Jonathan Ellis created CASSANDRA-5277:
-

 Summary: rename AntiEntropyService
 Key: CASSANDRA-5277
 URL: https://issues.apache.org/jira/browse/CASSANDRA-5277
 Project: Cassandra
  Issue Type: Task
  Components: Core
Reporter: Jonathan Ellis
Assignee: Sylvain Lebresne
Priority: Minor


Maybe ActiveRepairService or ManualRepairService.  AntiEntropy doesn't help 
anyone find it who knows they want to find the repair code.

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


[jira] [Commented] (CASSANDRA-5275) Error validating row DecoratedKey(..., ...)

2013-02-20 Thread David Sauer (JIRA)

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

David Sauer commented on CASSANDRA-5275:


now a block of these exception got logged while running nodetool scrub

 Error validating row DecoratedKey(..., ...)
 ---

 Key: CASSANDRA-5275
 URL: https://issues.apache.org/jira/browse/CASSANDRA-5275
 Project: Cassandra
  Issue Type: Bug
Affects Versions: 1.2.1
 Environment: 3 nodes, each 22GB, using internode ssl
Reporter: David Sauer

 after upgrading from 1.1.9 to 1.2.1 this happend many times.
  WARN [CompactionExecutor:699] 2013-02-19 19:31:18,940 OutputHandler.java 
 (line 57) Non-fatal error reading row (stacktrace follows)
 java.lang.RuntimeException: Error validating row 
 DecoratedKey(21728933070208571032820692349722239108, 
 32303133303132382d323133322d6c6f6767696e67)
   at 
 org.apache.cassandra.io.sstable.SSTableIdentityIterator.getColumnFamilyWithColumns(SSTableIdentityIterator.java:244)
   at 
 org.apache.cassandra.db.compaction.PrecompactedRow.merge(PrecompactedRow.java:109)
   at 
 org.apache.cassandra.db.compaction.PrecompactedRow.init(PrecompactedRow.java:93)
   at 
 org.apache.cassandra.db.compaction.CompactionController.getCompactedRow(CompactionController.java:162)
   at 
 org.apache.cassandra.db.compaction.CompactionController.getCompactedRow(CompactionController.java:168)
   at org.apache.cassandra.db.compaction.Scrubber.scrub(Scrubber.java:173)
   at 
 org.apache.cassandra.db.compaction.CompactionManager.scrubOne(CompactionManager.java:544)
   at 
 org.apache.cassandra.db.compaction.CompactionManager.doScrub(CompactionManager.java:533)
   at 
 org.apache.cassandra.db.compaction.CompactionManager.access$400(CompactionManager.java:75)
   at 
 org.apache.cassandra.db.compaction.CompactionManager$3.perform(CompactionManager.java:270)
   at 
 org.apache.cassandra.db.compaction.CompactionManager$2.call(CompactionManager.java:240)
   at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
   at java.util.concurrent.FutureTask.run(FutureTask.java:166)
   at 
 java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
   at 
 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
   at java.lang.Thread.run(Thread.java:722)
 Caused by: org.apache.cassandra.db.marshal.MarshalException: String didn't 
 validate.
   at org.apache.cassandra.db.marshal.UTF8Type.validate(UTF8Type.java:65)
   at org.apache.cassandra.db.Column.validateFields(Column.java:292)
   at 
 org.apache.cassandra.db.ColumnFamily.validateColumnFields(ColumnFamily.java:377)
   at 
 org.apache.cassandra.io.sstable.SSTableIdentityIterator.getColumnFamilyWithColumns(SSTableIdentityIterator.java:240)
   ... 15 more
  WARN [CompactionExecutor:699] 2013-02-19 19:31:18,941 OutputHandler.java 
 (line 52) Row at 2464413 is unreadable; skipping to next

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


[Cassandra Wiki] Trivial Update of SiennaNav by SiennaNav

2013-02-20 Thread Apache Wiki
Dear Wiki user,

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

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

New page:
Yo guys !! The name is CASIMIRA GARDNER. I have a house in Fort Wayne.BR
I might take night schooling in The Revolutionary Institute built at Sebastian. 
I like to do Film Making.BR
BR
Also visit my blog post ... [[http://cuca.k12.ca.us/beatsearphones.html|beats 
by dre on sale]]


[jira] [Created] (CASSANDRA-5278) Throttle streaming during repair to control disk space use

2013-02-20 Thread Oleg Kibirev (JIRA)
Oleg Kibirev created CASSANDRA-5278:
---

 Summary: Throttle streaming during repair to control disk space use
 Key: CASSANDRA-5278
 URL: https://issues.apache.org/jira/browse/CASSANDRA-5278
 Project: Cassandra
  Issue Type: Improvement
  Components: Core
Affects Versions: 1.1.10
Reporter: Oleg Kibirev


Currently, doing a repair can consume a multiple of disk space originally 
needed on the node. For example, consider a cluster with 4 replicas. In the 
worst case, a node will have to stream half of the data from each of the 3 
other replicas, consuming 250% of original disk space.

We need some mechanism to allow compaction to catch up and restore reasonable 
disk usage. For example, the code that receives a stream can wait until a 
configurable percentage of available disk space is free, or until the number of 
compacted sstable is less than a certain threshold.

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


[Cassandra Wiki] Trivial Update of ElsaLjc by ElsaLjc

2013-02-20 Thread Apache Wiki
Dear Wiki user,

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

The ElsaLjc page has been changed by ElsaLjc:
http://wiki.apache.org/cassandra/ElsaLjc?action=diffrev1=1rev2=2

+ Howdy !! I am MARIELLA CARRILLO. I reside in New Haven. I might join The 
Patient Institute built at Ely.BR
- Wassp People !! The name is CURTIS MCCARTHY. I am staying at Newport.BR
- My school's name is The Wide Institute which has a branch in Carlisle. I want 
to become a Geophysicist. One day i would want to do Calendars.BR
  BR
+ I work as a Herder. I also like to Organic Gardening.BR
+ BR
- Here is my page :: [[http://beats-bydre-cheap2013.blinkweb.com|beats 
headphones review]]
+ Check out my webpage: [[http://beats-bydre-cheap2013.blinkweb.com|beats by dr 
dre cheap]]
  


[Cassandra Wiki] Trivial Update of ShayneCha by ShayneCha

2013-02-20 Thread Apache Wiki
Dear Wiki user,

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

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

New page:
My parents want me to join The Tested Institute which has a branch in 
Seaside.BR
I have a job as Actor. My hobby is Painting and Drawing. My dad name is Tony  
and he is a Fire officer. My mummy is a Real estate agent.BR
BR
Also visit my blog :: [[http://www.reachchanelbags.com|chanel bags]]


[jira] [Updated] (CASSANDRA-5271) Create tool to drop sstables to level 0

2013-02-20 Thread Marcus Eriksson (JIRA)

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

Marcus Eriksson updated CASSANDRA-5271:
---

Attachment: 0001-Add-tool-to-drop-sstables-back-to-level-0.patch

 Create tool to drop sstables to level 0
 ---

 Key: CASSANDRA-5271
 URL: https://issues.apache.org/jira/browse/CASSANDRA-5271
 Project: Cassandra
  Issue Type: Improvement
Reporter: Marcus Eriksson
Assignee: Marcus Eriksson
Priority: Trivial
  Labels: tools
 Fix For: 2.0

 Attachments: 0001-Add-tool-to-drop-sstables-back-to-level-0.patch


 after CASSANDRA-4872 we need a way to reset all sstables to level 0, 
 previously we did this by removing the .json file from the data-directory.

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