[jira] [Updated] (CASSANDRA-12279) nodetool repair hangs on non-existant table

2016-08-21 Thread Masataka Yamaguchi (JIRA)

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

Masataka Yamaguchi updated CASSANDRA-12279:
---
Status: Patch Available  (was: Open)

> nodetool repair hangs on non-existant table
> ---
>
> Key: CASSANDRA-12279
> URL: https://issues.apache.org/jira/browse/CASSANDRA-12279
> Project: Cassandra
>  Issue Type: Bug
> Environment: Linux Ubuntu, Openjdk
>Reporter: Benjamin Roth
>Assignee: Masataka Yamaguchi
>Priority: Minor
>  Labels: lhf
> Attachments: 0001-CASSANDRA-12279-2.2.patch, 
> 0001-CASSANDRA-12279-3.0.patch, 0001-CASSANDRA-12279-trunk.patch, 
> CASSANDRA-12279-trunk.patch, new_result_example.txt, org_result_example.txt
>
>
> If nodetool repair is called with a table that does not exist, ist hangs 
> infinitely without any error message or logs.
> E.g.
> nodetool repair foo bar
> Keyspace foo exists but table bar does not



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


[jira] [Updated] (CASSANDRA-12279) nodetool repair hangs on non-existant table

2016-08-21 Thread Masataka Yamaguchi (JIRA)

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

Masataka Yamaguchi updated CASSANDRA-12279:
---
Attachment: 0001-CASSANDRA-12279-trunk.patch
0001-CASSANDRA-12279-3.0.patch
0001-CASSANDRA-12279-2.2.patch

Thank you for reviewing and creating a dtest!
Sorry for my mistake. I created patches for 2.2, 3.0 and trunk with git 
format-patch.
I attached them and please review it.


> nodetool repair hangs on non-existant table
> ---
>
> Key: CASSANDRA-12279
> URL: https://issues.apache.org/jira/browse/CASSANDRA-12279
> Project: Cassandra
>  Issue Type: Bug
> Environment: Linux Ubuntu, Openjdk
>Reporter: Benjamin Roth
>Assignee: Masataka Yamaguchi
>Priority: Minor
>  Labels: lhf
> Attachments: 0001-CASSANDRA-12279-2.2.patch, 
> 0001-CASSANDRA-12279-3.0.patch, 0001-CASSANDRA-12279-trunk.patch, 
> CASSANDRA-12279-trunk.patch, new_result_example.txt, org_result_example.txt
>
>
> If nodetool repair is called with a table that does not exist, ist hangs 
> infinitely without any error message or logs.
> E.g.
> nodetool repair foo bar
> Keyspace foo exists but table bar does not



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


[jira] [Reopened] (CASSANDRA-12476) SyntaxException when COPY FROM Counter Table with Null value

2016-08-21 Thread Stefania (JIRA)

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

Stefania reopened CASSANDRA-12476:
--

> SyntaxException when COPY FROM Counter Table with Null value
> 
>
> Key: CASSANDRA-12476
> URL: https://issues.apache.org/jira/browse/CASSANDRA-12476
> Project: Cassandra
>  Issue Type: Bug
>  Components: Tools
>Reporter: Ashraful Islam
>Assignee: Stefania
>Priority: Minor
>  Labels: cqlsh
> Fix For: 2.2.x, 3.0.x, 3.x
>
> Attachments: 
> Fix_issue___CASSANDRA_12476__SyntaxException_when_COPY_FROM_Counter_Table_with_Null_value.patch
>
>
> I have a simple counter table 
> {noformat}
> CREATE TABLE test (
> a int PRIMARY KEY,
> b counter,
> c counter
> ) ;
> {noformat}
> I have updated b column value with 
> {noformat}
> UPDATE test SET b = b + 1 WHERE a = 1;
> {noformat}
> Now I have export the data with 
> {noformat}
> COPY test TO 'test.csv';
> {noformat}
> And Import it with 
> {noformat}
> COPY test FROM 'test.csv';
> {noformat}
> I get this Error
> {noformat}
> Failed to import 1 rows: SyntaxException - line 1:34 no viable alternative at 
> input 'WHERE' (...=b+1,c=c+ [WHERE]...) -  will retry later, attempt 1 of 5
> {noformat}



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


[jira] [Updated] (CASSANDRA-12476) SyntaxException when COPY FROM Counter Table with Null value

2016-08-21 Thread Stefania (JIRA)

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

Stefania updated CASSANDRA-12476:
-
Status: Patch Available  (was: Reopened)

> SyntaxException when COPY FROM Counter Table with Null value
> 
>
> Key: CASSANDRA-12476
> URL: https://issues.apache.org/jira/browse/CASSANDRA-12476
> Project: Cassandra
>  Issue Type: Bug
>  Components: Tools
>Reporter: Ashraful Islam
>Assignee: Stefania
>Priority: Minor
>  Labels: cqlsh
> Fix For: 2.2.x, 3.0.x, 3.x
>
> Attachments: 
> Fix_issue___CASSANDRA_12476__SyntaxException_when_COPY_FROM_Counter_Table_with_Null_value.patch
>
>
> I have a simple counter table 
> {noformat}
> CREATE TABLE test (
> a int PRIMARY KEY,
> b counter,
> c counter
> ) ;
> {noformat}
> I have updated b column value with 
> {noformat}
> UPDATE test SET b = b + 1 WHERE a = 1;
> {noformat}
> Now I have export the data with 
> {noformat}
> COPY test TO 'test.csv';
> {noformat}
> And Import it with 
> {noformat}
> COPY test FROM 'test.csv';
> {noformat}
> I get this Error
> {noformat}
> Failed to import 1 rows: SyntaxException - line 1:34 no viable alternative at 
> input 'WHERE' (...=b+1,c=c+ [WHERE]...) -  will retry later, attempt 1 of 5
> {noformat}



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


[jira] [Assigned] (CASSANDRA-12499) Row cache does not cache partitions on tables without clustering keys

2016-08-21 Thread Jeff Jirsa (JIRA)

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

Jeff Jirsa reassigned CASSANDRA-12499:
--

Assignee: Jeff Jirsa

> Row cache does not cache partitions on tables without clustering keys
> -
>
> Key: CASSANDRA-12499
> URL: https://issues.apache.org/jira/browse/CASSANDRA-12499
> Project: Cassandra
>  Issue Type: Bug
>Reporter: Jeff Jirsa
>Assignee: Jeff Jirsa
>  Labels: Performance
>
> {code}
> MLSEA-JJIRSA01:~ jjirsa$ ccm start
> MLSEA-JJIRSA01:~ jjirsa$ echo "DESCRIBE TABLE test.test; " | ccm node1 cqlsh
> CREATE TABLE test.test (
> id int PRIMARY KEY,
> v text
> ) WITH bloom_filter_fp_chance = 0.01
> AND caching = {'keys': 'ALL', 'rows_per_partition': '100'}
> AND comment = ''
> AND compaction = {'class': 
> 'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy', 
> 'max_threshold': '32', 'min_threshold': '4'}
> AND compression = {'chunk_length_in_kb': '64', 'class': 
> 'org.apache.cassandra.io.compress.LZ4Compressor'}
> AND crc_check_chance = 1.0
> AND dclocal_read_repair_chance = 0.1
> AND default_time_to_live = 0
> AND gc_grace_seconds = 864000
> AND max_index_interval = 2048
> AND memtable_flush_period_in_ms = 0
> AND min_index_interval = 128
> AND read_repair_chance = 0.0
> AND speculative_retry = '99PERCENTILE';
> MLSEA-JJIRSA01:~ jjirsa$ ccm node1 nodetool info | grep Row
> Row Cache  : entries 0, size 0 bytes, capacity 100 MiB, 0 hits, 0 
> requests, NaN recent hit rate, 0 save period in seconds
> MLSEA-JJIRSA01:~ jjirsa$ echo "INSERT INTO test.test(id,v) VALUES(1, 'a'); " 
> | ccm node1 cqlsh
> MLSEA-JJIRSA01:~ jjirsa$ echo "SELECT * FROM test.test WHERE id=1; " | ccm 
> node1 cqlsh
>  id | v
> +---
>   1 | a
> (1 rows)
> MLSEA-JJIRSA01:~ jjirsa$ ccm node1 nodetool info | grep Row
> Row Cache  : entries 0, size 0 bytes, capacity 100 MiB, 0 hits, 0 
> requests, NaN recent hit rate, 0 save period in seconds
> MLSEA-JJIRSA01:~ jjirsa$ echo "SELECT * FROM test.test WHERE id=1; " | ccm 
> node1 cqlsh
>  id | v
> +---
>   1 | a
> (1 rows)
> MLSEA-JJIRSA01:~ jjirsa$ ccm node1 nodetool info | grep Row
> Row Cache  : entries 0, size 0 bytes, capacity 100 MiB, 0 hits, 0 
> requests, NaN recent hit rate, 0 save period in seconds
> MLSEA-JJIRSA01:~ jjirsa$
> {code}



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


[jira] [Updated] (CASSANDRA-12476) SyntaxException when COPY FROM Counter Table with Null value

2016-08-21 Thread Ashraful Islam (JIRA)

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

Ashraful Islam updated CASSANDRA-12476:
---
Resolution: Fixed
Status: Resolved  (was: Patch Available)

> SyntaxException when COPY FROM Counter Table with Null value
> 
>
> Key: CASSANDRA-12476
> URL: https://issues.apache.org/jira/browse/CASSANDRA-12476
> Project: Cassandra
>  Issue Type: Bug
>  Components: Tools
>Reporter: Ashraful Islam
>Assignee: Stefania
>Priority: Minor
>  Labels: cqlsh
> Fix For: 2.2.x, 3.0.x, 3.x
>
> Attachments: 
> Fix_issue___CASSANDRA_12476__SyntaxException_when_COPY_FROM_Counter_Table_with_Null_value.patch
>
>
> I have a simple counter table 
> {noformat}
> CREATE TABLE test (
> a int PRIMARY KEY,
> b counter,
> c counter
> ) ;
> {noformat}
> I have updated b column value with 
> {noformat}
> UPDATE test SET b = b + 1 WHERE a = 1;
> {noformat}
> Now I have export the data with 
> {noformat}
> COPY test TO 'test.csv';
> {noformat}
> And Import it with 
> {noformat}
> COPY test FROM 'test.csv';
> {noformat}
> I get this Error
> {noformat}
> Failed to import 1 rows: SyntaxException - line 1:34 no viable alternative at 
> input 'WHERE' (...=b+1,c=c+ [WHERE]...) -  will retry later, attempt 1 of 5
> {noformat}



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


[jira] [Updated] (CASSANDRA-12476) SyntaxException when COPY FROM Counter Table with Null value

2016-08-21 Thread Stefania (JIRA)

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

Stefania updated CASSANDRA-12476:
-
Fix Version/s: 2.2.x

> SyntaxException when COPY FROM Counter Table with Null value
> 
>
> Key: CASSANDRA-12476
> URL: https://issues.apache.org/jira/browse/CASSANDRA-12476
> Project: Cassandra
>  Issue Type: Bug
>  Components: Tools
>Reporter: Ashraful Islam
>Assignee: Stefania
>Priority: Minor
>  Labels: cqlsh
> Fix For: 2.2.x, 3.0.x, 3.x
>
> Attachments: 
> Fix_issue___CASSANDRA_12476__SyntaxException_when_COPY_FROM_Counter_Table_with_Null_value.patch
>
>
> I have a simple counter table 
> {noformat}
> CREATE TABLE test (
> a int PRIMARY KEY,
> b counter,
> c counter
> ) ;
> {noformat}
> I have updated b column value with 
> {noformat}
> UPDATE test SET b = b + 1 WHERE a = 1;
> {noformat}
> Now I have export the data with 
> {noformat}
> COPY test TO 'test.csv';
> {noformat}
> And Import it with 
> {noformat}
> COPY test FROM 'test.csv';
> {noformat}
> I get this Error
> {noformat}
> Failed to import 1 rows: SyntaxException - line 1:34 no viable alternative at 
> input 'WHERE' (...=b+1,c=c+ [WHERE]...) -  will retry later, attempt 1 of 5
> {noformat}



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


cassandra git commit: Define executeLocally() at the ReadQuery Level

2016-08-21 Thread stefania
Repository: cassandra
Updated Branches:
  refs/heads/trunk 21dda88ba -> f2d5cd0f7


Define executeLocally() at the ReadQuery Level

patch by Stefania Alborghetti; reviewed by Tyler Hobbs for CASSANDRA-12474


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

Branch: refs/heads/trunk
Commit: f2d5cd0f7e269ac6e048c8cdcf275db69591940e
Parents: 21dda88
Author: Stefania Alborghetti 
Authored: Wed Aug 17 17:45:34 2016 +0800
Committer: Stefania Alborghetti 
Committed: Mon Aug 22 12:21:30 2016 +0800

