[jira] [Commented] (CASSANDRA-9591) Scrub (recover) sstables even when -Index.db is missing

2015-06-16 Thread Stefania (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-9591?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14589293#comment-14589293
 ] 

Stefania commented on CASSANDRA-9591:
-

I've created some dtests, branch attached, the pull request is 
[here|https://github.com/riptano/cassandra-dtest/pull/331].

I integrated the original patch and my suggestions to 2.1 and 2.2. You find 
attached all 3 GitHub branches.

Pending CI, the unit and dtests for scrub pass on my box for 2.0 and 2.1 but 
not for 2.2. Here we have a problem, it seems we need the first and last keys 
created in buildSummary() because of the new lifecycle code:

{code}
nosetests -s scrub_test.py:TestScrub.test_standalone_scrub_data_file_only

dtest: DEBUG: Pre-scrub sstables snapshotted into snapshot 
pre-scrub-1434513958878
WARNING: Missing component: 
/tmp/dtest-UPhj9E/test/node1/data/ks/users-254da3c014a611e59b004b06169f4ffa/la-1-big-Index.db
Scrubbing 
BigTableReader(path='/tmp/dtest-UPhj9E/test/node1/data/ks/users-254da3c014a611e59b004b06169f4ffa/la-1-big-Data.db')
 (863 bytes)
null

dtest: DEBUG: Error scrubbing 
BigTableReader(path='/tmp/dtest-UPhj9E/test/node1/data/ks/users-254da3c014a611e59b004b06169f4ffa/la-1-big-Data.db'):
 null
java.lang.NullPointerException
at 
java.util.ComparableTimSort.countRunAndMakeAscending(ComparableTimSort.java:321)
at java.util.ComparableTimSort.sort(ComparableTimSort.java:184)
at java.util.Arrays.sort(Arrays.java:1312)
at java.util.Arrays.sort(Arrays.java:1506)
at java.util.ArrayList.sort(ArrayList.java:1454)
at java.util.Collections.sort(Collections.java:141)
at 
org.apache.cassandra.utils.IntervalTree$IntervalNode.(IntervalTree.java:187)
at org.apache.cassandra.utils.IntervalTree.(IntervalTree.java:50)
at 
org.apache.cassandra.db.lifecycle.SSTableIntervalTree.(SSTableIntervalTree.java:20)
at 
org.apache.cassandra.db.lifecycle.SSTableIntervalTree.build(SSTableIntervalTree.java:30)
at org.apache.cassandra.db.lifecycle.View$4.apply(View.java:183)
at org.apache.cassandra.db.lifecycle.View$4.apply(View.java:178)
at 
com.google.common.base.Functions$FunctionComposition.apply(Functions.java:211)
at org.apache.cassandra.db.lifecycle.Tracker.apply(Tracker.java:126)
at org.apache.cassandra.db.lifecycle.Tracker.apply(Tracker.java:99)
at 
org.apache.cassandra.db.lifecycle.LifecycleTransaction.checkpoint(LifecycleTransaction.java:233)
at 
org.apache.cassandra.db.lifecycle.LifecycleTransaction.checkpoint(LifecycleTransaction.java:214)
at 
org.apache.cassandra.io.sstable.SSTableRewriter.switchWriter(SSTableRewriter.java:285)
at 
org.apache.cassandra.io.sstable.SSTableRewriter.doPrepare(SSTableRewriter.java:330)
at 
org.apache.cassandra.utils.concurrent.Transactional$AbstractTransactional.prepareToCommit(Transactional.java:169)
at 
org.apache.cassandra.utils.concurrent.Transactional$AbstractTransactional.finish(Transactional.java:179)
at 
org.apache.cassandra.io.sstable.SSTableRewriter.finish(SSTableRewriter.java:317)
at org.apache.cassandra.db.compaction.Scrubber.scrub(Scrubber.java:299)
at 
org.apache.cassandra.tools.StandaloneScrubber.main(StandaloneScrubber.java:124)

- >> end captured logging << -

--
Ran 1 test in 10.984s

FAILED (failures=1)
{code}

I think we either need to set first and last in SSTableReader also when the 
index is not available or we need to see if we can avoid updating the live set 
when we are offline. cc [~benedict] for suggestions re lifecycle code.

[~michaelsembwever], could you review my suggestions and if you are happy 
prepare a final patch for 2.0 and 2.1 that can be committed in your name? You 
can just attach the GitHub branch if easier. However if you do change things 
slightly let us know so we can rerun in CI (continuous integration).

Then could you work with Benedict's suggestion to fix the 2.2. problem? We can 
help you with this if required. 




> Scrub (recover) sstables even when -Index.db is missing
> ---
>
> Key: CASSANDRA-9591
> URL: https://issues.apache.org/jira/browse/CASSANDRA-9591
> Project: Cassandra
>  Issue Type: Improvement
>Reporter: mck
>Assignee: mck
>  Labels: sstablescrub
> Fix For: 2.0.x
>
> Attachments: 9591-2.0.txt
>
>
> Today SSTableReader needs at minimum 3 files to load an sstable:
>  - -Data.db
>  - -CompressionInfo.db 
>  - -Index.db
> But during the scrub process the -Index.db file isn't actually necessary, 
> unless there's corruption in the -Data.db and we want to be able to skip over 
> corrupted rows. Given that t

cassandra git commit: NativeRingCache can be a static inner

2015-06-16 Thread dbrosius
Repository: cassandra
Updated Branches:
  refs/heads/trunk 7a8be7850 -> 5ea5949f9


NativeRingCache can be a static inner


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

Branch: refs/heads/trunk
Commit: 5ea5949f9870c2d1fbd8176c16b11daf12c74ea7
Parents: 7a8be78
Author: Dave Brosius 
Authored: Tue Jun 16 23:29:18 2015 -0400
Committer: Dave Brosius 
Committed: Tue Jun 16 23:29:18 2015 -0400

--
 src/java/org/apache/cassandra/hadoop/cql3/CqlRecordWriter.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/5ea5949f/src/java/org/apache/cassandra/hadoop/cql3/CqlRecordWriter.java
--
diff --git a/src/java/org/apache/cassandra/hadoop/cql3/CqlRecordWriter.java 
b/src/java/org/apache/cassandra/hadoop/cql3/CqlRecordWriter.java
index 73a852f..6b4caa5 100644
--- a/src/java/org/apache/cassandra/hadoop/cql3/CqlRecordWriter.java
+++ b/src/java/org/apache/cassandra/hadoop/cql3/CqlRecordWriter.java
@@ -467,7 +467,7 @@ class CqlRecordWriter extends RecordWriter, List> rangeMap;
 private Metadata metadata;



[jira] [Updated] (CASSANDRA-9606) this query is not supported in new version

2015-06-16 Thread zhaoyan (JIRA)

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

zhaoyan updated CASSANDRA-9606:
---
Description: 
Background:

1、create a table:
{code}
CREATE TABLE test (
a int,
b int,
c int,
d int,
PRIMARY KEY (a, b, c)
);
{code}
2、query by a=1 and b<6
{code}
select * from test where a=1 and b<6;

 a | b | c | d
---+---+---+---
 1 | 3 | 1 | 2
 1 | 3 | 2 | 2
 1 | 3 | 4 | 2
 1 | 3 | 5 | 2
 1 | 4 | 4 | 2
 1 | 5 | 5 | 2

(6 rows)
{code}

3、query by page
first page:
{code}
select * from test where a=1 and b<6 limit 2;
 a | b | c | d
---+---+---+---
 1 | 3 | 1 | 2
 1 | 3 | 2 | 2

(2 rows)
{code}

second page:
{code}
select * from test where a=1 and b<6 and (b,c) > (3,2) limit 2;
 a | b | c | d
---+---+---+---
 1 | 3 | 4 | 2
 1 | 3 | 5 | 2

(2 rows)
{code}
last page:
{code}
select * from test where a=1 and b<6 and (b,c) > (3,5) limit 2;
 a | b | c | d
---+---+---+---
 1 | 4 | 4 | 2
 1 | 5 | 5 | 2

(2 rows)
{code}
question:
this query by page is ok when cassandra 2.0.8.
but is not supported in the latest version 2.1.6

when execute:
{code}
select * from test where a=1 and b<6 and (b,c) > (3,2) limit 2;
{code}
get one error message:

InvalidRequest: code=2200 [Invalid query] message="Column "b" cannot have both 
tuple-notation inequalities and single-column inequalities: (b, c) > (3, 2)"


  was:
Background:

1、create a table:
{code}
CREATE TABLE test (
a int,
b int,
c int,
d int,
PRIMARY KEY (a, b, c)
);
{code}
2、query by a=1 and b<3
{code}
select * from test where a=1 and b<6;

 a | b | c | d
---+---+---+---
 1 | 3 | 1 | 2
 1 | 3 | 2 | 2
 1 | 3 | 4 | 2
 1 | 3 | 5 | 2
 1 | 4 | 4 | 2
 1 | 5 | 5 | 2

(6 rows)
{code}

3、query by page
first page:
{code}
select * from test where a=1 and b<6 limit 2;
 a | b | c | d
---+---+---+---
 1 | 3 | 1 | 2
 1 | 3 | 2 | 2

(2 rows)
{code}

second page:
{code}
select * from test where a=1 and b<6 and (b,c) > (3,2) limit 2;
 a | b | c | d
---+---+---+---
 1 | 3 | 4 | 2
 1 | 3 | 5 | 2

(2 rows)
{code}
last page:
{code}
select * from test where a=1 and b<6 and (b,c) > (3,5) limit 2;
 a | b | c | d
---+---+---+---
 1 | 4 | 4 | 2
 1 | 5 | 5 | 2

(2 rows)
{code}
question:
this query by page is ok when cassandra 2.0.8.
but is not supported in the latest version 2.1.6

when execute:
{code}
select * from test where a=1 and b<6 and (b,c) > (3,2) limit 2;
{code}
get one error message:

InvalidRequest: code=2200 [Invalid query] message="Column "b" cannot have both 
tuple-notation inequalities and single-column inequalities: (b, c) > (3, 2)"



> this query is not supported in new version
> --
>
> Key: CASSANDRA-9606
> URL: https://issues.apache.org/jira/browse/CASSANDRA-9606
> Project: Cassandra
>  Issue Type: Bug
>  Components: Core
> Environment: cassandra 2.1.6
> jdk 1.7.0_55
>Reporter: zhaoyan
>
> Background:
> 1、create a table:
> {code}
> CREATE TABLE test (
> a int,
> b int,
> c int,
>   d int,
> PRIMARY KEY (a, b, c)
> );
> {code}
> 2、query by a=1 and b<6
> {code}
> select * from test where a=1 and b<6;
>  a | b | c | d
> ---+---+---+---
>  1 | 3 | 1 | 2
>  1 | 3 | 2 | 2
>  1 | 3 | 4 | 2
>  1 | 3 | 5 | 2
>  1 | 4 | 4 | 2
>  1 | 5 | 5 | 2
> (6 rows)
> {code}
> 3、query by page
> first page:
> {code}
> select * from test where a=1 and b<6 limit 2;
>  a | b | c | d
> ---+---+---+---
>  1 | 3 | 1 | 2
>  1 | 3 | 2 | 2
> (2 rows)
> {code}
> second page:
> {code}
> select * from test where a=1 and b<6 and (b,c) > (3,2) limit 2;
>  a | b | c | d
> ---+---+---+---
>  1 | 3 | 4 | 2
>  1 | 3 | 5 | 2
> (2 rows)
> {code}
> last page:
> {code}
> select * from test where a=1 and b<6 and (b,c) > (3,5) limit 2;
>  a | b | c | d
> ---+---+---+---
>  1 | 4 | 4 | 2
>  1 | 5 | 5 | 2
> (2 rows)
> {code}
> question:
> this query by page is ok when cassandra 2.0.8.
> but is not supported in the latest version 2.1.6
> when execute:
> {code}
> select * from test where a=1 and b<6 and (b,c) > (3,2) limit 2;
> {code}
> get one error message:
> InvalidRequest: code=2200 [Invalid query] message="Column "b" cannot have 
> both tuple-notation inequalities and single-column inequalities: (b, c) > (3, 
> 2)"



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (CASSANDRA-9606) this query is not supported in new version

2015-06-16 Thread zhaoyan (JIRA)

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

zhaoyan updated CASSANDRA-9606:
---
Description: 
Background:

1、create a table:
{code}
CREATE TABLE test (
a int,
b int,
c int,
d int,
PRIMARY KEY (a, b, c)
);
{code}
2、query by a=1 and b<3
{code}
select * from test where a=1 and b<6;

 a | b | c | d
---+---+---+---
 1 | 3 | 1 | 2
 1 | 3 | 2 | 2
 1 | 3 | 4 | 2
 1 | 3 | 5 | 2
 1 | 4 | 4 | 2
 1 | 5 | 5 | 2

(6 rows)
{code}

3、query by page
first page:
{code}
select * from test where a=1 and b<6 limit 2;
 a | b | c | d
---+---+---+---
 1 | 3 | 1 | 2
 1 | 3 | 2 | 2

(2 rows)
{code}

second page:
{code}
select * from test where a=1 and b<6 and (b,c) > (3,2) limit 2;
 a | b | c | d
---+---+---+---
 1 | 3 | 4 | 2
 1 | 3 | 5 | 2

(2 rows)
{code}
last page:
{code}
select * from test where a=1 and b<6 and (b,c) > (3,5) limit 2;
 a | b | c | d
---+---+---+---
 1 | 4 | 4 | 2
 1 | 5 | 5 | 2

(2 rows)
{code}
question:
this query by page is ok when cassandra 2.0.8.
but is not supported in the latest version 2.1.6

when execute:
{code}
select * from test where a=1 and b<6 and (b,c) > (3,2) limit 2;
{code}
get one error message:

InvalidRequest: code=2200 [Invalid query] message="Column "b" cannot have both 
tuple-notation inequalities and single-column inequalities: (b, c) > (3, 2)"


  was:
Background:

1、create a table:
{code}
CREATE TABLE test (
a int,
b int,
c int,
d int,
PRIMARY KEY (a, b, c)
);
{code}
2、query by a=1 and b<3
{code}
select * from test where a=1 and b<6;

 a | b | c | d
---+---+---+---
 1 | 3 | 1 | 2
 1 | 3 | 2 | 2
 1 | 3 | 4 | 2
 1 | 3 | 5 | 2
 1 | 4 | 4 | 2
 1 | 5 | 5 | 2

(6 rows)
{code}

3、query by page
first page:
{code}
select * from test where a=1 and b<6 limit 2;
 a | b | c | d
---+---+---+---
 1 | 3 | 1 | 2
 1 | 3 | 2 | 2

(2 rows)
{code}
fsecond page:
{code}
select * from test where a=1 and b<6 and (b,c) > (3,2) limit 2;
 a | b | c | d
---+---+---+---
 1 | 3 | 4 | 2
 1 | 3 | 5 | 2

(2 rows)
last page:
{code}
select * from test where a=1 and b<6 and (b,c) > (3,5) limit 2;
 a | b | c | d
---+---+---+---
 1 | 4 | 4 | 2
 1 | 5 | 5 | 2

(2 rows)
{code}
question:
this query by page is ok when cassandra 2.0.8.
but is not supported in the latest version 2.1.6

when execute:
{code}
select * from test where a=1 and b<6 and (b,c) > (3,2) limit 2;
{code}
get one error message:

InvalidRequest: code=2200 [Invalid query] message="Column "b" cannot have both 
tuple-notation inequalities and single-column inequalities: (b, c) > (3, 2)"



> this query is not supported in new version
> --
>
> Key: CASSANDRA-9606
> URL: https://issues.apache.org/jira/browse/CASSANDRA-9606
> Project: Cassandra
>  Issue Type: Bug
>  Components: Core
> Environment: cassandra 2.1.6
> jdk 1.7.0_55
>Reporter: zhaoyan
>
> Background:
> 1、create a table:
> {code}
> CREATE TABLE test (
> a int,
> b int,
> c int,
>   d int,
> PRIMARY KEY (a, b, c)
> );
> {code}
> 2、query by a=1 and b<3
> {code}
> select * from test where a=1 and b<6;
>  a | b | c | d
> ---+---+---+---
>  1 | 3 | 1 | 2
>  1 | 3 | 2 | 2
>  1 | 3 | 4 | 2
>  1 | 3 | 5 | 2
>  1 | 4 | 4 | 2
>  1 | 5 | 5 | 2
> (6 rows)
> {code}
> 3、query by page
> first page:
> {code}
> select * from test where a=1 and b<6 limit 2;
>  a | b | c | d
> ---+---+---+---
>  1 | 3 | 1 | 2
>  1 | 3 | 2 | 2
> (2 rows)
> {code}
> second page:
> {code}
> select * from test where a=1 and b<6 and (b,c) > (3,2) limit 2;
>  a | b | c | d
> ---+---+---+---
>  1 | 3 | 4 | 2
>  1 | 3 | 5 | 2
> (2 rows)
> {code}
> last page:
> {code}
> select * from test where a=1 and b<6 and (b,c) > (3,5) limit 2;
>  a | b | c | d
> ---+---+---+---
>  1 | 4 | 4 | 2
>  1 | 5 | 5 | 2
> (2 rows)
> {code}
> question:
> this query by page is ok when cassandra 2.0.8.
> but is not supported in the latest version 2.1.6
> when execute:
> {code}
> select * from test where a=1 and b<6 and (b,c) > (3,2) limit 2;
> {code}
> get one error message:
> InvalidRequest: code=2200 [Invalid query] message="Column "b" cannot have 
> both tuple-notation inequalities and single-column inequalities: (b, c) > (3, 
> 2)"



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (CASSANDRA-9606) this query is not supported in new version

2015-06-16 Thread zhaoyan (JIRA)

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

zhaoyan updated CASSANDRA-9606:
---
Description: 
Background:

1、create a table:
{code}
CREATE TABLE test (
a int,
b int,
c int,
d int,
PRIMARY KEY (a, b, c)
);
{code}
2、query by a=1 and b<3
{code}
select * from test where a=1 and b<6;

 a | b | c | d
---+---+---+---
 1 | 3 | 1 | 2
 1 | 3 | 2 | 2
 1 | 3 | 4 | 2
 1 | 3 | 5 | 2
 1 | 4 | 4 | 2
 1 | 5 | 5 | 2

(6 rows)
{code}

3、query by page
first page:
{code}
select * from test where a=1 and b<6 limit 2;
 a | b | c | d
---+---+---+---
 1 | 3 | 1 | 2
 1 | 3 | 2 | 2

(2 rows)
{code}
fsecond page:
{code}
select * from test where a=1 and b<6 and (b,c) > (3,2) limit 2;
 a | b | c | d
---+---+---+---
 1 | 3 | 4 | 2
 1 | 3 | 5 | 2

(2 rows)
last page:
{code}
select * from test where a=1 and b<6 and (b,c) > (3,5) limit 2;
 a | b | c | d
---+---+---+---
 1 | 4 | 4 | 2
 1 | 5 | 5 | 2

(2 rows)
{code}
question:
this query by page is ok when cassandra 2.0.8.
but is not supported in the latest version 2.1.6

when execute:
{code}
select * from test where a=1 and b<6 and (b,c) > (3,2) limit 2;
{code}
get one error message:

InvalidRequest: code=2200 [Invalid query] message="Column "b" cannot have both 
tuple-notation inequalities and single-column inequalities: (b, c) > (3, 2)"


  was:
Background:

1、create a table:
{code}
CREATE TABLE test (
a int,
b int,
c int,
d int,
PRIMARY KEY (a, b, c)
);
{code}
2、query by a=1 and b<3
{code}
select * from test where a=1 and b<6;

 a | b | c | d
---+---+---+---
 1 | 3 | 1 | 2
 1 | 3 | 2 | 2
 1 | 3 | 4 | 2
 1 | 3 | 5 | 2
 1 | 4 | 4 | 2
 1 | 5 | 5 | 2

(6 rows)
{code}

3、query by page
first page:
{code}
select * from test where a=1 and b<6 limit 2;
 a | b | c | d
---+---+---+---
 1 | 3 | 1 | 2
 1 | 3 | 2 | 2

(2 rows)
{code}
fsecond page:
select * from test where a=1 and b<6 and (b,c) > (3,2) limit 2;
 a | b | c | d
---+---+---+---
 1 | 3 | 4 | 2
 1 | 3 | 5 | 2

(2 rows)
last page:
{code}
select * from test where a=1 and b<6 and (b,c) > (3,5) limit 2;
 a | b | c | d
---+---+---+---
 1 | 4 | 4 | 2
 1 | 5 | 5 | 2

(2 rows)
{code}
question:
this query by page is ok when cassandra 2.0.8.
but is not supported in the latest version 2.1.6

when execute:
{code}
select * from test where a=1 and b<6 and (b,c) > (3,2) limit 2;
{code}
get one error message:

InvalidRequest: code=2200 [Invalid query] message="Column "b" cannot have both 
tuple-notation inequalities and single-column inequalities: (b, c) > (3, 2)"



> this query is not supported in new version
> --
>
> Key: CASSANDRA-9606
> URL: https://issues.apache.org/jira/browse/CASSANDRA-9606
> Project: Cassandra
>  Issue Type: Bug
>  Components: Core
> Environment: cassandra 2.1.6
> jdk 1.7.0_55
>Reporter: zhaoyan
>
> Background:
> 1、create a table:
> {code}
> CREATE TABLE test (
> a int,
> b int,
> c int,
>   d int,
> PRIMARY KEY (a, b, c)
> );
> {code}
> 2、query by a=1 and b<3
> {code}
> select * from test where a=1 and b<6;
>  a | b | c | d
> ---+---+---+---
>  1 | 3 | 1 | 2
>  1 | 3 | 2 | 2
>  1 | 3 | 4 | 2
>  1 | 3 | 5 | 2
>  1 | 4 | 4 | 2
>  1 | 5 | 5 | 2
> (6 rows)
> {code}
> 3、query by page
> first page:
> {code}
> select * from test where a=1 and b<6 limit 2;
>  a | b | c | d
> ---+---+---+---
>  1 | 3 | 1 | 2
>  1 | 3 | 2 | 2
> (2 rows)
> {code}
> fsecond page:
> {code}
> select * from test where a=1 and b<6 and (b,c) > (3,2) limit 2;
>  a | b | c | d
> ---+---+---+---
>  1 | 3 | 4 | 2
>  1 | 3 | 5 | 2
> (2 rows)
> last page:
> {code}
> select * from test where a=1 and b<6 and (b,c) > (3,5) limit 2;
>  a | b | c | d
> ---+---+---+---
>  1 | 4 | 4 | 2
>  1 | 5 | 5 | 2
> (2 rows)
> {code}
> question:
> this query by page is ok when cassandra 2.0.8.
> but is not supported in the latest version 2.1.6
> when execute:
> {code}
> select * from test where a=1 and b<6 and (b,c) > (3,2) limit 2;
> {code}
> get one error message:
> InvalidRequest: code=2200 [Invalid query] message="Column "b" cannot have 
> both tuple-notation inequalities and single-column inequalities: (b, c) > (3, 
> 2)"



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Created] (CASSANDRA-9606) this query is not supported in new version

2015-06-16 Thread zhaoyan (JIRA)
zhaoyan created CASSANDRA-9606:
--

 Summary: this query is not supported in new version
 Key: CASSANDRA-9606
 URL: https://issues.apache.org/jira/browse/CASSANDRA-9606
 Project: Cassandra
  Issue Type: Bug
  Components: Core
 Environment: cassandra 2.1.6
jdk 1.7.0_55
Reporter: zhaoyan


Background:

1、create a table:
{code}
CREATE TABLE test (
a int,
b int,
c int,
d int,
PRIMARY KEY (a, b, c)
);
{code}
2、query by a=1 and b<3
{code}
select * from test where a=1 and b<6;

 a | b | c | d
---+---+---+---
 1 | 3 | 1 | 2
 1 | 3 | 2 | 2
 1 | 3 | 4 | 2
 1 | 3 | 5 | 2
 1 | 4 | 4 | 2
 1 | 5 | 5 | 2

(6 rows)
{code}

3、query by page
first page:
{code}
select * from test where a=1 and b<6 limit 2;
 a | b | c | d
---+---+---+---
 1 | 3 | 1 | 2
 1 | 3 | 2 | 2

(2 rows)
{code}
fsecond page:
select * from test where a=1 and b<6 and (b,c) > (3,2) limit 2;
 a | b | c | d
---+---+---+---
 1 | 3 | 4 | 2
 1 | 3 | 5 | 2

(2 rows)
last page:
{code}
select * from test where a=1 and b<6 and (b,c) > (3,5) limit 2;
 a | b | c | d
---+---+---+---
 1 | 4 | 4 | 2
 1 | 5 | 5 | 2

(2 rows)
{code}
question:
this query by page is ok when cassandra 2.0.8.
but is not supported in the latest version 2.1.6

when execute:
{code}
select * from test where a=1 and b<6 and (b,c) > (3,2) limit 2;
{code}
get one error message:

InvalidRequest: code=2200 [Invalid query] message="Column "b" cannot have both 
tuple-notation inequalities and single-column inequalities: (b, c) > (3, 2)"




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CASSANDRA-8460) Make it possible to move non-compacting sstables to slow/big storage in DTCS

2015-06-16 Thread Jeff Jirsa (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-8460?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14589084#comment-14589084
 ] 

Jeff Jirsa commented on CASSANDRA-8460:
---

Pushed a version, which I believe works as described. Would appreciate some 
feedback, and then if it looks promising, I'll finish it up with adding unit 
tests.

https://github.com/jeffjirsa/cassandra/commit/079b22136d178937b28b82326f132e33e96f6cad

A few explicit questions for [~krummas] and [~Bj0rn] : 

1) If compaction strategy calls for archive, but no archive disk is available 
(not defined or otherwise full), I'm falling back to standard disk. Agree? 
https://github.com/jeffjirsa/cassandra/commit/079b22136d178937b28b82326f132e33e96f6cad#diff-2c2b50ecd5e8515531c5d041117c9b4fR371

2) I originally planned to explicitly prohibit compaction of N files in 
archival disk, but I couldn't convince myself if that made sense. Instead, I'm 
allowing it if sstable_max_age_days allows it (if you set archive lower than 
max age, you could conceivably compact on archival disk tier). Agree? 

3) In the case where archived sstables can still be compacted, it's possible in 
some windows to have them compacted with sstables on the faster standard disk. 
In those cases, I'm making a judgement call that if any of the source sstables 
were archived, the resulting sstable will also be archived. Agree? 
https://github.com/jeffjirsa/cassandra/commit/079b22136d178937b28b82326f132e33e96f6cad#diff-7a9ada329d886c1871344b1d6fceec5cR56

4) Finally, I was trying to determine the right way to tell if an sstable was 
already archived. The logic I eventually used was simply parsing the path of 
the sstable and seeing if it was in the array of archive directories ( 
https://github.com/jeffjirsa/cassandra/commit/079b22136d178937b28b82326f132e33e96f6cad#diff-894e091348f28001de5b7fe88e65733fR1665
 ) . I'm not convinced this is best, but I didn't know if it was appropriate to 
extend sstablemetadata or similar to avoid this. Thoughts? 




> Make it possible to move non-compacting sstables to slow/big storage in DTCS
> 
>
> Key: CASSANDRA-8460
> URL: https://issues.apache.org/jira/browse/CASSANDRA-8460
> Project: Cassandra
>  Issue Type: Improvement
>Reporter: Marcus Eriksson
>Assignee: Jeff Jirsa
>  Labels: dtcs
>
> It would be nice if we could configure DTCS to have a set of extra data 
> directories where we move the sstables once they are older than 
> max_sstable_age_days. 
> This would enable users to have a quick, small SSD for hot, new data, and big 
> spinning disks for data that is rarely read and never compacted.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CASSANDRA-9583) test-compression could run multiple unit tests in parallel like test

2015-06-16 Thread Ariel Weisberg (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-9583?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14589031#comment-14589031
 ] 

Ariel Weisberg commented on CASSANDRA-9583:
---

I pushed an update, but the tests still need to run. It deletes the data 
directories after each test so they don't clutter.

> test-compression could run multiple unit tests in parallel like test
> 
>
> Key: CASSANDRA-9583
> URL: https://issues.apache.org/jira/browse/CASSANDRA-9583
> Project: Cassandra
>  Issue Type: Test
>Reporter: Ariel Weisberg
>Assignee: Ariel Weisberg
>




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CASSANDRA-9499) Introduce writeVInt method to DataOutputStreamPlus

2015-06-16 Thread Ariel Weisberg (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-9499?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14589026#comment-14589026
 ] 

Ariel Weisberg commented on CASSANDRA-9499:
---

I pushed an implementation based on the protocol buffers varint scheme. If you 
have ideas for what an efficient implementation would look like let me know.

On the read side it would be faster if I did the 10-bytes with padding thing. 
Maybe then copy to a byte array to avoid pulling a byte out of ByteBuffer? 
Using a long seems tricky since it can be up to 10 bytes.

Could do the same thing on the serialization side so that we only go into 
ByteBuffer. I will have to get the size of the encoded integer to figure out 
how much space I will need first.

> Introduce writeVInt method to DataOutputStreamPlus
> --
>
> Key: CASSANDRA-9499
> URL: https://issues.apache.org/jira/browse/CASSANDRA-9499
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Core
>Reporter: Benedict
>Assignee: Ariel Weisberg
>Priority: Minor
> Fix For: 3.0 beta 1
>
>
> CASSANDRA-8099 really could do with a writeVInt method, for both fixing 
> CASSANDRA-9498 but also efficiently encoding timestamp/deletion deltas. It 
> should be possible to make an especially efficient implementation against 
> BufferedDataOutputStreamPlus.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CASSANDRA-9583) test-compression could run multiple unit tests in parallel like test

2015-06-16 Thread Ariel Weisberg (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-9583?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14588987#comment-14588987
 ] 

Ariel Weisberg commented on CASSANDRA-9583:
---

Unintended consequence of this patch that I haven't dealt with. It creates a 
new data directory for every single suite and there is nothing cleaning them up 
after the run is over. So it uses a lot of disk space when running the tests.

You could argue in some ways this is helpful because it means you can actually 
inspect the artifacts of a failed test because it isn't overwritten, but 
usually if you are inspecting artifacts at that level of detail you are just 
running one test.

Total space used is 3 gigabytes right now.

I'll see if I can make it delete the directories.

> test-compression could run multiple unit tests in parallel like test
> 
>
> Key: CASSANDRA-9583
> URL: https://issues.apache.org/jira/browse/CASSANDRA-9583
> Project: Cassandra
>  Issue Type: Test
>Reporter: Ariel Weisberg
>Assignee: Ariel Weisberg
>




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[2/3] cassandra git commit: Add logback metrics

2015-06-16 Thread yukim
Add logback metrics

patch by yukim; reviewed by Jeremiah Jordan for CASSANDRA-9378


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

Branch: refs/heads/trunk
Commit: 514dcd944c400a8a540962f54e16561d56496425
Parents: 6c4c146
Author: Yuki Morishita 
Authored: Thu Jun 4 10:39:15 2015 -0500
Committer: Yuki Morishita 
Committed: Tue Jun 16 17:39:00 2015 -0500

--
 CHANGES.txt |   1 +
 conf/logback.xml|   9 +-
 lib/licenses/metrics-logback-3.1.0.txt  | 202 +++
 lib/metrics-logback-3.1.0.jar   | Bin 0 -> 4130 bytes
 .../metrics/CassandraMetricsRegistry.java   |  23 +--
 .../cassandra/service/CassandraDaemon.java  |  25 ++-
 6 files changed, 240 insertions(+), 20 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/514dcd94/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 1138fc2..9dccd84 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -7,6 +7,7 @@
 Merged from 2.0:
  * Periodically submit background compaction tasks (CASSANDRA-9592)
  * Set HAS_MORE_PAGES flag to false when PagingState is null (CASSANDRA-9571)
+ * Add logback metrics (CASSANDRA-9378)
 
 
 2.2.0-rc1

http://git-wip-us.apache.org/repos/asf/cassandra/blob/514dcd94/conf/logback.xml
--
diff --git a/conf/logback.xml b/conf/logback.xml
index e170d41..eb2dcd1 100644
--- a/conf/logback.xml
+++ b/conf/logback.xml
@@ -43,10 +43,17 @@
   %-5level %date{HH:mm:ss,SSS} %msg%n
 
   
-
+
+  
+
   
 
 
+
   
   
   

http://git-wip-us.apache.org/repos/asf/cassandra/blob/514dcd94/lib/licenses/metrics-logback-3.1.0.txt
--
diff --git a/lib/licenses/metrics-logback-3.1.0.txt 
b/lib/licenses/metrics-logback-3.1.0.txt
new file mode 100644
index 000..e4ba404
--- /dev/null
+++ b/lib/licenses/metrics-logback-3.1.0.txt
@@ -0,0 +1,202 @@
+
+ Apache License
+   Version 2.0, January 2004
+http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+  "License" shall mean the terms and conditions for use, reproduction,
+  and distribution as defined by Sections 1 through 9 of this document.
+
+  "Licensor" shall mean the copyright owner or entity authorized by
+  the copyright owner that is granting the License.
+
+  "Legal Entity" shall mean the union of the acting entity and all
+  other entities that control, are controlled by, or are under common
+  control with that entity. For the purposes of this definition,
+  "control" means (i) the power, direct or indirect, to cause the
+  direction or management of such entity, whether by contract or
+  otherwise, or (ii) ownership of fifty percent (50%) or more of the
+  outstanding shares, or (iii) beneficial ownership of such entity.
+
+  "You" (or "Your") shall mean an individual or Legal Entity
+  exercising permissions granted by this License.
+
+  "Source" form shall mean the preferred form for making modifications,
+  including but not limited to software source code, documentation
+  source, and configuration files.
+
+  "Object" form shall mean any form resulting from mechanical
+  transformation or translation of a Source form, including but
+  not limited to compiled object code, generated documentation,
+  and conversions to other media types.
+
+  "Work" shall mean the work of authorship, whether in Source or
+  Object form, made available under the License, as indicated by a
+  copyright notice that is included in or attached to the work
+  (an example is provided in the Appendix below).
+
+  "Derivative Works" shall mean any work, whether in Source or Object
+  form, that is based on (or derived from) the Work and for which the
+  editorial revisions, annotations, elaborations, or other modifications
+  represent, as a whole, an original work of authorship. For the purposes
+  of this License, Derivative Works shall not include works that remain
+  separable from, or merely link (or bind by name) to the interfaces of,
+  the Work and Derivative Works thereof.
+
+  "Contribution" shall mean any work of authorship, including
+  the original version of the Work and any modifications or additions
+  to that Work or De

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

2015-06-16 Thread yukim
Merge branch 'cassandra-2.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/7a8be785
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/7a8be785
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/7a8be785

Branch: refs/heads/trunk
Commit: 7a8be785070f8df6cf8b35dce01e19474fc8e351
Parents: 74cef19 514dcd9
Author: Yuki Morishita 
Authored: Tue Jun 16 17:43:39 2015 -0500
Committer: Yuki Morishita 
Committed: Tue Jun 16 17:43:39 2015 -0500

--
 CHANGES.txt |   1 +
 conf/logback.xml|   9 +-
 lib/licenses/metrics-logback-3.1.0.txt  | 202 +++
 lib/metrics-logback-3.1.0.jar   | Bin 0 -> 4130 bytes
 .../metrics/CassandraMetricsRegistry.java   |  23 +--
 .../cassandra/service/CassandraDaemon.java  |  25 ++-
 6 files changed, 240 insertions(+), 20 deletions(-)
--


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

http://git-wip-us.apache.org/repos/asf/cassandra/blob/7a8be785/src/java/org/apache/cassandra/service/CassandraDaemon.java
--
diff --cc src/java/org/apache/cassandra/service/CassandraDaemon.java
index ccd11ca,59ecca7..b954e50
--- a/src/java/org/apache/cassandra/service/CassandraDaemon.java
+++ b/src/java/org/apache/cassandra/service/CassandraDaemon.java
@@@ -36,8 -37,11 +37,12 @@@ import javax.management.remote.JMXConne
  import javax.management.remote.JMXServiceURL;
  import javax.management.remote.rmi.RMIConnectorServer;
  
+ import com.codahale.metrics.Meter;
+ import com.codahale.metrics.MetricRegistryListener;
+ import com.codahale.metrics.SharedMetricRegistries;
  import com.google.common.util.concurrent.Uninterruptibles;
 +import org.apache.cassandra.gms.Gossiper;
+ import org.apache.cassandra.metrics.DefaultNameFactory;
  import org.slf4j.Logger;
  import org.slf4j.LoggerFactory;
  



[1/3] cassandra git commit: Add logback metrics

2015-06-16 Thread yukim
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-2.2 6c4c146ea -> 514dcd944
  refs/heads/trunk 74cef19fd -> 7a8be7850


Add logback metrics

patch by yukim; reviewed by Jeremiah Jordan for CASSANDRA-9378


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

Branch: refs/heads/cassandra-2.2
Commit: 514dcd944c400a8a540962f54e16561d56496425
Parents: 6c4c146
Author: Yuki Morishita 
Authored: Thu Jun 4 10:39:15 2015 -0500
Committer: Yuki Morishita 
Committed: Tue Jun 16 17:39:00 2015 -0500

--
 CHANGES.txt |   1 +
 conf/logback.xml|   9 +-
 lib/licenses/metrics-logback-3.1.0.txt  | 202 +++
 lib/metrics-logback-3.1.0.jar   | Bin 0 -> 4130 bytes
 .../metrics/CassandraMetricsRegistry.java   |  23 +--
 .../cassandra/service/CassandraDaemon.java  |  25 ++-
 6 files changed, 240 insertions(+), 20 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/514dcd94/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 1138fc2..9dccd84 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -7,6 +7,7 @@
 Merged from 2.0:
  * Periodically submit background compaction tasks (CASSANDRA-9592)
  * Set HAS_MORE_PAGES flag to false when PagingState is null (CASSANDRA-9571)
+ * Add logback metrics (CASSANDRA-9378)
 
 
 2.2.0-rc1

http://git-wip-us.apache.org/repos/asf/cassandra/blob/514dcd94/conf/logback.xml
--
diff --git a/conf/logback.xml b/conf/logback.xml
index e170d41..eb2dcd1 100644
--- a/conf/logback.xml
+++ b/conf/logback.xml
@@ -43,10 +43,17 @@
   %-5level %date{HH:mm:ss,SSS} %msg%n
 
   
-
+
+  
+
   
 
 
+
   
   
   

http://git-wip-us.apache.org/repos/asf/cassandra/blob/514dcd94/lib/licenses/metrics-logback-3.1.0.txt
--
diff --git a/lib/licenses/metrics-logback-3.1.0.txt 
b/lib/licenses/metrics-logback-3.1.0.txt
new file mode 100644
index 000..e4ba404
--- /dev/null
+++ b/lib/licenses/metrics-logback-3.1.0.txt
@@ -0,0 +1,202 @@
+
+ Apache License
+   Version 2.0, January 2004
+http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+  "License" shall mean the terms and conditions for use, reproduction,
+  and distribution as defined by Sections 1 through 9 of this document.
+
+  "Licensor" shall mean the copyright owner or entity authorized by
+  the copyright owner that is granting the License.
+
+  "Legal Entity" shall mean the union of the acting entity and all
+  other entities that control, are controlled by, or are under common
+  control with that entity. For the purposes of this definition,
+  "control" means (i) the power, direct or indirect, to cause the
+  direction or management of such entity, whether by contract or
+  otherwise, or (ii) ownership of fifty percent (50%) or more of the
+  outstanding shares, or (iii) beneficial ownership of such entity.
+
+  "You" (or "Your") shall mean an individual or Legal Entity
+  exercising permissions granted by this License.
+
+  "Source" form shall mean the preferred form for making modifications,
+  including but not limited to software source code, documentation
+  source, and configuration files.
+
+  "Object" form shall mean any form resulting from mechanical
+  transformation or translation of a Source form, including but
+  not limited to compiled object code, generated documentation,
+  and conversions to other media types.
+
+  "Work" shall mean the work of authorship, whether in Source or
+  Object form, made available under the License, as indicated by a
+  copyright notice that is included in or attached to the work
+  (an example is provided in the Appendix below).
+
+  "Derivative Works" shall mean any work, whether in Source or Object
+  form, that is based on (or derived from) the Work and for which the
+  editorial revisions, annotations, elaborations, or other modifications
+  represent, as a whole, an original work of authorship. For the purposes
+  of this License, Derivative Works shall not include works that remain
+  separable from, or merely link (or bind by name) to the interfaces of,
+  the Work and Derivative Works thereof.
+
+  "Contribution" sha

[jira] [Commented] (CASSANDRA-9583) test-compression could run multiple unit tests in parallel like test

2015-06-16 Thread Yuki Morishita (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-9583?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14588928#comment-14588928
 ] 

Yuki Morishita commented on CASSANDRA-9583:
---

Patch looks good to me. +1.
If there is no objection, we should put this in 2.2 branch also.

> test-compression could run multiple unit tests in parallel like test
> 
>
> Key: CASSANDRA-9583
> URL: https://issues.apache.org/jira/browse/CASSANDRA-9583
> Project: Cassandra
>  Issue Type: Test
>Reporter: Ariel Weisberg
>Assignee: Ariel Weisberg
>




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CASSANDRA-9499) Introduce writeVInt method to DataOutputStreamPlus

2015-06-16 Thread Benedict (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-9499?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14588924#comment-14588924
 ] 

Benedict commented on CASSANDRA-9499:
-

I'm totally cool with letting caches not survive a major version upgrade, but 
I'm also not too fussed. We could deprecate them entirely, since we will use 
writeVInt wherever helpful in the normal serialization calls that they are 
backed by.

> Introduce writeVInt method to DataOutputStreamPlus
> --
>
> Key: CASSANDRA-9499
> URL: https://issues.apache.org/jira/browse/CASSANDRA-9499
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Core
>Reporter: Benedict
>Assignee: Ariel Weisberg
>Priority: Minor
> Fix For: 3.0 beta 1
>
>
> CASSANDRA-8099 really could do with a writeVInt method, for both fixing 
> CASSANDRA-9498 but also efficiently encoding timestamp/deletion deltas. It 
> should be possible to make an especially efficient implementation against 
> BufferedDataOutputStreamPlus.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CASSANDRA-9499) Introduce writeVInt method to DataOutputStreamPlus

2015-06-16 Thread Ariel Weisberg (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-9499?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14588857#comment-14588857
 ] 

Ariel Weisberg commented on CASSANDRA-9499:
---

Am I changing the implementation used by EncodedData{Output | Input} as well 
and breaking compatibility with persisted caches?

> Introduce writeVInt method to DataOutputStreamPlus
> --
>
> Key: CASSANDRA-9499
> URL: https://issues.apache.org/jira/browse/CASSANDRA-9499
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Core
>Reporter: Benedict
>Assignee: Ariel Weisberg
>Priority: Minor
> Fix For: 3.0 beta 1
>
>
> CASSANDRA-8099 really could do with a writeVInt method, for both fixing 
> CASSANDRA-9498 but also efficiently encoding timestamp/deletion deltas. It 
> should be possible to make an especially efficient implementation against 
> BufferedDataOutputStreamPlus.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CASSANDRA-5264) Nodetool ring is reporting incorrect Effective ownership after upgrading from 1.1.2 -> 1.1.9

2015-06-16 Thread Michael Theroux (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-5264?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14588849#comment-14588849
 ] 

Michael Theroux commented on CASSANDRA-5264:


Just to (finally) follow up, we've upgraded to 1.2 and it still occurs.

> Nodetool ring is reporting incorrect Effective ownership after upgrading from 
> 1.1.2 -> 1.1.9
> 
>
> Key: CASSANDRA-5264
> URL: https://issues.apache.org/jira/browse/CASSANDRA-5264
> Project: Cassandra
>  Issue Type: Bug
>  Components: Core
>Affects Versions: 1.1.9
> Environment: Amazon AWS Linux, Large instance (8gig of RAM, ephemeral 
> storage).  12 Node cluster.  Replication Factor 3, all queries performed with 
> LOCAL_QUORUM
>Reporter: Michael Theroux
>Priority: Minor
>
> We upgraded from Cassandra 1.1.2 to 1.1.9 yesterday.  All indications are the 
> upgrade went well.  Repair works as expected, and all our data is available.  
> Performance is as good, if not better, than it was previously.  
> However, nodetool ring is reporting inconsistent and incorrect results.  This 
> was my ring information before the upgrade:
> Address DC  RackStatus State   Load
> Effective-Ownership Token   
>   
>  Token(bytes[eaa8])
> 10.0.4.22   us-east 1a  Up Normal  77.75 GB25.00% 
>  Token(bytes[0001])
> 10.0.10.23  us-east 1d  Up   Normal  82.68 GB25.00%   
>Token(bytes[1555])
> 10.0.8.20   us-east 1c  Up Normal  81.72 GB25.00% 
>  Token(bytes[2aaa])
> 10.0.4.23   us-east 1a  Up Normal  82.65 GB25.00% 
>  Token(bytes[4000])
> 10.0.10.20  us-east 1d  Up Normal  80.2 GB 25.00% 
>  Token(bytes[5554])
> 10.0.8.23   us-east 1c  Up Normal  77.06 GB25.00% 
>  Token(bytes[6aac])
> 10.0.4.21   us-east 1a  Up Normal  81.37 GB25.00% 
>  Token(bytes[8000])
> 10.0.10.24  us-east 1d  Up Normal  83.37 GB25.00% 
>  Token(bytes[9558])
> 10.0.8.21   us-east 1c  Up Normal  84.33 GB25.00% 
>  Token(bytes[aaa8])
> 10.0.4.25   us-east 1a  Up Normal  79.91 GB25.00% 
>  Token(bytes[c000])
> 10.0.10.21  us-east 1d  Up Normal  83.46 GB25.00% 
>  Token(bytes[d558])
> 10.0.8.24   us-east 1c  Up Normal  90.66 GB25.00% 
>  Token(bytes[eaa8])
> This is my ring information after the upgrade:
> 10.0.4.22   us-east 1a  Up Normal  77.74 GB99.89% 
>  Token(bytes[0001])
> 10.0.10.23  us-east 1d  Up Normal  82.82 GB64.14% 
>  Token(bytes[1555])
> 10.0.8.20   us-east 1c  Up Normal  81.89 GB30.55% 
>  Token(bytes[2aaa])
> 10.0.4.23   us-east 1a  Up Normal  82.77 GB0.04%  
>  Token(bytes[4000])
> 10.0.10.20  us-east 1d  Up Normal  80.32 GB0.04%  
>  Token(bytes[5554])
> 10.0.8.23   us-east 1c  Up Normal  77.07 GB0.04%  
>  Token(bytes[6aac])
> 10.0.4.21   us-east 1a  Up Normal  81.35 GB0.04%  
>  Token(bytes[8000])
> 10.0.10.24  us-east 1d  Up Normal  83.49 GB0.04%  
>  Token(bytes[9558])
> 10.0.8.21   us-east 1c  Up Normal  84.47 GB0.04%  
>  Token(bytes[aaa8])
> 10.0.4.25   us-east 1a  Up Normal  80.11 GB0.04%  
>  Token(bytes[c000])
> 10.0.10.21  us-east 1d  Up Normal  83.5 GB 35.79% 
>  Token(bytes[d558])
> 10.0.

[jira] [Created] (CASSANDRA-9605) Error message when creating a KS replicated to a non-existent DC

2015-06-16 Thread Sebastian Estevez (JIRA)
Sebastian Estevez created CASSANDRA-9605:


 Summary: Error message when creating a KS replicated to a 
non-existent DC
 Key: CASSANDRA-9605
 URL: https://issues.apache.org/jira/browse/CASSANDRA-9605
 Project: Cassandra
  Issue Type: Bug
Reporter: Sebastian Estevez
Priority: Minor


One of the most common mistakes I see with beginners is they mix up the data 
center configuration when using network topology strategy because they are 
copying from some tutorial or sample code or have recently changed snitches.

This should not be legal:
{code}
create KEYSPACE  test1 WITH replication = {'class': 'NetworkTopologyStrategy', 
'doesnotexist': 1} ;
cqlsh> desc KEYSPACE test1 ;

CREATE KEYSPACE test1 WITH replication = {'class': 'NetworkTopologyStrategy', 
'doesnotexist': '1'}  AND durable_writes = true; 
{code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CASSANDRA-6377) ALLOW FILTERING should allow seq scan filtering

2015-06-16 Thread Jeremy Hanna (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-6377?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14588839#comment-14588839
 ] 

Jeremy Hanna commented on CASSANDRA-6377:
-

This would also be nice to allow for doing things within partitions.  For 
example if I have the partition key and an inequality with a 'from' and a 'to' 
field to satisfy, currently I have to use a sentinel secondary index with allow 
filtering.  With this, it would be able to do the inequalities with allow 
filtering without the sentinel.

> ALLOW FILTERING should allow seq scan filtering
> ---
>
> Key: CASSANDRA-6377
> URL: https://issues.apache.org/jira/browse/CASSANDRA-6377
> Project: Cassandra
>  Issue Type: Bug
>  Components: API
>Reporter: Jonathan Ellis
>Assignee: Sylvain Lebresne
>  Labels: cql
> Fix For: 3.x
>
>
> CREATE TABLE emp_table2 (
> empID int PRIMARY KEY,
> firstname text,
> lastname text,
> b_mon text,
> b_day text,
> b_yr text,
> );
> INSERT INTO emp_table2 (empID,firstname,lastname,b_mon,b_day,b_yr) 
>VALUES (100,'jane','doe','oct','31','1980');
> INSERT INTO emp_table2 (empID,firstname,lastname,b_mon,b_day,b_yr) 
>VALUES (101,'john','smith','jan','01','1981');
> INSERT INTO emp_table2 (empID,firstname,lastname,b_mon,b_day,b_yr) 
>VALUES (102,'mary','jones','apr','15','1982');
> INSERT INTO emp_table2 (empID,firstname,lastname,b_mon,b_day,b_yr) 
>VALUES (103,'tim','best','oct','25','1982');
>
> SELECT b_mon,b_day,b_yr,firstname,lastname FROM emp_table2 
> WHERE b_mon='oct' ALLOW FILTERING;
> Bad Request: No indexed columns present in by-columns clause with Equal 
> operator



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CASSANDRA-9567) Windows does not handle ipv6 addresses

2015-06-16 Thread Kishan Karunaratne (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-9567?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14588826#comment-14588826
 ] 

Kishan Karunaratne commented on CASSANDRA-9567:
---

Still failing on my end:
{noformat}
PS C:\Users\Administrator> ccm create 2.2-head -v git:cassandra-2.2 -n 3 -s -d 
--ip-format="::%d"
Cloning Cassandra...
Cloning Cassandra (from local cache)
Checking out requested branch (cassandra-2.2)
Compiling Cassandra cassandra-2.2 ...
Current cluster is now: 2.2-head
Traceback (most recent call last):
  File "C:\Users\jenkins\jenkins\tools\Python27\Scripts\ccm.py", line 4, in 

__import__('pkg_resources').run_script('ccm==2.0.4.1', 'ccm.py')
  File 
"C:\Users\jenkins\jenkins\tools\Python27\lib\site-packages\pkg_resources.py", 
line 517, in run_script
self.require(requires)[0].run_script(script_name, ns)
  File 
"C:\Users\jenkins\jenkins\tools\Python27\lib\site-packages\pkg_resources.py", 
line 1443, in run_script
exec(script_code, namespace, namespace)
  File 
"C:\Users\jenkins\jenkins\tools\Python27\lib\site-packages\ccm-2.0.4.1-py2.7.egg\EGG-INFO\scripts\ccm.py",
 line 7
2, in 

  File "build\bdist.win-amd64\egg\ccmlib\cmds\cluster_cmds.py", line 173, in run
  File "build\bdist.win-amd64\egg\ccmlib\cluster.py", line 258, in start
  File "build\bdist.win-amd64\egg\ccmlib\node.py", line 509, in start
  File "build\bdist.win-amd64\egg\ccmlib\node.py", line 1296, in __clean_win_pid
Exception: Timed out waiting for pid file.
{noformat}

> Windows does not handle ipv6 addresses
> --
>
> Key: CASSANDRA-9567
> URL: https://issues.apache.org/jira/browse/CASSANDRA-9567
> Project: Cassandra
>  Issue Type: Bug
>Reporter: Philip Thompson
>Assignee: Philip Thompson
> Fix For: 3.x, 2.1.x, 2.2.x
>
> Attachments: 9567.txt
>
>
> In cassandra.ps1, we are pulling the listen and rpc addresses from the yaml 
> by splitting on {{:}}, then selecting [1] from the resulting split, to 
> separate the yaml key from the value.
> Unfortunately, because ipv6 addresses contain {{:}} characters, this means we 
> are not grabbing the whole address, causing problems when starting the node.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Comment Edited] (CASSANDRA-9499) Introduce writeVInt method to DataOutputStreamPlus

2015-06-16 Thread Ariel Weisberg (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-9499?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14588727#comment-14588727
 ] 

Ariel Weisberg edited comment on CASSANDRA-9499 at 6/16/15 9:25 PM:


I don't think the method we currently use is analogous to what protocol buffers 
is doing.

https://developers.google.com/protocol-buffers/docs/encoding#varints

The first description is a method of using the last bit of each byte as a 
continuation bit. We are doing a length prefix and not extension.

https://github.com/google/protobuf/blob/master/java/src/main/java/com/google/protobuf/CodedOutputStream.java#L1213

The encoding on the wire is unsigned and an additional transform (zigzag) is 
applied for signed numbers.

This sounds like it is closer to what everyone is looking for. Want a bias 
towards positive numbers? We could do unsigned with a small amount of 
additional code.


was (Author: aweisberg):
I don't think the method we currently use is analogous to what protocol buffers 
is doing.

https://developers.google.com/protocol-buffers/docs/encoding#varints

The first description is of a method is just using the last bit of each byte as 
a continuation bit. We are doing a length prefix and not extension.

https://github.com/google/protobuf/blob/master/java/src/main/java/com/google/protobuf/CodedOutputStream.java#L1213

The encoding on the wire is unsigned and an additional transform (zigzag) is 
applied for signed numbers.

This sounds like it is closer to what everyone is looking for. Want a bias 
towards positive numbers? We could do unsigned with a small amount of 
additional code.

> Introduce writeVInt method to DataOutputStreamPlus
> --
>
> Key: CASSANDRA-9499
> URL: https://issues.apache.org/jira/browse/CASSANDRA-9499
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Core
>Reporter: Benedict
>Assignee: Ariel Weisberg
>Priority: Minor
> Fix For: 3.0 beta 1
>
>
> CASSANDRA-8099 really could do with a writeVInt method, for both fixing 
> CASSANDRA-9498 but also efficiently encoding timestamp/deletion deltas. It 
> should be possible to make an especially efficient implementation against 
> BufferedDataOutputStreamPlus.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CASSANDRA-9499) Introduce writeVInt method to DataOutputStreamPlus

2015-06-16 Thread Benedict (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-9499?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14588787#comment-14588787
 ] 

Benedict commented on CASSANDRA-9499:
-

I don't mind using sign extension, since that's what I assumed we used in the 
first place (and sounds like it's what Sylvain assumed we were using too). We 
could also very easily perform zigzag encoding in a method that _depends_ on 
{{writePosVInt}}, so no duplication (although we probably won't prevent the VM 
inlining it, which it will).

It also has the benefit that implementation is very succinct, so less generated 
code. Although I don't think there's a way to write a branchless read, although 
we could probably still use getLong(), and efficiently truncate. We would need 
the option for a ninth byte, though, and would need to munge the resulting long 
quite a bit, so it would just complicate things significantly, probably to 
little benefit.

> Introduce writeVInt method to DataOutputStreamPlus
> --
>
> Key: CASSANDRA-9499
> URL: https://issues.apache.org/jira/browse/CASSANDRA-9499
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Core
>Reporter: Benedict
>Assignee: Ariel Weisberg
>Priority: Minor
> Fix For: 3.0 beta 1
>
>
> CASSANDRA-8099 really could do with a writeVInt method, for both fixing 
> CASSANDRA-9498 but also efficiently encoding timestamp/deletion deltas. It 
> should be possible to make an especially efficient implementation against 
> BufferedDataOutputStreamPlus.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CASSANDRA-9584) Decommissioning a node on Windows sends the wrong schema change event

2015-06-16 Thread Kishan Karunaratne (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-9584?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14588770#comment-14588770
 ] 

Kishan Karunaratne commented on CASSANDRA-9584:
---

This turned out to be a CCM bug, where decommission would fail silently: 
https://github.com/pcmanus/ccm/issues/307

> Decommissioning a node on Windows sends the wrong schema change event
> -
>
> Key: CASSANDRA-9584
> URL: https://issues.apache.org/jira/browse/CASSANDRA-9584
> Project: Cassandra
>  Issue Type: Bug
> Environment: C* 2.2.0-rc1 | python-driver 2.6.0-rc1 | Windows Server 
> 2012 R2 64-bit
>Reporter: Kishan Karunaratne
>Assignee: Joshua McKenzie
> Fix For: 2.2.x
>
>
> Decommissioning a node on Windows sends the wrong schema change event:
> {noformat}
> cassandra.connection: DEBUG: Message pushed from server: 
>  _args={'change_type': u'DOWN', 'address': ('127.0.0.2', 9042)}, stream_id=-1)>
> {noformat}
> On Linux I get the correct event:
> {noformat}
> cassandra.connection: DEBUG: Message pushed from server: 
>  event_args={'change_type': u'REMOVED_NODE', 'address': ('127.0.0.2', 9042)}, 
> stream_id=-1)>
> {noformat}
> We are using ccmlib node.py.decommission() which calls nodetool decommission:
> {noformat}
> def decommission(self):
> self.nodetool("decommission")
> self.status = Status.DECOMMISIONNED
> self._update_config()
> {noformat}
> Interestingly, it does seem to work (correctly?) on CCM CLI:
> {noformat}
> PS C:\Users\Administrator> ccm status
> Cluster: '2.2'
> --
> node1: UP
> node3: UP
> node2: UP
> PS C:\Users\Administrator> ccm node1 ring
> Starting NodeTool
> Datacenter: datacenter1
> ==
> AddressRackStatus State   LoadOwns
> Token
>   
>   3074457345618258602
> 127.0.0.1  rack1   Up Normal  62.43 KB?   
> -9223372036854775808
> 127.0.0.2  rack1   Up Normal  104.87 KB   ?   
> -3074457345618258603
> 127.0.0.3  rack1   Up Normal  83.67 KB?   
> 3074457345618258602
>   Note: Non-system keyspaces don't have the same replication settings, 
> effective ownership information is meaningless
> PS C:\Users\Administrator> ccm node2 decommission
> PS C:\Users\Administrator> ccm status
> Cluster: '2.2'
> --
> node1: UP
> node3: UP
> node2: DECOMMISIONNED
> PS C:\Users\Administrator> ccm node1 ring
> Starting NodeTool
> Datacenter: datacenter1
> ==
> AddressRackStatus State   LoadOwns
> Token
>   
>   3074457345618258602
> 127.0.0.1  rack1   Up Normal  67.11 KB?   
> -9223372036854775808
> 127.0.0.3  rack1   Up Normal  88.35 KB?   
> 3074457345618258602
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CASSANDRA-6477) Materialized Views (was: Global Indexes)