--
 CHANGES.txt |   1 +
 .../cassandra/db/ReadExecutionController.java   |   5 +
 src/java/org/apache/cassandra/db/ReadQuery.java |  14 ++
 .../db/SinglePartitionReadCommand.java  |  34 +++-
 .../UnfilteredPartitionIterators.java   |  20 +++
 .../apache/cassandra/db/ReadCommandTest.java| 161 ++-
 6 files changed, 230 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/f2d5cd0f/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index f46b23e..1c73c7d 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 3.10
+ * Define executeLocally() at the ReadQuery Level (CASSANDRA-12474)
  * Extend read/write failure messages with a map of replica addresses
to error codes in the v5 native protocol (CASSANDRA-12311)
  * Fix rebuild of SASI indexes with existing index files (CASSANDRA-12374)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/f2d5cd0f/src/java/org/apache/cassandra/db/ReadExecutionController.java
--
diff --git a/src/java/org/apache/cassandra/db/ReadExecutionController.java 
b/src/java/org/apache/cassandra/db/ReadExecutionController.java
index 7ddc8df..56bb0d3 100644
--- a/src/java/org/apache/cassandra/db/ReadExecutionController.java
+++ b/src/java/org/apache/cassandra/db/ReadExecutionController.java
@@ -120,6 +120,11 @@ public class ReadExecutionController implements 
AutoCloseable
 return index == null ? null : index.getBackingTable().orElse(null);
 }
 
+public CFMetaData metaData()
+{
+return baseMetadata;
+}
+
 public void close()
 {
 try

http://git-wip-us.apache.org/repos/asf/cassandra/blob/f2d5cd0f/src/java/org/apache/cassandra/db/ReadQuery.java
--
diff --git a/src/java/org/apache/cassandra/db/ReadQuery.java 
b/src/java/org/apache/cassandra/db/ReadQuery.java
index d74834c..c6b2b3e 100644
--- a/src/java/org/apache/cassandra/db/ReadQuery.java
+++ b/src/java/org/apache/cassandra/db/ReadQuery.java
@@ -50,6 +50,11 @@ public interface ReadQuery
 return EmptyIterators.partition();
 }
 