2015-06-16 Thread T Jake Luciani (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-6477?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14588745#comment-14588745
 ] 

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

One minor requirement that wasn't spelled out is support for composite primary 
keys in the MV table.

> Materialized Views (was: Global Indexes)
> 
>
> Key: CASSANDRA-6477
> URL: https://issues.apache.org/jira/browse/CASSANDRA-6477
> Project: Cassandra
>  Issue Type: New Feature
>  Components: API, Core
>Reporter: Jonathan Ellis
>Assignee: Carl Yeksigian
>  Labels: cql
> Fix For: 3.0 beta 1
>
>
> Local indexes are suitable for low-cardinality data, where spreading the 
> index across the cluster is a Good Thing.  However, for high-cardinality 
> data, local indexes require querying most nodes in the cluster even if only a 
> handful of rows is returned.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[3/6] cassandra git commit: Fix CHANGES.txt

2015-06-16 Thread samt
Fix CHANGES.txt


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

Branch: refs/heads/trunk
Commit: 46cc577a860352ff0e880ff183f4672ac85c700e
Parents: 8934a02
Author: Sam Tunnicliffe 
Authored: Tue Jun 16 21:37:50 2015 +0100
Committer: Sam Tunnicliffe 
Committed: Tue Jun 16 21:37:50 2015 +0100

--
 CHANGES.txt | 1 -
 1 file changed, 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/46cc577a/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 858f13c..5f9187c 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,6 +1,5 @@
 2.1.7
 Merged from 2.0
-2.0.16:
  * Periodically submit background compaction tasks (CASSANDRA-9592)
  * Set HAS_MORE_PAGES flag to false when PagingState is null (CASSANDRA-9571)
 



[4/6] cassandra git commit: Merge branch 'cassandra-2.1' into cassandra-2.2

2015-06-16 Thread samt
Merge branch 'cassandra-2.1' into cassandra-2.2

Conflicts:
CHANGES.txt


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

Branch: refs/heads/trunk
Commit: 6c4c146ea7b3fd469990bf65521bff1bc58b80d2
Parents: 84136ce 46cc577
Author: Sam Tunnicliffe 
Authored: Tue Jun 16 21:39:23 2015 +0100
Committer: Sam Tunnicliffe 
Committed: Tue Jun 16 21:39:23 2015 +0100

--
 CHANGES.txt | 1 +
 1 file changed, 1 insertion(+)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/6c4c146e/CHANGES.txt
--
diff --cc CHANGES.txt
index 6e87beb,5f9187c..1138fc2
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -8,29 -3,8 +8,30 @@@ Merged from 2.0
   * Periodically submit background compaction tasks (CASSANDRA-9592)
   * Set HAS_MORE_PAGES flag to false when PagingState is null (CASSANDRA-9571)
  
+ 
 -2.1.6
 +2.2.0-rc1
 + * Compressed commit log should measure compressed space used (CASSANDRA-9095)
 + * Fix comparison bug in CassandraRoleManager#collectRoles (CASSANDRA-9551)
 + * Add tinyint,smallint,time,date support for UDFs (CASSANDRA-9400)
 + * Deprecates SSTableSimpleWriter and SSTableSimpleUnsortedWriter 
(CASSANDRA-9546)
 + * Empty INITCOND treated as null in aggregate (CASSANDRA-9457)
 + * Remove use of Cell in Thrift MapReduce classes (CASSANDRA-8609)
 + * Integrate pre-release Java Driver 2.2-rc1, custom build (CASSANDRA-9493)
 + * Clean up gossiper logic for old versions (CASSANDRA-9370)
 + * Fix custom payload coding/decoding to match the spec (CASSANDRA-9515)
 + * ant test-all results incomplete when parsed (CASSANDRA-9463)
 + * Disallow frozen<> types in function arguments and return types for
 +   clarity (CASSANDRA-9411)
 + * Static Analysis to warn on unsafe use of Autocloseable instances 
(CASSANDRA-9431)
 + * Update commitlog archiving examples now that commitlog segments are
 +   not recycled (CASSANDRA-9350)
 + * Extend Transactional API to sstable lifecycle management (CASSANDRA-8568)
 + * (cqlsh) Add support for native protocol 4 (CASSANDRA-9399)
 + * Ensure that UDF and UDAs are keyspace-isolated (CASSANDRA-9409)
 + * Revert CASSANDRA-7807 (tracing completion client notifications) 
(CASSANDRA-9429)
 + * Add ability to stop compaction by ID (CASSANDRA-7207)
 + * Let CassandraVersion handle SNAPSHOT version (CASSANDRA-9438)
 +Merged from 2.1:
   * (cqlsh) Fix using COPY through SOURCE or -f (CASSANDRA-9083)
   * Fix occasional lack of `system` keyspace in schema tables (CASSANDRA-8487)
   * Use ProtocolError code instead of ServerError code for native protocol



[2/6] cassandra git commit: Fix CHANGES.txt

2015-06-16 Thread samt
Fix CHANGES.txt


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

Branch: refs/heads/cassandra-2.2
Commit: 46cc577a860352ff0e880ff183f4672ac85c700e
Parents: 8934a02
Author: Sam Tunnicliffe 
Authored: Tue Jun 16 21:37:50 2015 +0100
Committer: Sam Tunnicliffe 
Committed: Tue Jun 16 21:37:50 2015 +0100

--
 CHANGES.txt | 1 -
 1 file changed, 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/46cc577a/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 858f13c..5f9187c 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,6 +1,5 @@
 2.1.7
 Merged from 2.0
-2.0.16:
  * Periodically submit background compaction tasks (CASSANDRA-9592)
  * Set HAS_MORE_PAGES flag to false when PagingState is null (CASSANDRA-9571)
 



[5/6] cassandra git commit: Merge branch 'cassandra-2.1' into cassandra-2.2

2015-06-16 Thread samt
Merge branch 'cassandra-2.1' into cassandra-2.2

Conflicts:
CHANGES.txt


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

Branch: refs/heads/cassandra-2.2
Commit: 6c4c146ea7b3fd469990bf65521bff1bc58b80d2
Parents: 84136ce 46cc577
Author: Sam Tunnicliffe 
Authored: Tue Jun 16 21:39:23 2015 +0100
Committer: Sam Tunnicliffe 
Committed: Tue Jun 16 21:39:23 2015 +0100

--
 CHANGES.txt | 1 +
 1 file changed, 1 insertion(+)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/6c4c146e/CHANGES.txt
--
diff --cc CHANGES.txt
index 6e87beb,5f9187c..1138fc2
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -8,29 -3,8 +8,30 @@@ Merged from 2.0
   * Periodically submit background compaction tasks (CASSANDRA-9592)
   * Set HAS_MORE_PAGES flag to false when PagingState is null (CASSANDRA-9571)
  
+ 
 -2.1.6
 +2.2.0-rc1
 + * Compressed commit log should measure compressed space used (CASSANDRA-9095)
 + * Fix comparison bug in CassandraRoleManager#collectRoles (CASSANDRA-9551)
 + * Add tinyint,smallint,time,date support for UDFs (CASSANDRA-9400)
 + * Deprecates SSTableSimpleWriter and SSTableSimpleUnsortedWriter 
(CASSANDRA-9546)
 + * Empty INITCOND treated as null in aggregate (CASSANDRA-9457)
 + * Remove use of Cell in Thrift MapReduce classes (CASSANDRA-8609)
 + * Integrate pre-release Java Driver 2.2-rc1, custom build (CASSANDRA-9493)
 + * Clean up gossiper logic for old versions (CASSANDRA-9370)
 + * Fix custom payload coding/decoding to match the spec (CASSANDRA-9515)
 + * ant test-all results incomplete when parsed (CASSANDRA-9463)
 + * Disallow frozen<> types in function arguments and return types for
 +   clarity (CASSANDRA-9411)
 + * Static Analysis to warn on unsafe use of Autocloseable instances 
(CASSANDRA-9431)
 + * Update commitlog archiving examples now that commitlog segments are
 +   not recycled (CASSANDRA-9350)
 + * Extend Transactional API to sstable lifecycle management (CASSANDRA-8568)
 + * (cqlsh) Add support for native protocol 4 (CASSANDRA-9399)
 + * Ensure that UDF and UDAs are keyspace-isolated (CASSANDRA-9409)
 + * Revert CASSANDRA-7807 (tracing completion client notifications) 
(CASSANDRA-9429)
 + * Add ability to stop compaction by ID (CASSANDRA-7207)
 + * Let CassandraVersion handle SNAPSHOT version (CASSANDRA-9438)
 +Merged from 2.1:
   * (cqlsh) Fix using COPY through SOURCE or -f (CASSANDRA-9083)
   * Fix occasional lack of `system` keyspace in schema tables (CASSANDRA-8487)
   * Use ProtocolError code instead of ServerError code for native protocol



[1/6] cassandra git commit: Fix CHANGES.txt

2015-06-16 Thread samt
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-2.1 8934a0298 -> 46cc577a8
  refs/heads/cassandra-2.2 84136cefd -> 6c4c146ea
  refs/heads/trunk 07bb8f98e -> 74cef19fd


Fix CHANGES.txt


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

Branch: refs/heads/cassandra-2.1
Commit: 46cc577a860352ff0e880ff183f4672ac85c700e
Parents: 8934a02
Author: Sam Tunnicliffe 
Authored: Tue Jun 16 21:37:50 2015 +0100
Committer: Sam Tunnicliffe 
Committed: Tue Jun 16 21:37:50 2015 +0100

--
 CHANGES.txt | 1 -
 1 file changed, 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/46cc577a/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 858f13c..5f9187c 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,6 +1,5 @@
 2.1.7
 Merged from 2.0
-2.0.16:
  * Periodically submit background compaction tasks (CASSANDRA-9592)
  * Set HAS_MORE_PAGES flag to false when PagingState is null (CASSANDRA-9571)
 



[6/6] cassandra git commit: Merge branch 'cassandra-2.2' into trunk

2015-06-16 Thread samt
Merge branch 'cassandra-2.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/74cef19f
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/74cef19f
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/74cef19f

Branch: refs/heads/trunk
Commit: 74cef19fd3f90d3dd89007684b18c1edb31d098f
Parents: 07bb8f9 6c4c146
Author: Sam Tunnicliffe 
Authored: Tue Jun 16 21:39:33 2015 +0100
Committer: Sam Tunnicliffe 
Committed: Tue Jun 16 21:39:33 2015 +0100

--
 CHANGES.txt | 1 +
 1 file changed, 1 insertion(+)
--


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



[jira] [Commented] (CASSANDRA-9499) Introduce writeVInt method to DataOutputStreamPlus

2015-06-16 Thread Ariel Weisberg (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-9499?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14588727#comment-14588727
 ] 

Ariel Weisberg commented on CASSANDRA-9499:
---

I don't think the method we currently use is analogous to what protocol buffers 
is doing.

https://developers.google.com/protocol-buffers/docs/encoding#varints

The first description is of a method is just using the last bit of each byte as 
a continuation bit. We are doing a length prefix and not extension.

https://github.com/google/protobuf/blob/master/java/src/main/java/com/google/protobuf/CodedOutputStream.java#L1213

The encoding on the wire is unsigned and an additional transform (zigzag) is 
applied for signed numbers.

This sounds like it is closer to what everyone is looking for. Want a bias 
towards positive numbers? We could do unsigned with a small amount of 
additional code.

> Introduce writeVInt method to DataOutputStreamPlus
> --
>
> Key: CASSANDRA-9499
> URL: https://issues.apache.org/jira/browse/CASSANDRA-9499
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Core
>Reporter: Benedict
>Assignee: Ariel Weisberg
>Priority: Minor
> Fix For: 3.0 beta 1
>
>
> CASSANDRA-8099 really could do with a writeVInt method, for both fixing 
> CASSANDRA-9498 but also efficiently encoding timestamp/deletion deltas. It 
> should be possible to make an especially efficient implementation against 
> BufferedDataOutputStreamPlus.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (CASSANDRA-9102) Consistency levels such as non-local quorum need better tests

2015-06-16 Thread Ariel Weisberg (JIRA)

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

Ariel Weisberg updated CASSANDRA-9102:
--
Reviewer: Ariel Weisberg

> Consistency levels such as non-local quorum need better tests
> -
>
> Key: CASSANDRA-9102
> URL: https://issues.apache.org/jira/browse/CASSANDRA-9102
> Project: Cassandra
>  Issue Type: Test
>Reporter: Ariel Weisberg
>Assignee: Stefania
>
> We didn't catch unit testing for this functionality. There is dtest 
> consistency_test but it doesn't cover non-local functionality.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CASSANDRA-9499) Introduce writeVInt method to DataOutputStreamPlus

2015-06-16 Thread Ariel Weisberg (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-9499?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14588647#comment-14588647
 ] 

Ariel Weisberg commented on CASSANDRA-9499:
---

I got the readVInt optimization where there is no loop working.

What are we looking to accomplish with a different encoding?

* Bias towards positive numbers
* More efficient length extension (currently the first byte is dropped) for > 1 
byte values
* Simpler/faster implementation

I just bent over backwards to remove branching, loops, instructions etc. If we 
change encodings are we going to lose that ground? Is what we would get from 
the first two attributes more important?

Do we want to do just one, say more efficient length extension?


> Introduce writeVInt method to DataOutputStreamPlus
> --
>
> Key: CASSANDRA-9499
> URL: https://issues.apache.org/jira/browse/CASSANDRA-9499
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Core
>Reporter: Benedict
>Assignee: Ariel Weisberg
>Priority: Minor
> Fix For: 3.0 beta 1
>
>
> CASSANDRA-8099 really could do with a writeVInt method, for both fixing 
> CASSANDRA-9498 but also efficiently encoding timestamp/deletion deltas. It 
> should be possible to make an especially efficient implementation against 
> BufferedDataOutputStreamPlus.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CASSANDRA-9270) Running resetlocalschema during repair can cause repair to hang

2015-06-16 Thread Aleksey Yeschenko (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-9270?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14588636#comment-14588636
 ] 

Aleksey Yeschenko commented on CASSANDRA-9270:
--

Just annotating them as {{@Nullable}} would be a welcome first step.

> Running resetlocalschema during repair can cause repair to hang
> ---
>
> Key: CASSANDRA-9270
> URL: https://issues.apache.org/jira/browse/CASSANDRA-9270
> Project: Cassandra
>  Issue Type: Bug
>Reporter: T Jake Luciani
>Assignee: Yuki Morishita
>Priority: Minor
> Fix For: 2.0.x
>
>
> If you run resetlocalschema during a repair the node doing the repair can 
> hang.
> The following test reproduces the issue quite frequently:
> https://github.com/riptano/cassandra-dtest/pull/247
> This is from trunk, but happens in 2.0 and 2.1 as well.  My guess is there is 
> some count down latch that isn't count down when the repair msg fails to be 
> parsed.
> {code}
> ERROR [Repair#1:10] 2015-04-30 12:57:56,675 CassandraDaemon.java: Exception 
> in thread Thread[Repair#1:10,5,RMI Runtime]
> java.lang.IllegalArgumentException: Unknown keyspace/cf pair 
> (keyspace1.standard1)
>   at 
> org.apache.cassandra.db.Keyspace.getColumnFamilyStore(Keyspace.java:172) 
> ~[main/:na]
>   at 
> org.apache.cassandra.repair.RepairJob.sendValidationRequest(RepairJob.java:189)
>  ~[main/:na]
>   at org.apache.cassandra.repair.RepairJob.run(RepairJob.java:110) 
> ~[main/:na]
>   at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
>  ~[na:1.7.0_72]
>   at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
>  ~[na:1.7.0_72]
>   at java.lang.Thread.run(Thread.java:745) ~[na:1.7.0_72]
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Created] (CASSANDRA-9604) Upon JVM OOM (Out Of Memory), print out a summary of heap histograms in addition to heap dump

2015-06-16 Thread Wei Deng (JIRA)
Wei Deng created CASSANDRA-9604:
---

 Summary: Upon JVM OOM (Out Of Memory), print out a summary of heap 
histograms in addition to heap dump
 Key: CASSANDRA-9604
 URL: https://issues.apache.org/jira/browse/CASSANDRA-9604
 Project: Cassandra
  Issue Type: Improvement
  Components: Config
Reporter: Wei Deng
Priority: Minor


It appears that jmap has an option to allow dumping heap histograms after a 
heap dump is generated 
(http://www.oracle.com/technetwork/java/javase/memleaks-137499.html#gbywi). 
This could be useful to provide a very quick overview of the biggest objects in 
heap without having to download the massive hprof file off the Cassandra nodes. 
We can potentially hook it up using this JVM option: 
-XX:OnOutOfMemoryError="; " in the cassandra-env.sh file.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CASSANDRA-9270) Running resetlocalschema during repair can cause repair to hang

2015-06-16 Thread Yuki Morishita (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-9270?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14588569#comment-14588569
 ] 

Yuki Morishita commented on CASSANDRA-9270:
---

I think this happens in many places where they access 
{{Keyspace#getColumnFamilyStore}} or related {{Schema#getCF}} and alikes.
We should re-consider those API so that caller has to explicitly handle dropped 
KS/CF case.
For example, we can use java8 Optional for return value or throw checked 
exception instead.

Any opinion?

> Running resetlocalschema during repair can cause repair to hang
> ---
>
> Key: CASSANDRA-9270
> URL: https://issues.apache.org/jira/browse/CASSANDRA-9270
> Project: Cassandra
>  Issue Type: Bug
>Reporter: T Jake Luciani
>Assignee: Yuki Morishita
>Priority: Minor
> Fix For: 2.0.x
>
>
> If you run resetlocalschema during a repair the node doing the repair can 
> hang.
> The following test reproduces the issue quite frequently:
> https://github.com/riptano/cassandra-dtest/pull/247
> This is from trunk, but happens in 2.0 and 2.1 as well.  My guess is there is 
> some count down latch that isn't count down when the repair msg fails to be 
> parsed.
> {code}
> ERROR [Repair#1:10] 2015-04-30 12:57:56,675 CassandraDaemon.java: Exception 
> in thread Thread[Repair#1:10,5,RMI Runtime]
> java.lang.IllegalArgumentException: Unknown keyspace/cf pair 
> (keyspace1.standard1)
>   at 
> org.apache.cassandra.db.Keyspace.getColumnFamilyStore(Keyspace.java:172) 
> ~[main/:na]
>   at 
> org.apache.cassandra.repair.RepairJob.sendValidationRequest(RepairJob.java:189)
>  ~[main/:na]
>   at org.apache.cassandra.repair.RepairJob.run(RepairJob.java:110) 
> ~[main/:na]
>   at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
>  ~[na:1.7.0_72]
>   at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
>  ~[na:1.7.0_72]
>   at java.lang.Thread.run(Thread.java:745) ~[na:1.7.0_72]
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (CASSANDRA-9583) test-compression could run multiple unit tests in parallel like test

2015-06-16 Thread Yuki Morishita (JIRA)

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

Yuki Morishita updated CASSANDRA-9583:
--
Reviewer: Yuki Morishita

> test-compression could run multiple unit tests in parallel like test
> 
>
> Key: CASSANDRA-9583
> URL: https://issues.apache.org/jira/browse/CASSANDRA-9583
> Project: Cassandra
>  Issue Type: Test
>Reporter: Ariel Weisberg
>Assignee: Ariel Weisberg
>




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


cassandra git commit: Add nodetool replaybatchlog command

2015-06-16 Thread jake
Repository: cassandra
Updated Branches:
  refs/heads/trunk 25dca4669 -> 07bb8f98e


Add nodetool replaybatchlog command

Patch by carlyeks; reviewed by tjake for CASSANDRA-9547


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

Branch: refs/heads/trunk
Commit: 07bb8f98e07f10308d65c264fe29f8c5ee8d4f4f
Parents: 25dca46
Author: Carl Yeksigian 
Authored: Thu Jun 4 10:50:31 2015 -0400
Committer: T Jake Luciani 
Committed: Tue Jun 16 14:46:20 2015 -0400

--
 CHANGES.txt |  1 +
 .../apache/cassandra/db/BatchlogManager.java|  6 +--
 .../cassandra/db/BatchlogManagerMBean.java  |  2 +-
 .../org/apache/cassandra/tools/NodeProbe.java   | 17 
 .../org/apache/cassandra/tools/NodeTool.java|  1 +
 .../tools/nodetool/ReplayBatchlog.java  | 42 
 6 files changed, 65 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/07bb8f98/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 77ac9e8..c2e5c97 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 3.0:
+ * Add nodetool command to replay batchlog (CASSANDRA-9547)
  * Make file buffer cache independent of paths being read (CASSANDRA-8897)
  * Remove deprecated legacy Hadoop code (CASSANDRA-9353)
  * Decommissioned nodes will not rejoin the cluster (CASSANDRA-8801)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/07bb8f98/src/java/org/apache/cassandra/db/BatchlogManager.java
--
diff --git a/src/java/org/apache/cassandra/db/BatchlogManager.java 
b/src/java/org/apache/cassandra/db/BatchlogManager.java
index dd84ac8..6038475 100644
--- a/src/java/org/apache/cassandra/db/BatchlogManager.java
+++ b/src/java/org/apache/cassandra/db/BatchlogManager.java
@@ -60,7 +60,7 @@ import static 
org.apache.cassandra.cql3.QueryProcessor.executeInternal;
 
 public class BatchlogManager implements BatchlogManagerMBean
 {
-private static final String MBEAN_NAME = 
"org.apache.cassandra.db:type=BatchlogManager";
+public static final String MBEAN_NAME = 
"org.apache.cassandra.db:type=BatchlogManager";
 private static final long REPLAY_INTERVAL = 60 * 1000; // milliseconds
 private static final int PAGE_SIZE = 128; // same as HHOM, for now, w/out 
using any heuristics. TODO: set based on avg batch size.
 
@@ -112,9 +112,9 @@ public class BatchlogManager implements BatchlogManagerMBean
 return totalBatchesReplayed.longValue();
 }
 
-public void forceBatchlogReplay()
+public void forceBatchlogReplay() throws Exception
 {
-startBatchlogReplay();
+startBatchlogReplay().get();
 }
 
 public Future startBatchlogReplay()

http://git-wip-us.apache.org/repos/asf/cassandra/blob/07bb8f98/src/java/org/apache/cassandra/db/BatchlogManagerMBean.java
--
diff --git a/src/java/org/apache/cassandra/db/BatchlogManagerMBean.java 
b/src/java/org/apache/cassandra/db/BatchlogManagerMBean.java
index 2e60ba4..a688117 100644
--- a/src/java/org/apache/cassandra/db/BatchlogManagerMBean.java
+++ b/src/java/org/apache/cassandra/db/BatchlogManagerMBean.java
@@ -34,5 +34,5 @@ public interface BatchlogManagerMBean
 /**
  * Forces batchlog replay. Returns immediately if replay is already in 
progress.
  */
-public void forceBatchlogReplay();
+public void forceBatchlogReplay() throws Exception;
 }

http://git-wip-us.apache.org/repos/asf/cassandra/blob/07bb8f98/src/java/org/apache/cassandra/tools/NodeProbe.java
--
diff --git a/src/java/org/apache/cassandra/tools/NodeProbe.java 
b/src/java/org/apache/cassandra/tools/NodeProbe.java
index 14215dc..db22208 100644
--- a/src/java/org/apache/cassandra/tools/NodeProbe.java
+++ b/src/java/org/apache/cassandra/tools/NodeProbe.java
@@ -51,6 +51,8 @@ import javax.management.remote.JMXConnectorFactory;
 import javax.management.remote.JMXServiceURL;
 
 import org.apache.cassandra.concurrent.Stage;
+import org.apache.cassandra.db.BatchlogManager;
+import org.apache.cassandra.db.BatchlogManagerMBean;
 import org.apache.cassandra.db.ColumnFamilyStoreMBean;
 import org.apache.cassandra.db.HintedHandOffManager;
 import org.apache.cassandra.db.HintedHandOffManagerMBean;
@@ -111,6 +113,7 @@ public class NodeProbe implements AutoCloseable
 private CacheServiceMBean cacheService;
 private StorageProxyMBean spProxy;
 private HintedHandOffManagerMBean hhProxy;

[jira] [Commented] (CASSANDRA-8085) Make PasswordAuthenticator number of hashing rounds configurable

2015-06-16 Thread Tyler Hobbs (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-8085?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14588435#comment-14588435
 ] 

Tyler Hobbs commented on CASSANDRA-8085:


For future reference, the new JVM option name is 
{{cassandra.auth_bcrypt_gensalt_log2_rounds}}.

> Make PasswordAuthenticator number of hashing rounds configurable
> 
>
> Key: CASSANDRA-8085
> URL: https://issues.apache.org/jira/browse/CASSANDRA-8085
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Core
>Reporter: Tyler Hobbs
>Assignee: Sam Tunnicliffe
> Fix For: 2.0.15, 2.1.5
>
> Attachments: 8085-2.0.txt, 8085-2.1.txt, 8085-3.0.txt
>
>
> Running 2^10 rounds of bcrypt can take a while.  In environments (like PHP) 
> where connections are not typically long-lived, authenticating can add 
> substantial overhead.  On IRC, one user saw the time to connect, 
> authenticate, and execute a query jump from 5ms to 150ms with authentication 
> enabled ([debug logs|http://pastebin.com/bSUufbr0]).
> CASSANDRA-7715 is a more complete fix for this, but in the meantime (and even 
> after 7715), this is a good option.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


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

2015-06-16 Thread tylerhobbs
Merge branch 'cassandra-2.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/25dca466
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/25dca466
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/25dca466

Branch: refs/heads/trunk
Commit: 25dca46697685fd45be6ac3928bef713bb609c76
Parents: 39680ee 84136ce
Author: Tyler Hobbs 
Authored: Tue Jun 16 12:33:15 2015 -0500
Committer: Tyler Hobbs 
Committed: Tue Jun 16 12:33:15 2015 -0500

--
 doc/cql3/CQL.textile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
--




svn commit: r1685875 - /cassandra/site/publish/doc/cql3/CQL-2.1.html

2015-06-16 Thread tylerhobbs
Author: tylerhobbs
Date: Tue Jun 16 17:33:54 2015
New Revision: 1685875

URL: http://svn.apache.org/r1685875
Log:
Fix identifier regex in CQL docs

Modified:
cassandra/site/publish/doc/cql3/CQL-2.1.html

Modified: cassandra/site/publish/doc/cql3/CQL-2.1.html
URL: 
http://svn.apache.org/viewvc/cassandra/site/publish/doc/cql3/CQL-2.1.html?rev=1685875&r1=1685874&r2=1685875&view=diff
==
--- cassandra/site/publish/doc/cql3/CQL-2.1.html (original)
+++ cassandra/site/publish/doc/cql3/CQL-2.1.html Tue Jun 16 17:33:54 2015
@@ -1,6 +1,6 @@
 http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>http://www.w3.org/1999/xhtml";>CQLCassandra Query Language (CQL) 
v3.2.0Cassandra Query Language (CQL) 
v3.2.0CQL 
SyntaxPreambleConventionsIdentifiers and keywordsConstantsCommentsStatementsPrepared StatementData DefinitionCREATE KEYSPACEUSEALTER KEYSPACEDROP KEYSPACECREATE TABLEALTER TABLEDROP TABLETRUNCATECREATE INDEXDROP INDEXCREATE TYPEALTER TYPEDROP TYPECREATE TRIGGERDROP 
TRIGGERData 
ManipulationINSERTUPDATEDELETEBATCHQueriesSELECTDatabase UsersCREATE USER ALTER USER DROP USER LIST USERSData ControlPermissions GRANT PERMISSIONREVOKE 
PERMISSIONData TypesWorking with 
datesCountersWorking with collectionsFunctionsTokenUuidTimeuuid functionsBlob conversion functionsAppendix A: CQL KeywordsAppendix B: CQL Reserved TypesChanges3.2.03.1.73.1.6href="CQL.html#a3.1.5">3.1.5href="CQL.html#a3.1.4">3.1.4href="CQL.html#a3.1.3">3.1.3href="CQL.html#a3.1.2">3.1.2href="CQL.html#a3.1.1">3.1.1href="CQL.html#a3.1.0">3.1.0href="CQL.html#a3.0.5">3.0.5href="CQL.html#a3.0.4">3.0.4href="CQL.html#a3.0.3">3.0.3href="CQL.html#a3.0.2">3.0.2href="CQL.html#a3.0.1">3.0.1href="CQL.html#Versioning">Versioningid="CQLSyntax">CQL SyntaxPreambleThis document 
 >describes the Cassandra Query Language (CQL) version 3. CQL v3 is not 
 >backward compatible with CQL v2 and differs from it in numerous ways. Note 
 >that this document describes the last version of the languages. However, the 
 >changes section provides the diff between the diffe
 rent versions of CQL v3.CQL v3 offers a model very close to SQL in the 
sense that data is put in tables containing rows of 
columns. For that reason, when used in this document, these terms 
(tables, rows and columns) have the same definition than they have in SQL. But 
please note that as such, they do not refer to the concept of 
rows and columns found in the internal implementation of Cassandra and in the 
thrift and CQL v2 API.ConventionsTo aid in 
specifying the CQL syntax, we will use the following conventions in this 
document:Language rules will be given in a http://en.wikipedia.org/wiki/Backus%E2%80%93Naur_Form";>BNF -like 
notation: ::= TERMINAL 
 
 Nonterminal symbols will have .As additional shortcut notations to BNF, we’ll 
use traditional regular expression’s symbols (?, 
+ and *) to signify that a given symbol is optional 
and/or can be repeated. We’ll also allow parentheses to group symbols and 
the [] notation to represent any one of 
.The grammar is provided for documentation 
purposes and leave some minor details out. For instance, the last column 
definition in a CREATE TABLE statement is optional but supported 
if present even though the provided grammar in this document suggest it is not 
supported. Sample code will be provided in a code block:SELECT sample_usage FROM cql;
-References to keywords or pieces of CQL code in running 
text will be shown in a fixed-width font.Identifiers and keywordsThe CQL language uses 
identifiers (or names) to identify tables, columns and other 
objects. An identifier is a token matching the regular expression [a-zA-Z0-9_]*.A number of such 
identifiers, like SELECT or WITH, are 
keywords. They have a fixed meaning for the language and most are 
reserved. The list of those keywords can be found in Appendix A.Identifiers and (unquoted) keywords are 
case insensitive. Thus SELECT is the same than select 
or sElEcT, and myId is the same than 
myid or MYID for instance. A convention often used 
(in particular by the samples of this documentation) is to use u
 pper case for keywords and lower case for other identifiers.There is a 
second kind of identifiers called quoted identifiers defined by 
enclosing an arbitrary sequence of characters in double-quotes("). 
Quoted identifiers are never keywords. Thus "select" is not a 
reserved keyword and can be used to refer to a column, while 
select would raise a parse error. Also, contrarily to unquoted 
identifiers and keywords, quoted identifiers are case sensitive ("My 
Quoted Id" is different from "my quoted id"). A 
fully lowercase quoted identifier that matches [a-zA-Z0-9_]* is equivalent to the unquoted 
identifier obtained by removing the double-quote (so "myid" is 
equivalent to myid and to myId but different from 
"myId"). Inside a quoted identifier, the doubl

[1/2] cassandra git commit: Fix identifier regex in CQL documentation

2015-06-16 Thread tylerhobbs
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-2.2 2c9b82d11 -> 84136cefd


Fix identifier regex in CQL documentation

The regex was correct, but for some reason it wasn't generating the
correct HTML.


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

Branch: refs/heads/cassandra-2.2
Commit: 8934a0298e3ad249328b6bc3e2e34d22c93fd70e
Parents: 374ef3c
Author: Tyler Hobbs 
Authored: Tue Jun 16 12:31:43 2015 -0500
Committer: Tyler Hobbs 
Committed: Tue Jun 16 12:31:43 2015 -0500

--
 doc/cql3/CQL.textile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/8934a029/doc/cql3/CQL.textile
--
diff --git a/doc/cql3/CQL.textile b/doc/cql3/CQL.textile
index ea0aed6..e3b78b7 100644
--- a/doc/cql3/CQL.textile
+++ b/doc/cql3/CQL.textile
@@ -37,13 +37,13 @@ bc(sample). SELECT sample_usage FROM cql;
 
 h3(#identifiers). Identifiers and keywords
 
-p. The CQL language uses _identifiers_ (or _names_) to identify tables, 
columns and other objects. An identifier is a token matching the regular 
expression @[a-zA-Z][a-zA-Z0-9_]@@*@.
+p. The CQL language uses _identifiers_ (or _names_) to identify tables, 
columns and other objects. An identifier is a token matching the regular 
expression @[a-zA-Z]@@[a-zA-Z0-9_]@@*@.
 
 p. A number of such identifiers, like @SELECT@ or @WITH@, are _keywords_. They 
have a fixed meaning for the language and most are reserved. The list of those 
keywords can be found in "Appendix A":#appendixA.
 
 p. Identifiers and (unquoted) keywords are case insensitive. Thus @SELECT@ is 
the same than @select@ or @sElEcT@, and @myId@ is the same than @myid@ or 
@MYID@ for instance. A convention often used (in particular by the samples of 
this documentation) is to use upper case for keywords and lower case for other 
identifiers.
 
-p. There is a second kind of identifiers called _quoted identifiers_ defined 
by enclosing an arbitrary sequence of characters in double-quotes(@"@). Quoted 
identifiers are never keywords. Thus @"select"@ is not a reserved keyword and 
can be used to refer to a column, while @select@ would raise a parse error. 
Also, contrarily to unquoted identifiers and keywords, quoted identifiers are 
case sensitive (@"My Quoted Id"@ is _different_ from @"my quoted id"@). A fully 
lowercase quoted identifier that matches @[a-zA-Z][a-zA-Z0-9_]@@*@ is 
equivalent to the unquoted identifier obtained by removing the double-quote (so 
@"myid"@ is equivalent to @myid@ and to @myId@ but different from @"myId"@). 
Inside a quoted identifier, the double-quote character can be repeated to 
escape it, so @"foo "" bar"@ is a valid identifier.
+p. There is a second kind of identifiers called _quoted identifiers_ defined 
by enclosing an arbitrary sequence of characters in double-quotes(@"@). Quoted 
identifiers are never keywords. Thus @"select"@ is not a reserved keyword and 
can be used to refer to a column, while @select@ would raise a parse error. 
Also, contrarily to unquoted identifiers and keywords, quoted identifiers are 
case sensitive (@"My Quoted Id"@ is _different_ from @"my quoted id"@). A fully 
lowercase quoted identifier that matches @[a-zA-Z]@@[a-zA-Z0-9_]@@*@ is 
equivalent to the unquoted identifier obtained by removing the double-quote (so 
@"myid"@ is equivalent to @myid@ and to @myId@ but different from @"myId"@). 
Inside a quoted identifier, the double-quote character can be repeated to 
escape it, so @"foo "" bar"@ is a valid identifier.
 
 h3(#constants). Constants
 



[2/3] cassandra git commit: Merge branch 'cassandra-2.1' into cassandra-2.2

2015-06-16 Thread tylerhobbs
Merge branch 'cassandra-2.1' into cassandra-2.2


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

Branch: refs/heads/trunk
Commit: 84136cefde7c70fb5c416cc428c36c66d0391a6d
Parents: 2c9b82d 8934a02
Author: Tyler Hobbs 
Authored: Tue Jun 16 12:32:42 2015 -0500
Committer: Tyler Hobbs 
Committed: Tue Jun 16 12:32:42 2015 -0500

--
 doc/cql3/CQL.textile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/84136cef/doc/cql3/CQL.textile
--



[1/3] cassandra git commit: Fix identifier regex in CQL documentation

2015-06-16 Thread tylerhobbs
Repository: cassandra
Updated Branches:
  refs/heads/trunk 39680ee87 -> 25dca4669


Fix identifier regex in CQL documentation

The regex was correct, but for some reason it wasn't generating the
correct HTML.


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

Branch: refs/heads/trunk
Commit: 8934a0298e3ad249328b6bc3e2e34d22c93fd70e
Parents: 374ef3c
Author: Tyler Hobbs 
Authored: Tue Jun 16 12:31:43 2015 -0500
Committer: Tyler Hobbs 
Committed: Tue Jun 16 12:31:43 2015 -0500

--
 doc/cql3/CQL.textile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/8934a029/doc/cql3/CQL.textile
--
diff --git a/doc/cql3/CQL.textile b/doc/cql3/CQL.textile
index ea0aed6..e3b78b7 100644
--- a/doc/cql3/CQL.textile
+++ b/doc/cql3/CQL.textile
@@ -37,13 +37,13 @@ bc(sample). SELECT sample_usage FROM cql;
 
 h3(#identifiers). Identifiers and keywords
 
-p. The CQL language uses _identifiers_ (or _names_) to identify tables, 
columns and other objects. An identifier is a token matching the regular 
expression @[a-zA-Z][a-zA-Z0-9_]@@*@.
+p. The CQL language uses _identifiers_ (or _names_) to identify tables, 
columns and other objects. An identifier is a token matching the regular 
expression @[a-zA-Z]@@[a-zA-Z0-9_]@@*@.
 
 p. A number of such identifiers, like @SELECT@ or @WITH@, are _keywords_. They 
have a fixed meaning for the language and most are reserved. The list of those 
keywords can be found in "Appendix A":#appendixA.
 
 p. Identifiers and (unquoted) keywords are case insensitive. Thus @SELECT@ is 
the same than @select@ or @sElEcT@, and @myId@ is the same than @myid@ or 
@MYID@ for instance. A convention often used (in particular by the samples of 
this documentation) is to use upper case for keywords and lower case for other 
identifiers.
 
-p. There is a second kind of identifiers called _quoted identifiers_ defined 
by enclosing an arbitrary sequence of characters in double-quotes(@"@). Quoted 
identifiers are never keywords. Thus @"select"@ is not a reserved keyword and 
can be used to refer to a column, while @select@ would raise a parse error. 
Also, contrarily to unquoted identifiers and keywords, quoted identifiers are 
case sensitive (@"My Quoted Id"@ is _different_ from @"my quoted id"@). A fully 
lowercase quoted identifier that matches @[a-zA-Z][a-zA-Z0-9_]@@*@ is 
equivalent to the unquoted identifier obtained by removing the double-quote (so 
@"myid"@ is equivalent to @myid@ and to @myId@ but different from @"myId"@). 
Inside a quoted identifier, the double-quote character can be repeated to 
escape it, so @"foo "" bar"@ is a valid identifier.
+p. There is a second kind of identifiers called _quoted identifiers_ defined 
by enclosing an arbitrary sequence of characters in double-quotes(@"@). Quoted 
identifiers are never keywords. Thus @"select"@ is not a reserved keyword and 
can be used to refer to a column, while @select@ would raise a parse error. 
Also, contrarily to unquoted identifiers and keywords, quoted identifiers are 
case sensitive (@"My Quoted Id"@ is _different_ from @"my quoted id"@). A fully 
lowercase quoted identifier that matches @[a-zA-Z]@@[a-zA-Z0-9_]@@*@ is 
equivalent to the unquoted identifier obtained by removing the double-quote (so 
@"myid"@ is equivalent to @myid@ and to @myId@ but different from @"myId"@). 
Inside a quoted identifier, the double-quote character can be repeated to 
escape it, so @"foo "" bar"@ is a valid identifier.
 
 h3(#constants). Constants
 



[2/2] cassandra git commit: Merge branch 'cassandra-2.1' into cassandra-2.2

2015-06-16 Thread tylerhobbs
Merge branch 'cassandra-2.1' into cassandra-2.2


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

Branch: refs/heads/cassandra-2.2
Commit: 84136cefde7c70fb5c416cc428c36c66d0391a6d
Parents: 2c9b82d 8934a02
Author: Tyler Hobbs 
Authored: Tue Jun 16 12:32:42 2015 -0500
Committer: Tyler Hobbs 
Committed: Tue Jun 16 12:32:42 2015 -0500

--
 doc/cql3/CQL.textile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/84136cef/doc/cql3/CQL.textile
--



cassandra git commit: Fix identifier regex in CQL documentation

2015-06-16 Thread tylerhobbs
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-2.1 374ef3c7a -> 8934a0298


Fix identifier regex in CQL documentation

The regex was correct, but for some reason it wasn't generating the
correct HTML.


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

Branch: refs/heads/cassandra-2.1
Commit: 8934a0298e3ad249328b6bc3e2e34d22c93fd70e
Parents: 374ef3c
Author: Tyler Hobbs 
Authored: Tue Jun 16 12:31:43 2015 -0500
Committer: Tyler Hobbs 
Committed: Tue Jun 16 12:31:43 2015 -0500

--
 doc/cql3/CQL.textile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/8934a029/doc/cql3/CQL.textile
--
diff --git a/doc/cql3/CQL.textile b/doc/cql3/CQL.textile
index ea0aed6..e3b78b7 100644
--- a/doc/cql3/CQL.textile
+++ b/doc/cql3/CQL.textile
@@ -37,13 +37,13 @@ bc(sample). SELECT sample_usage FROM cql;
 
 h3(#identifiers). Identifiers and keywords
 
-p. The CQL language uses _identifiers_ (or _names_) to identify tables, 
columns and other objects. An identifier is a token matching the regular 
expression @[a-zA-Z][a-zA-Z0-9_]@@*@.
+p. The CQL language uses _identifiers_ (or _names_) to identify tables, 
columns and other objects. An identifier is a token matching the regular 
expression @[a-zA-Z]@@[a-zA-Z0-9_]@@*@.
 
 p. A number of such identifiers, like @SELECT@ or @WITH@, are _keywords_. They 
have a fixed meaning for the language and most are reserved. The list of those 
keywords can be found in "Appendix A":#appendixA.
 
 p. Identifiers and (unquoted) keywords are case insensitive. Thus @SELECT@ is 
the same than @select@ or @sElEcT@, and @myId@ is the same than @myid@ or 
@MYID@ for instance. A convention often used (in particular by the samples of 
this documentation) is to use upper case for keywords and lower case for other 
identifiers.
 
-p. There is a second kind of identifiers called _quoted identifiers_ defined 
by enclosing an arbitrary sequence of characters in double-quotes(@"@). Quoted 
identifiers are never keywords. Thus @"select"@ is not a reserved keyword and 
can be used to refer to a column, while @select@ would raise a parse error. 
Also, contrarily to unquoted identifiers and keywords, quoted identifiers are 
case sensitive (@"My Quoted Id"@ is _different_ from @"my quoted id"@). A fully 
lowercase quoted identifier that matches @[a-zA-Z][a-zA-Z0-9_]@@*@ is 
equivalent to the unquoted identifier obtained by removing the double-quote (so 
@"myid"@ is equivalent to @myid@ and to @myId@ but different from @"myId"@). 
Inside a quoted identifier, the double-quote character can be repeated to 
escape it, so @"foo "" bar"@ is a valid identifier.
+p. There is a second kind of identifiers called _quoted identifiers_ defined 
by enclosing an arbitrary sequence of characters in double-quotes(@"@). Quoted 
identifiers are never keywords. Thus @"select"@ is not a reserved keyword and 
can be used to refer to a column, while @select@ would raise a parse error. 
Also, contrarily to unquoted identifiers and keywords, quoted identifiers are 
case sensitive (@"My Quoted Id"@ is _different_ from @"my quoted id"@). A fully 
lowercase quoted identifier that matches @[a-zA-Z]@@[a-zA-Z0-9_]@@*@ is 
equivalent to the unquoted identifier obtained by removing the double-quote (so 
@"myid"@ is equivalent to @myid@ and to @myId@ but different from @"myId"@). 
Inside a quoted identifier, the double-quote character can be repeated to 
escape it, so @"foo "" bar"@ is a valid identifier.
 
 h3(#constants). Constants
 



svn commit: r1685873 - /cassandra/site/publish/doc/cql3/CQL-2.1.html

2015-06-16 Thread tylerhobbs
Author: tylerhobbs
Date: Tue Jun 16 17:25:32 2015
New Revision: 1685873

URL: http://svn.apache.org/r1685873
Log:
Update 2.1 CQL docs to the latest

Modified:
cassandra/site/publish/doc/cql3/CQL-2.1.html

Modified: cassandra/site/publish/doc/cql3/CQL-2.1.html
URL: 
http://svn.apache.org/viewvc/cassandra/site/publish/doc/cql3/CQL-2.1.html?rev=1685873&r1=1685872&r2=1685873&view=diff
==
--- cassandra/site/publish/doc/cql3/CQL-2.1.html (original)
+++ cassandra/site/publish/doc/cql3/CQL-2.1.html Tue Jun 16 17:25:32 2015
@@ -1,4 +1,4 @@
-http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>http://www.w3.org/1999/xhtml";>CQLCassandra Query Language (CQL) 
v3.2.0Cassandra Query Language (CQL) 
v3.2.0CQL 
SyntaxPreambleConventionsIdentifiers and keywordsConstantsCommentsStatementsPrepared StatementData DefinitionCREATE KEYSPACEUSEALTER KEYSPACEDROP KEYSPACECREATE TABLEALTER TABLEDROP TABLETRUNCATECREATE INDEXDROP INDEXCREATE TYPEALTER TYPEDROP TYPECREATE TRIGGERDROP 
TRIGGERData 
ManipulationINSERTUPDATEDELETEBATCHQueriesSELECTData TypesWorking with datesCountersWorking with collectionsFunctionsTokenUuidTimeuu
 id functionsBlob conversion 
functionsAppendix A: CQL 
KeywordsAppendix B: CQL Reserved 
TypesChanges3.2.03.1.73.1.63.1.53.1.43.1.33.1.23.1.13.1.03.0.53.0.43.0.33.0.23.0.1VersioningCQL SyntaxPreambleThis document describes the Cassandra Query 
Language (CQL) version 3. CQL v3 is not backward compatible with CQL v2 and 
differs from it in numerous ways. Note that this document describes the last 
version of the languages. However, the changes section 
provides the diff between the different versions of CQL v3.CQL v3 offers 
a model very close to SQL in the sense that data is put in tables 
containing rows of columns. For that reason, when used in 
this document, these terms (tables, rows and columns) have the same definition 
than they have in SQL. But please note that as such, they do 
not refer to the concept of rows and columns found in the 
internal implementation of Cassandra and in the thrift and CQL v2 API.ConventionsTo aid in specifying the CQL syntax, we 
will use the following conventions in this d
 ocument:Language rules will be given in a http://en.wikipedia.org/wiki/Backus%E2%80%93Naur_Form";>BNF -like 
notation: ::= TERMINAL 
 
+http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>http://www.w3.org/1999/xhtml";>CQLCassandra Query Language (CQL) 
v3.2.0Cassandra Query Language (CQL) 
v3.2.0CQL 
SyntaxPreambleConventionsIdentifiers and keywordsConstantsCommentsStatementsPrepared StatementData DefinitionCREATE KEYSPACEUSEALTER KEYSPACEDROP KEYSPACECREATE TABLEALTER TABLEDROP TABLETRUNCATECREATE INDEXDROP INDEXCREATE TYPEALTER TYPEDROP TYPECREATE TRIGGERDROP 
TRIGGERData 
ManipulationINSERTUPDATEDELETEBATCHQueriesSELECTDatabase UsersCREATE USER ALTER USER DROP USER LIST USERSData ControlPermissions GRANT PERMISSIONREVOKE 
PERMISSIONData TypesWorking with 
datesCountersWorking with collectionsFunctionsTokenUuidTimeuuid functionsBlob conversion functionsAppendix A: CQL KeywordsAppendix B: CQL Reserved TypesChanges3.2.03.1.73.1.6href="CQL.html#a3.1.5">3.1.5href="CQL.html#a3.1.4">3.1.4href="CQL.html#a3.1.3">3.1.3href="CQL.html#a3.1.2">3.1.2href="CQL.html#a3.1.1">3.1.1href="CQL.html#a3.1.0">3.1.0href="CQL.html#a3.0.5">3.0.5href="CQL.html#a3.0.4">3.0.4href="CQL.html#a3.0.3">3.0.3href="CQL.html#a3.0.2">3.0.2href="CQL.html#a3.0.1">3.0.1href="CQL.html#Versioning">Versioningid="CQLSyntax">CQL SyntaxPreambleThis document 
 >describes the Cassandra Query Language (CQL) version 3. CQL v3 is not 
 >backward compatible with CQL v2 and differs from it in numerous ways. Note 
 >that this document describes the last version of the languages. However, the 
 >changes section provides the diff between the diffe
 rent versions of CQL v3.CQL v3 offers a model very close to SQL in the 
sense that data is put in tables containing rows of 
columns. For that reason, when used in this document, these terms 
(tables, rows and columns) have the same definition than they have in SQL. But 
please note that as such, they do not refer to the concept of 
rows and columns found in the internal implementation of Cassandra and in the 
thrift and CQL v2 API.ConventionsTo aid in 
specifying the CQL syntax, we will use the following conventions in this 
document:Language rules will be given in a http://en.wikipedia.org/wiki/Backus%E2%80%93Naur_Form";>BNF -like 
notation: ::= TERMINAL 
 
 Nonterminal symbols will have .As additional shortcut notations to BNF, we’ll 
use traditional regular expression’s symbols (?, 
+ and *) to signify that a given symbol is optional 
and/or can be repeated. We’ll also allow parentheses to group symbols and 
the [] notation to represent any one of 
.The grammar is provided for documentation 
purposes and le

[jira] [Comment Edited] (CASSANDRA-9499) Introduce writeVInt method to DataOutputStreamPlus

2015-06-16 Thread Benedict (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-9499?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14588343#comment-14588343
 ] 

Benedict edited comment on CASSANDRA-9499 at 6/16/15 4:41 PM:
--

When I said little endian, it was a typo. Typically we use big endian, so we 
want any method to assume this. I hadn't noticed that they chose to implement 
it was, effectively, little endian encoding. Which is another reason to switch: 
it's confusing to swap between different types of encoding, and breaks 
assumptions. However, if we wanted to implement this optimisation for the 
current encoding scheme, we would just modify if to a shift left instead of an 
&, followed by a Long.reverseBytes() (nb: admittedly without thinking about it 
too rigorously). If we're going to implement a different encoding scheme, 
though, it's probably better to just do that...

That said, it is a shame we didn't standardise on little endian, given our main 
target platform is little endian. I know Java defaults to big endian, but the 
target platform is more important. That's a much scarier change than modifying 
this, though, so let's not go there. Probably ever. 


was (Author: benedict):
When I said little endian, it was a typo. Typically we use big endian, so we 
want any method to assume this. I hadn't noticed that they chose to implement 
it was, effectively, little endian encoding. Which is another reason to switch: 
it's confusing to swap between different types of encoding, and breaks 
assumptions. However, if we wanted to implement this optimisation for the 
current encoding scheme, we would just modify if to a shift left instead of an 
&, followed by a Long.reverseBytes() (nb: admittedly without thinking about it 
too rigorously)

That said, it is a shame we didn't standardise on little endian, given our main 
target platform is little endian. I know Java defaults to big endian, but the 
target platform is more important. That's a much scarier change than modifying 
this, though, so let's not go there. Probably ever. 

> Introduce writeVInt method to DataOutputStreamPlus
> --
>
> Key: CASSANDRA-9499
> URL: https://issues.apache.org/jira/browse/CASSANDRA-9499
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Core
>Reporter: Benedict
>Assignee: Ariel Weisberg
>Priority: Minor
> Fix For: 3.0 beta 1
>
>
> CASSANDRA-8099 really could do with a writeVInt method, for both fixing 
> CASSANDRA-9498 but also efficiently encoding timestamp/deletion deltas. It 
> should be possible to make an especially efficient implementation against 
> BufferedDataOutputStreamPlus.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CASSANDRA-9499) Introduce writeVInt method to DataOutputStreamPlus

2015-06-16 Thread Benedict (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-9499?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14588343#comment-14588343
 ] 

Benedict commented on CASSANDRA-9499:
-

When I said little endian, it was a typo. Typically we use big endian, so we 
want any method to assume this. I hadn't noticed that they chose to implement 
it was, effectively, little endian encoding. Which is another reason to switch: 
it's confusing to swap between different types of encoding, and breaks 
assumptions. However, if we wanted to implement this optimisation for the 
current encoding scheme, we would just modify if to a shift left instead of an 
&, followed by a Long.reverseBytes() (nb: admittedly without thinking about it 
too rigorously)

That said, it is a shame we didn't standardise on little endian, given our main 
target platform is little endian. I know Java defaults to big endian, but the 
target platform is more important. That's a much scarier change than modifying 
this, though, so let's not go there. Probably ever. 

> Introduce writeVInt method to DataOutputStreamPlus
> --
>
> Key: CASSANDRA-9499
> URL: https://issues.apache.org/jira/browse/CASSANDRA-9499
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Core
>Reporter: Benedict
>Assignee: Ariel Weisberg
>Priority: Minor
> Fix For: 3.0 beta 1
>
>
> CASSANDRA-8099 really could do with a writeVInt method, for both fixing 
> CASSANDRA-9498 but also efficiently encoding timestamp/deletion deltas. It 
> should be possible to make an especially efficient implementation against 
> BufferedDataOutputStreamPlus.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Comment Edited] (CASSANDRA-9499) Introduce writeVInt method to DataOutputStreamPlus

2015-06-16 Thread Ariel Weisberg (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-9499?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14588326#comment-14588326
 ] 

Ariel Weisberg edited comment on CASSANDRA-9499 at 6/16/15 4:29 PM:


I am getting the wrong answer for Integer.MIN_VALUE trying to mask out the long 
that has the 8-byte value. I get -2357198848.

I replaced 
{noformat}
long i = 0;
for (int idx = 0; idx < len; idx++)
{
byte b = buf.get();
i = i << 8;
i = i | (b & 0xFF);
}
{noformat}

with

{noformat}
long i = buf.getLong(buf.position());
i &= (-1L >>> (64 - (len * 8)));
{noformat}

I guess this comes down to the endianess issue. Right now NIODataInputStream 
doesn't handle little endian anything. The buffer is private and there is no 
constructor for providing one nor a method for changing the order of the 
underlying buffer. Is this a dead end, or pick a different implementation 
depending on byte order?




was (Author: aweisberg):
I am getting the wrong answer for Integer.MIN_VALUE trying to mask out the long 
that has the 8-byte value. I get -2357198848.

I replaced 
{noformat}
long i = 0;
for (int idx = 0; idx < len; idx++)
{
byte b = buf.get();
i = i << 8;
i = i | (b & 0xFF);
}
{noformat}

with

{noformat}
long i = buf.getLong(buf.position());
i &= (-1L >>> (64 - (len * 8)));
{noformat}

I guess this comes down to the endianess issue. Right now NIODataInputStream 
doesn't handle little endian anything. The buffer is private and there is no 
constructor for providing one nor a method for changing the order of the 
underlying buffer. Is this a dead end, pick a different implementation 
depending on byte order?



> Introduce writeVInt method to DataOutputStreamPlus
> --
>
> Key: CASSANDRA-9499
> URL: https://issues.apache.org/jira/browse/CASSANDRA-9499
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Core
>Reporter: Benedict
>Assignee: Ariel Weisberg
>Priority: Minor
> Fix For: 3.0 beta 1
>
>
> CASSANDRA-8099 really could do with a writeVInt method, for both fixing 
> CASSANDRA-9498 but also efficiently encoding timestamp/deletion deltas. It 
> should be possible to make an especially efficient implementation against 
> BufferedDataOutputStreamPlus.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CASSANDRA-9499) Introduce writeVInt method to DataOutputStreamPlus

2015-06-16 Thread Ariel Weisberg (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-9499?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14588326#comment-14588326
 ] 

Ariel Weisberg commented on CASSANDRA-9499:
---

I am getting the wrong answer for Integer.MIN_VALUE trying to mask out the long 
that has the 8-byte value. I get -2357198848.

I replaced 
{noformat}
long i = 0;
for (int idx = 0; idx < len; idx++)
{
byte b = buf.get();
i = i << 8;
i = i | (b & 0xFF);
}
{noformat}

with

{noformat}
long i = buf.getLong(buf.position());
i &= (-1L >>> (64 - (len * 8)));
{noformat}

I guess this comes down to the endianess issue. Right now NIODataInputStream 
doesn't handle little endian anything. The buffer is private and there is no 
constructor for providing one nor a method for changing the order of the 
underlying buffer. Is this a dead end, pick a different implementation 
depending on byte order?



> Introduce writeVInt method to DataOutputStreamPlus
> --
>
> Key: CASSANDRA-9499
> URL: https://issues.apache.org/jira/browse/CASSANDRA-9499
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Core
>Reporter: Benedict
>Assignee: Ariel Weisberg
>Priority: Minor
> Fix For: 3.0 beta 1
>
>
> CASSANDRA-8099 really could do with a writeVInt method, for both fixing 
> CASSANDRA-9498 but also efficiently encoding timestamp/deletion deltas. It 
> should be possible to make an especially efficient implementation against 
> BufferedDataOutputStreamPlus.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Resolved] (CASSANDRA-9584) Decommissioning a node on Windows sends the wrong schema change event

2015-06-16 Thread Joshua McKenzie (JIRA)

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

Joshua McKenzie resolved CASSANDRA-9584.

Resolution: Not A Problem

Confirmed that Server 12 pushes the correct TOPOLOGY_CHANGE event, and have 
confirmed offline with [~kishkaru] that this is a CI-environment specific 
failure. Closing as not a problem (as it's not a C* problem)

> Decommissioning a node on Windows sends the wrong schema change event
> -
>
> Key: CASSANDRA-9584
> URL: https://issues.apache.org/jira/browse/CASSANDRA-9584
> Project: Cassandra
>  Issue Type: Bug
> Environment: C* 2.2.0-rc1 | python-driver 2.6.0-rc1 | Windows Server 
> 2012 R2 64-bit
>Reporter: Kishan Karunaratne
>Assignee: Joshua McKenzie
> Fix For: 2.2.x
>
>
> Decommissioning a node on Windows sends the wrong schema change event:
> {noformat}
> cassandra.connection: DEBUG: Message pushed from server: 
>  _args={'change_type': u'DOWN', 'address': ('127.0.0.2', 9042)}, stream_id=-1)>
> {noformat}
> On Linux I get the correct event:
> {noformat}
> cassandra.connection: DEBUG: Message pushed from server: 
>  event_args={'change_type': u'REMOVED_NODE', 'address': ('127.0.0.2', 9042)}, 
> stream_id=-1)>
> {noformat}
> We are using ccmlib node.py.decommission() which calls nodetool decommission:
> {noformat}
> def decommission(self):
> self.nodetool("decommission")
> self.status = Status.DECOMMISIONNED
> self._update_config()
> {noformat}
> Interestingly, it does seem to work (correctly?) on CCM CLI:
> {noformat}
> PS C:\Users\Administrator> ccm status
> Cluster: '2.2'
> --
> node1: UP
> node3: UP
> node2: UP
> PS C:\Users\Administrator> ccm node1 ring
> Starting NodeTool
> Datacenter: datacenter1
> ==
> AddressRackStatus State   LoadOwns
> Token
>   
>   3074457345618258602
> 127.0.0.1  rack1   Up Normal  62.43 KB?   
> -9223372036854775808
> 127.0.0.2  rack1   Up Normal  104.87 KB   ?   
> -3074457345618258603
> 127.0.0.3  rack1   Up Normal  83.67 KB?   
> 3074457345618258602
>   Note: Non-system keyspaces don't have the same replication settings, 
> effective ownership information is meaningless
> PS C:\Users\Administrator> ccm node2 decommission
> PS C:\Users\Administrator> ccm status
> Cluster: '2.2'
> --
> node1: UP
> node3: UP
> node2: DECOMMISIONNED
> PS C:\Users\Administrator> ccm node1 ring
> Starting NodeTool
> Datacenter: datacenter1
> ==
> AddressRackStatus State   LoadOwns
> Token
>   
>   3074457345618258602
> 127.0.0.1  rack1   Up Normal  67.11 KB?   
> -9223372036854775808
> 127.0.0.3  rack1   Up Normal  88.35 KB?   
> 3074457345618258602
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CASSANDRA-9445) Read timeout on the tables where we recreated previously dropped column with different type

2015-06-16 Thread Philip Thompson (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-9445?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14588246#comment-14588246
 ] 

Philip Thompson commented on CASSANDRA-9445:


[~chengren311], I am unable to reproduce this with you schema against 2.0.15. 
Since you encountered the issue on 2.0.4, you might best be served by upgrading 
to the latest 2.0 series release. It is likely the issue you are running into 
has been resolved.

> Read timeout on the tables where we recreated previously dropped column with 
> different type
> ---
>
> Key: CASSANDRA-9445
> URL: https://issues.apache.org/jira/browse/CASSANDRA-9445
> Project: Cassandra
>  Issue Type: Bug
>  Components: Core
>Reporter: Cheng Ren
>
> We had 10%~20% read request timeout on one specific table in our cassandra 
> cluster.
> This happened since we added the column to that table with type of 
> map, ran the pipeline against it adding data and then dropped the 
> column and re-added it as a blob with the same name.  The pipeline run to 
> populate the blob data happened as the problem began.
> The issue got fixed as soon as we dropped the column.
> Any clue why this is happening ? is there any similar issue been reported 
> with this kind of column change?



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[08/10] cassandra git commit: Merge branch 'cassandra-2.1' into cassandra-2.2

2015-06-16 Thread benedict
Merge branch 'cassandra-2.1' into cassandra-2.2

Conflicts:
CHANGES.txt


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

Branch: refs/heads/cassandra-2.2
Commit: 2c9b82d11012895f3c9e983d4f20c1ab0c7c1dfa
Parents: 1fbdba2 374ef3c
Author: Benedict Elliott Smith 
Authored: Tue Jun 16 16:36:34 2015 +0100
Committer: Benedict Elliott Smith 
Committed: Tue Jun 16 16:36:34 2015 +0100

--
 CHANGES.txt |  1 +
 .../apache/cassandra/db/ColumnFamilyStore.java  | 24 
 .../db/compaction/CompactionManager.java|  7 +-
 .../cassandra/service/CassandraDaemon.java  | 20 
 4 files changed, 35 insertions(+), 17 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/2c9b82d1/CHANGES.txt
--
diff --cc CHANGES.txt
index 221a46c,858f13c..6e87beb
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,35 -1,11 +1,36 @@@
 -2.1.7
 -Merged from 2.0
 -2.0.16:
 +2.2
 + * Fix connection leak in CqlRecordWriter (CASSANDRA-9576)
 + * Mlockall before opening system sstables & remove boot_without_jna option 
(CASSANDRA-9573)
 + * Add functions to convert timeuuid to date or time, deprecate dateOf and 
unixTimestampOf (CASSANDRA-9229)
 + * Make sure we cancel non-compacting sstables from LifecycleTransaction 
(CASSANDRA-9566)
 + * Fix deprecated repair JMX API (CASSANDRA-9570)
 +Merged from 2.0:
+  * Periodically submit background compaction tasks (CASSANDRA-9592)
   * Set HAS_MORE_PAGES flag to false when PagingState is null (CASSANDRA-9571)
  
 -
 -2.1.6
 +2.2.0-rc1
 + * Compressed commit log should measure compressed space used (CASSANDRA-9095)
 + * Fix comparison bug in CassandraRoleManager#collectRoles (CASSANDRA-9551)
 + * Add tinyint,smallint,time,date support for UDFs (CASSANDRA-9400)
 + * Deprecates SSTableSimpleWriter and SSTableSimpleUnsortedWriter 
(CASSANDRA-9546)
 + * Empty INITCOND treated as null in aggregate (CASSANDRA-9457)
 + * Remove use of Cell in Thrift MapReduce classes (CASSANDRA-8609)
 + * Integrate pre-release Java Driver 2.2-rc1, custom build (CASSANDRA-9493)
 + * Clean up gossiper logic for old versions (CASSANDRA-9370)
 + * Fix custom payload coding/decoding to match the spec (CASSANDRA-9515)
 + * ant test-all results incomplete when parsed (CASSANDRA-9463)
 + * Disallow frozen<> types in function arguments and return types for
 +   clarity (CASSANDRA-9411)
 + * Static Analysis to warn on unsafe use of Autocloseable instances 
(CASSANDRA-9431)
 + * Update commitlog archiving examples now that commitlog segments are
 +   not recycled (CASSANDRA-9350)
 + * Extend Transactional API to sstable lifecycle management (CASSANDRA-8568)
 + * (cqlsh) Add support for native protocol 4 (CASSANDRA-9399)
 + * Ensure that UDF and UDAs are keyspace-isolated (CASSANDRA-9409)
 + * Revert CASSANDRA-7807 (tracing completion client notifications) 
(CASSANDRA-9429)
 + * Add ability to stop compaction by ID (CASSANDRA-7207)
 + * Let CassandraVersion handle SNAPSHOT version (CASSANDRA-9438)
 +Merged from 2.1:
   * (cqlsh) Fix using COPY through SOURCE or -f (CASSANDRA-9083)
   * Fix occasional lack of `system` keyspace in schema tables (CASSANDRA-8487)
   * Use ProtocolError code instead of ServerError code for native protocol

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

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

http://git-wip-us.apache.org/repos/asf/cassandra/blob/2c9b82d1/src/java/org/apache/cassandra/service/CassandraDaemon.java
--



[02/10] cassandra git commit: Periodically submit background compaction tasks

2015-06-16 Thread benedict
Periodically submit background compaction tasks

patch by benedict; reviewed by yukim for CASSANDRA-9592


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

Branch: refs/heads/cassandra-2.1
Commit: ec52e77ecde749e7c5a483b26cbd8041f2a5a33c
Parents: 80d46b8
Author: Benedict Elliott Smith 
Authored: Tue Jun 16 16:28:52 2015 +0100
Committer: Benedict Elliott Smith 
Committed: Tue Jun 16 16:28:52 2015 +0100

--
 CHANGES.txt |  1 +
 .../apache/cassandra/db/ColumnFamilyStore.java  | 24 
 .../db/compaction/CompactionManager.java|  7 +-
 .../cassandra/service/CassandraDaemon.java  | 19 +++-
 4 files changed, 34 insertions(+), 17 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/ec52e77e/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 7f507c2..6d031f6 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.0.16:
+ * Periodically submit background compaction tasks (CASSANDRA-9592)
  * Set HAS_MORE_PAGES flag to false when PagingState is null (CASSANDRA-9571)
  * Backport indexed value validation fix from CASSANDRA-9057 (CASSANDRA-9564)
  * Don't accumulate more range than necessary in RangeTombstone.Tracker 
(CASSANDRA-9486)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/ec52e77e/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 f81ec82..4fc2f24 100644
--- a/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
+++ b/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
@@ -174,6 +174,30 @@ public class ColumnFamilyStore implements 
ColumnFamilyStoreMBean
 }
 }
 
+public static Runnable getBackgroundCompactionTaskSubmitter()
+{
+return new Runnable()
+{
+public void run()
+{
+List submitted = new ArrayList<>();
+for (Keyspace keyspace : Keyspace.all())
+for (ColumnFamilyStore cfs : 
keyspace.getColumnFamilyStores())
+if (!CompactionManager.instance.submitBackground(cfs, 
false).isEmpty())
+submitted.add(cfs);
+
+while (!submitted.isEmpty() && 
CompactionManager.instance.getActiveCompactions() < 
CompactionManager.instance.getMaximumCompactorThreads())
+{
+List submitMore = 
ImmutableList.copyOf(submitted);
+submitted.clear();
+for (ColumnFamilyStore cfs : submitMore)
+if (!CompactionManager.instance.submitBackground(cfs, 
false).isEmpty())
+submitted.add(cfs);
+}
+}
+};
+}
+
 public void setCompactionStrategyClass(String compactionStrategyClass)
 {
 try

http://git-wip-us.apache.org/repos/asf/cassandra/blob/ec52e77e/src/java/org/apache/cassandra/db/compaction/CompactionManager.java
--
diff --git a/src/java/org/apache/cassandra/db/compaction/CompactionManager.java 
b/src/java/org/apache/cassandra/db/compaction/CompactionManager.java
index 207b90d..c66eeb6 100644
--- a/src/java/org/apache/cassandra/db/compaction/CompactionManager.java
+++ b/src/java/org/apache/cassandra/db/compaction/CompactionManager.java
@@ -128,6 +128,11 @@ public class CompactionManager implements 
CompactionManagerMBean
  */
 public List> submitBackground(final ColumnFamilyStore cfs)
 {
+return submitBackground(cfs, true);
+}
+
+public List> submitBackground(final ColumnFamilyStore cfs, 
boolean autoFill)
+{
 if (cfs.isAutoCompactionDisabled())
 {
 logger.debug("Autocompaction is disabled");
@@ -153,7 +158,7 @@ public class CompactionManager implements 
CompactionManagerMBean
 compactingCF.add(cfs);
 futures.add(executor.submit(new BackgroundCompactionTask(cfs)));
 // if we have room for more compactions, then fill up executor
-} while (executor.getActiveCount() + futures.size() < 
executor.getMaximumPoolSize());
+} while (autoFill && executor.getActiveCount() + futures.size() < 
executor.getMaximumPoolSize());
 
 return futures;
 }

http://git-wip-us.apache.org/repos/asf/cassandra/blob/ec52e77e/src/java/org/apache/cassandra/service/Cassandr

[06/10] cassandra git commit: Merge branch 'cassandra-2.0' into cassandra-2.1

2015-06-16 Thread benedict
Merge branch 'cassandra-2.0' into cassandra-2.1

Conflicts:
CHANGES.txt
src/java/org/apache/cassandra/service/CassandraDaemon.java


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

Branch: refs/heads/cassandra-2.1
Commit: 374ef3c7a7bed81e5ad550649d96f8f9b1a96310
Parents: 83944f8 ec52e77
Author: Benedict Elliott Smith 
Authored: Tue Jun 16 16:33:10 2015 +0100
Committer: Benedict Elliott Smith 
Committed: Tue Jun 16 16:33:10 2015 +0100

--
 CHANGES.txt |  2 ++
 .../apache/cassandra/db/ColumnFamilyStore.java  | 24 
 .../db/compaction/CompactionManager.java|  7 +-
 .../cassandra/service/CassandraDaemon.java  | 20 
 4 files changed, 36 insertions(+), 17 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/374ef3c7/CHANGES.txt
--
diff --cc CHANGES.txt
index 022d868,6d031f6..858f13c
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,49 -1,7 +1,51 @@@
 +2.1.7
 +Merged from 2.0
+ 2.0.16:
+  * Periodically submit background compaction tasks (CASSANDRA-9592)
   * Set HAS_MORE_PAGES flag to false when PagingState is null (CASSANDRA-9571)
 - * Backport indexed value validation fix from CASSANDRA-9057 (CASSANDRA-9564)
 +
 +
 +2.1.6
 + * (cqlsh) Fix using COPY through SOURCE or -f (CASSANDRA-9083)
 + * Fix occasional lack of `system` keyspace in schema tables (CASSANDRA-8487)
 + * Use ProtocolError code instead of ServerError code for native protocol
 +   error responses to unsupported protocol versions (CASSANDRA-9451)
 + * Default commitlog_sync_batch_window_in_ms changed to 2ms (CASSANDRA-9504)
 + * Fix empty partition assertion in unsorted sstable writing tools 
(CASSANDRA-9071)
 + * Ensure truncate without snapshot cannot produce corrupt responses 
(CASSANDRA-9388) 
 + * Consistent error message when a table mixes counter and non-counter
 +   columns (CASSANDRA-9492)
 + * Avoid getting unreadable keys during anticompaction (CASSANDRA-9508)
 + * (cqlsh) Better float precision by default (CASSANDRA-9224)
 + * Improve estimated row count (CASSANDRA-9107)
 + * Optimize range tombstone memory footprint (CASSANDRA-8603)
 + * Use configured gcgs in anticompaction (CASSANDRA-9397)
 + * Warn on misuse of unlogged batches (CASSANDRA-9282)
 + * Failure detector detects and ignores local pauses (CASSANDRA-9183)
 + * Add utility class to support for rate limiting a given log statement 
(CASSANDRA-9029)
 + * Add missing consistency levels to cassandra-stess (CASSANDRA-9361)
 + * Fix commitlog getCompletedTasks to not increment (CASSANDRA-9339)
 + * Fix for harmless exceptions logged as ERROR (CASSANDRA-8564)
 + * Delete processed sstables in sstablesplit/sstableupgrade (CASSANDRA-8606)
 + * Improve sstable exclusion from partition tombstones (CASSANDRA-9298)
 + * Validate the indexed column rather than the cell's contents for 2i 
(CASSANDRA-9057)
 + * Add support for top-k custom 2i queries (CASSANDRA-8717)
 + * Fix error when dropping table during compaction (CASSANDRA-9251)
 + * cassandra-stress supports validation operations over user profiles 
(CASSANDRA-8773)
 + * Add support for rate limiting log messages (CASSANDRA-9029)
 + * Log the partition key with tombstone warnings (CASSANDRA-8561)
 + * Reduce runWithCompactionsDisabled poll interval to 1ms (CASSANDRA-9271)
 + * Fix PITR commitlog replay (CASSANDRA-9195)
 + * GCInspector logs very different times (CASSANDRA-9124)
 + * Fix deleting from an empty list (CASSANDRA-9198)
 + * Update tuple and collection types that use a user-defined type when that 
UDT
 +   is modified (CASSANDRA-9148, CASSANDRA-9192)
 + * Use higher timeout for prepair and snapshot in repair (CASSANDRA-9261)
 + * Fix anticompaction blocking ANTI_ENTROPY stage (CASSANDRA-9151)
 + * Repair waits for anticompaction to finish (CASSANDRA-9097)
 + * Fix streaming not holding ref when stream error (CASSANDRA-9295)
 + * Fix canonical view returning early opened SSTables (CASSANDRA-9396)
 +Merged from 2.0:
   * Don't accumulate more range than necessary in RangeTombstone.Tracker 
(CASSANDRA-9486)
   * Add broadcast and rpc addresses to system.local (CASSANDRA-9436)
   * Always mark sstable suspect when corrupted (CASSANDRA-9478)

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

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

[10/10] cassandra git commit: Merge branch 'cassandra-2.2' into trunk

2015-06-16 Thread benedict
Merge branch 'cassandra-2.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/39680ee8
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/39680ee8
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/39680ee8

Branch: refs/heads/trunk
Commit: 39680ee87522b5ac15d3bde374b79c6a47f8ecc0
Parents: be6cb9d 2c9b82d
Author: Benedict Elliott Smith 
Authored: Tue Jun 16 16:37:10 2015 +0100
Committer: Benedict Elliott Smith 
Committed: Tue Jun 16 16:37:10 2015 +0100

--
 CHANGES.txt |  1 +
 .../apache/cassandra/db/ColumnFamilyStore.java  | 24 
 .../db/compaction/CompactionManager.java|  7 +-
 .../cassandra/service/CassandraDaemon.java  | 20 
 4 files changed, 35 insertions(+), 17 deletions(-)
--


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

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

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

http://git-wip-us.apache.org/repos/asf/cassandra/blob/39680ee8/src/java/org/apache/cassandra/service/CassandraDaemon.java
--



[03/10] cassandra git commit: Periodically submit background compaction tasks

2015-06-16 Thread benedict
Periodically submit background compaction tasks

patch by benedict; reviewed by yukim for CASSANDRA-9592


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

Branch: refs/heads/cassandra-2.2
Commit: ec52e77ecde749e7c5a483b26cbd8041f2a5a33c
Parents: 80d46b8
Author: Benedict Elliott Smith 
Authored: Tue Jun 16 16:28:52 2015 +0100
Committer: Benedict Elliott Smith 
Committed: Tue Jun 16 16:28:52 2015 +0100

--
 CHANGES.txt |  1 +
 .../apache/cassandra/db/ColumnFamilyStore.java  | 24 
 .../db/compaction/CompactionManager.java|  7 +-
 .../cassandra/service/CassandraDaemon.java  | 19 +++-
 4 files changed, 34 insertions(+), 17 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/ec52e77e/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 7f507c2..6d031f6 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.0.16:
+ * Periodically submit background compaction tasks (CASSANDRA-9592)
  * Set HAS_MORE_PAGES flag to false when PagingState is null (CASSANDRA-9571)
  * Backport indexed value validation fix from CASSANDRA-9057 (CASSANDRA-9564)
  * Don't accumulate more range than necessary in RangeTombstone.Tracker 
(CASSANDRA-9486)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/ec52e77e/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 f81ec82..4fc2f24 100644
--- a/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
+++ b/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
@@ -174,6 +174,30 @@ public class ColumnFamilyStore implements 
ColumnFamilyStoreMBean
 }
 }
 
+public static Runnable getBackgroundCompactionTaskSubmitter()
+{
+return new Runnable()
+{
+public void run()
+{
+List submitted = new ArrayList<>();
+for (Keyspace keyspace : Keyspace.all())
+for (ColumnFamilyStore cfs : 
keyspace.getColumnFamilyStores())
+if (!CompactionManager.instance.submitBackground(cfs, 
false).isEmpty())
+submitted.add(cfs);
+
+while (!submitted.isEmpty() && 
CompactionManager.instance.getActiveCompactions() < 
CompactionManager.instance.getMaximumCompactorThreads())
+{
+List submitMore = 
ImmutableList.copyOf(submitted);
+submitted.clear();
+for (ColumnFamilyStore cfs : submitMore)
+if (!CompactionManager.instance.submitBackground(cfs, 
false).isEmpty())
+submitted.add(cfs);
+}
+}
+};
+}
+
 public void setCompactionStrategyClass(String compactionStrategyClass)
 {
 try

http://git-wip-us.apache.org/repos/asf/cassandra/blob/ec52e77e/src/java/org/apache/cassandra/db/compaction/CompactionManager.java
--
diff --git a/src/java/org/apache/cassandra/db/compaction/CompactionManager.java 
b/src/java/org/apache/cassandra/db/compaction/CompactionManager.java
index 207b90d..c66eeb6 100644
--- a/src/java/org/apache/cassandra/db/compaction/CompactionManager.java
+++ b/src/java/org/apache/cassandra/db/compaction/CompactionManager.java
@@ -128,6 +128,11 @@ public class CompactionManager implements 
CompactionManagerMBean
  */
 public List> submitBackground(final ColumnFamilyStore cfs)
 {
+return submitBackground(cfs, true);
+}
+
+public List> submitBackground(final ColumnFamilyStore cfs, 
boolean autoFill)
+{
 if (cfs.isAutoCompactionDisabled())
 {
 logger.debug("Autocompaction is disabled");
@@ -153,7 +158,7 @@ public class CompactionManager implements 
CompactionManagerMBean
 compactingCF.add(cfs);
 futures.add(executor.submit(new BackgroundCompactionTask(cfs)));
 // if we have room for more compactions, then fill up executor
-} while (executor.getActiveCount() + futures.size() < 
executor.getMaximumPoolSize());
+} while (autoFill && executor.getActiveCount() + futures.size() < 
executor.getMaximumPoolSize());
 
 return futures;
 }

http://git-wip-us.apache.org/repos/asf/cassandra/blob/ec52e77e/src/java/org/apache/cassandra/service/Cassandr

[07/10] cassandra git commit: Merge branch 'cassandra-2.0' into cassandra-2.1

2015-06-16 Thread benedict
Merge branch 'cassandra-2.0' into cassandra-2.1

Conflicts:
CHANGES.txt
src/java/org/apache/cassandra/service/CassandraDaemon.java


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

Branch: refs/heads/trunk
Commit: 374ef3c7a7bed81e5ad550649d96f8f9b1a96310
Parents: 83944f8 ec52e77
Author: Benedict Elliott Smith 
Authored: Tue Jun 16 16:33:10 2015 +0100
Committer: Benedict Elliott Smith 
Committed: Tue Jun 16 16:33:10 2015 +0100

--
 CHANGES.txt |  2 ++
 .../apache/cassandra/db/ColumnFamilyStore.java  | 24 
 .../db/compaction/CompactionManager.java|  7 +-
 .../cassandra/service/CassandraDaemon.java  | 20 
 4 files changed, 36 insertions(+), 17 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/374ef3c7/CHANGES.txt
--
diff --cc CHANGES.txt
index 022d868,6d031f6..858f13c
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,49 -1,7 +1,51 @@@
 +2.1.7
 +Merged from 2.0
+ 2.0.16:
+  * Periodically submit background compaction tasks (CASSANDRA-9592)
   * Set HAS_MORE_PAGES flag to false when PagingState is null (CASSANDRA-9571)
 - * Backport indexed value validation fix from CASSANDRA-9057 (CASSANDRA-9564)
 +
 +
 +2.1.6
 + * (cqlsh) Fix using COPY through SOURCE or -f (CASSANDRA-9083)
 + * Fix occasional lack of `system` keyspace in schema tables (CASSANDRA-8487)
 + * Use ProtocolError code instead of ServerError code for native protocol
 +   error responses to unsupported protocol versions (CASSANDRA-9451)
 + * Default commitlog_sync_batch_window_in_ms changed to 2ms (CASSANDRA-9504)
 + * Fix empty partition assertion in unsorted sstable writing tools 
(CASSANDRA-9071)
 + * Ensure truncate without snapshot cannot produce corrupt responses 
(CASSANDRA-9388) 
 + * Consistent error message when a table mixes counter and non-counter
 +   columns (CASSANDRA-9492)
 + * Avoid getting unreadable keys during anticompaction (CASSANDRA-9508)
 + * (cqlsh) Better float precision by default (CASSANDRA-9224)
 + * Improve estimated row count (CASSANDRA-9107)
 + * Optimize range tombstone memory footprint (CASSANDRA-8603)
 + * Use configured gcgs in anticompaction (CASSANDRA-9397)
 + * Warn on misuse of unlogged batches (CASSANDRA-9282)
 + * Failure detector detects and ignores local pauses (CASSANDRA-9183)
 + * Add utility class to support for rate limiting a given log statement 
(CASSANDRA-9029)
 + * Add missing consistency levels to cassandra-stess (CASSANDRA-9361)
 + * Fix commitlog getCompletedTasks to not increment (CASSANDRA-9339)
 + * Fix for harmless exceptions logged as ERROR (CASSANDRA-8564)
 + * Delete processed sstables in sstablesplit/sstableupgrade (CASSANDRA-8606)
 + * Improve sstable exclusion from partition tombstones (CASSANDRA-9298)
 + * Validate the indexed column rather than the cell's contents for 2i 
(CASSANDRA-9057)
 + * Add support for top-k custom 2i queries (CASSANDRA-8717)
 + * Fix error when dropping table during compaction (CASSANDRA-9251)
 + * cassandra-stress supports validation operations over user profiles 
(CASSANDRA-8773)
 + * Add support for rate limiting log messages (CASSANDRA-9029)
 + * Log the partition key with tombstone warnings (CASSANDRA-8561)
 + * Reduce runWithCompactionsDisabled poll interval to 1ms (CASSANDRA-9271)
 + * Fix PITR commitlog replay (CASSANDRA-9195)
 + * GCInspector logs very different times (CASSANDRA-9124)
 + * Fix deleting from an empty list (CASSANDRA-9198)
 + * Update tuple and collection types that use a user-defined type when that 
UDT
 +   is modified (CASSANDRA-9148, CASSANDRA-9192)
 + * Use higher timeout for prepair and snapshot in repair (CASSANDRA-9261)
 + * Fix anticompaction blocking ANTI_ENTROPY stage (CASSANDRA-9151)
 + * Repair waits for anticompaction to finish (CASSANDRA-9097)
 + * Fix streaming not holding ref when stream error (CASSANDRA-9295)
 + * Fix canonical view returning early opened SSTables (CASSANDRA-9396)
 +Merged from 2.0:
   * Don't accumulate more range than necessary in RangeTombstone.Tracker 
(CASSANDRA-9486)
   * Add broadcast and rpc addresses to system.local (CASSANDRA-9436)
   * Always mark sstable suspect when corrupted (CASSANDRA-9478)

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

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

[04/10] cassandra git commit: Periodically submit background compaction tasks

2015-06-16 Thread benedict
Periodically submit background compaction tasks

patch by benedict; reviewed by yukim for CASSANDRA-9592


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

Branch: refs/heads/trunk
Commit: ec52e77ecde749e7c5a483b26cbd8041f2a5a33c
Parents: 80d46b8
Author: Benedict Elliott Smith 
Authored: Tue Jun 16 16:28:52 2015 +0100
Committer: Benedict Elliott Smith 
Committed: Tue Jun 16 16:28:52 2015 +0100

--
 CHANGES.txt |  1 +
 .../apache/cassandra/db/ColumnFamilyStore.java  | 24 
 .../db/compaction/CompactionManager.java|  7 +-
 .../cassandra/service/CassandraDaemon.java  | 19 +++-
 4 files changed, 34 insertions(+), 17 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/ec52e77e/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 7f507c2..6d031f6 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.0.16:
+ * Periodically submit background compaction tasks (CASSANDRA-9592)
  * Set HAS_MORE_PAGES flag to false when PagingState is null (CASSANDRA-9571)
  * Backport indexed value validation fix from CASSANDRA-9057 (CASSANDRA-9564)
  * Don't accumulate more range than necessary in RangeTombstone.Tracker 
(CASSANDRA-9486)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/ec52e77e/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 f81ec82..4fc2f24 100644
--- a/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
+++ b/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
@@ -174,6 +174,30 @@ public class ColumnFamilyStore implements 
ColumnFamilyStoreMBean
 }
 }
 
+public static Runnable getBackgroundCompactionTaskSubmitter()
+{
+return new Runnable()
+{
+public void run()
+{
+List submitted = new ArrayList<>();
+for (Keyspace keyspace : Keyspace.all())
+for (ColumnFamilyStore cfs : 
keyspace.getColumnFamilyStores())
+if (!CompactionManager.instance.submitBackground(cfs, 
false).isEmpty())
+submitted.add(cfs);
+
+while (!submitted.isEmpty() && 
CompactionManager.instance.getActiveCompactions() < 
CompactionManager.instance.getMaximumCompactorThreads())
+{
+List submitMore = 
ImmutableList.copyOf(submitted);
+submitted.clear();
+for (ColumnFamilyStore cfs : submitMore)
+if (!CompactionManager.instance.submitBackground(cfs, 
false).isEmpty())
+submitted.add(cfs);
+}
+}
+};
+}
+
 public void setCompactionStrategyClass(String compactionStrategyClass)
 {
 try

http://git-wip-us.apache.org/repos/asf/cassandra/blob/ec52e77e/src/java/org/apache/cassandra/db/compaction/CompactionManager.java
--
diff --git a/src/java/org/apache/cassandra/db/compaction/CompactionManager.java 
b/src/java/org/apache/cassandra/db/compaction/CompactionManager.java
index 207b90d..c66eeb6 100644
--- a/src/java/org/apache/cassandra/db/compaction/CompactionManager.java
+++ b/src/java/org/apache/cassandra/db/compaction/CompactionManager.java
@@ -128,6 +128,11 @@ public class CompactionManager implements 
CompactionManagerMBean
  */
 public List> submitBackground(final ColumnFamilyStore cfs)
 {
+return submitBackground(cfs, true);
+}
+
+public List> submitBackground(final ColumnFamilyStore cfs, 
boolean autoFill)
+{
 if (cfs.isAutoCompactionDisabled())
 {
 logger.debug("Autocompaction is disabled");
@@ -153,7 +158,7 @@ public class CompactionManager implements 
CompactionManagerMBean
 compactingCF.add(cfs);
 futures.add(executor.submit(new BackgroundCompactionTask(cfs)));
 // if we have room for more compactions, then fill up executor
-} while (executor.getActiveCount() + futures.size() < 
executor.getMaximumPoolSize());
+} while (autoFill && executor.getActiveCount() + futures.size() < 
executor.getMaximumPoolSize());
 
 return futures;
 }

http://git-wip-us.apache.org/repos/asf/cassandra/blob/ec52e77e/src/java/org/apache/cassandra/service/CassandraDaemon.

[09/10] cassandra git commit: Merge branch 'cassandra-2.1' into cassandra-2.2

2015-06-16 Thread benedict
Merge branch 'cassandra-2.1' into cassandra-2.2

Conflicts:
CHANGES.txt


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

Branch: refs/heads/trunk
Commit: 2c9b82d11012895f3c9e983d4f20c1ab0c7c1dfa
Parents: 1fbdba2 374ef3c
Author: Benedict Elliott Smith 
Authored: Tue Jun 16 16:36:34 2015 +0100
Committer: Benedict Elliott Smith 
Committed: Tue Jun 16 16:36:34 2015 +0100

--
 CHANGES.txt |  1 +
 .../apache/cassandra/db/ColumnFamilyStore.java  | 24 
 .../db/compaction/CompactionManager.java|  7 +-
 .../cassandra/service/CassandraDaemon.java  | 20 
 4 files changed, 35 insertions(+), 17 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/2c9b82d1/CHANGES.txt
--
diff --cc CHANGES.txt
index 221a46c,858f13c..6e87beb
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,35 -1,11 +1,36 @@@
 -2.1.7
 -Merged from 2.0
 -2.0.16:
 +2.2
 + * Fix connection leak in CqlRecordWriter (CASSANDRA-9576)
 + * Mlockall before opening system sstables & remove boot_without_jna option 
(CASSANDRA-9573)
 + * Add functions to convert timeuuid to date or time, deprecate dateOf and 
unixTimestampOf (CASSANDRA-9229)
 + * Make sure we cancel non-compacting sstables from LifecycleTransaction 
(CASSANDRA-9566)
 + * Fix deprecated repair JMX API (CASSANDRA-9570)
 +Merged from 2.0:
+  * Periodically submit background compaction tasks (CASSANDRA-9592)
   * Set HAS_MORE_PAGES flag to false when PagingState is null (CASSANDRA-9571)
  
 -
 -2.1.6
 +2.2.0-rc1
 + * Compressed commit log should measure compressed space used (CASSANDRA-9095)
 + * Fix comparison bug in CassandraRoleManager#collectRoles (CASSANDRA-9551)
 + * Add tinyint,smallint,time,date support for UDFs (CASSANDRA-9400)
 + * Deprecates SSTableSimpleWriter and SSTableSimpleUnsortedWriter 
(CASSANDRA-9546)
 + * Empty INITCOND treated as null in aggregate (CASSANDRA-9457)
 + * Remove use of Cell in Thrift MapReduce classes (CASSANDRA-8609)
 + * Integrate pre-release Java Driver 2.2-rc1, custom build (CASSANDRA-9493)
 + * Clean up gossiper logic for old versions (CASSANDRA-9370)
 + * Fix custom payload coding/decoding to match the spec (CASSANDRA-9515)
 + * ant test-all results incomplete when parsed (CASSANDRA-9463)
 + * Disallow frozen<> types in function arguments and return types for
 +   clarity (CASSANDRA-9411)
 + * Static Analysis to warn on unsafe use of Autocloseable instances 
(CASSANDRA-9431)
 + * Update commitlog archiving examples now that commitlog segments are
 +   not recycled (CASSANDRA-9350)
 + * Extend Transactional API to sstable lifecycle management (CASSANDRA-8568)
 + * (cqlsh) Add support for native protocol 4 (CASSANDRA-9399)
 + * Ensure that UDF and UDAs are keyspace-isolated (CASSANDRA-9409)
 + * Revert CASSANDRA-7807 (tracing completion client notifications) 
(CASSANDRA-9429)
 + * Add ability to stop compaction by ID (CASSANDRA-7207)
 + * Let CassandraVersion handle SNAPSHOT version (CASSANDRA-9438)
 +Merged from 2.1:
   * (cqlsh) Fix using COPY through SOURCE or -f (CASSANDRA-9083)
   * Fix occasional lack of `system` keyspace in schema tables (CASSANDRA-8487)
   * Use ProtocolError code instead of ServerError code for native protocol

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

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

http://git-wip-us.apache.org/repos/asf/cassandra/blob/2c9b82d1/src/java/org/apache/cassandra/service/CassandraDaemon.java
--



[01/10] cassandra git commit: Periodically submit background compaction tasks

2015-06-16 Thread benedict
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-2.0 80d46b8ac -> ec52e77ec
  refs/heads/cassandra-2.1 83944f82b -> 374ef3c7a
  refs/heads/cassandra-2.2 1fbdba2c4 -> 2c9b82d11
  refs/heads/trunk be6cb9d97 -> 39680ee87


Periodically submit background compaction tasks

patch by benedict; reviewed by yukim for CASSANDRA-9592


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

Branch: refs/heads/cassandra-2.0
Commit: ec52e77ecde749e7c5a483b26cbd8041f2a5a33c
Parents: 80d46b8
Author: Benedict Elliott Smith 
Authored: Tue Jun 16 16:28:52 2015 +0100
Committer: Benedict Elliott Smith 
Committed: Tue Jun 16 16:28:52 2015 +0100

--
 CHANGES.txt |  1 +
 .../apache/cassandra/db/ColumnFamilyStore.java  | 24 
 .../db/compaction/CompactionManager.java|  7 +-
 .../cassandra/service/CassandraDaemon.java  | 19 +++-
 4 files changed, 34 insertions(+), 17 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/ec52e77e/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 7f507c2..6d031f6 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.0.16:
+ * Periodically submit background compaction tasks (CASSANDRA-9592)
  * Set HAS_MORE_PAGES flag to false when PagingState is null (CASSANDRA-9571)
  * Backport indexed value validation fix from CASSANDRA-9057 (CASSANDRA-9564)
  * Don't accumulate more range than necessary in RangeTombstone.Tracker 
(CASSANDRA-9486)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/ec52e77e/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 f81ec82..4fc2f24 100644
--- a/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
+++ b/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
@@ -174,6 +174,30 @@ public class ColumnFamilyStore implements 
ColumnFamilyStoreMBean
 }
 }
 
+public static Runnable getBackgroundCompactionTaskSubmitter()
+{
+return new Runnable()
+{
+public void run()
+{
+List submitted = new ArrayList<>();
+for (Keyspace keyspace : Keyspace.all())
+for (ColumnFamilyStore cfs : 
keyspace.getColumnFamilyStores())
+if (!CompactionManager.instance.submitBackground(cfs, 
false).isEmpty())
+submitted.add(cfs);
+
+while (!submitted.isEmpty() && 
CompactionManager.instance.getActiveCompactions() < 
CompactionManager.instance.getMaximumCompactorThreads())
+{
+List submitMore = 
ImmutableList.copyOf(submitted);
+submitted.clear();
+for (ColumnFamilyStore cfs : submitMore)
+if (!CompactionManager.instance.submitBackground(cfs, 
false).isEmpty())
+submitted.add(cfs);
+}
+}
+};
+}
+
 public void setCompactionStrategyClass(String compactionStrategyClass)
 {
 try

http://git-wip-us.apache.org/repos/asf/cassandra/blob/ec52e77e/src/java/org/apache/cassandra/db/compaction/CompactionManager.java
--
diff --git a/src/java/org/apache/cassandra/db/compaction/CompactionManager.java 
b/src/java/org/apache/cassandra/db/compaction/CompactionManager.java
index 207b90d..c66eeb6 100644
--- a/src/java/org/apache/cassandra/db/compaction/CompactionManager.java
+++ b/src/java/org/apache/cassandra/db/compaction/CompactionManager.java
@@ -128,6 +128,11 @@ public class CompactionManager implements 
CompactionManagerMBean
  */
 public List> submitBackground(final ColumnFamilyStore cfs)
 {
+return submitBackground(cfs, true);
+}
+
+public List> submitBackground(final ColumnFamilyStore cfs, 
boolean autoFill)
+{
 if (cfs.isAutoCompactionDisabled())
 {
 logger.debug("Autocompaction is disabled");
@@ -153,7 +158,7 @@ public class CompactionManager implements 
CompactionManagerMBean
 compactingCF.add(cfs);
 futures.add(executor.submit(new BackgroundCompactionTask(cfs)));
 // if we have room for more compactions, then fill up executor
-} while (executor.getActiveCount() + futures.size() < 
executor.getMaximumPoolSize());
+} while (

[05/10] cassandra git commit: Merge branch 'cassandra-2.0' into cassandra-2.1

2015-06-16 Thread benedict
Merge branch 'cassandra-2.0' into cassandra-2.1

Conflicts:
CHANGES.txt
src/java/org/apache/cassandra/service/CassandraDaemon.java


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

Branch: refs/heads/cassandra-2.2
Commit: 374ef3c7a7bed81e5ad550649d96f8f9b1a96310
Parents: 83944f8 ec52e77
Author: Benedict Elliott Smith 
Authored: Tue Jun 16 16:33:10 2015 +0100
Committer: Benedict Elliott Smith 
Committed: Tue Jun 16 16:33:10 2015 +0100

--
 CHANGES.txt |  2 ++
 .../apache/cassandra/db/ColumnFamilyStore.java  | 24 
 .../db/compaction/CompactionManager.java|  7 +-
 .../cassandra/service/CassandraDaemon.java  | 20 
 4 files changed, 36 insertions(+), 17 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/374ef3c7/CHANGES.txt
--
diff --cc CHANGES.txt
index 022d868,6d031f6..858f13c
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,49 -1,7 +1,51 @@@
 +2.1.7
 +Merged from 2.0
+ 2.0.16:
+  * Periodically submit background compaction tasks (CASSANDRA-9592)
   * Set HAS_MORE_PAGES flag to false when PagingState is null (CASSANDRA-9571)
 - * Backport indexed value validation fix from CASSANDRA-9057 (CASSANDRA-9564)
 +
 +
 +2.1.6
 + * (cqlsh) Fix using COPY through SOURCE or -f (CASSANDRA-9083)
 + * Fix occasional lack of `system` keyspace in schema tables (CASSANDRA-8487)
 + * Use ProtocolError code instead of ServerError code for native protocol
 +   error responses to unsupported protocol versions (CASSANDRA-9451)
 + * Default commitlog_sync_batch_window_in_ms changed to 2ms (CASSANDRA-9504)
 + * Fix empty partition assertion in unsorted sstable writing tools 
(CASSANDRA-9071)
 + * Ensure truncate without snapshot cannot produce corrupt responses 
(CASSANDRA-9388) 
 + * Consistent error message when a table mixes counter and non-counter
 +   columns (CASSANDRA-9492)
 + * Avoid getting unreadable keys during anticompaction (CASSANDRA-9508)
 + * (cqlsh) Better float precision by default (CASSANDRA-9224)
 + * Improve estimated row count (CASSANDRA-9107)
 + * Optimize range tombstone memory footprint (CASSANDRA-8603)
 + * Use configured gcgs in anticompaction (CASSANDRA-9397)
 + * Warn on misuse of unlogged batches (CASSANDRA-9282)
 + * Failure detector detects and ignores local pauses (CASSANDRA-9183)
 + * Add utility class to support for rate limiting a given log statement 
(CASSANDRA-9029)
 + * Add missing consistency levels to cassandra-stess (CASSANDRA-9361)
 + * Fix commitlog getCompletedTasks to not increment (CASSANDRA-9339)
 + * Fix for harmless exceptions logged as ERROR (CASSANDRA-8564)
 + * Delete processed sstables in sstablesplit/sstableupgrade (CASSANDRA-8606)
 + * Improve sstable exclusion from partition tombstones (CASSANDRA-9298)
 + * Validate the indexed column rather than the cell's contents for 2i 
(CASSANDRA-9057)
 + * Add support for top-k custom 2i queries (CASSANDRA-8717)
 + * Fix error when dropping table during compaction (CASSANDRA-9251)
 + * cassandra-stress supports validation operations over user profiles 
(CASSANDRA-8773)
 + * Add support for rate limiting log messages (CASSANDRA-9029)
 + * Log the partition key with tombstone warnings (CASSANDRA-8561)
 + * Reduce runWithCompactionsDisabled poll interval to 1ms (CASSANDRA-9271)
 + * Fix PITR commitlog replay (CASSANDRA-9195)
 + * GCInspector logs very different times (CASSANDRA-9124)
 + * Fix deleting from an empty list (CASSANDRA-9198)
 + * Update tuple and collection types that use a user-defined type when that 
UDT
 +   is modified (CASSANDRA-9148, CASSANDRA-9192)
 + * Use higher timeout for prepair and snapshot in repair (CASSANDRA-9261)
 + * Fix anticompaction blocking ANTI_ENTROPY stage (CASSANDRA-9151)
 + * Repair waits for anticompaction to finish (CASSANDRA-9097)
 + * Fix streaming not holding ref when stream error (CASSANDRA-9295)
 + * Fix canonical view returning early opened SSTables (CASSANDRA-9396)
 +Merged from 2.0:
   * Don't accumulate more range than necessary in RangeTombstone.Tracker 
(CASSANDRA-9486)
   * Add broadcast and rpc addresses to system.local (CASSANDRA-9436)
   * Always mark sstable suspect when corrupted (CASSANDRA-9478)

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

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

[jira] [Commented] (CASSANDRA-9378) Instrument the logger with error count metrics by level

2015-06-16 Thread Jeremiah Jordan (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-9378?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14588236#comment-14588236
 ] 

Jeremiah Jordan commented on CASSANDRA-9378:


I think we should probably make the appender name in the logback.xml 
"LockbackMetrics" or something not just "Logback".  Otherwise +1 a Logback 
metric shows up in JMX.

> Instrument the logger with error count metrics by level
> ---
>
> Key: CASSANDRA-9378
> URL: https://issues.apache.org/jira/browse/CASSANDRA-9378
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Core, Tools
>Reporter: Jonathan Shook
>Assignee: Yuki Morishita
>Priority: Minor
> Fix For: 2.2.x
>
>
> The ability to do sanity checks against logged errors and warning counts 
> could be helpful for several reasons. One of the most obvious would be as a 
> way to verify that no errors were logged during a (semi-) automated upgrade 
> or restart process.
> Fortunately, this is easy to enable as described here: 
> https://dropwizard.github.io/metrics/3.1.0/manual/logback/
> It was pointed out by [~jjordan] that this ability should exist in current 
> version if the user is willing to drop in the right jars and modify the 
> appender config.
> It would also be helpful as a programmatic feature with a toggle to enable or 
> disable, possibly with a cassandra.yaml config parameter. There may be some 
> users who would prefer to disable it to avoid calling another appender. If 
> testing shows the overhead for this to be sufficiently low, we could just 
> leave it on by default.
> These should be exposed via JMX when they are enabled.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Resolved] (CASSANDRA-7473) Dtest: Windows-specific failure: sc_with_row_cache_test (super_column_cache_test.TestSCCache)

2015-06-16 Thread Philip Thompson (JIRA)

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

Philip Thompson resolved CASSANDRA-7473.

Resolution: Fixed

Tyler fixed this incidentally as part of other work on dtests. The test has 
been moved over to thrift instead of the CLI

> Dtest: Windows-specific failure: sc_with_row_cache_test 
> (super_column_cache_test.TestSCCache)
> -
>
> Key: CASSANDRA-7473
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7473
> Project: Cassandra
>  Issue Type: Bug
>  Components: Tests
> Environment: win7x64 SP1, Cassandra 3.0 / trunk
>Reporter: Joshua McKenzie
>Assignee: Philip Thompson
>Priority: Minor
>  Labels: Windows
>
> Windows-specific dtest failure:
> {code:title=failure message}
> ==
> FAIL: sc_with_row_cache_test (super_column_cache_test.TestSCCache)
> --
> Traceback (most recent call last):
>   File "C:\src\cassandra-dtest\super_column_cache_test.py", line 44, in 
> sc_with_row_cache_test
> assert_columns(cli, ['name'])
>   File "C:\src\cassandra-dtest\super_column_cache_test.py", line 10, in 
> assert_columns
> assert not cli.has_errors(), cli.errors()
> AssertionError: 'org.apache.thrift.transport.TTransportException: 
> java.net.ConnectException: Connection refused: connect\r\n\tat 
> org.apache.thrift.transport.TSocket.open(TSocket.java:185)\r\n\tat 
> org.apache.thrift.transport.TFramedTransport.open(TFramedTransport.java:81)\r\n\tat
>  
> org.apache.cassandra.thrift.TFramedTransportFactory.openTransport(TFramedTransportFactory.java:41)\r\n\tat
>  org.apache.cassandra.cli.CliMain.connect(CliMain.java:65)\r\n\tat 
> org.apache.cassandra.cli.CliMain.main(CliMain.java:237)\r\nCaused by: 
> java.net.ConnectException: Connection refused: connect\r\n\tat 
> java.net.DualStackPlainSocketImpl.connect0(Native Method)\r\n\tat 
> java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:79)\r\n\tat
>  
> java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)\r\n\tat
>  
> java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200)\r\n\tat
>  
> java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)\r\n\tat
>  java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172)\r\n\tat 
> java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)\r\n\tat 
> java.net.Socket.connect(Socket.java:579)\r\n\tat 
> org.apache.thrift.transport.TSocket.open(TSocket.java:180)\r\n\t... 4 
> more\r\nException connecting to 127.0.0.1/9160. Reason: Connection refused: 
> connect.\r\n'
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Comment Edited] (CASSANDRA-9499) Introduce writeVInt method to DataOutputStreamPlus