+public UnfilteredPartitionIterator 
executeLocally(ReadExecutionController executionController)
+{
+return 
EmptyIterators.unfilteredPartition(executionController.metaData(), false);
+}
+
 public DataLimits limits()
 {
 // What we return here doesn't matter much in practice. However, 
returning DataLimits.NONE means
@@ -105,6 +110,15 @@ public interface ReadQuery
 public PartitionIterator executeInternal(ReadExecutionController 
controller);
 
 /**
+ * Execute the query locally. This is similar to {@link 
ReadQuery#executeInternal(ReadExecutionController)}
+ * but it returns an unfiltered partition iterator that can be merged 
later on.
+ *
+ * @param controller the {@code ReadExecutionController} protecting the 
read.
+ * @return the result of the read query.
+ */
+public UnfilteredPartitionIterator executeLocally(ReadExecutionController 
executionController);
+
+/**
  * Returns a pager for the query.
  *
  * @param pagingState the {@code PagingState} to start from if this is a 
paging continuation. This can be

http://git-wip-us.apache.org/repos/asf/cassandra/blob/f2d5cd0f/src/java/org/apache/cassandra/db/SinglePartitionReadCommand.java
--
diff --git a/src/java/org/apache/cassandra/db/SinglePartitionReadCommand.java 
b/src/java/org/apache/cassandra/db/SinglePartitionReadCommand.java
index cea8c0c..ad73a17 100644
--- a/src/java/org/apache/cassandra/db/SinglePartitionReadCommand.java
+++ b/src/java/org/apache/cassandra/db/SinglePartitionReadCommand.java
@@ -20,10 +20,13 @@ package org.apache.cassandra.db;
 import java.io.IOException;
 import 

[jira] [Updated] (CASSANDRA-12476) SyntaxException when COPY FROM Counter Table with Null value

2016-08-21 Thread Stefania (JIRA)

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

Stefania updated CASSANDRA-12476:
-
Since Version: 2.1.12  (was: 3.0.0)

> SyntaxException when COPY FROM Counter Table with Null value
> 
>
> Key: CASSANDRA-12476
> URL: https://issues.apache.org/jira/browse/CASSANDRA-12476
> Project: Cassandra
>  Issue Type: Bug
>  Components: Tools
>Reporter: Ashraful Islam
>Assignee: Stefania
>Priority: Minor
>  Labels: cqlsh
> Fix For: 2.2.x, 3.0.x, 3.x
>
> Attachments: 
> Fix_issue___CASSANDRA_12476__SyntaxException_when_COPY_FROM_Counter_Table_with_Null_value.patch
>
>
> I have a simple counter table 
> {noformat}
> CREATE TABLE test (
> a int PRIMARY KEY,
> b counter,
> c counter
> ) ;
> {noformat}
> I have updated b column value with 
> {noformat}
> UPDATE test SET b = b + 1 WHERE a = 1;
> {noformat}
> Now I have export the data with 
> {noformat}
> COPY test TO 'test.csv';
> {noformat}
> And Import it with 
> {noformat}
> COPY test FROM 'test.csv';
> {noformat}
> I get this Error
> {noformat}
> Failed to import 1 rows: SyntaxException - line 1:34 no viable alternative at 
> input 'WHERE' (...=b+1,c=c+ [WHERE]...) -  will retry later, attempt 1 of 5
> {noformat}



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


[jira] [Updated] (CASSANDRA-12474) Define executeLocally() at the ReadQuery Level

2016-08-21 Thread Stefania (JIRA)

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

Stefania updated CASSANDRA-12474:
-
   Resolution: Fixed
Fix Version/s: (was: 3.x)
   3.10
   Status: Resolved  (was: Patch Available)

> Define executeLocally() at the ReadQuery Level
> --
>
> Key: CASSANDRA-12474
> URL: https://issues.apache.org/jira/browse/CASSANDRA-12474
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Local Write-Read Paths
>Reporter: Stefania
>Assignee: Stefania
> Fix For: 3.10
>
>
> We have {{execute}} and {{executeInternal}} at the {{ReadQuery}} level but 
> {{executeLocally}} is missing and this makes the abstraction incomplete.



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


[jira] [Commented] (CASSANDRA-12474) Define executeLocally() at the ReadQuery Level

2016-08-21 Thread Stefania (JIRA)

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

Stefania commented on CASSANDRA-12474:
--

We finally got a dtest build that completed all tests without problems, after 
fixing the test infrastructure problems of the last few days.

Committed to trunk as f2d5cd0f7e269ac6e048c8cdcf275db69591940e.

> Define executeLocally() at the ReadQuery Level
> --
>
> Key: CASSANDRA-12474
> URL: https://issues.apache.org/jira/browse/CASSANDRA-12474
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Local Write-Read Paths
>Reporter: Stefania
>Assignee: Stefania
> Fix For: 3.x
>
>
> We have {{execute}} and {{executeInternal}} at the {{ReadQuery}} level but 
> {{executeLocally}} is missing and this makes the abstraction incomplete.



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


[jira] [Assigned] (CASSANDRA-12476) SyntaxException when COPY FROM Counter Table with Null value

2016-08-21 Thread Stefania (JIRA)

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

Stefania reassigned CASSANDRA-12476:


Assignee: Stefania

> SyntaxException when COPY FROM Counter Table with Null value
> 
>
> Key: CASSANDRA-12476
> URL: https://issues.apache.org/jira/browse/CASSANDRA-12476
> Project: Cassandra
>  Issue Type: Bug
>  Components: Tools
>Reporter: Ashraful Islam
>Assignee: Stefania
>Priority: Minor
>  Labels: cqlsh
> Fix For: 3.0.x, 3.x
>
> Attachments: 
> Fix_issue___CASSANDRA_12476__SyntaxException_when_COPY_FROM_Counter_Table_with_Null_value.patch
>
>
> I have a simple counter table 
> {noformat}
> CREATE TABLE test (
> a int PRIMARY KEY,
> b counter,
> c counter
> ) ;
> {noformat}
> I have updated b column value with 
> {noformat}
> UPDATE test SET b = b + 1 WHERE a = 1;
> {noformat}
> Now I have export the data with 
> {noformat}
> COPY test TO 'test.csv';
> {noformat}
> And Import it with 
> {noformat}
> COPY test FROM 'test.csv';
> {noformat}
> I get this Error
> {noformat}
> Failed to import 1 rows: SyntaxException - line 1:34 no viable alternative at 
> input 'WHERE' (...=b+1,c=c+ [WHERE]...) -  will retry later, attempt 1 of 5
> {noformat}



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


[jira] [Commented] (CASSANDRA-12476) SyntaxException when COPY FROM Counter Table with Null value

2016-08-21 Thread Stefania (JIRA)

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

Stefania commented on CASSANDRA-12476:
--

Thank you for the patch but, unless it's absolutely necessary that the missing 
counter stays as null, I prefer to fix this by changing counter null values to 
zero. The reason is that this is consistent with how we handle null values 
elsewhere. Also, if we skip null values, then the patch needs to be enhanced to 
cope with an empty set clause.

Here is my suggested patch:

||2.2||3.0||3.9||trunk||
|[patch|https://github.com/stef1927/cassandra/commits/12476-cqlsh-2.2]|[patch|https://github.com/stef1927/cassandra/commits/12476-cqlsh-3.0]|[patch|https://github.com/stef1927/cassandra/commits/12476-cqlsh-3.9]|[patch|https://github.com/stef1927/cassandra/commits/12476-cqlsh]|
|[dtest|http://cassci.datastax.com/view/Dev/view/stef1927/job/stef1927-12476-cqlsh-2.2-cqlsh-tests/]|[dtest|http://cassci.datastax.com/view/Dev/view/stef1927/job/stef1927-12476-cqlsh-3.0-cqlsh-tests/]|[dtest|http://cassci.datastax.com/view/Dev/view/stef1927/job/stef1927-12476-cqlsh-3.9-cqlsh-tests/]|[dtest|http://cassci.datastax.com/view/Dev/view/stef1927/job/stef1927-12476-cqlsh-cqlsh-tests/]|

Here is the test to reproduce the problem: 
https://github.com/stef1927/cassandra-dtest/commits/12476

We possibly have CASSANDRA-12471 related to this, where we would skip null 
values rather then insert them as null or zero, although I'm still clarifying 
if that's the exact requirement for that ticket.

> SyntaxException when COPY FROM Counter Table with Null value
> 
>
> Key: CASSANDRA-12476
> URL: https://issues.apache.org/jira/browse/CASSANDRA-12476
> Project: Cassandra
>  Issue Type: Bug
>  Components: Tools
>Reporter: Ashraful Islam
>Priority: Minor
>  Labels: cqlsh
> Fix For: 3.0.x, 3.x
>
> Attachments: 
> Fix_issue___CASSANDRA_12476__SyntaxException_when_COPY_FROM_Counter_Table_with_Null_value.patch
>
>
> I have a simple counter table 
> {noformat}
> CREATE TABLE test (
> a int PRIMARY KEY,
> b counter,
> c counter
> ) ;
> {noformat}
> I have updated b column value with 
> {noformat}
> UPDATE test SET b = b + 1 WHERE a = 1;
> {noformat}
> Now I have export the data with 
> {noformat}
> COPY test TO 'test.csv';
> {noformat}
> And Import it with 
> {noformat}
> COPY test FROM 'test.csv';
> {noformat}
> I get this Error
> {noformat}
> Failed to import 1 rows: SyntaxException - line 1:34 no viable alternative at 
> input 'WHERE' (...=b+1,c=c+ [WHERE]...) -  will retry later, attempt 1 of 5
> {noformat}



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


[jira] [Updated] (CASSANDRA-12476) SyntaxException when COPY FROM Counter Table with Null value

2016-08-21 Thread Stefania (JIRA)

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

Stefania updated CASSANDRA-12476:
-
Reviewer:   (was: Stefania)

> SyntaxException when COPY FROM Counter Table with Null value
> 
>
> Key: CASSANDRA-12476
> URL: https://issues.apache.org/jira/browse/CASSANDRA-12476
> Project: Cassandra
>  Issue Type: Bug
>  Components: Tools
>Reporter: Ashraful Islam
>Priority: Minor
>  Labels: cqlsh
> Fix For: 3.0.x, 3.x
>
> Attachments: 
> Fix_issue___CASSANDRA_12476__SyntaxException_when_COPY_FROM_Counter_Table_with_Null_value.patch
>
>
> I have a simple counter table 
> {noformat}
> CREATE TABLE test (
> a int PRIMARY KEY,
> b counter,
> c counter
> ) ;
> {noformat}
> I have updated b column value with 
> {noformat}
> UPDATE test SET b = b + 1 WHERE a = 1;
> {noformat}
> Now I have export the data with 
> {noformat}
> COPY test TO 'test.csv';
> {noformat}
> And Import it with 
> {noformat}
> COPY test FROM 'test.csv';
> {noformat}
> I get this Error
> {noformat}
> Failed to import 1 rows: SyntaxException - line 1:34 no viable alternative at 
> input 'WHERE' (...=b+1,c=c+ [WHERE]...) -  will retry later, attempt 1 of 5
> {noformat}



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


[jira] [Commented] (CASSANDRA-12471) Allow for some form of "unset" in CQL's COPY command.

2016-08-21 Thread Stefania (JIRA)

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

Stefania commented on CASSANDRA-12471:
--

Do you mean that you would like COPY FROM to skip values that are null in the 
csv file rather than inserting them as nulls or something else?

> Allow for some form of "unset" in CQL's COPY command.
> -
>
> Key: CASSANDRA-12471
> URL: https://issues.apache.org/jira/browse/CASSANDRA-12471
> Project: Cassandra
>  Issue Type: New Feature
>  Components: CQL
>Reporter: Nate Sanders
>Priority: Minor
> Fix For: 2.2.0
>
>
> Currently, it looks like there's no way to get "unset" values via the COPY 
> command, say, for example with empty string fields.  Instead, these create 
> tombstones.



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


[jira] [Commented] (CASSANDRA-12490) Add sequence distribution type to cassandra stress

2016-08-21 Thread Ben Slater (JIRA)

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

Ben Slater commented on CASSANDRA-12490:


I'm pretty sure my implementation of inverseCumProb() is incorrect but it 
doesn't appear this practically matters. Happy to update if someone can explain 
what it's supposed to be returning.

> Add sequence distribution type to cassandra stress
> --
>
> Key: CASSANDRA-12490
> URL: https://issues.apache.org/jira/browse/CASSANDRA-12490
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Tools
>Reporter: Ben Slater
>Assignee: Ben Slater
>Priority: Minor
> Fix For: 3.x
>
> Attachments: 12490-trunk.patch
>
>
> When using the write command, cassandra stress sequentially generates seeds. 
> This ensures generated values don't overlap (unless the sequence wraps) 
> providing more predictable number of inserted records (and generating a base 
> set of data without wasted writes).
> When using a yaml stress spec there is no sequenced distribution available. 
> It think it would be useful to have this for doing initial load of data for 
> testing 



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


[jira] [Updated] (CASSANDRA-12476) SyntaxException when COPY FROM Counter Table with Null value

2016-08-21 Thread Stefania (JIRA)

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

Stefania updated CASSANDRA-12476:
-
Assignee: (was: Stefania)
Reviewer: Stefania

> SyntaxException when COPY FROM Counter Table with Null value
> 
>
> Key: CASSANDRA-12476
> URL: https://issues.apache.org/jira/browse/CASSANDRA-12476
> Project: Cassandra
>  Issue Type: Bug
>  Components: Tools
>Reporter: Ashraful Islam
>Priority: Minor
>  Labels: cqlsh
> Fix For: 3.0.x, 3.x
>
> Attachments: 
> Fix_issue___CASSANDRA_12476__SyntaxException_when_COPY_FROM_Counter_Table_with_Null_value.patch
>
>
> I have a simple counter table 
> {noformat}
> CREATE TABLE test (
> a int PRIMARY KEY,
> b counter,
> c counter
> ) ;
> {noformat}
> I have updated b column value with 
> {noformat}
> UPDATE test SET b = b + 1 WHERE a = 1;
> {noformat}
> Now I have export the data with 
> {noformat}
> COPY test TO 'test.csv';
> {noformat}
> And Import it with 
> {noformat}
> COPY test FROM 'test.csv';
> {noformat}
> I get this Error
> {noformat}
> Failed to import 1 rows: SyntaxException - line 1:34 no viable alternative at 
> input 'WHERE' (...=b+1,c=c+ [WHERE]...) -  will retry later, attempt 1 of 5
> {noformat}



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


[jira] [Commented] (CASSANDRA-11090) Hinted Handoff loop

2016-08-21 Thread Cameron Zemek (JIRA)

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

Cameron Zemek commented on CASSANDRA-11090:
---

In both 3.5 and 3.7 we seeing hinted handoff loop

Aug 04 07:20:33 ip-10-222-104-29.ec2.internal cassandra[31062]: INFO  
o.a.c.hints.HintsDispatchExecutor Finished hinted handoff of file 
4566c9ad-69df-45fd-84d2-6386072d3efa-1470295200416-1.hints to endpoint 
4566c9ad-69df-45fd-84d2-6386072d3efa
Aug 04 07:21:03 ip-10-222-104-29.ec2.internal cassandra[31062]: INFO  
o.apache.cassandra.hints.HintsStore Deleted hint file 
4566c9ad-69df-45fd-84d2-6386072d3efa-1470295230416-1.hints
Aug 04 07:21:03 ip-10-222-104-29.ec2.internal cassandra[31062]: INFO  
o.a.c.hints.HintsDispatchExecutor Finished hinted handoff of file 
4566c9ad-69df-45fd-84d2-6386072d3efa-1470295230416-1.hints to endpoint 
4566c9ad-69df-45fd-84d2-6386072d3efa
Aug 04 07:21:33 ip-10-222-104-29.ec2.internal cassandra[31062]: INFO  
o.apache.cassandra.hints.HintsStore Deleted hint file 
4566c9ad-69df-45fd-84d2-6386072d3efa-1470295260416-1.hints

and it just keeps repeating this. Have to rolling restart the cluster to 
resolve. Waiting for it to happen again to collect more information on the 
cause for this loop.

> Hinted Handoff loop
> ---
>
> Key: CASSANDRA-11090
> URL: https://issues.apache.org/jira/browse/CASSANDRA-11090
> Project: Cassandra
>  Issue Type: Bug
>Reporter: Blake Eggleston
>Assignee: Aleksey Yeschenko
>Priority: Minor
> Fix For: 3.0.4, 3.4
>
>
> After the hints executor finishes sending hints, another hints file is 
> created for the same host, which is then processed on the next go around. 
> This continues indefinitely. The new hint files are empty, so there shouldn't 
> be any network traffic. However, there's still unnecessary hint activity, and 
> the hint crc file isn't deleted in the 3.0 branch after hints are dispatched 
> (but is in trunk), so any hint activity will trigger ~8640 files being 
> created per day until the node is restarted. Restarting the node fixes the 
> problem, after the existing hint files are processed. 
> This can be duplicated on cassandra-3.0 to trunk with this script: 
> https://gist.github.com/bdeggleston/13fbb9e70c0c0bd277c7



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


[jira] [Updated] (CASSANDRA-11701) [windows] dtest failure in cqlsh_tests.cqlsh_copy_tests.CqlshCopyTest.test_reading_with_skip_and_max_rows

2016-08-21 Thread Stefania (JIRA)

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

Stefania updated CASSANDRA-11701:
-
   Resolution: Fixed
Fix Version/s: 3.8
   3.0.9
   2.2.8
   Status: Resolved  (was: Ready to Commit)

> [windows] dtest failure in 
> cqlsh_tests.cqlsh_copy_tests.CqlshCopyTest.test_reading_with_skip_and_max_rows
> -
>
> Key: CASSANDRA-11701
> URL: https://issues.apache.org/jira/browse/CASSANDRA-11701
> Project: Cassandra
>  Issue Type: Test
>  Components: Tools
>Reporter: Russ Hatch
>Assignee: Stefania
>  Labels: dtest, windows
> Fix For: 2.2.8, 3.0.9, 3.8
>
>
> looks to be an assertion problem, so could be test or cassandra related:
> e.g.:
> {noformat}
> 1 != 331
> {noformat}
> http://cassci.datastax.com/job/trunk_dtest_win32/404/testReport/cqlsh_tests.cqlsh_copy_tests/CqlshCopyTest/test_reading_with_skip_and_max_rows
> Failed on CassCI build trunk_dtest_win32 #404



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


[jira] [Updated] (CASSANDRA-11701) [windows] dtest failure in cqlsh_tests.cqlsh_copy_tests.CqlshCopyTest.test_reading_with_skip_and_max_rows

2016-08-21 Thread Stefania (JIRA)

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

Stefania updated CASSANDRA-11701:
-
Component/s: Tools

> [windows] dtest failure in 
> cqlsh_tests.cqlsh_copy_tests.CqlshCopyTest.test_reading_with_skip_and_max_rows
> -
>
> Key: CASSANDRA-11701
> URL: https://issues.apache.org/jira/browse/CASSANDRA-11701
> Project: Cassandra
>  Issue Type: Test
>  Components: Tools
>Reporter: Russ Hatch
>Assignee: Stefania
>  Labels: dtest, windows
> Fix For: 2.2.8, 3.0.9, 3.8
>
>
> looks to be an assertion problem, so could be test or cassandra related:
> e.g.:
> {noformat}
> 1 != 331
> {noformat}
> http://cassci.datastax.com/job/trunk_dtest_win32/404/testReport/cqlsh_tests.cqlsh_copy_tests/CqlshCopyTest/test_reading_with_skip_and_max_rows
> Failed on CassCI build trunk_dtest_win32 #404



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


[jira] [Commented] (CASSANDRA-11701) [windows] dtest failure in cqlsh_tests.cqlsh_copy_tests.CqlshCopyTest.test_reading_with_skip_and_max_rows

2016-08-21 Thread Stefania (JIRA)

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

Stefania commented on CASSANDRA-11701:
--

Thanks for the review Paulo, committed to 2.2 as 
59da27560c1532bb4956c661da25992840996706 and merged into 3.0, 3.8, 3.9 and 
trunk.

> [windows] dtest failure in 
> cqlsh_tests.cqlsh_copy_tests.CqlshCopyTest.test_reading_with_skip_and_max_rows
> -
>
> Key: CASSANDRA-11701
> URL: https://issues.apache.org/jira/browse/CASSANDRA-11701
> Project: Cassandra
>  Issue Type: Test
>Reporter: Russ Hatch
>Assignee: Stefania
>  Labels: dtest, windows
>
> looks to be an assertion problem, so could be test or cassandra related:
> e.g.:
> {noformat}
> 1 != 331
> {noformat}
> http://cassci.datastax.com/job/trunk_dtest_win32/404/testReport/cqlsh_tests.cqlsh_copy_tests/CqlshCopyTest/test_reading_with_skip_and_max_rows
> Failed on CassCI build trunk_dtest_win32 #404



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


[06/15] cassandra git commit: Merge branch 'cassandra-2.2' into cassandra-3.0

2016-08-21 Thread stefania
Merge branch 'cassandra-2.2' into cassandra-3.0


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

Branch: refs/heads/trunk
Commit: a86ddac344652d24ab3d524d4648b29368619f6c
Parents: 7e19dc1 59da275
Author: Stefania Alborghetti 
Authored: Mon Aug 22 09:02:23 2016 +0800
Committer: Stefania Alborghetti 
Committed: Mon Aug 22 09:02:23 2016 +0800

--
 CHANGES.txt|   1 +
 pylib/cqlshlib/copyutil.py | 151 +---
 2 files changed, 95 insertions(+), 57 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/a86ddac3/CHANGES.txt
--
diff --cc CHANGES.txt
index 7605952,d28e419..07ee59f
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,41 -1,5 +1,42 @@@
 -2.2.8
 +3.0.9
 + * Add schema to snapshot manifest, add USING TIMESTAMP clause to ALTER TABLE 
statements (CASSANDRA-7190)
 + * Fix clean interval not sent to commit log for empty memtable flush 
(CASSANDRA-12436)
 + * Fix potential resource leak in RMIServerSocketFactoryImpl (CASSANDRA-12331)
 + * Backport CASSANDRA-12002 (CASSANDRA-12177)
 + * Make sure compaction stats are updated when compaction is interrupted 
(CASSANDRA-12100)
 + * Fix potential bad messaging service message for paged range reads
 +   within mixed-version 3.x clusters (CASSANDRA-12249)
 + * Change commitlog and sstables to track dirty and clean intervals 
(CASSANDRA-11828)
 + * NullPointerException during compaction on table with static columns 
(CASSANDRA-12336)
 + * Fixed ConcurrentModificationException when reading metrics in 
GraphiteReporter (CASSANDRA-11823)
 + * Fix upgrade of super columns on thrift (CASSANDRA-12335)
 + * Fixed flacky BlacklistingCompactionsTest, switched to fixed size types and 
increased corruption size (CASSANDRA-12359)
 + * Rerun ReplicationAwareTokenAllocatorTest on failure to avoid flakiness 
(CASSANDRA-12277)
 + * Exception when computing read-repair for range tombstones (CASSANDRA-12263)
 + * Lost counter writes in compact table and static columns (CASSANDRA-12219)
 + * AssertionError with MVs on updating a row that isn't indexed due to a null 
value (CASSANDRA-12247)
 + * Disable RR and speculative retry with EACH_QUORUM reads (CASSANDRA-11980)
 + * Add option to override compaction space check (CASSANDRA-12180)
 + * Faster startup by only scanning each directory for temporary files once 
(CASSANDRA-12114)
 + * Respond with v1/v2 protocol header when responding to driver that attempts
 +   to connect with too low of a protocol version (CASSANDRA-11464)
 + * NullPointerExpception when reading/compacting table (CASSANDRA-11988)
 + * Fix problem with undeleteable rows on upgrade to new sstable format 
(CASSANDRA-12144)
 + * Fix paging logic for deleted partitions with static columns 
(CASSANDRA-12107)
 + * Wait until the message is being send to decide which serializer must be 
used (CASSANDRA-11393)
 + * Fix migration of static thrift column names with non-text comparators 
(CASSANDRA-12147)
 + * Fix upgrading sparse tables that are incorrectly marked as dense 
(CASSANDRA-11315)
 + * Fix reverse queries ignoring range tombstones (CASSANDRA-11733)
 + * Avoid potential race when rebuilding CFMetaData (CASSANDRA-12098)
 + * Avoid missing sstables when getting the canonical sstables 
(CASSANDRA-11996)
 + * Always select the live sstables when getting sstables in bounds 
(CASSANDRA-11944)
 + * Fix column ordering of results with static columns for Thrift requests in
 +   a mixed 2.x/3.x cluster, also fix potential non-resolved duplication of
 +   those static columns in query results (CASSANDRA-12123)
 + * Avoid digest mismatch with empty but static rows (CASSANDRA-12090)
 + * Fix EOF exception when altering column type (CASSANDRA-11820)
 +Merged from 2.2:
+  * cqlsh copy: fixed possible race in initializing feeding thread 
(CASSANDRA-11701)
   * Only set broadcast_rpc_address on Ec2MultiRegionSnitch if it's not set 
(CASSANDRA-11357)
   * Update StorageProxy range metrics for timeouts, failures and unavailables 
(CASSANDRA-9507)
   * Add Sigar to classes included in clientutil.jar (CASSANDRA-11635)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/a86ddac3/pylib/cqlshlib/copyutil.py
--



[02/15] cassandra git commit: cqlsh copy: fixed possible race in initializing feeding thread

2016-08-21 Thread stefania
cqlsh copy: fixed possible race in initializing feeding thread

patch by Stefania Alborghetti; reviewed by Paulo Motta for CASSANDRA-11701


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

Branch: refs/heads/cassandra-3.0
Commit: 59da27560c1532bb4956c661da25992840996706
Parents: f03b10c
Author: Stefania Alborghetti 
Authored: Tue May 3 09:46:33 2016 +0800
Committer: Stefania Alborghetti 
Committed: Mon Aug 22 09:00:49 2016 +0800

--
 CHANGES.txt|   1 +
 pylib/cqlshlib/copyutil.py | 151 +---
 2 files changed, 95 insertions(+), 57 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/59da2756/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index c421398..d28e419 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.2.8
+ * cqlsh copy: fixed possible race in initializing feeding thread 
(CASSANDRA-11701)
  * Only set broadcast_rpc_address on Ec2MultiRegionSnitch if it's not set 
(CASSANDRA-11357)
  * Update StorageProxy range metrics for timeouts, failures and unavailables 
(CASSANDRA-9507)
  * Add Sigar to classes included in clientutil.jar (CASSANDRA-11635)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/59da2756/pylib/cqlshlib/copyutil.py
--
diff --git a/pylib/cqlshlib/copyutil.py b/pylib/cqlshlib/copyutil.py
index 14172ef..460ae6a 100644
--- a/pylib/cqlshlib/copyutil.py
+++ b/pylib/cqlshlib/copyutil.py
@@ -83,7 +83,7 @@ def printmsg(msg, eol='\n', encoding='utf8'):
 sys.stdout.flush()
 
 
-class OneWayChannel(object):
+class OneWayPipe(object):
 """
 A one way pipe protected by two process level locks, one for reading and 
one for writing.
 """
@@ -91,27 +91,47 @@ class OneWayChannel(object):
 self.reader, self.writer = mp.Pipe(duplex=False)
 self.rlock = mp.Lock()
 self.wlock = mp.Lock()
-self.feeding_thread = None
-self.pending_messages = None
 
-def init_feeding_thread(self):
-"""
-Initialize a thread that fetches messages from a queue and sends them 
to the channel.
-We initialize the feeding thread lazily to avoid the fork(), since the 
channels are passed to child processes.
-"""
-if self.feeding_thread is not None or self.pending_messages is not 
None:
-raise RuntimeError("Feeding thread already initialized")
+def send(self, obj):
+with self.wlock:
+self.writer.send(obj)
+
+def recv(self):
+with self.rlock:
+return self.reader.recv()
+
+def close(self):
+self.reader.close()
+self.writer.close()
 
+
+class ReceivingChannel(object):
+"""
+A one way channel that wraps a pipe to receive messages.
+"""
+def __init__(self, pipe):
+self.pipe = pipe
+
+def recv(self):
+return self.pipe.recv()
+
+def close(self):
+self.pipe.close()
+
+
+class SendingChannel(object):
+"""
+A one way channel that wraps a pipe and provides a feeding thread to send 
messages asynchronously.
+"""
+def __init__(self, pipe):
+self.pipe = pipe
 self.pending_messages = Queue()
 
 def feed():
-send = self._send
-pending_messages = self.pending_messages
-
 while True:
 try:
-msg = pending_messages.get()
-send(msg)
+msg = self.pending_messages.get()
+self.pipe.send(msg)
 except Exception, e:
 printmsg('%s: %s' % (e.__class__.__name__, e.message))
 
@@ -119,39 +139,43 @@ class OneWayChannel(object):
 feeding_thread.setDaemon(True)
 feeding_thread.start()
 
-self.feeding_thread = feeding_thread
-
 def send(self, obj):
-if self.feeding_thread is None:
-self.init_feeding_thread()
-
 self.pending_messages.put(obj)
 
-def _send(self, obj):
-with self.wlock:
-self.writer.send(obj)
-
 def num_pending(self):
 return self.pending_messages.qsize() if self.pending_messages else 0
 
-def recv(self):
-with self.rlock:
-return self.reader.recv()
+def close(self):
+self.pipe.close()
+
+
+class SendingChannels(object):
+"""
+A group of one way channels for sending messages.
+"""
+def __init__(self, num_channels):
+self.pipes = 

[03/15] cassandra git commit: cqlsh copy: fixed possible race in initializing feeding thread

2016-08-21 Thread stefania
cqlsh copy: fixed possible race in initializing feeding thread

patch by Stefania Alborghetti; reviewed by Paulo Motta for CASSANDRA-11701


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

Branch: refs/heads/trunk
Commit: 59da27560c1532bb4956c661da25992840996706
Parents: f03b10c
Author: Stefania Alborghetti 
Authored: Tue May 3 09:46:33 2016 +0800
Committer: Stefania Alborghetti 
Committed: Mon Aug 22 09:00:49 2016 +0800

--
 CHANGES.txt|   1 +
 pylib/cqlshlib/copyutil.py | 151 +---
 2 files changed, 95 insertions(+), 57 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/59da2756/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index c421398..d28e419 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.2.8
+ * cqlsh copy: fixed possible race in initializing feeding thread 
(CASSANDRA-11701)
  * Only set broadcast_rpc_address on Ec2MultiRegionSnitch if it's not set 
(CASSANDRA-11357)
  * Update StorageProxy range metrics for timeouts, failures and unavailables 
(CASSANDRA-9507)
  * Add Sigar to classes included in clientutil.jar (CASSANDRA-11635)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/59da2756/pylib/cqlshlib/copyutil.py
--
diff --git a/pylib/cqlshlib/copyutil.py b/pylib/cqlshlib/copyutil.py
index 14172ef..460ae6a 100644
--- a/pylib/cqlshlib/copyutil.py
+++ b/pylib/cqlshlib/copyutil.py
@@ -83,7 +83,7 @@ def printmsg(msg, eol='\n', encoding='utf8'):
 sys.stdout.flush()
 
 
-class OneWayChannel(object):
+class OneWayPipe(object):
 """
 A one way pipe protected by two process level locks, one for reading and 
one for writing.
 """
@@ -91,27 +91,47 @@ class OneWayChannel(object):
 self.reader, self.writer = mp.Pipe(duplex=False)
 self.rlock = mp.Lock()
 self.wlock = mp.Lock()
-self.feeding_thread = None
-self.pending_messages = None
 
-def init_feeding_thread(self):
-"""
-Initialize a thread that fetches messages from a queue and sends them 
to the channel.
-We initialize the feeding thread lazily to avoid the fork(), since the 
channels are passed to child processes.
-"""
-if self.feeding_thread is not None or self.pending_messages is not 
None:
-raise RuntimeError("Feeding thread already initialized")
+def send(self, obj):
+with self.wlock:
+self.writer.send(obj)
+
+def recv(self):
+with self.rlock:
+return self.reader.recv()
+
+def close(self):
+self.reader.close()
+self.writer.close()
 
+
+class ReceivingChannel(object):
+"""
+A one way channel that wraps a pipe to receive messages.
+"""
+def __init__(self, pipe):
+self.pipe = pipe
+
+def recv(self):
+return self.pipe.recv()
+
+def close(self):
+self.pipe.close()
+
+
+class SendingChannel(object):
+"""
+A one way channel that wraps a pipe and provides a feeding thread to send 
messages asynchronously.
+"""
+def __init__(self, pipe):
+self.pipe = pipe
 self.pending_messages = Queue()
 
 def feed():
-send = self._send
-pending_messages = self.pending_messages
-
 while True:
 try:
-msg = pending_messages.get()
-send(msg)
+msg = self.pending_messages.get()
+self.pipe.send(msg)
 except Exception, e:
 printmsg('%s: %s' % (e.__class__.__name__, e.message))
 
@@ -119,39 +139,43 @@ class OneWayChannel(object):
 feeding_thread.setDaemon(True)
 feeding_thread.start()
 
-self.feeding_thread = feeding_thread
-
 def send(self, obj):
-if self.feeding_thread is None:
-self.init_feeding_thread()
-
 self.pending_messages.put(obj)
 
-def _send(self, obj):
-with self.wlock:
-self.writer.send(obj)
-
 def num_pending(self):
 return self.pending_messages.qsize() if self.pending_messages else 0
 
-def recv(self):
-with self.rlock:
-return self.reader.recv()
+def close(self):
+self.pipe.close()
+
+
+class SendingChannels(object):
+"""
+A group of one way channels for sending messages.
+"""
+def __init__(self, num_channels):
+self.pipes = 

[11/15] cassandra git commit: Merge branch 'cassandra-3.0' into cassandra-3.8

2016-08-21 Thread stefania
Merge branch 'cassandra-3.0' into cassandra-3.8


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

Branch: refs/heads/cassandra-3.9
Commit: 2b8672d2a3c6b4d96e119eaeb2e5bd445ebb5790
Parents: 6230021 a86ddac
Author: Stefania Alborghetti 
Authored: Mon Aug 22 09:06:18 2016 +0800
Committer: Stefania Alborghetti 
Committed: Mon Aug 22 09:06:18 2016 +0800

--
 CHANGES.txt|   1 +
 pylib/cqlshlib/copyutil.py | 151 +---
 2 files changed, 95 insertions(+), 57 deletions(-)
--


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

http://git-wip-us.apache.org/repos/asf/cassandra/blob/2b8672d2/pylib/cqlshlib/copyutil.py
--



[10/15] cassandra git commit: Merge branch 'cassandra-3.0' into cassandra-3.8

2016-08-21 Thread stefania
Merge branch 'cassandra-3.0' into cassandra-3.8


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

Branch: refs/heads/trunk
Commit: 2b8672d2a3c6b4d96e119eaeb2e5bd445ebb5790
Parents: 6230021 a86ddac
Author: Stefania Alborghetti 
Authored: Mon Aug 22 09:06:18 2016 +0800
Committer: Stefania Alborghetti 
Committed: Mon Aug 22 09:06:18 2016 +0800

--
 CHANGES.txt|   1 +
 pylib/cqlshlib/copyutil.py | 151 +---
 2 files changed, 95 insertions(+), 57 deletions(-)
--


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

http://git-wip-us.apache.org/repos/asf/cassandra/blob/2b8672d2/pylib/cqlshlib/copyutil.py
--



[04/15] cassandra git commit: cqlsh copy: fixed possible race in initializing feeding thread

2016-08-21 Thread stefania
cqlsh copy: fixed possible race in initializing feeding thread

patch by Stefania Alborghetti; reviewed by Paulo Motta for CASSANDRA-11701


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

Branch: refs/heads/cassandra-3.8
Commit: 59da27560c1532bb4956c661da25992840996706
Parents: f03b10c
Author: Stefania Alborghetti 
Authored: Tue May 3 09:46:33 2016 +0800
Committer: Stefania Alborghetti 
Committed: Mon Aug 22 09:00:49 2016 +0800

--
 CHANGES.txt|   1 +
 pylib/cqlshlib/copyutil.py | 151 +---
 2 files changed, 95 insertions(+), 57 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/59da2756/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index c421398..d28e419 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.2.8
+ * cqlsh copy: fixed possible race in initializing feeding thread 
(CASSANDRA-11701)
  * Only set broadcast_rpc_address on Ec2MultiRegionSnitch if it's not set 
(CASSANDRA-11357)
  * Update StorageProxy range metrics for timeouts, failures and unavailables 
(CASSANDRA-9507)
  * Add Sigar to classes included in clientutil.jar (CASSANDRA-11635)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/59da2756/pylib/cqlshlib/copyutil.py
--
diff --git a/pylib/cqlshlib/copyutil.py b/pylib/cqlshlib/copyutil.py
index 14172ef..460ae6a 100644
--- a/pylib/cqlshlib/copyutil.py
+++ b/pylib/cqlshlib/copyutil.py
@@ -83,7 +83,7 @@ def printmsg(msg, eol='\n', encoding='utf8'):
 sys.stdout.flush()
 
 
-class OneWayChannel(object):
+class OneWayPipe(object):
 """
 A one way pipe protected by two process level locks, one for reading and 
one for writing.
 """
@@ -91,27 +91,47 @@ class OneWayChannel(object):
 self.reader, self.writer = mp.Pipe(duplex=False)
 self.rlock = mp.Lock()
 self.wlock = mp.Lock()
-self.feeding_thread = None
-self.pending_messages = None
 
-def init_feeding_thread(self):
-"""
-Initialize a thread that fetches messages from a queue and sends them 
to the channel.
-We initialize the feeding thread lazily to avoid the fork(), since the 
channels are passed to child processes.
-"""
-if self.feeding_thread is not None or self.pending_messages is not 
None:
-raise RuntimeError("Feeding thread already initialized")
+def send(self, obj):
+with self.wlock:
+self.writer.send(obj)
+
+def recv(self):
+with self.rlock:
+return self.reader.recv()
+
+def close(self):
+self.reader.close()
+self.writer.close()
 
+
+class ReceivingChannel(object):
+"""
+A one way channel that wraps a pipe to receive messages.
+"""
+def __init__(self, pipe):
+self.pipe = pipe
+
+def recv(self):
+return self.pipe.recv()
+
+def close(self):
+self.pipe.close()
+
+
+class SendingChannel(object):
+"""
+A one way channel that wraps a pipe and provides a feeding thread to send 
messages asynchronously.
+"""
+def __init__(self, pipe):
+self.pipe = pipe
 self.pending_messages = Queue()
 
 def feed():
-send = self._send
-pending_messages = self.pending_messages
-
 while True:
 try:
-msg = pending_messages.get()
-send(msg)
+msg = self.pending_messages.get()
+self.pipe.send(msg)
 except Exception, e:
 printmsg('%s: %s' % (e.__class__.__name__, e.message))
 
@@ -119,39 +139,43 @@ class OneWayChannel(object):
 feeding_thread.setDaemon(True)
 feeding_thread.start()
 
-self.feeding_thread = feeding_thread
-
 def send(self, obj):
-if self.feeding_thread is None:
-self.init_feeding_thread()
-
 self.pending_messages.put(obj)
 
-def _send(self, obj):
-with self.wlock:
-self.writer.send(obj)
-
 def num_pending(self):
 return self.pending_messages.qsize() if self.pending_messages else 0
 
-def recv(self):
-with self.rlock:
-return self.reader.recv()
+def close(self):
+self.pipe.close()
+
+
+class SendingChannels(object):
+"""
+A group of one way channels for sending messages.
+"""
+def __init__(self, num_channels):
+self.pipes = 

[14/15] cassandra git commit: Merge branch 'cassandra-3.8' into cassandra-3.9

2016-08-21 Thread stefania
Merge branch 'cassandra-3.8' into cassandra-3.9


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

Branch: refs/heads/trunk
Commit: bd2b73b29f85d87299fe6e5dccc5da87e7e0ac35
Parents: c3a5fc0 2b8672d
Author: Stefania Alborghetti 
Authored: Mon Aug 22 09:07:03 2016 +0800
Committer: Stefania Alborghetti 
Committed: Mon Aug 22 09:07:03 2016 +0800

--
 CHANGES.txt|   1 +
 pylib/cqlshlib/copyutil.py | 151 +---
 2 files changed, 95 insertions(+), 57 deletions(-)
--


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



[08/15] cassandra git commit: Merge branch 'cassandra-2.2' into cassandra-3.0

2016-08-21 Thread stefania
Merge branch 'cassandra-2.2' into cassandra-3.0


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

Branch: refs/heads/cassandra-3.8
Commit: a86ddac344652d24ab3d524d4648b29368619f6c
Parents: 7e19dc1 59da275
Author: Stefania Alborghetti 
Authored: Mon Aug 22 09:02:23 2016 +0800
Committer: Stefania Alborghetti 
Committed: Mon Aug 22 09:02:23 2016 +0800

--
 CHANGES.txt|   1 +
 pylib/cqlshlib/copyutil.py | 151 +---
 2 files changed, 95 insertions(+), 57 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/a86ddac3/CHANGES.txt
--
diff --cc CHANGES.txt
index 7605952,d28e419..07ee59f
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,41 -1,5 +1,42 @@@
 -2.2.8
 +3.0.9
 + * Add schema to snapshot manifest, add USING TIMESTAMP clause to ALTER TABLE 
statements (CASSANDRA-7190)
 + * Fix clean interval not sent to commit log for empty memtable flush 
(CASSANDRA-12436)
 + * Fix potential resource leak in RMIServerSocketFactoryImpl (CASSANDRA-12331)
 + * Backport CASSANDRA-12002 (CASSANDRA-12177)
 + * Make sure compaction stats are updated when compaction is interrupted 
(CASSANDRA-12100)
 + * Fix potential bad messaging service message for paged range reads
 +   within mixed-version 3.x clusters (CASSANDRA-12249)
 + * Change commitlog and sstables to track dirty and clean intervals 
(CASSANDRA-11828)
 + * NullPointerException during compaction on table with static columns 
(CASSANDRA-12336)
 + * Fixed ConcurrentModificationException when reading metrics in 
GraphiteReporter (CASSANDRA-11823)
 + * Fix upgrade of super columns on thrift (CASSANDRA-12335)
 + * Fixed flacky BlacklistingCompactionsTest, switched to fixed size types and 
increased corruption size (CASSANDRA-12359)
 + * Rerun ReplicationAwareTokenAllocatorTest on failure to avoid flakiness 
(CASSANDRA-12277)
 + * Exception when computing read-repair for range tombstones (CASSANDRA-12263)
 + * Lost counter writes in compact table and static columns (CASSANDRA-12219)
 + * AssertionError with MVs on updating a row that isn't indexed due to a null 
value (CASSANDRA-12247)
 + * Disable RR and speculative retry with EACH_QUORUM reads (CASSANDRA-11980)
 + * Add option to override compaction space check (CASSANDRA-12180)
 + * Faster startup by only scanning each directory for temporary files once 
(CASSANDRA-12114)
 + * Respond with v1/v2 protocol header when responding to driver that attempts
 +   to connect with too low of a protocol version (CASSANDRA-11464)
 + * NullPointerExpception when reading/compacting table (CASSANDRA-11988)
 + * Fix problem with undeleteable rows on upgrade to new sstable format 
(CASSANDRA-12144)
 + * Fix paging logic for deleted partitions with static columns 
(CASSANDRA-12107)
 + * Wait until the message is being send to decide which serializer must be 
used (CASSANDRA-11393)
 + * Fix migration of static thrift column names with non-text comparators 
(CASSANDRA-12147)
 + * Fix upgrading sparse tables that are incorrectly marked as dense 
(CASSANDRA-11315)
 + * Fix reverse queries ignoring range tombstones (CASSANDRA-11733)
 + * Avoid potential race when rebuilding CFMetaData (CASSANDRA-12098)
 + * Avoid missing sstables when getting the canonical sstables 
(CASSANDRA-11996)
 + * Always select the live sstables when getting sstables in bounds 
(CASSANDRA-11944)
 + * Fix column ordering of results with static columns for Thrift requests in
 +   a mixed 2.x/3.x cluster, also fix potential non-resolved duplication of
 +   those static columns in query results (CASSANDRA-12123)
 + * Avoid digest mismatch with empty but static rows (CASSANDRA-12090)
 + * Fix EOF exception when altering column type (CASSANDRA-11820)
 +Merged from 2.2:
+  * cqlsh copy: fixed possible race in initializing feeding thread 
(CASSANDRA-11701)
   * Only set broadcast_rpc_address on Ec2MultiRegionSnitch if it's not set 
(CASSANDRA-11357)
   * Update StorageProxy range metrics for timeouts, failures and unavailables 
(CASSANDRA-9507)
   * Add Sigar to classes included in clientutil.jar (CASSANDRA-11635)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/a86ddac3/pylib/cqlshlib/copyutil.py
--



[09/15] cassandra git commit: Merge branch 'cassandra-2.2' into cassandra-3.0

2016-08-21 Thread stefania
Merge branch 'cassandra-2.2' into cassandra-3.0


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

Branch: refs/heads/cassandra-3.9
Commit: a86ddac344652d24ab3d524d4648b29368619f6c
Parents: 7e19dc1 59da275
Author: Stefania Alborghetti 
Authored: Mon Aug 22 09:02:23 2016 +0800
Committer: Stefania Alborghetti 
Committed: Mon Aug 22 09:02:23 2016 +0800

--
 CHANGES.txt|   1 +
 pylib/cqlshlib/copyutil.py | 151 +---
 2 files changed, 95 insertions(+), 57 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/a86ddac3/CHANGES.txt
--
diff --cc CHANGES.txt
index 7605952,d28e419..07ee59f
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,41 -1,5 +1,42 @@@
 -2.2.8
 +3.0.9
 + * Add schema to snapshot manifest, add USING TIMESTAMP clause to ALTER TABLE 
statements (CASSANDRA-7190)
 + * Fix clean interval not sent to commit log for empty memtable flush 
(CASSANDRA-12436)
 + * Fix potential resource leak in RMIServerSocketFactoryImpl (CASSANDRA-12331)
 + * Backport CASSANDRA-12002 (CASSANDRA-12177)
 + * Make sure compaction stats are updated when compaction is interrupted 
(CASSANDRA-12100)
 + * Fix potential bad messaging service message for paged range reads
 +   within mixed-version 3.x clusters (CASSANDRA-12249)
 + * Change commitlog and sstables to track dirty and clean intervals 
(CASSANDRA-11828)
 + * NullPointerException during compaction on table with static columns 
(CASSANDRA-12336)
 + * Fixed ConcurrentModificationException when reading metrics in 
GraphiteReporter (CASSANDRA-11823)
 + * Fix upgrade of super columns on thrift (CASSANDRA-12335)
 + * Fixed flacky BlacklistingCompactionsTest, switched to fixed size types and 
increased corruption size (CASSANDRA-12359)
 + * Rerun ReplicationAwareTokenAllocatorTest on failure to avoid flakiness 
(CASSANDRA-12277)
 + * Exception when computing read-repair for range tombstones (CASSANDRA-12263)
 + * Lost counter writes in compact table and static columns (CASSANDRA-12219)
 + * AssertionError with MVs on updating a row that isn't indexed due to a null 
value (CASSANDRA-12247)
 + * Disable RR and speculative retry with EACH_QUORUM reads (CASSANDRA-11980)
 + * Add option to override compaction space check (CASSANDRA-12180)
 + * Faster startup by only scanning each directory for temporary files once 
(CASSANDRA-12114)
 + * Respond with v1/v2 protocol header when responding to driver that attempts
 +   to connect with too low of a protocol version (CASSANDRA-11464)
 + * NullPointerExpception when reading/compacting table (CASSANDRA-11988)
 + * Fix problem with undeleteable rows on upgrade to new sstable format 
(CASSANDRA-12144)
 + * Fix paging logic for deleted partitions with static columns 
(CASSANDRA-12107)
 + * Wait until the message is being send to decide which serializer must be 
used (CASSANDRA-11393)
 + * Fix migration of static thrift column names with non-text comparators 
(CASSANDRA-12147)
 + * Fix upgrading sparse tables that are incorrectly marked as dense 
(CASSANDRA-11315)
 + * Fix reverse queries ignoring range tombstones (CASSANDRA-11733)
 + * Avoid potential race when rebuilding CFMetaData (CASSANDRA-12098)
 + * Avoid missing sstables when getting the canonical sstables 
(CASSANDRA-11996)
 + * Always select the live sstables when getting sstables in bounds 
(CASSANDRA-11944)
 + * Fix column ordering of results with static columns for Thrift requests in
 +   a mixed 2.x/3.x cluster, also fix potential non-resolved duplication of
 +   those static columns in query results (CASSANDRA-12123)
 + * Avoid digest mismatch with empty but static rows (CASSANDRA-12090)
 + * Fix EOF exception when altering column type (CASSANDRA-11820)
 +Merged from 2.2:
+  * cqlsh copy: fixed possible race in initializing feeding thread 
(CASSANDRA-11701)
   * Only set broadcast_rpc_address on Ec2MultiRegionSnitch if it's not set 
(CASSANDRA-11357)
   * Update StorageProxy range metrics for timeouts, failures and unavailables 
(CASSANDRA-9507)
   * Add Sigar to classes included in clientutil.jar (CASSANDRA-11635)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/a86ddac3/pylib/cqlshlib/copyutil.py
--



[05/15] cassandra git commit: cqlsh copy: fixed possible race in initializing feeding thread

2016-08-21 Thread stefania
cqlsh copy: fixed possible race in initializing feeding thread

patch by Stefania Alborghetti; reviewed by Paulo Motta for CASSANDRA-11701


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

Branch: refs/heads/cassandra-3.9
Commit: 59da27560c1532bb4956c661da25992840996706
Parents: f03b10c
Author: Stefania Alborghetti 
Authored: Tue May 3 09:46:33 2016 +0800
Committer: Stefania Alborghetti 
Committed: Mon Aug 22 09:00:49 2016 +0800

--
 CHANGES.txt|   1 +
 pylib/cqlshlib/copyutil.py | 151 +---
 2 files changed, 95 insertions(+), 57 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/59da2756/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index c421398..d28e419 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.2.8
+ * cqlsh copy: fixed possible race in initializing feeding thread 
(CASSANDRA-11701)
  * Only set broadcast_rpc_address on Ec2MultiRegionSnitch if it's not set 
(CASSANDRA-11357)
  * Update StorageProxy range metrics for timeouts, failures and unavailables 
(CASSANDRA-9507)
  * Add Sigar to classes included in clientutil.jar (CASSANDRA-11635)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/59da2756/pylib/cqlshlib/copyutil.py
--
diff --git a/pylib/cqlshlib/copyutil.py b/pylib/cqlshlib/copyutil.py
index 14172ef..460ae6a 100644
--- a/pylib/cqlshlib/copyutil.py
+++ b/pylib/cqlshlib/copyutil.py
@@ -83,7 +83,7 @@ def printmsg(msg, eol='\n', encoding='utf8'):
 sys.stdout.flush()
 
 
-class OneWayChannel(object):
+class OneWayPipe(object):
 """
 A one way pipe protected by two process level locks, one for reading and 
one for writing.
 """
@@ -91,27 +91,47 @@ class OneWayChannel(object):
 self.reader, self.writer = mp.Pipe(duplex=False)
 self.rlock = mp.Lock()
 self.wlock = mp.Lock()
-self.feeding_thread = None
-self.pending_messages = None
 
-def init_feeding_thread(self):
-"""
-Initialize a thread that fetches messages from a queue and sends them 
to the channel.
-We initialize the feeding thread lazily to avoid the fork(), since the 
channels are passed to child processes.
-"""
-if self.feeding_thread is not None or self.pending_messages is not 
None:
-raise RuntimeError("Feeding thread already initialized")
+def send(self, obj):
+with self.wlock:
+self.writer.send(obj)
+
+def recv(self):
+with self.rlock:
+return self.reader.recv()
+
+def close(self):
+self.reader.close()
+self.writer.close()
 
+
+class ReceivingChannel(object):
+"""
+A one way channel that wraps a pipe to receive messages.
+"""
+def __init__(self, pipe):
+self.pipe = pipe
+
+def recv(self):
+return self.pipe.recv()
+
+def close(self):
+self.pipe.close()
+
+
+class SendingChannel(object):
+"""
+A one way channel that wraps a pipe and provides a feeding thread to send 
messages asynchronously.
+"""
+def __init__(self, pipe):
+self.pipe = pipe
 self.pending_messages = Queue()
 
 def feed():
-send = self._send
-pending_messages = self.pending_messages
-
 while True:
 try:
-msg = pending_messages.get()
-send(msg)
+msg = self.pending_messages.get()
+self.pipe.send(msg)
 except Exception, e:
 printmsg('%s: %s' % (e.__class__.__name__, e.message))
 
@@ -119,39 +139,43 @@ class OneWayChannel(object):
 feeding_thread.setDaemon(True)
 feeding_thread.start()
 
-self.feeding_thread = feeding_thread
-
 def send(self, obj):
-if self.feeding_thread is None:
-self.init_feeding_thread()
-
 self.pending_messages.put(obj)
 
-def _send(self, obj):
-with self.wlock:
-self.writer.send(obj)
-
 def num_pending(self):
 return self.pending_messages.qsize() if self.pending_messages else 0
 
-def recv(self):
-with self.rlock:
-return self.reader.recv()
+def close(self):
+self.pipe.close()
+
+
+class SendingChannels(object):
+"""
+A group of one way channels for sending messages.
+"""
+def __init__(self, num_channels):
+self.pipes = 

[13/15] cassandra git commit: Merge branch 'cassandra-3.8' into cassandra-3.9

2016-08-21 Thread stefania
Merge branch 'cassandra-3.8' into cassandra-3.9


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

Branch: refs/heads/cassandra-3.9
Commit: bd2b73b29f85d87299fe6e5dccc5da87e7e0ac35
Parents: c3a5fc0 2b8672d
Author: Stefania Alborghetti 
Authored: Mon Aug 22 09:07:03 2016 +0800
Committer: Stefania Alborghetti 
Committed: Mon Aug 22 09:07:03 2016 +0800

--
 CHANGES.txt|   1 +
 pylib/cqlshlib/copyutil.py | 151 +---
 2 files changed, 95 insertions(+), 57 deletions(-)
--


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



[15/15] cassandra git commit: Merge branch 'cassandra-3.9' into trunk

2016-08-21 Thread stefania
Merge branch 'cassandra-3.9' into trunk


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

Branch: refs/heads/trunk
Commit: 21dda88ba0cfda6f938a51bd5a2df7e21831b7af
Parents: 7eb6b99 bd2b73b
Author: Stefania Alborghetti 
Authored: Mon Aug 22 09:07:46 2016 +0800
Committer: Stefania Alborghetti 
Committed: Mon Aug 22 09:07:46 2016 +0800

--
 CHANGES.txt|   1 +
 pylib/cqlshlib/copyutil.py | 151 +---
 2 files changed, 95 insertions(+), 57 deletions(-)
--


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

http://git-wip-us.apache.org/repos/asf/cassandra/blob/21dda88b/pylib/cqlshlib/copyutil.py
--



[01/15] cassandra git commit: cqlsh copy: fixed possible race in initializing feeding thread

2016-08-21 Thread stefania
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-2.2 f03b10cb4 -> 59da27560
  refs/heads/cassandra-3.0 7e19dc1c1 -> a86ddac34
  refs/heads/cassandra-3.8 623002150 -> 2b8672d2a
  refs/heads/cassandra-3.9 c3a5fc08d -> bd2b73b29
  refs/heads/trunk 7eb6b997f -> 21dda88ba


cqlsh copy: fixed possible race in initializing feeding thread

patch by Stefania Alborghetti; reviewed by Paulo Motta for CASSANDRA-11701


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

Branch: refs/heads/cassandra-2.2
Commit: 59da27560c1532bb4956c661da25992840996706
Parents: f03b10c
Author: Stefania Alborghetti 
Authored: Tue May 3 09:46:33 2016 +0800
Committer: Stefania Alborghetti 
Committed: Mon Aug 22 09:00:49 2016 +0800

--
 CHANGES.txt|   1 +
 pylib/cqlshlib/copyutil.py | 151 +---
 2 files changed, 95 insertions(+), 57 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/59da2756/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index c421398..d28e419 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.2.8
+ * cqlsh copy: fixed possible race in initializing feeding thread 
(CASSANDRA-11701)
  * Only set broadcast_rpc_address on Ec2MultiRegionSnitch if it's not set 
(CASSANDRA-11357)
  * Update StorageProxy range metrics for timeouts, failures and unavailables 
(CASSANDRA-9507)
  * Add Sigar to classes included in clientutil.jar (CASSANDRA-11635)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/59da2756/pylib/cqlshlib/copyutil.py
--
diff --git a/pylib/cqlshlib/copyutil.py b/pylib/cqlshlib/copyutil.py
index 14172ef..460ae6a 100644
--- a/pylib/cqlshlib/copyutil.py
+++ b/pylib/cqlshlib/copyutil.py
@@ -83,7 +83,7 @@ def printmsg(msg, eol='\n', encoding='utf8'):
 sys.stdout.flush()
 
 
-class OneWayChannel(object):
+class OneWayPipe(object):
 """
 A one way pipe protected by two process level locks, one for reading and 
one for writing.
 """
@@ -91,27 +91,47 @@ class OneWayChannel(object):
 self.reader, self.writer = mp.Pipe(duplex=False)
 self.rlock = mp.Lock()
 self.wlock = mp.Lock()
-self.feeding_thread = None
-self.pending_messages = None
 
-def init_feeding_thread(self):
-"""
-Initialize a thread that fetches messages from a queue and sends them 
to the channel.
-We initialize the feeding thread lazily to avoid the fork(), since the 
channels are passed to child processes.
-"""
-if self.feeding_thread is not None or self.pending_messages is not 
None:
-raise RuntimeError("Feeding thread already initialized")
+def send(self, obj):
+with self.wlock:
+self.writer.send(obj)
+
+def recv(self):
+with self.rlock:
+return self.reader.recv()
+
+def close(self):
+self.reader.close()
+self.writer.close()
 
+
+class ReceivingChannel(object):
+"""
+A one way channel that wraps a pipe to receive messages.
+"""
+def __init__(self, pipe):
+self.pipe = pipe
+
+def recv(self):
+return self.pipe.recv()
+
+def close(self):
+self.pipe.close()
+
+
+class SendingChannel(object):
+"""
+A one way channel that wraps a pipe and provides a feeding thread to send 
messages asynchronously.
+"""
+def __init__(self, pipe):
+self.pipe = pipe
 self.pending_messages = Queue()
 
 def feed():
-send = self._send
-pending_messages = self.pending_messages
-
 while True:
 try:
-msg = pending_messages.get()
-send(msg)
+msg = self.pending_messages.get()
+self.pipe.send(msg)
 except Exception, e:
 printmsg('%s: %s' % (e.__class__.__name__, e.message))
 
@@ -119,39 +139,43 @@ class OneWayChannel(object):
 feeding_thread.setDaemon(True)
 feeding_thread.start()
 
-self.feeding_thread = feeding_thread
-
 def send(self, obj):
-if self.feeding_thread is None:
-self.init_feeding_thread()
-
 self.pending_messages.put(obj)
 
-def _send(self, obj):
-with self.wlock:
-self.writer.send(obj)
-
 def num_pending(self):
 return self.pending_messages.qsize() if self.pending_messages else 0
 
-def recv(self):

[12/15] cassandra git commit: Merge branch 'cassandra-3.0' into cassandra-3.8

2016-08-21 Thread stefania
Merge branch 'cassandra-3.0' into cassandra-3.8


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

Branch: refs/heads/cassandra-3.8
Commit: 2b8672d2a3c6b4d96e119eaeb2e5bd445ebb5790
Parents: 6230021 a86ddac
Author: Stefania Alborghetti 
Authored: Mon Aug 22 09:06:18 2016 +0800
Committer: Stefania Alborghetti 
Committed: Mon Aug 22 09:06:18 2016 +0800

--
 CHANGES.txt|   1 +
 pylib/cqlshlib/copyutil.py | 151 +---
 2 files changed, 95 insertions(+), 57 deletions(-)
--


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

http://git-wip-us.apache.org/repos/asf/cassandra/blob/2b8672d2/pylib/cqlshlib/copyutil.py
--



[07/15] cassandra git commit: Merge branch 'cassandra-2.2' into cassandra-3.0

2016-08-21 Thread stefania
Merge branch 'cassandra-2.2' into cassandra-3.0


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

Branch: refs/heads/cassandra-3.0
Commit: a86ddac344652d24ab3d524d4648b29368619f6c
Parents: 7e19dc1 59da275
Author: Stefania Alborghetti 
Authored: Mon Aug 22 09:02:23 2016 +0800
Committer: Stefania Alborghetti 
Committed: Mon Aug 22 09:02:23 2016 +0800

--
 CHANGES.txt|   1 +
 pylib/cqlshlib/copyutil.py | 151 +---
 2 files changed, 95 insertions(+), 57 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/a86ddac3/CHANGES.txt
--
diff --cc CHANGES.txt
index 7605952,d28e419..07ee59f
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,41 -1,5 +1,42 @@@
 -2.2.8
 +3.0.9
 + * Add schema to snapshot manifest, add USING TIMESTAMP clause to ALTER TABLE 
statements (CASSANDRA-7190)
 + * Fix clean interval not sent to commit log for empty memtable flush 
(CASSANDRA-12436)
 + * Fix potential resource leak in RMIServerSocketFactoryImpl (CASSANDRA-12331)
 + * Backport CASSANDRA-12002 (CASSANDRA-12177)
 + * Make sure compaction stats are updated when compaction is interrupted 
(CASSANDRA-12100)
 + * Fix potential bad messaging service message for paged range reads
 +   within mixed-version 3.x clusters (CASSANDRA-12249)
 + * Change commitlog and sstables to track dirty and clean intervals 
(CASSANDRA-11828)
 + * NullPointerException during compaction on table with static columns 
(CASSANDRA-12336)
 + * Fixed ConcurrentModificationException when reading metrics in 
GraphiteReporter (CASSANDRA-11823)
 + * Fix upgrade of super columns on thrift (CASSANDRA-12335)
 + * Fixed flacky BlacklistingCompactionsTest, switched to fixed size types and 
increased corruption size (CASSANDRA-12359)
 + * Rerun ReplicationAwareTokenAllocatorTest on failure to avoid flakiness 
(CASSANDRA-12277)
 + * Exception when computing read-repair for range tombstones (CASSANDRA-12263)
 + * Lost counter writes in compact table and static columns (CASSANDRA-12219)
 + * AssertionError with MVs on updating a row that isn't indexed due to a null 
value (CASSANDRA-12247)
 + * Disable RR and speculative retry with EACH_QUORUM reads (CASSANDRA-11980)
 + * Add option to override compaction space check (CASSANDRA-12180)
 + * Faster startup by only scanning each directory for temporary files once 
(CASSANDRA-12114)
 + * Respond with v1/v2 protocol header when responding to driver that attempts
 +   to connect with too low of a protocol version (CASSANDRA-11464)
 + * NullPointerExpception when reading/compacting table (CASSANDRA-11988)
 + * Fix problem with undeleteable rows on upgrade to new sstable format 
(CASSANDRA-12144)
 + * Fix paging logic for deleted partitions with static columns 
(CASSANDRA-12107)
 + * Wait until the message is being send to decide which serializer must be 
used (CASSANDRA-11393)
 + * Fix migration of static thrift column names with non-text comparators 
(CASSANDRA-12147)
 + * Fix upgrading sparse tables that are incorrectly marked as dense 
(CASSANDRA-11315)
 + * Fix reverse queries ignoring range tombstones (CASSANDRA-11733)
 + * Avoid potential race when rebuilding CFMetaData (CASSANDRA-12098)
 + * Avoid missing sstables when getting the canonical sstables 
(CASSANDRA-11996)
 + * Always select the live sstables when getting sstables in bounds 
(CASSANDRA-11944)
 + * Fix column ordering of results with static columns for Thrift requests in
 +   a mixed 2.x/3.x cluster, also fix potential non-resolved duplication of
 +   those static columns in query results (CASSANDRA-12123)
 + * Avoid digest mismatch with empty but static rows (CASSANDRA-12090)
 + * Fix EOF exception when altering column type (CASSANDRA-11820)
 +Merged from 2.2:
+  * cqlsh copy: fixed possible race in initializing feeding thread 
(CASSANDRA-11701)
   * Only set broadcast_rpc_address on Ec2MultiRegionSnitch if it's not set 
(CASSANDRA-11357)
   * Update StorageProxy range metrics for timeouts, failures and unavailables 
(CASSANDRA-9507)
   * Add Sigar to classes included in clientutil.jar (CASSANDRA-11635)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/a86ddac3/pylib/cqlshlib/copyutil.py
--



[jira] [Issue Comment Deleted] (CASSANDRA-9283) Deprecate unlogged batches

2016-08-21 Thread Andriy Kolyadenko (JIRA)

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

Andriy Kolyadenko updated CASSANDRA-9283:
-
Comment: was deleted

(was: Hi there,

in my understanding, cross-partition unlogged batches are widely used by 
community for fast hustle free bulk data import into Cassandra.
Other alternative approaches:
- CQLSSTableWriter - much harder to setup and maintain in the program logic
- individual Async writes - much slower than unlogged batch in few nodes setup 
(up to 10 times slower in my observations)
- logged bacth - slower than unlogged batch - (3 times slower in my 
observations)

Is it possible to undeprecate/keep unlogged batch, or develop some other simple 
to use bulk insert API for fast insertion of data?

Thank you.)

> Deprecate unlogged batches
> --
>
> Key: CASSANDRA-9283
> URL: https://issues.apache.org/jira/browse/CASSANDRA-9283
> Project: Cassandra
>  Issue Type: Bug
>  Components: CQL
>Reporter: Jonathan Ellis
>Assignee: T Jake Luciani
> Fix For: 2.2.0 beta 1
>
>
> Officially mark unlogged batches deprecated.
> Note that the main "good" use case for unlogged batches, of multiple updates 
> in a single partition key, is "free" when done as a logged batch.  So really 
> unlogged batches mainly serve as a honeypot to trick new users into abusing 
> them in misguided bulk loading attempts.



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


[jira] [Commented] (CASSANDRA-11067) Improve SASI syntax

2016-08-21 Thread Pavel Yaskevich (JIRA)

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

Pavel Yaskevich commented on CASSANDRA-11067:
-

Thanks!

> Improve SASI syntax
> ---
>
> Key: CASSANDRA-11067
> URL: https://issues.apache.org/jira/browse/CASSANDRA-11067
> Project: Cassandra
>  Issue Type: Task
>  Components: CQL
>Reporter: Jonathan Ellis
>Assignee: Pavel Yaskevich
>  Labels: client-impacting, sasi
> Fix For: 3.4
>
>
> I think everyone agrees that a LIKE operator would be ideal, but that's 
> probably not in scope for an initial 3.4 release.
> Still, I'm uncomfortable with the initial approach of overloading = to mean 
> "satisfies index expression."  The problem is that it will be very difficult 
> to back out of this behavior once people are using it.
> I propose adding a new operator in the interim instead.  Call it MATCHES, 
> maybe.  With the exact same behavior that SASI currently exposes, just with a 
> separate operator rather than being rolled into =.



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


[jira] [Comment Edited] (CASSANDRA-12512) compaction-stress: assertion error on accessing Schema.instance from client-mode tool

2016-08-21 Thread Wei Deng (JIRA)

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

Wei Deng edited comment on CASSANDRA-12512 at 8/21/16 7:14 PM:
---

Yep, after applying this 
[patch|https://issues.apache.org/jira/secure/attachment/12824146/0001-Replaced-using-CFMetaData.compile-in-cassandra-stres.patch],
 I was able to get {{compaction-stress write}} to work.

To apply the patch cleanly, the additional import packages needed to be 
manually inserted but it was trivial.


was (Author: weideng):
Yep, after applying this 
[patch|https://issues.apache.org/jira/secure/attachment/12824146/0001-Replaced-using-CFMetaData.compile-in-cassandra-stres.patch],
 I was able to get compaction-stress to work.

To apply the patch cleanly, the additional import packages needed to be 
manually inserted but it was trivial.

> compaction-stress: assertion error on accessing Schema.instance from 
> client-mode tool
> -
>
> Key: CASSANDRA-12512
> URL: https://issues.apache.org/jira/browse/CASSANDRA-12512
> Project: Cassandra
>  Issue Type: Bug
>Reporter: Wei Deng
>
> When I was trying the new compaction-stress tool from 3.10, I ran into the 
> following error:
> {noformat}
> automaton@0ce59d338-1:~/cassandra-trunk$ ./tools/bin/compaction-stress write 
> -d /tmp/compaction -g 5 -p 
> https://gist.githubusercontent.com/tjake/8995058fed11d9921e31/raw/a9334d1090017bf546d003e271747351a40692ea/blogpost.yaml
>  -t 4
> java.lang.AssertionError: This assertion failure is probably due to accessing 
> Schema.instance from client-mode tools - See CASSANDRA-8143.
>   at org.apache.cassandra.config.CFMetaData.(CFMetaData.java:288)
>   at org.apache.cassandra.config.CFMetaData.(CFMetaData.java:66)
>   at 
> org.apache.cassandra.config.CFMetaData$Builder.build(CFMetaData.java:1332)
>   at org.apache.cassandra.config.CFMetaData.compile(CFMetaData.java:433)
>   at 
> org.apache.cassandra.stress.StressProfile.init(StressProfile.java:174)
>   at 
> org.apache.cassandra.stress.StressProfile.load(StressProfile.java:801)
>   at 
> org.apache.cassandra.stress.CompactionStress.getStressProfile(CompactionStress.java:162)
>   at 
> org.apache.cassandra.stress.CompactionStress$DataWriter.run(CompactionStress.java:289)
>   at 
> org.apache.cassandra.stress.CompactionStress.main(CompactionStress.java:353)
> {noformat}
> [UPDATE] It appears that {{compaction-stress compact}} fails on the same 
> assert but via a totally different code path. The stack trace is like the 
> following:
> {noformat}
> automaton@0ce59d338-1:~/cassandra-trunk$ ./tools/bin/compaction-stress 
> compact -d /tmp/compaction -p 
> https://gist.githubusercontent.com/tjake/8995058fed11d9921e31/raw/a9334d1090017bf546d003e271747351a40692ea/blogpost.yaml
>  -t 4
> java.lang.AssertionError: This assertion failure is probably due to accessing 
> Schema.instance from client-mode tools - See CASSANDRA-8143.
>   at org.apache.cassandra.config.CFMetaData.(CFMetaData.java:288)
>   at org.apache.cassandra.config.CFMetaData.(CFMetaData.java:66)
>   at 
> org.apache.cassandra.config.CFMetaData$Builder.build(CFMetaData.java:1332)
>   at org.apache.cassandra.config.CFMetaData.compile(CFMetaData.java:433)
>   at 
> org.apache.cassandra.db.SystemKeyspace.compile(SystemKeyspace.java:434)
>   at 
> org.apache.cassandra.db.SystemKeyspace.(SystemKeyspace.java:115)
>   at 
> org.apache.cassandra.stress.CompactionStress$Compaction.run(CompactionStress.java:213)
>   at 
> org.apache.cassandra.stress.CompactionStress.main(CompactionStress.java:353)
> {noformat}
> (the last revision of the description had the wrong stack trace pasted and 
> I've corrected that.)
> As you can see this 2nd assert on {{compaction-stress compact}} is triggered 
> by SystemKeyspace class, so fix in StressProfile class is only able to solve 
> the assert problem for {{compaction-stress write}}, but not 
> {{compaction-stress compact}}.



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


[jira] [Updated] (CASSANDRA-12512) compaction-stress: assertion error on accessing Schema.instance from client-mode tool

2016-08-21 Thread Wei Deng (JIRA)

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

Wei Deng updated CASSANDRA-12512:
-
Description: 
When I was trying the new compaction-stress tool from 3.10, I ran into the 
following error:

{noformat}
automaton@0ce59d338-1:~/cassandra-trunk$ ./tools/bin/compaction-stress write -d 
/tmp/compaction -g 5 -p 
https://gist.githubusercontent.com/tjake/8995058fed11d9921e31/raw/a9334d1090017bf546d003e271747351a40692ea/blogpost.yaml
 -t 4
java.lang.AssertionError: This assertion failure is probably due to accessing 
Schema.instance from client-mode tools - See CASSANDRA-8143.
at org.apache.cassandra.config.CFMetaData.(CFMetaData.java:288)
at org.apache.cassandra.config.CFMetaData.(CFMetaData.java:66)
at 
org.apache.cassandra.config.CFMetaData$Builder.build(CFMetaData.java:1332)
at org.apache.cassandra.config.CFMetaData.compile(CFMetaData.java:433)
at 
org.apache.cassandra.stress.StressProfile.init(StressProfile.java:174)
at 
org.apache.cassandra.stress.StressProfile.load(StressProfile.java:801)
at 
org.apache.cassandra.stress.CompactionStress.getStressProfile(CompactionStress.java:162)
at 
org.apache.cassandra.stress.CompactionStress$DataWriter.run(CompactionStress.java:289)
at 
org.apache.cassandra.stress.CompactionStress.main(CompactionStress.java:353)
{noformat}

[UPDATE] It appears that {{compaction-stress compact}} fails on the same assert 
but via a totally different code path. The stack trace is like the following:

{noformat}
automaton@0ce59d338-1:~/cassandra-trunk$ ./tools/bin/compaction-stress compact 
-d /tmp/compaction -p 
https://gist.githubusercontent.com/tjake/8995058fed11d9921e31/raw/a9334d1090017bf546d003e271747351a40692ea/blogpost.yaml
 -t 4
java.lang.AssertionError: This assertion failure is probably due to accessing 
Schema.instance from client-mode tools - See CASSANDRA-8143.
at org.apache.cassandra.config.CFMetaData.(CFMetaData.java:288)
at org.apache.cassandra.config.CFMetaData.(CFMetaData.java:66)
at 
org.apache.cassandra.config.CFMetaData$Builder.build(CFMetaData.java:1332)
at org.apache.cassandra.config.CFMetaData.compile(CFMetaData.java:433)
at 
org.apache.cassandra.db.SystemKeyspace.compile(SystemKeyspace.java:434)
at 
org.apache.cassandra.db.SystemKeyspace.(SystemKeyspace.java:115)
at 
org.apache.cassandra.stress.CompactionStress$Compaction.run(CompactionStress.java:213)
at 
org.apache.cassandra.stress.CompactionStress.main(CompactionStress.java:353)
{noformat}

(the last revision of the description had the wrong stack trace pasted and I've 
corrected that.)

As you can see this 2nd assert on {{compaction-stress compact}} is triggered by 
SystemKeyspace class, so fix in StressProfile class is only able to solve the 
assert problem for {{compaction-stress write}}, but not {{compaction-stress 
compact}}.

  was:
When I was trying the new compaction-stress tool from 3.10, I ran into the 
following error:

{noformat}
automaton@wdengsummitsparkgoogle-0ce59d338-1:~/cassandra-trunk$ 
./tools/bin/compaction-stress write -d /tmp/compaction -g 5 -p 
https://gist.githubusercontent.com/tjake/8995058fed11d9921e31/raw/a9334d1090017bf546d003e271747351a40692ea/blogpost.yaml
 -t 4
java.lang.AssertionError: This assertion failure is probably due to accessing 
Schema.instance from client-mode tools - See CASSANDRA-8143.
at org.apache.cassandra.config.CFMetaData.(CFMetaData.java:288)
at org.apache.cassandra.config.CFMetaData.(CFMetaData.java:66)
at 
org.apache.cassandra.config.CFMetaData$Builder.build(CFMetaData.java:1332)
at org.apache.cassandra.config.CFMetaData.compile(CFMetaData.java:433)
at 
org.apache.cassandra.stress.StressProfile.init(StressProfile.java:174)
at 
org.apache.cassandra.stress.StressProfile.load(StressProfile.java:801)
at 
org.apache.cassandra.stress.CompactionStress.getStressProfile(CompactionStress.java:162)
at 
org.apache.cassandra.stress.CompactionStress$DataWriter.run(CompactionStress.java:289)
at 
org.apache.cassandra.stress.CompactionStress.main(CompactionStress.java:353)
{noformat}

[UPDATE] It appears that {{compaction-stress compact}} fails on the same assert 
but via a totally different code path. The stack trace is like the following:

{noformat}
automaton@wdengsummitsparkgoogle-0ce59d338-1:~/cassandra-trunk$ 
./tools/bin/compaction-stress compact -d /tmp/compaction -p 
https://gist.githubusercontent.com/tjake/8995058fed11d9921e31/raw/a9334d1090017bf546d003e271747351a40692ea/blogpost.yaml
 -t 4
java.lang.ExceptionInInitializerError
at 
org.apache.cassandra.cql3.QueryProcessor$InternalStateInstance.(QueryProcessor.java:138)
at 
org.apache.cassandra.cql3.QueryProcessor$InternalStateInstance.(QueryProcessor.java:132)
at 

[jira] [Comment Edited] (CASSANDRA-6216) Level Compaction should persist last compacted key per level

2016-08-21 Thread Dikang Gu (JIRA)

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

Dikang Gu edited comment on CASSANDRA-6216 at 8/21/16 7:11 PM:
---

[~krummas] cool, I think it's a more easy-to-understand idea, and maybe could 
save a lot of code. Here is the patch 
https://github.com/DikangGu/cassandra/commit/3dfd0f29c9152bbe5283514f6f90886ebc2f87f1,
 can you please take a look?

I'm not sure how to write the unit test at this moment, will try some manual 
testing.


was (Author: dikanggu):
[~krummas] cool, I think it's a more easy-to-understand idea, and maybe could 
save a lot of code. Here is the patch 
https://github.com/DikangGu/cassandra/commit/a63c8583ada93187b177c68dbc4443c29717e44e,
 can you please take a look?

I'm not sure how to write the unit test at this moment, will try some manual 
testing.

> Level Compaction should persist last compacted key per level
> 
>
> Key: CASSANDRA-6216
> URL: https://issues.apache.org/jira/browse/CASSANDRA-6216
> Project: Cassandra
>  Issue Type: Sub-task
>Reporter: sankalp kohli
>Assignee: Dikang Gu
>Priority: Minor
>  Labels: compaction, lcs
> Attachments: JIRA-6216.diff
>
>
> Level compaction does not persist the last compacted key per level. This is 
> important for higher levels. 
> The sstables with higher token and in higher levels wont get a chance to 
> compact as the last compacted key will get reset after a restart.



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


[jira] [Commented] (CASSANDRA-9283) Deprecate unlogged batches

2016-08-21 Thread Andriy Kolyadenko (JIRA)

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

Andriy Kolyadenko commented on CASSANDRA-9283:
--

Hi there,

in my understanding, cross-partition unlogged batches are widely used by 
community for fast hustle free bulk data import into Cassandra.
Other alternative approaches:
- CQLSSTableWriter - much harder to setup and maintain in the program logic
- individual Async writes - much slower than unlogged batch in few nodes setup 
(up to 10 times slower in my observations)
- logged bacth - slower than unlogged batch - (3 times slower in my 
observations)

Is it possible to undeprecate/keep unlogged batch, or develop some other simple 
to use bulk insert API for fast insertion of data?

Thank you.

> Deprecate unlogged batches
> --
>
> Key: CASSANDRA-9283
> URL: https://issues.apache.org/jira/browse/CASSANDRA-9283
> Project: Cassandra
>  Issue Type: Bug
>  Components: CQL
>Reporter: Jonathan Ellis
>Assignee: T Jake Luciani
> Fix For: 2.2.0 beta 1
>
>
> Officially mark unlogged batches deprecated.
> Note that the main "good" use case for unlogged batches, of multiple updates 
> in a single partition key, is "free" when done as a logged batch.  So really 
> unlogged batches mainly serve as a honeypot to trick new users into abusing 
> them in misguided bulk loading attempts.



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


[jira] [Commented] (CASSANDRA-11031) MultiTenant : support “ALLOW FILTERING" for Partition Key

2016-08-21 Thread Alex Petrov (JIRA)

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

Alex Petrov commented on CASSANDRA-11031:
-

[~blerer] I haven't made any code chances since the last submission, just fixed 
/ improved dtest suite. Now, all tests pass. If you could take a look, it'd be 
great. I haven't squashed commits just in case you'd like to see the history. 

To roughly describe what I've done: 
  * short-circuited the PK & Static column queries in {{RowFilter}}, made sure 
that checks for PK and static column expressions are done once only
  * changed logic in {{processPartitionKeyRestrictions}}, hopefully making all 
cases more elaborate

The rest is just minor adjustments.

|[trunk|https://github.com/ifesdjeen/cassandra/tree/11031-trunk]|[dtest|https://cassci.datastax.com/view/Dev/view/ifesdjeen/job/ifesdjeen-11031-trunk-dtest/]|[testall|https://cassci.datastax.com/view/Dev/view/ifesdjeen/job/ifesdjeen-11031-trunk-testall/]|

> MultiTenant : support “ALLOW FILTERING" for Partition Key
> -
>
> Key: CASSANDRA-11031
> URL: https://issues.apache.org/jira/browse/CASSANDRA-11031
> Project: Cassandra
>  Issue Type: New Feature
>  Components: CQL
>Reporter: ZhaoYang
>Assignee: ZhaoYang
>Priority: Minor
> Fix For: 3.x
>
>
> Currently, Allow Filtering only works for secondary Index column or 
> clustering columns. And it's slow, because Cassandra will read all data from 
> SSTABLE from hard-disk to memory to filter.
> But we can support allow filtering on Partition Key, as far as I know, 
> Partition Key is in memory, so we can easily filter them, and then read 
> required data from SSTable.
> This will similar to "Select * from table" which scan through entire cluster.
> CREATE TABLE multi_tenant_table (
>   tenant_id text,
>   pk2 text,
>   c1 text,
>   c2 text,
>   v1 text,
>   v2 text,
>   PRIMARY KEY ((tenant_id,pk2),c1,c2)
> ) ;
> Select * from multi_tenant_table where tenant_id = "datastax" allow filtering;



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


[jira] [Commented] (CASSANDRA-11067) Improve SASI syntax

2016-08-21 Thread Alex Petrov (JIRA)

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

Alex Petrov commented on CASSANDRA-11067:
-

@xedin sure, did that.

> Improve SASI syntax
> ---
>
> Key: CASSANDRA-11067
> URL: https://issues.apache.org/jira/browse/CASSANDRA-11067
> Project: Cassandra
>  Issue Type: Task
>  Components: CQL
>Reporter: Jonathan Ellis
>Assignee: Pavel Yaskevich
>  Labels: client-impacting, sasi
> Fix For: 3.4
>
>
> I think everyone agrees that a LIKE operator would be ideal, but that's 
> probably not in scope for an initial 3.4 release.
> Still, I'm uncomfortable with the initial approach of overloading = to mean 
> "satisfies index expression."  The problem is that it will be very difficult 
> to back out of this behavior once people are using it.
> I propose adding a new operator in the interim instead.  Call it MATCHES, 
> maybe.  With the exact same behavior that SASI currently exposes, just with a 
> separate operator rather than being rolled into =.



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


[jira] [Updated] (CASSANDRA-12473) Errors in cassandra-stress print settings output

2016-08-21 Thread Ben Slater (JIRA)

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

Ben Slater updated CASSANDRA-12473:
---
Attachment: 11914-NPEFix-trunk.txt

Also attaching a fix for another NPE issue reported under CASSANDRA-11914 so it 
doesn't get lost.

> Errors in cassandra-stress print settings output
> 
>
> Key: CASSANDRA-12473
> URL: https://issues.apache.org/jira/browse/CASSANDRA-12473
> Project: Cassandra
>  Issue Type: Bug
>  Components: Tools
>Reporter: Ben Slater
>Assignee: Ben Slater
>Priority: Minor
> Fix For: 3.x
>
> Attachments: 11914-NPEFix-trunk.txt, 12473-trunk.txt
>
>
> A few errors in stress settings output:
> - mean and stdev transposed for gaussian distribution output
> - no-settings setting mislabled "Print settings"
> - typo "ration" instead of "ratio"



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


[jira] [Updated] (CASSANDRA-11914) Provide option for cassandra-stress to dump all settings

2016-08-21 Thread Ben Slater (JIRA)

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

Ben Slater updated CASSANDRA-11914:
---
Attachment: 11914-NPEFix-trunk.txt

Whoops - didn't realise you could skip those sections of the profile. Patch 
attached. I will also attach this to CASSANDRA-12473 which was opened to fix a 
couple of other minor issues.

[~tjake] or [~jkni] let me know if the patch would be better in a different 
format.

> Provide option for cassandra-stress to dump all settings
> 
>
> Key: CASSANDRA-11914
> URL: https://issues.apache.org/jira/browse/CASSANDRA-11914
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Tools
>Reporter: Ben Slater
>Assignee: Ben Slater
>Priority: Minor
> Fix For: 3.10
>
> Attachments: 11914-NPEFix-trunk.txt
>
>
> cassandra-stress has quite a lot of default settings and settings that are 
> derived as side effects of explicit options. For people learning the tool and 
> saving a clear record of what was run, I think it would be useful if there 
> was an option to have the tool print all its settings at the start of a run.



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


[jira] [Commented] (CASSANDRA-12506) nodetool compactionhistory in it's output should have timestamp in human readable format

2016-08-21 Thread Arunkumar M (JIRA)

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

Arunkumar M commented on CASSANDRA-12506:
-

Compactionhistory is already showing the timestamp in human readable format 
(compacted_at).

>bin/nodetool compactionhistory
Compaction History:
id  keyspace_name   columnfamily_name   
compacted_at  bytes_in bytes_out rows_merged
9a9240a0-6766-11e6-ab55-1b95258e9e06 systemlocal 
2016-08-20T23:15:05.898 535  293   {4:1}  
99c02390-6766-11e6-ab55-1b95258e9e06 systemlocal 
2016-08-20T23:15:04.521 506  401   {5:1}

Could you please explain further?


> nodetool compactionhistory in it's output should have timestamp in human 
> readable format
> 
>
> Key: CASSANDRA-12506
> URL: https://issues.apache.org/jira/browse/CASSANDRA-12506
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Compaction
> Environment: AWS
>Reporter: Kenneth Failbus
>Priority: Minor
>
> While running nodetool compactionhistory the output shows id and other 
> columns. I wanted to also see the timestamp for each id that got executed in 
> human readable format
> So, e.g. in the output if column id can be preceded by human readable 
> timestamp format, it will help in understanding when a particular compaction 
> ran and it's impact on the system resources.



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