2015-06-16 Thread Ariel Weisberg (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-9499?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14588212#comment-14588212
 ] 

Ariel Weisberg edited comment on CASSANDRA-9499 at 6/16/15 3:29 PM:


Another question, how do we know all the ByteBuffers are little endian? Is that 
the case right now? I that the DataOutput/Input are big endian?

Just saw your response. If we aren't going to shoot for it then endian won't be 
an obstacle.


was (Author: aweisberg):
Another question, how do we know all the ByteBuffers are little endian? Is that 
the case right now? I that the DataOutput/Input are big endian?

> Introduce writeVInt method to DataOutputStreamPlus
> --
>
> Key: CASSANDRA-9499
> URL: https://issues.apache.org/jira/browse/CASSANDRA-9499
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Core
>Reporter: Benedict
>Assignee: Ariel Weisberg
>Priority: Minor
> Fix For: 3.0 beta 1
>
>
> CASSANDRA-8099 really could do with a writeVInt method, for both fixing 
> CASSANDRA-9498 but also efficiently encoding timestamp/deletion deltas. It 
> should be possible to make an especially efficient implementation against 
> BufferedDataOutputStreamPlus.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CASSANDRA-9499) Introduce writeVInt method to DataOutputStreamPlus

2015-06-16 Thread Ariel Weisberg (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-9499?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14588212#comment-14588212
 ] 

Ariel Weisberg commented on CASSANDRA-9499:
---

Another question, how do we know all the ByteBuffers are little endian? Is that 
the case right now? I that the DataOutput/Input are big endian?

> Introduce writeVInt method to DataOutputStreamPlus
> --
>
> Key: CASSANDRA-9499
> URL: https://issues.apache.org/jira/browse/CASSANDRA-9499
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Core
>Reporter: Benedict
>Assignee: Ariel Weisberg
>Priority: Minor
> Fix For: 3.0 beta 1
>
>
> CASSANDRA-8099 really could do with a writeVInt method, for both fixing 
> CASSANDRA-9498 but also efficiently encoding timestamp/deletion deltas. It 
> should be possible to make an especially efficient implementation against 
> BufferedDataOutputStreamPlus.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CASSANDRA-9499) Introduce writeVInt method to DataOutputStreamPlus

2015-06-16 Thread Benedict (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-9499?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14588210#comment-14588210
 ] 

Benedict commented on CASSANDRA-9499:
-

bq. Are we going to shoot for a different encoding?

I think so, but it's still up for discussion.

bq. There is no guarantee I can get extra space in the buffer for the writer to 
perform a putLong. Some implementations will not resize the buffer.

Ah. CommitLog. Yes, that is annoying, and pretty much nothing can be done about 
it, other than padding the space we allocate for the CL record (which wouldn't 
actually be dreadful). OK, nevermind. Forget both optimisations (the read is a 
little ugly, and if we mostly expect small values, it's of dubious benefit). We 
can revisit at a later date.

> Introduce writeVInt method to DataOutputStreamPlus
> --
>
> Key: CASSANDRA-9499
> URL: https://issues.apache.org/jira/browse/CASSANDRA-9499
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Core
>Reporter: Benedict
>Assignee: Ariel Weisberg
>Priority: Minor
> Fix For: 3.0 beta 1
>
>
> CASSANDRA-8099 really could do with a writeVInt method, for both fixing 
> CASSANDRA-9498 but also efficiently encoding timestamp/deletion deltas. It 
> should be possible to make an especially efficient implementation against 
> BufferedDataOutputStreamPlus.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (CASSANDRA-8724) Move PigTestBase to Java Driver

2015-06-16 Thread Philip Thompson (JIRA)

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

Philip Thompson updated CASSANDRA-8724:
---
Fix Version/s: (was: 2.2.0 rc1)
   3.0 beta 1

> Move PigTestBase to Java Driver
> ---
>
> Key: CASSANDRA-8724
> URL: https://issues.apache.org/jira/browse/CASSANDRA-8724
> Project: Cassandra
>  Issue Type: Test
>  Components: Hadoop, Tests
>Reporter: Philip Thompson
>Assignee: Philip Thompson
> Fix For: 3.0 beta 1
>
>
> The initial CQL statements for the pig tests are sent via thrift in 
> PigTestBase. This should be modified to use the java driver. See 
> CASSANDRA-8358.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Resolved] (CASSANDRA-8724) Move PigTestBase to Java Driver

2015-06-16 Thread Philip Thompson (JIRA)

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

Philip Thompson resolved CASSANDRA-8724.

   Resolution: Fixed
Fix Version/s: (was: 3.x)
   2.2.0 rc1

This was completed within CASSANDRA-9353.

> Move PigTestBase to Java Driver
> ---
>
> Key: CASSANDRA-8724
> URL: https://issues.apache.org/jira/browse/CASSANDRA-8724
> Project: Cassandra
>  Issue Type: Test
>  Components: Hadoop, Tests
>Reporter: Philip Thompson
>Assignee: Philip Thompson
> Fix For: 2.2.0 rc1
>
>
> The initial CQL statements for the pig tests are sent via thrift in 
> PigTestBase. This should be modified to use the java driver. See 
> CASSANDRA-8358.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CASSANDRA-9499) Introduce writeVInt method to DataOutputStreamPlus

2015-06-16 Thread Ariel Weisberg (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-9499?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14588175#comment-14588175
 ] 

Ariel Weisberg commented on CASSANDRA-9499:
---

There is no guarantee I can get extra space in the buffer for the writer to 
perform a putLong. Some implementations will not resize the buffer. If I ask 
for the extra space it could throw an exception.

For the reader I could write enough code to make it happen. I'll give it a shot 
now.

Are we going to shoot for a different encoding?

> Introduce writeVInt method to DataOutputStreamPlus
> --
>
> Key: CASSANDRA-9499
> URL: https://issues.apache.org/jira/browse/CASSANDRA-9499
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Core
>Reporter: Benedict
>Assignee: Ariel Weisberg
>Priority: Minor
> Fix For: 3.0 beta 1
>
>
> CASSANDRA-8099 really could do with a writeVInt method, for both fixing 
> CASSANDRA-9498 but also efficiently encoding timestamp/deletion deltas. It 
> should be possible to make an especially efficient implementation against 
> BufferedDataOutputStreamPlus.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (CASSANDRA-9601) Allow an initial connection timeout to be set in cqlsh

2015-06-16 Thread Philip Thompson (JIRA)

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

Philip Thompson updated CASSANDRA-9601:
---
Assignee: Stefania
  Labels: cqlsh  (was: )

> Allow an initial connection timeout to be set in cqlsh
> --
>
> Key: CASSANDRA-9601
> URL: https://issues.apache.org/jira/browse/CASSANDRA-9601
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Core
>Reporter: Mike Adamson
>Assignee: Stefania
>  Labels: cqlsh
> Fix For: 2.2.0 rc2
>
>
> [PYTHON-206|https://datastax-oss.atlassian.net/browse/PYTHON-206] introduced 
> the ability to change the initial connection timeout on connections from the 
> default of 5s.
> This change was introduced because some auth providers (kerberos) can take 
> longer than 5s to complete a first time negotiation for a connection. 
> cqlsh should allow this setting to be changed. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CASSANDRA-9592) `Periodically attempt to submit background compaction tasks

2015-06-16 Thread Yuki Morishita (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-9592?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14588167#comment-14588167
 ] 

Yuki Morishita commented on CASSANDRA-9592:
---

+1 for both 2.0 and 2.1.

> `Periodically attempt to submit background compaction tasks
> ---
>
> Key: CASSANDRA-9592
> URL: https://issues.apache.org/jira/browse/CASSANDRA-9592
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Core
>Reporter: Benedict
>Assignee: Benedict
>Priority: Trivial
> Fix For: 2.1.x
>
>
> There's more race conditions affecting compaction task submission than 
> CASSANDRA-7745, so to prevent some of these problems stalling compactions, I 
> propose simply submitting background compactions once every minute, if 
> possible. This will typically be a no-op, but there's no harm in that, since 
> it's very cheap to do.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CASSANDRA-9459) SecondaryIndex API redesign

2015-06-16 Thread Bryn Cooke (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-9459?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14588157#comment-14588157
 ] 

Bryn Cooke commented on CASSANDRA-9459:
---

It would be great if we could use CQL inside our custom secondary index 
implementations as it would vastly increase the readability of our code rather 
than generating slice queries manually. It's almost possible in Cassandra 2.x, 
but I forget the exact reason it didn't work. Something about the table meta 
data not being available during CQL validation.


> SecondaryIndex API redesign
> ---
>
> Key: CASSANDRA-9459
> URL: https://issues.apache.org/jira/browse/CASSANDRA-9459
> Project: Cassandra
>  Issue Type: Improvement
>Reporter: Sam Tunnicliffe
>Assignee: Sam Tunnicliffe
> Fix For: 3.0 beta 1
>
>
> For some time now the index subsystem has been a pain point and in large part 
> this is due to the way that the APIs and principal classes have grown 
> organically over the years. It would be a good idea to conduct a wholesale 
> review of the area and see if we can come up with something a bit more 
> coherent.
> A few starting points:
> * There's a lot in AbstractPerColumnSecondaryIndex & its subclasses which 
> could be pulled up into SecondaryIndexSearcher (note that to an extent, this 
> is done in CASSANDRA-8099).
> * SecondayIndexManager is overly complex and several of its functions should 
> be simplified/re-examined. The handling of which columns are indexed and 
> index selection on both the read and write paths are somewhat dense and 
> unintuitive.
> * The SecondaryIndex class hierarchy is rather convoluted and could use some 
> serious rework.
> There are a number of outstanding tickets which we should be able to roll 
> into this higher level one as subtasks (but I'll defer doing that until 
> getting into the details of the redesign):
> * CASSANDRA-7771
> * CASSANDRA-8103
> * CASSANDRA-9041
> * CASSANDRA-4458
> * CASSANDRA-8505
> Whilst they're not hard dependencies, I propose that this be done on top of 
> both CASSANDRA-8099 and CASSANDRA-6717. The former largely because the 
> storage engine changes may facilitate a friendlier index API, but also 
> because of the changes to SIS mentioned above. As for 6717, the changes to 
> schema tables there will help facilitate CASSANDRA-7771.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (CASSANDRA-9603) Expose private listen_address in system.local

2015-06-16 Thread JIRA

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

Piotr Kołaczkowski updated CASSANDRA-9603:
--
Fix Version/s: 2.1.7

> Expose private listen_address in system.local
> -
>
> Key: CASSANDRA-9603
> URL: https://issues.apache.org/jira/browse/CASSANDRA-9603
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Core
>Reporter: Piotr Kołaczkowski
> Fix For: 2.1.7
>
>
> We had some hopes CASSANDRA-9436 would add it, yet it added rpc_address 
> instead of both rpc_address *and* listen_address. We really need 
> listen_address here, because we need to get information on the private IP C* 
> binds to. Knowing this we could better match Spark nodes to C* nodes and 
> process data locally in environments where rpc_address != listen_address like 
> EC2. 
> See, Spark does not know rpc addresses nor it has a concept of broadcast 
> address. It only knows the hostname / IP its workers bind to. In case of 
> cloud environments, these are private IPs. Now if we give Spark a set of C* 
> nodes identified by rpc_addresses, Spark doesn't recognize them as belonging 
> to the same cluster. It treats them as "remote" nodes and has no idea where 
> to send tasks optimally. 
> Current situation (example):
> Spark worker nodes: [10.0.0.1, 10.0.0.2, 10.0.0.3]
> C* nodes: [10.0.0.1 / node1.blah.ec2.com, 10.0.0.2 / node2.blah.ec2.com, 
> 10.0.0.3 / node3.blah.ec2.com]
> What the application knows about the cluster: [node1.blah.ec2.com, 
> node2.blah.ec2.com, node3.blah.ec2.com]
> What the application sends to Spark for execution:
>  Task1 - please execute on node1.blah.ec2.com
>  Task2 - please execute on node2.blah.ec2.com
>  Task3 - please execute on node3.blah.ec2.com
> How Spark understands it: "I have no idea what node1.blah.ec2.com is, let's 
> assign Task1 it to a *random* node" :(
> Expected:
> Spark worker nodes: [10.0.0.1, 10.0.0.2, 10.0.0.3]
> C* nodes: [10.0.0.1 / node1.blah.ec2.com, 10.0.0.2 / node2.blah.ec2.com, 
> 10.0.0.3 / node3.blah.ec2.com]
> What the application knows about the cluster: [10.0.0.1 / node1.blah.ec2.com, 
> 10.0.0.2 / node2.blah.ec2.com, 10.0.0.3 / node3.blah.ec2.com]
> What the application sends to Spark for execution:
>  Task1 - please execute on node1.blah.ec2.com or 10.0.0.1
>  Task2 - please execute on node2.blah.ec2.com or 10.0.0.2
>  Task3 - please execute on node3.blah.ec2.com or 10.0.0.3
> How Spark understands it: "10.0.0.1? - I have a worker on that node, lets put 
> Task 1 there"



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[06/10] cassandra git commit: Merge branch 'cassandra-2.0' into cassandra-2.1

2015-06-16 Thread samt
Merge branch 'cassandra-2.0' into cassandra-2.1

Conflicts:
CHANGES.txt
src/java/org/apache/cassandra/cql3/ResultSet.java


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

Branch: refs/heads/cassandra-2.1
Commit: 83944f82b8897d4cd1613d046028b296474e2cd7
Parents: c1702b0 80d46b8
Author: Sam Tunnicliffe 
Authored: Tue Jun 16 15:20:11 2015 +0100
Committer: Sam Tunnicliffe 
Committed: Tue Jun 16 15:20:11 2015 +0100

--
 CHANGES.txt   | 5 +
 src/java/org/apache/cassandra/cql3/ResultSet.java | 8 
 2 files changed, 9 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/83944f82/CHANGES.txt
--
diff --cc CHANGES.txt
index 928eb55,7f507c2..022d868
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,44 -1,6 +1,49 @@@
 -2.0.16:
++2.1.7
++Merged from 2.0
+  * Set HAS_MORE_PAGES flag to false when PagingState is null (CASSANDRA-9571)
 - * Backport indexed value validation fix from CASSANDRA-9057 (CASSANDRA-9564)
++
++
 +2.1.6
 + * (cqlsh) Fix using COPY through SOURCE or -f (CASSANDRA-9083)
 + * Fix occasional lack of `system` keyspace in schema tables (CASSANDRA-8487)
 + * Use ProtocolError code instead of ServerError code for native protocol
 +   error responses to unsupported protocol versions (CASSANDRA-9451)
 + * Default commitlog_sync_batch_window_in_ms changed to 2ms (CASSANDRA-9504)
 + * Fix empty partition assertion in unsorted sstable writing tools 
(CASSANDRA-9071)
 + * Ensure truncate without snapshot cannot produce corrupt responses 
(CASSANDRA-9388) 
 + * Consistent error message when a table mixes counter and non-counter
 +   columns (CASSANDRA-9492)
 + * Avoid getting unreadable keys during anticompaction (CASSANDRA-9508)
 + * (cqlsh) Better float precision by default (CASSANDRA-9224)
 + * Improve estimated row count (CASSANDRA-9107)
 + * Optimize range tombstone memory footprint (CASSANDRA-8603)
 + * Use configured gcgs in anticompaction (CASSANDRA-9397)
 + * Warn on misuse of unlogged batches (CASSANDRA-9282)
 + * Failure detector detects and ignores local pauses (CASSANDRA-9183)
 + * Add utility class to support for rate limiting a given log statement 
(CASSANDRA-9029)
 + * Add missing consistency levels to cassandra-stess (CASSANDRA-9361)
 + * Fix commitlog getCompletedTasks to not increment (CASSANDRA-9339)
 + * Fix for harmless exceptions logged as ERROR (CASSANDRA-8564)
 + * Delete processed sstables in sstablesplit/sstableupgrade (CASSANDRA-8606)
 + * Improve sstable exclusion from partition tombstones (CASSANDRA-9298)
 + * Validate the indexed column rather than the cell's contents for 2i 
(CASSANDRA-9057)
 + * Add support for top-k custom 2i queries (CASSANDRA-8717)
 + * Fix error when dropping table during compaction (CASSANDRA-9251)
 + * cassandra-stress supports validation operations over user profiles 
(CASSANDRA-8773)
 + * Add support for rate limiting log messages (CASSANDRA-9029)
 + * Log the partition key with tombstone warnings (CASSANDRA-8561)
 + * Reduce runWithCompactionsDisabled poll interval to 1ms (CASSANDRA-9271)
 + * Fix PITR commitlog replay (CASSANDRA-9195)
 + * GCInspector logs very different times (CASSANDRA-9124)
 + * Fix deleting from an empty list (CASSANDRA-9198)
 + * Update tuple and collection types that use a user-defined type when that 
UDT
 +   is modified (CASSANDRA-9148, CASSANDRA-9192)
 + * Use higher timeout for prepair and snapshot in repair (CASSANDRA-9261)
 + * Fix anticompaction blocking ANTI_ENTROPY stage (CASSANDRA-9151)
 + * Repair waits for anticompaction to finish (CASSANDRA-9097)
 + * Fix streaming not holding ref when stream error (CASSANDRA-9295)
 + * Fix canonical view returning early opened SSTables (CASSANDRA-9396)
 +Merged from 2.0:
   * Don't accumulate more range than necessary in RangeTombstone.Tracker 
(CASSANDRA-9486)
   * Add broadcast and rpc addresses to system.local (CASSANDRA-9436)
   * Always mark sstable suspect when corrupted (CASSANDRA-9478)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/83944f82/src/java/org/apache/cassandra/cql3/ResultSet.java
--
diff --cc src/java/org/apache/cassandra/cql3/ResultSet.java
index e463b29,659ed50..4ff513b
--- a/src/java/org/apache/cassandra/cql3/ResultSet.java
+++ b/src/java/org/apache/cassandra/cql3/ResultSet.java
@@@ -300,13 -281,14 +300,13 @@@ public class ResultSe
  return true;
  }
  
 -public Metadata setHasMorePages(PagingState pagingState)
 +public void setHasMorePages(

[08/10] cassandra git commit: Merge branch 'cassandra-2.1' into cassandra-2.2

2015-06-16 Thread samt
Merge branch 'cassandra-2.1' into cassandra-2.2

Conflicts:
CHANGES.txt


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

Branch: refs/heads/cassandra-2.2
Commit: 1fbdba2c4d7129eded4b57eac88566f10929a794
Parents: 17d43fa 83944f8
Author: Sam Tunnicliffe 
Authored: Tue Jun 16 15:25:57 2015 +0100
Committer: Sam Tunnicliffe 
Committed: Tue Jun 16 15:25:57 2015 +0100

--
 CHANGES.txt   | 3 ++-
 src/java/org/apache/cassandra/cql3/ResultSet.java | 8 
 2 files changed, 6 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/1fbdba2c/CHANGES.txt
--
diff --cc CHANGES.txt
index ba8ef12,022d868..221a46c
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,34 -1,9 +1,35 @@@
 -2.1.7
 -Merged from 2.0
 +2.2
 + * Fix connection leak in CqlRecordWriter (CASSANDRA-9576)
 + * Mlockall before opening system sstables & remove boot_without_jna option 
(CASSANDRA-9573)
 + * Add functions to convert timeuuid to date or time, deprecate dateOf and 
unixTimestampOf (CASSANDRA-9229)
 + * Make sure we cancel non-compacting sstables from LifecycleTransaction 
(CASSANDRA-9566)
 + * Fix deprecated repair JMX API (CASSANDRA-9570)
- 
++Merged from 2.0:
+  * Set HAS_MORE_PAGES flag to false when PagingState is null (CASSANDRA-9571)
  
 -
 -2.1.6
 +2.2.0-rc1
 + * Compressed commit log should measure compressed space used (CASSANDRA-9095)
 + * Fix comparison bug in CassandraRoleManager#collectRoles (CASSANDRA-9551)
 + * Add tinyint,smallint,time,date support for UDFs (CASSANDRA-9400)
 + * Deprecates SSTableSimpleWriter and SSTableSimpleUnsortedWriter 
(CASSANDRA-9546)
 + * Empty INITCOND treated as null in aggregate (CASSANDRA-9457)
 + * Remove use of Cell in Thrift MapReduce classes (CASSANDRA-8609)
 + * Integrate pre-release Java Driver 2.2-rc1, custom build (CASSANDRA-9493)
 + * Clean up gossiper logic for old versions (CASSANDRA-9370)
 + * Fix custom payload coding/decoding to match the spec (CASSANDRA-9515)
 + * ant test-all results incomplete when parsed (CASSANDRA-9463)
 + * Disallow frozen<> types in function arguments and return types for
 +   clarity (CASSANDRA-9411)
 + * Static Analysis to warn on unsafe use of Autocloseable instances 
(CASSANDRA-9431)
 + * Update commitlog archiving examples now that commitlog segments are
 +   not recycled (CASSANDRA-9350)
 + * Extend Transactional API to sstable lifecycle management (CASSANDRA-8568)
 + * (cqlsh) Add support for native protocol 4 (CASSANDRA-9399)
 + * Ensure that UDF and UDAs are keyspace-isolated (CASSANDRA-9409)
 + * Revert CASSANDRA-7807 (tracing completion client notifications) 
(CASSANDRA-9429)
 + * Add ability to stop compaction by ID (CASSANDRA-7207)
 + * Let CassandraVersion handle SNAPSHOT version (CASSANDRA-9438)
 +Merged from 2.1:
   * (cqlsh) Fix using COPY through SOURCE or -f (CASSANDRA-9083)
   * Fix occasional lack of `system` keyspace in schema tables (CASSANDRA-8487)
   * Use ProtocolError code instead of ServerError code for native protocol

http://git-wip-us.apache.org/repos/asf/cassandra/blob/1fbdba2c/src/java/org/apache/cassandra/cql3/ResultSet.java
--
diff --cc src/java/org/apache/cassandra/cql3/ResultSet.java
index 9698791,4ff513b..281923c
--- a/src/java/org/apache/cassandra/cql3/ResultSet.java
+++ b/src/java/org/apache/cassandra/cql3/ResultSet.java
@@@ -267,13 -282,31 +267,13 @@@ public class ResultSe
  names.add(name);
  }
  
 -private boolean allInSameCF()
 -{
 -if (names == null)
 -return false;
 -
 -assert !names.isEmpty();
 -
 -Iterator iter = names.iterator();
 -ColumnSpecification first = iter.next();
 -while (iter.hasNext())
 -{
 -ColumnSpecification name = iter.next();
 -if (!name.ksName.equals(first.ksName) || 
!name.cfName.equals(first.cfName))
 -return false;
 -}
 -return true;
 -}
 -
  public void setHasMorePages(PagingState pagingState)
  {
- if (pagingState == null)
- return;
- 
- flags.add(Flag.HAS_MORE_PAGES);
  this.pagingState = pagingState;
+ if (pagingState == null)
+ flags.remove(Flag.HAS_MORE_PAGES);
+ else
+ flags.add(Flag.HAS_MORE_PAGES);
  }
  
  public void setSkipMetadata()



[02/10] cassandra git commit: Unset HAS_MORE_PAGES flag if PagingState is null

2015-06-16 Thread samt
Unset HAS_MORE_PAGES flag if PagingState is null

patch by Berenguer Blasi and Sam Tunnicliffe; reviewed by Aleksey
Yeschenko for CASSANDRA-7787


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

Branch: refs/heads/cassandra-2.1
Commit: 80d46b8acc417978fd8c43862c3352a6381fbf2e
Parents: 9e60611
Author: Berenguer Blasi 
Authored: Tue Jun 9 18:21:14 2015 +0100
Committer: Sam Tunnicliffe 
Committed: Tue Jun 16 15:16:28 2015 +0100

--
 CHANGES.txt   | 1 +
 src/java/org/apache/cassandra/cql3/ResultSet.java | 8 
 2 files changed, 5 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/80d46b8a/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index f2693a4..7f507c2 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.0.16:
+ * Set HAS_MORE_PAGES flag to false when PagingState is null (CASSANDRA-9571)
  * Backport indexed value validation fix from CASSANDRA-9057 (CASSANDRA-9564)
  * Don't accumulate more range than necessary in RangeTombstone.Tracker 
(CASSANDRA-9486)
  * Add broadcast and rpc addresses to system.local (CASSANDRA-9436)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/80d46b8a/src/java/org/apache/cassandra/cql3/ResultSet.java
--
diff --git a/src/java/org/apache/cassandra/cql3/ResultSet.java 
b/src/java/org/apache/cassandra/cql3/ResultSet.java
index 4cda0cd..659ed50 100644
--- a/src/java/org/apache/cassandra/cql3/ResultSet.java
+++ b/src/java/org/apache/cassandra/cql3/ResultSet.java
@@ -283,11 +283,11 @@ public class ResultSet
 
 public Metadata setHasMorePages(PagingState pagingState)
 {
-if (pagingState == null)
-return this;
-
-flags.add(Flag.HAS_MORE_PAGES);
 this.pagingState = pagingState;
+if (pagingState == null)
+flags.remove(Flag.HAS_MORE_PAGES);
+else
+flags.add(Flag.HAS_MORE_PAGES);
 return this;
 }
 



[10/10] cassandra git commit: Merge branch 'cassandra-2.2' into trunk

2015-06-16 Thread samt
Merge branch 'cassandra-2.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/be6cb9d9
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/be6cb9d9
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/be6cb9d9

Branch: refs/heads/trunk
Commit: be6cb9d97e45d2255534002517a5926066769861
Parents: 81858eb 1fbdba2
Author: Sam Tunnicliffe 
Authored: Tue Jun 16 15:26:17 2015 +0100
Committer: Sam Tunnicliffe 
Committed: Tue Jun 16 15:26:17 2015 +0100

--
 CHANGES.txt   | 3 ++-
 src/java/org/apache/cassandra/cql3/ResultSet.java | 8 
 2 files changed, 6 insertions(+), 5 deletions(-)
--


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



[04/10] cassandra git commit: Unset HAS_MORE_PAGES flag if PagingState is null

2015-06-16 Thread samt
Unset HAS_MORE_PAGES flag if PagingState is null

patch by Berenguer Blasi and Sam Tunnicliffe; reviewed by Aleksey
Yeschenko for CASSANDRA-7787


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

Branch: refs/heads/trunk
Commit: 80d46b8acc417978fd8c43862c3352a6381fbf2e
Parents: 9e60611
Author: Berenguer Blasi 
Authored: Tue Jun 9 18:21:14 2015 +0100
Committer: Sam Tunnicliffe 
Committed: Tue Jun 16 15:16:28 2015 +0100

--
 CHANGES.txt   | 1 +
 src/java/org/apache/cassandra/cql3/ResultSet.java | 8 
 2 files changed, 5 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/80d46b8a/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index f2693a4..7f507c2 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.0.16:
+ * Set HAS_MORE_PAGES flag to false when PagingState is null (CASSANDRA-9571)
  * Backport indexed value validation fix from CASSANDRA-9057 (CASSANDRA-9564)
  * Don't accumulate more range than necessary in RangeTombstone.Tracker 
(CASSANDRA-9486)
  * Add broadcast and rpc addresses to system.local (CASSANDRA-9436)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/80d46b8a/src/java/org/apache/cassandra/cql3/ResultSet.java
--
diff --git a/src/java/org/apache/cassandra/cql3/ResultSet.java 
b/src/java/org/apache/cassandra/cql3/ResultSet.java
index 4cda0cd..659ed50 100644
--- a/src/java/org/apache/cassandra/cql3/ResultSet.java
+++ b/src/java/org/apache/cassandra/cql3/ResultSet.java
@@ -283,11 +283,11 @@ public class ResultSet
 
 public Metadata setHasMorePages(PagingState pagingState)
 {
-if (pagingState == null)
-return this;
-
-flags.add(Flag.HAS_MORE_PAGES);
 this.pagingState = pagingState;
+if (pagingState == null)
+flags.remove(Flag.HAS_MORE_PAGES);
+else
+flags.add(Flag.HAS_MORE_PAGES);
 return this;
 }
 



[03/10] cassandra git commit: Unset HAS_MORE_PAGES flag if PagingState is null

2015-06-16 Thread samt
Unset HAS_MORE_PAGES flag if PagingState is null

patch by Berenguer Blasi and Sam Tunnicliffe; reviewed by Aleksey
Yeschenko for CASSANDRA-7787


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

Branch: refs/heads/cassandra-2.2
Commit: 80d46b8acc417978fd8c43862c3352a6381fbf2e
Parents: 9e60611
Author: Berenguer Blasi 
Authored: Tue Jun 9 18:21:14 2015 +0100
Committer: Sam Tunnicliffe 
Committed: Tue Jun 16 15:16:28 2015 +0100

--
 CHANGES.txt   | 1 +
 src/java/org/apache/cassandra/cql3/ResultSet.java | 8 
 2 files changed, 5 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/80d46b8a/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index f2693a4..7f507c2 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.0.16:
+ * Set HAS_MORE_PAGES flag to false when PagingState is null (CASSANDRA-9571)
  * Backport indexed value validation fix from CASSANDRA-9057 (CASSANDRA-9564)
  * Don't accumulate more range than necessary in RangeTombstone.Tracker 
(CASSANDRA-9486)
  * Add broadcast and rpc addresses to system.local (CASSANDRA-9436)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/80d46b8a/src/java/org/apache/cassandra/cql3/ResultSet.java
--
diff --git a/src/java/org/apache/cassandra/cql3/ResultSet.java 
b/src/java/org/apache/cassandra/cql3/ResultSet.java
index 4cda0cd..659ed50 100644
--- a/src/java/org/apache/cassandra/cql3/ResultSet.java
+++ b/src/java/org/apache/cassandra/cql3/ResultSet.java
@@ -283,11 +283,11 @@ public class ResultSet
 
 public Metadata setHasMorePages(PagingState pagingState)
 {
-if (pagingState == null)
-return this;
-
-flags.add(Flag.HAS_MORE_PAGES);
 this.pagingState = pagingState;
+if (pagingState == null)
+flags.remove(Flag.HAS_MORE_PAGES);
+else
+flags.add(Flag.HAS_MORE_PAGES);
 return this;
 }
 



[05/10] cassandra git commit: Merge branch 'cassandra-2.0' into cassandra-2.1

2015-06-16 Thread samt
Merge branch 'cassandra-2.0' into cassandra-2.1

Conflicts:
CHANGES.txt
src/java/org/apache/cassandra/cql3/ResultSet.java


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

Branch: refs/heads/cassandra-2.2
Commit: 83944f82b8897d4cd1613d046028b296474e2cd7
Parents: c1702b0 80d46b8
Author: Sam Tunnicliffe 
Authored: Tue Jun 16 15:20:11 2015 +0100
Committer: Sam Tunnicliffe 
Committed: Tue Jun 16 15:20:11 2015 +0100

--
 CHANGES.txt   | 5 +
 src/java/org/apache/cassandra/cql3/ResultSet.java | 8 
 2 files changed, 9 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/83944f82/CHANGES.txt
--
diff --cc CHANGES.txt
index 928eb55,7f507c2..022d868
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,44 -1,6 +1,49 @@@
 -2.0.16:
++2.1.7
++Merged from 2.0
+  * Set HAS_MORE_PAGES flag to false when PagingState is null (CASSANDRA-9571)
 - * Backport indexed value validation fix from CASSANDRA-9057 (CASSANDRA-9564)
++
++
 +2.1.6
 + * (cqlsh) Fix using COPY through SOURCE or -f (CASSANDRA-9083)
 + * Fix occasional lack of `system` keyspace in schema tables (CASSANDRA-8487)
 + * Use ProtocolError code instead of ServerError code for native protocol
 +   error responses to unsupported protocol versions (CASSANDRA-9451)
 + * Default commitlog_sync_batch_window_in_ms changed to 2ms (CASSANDRA-9504)
 + * Fix empty partition assertion in unsorted sstable writing tools 
(CASSANDRA-9071)
 + * Ensure truncate without snapshot cannot produce corrupt responses 
(CASSANDRA-9388) 
 + * Consistent error message when a table mixes counter and non-counter
 +   columns (CASSANDRA-9492)
 + * Avoid getting unreadable keys during anticompaction (CASSANDRA-9508)
 + * (cqlsh) Better float precision by default (CASSANDRA-9224)
 + * Improve estimated row count (CASSANDRA-9107)
 + * Optimize range tombstone memory footprint (CASSANDRA-8603)
 + * Use configured gcgs in anticompaction (CASSANDRA-9397)
 + * Warn on misuse of unlogged batches (CASSANDRA-9282)
 + * Failure detector detects and ignores local pauses (CASSANDRA-9183)
 + * Add utility class to support for rate limiting a given log statement 
(CASSANDRA-9029)
 + * Add missing consistency levels to cassandra-stess (CASSANDRA-9361)
 + * Fix commitlog getCompletedTasks to not increment (CASSANDRA-9339)
 + * Fix for harmless exceptions logged as ERROR (CASSANDRA-8564)
 + * Delete processed sstables in sstablesplit/sstableupgrade (CASSANDRA-8606)
 + * Improve sstable exclusion from partition tombstones (CASSANDRA-9298)
 + * Validate the indexed column rather than the cell's contents for 2i 
(CASSANDRA-9057)
 + * Add support for top-k custom 2i queries (CASSANDRA-8717)
 + * Fix error when dropping table during compaction (CASSANDRA-9251)
 + * cassandra-stress supports validation operations over user profiles 
(CASSANDRA-8773)
 + * Add support for rate limiting log messages (CASSANDRA-9029)
 + * Log the partition key with tombstone warnings (CASSANDRA-8561)
 + * Reduce runWithCompactionsDisabled poll interval to 1ms (CASSANDRA-9271)
 + * Fix PITR commitlog replay (CASSANDRA-9195)
 + * GCInspector logs very different times (CASSANDRA-9124)
 + * Fix deleting from an empty list (CASSANDRA-9198)
 + * Update tuple and collection types that use a user-defined type when that 
UDT
 +   is modified (CASSANDRA-9148, CASSANDRA-9192)
 + * Use higher timeout for prepair and snapshot in repair (CASSANDRA-9261)
 + * Fix anticompaction blocking ANTI_ENTROPY stage (CASSANDRA-9151)
 + * Repair waits for anticompaction to finish (CASSANDRA-9097)
 + * Fix streaming not holding ref when stream error (CASSANDRA-9295)
 + * Fix canonical view returning early opened SSTables (CASSANDRA-9396)
 +Merged from 2.0:
   * Don't accumulate more range than necessary in RangeTombstone.Tracker 
(CASSANDRA-9486)
   * Add broadcast and rpc addresses to system.local (CASSANDRA-9436)
   * Always mark sstable suspect when corrupted (CASSANDRA-9478)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/83944f82/src/java/org/apache/cassandra/cql3/ResultSet.java
--
diff --cc src/java/org/apache/cassandra/cql3/ResultSet.java
index e463b29,659ed50..4ff513b
--- a/src/java/org/apache/cassandra/cql3/ResultSet.java
+++ b/src/java/org/apache/cassandra/cql3/ResultSet.java
@@@ -300,13 -281,14 +300,13 @@@ public class ResultSe
  return true;
  }
  
 -public Metadata setHasMorePages(PagingState pagingState)
 +public void setHasMorePages(

[09/10] cassandra git commit: Merge branch 'cassandra-2.1' into cassandra-2.2

2015-06-16 Thread samt
Merge branch 'cassandra-2.1' into cassandra-2.2

Conflicts:
CHANGES.txt


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

Branch: refs/heads/trunk
Commit: 1fbdba2c4d7129eded4b57eac88566f10929a794
Parents: 17d43fa 83944f8
Author: Sam Tunnicliffe 
Authored: Tue Jun 16 15:25:57 2015 +0100
Committer: Sam Tunnicliffe 
Committed: Tue Jun 16 15:25:57 2015 +0100

--
 CHANGES.txt   | 3 ++-
 src/java/org/apache/cassandra/cql3/ResultSet.java | 8 
 2 files changed, 6 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/1fbdba2c/CHANGES.txt
--
diff --cc CHANGES.txt
index ba8ef12,022d868..221a46c
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,34 -1,9 +1,35 @@@
 -2.1.7
 -Merged from 2.0
 +2.2
 + * Fix connection leak in CqlRecordWriter (CASSANDRA-9576)
 + * Mlockall before opening system sstables & remove boot_without_jna option 
(CASSANDRA-9573)
 + * Add functions to convert timeuuid to date or time, deprecate dateOf and 
unixTimestampOf (CASSANDRA-9229)
 + * Make sure we cancel non-compacting sstables from LifecycleTransaction 
(CASSANDRA-9566)
 + * Fix deprecated repair JMX API (CASSANDRA-9570)
- 
++Merged from 2.0:
+  * Set HAS_MORE_PAGES flag to false when PagingState is null (CASSANDRA-9571)
  
 -
 -2.1.6
 +2.2.0-rc1
 + * Compressed commit log should measure compressed space used (CASSANDRA-9095)
 + * Fix comparison bug in CassandraRoleManager#collectRoles (CASSANDRA-9551)
 + * Add tinyint,smallint,time,date support for UDFs (CASSANDRA-9400)
 + * Deprecates SSTableSimpleWriter and SSTableSimpleUnsortedWriter 
(CASSANDRA-9546)
 + * Empty INITCOND treated as null in aggregate (CASSANDRA-9457)
 + * Remove use of Cell in Thrift MapReduce classes (CASSANDRA-8609)
 + * Integrate pre-release Java Driver 2.2-rc1, custom build (CASSANDRA-9493)
 + * Clean up gossiper logic for old versions (CASSANDRA-9370)
 + * Fix custom payload coding/decoding to match the spec (CASSANDRA-9515)
 + * ant test-all results incomplete when parsed (CASSANDRA-9463)
 + * Disallow frozen<> types in function arguments and return types for
 +   clarity (CASSANDRA-9411)
 + * Static Analysis to warn on unsafe use of Autocloseable instances 
(CASSANDRA-9431)
 + * Update commitlog archiving examples now that commitlog segments are
 +   not recycled (CASSANDRA-9350)
 + * Extend Transactional API to sstable lifecycle management (CASSANDRA-8568)
 + * (cqlsh) Add support for native protocol 4 (CASSANDRA-9399)
 + * Ensure that UDF and UDAs are keyspace-isolated (CASSANDRA-9409)
 + * Revert CASSANDRA-7807 (tracing completion client notifications) 
(CASSANDRA-9429)
 + * Add ability to stop compaction by ID (CASSANDRA-7207)
 + * Let CassandraVersion handle SNAPSHOT version (CASSANDRA-9438)
 +Merged from 2.1:
   * (cqlsh) Fix using COPY through SOURCE or -f (CASSANDRA-9083)
   * Fix occasional lack of `system` keyspace in schema tables (CASSANDRA-8487)
   * Use ProtocolError code instead of ServerError code for native protocol

http://git-wip-us.apache.org/repos/asf/cassandra/blob/1fbdba2c/src/java/org/apache/cassandra/cql3/ResultSet.java
--
diff --cc src/java/org/apache/cassandra/cql3/ResultSet.java
index 9698791,4ff513b..281923c
--- a/src/java/org/apache/cassandra/cql3/ResultSet.java
+++ b/src/java/org/apache/cassandra/cql3/ResultSet.java
@@@ -267,13 -282,31 +267,13 @@@ public class ResultSe
  names.add(name);
  }
  
 -private boolean allInSameCF()
 -{
 -if (names == null)
 -return false;
 -
 -assert !names.isEmpty();
 -
 -Iterator iter = names.iterator();
 -ColumnSpecification first = iter.next();
 -while (iter.hasNext())
 -{
 -ColumnSpecification name = iter.next();
 -if (!name.ksName.equals(first.ksName) || 
!name.cfName.equals(first.cfName))
 -return false;
 -}
 -return true;
 -}
 -
  public void setHasMorePages(PagingState pagingState)
  {
- if (pagingState == null)
- return;
- 
- flags.add(Flag.HAS_MORE_PAGES);
  this.pagingState = pagingState;
+ if (pagingState == null)
+ flags.remove(Flag.HAS_MORE_PAGES);
+ else
+ flags.add(Flag.HAS_MORE_PAGES);
  }
  
  public void setSkipMetadata()



[07/10] cassandra git commit: Merge branch 'cassandra-2.0' into cassandra-2.1

2015-06-16 Thread samt
Merge branch 'cassandra-2.0' into cassandra-2.1

Conflicts:
CHANGES.txt
src/java/org/apache/cassandra/cql3/ResultSet.java


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

Branch: refs/heads/trunk
Commit: 83944f82b8897d4cd1613d046028b296474e2cd7
Parents: c1702b0 80d46b8
Author: Sam Tunnicliffe 
Authored: Tue Jun 16 15:20:11 2015 +0100
Committer: Sam Tunnicliffe 
Committed: Tue Jun 16 15:20:11 2015 +0100

--
 CHANGES.txt   | 5 +
 src/java/org/apache/cassandra/cql3/ResultSet.java | 8 
 2 files changed, 9 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/83944f82/CHANGES.txt
--
diff --cc CHANGES.txt
index 928eb55,7f507c2..022d868
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,44 -1,6 +1,49 @@@
 -2.0.16:
++2.1.7
++Merged from 2.0
+  * Set HAS_MORE_PAGES flag to false when PagingState is null (CASSANDRA-9571)
 - * Backport indexed value validation fix from CASSANDRA-9057 (CASSANDRA-9564)
++
++
 +2.1.6
 + * (cqlsh) Fix using COPY through SOURCE or -f (CASSANDRA-9083)
 + * Fix occasional lack of `system` keyspace in schema tables (CASSANDRA-8487)
 + * Use ProtocolError code instead of ServerError code for native protocol
 +   error responses to unsupported protocol versions (CASSANDRA-9451)
 + * Default commitlog_sync_batch_window_in_ms changed to 2ms (CASSANDRA-9504)
 + * Fix empty partition assertion in unsorted sstable writing tools 
(CASSANDRA-9071)
 + * Ensure truncate without snapshot cannot produce corrupt responses 
(CASSANDRA-9388) 
 + * Consistent error message when a table mixes counter and non-counter
 +   columns (CASSANDRA-9492)
 + * Avoid getting unreadable keys during anticompaction (CASSANDRA-9508)
 + * (cqlsh) Better float precision by default (CASSANDRA-9224)
 + * Improve estimated row count (CASSANDRA-9107)
 + * Optimize range tombstone memory footprint (CASSANDRA-8603)
 + * Use configured gcgs in anticompaction (CASSANDRA-9397)
 + * Warn on misuse of unlogged batches (CASSANDRA-9282)
 + * Failure detector detects and ignores local pauses (CASSANDRA-9183)
 + * Add utility class to support for rate limiting a given log statement 
(CASSANDRA-9029)
 + * Add missing consistency levels to cassandra-stess (CASSANDRA-9361)
 + * Fix commitlog getCompletedTasks to not increment (CASSANDRA-9339)
 + * Fix for harmless exceptions logged as ERROR (CASSANDRA-8564)
 + * Delete processed sstables in sstablesplit/sstableupgrade (CASSANDRA-8606)
 + * Improve sstable exclusion from partition tombstones (CASSANDRA-9298)
 + * Validate the indexed column rather than the cell's contents for 2i 
(CASSANDRA-9057)
 + * Add support for top-k custom 2i queries (CASSANDRA-8717)
 + * Fix error when dropping table during compaction (CASSANDRA-9251)
 + * cassandra-stress supports validation operations over user profiles 
(CASSANDRA-8773)
 + * Add support for rate limiting log messages (CASSANDRA-9029)
 + * Log the partition key with tombstone warnings (CASSANDRA-8561)
 + * Reduce runWithCompactionsDisabled poll interval to 1ms (CASSANDRA-9271)
 + * Fix PITR commitlog replay (CASSANDRA-9195)
 + * GCInspector logs very different times (CASSANDRA-9124)
 + * Fix deleting from an empty list (CASSANDRA-9198)
 + * Update tuple and collection types that use a user-defined type when that 
UDT
 +   is modified (CASSANDRA-9148, CASSANDRA-9192)
 + * Use higher timeout for prepair and snapshot in repair (CASSANDRA-9261)
 + * Fix anticompaction blocking ANTI_ENTROPY stage (CASSANDRA-9151)
 + * Repair waits for anticompaction to finish (CASSANDRA-9097)
 + * Fix streaming not holding ref when stream error (CASSANDRA-9295)
 + * Fix canonical view returning early opened SSTables (CASSANDRA-9396)
 +Merged from 2.0:
   * Don't accumulate more range than necessary in RangeTombstone.Tracker 
(CASSANDRA-9486)
   * Add broadcast and rpc addresses to system.local (CASSANDRA-9436)
   * Always mark sstable suspect when corrupted (CASSANDRA-9478)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/83944f82/src/java/org/apache/cassandra/cql3/ResultSet.java
--
diff --cc src/java/org/apache/cassandra/cql3/ResultSet.java
index e463b29,659ed50..4ff513b
--- a/src/java/org/apache/cassandra/cql3/ResultSet.java
+++ b/src/java/org/apache/cassandra/cql3/ResultSet.java
@@@ -300,13 -281,14 +300,13 @@@ public class ResultSe
  return true;
  }
  
 -public Metadata setHasMorePages(PagingState pagingState)
 +public void setHasMorePages(PagingSt

[01/10] cassandra git commit: Unset HAS_MORE_PAGES flag if PagingState is null

2015-06-16 Thread samt
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-2.0 9e60611fb -> 80d46b8ac
  refs/heads/cassandra-2.1 c1702b0b3 -> 83944f82b
  refs/heads/cassandra-2.2 17d43fa55 -> 1fbdba2c4
  refs/heads/trunk 81858ebcb -> be6cb9d97


Unset HAS_MORE_PAGES flag if PagingState is null

patch by Berenguer Blasi and Sam Tunnicliffe; reviewed by Aleksey
Yeschenko for CASSANDRA-7787


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

Branch: refs/heads/cassandra-2.0
Commit: 80d46b8acc417978fd8c43862c3352a6381fbf2e
Parents: 9e60611
Author: Berenguer Blasi 
Authored: Tue Jun 9 18:21:14 2015 +0100
Committer: Sam Tunnicliffe 
Committed: Tue Jun 16 15:16:28 2015 +0100

--
 CHANGES.txt   | 1 +
 src/java/org/apache/cassandra/cql3/ResultSet.java | 8 
 2 files changed, 5 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/80d46b8a/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index f2693a4..7f507c2 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.0.16:
+ * Set HAS_MORE_PAGES flag to false when PagingState is null (CASSANDRA-9571)
  * Backport indexed value validation fix from CASSANDRA-9057 (CASSANDRA-9564)
  * Don't accumulate more range than necessary in RangeTombstone.Tracker 
(CASSANDRA-9486)
  * Add broadcast and rpc addresses to system.local (CASSANDRA-9436)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/80d46b8a/src/java/org/apache/cassandra/cql3/ResultSet.java
--
diff --git a/src/java/org/apache/cassandra/cql3/ResultSet.java 
b/src/java/org/apache/cassandra/cql3/ResultSet.java
index 4cda0cd..659ed50 100644
--- a/src/java/org/apache/cassandra/cql3/ResultSet.java
+++ b/src/java/org/apache/cassandra/cql3/ResultSet.java
@@ -283,11 +283,11 @@ public class ResultSet
 
 public Metadata setHasMorePages(PagingState pagingState)
 {
-if (pagingState == null)
-return this;
-
-flags.add(Flag.HAS_MORE_PAGES);
 this.pagingState = pagingState;
+if (pagingState == null)
+flags.remove(Flag.HAS_MORE_PAGES);
+else
+flags.add(Flag.HAS_MORE_PAGES);
 return this;
 }
 



[jira] [Updated] (CASSANDRA-9603) Expose private listen_address in system.local

2015-06-16 Thread JIRA

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

Piotr Kołaczkowski updated CASSANDRA-9603:
--
Description: 
We had some hopes CASSANDRA-9436 would add it, yet it added rpc_address instead 
of both rpc_address *and* listen_address. We really need listen_address here, 
because we need to get information on the private IP C* binds to. Knowing this 
we could better match Spark nodes to C* nodes and process data locally in 
environments where rpc_address != listen_address like EC2. 

See, Spark does not know rpc addresses nor it has a concept of broadcast 
address. It only knows the hostname / IP its workers bind to. In case of cloud 
environments, these are private IPs. Now if we give Spark a set of C* nodes 
identified by rpc_addresses, Spark doesn't recognize them as belonging to the 
same cluster. It treats them as "remote" nodes and has no idea where to send 
tasks optimally. 

Current situation (example):
Spark worker nodes: [10.0.0.1, 10.0.0.2, 10.0.0.3]
C* nodes: [10.0.0.1 / node1.blah.ec2.com, 10.0.0.2 / node2.blah.ec2.com, 
10.0.0.3 / node3.blah.ec2.com]
What the application knows about the cluster: [node1.blah.ec2.com, 
node2.blah.ec2.com, node3.blah.ec2.com]
What the application sends to Spark for execution:
 Task1 - please execute on node1.blah.ec2.com
 Task2 - please execute on node2.blah.ec2.com
 Task3 - please execute on node3.blah.ec2.com
How Spark understands it: "I have no idea what node1.blah.ec2.com is, let's 
assign Task1 it to a *random* node" :(

Expected:
Spark worker nodes: [10.0.0.1, 10.0.0.2, 10.0.0.3]
C* nodes: [10.0.0.1 / node1.blah.ec2.com, 10.0.0.2 / node2.blah.ec2.com, 
10.0.0.3 / node3.blah.ec2.com]
What the application knows about the cluster: [10.0.0.1 / node1.blah.ec2.com, 
10.0.0.2 / node2.blah.ec2.com, 10.0.0.3 / node3.blah.ec2.com]
What the application sends to Spark for execution:
 Task1 - please execute on node1.blah.ec2.com or 10.0.0.1
 Task2 - please execute on node2.blah.ec2.com or 10.0.0.2
 Task3 - please execute on node3.blah.ec2.com or 10.0.0.3
How Spark understands it: "10.0.0.1? - I have a worker on that node, lets put 
Task 1 there"









  was:
We had some hopes CASSANDRA-9436 would add it, yet it added rpc_address instead 
of both rpc_address *and* listen_address. We really need listen_address here, 
because we need to get information on the private IP C* binds to. Knowing this 
we could better match Spark nodes to C* nodes and process data locally in 
environments where rpc_address != listen_address like EC2. 

See, Spark does not know rpc addresses nor it has a concept of broadcast 
address. It only knows the hostname / IP its workers bind to. In case of cloud 
environments, these are private IPs. Now if we give Spark a set of C* nodes 
identified by rpc_addresses, Spark doesn't recognize them as belonging to the 
same cluster. It treats them as "remote" nodes and has no idea where to send 
tasks optimally. 


> Expose private listen_address in system.local
> -
>
> Key: CASSANDRA-9603
> URL: https://issues.apache.org/jira/browse/CASSANDRA-9603
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Core
>Reporter: Piotr Kołaczkowski
>
> We had some hopes CASSANDRA-9436 would add it, yet it added rpc_address 
> instead of both rpc_address *and* listen_address. We really need 
> listen_address here, because we need to get information on the private IP C* 
> binds to. Knowing this we could better match Spark nodes to C* nodes and 
> process data locally in environments where rpc_address != listen_address like 
> EC2. 
> See, Spark does not know rpc addresses nor it has a concept of broadcast 
> address. It only knows the hostname / IP its workers bind to. In case of 
> cloud environments, these are private IPs. Now if we give Spark a set of C* 
> nodes identified by rpc_addresses, Spark doesn't recognize them as belonging 
> to the same cluster. It treats them as "remote" nodes and has no idea where 
> to send tasks optimally. 
> Current situation (example):
> Spark worker nodes: [10.0.0.1, 10.0.0.2, 10.0.0.3]
> C* nodes: [10.0.0.1 / node1.blah.ec2.com, 10.0.0.2 / node2.blah.ec2.com, 
> 10.0.0.3 / node3.blah.ec2.com]
> What the application knows about the cluster: [node1.blah.ec2.com, 
> node2.blah.ec2.com, node3.blah.ec2.com]
> What the application sends to Spark for execution:
>  Task1 - please execute on node1.blah.ec2.com
>  Task2 - please execute on node2.blah.ec2.com
>  Task3 - please execute on node3.blah.ec2.com
> How Spark understands it: "I have no idea what node1.blah.ec2.com is, let's 
> assign Task1 it to a *random* node" :(
> Expected:
> Spark worker nodes: [10.0.0.1, 10.0.0.2, 10.0.0.3]
> C* nodes: [10.0.0.1 / node1.blah.ec2.com, 10.0.0.2 / node2.blah.ec2.com, 
> 10.0.0.3 / node3.blah.ec2.com]
> 

[jira] [Updated] (CASSANDRA-9304) COPY TO improvements

2015-06-16 Thread Philip Thompson (JIRA)

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

Philip Thompson updated CASSANDRA-9304:
---
Labels: cqlsh  (was: )

> COPY TO improvements
> 
>
> Key: CASSANDRA-9304
> URL: https://issues.apache.org/jira/browse/CASSANDRA-9304
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Core
>Reporter: Jonathan Ellis
>Assignee: David Kua
>Priority: Minor
>  Labels: cqlsh
> Fix For: 2.1.x
>
>
> COPY FROM has gotten a lot of love.  COPY TO not so much.  One obvious 
> improvement could be to parallelize reading and writing (write one page of 
> data while fetching the next).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Created] (CASSANDRA-9603) Expose private listen_address in system.local

2015-06-16 Thread JIRA
Piotr Kołaczkowski created CASSANDRA-9603:
-

 Summary: Expose private listen_address in system.local
 Key: CASSANDRA-9603
 URL: https://issues.apache.org/jira/browse/CASSANDRA-9603
 Project: Cassandra
  Issue Type: Improvement
  Components: Core
Reporter: Piotr Kołaczkowski


We had some hopes CASSANDRA-9436 would add it, yet it added rpc_address instead 
of both rpc_address *and* listen_address. We really need listen_address here, 
because we need to get information on the private IP C* binds to. Knowing this 
we could better match Spark nodes to C* nodes and process data locally in 
environments where rpc_address != listen_address like EC2. 

See, Spark does not know rpc addresses nor it has a concept of broadcast 
address. It only knows the hostname / IP its workers bind to. In case of cloud 
environments, these are private IPs. Now if we give Spark a set of C* nodes 
identified by rpc_addresses, Spark doesn't recognize them as belonging to the 
same cluster. It treats them as "remote" nodes and has no idea where to send 
tasks optimally. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CASSANDRA-9603) Expose private listen_address in system.local

2015-06-16 Thread JIRA

[ 
https://issues.apache.org/jira/browse/CASSANDRA-9603?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14588092#comment-14588092
 ] 

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

CC [~iamaleksey]

> Expose private listen_address in system.local
> -
>
> Key: CASSANDRA-9603
> URL: https://issues.apache.org/jira/browse/CASSANDRA-9603
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Core
>Reporter: Piotr Kołaczkowski
>
> We had some hopes CASSANDRA-9436 would add it, yet it added rpc_address 
> instead of both rpc_address *and* listen_address. We really need 
> listen_address here, because we need to get information on the private IP C* 
> binds to. Knowing this we could better match Spark nodes to C* nodes and 
> process data locally in environments where rpc_address != listen_address like 
> EC2. 
> See, Spark does not know rpc addresses nor it has a concept of broadcast 
> address. It only knows the hostname / IP its workers bind to. In case of 
> cloud environments, these are private IPs. Now if we give Spark a set of C* 
> nodes identified by rpc_addresses, Spark doesn't recognize them as belonging 
> to the same cluster. It treats them as "remote" nodes and has no idea where 
> to send tasks optimally. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (CASSANDRA-9579) Add JMX / nodetool command to refresh system.size_estimates

2015-06-16 Thread Aleksey Yeschenko (JIRA)

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

Aleksey Yeschenko updated CASSANDRA-9579:
-
Fix Version/s: (was: 2.1.7)
   2.2.x
   2.1.x

> Add JMX / nodetool command to refresh system.size_estimates
> ---
>
> Key: CASSANDRA-9579
> URL: https://issues.apache.org/jira/browse/CASSANDRA-9579
> Project: Cassandra
>  Issue Type: Improvement
>  Components: API
>Reporter: Piotr Kołaczkowski
>Assignee: Aleksey Yeschenko
>Priority: Minor
> Fix For: 2.1.x, 2.2.x
>
>
> CASSANDRA-7688 added dumping size estimates at a fixed interval. However, in 
> some cases, e.g. after inserting huge amounts of data or truncating a table, 
> size estimates may become severely incorrect for the interval time. In this 
> case being able to manually trigger the recalculation of the estimates would 
> be very useful. It would be also useful for any automated testing requiring 
> fresh size estimates.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (CASSANDRA-9579) Add JMX / nodetool command to refresh system.size_estimates

2015-06-16 Thread JIRA

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

Piotr Kołaczkowski updated CASSANDRA-9579:
--
Fix Version/s: (was: 2.2.x)
   (was: 2.1.x)
   2.1.7

> Add JMX / nodetool command to refresh system.size_estimates
> ---
>
> Key: CASSANDRA-9579
> URL: https://issues.apache.org/jira/browse/CASSANDRA-9579
> Project: Cassandra
>  Issue Type: Improvement
>  Components: API
>Reporter: Piotr Kołaczkowski
>Assignee: Aleksey Yeschenko
>Priority: Minor
> Fix For: 2.1.7
>
>
> CASSANDRA-7688 added dumping size estimates at a fixed interval. However, in 
> some cases, e.g. after inserting huge amounts of data or truncating a table, 
> size estimates may become severely incorrect for the interval time. In this 
> case being able to manually trigger the recalculation of the estimates would 
> be very useful. It would be also useful for any automated testing requiring 
> fresh size estimates.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (CASSANDRA-9579) Add JMX / nodetool command to refresh system.size_estimates

2015-06-16 Thread Aleksey Yeschenko (JIRA)

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

Aleksey Yeschenko updated CASSANDRA-9579:
-
Fix Version/s: 2.1.x

> Add JMX / nodetool command to refresh system.size_estimates
> ---
>
> Key: CASSANDRA-9579
> URL: https://issues.apache.org/jira/browse/CASSANDRA-9579
> Project: Cassandra
>  Issue Type: Improvement
>  Components: API
>Reporter: Piotr Kołaczkowski
>Assignee: Aleksey Yeschenko
>Priority: Minor
> Fix For: 2.1.x
>
>
> CASSANDRA-7688 added dumping size estimates at a fixed interval. However, in 
> some cases, e.g. after inserting huge amounts of data or truncating a table, 
> size estimates may become severely incorrect for the interval time. In this 
> case being able to manually trigger the recalculation of the estimates would 
> be very useful. It would be also useful for any automated testing requiring 
> fresh size estimates.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (CASSANDRA-9579) Add JMX / nodetool command to refresh system.size_estimates

2015-06-16 Thread Aleksey Yeschenko (JIRA)

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

Aleksey Yeschenko updated CASSANDRA-9579:
-
Fix Version/s: 2.2.x

> Add JMX / nodetool command to refresh system.size_estimates
> ---
>
> Key: CASSANDRA-9579
> URL: https://issues.apache.org/jira/browse/CASSANDRA-9579
> Project: Cassandra
>  Issue Type: Improvement
>  Components: API
>Reporter: Piotr Kołaczkowski
>Assignee: Aleksey Yeschenko
>Priority: Minor
> Fix For: 2.1.x, 2.2.x
>
>
> CASSANDRA-7688 added dumping size estimates at a fixed interval. However, in 
> some cases, e.g. after inserting huge amounts of data or truncating a table, 
> size estimates may become severely incorrect for the interval time. In this 
> case being able to manually trigger the recalculation of the estimates would 
> be very useful. It would be also useful for any automated testing requiring 
> fresh size estimates.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Assigned] (CASSANDRA-9579) Add JMX / nodetool command to refresh system.size_estimates

2015-06-16 Thread Aleksey Yeschenko (JIRA)

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

Aleksey Yeschenko reassigned CASSANDRA-9579:


Assignee: Aleksey Yeschenko

> Add JMX / nodetool command to refresh system.size_estimates
> ---
>
> Key: CASSANDRA-9579
> URL: https://issues.apache.org/jira/browse/CASSANDRA-9579
> Project: Cassandra
>  Issue Type: Improvement
>  Components: API
>Reporter: Piotr Kołaczkowski
>Assignee: Aleksey Yeschenko
>Priority: Minor
>
> CASSANDRA-7688 added dumping size estimates at a fixed interval. However, in 
> some cases, e.g. after inserting huge amounts of data or truncating a table, 
> size estimates may become severely incorrect for the interval time. In this 
> case being able to manually trigger the recalculation of the estimates would 
> be very useful. It would be also useful for any automated testing requiring 
> fresh size estimates.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CASSANDRA-9571) Set HAS_MORE_PAGES flag when PagingState is null

2015-06-16 Thread Aleksey Yeschenko (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-9571?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14588062#comment-14588062
 ] 

Aleksey Yeschenko commented on CASSANDRA-9571:
--

+1

> Set HAS_MORE_PAGES flag when PagingState is null
> 
>
> Key: CASSANDRA-9571
> URL: https://issues.apache.org/jira/browse/CASSANDRA-9571
> Project: Cassandra
>  Issue Type: Improvement
>Reporter: Sam Tunnicliffe
>Assignee: Sam Tunnicliffe
>Priority: Minor
> Fix For: 2.1.x, 2.0.x, 2.2.x, 3.0.x
>
> Attachments: 9571-2.0.txt
>
>
> If {{ResultSet.Metadata#setHasMorePages}} is called with a null 
> {{PagingState}}, indicating that there are no more available results, we 
> should explicitly unset the {{HAS_MORE_PAGES}} flag. This can be necessary 
> where a custom {{QueryHandler}} implements its own {{LIMIT}} logic and wishes 
> to send the signal to the client that the results are exhausted before the 
> storage engine would normally do so.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Comment Edited] (CASSANDRA-9597) DTCS should consider file SIZE in addition to time windowing

2015-06-16 Thread Marcus Eriksson (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-9597?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14588051#comment-14588051
 ] 

Marcus Eriksson edited comment on CASSANDRA-9597 at 6/16/15 1:55 PM:
-

Yeah repair is a problem with vnodes (CASSANDRA-5220), and yes we should 
probably do something smarter when we have > max_threshold sstables to compact.

[~Bj0rn] do you have time to take a stab at this?

Note that it is still going to be quite painful, if you are on 2.1 incremental 
repair should reduce the pain a lot (ie, never stream in any old data in)

edit: oops, repair was not mentioned, but for anyone hitting this, inc repair 
should help.


was (Author: krummas):
Yeah repair is a problem with vnodes (CASSANDRA-5220), and yes we should 
probably do something smarter when we have > max_threshold sstables to compact.

[~Bj0rn] do you have time to take a stab at this?

Note that it is still going to be quite painful, if you are on 2.1 incremental 
repair should reduce the pain a lot (ie, never stream in any old data in)



> DTCS should consider file SIZE in addition to time windowing
> 
>
> Key: CASSANDRA-9597
> URL: https://issues.apache.org/jira/browse/CASSANDRA-9597
> Project: Cassandra
>  Issue Type: Improvement
>Reporter: Jeff Jirsa
>Priority: Minor
>  Labels: dtcs
>
> DTCS seems to work well for the typical use case - writing data in perfect 
> time order, compacting recent files, and ignoring older files.
> However, there are "normal" operational actions where DTCS will fall behind 
> and is unlikely to recover.
> An example of this is streaming operations (for example, bootstrap or loading 
> data into a cluster using sstableloader), where lots (tens of thousands) of 
> very small sstables can be created spanning multiple time buckets. In these 
> case, even if max_sstable_age_days is extended to allow the older incoming 
> files to be compacted, the selection logic is likely to re-compact large 
> files with fewer small files over and over, rather than prioritizing 
> selection of max_threshold smallest files to decrease the number of candidate 
> sstables as quickly as possible.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CASSANDRA-9597) DTCS should consider file SIZE in addition to time windowing

2015-06-16 Thread Marcus Eriksson (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-9597?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14588051#comment-14588051
 ] 

Marcus Eriksson commented on CASSANDRA-9597:


Yeah repair is a problem with vnodes (CASSANDRA-5220), and yes we should 
probably do something smarter when we have > max_threshold sstables to compact.

[~Bj0rn] do you have time to take a stab at this?

Note that it is still going to be quite painful, if you are on 2.1 incremental 
repair should reduce the pain a lot (ie, never stream in any old data in)



> DTCS should consider file SIZE in addition to time windowing
> 
>
> Key: CASSANDRA-9597
> URL: https://issues.apache.org/jira/browse/CASSANDRA-9597
> Project: Cassandra
>  Issue Type: Improvement
>Reporter: Jeff Jirsa
>Priority: Minor
>  Labels: dtcs
>
> DTCS seems to work well for the typical use case - writing data in perfect 
> time order, compacting recent files, and ignoring older files.
> However, there are "normal" operational actions where DTCS will fall behind 
> and is unlikely to recover.
> An example of this is streaming operations (for example, bootstrap or loading 
> data into a cluster using sstableloader), where lots (tens of thousands) of 
> very small sstables can be created spanning multiple time buckets. In these 
> case, even if max_sstable_age_days is extended to allow the older incoming 
> files to be compacted, the selection logic is likely to re-compact large 
> files with fewer small files over and over, rather than prioritizing 
> selection of max_threshold smallest files to decrease the number of candidate 
> sstables as quickly as possible.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CASSANDRA-9597) DTCS should consider file SIZE in addition to time windowing

2015-06-16 Thread Philip Thompson (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-9597?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14588034#comment-14588034
 ] 

Philip Thompson commented on CASSANDRA-9597:


/cc [~krummas]

> DTCS should consider file SIZE in addition to time windowing
> 
>
> Key: CASSANDRA-9597
> URL: https://issues.apache.org/jira/browse/CASSANDRA-9597
> Project: Cassandra
>  Issue Type: Improvement
>Reporter: Jeff Jirsa
>Priority: Minor
>  Labels: dtcs
>
> DTCS seems to work well for the typical use case - writing data in perfect 
> time order, compacting recent files, and ignoring older files.
> However, there are "normal" operational actions where DTCS will fall behind 
> and is unlikely to recover.
> An example of this is streaming operations (for example, bootstrap or loading 
> data into a cluster using sstableloader), where lots (tens of thousands) of 
> very small sstables can be created spanning multiple time buckets. In these 
> case, even if max_sstable_age_days is extended to allow the older incoming 
> files to be compacted, the selection logic is likely to re-compact large 
> files with fewer small files over and over, rather than prioritizing 
> selection of max_threshold smallest files to decrease the number of candidate 
> sstables as quickly as possible.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CASSANDRA-9499) Introduce writeVInt method to DataOutputStreamPlus

2015-06-16 Thread Benedict (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-9499?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14588026#comment-14588026
 ] 

Benedict commented on CASSANDRA-9499:
-

bq. I was, in fact, more thinking of the simpler scheme of using one bit as a 
"continuation bit"

I'm not fixated on the exact specifics of the scheme I suggested, I was mostly 
suggesting a switch to a continutationbit*s* scheme (with these bits encoded 
upfront for simplicity), as well as being strongly in favour of one encoding 
scheme.

We could, for instance, have a single continuation bit, that is expanded to, 
say, 3 bits + sign if it's set, so that we represent [0..127] in 1 byte, 
[-2048..2047] in 2 bytes, [-512K..512K] in 3 bytes etc.; or we could have two 
initial continuation bits, permitting up to 16K in 2 bytes. I would just prefer 
we settle on what we consider to be approximately the most generally useful 
scheme, and stick with that. 

I should note I'm not saying that it definitely would not help to have a 
proliferation of methods, but IMO the _likelihood_ of payoff is too low to 
spend time on (we have lots of things we know will payoff). I think it's 
somewhat more likely to harm than help, since a majority of values to be 
encoded will likely see the same size under the general scheme as they would 
under their more specific scheme, and there are negative costs associated with 
a proliferation of method calls. I'm hoping _in general_ on the project we can 
steadily prune the number of methods a typical workloads entails visiting.

> Introduce writeVInt method to DataOutputStreamPlus
> --
>
> Key: CASSANDRA-9499
> URL: https://issues.apache.org/jira/browse/CASSANDRA-9499
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Core
>Reporter: Benedict
>Assignee: Ariel Weisberg
>Priority: Minor
> Fix For: 3.0 beta 1
>
>
> CASSANDRA-8099 really could do with a writeVInt method, for both fixing 
> CASSANDRA-9498 but also efficiently encoding timestamp/deletion deltas. It 
> should be possible to make an especially efficient implementation against 
> BufferedDataOutputStreamPlus.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CASSANDRA-9499) Introduce writeVInt method to DataOutputStreamPlus

2015-06-16 Thread Sylvain Lebresne (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-9499?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14587997#comment-14587997
 ] 

Sylvain Lebresne commented on CASSANDRA-9499:
-

bq. the existing scheme (including a positive-only variant supporting 250 
values)

Again, I haven't really looked at the existing scheme so I really wasn't fixed 
on it.  I was, in fact, more thinking of the simpler scheme of using one bit as 
a "continuation bit", which does only support 127 values in a single byte but 
degrades to 2 bytes properly. Anyway, doesn't matter.

bq. the worse our instruction cache population becomes

I'm unfortunately not smart enough to properly estimate how that kind of effect 
would play against other considerations (like saving bytes sometimes) on 
average in the grand scheme of everything. My point was merely to suggest that 
expressing our assumptions through different API calls that would be optimized 
based on these assumption could be an idea worth exploring, but I don't want to 
push it any more than that. I also don't have strongly objections to the scheme 
you're suggesting.


> Introduce writeVInt method to DataOutputStreamPlus
> --
>
> Key: CASSANDRA-9499
> URL: https://issues.apache.org/jira/browse/CASSANDRA-9499
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Core
>Reporter: Benedict
>Assignee: Ariel Weisberg
>Priority: Minor
> Fix For: 3.0 beta 1
>
>
> CASSANDRA-8099 really could do with a writeVInt method, for both fixing 
> CASSANDRA-9498 but also efficiently encoding timestamp/deletion deltas. It 
> should be possible to make an especially efficient implementation against 
> BufferedDataOutputStreamPlus.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


  1   2   >