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

2015-05-27 Thread Benedict (JIRA)

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

Benedict commented on CASSANDRA-9499:
-

Ariel Weisberg: do you mind, and have the time to, take a look at this in 
conjunction with CASSANDRA-9500?

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



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


[jira] [Issue Comment Deleted] (CASSANDRA-9498) If more than 65K columns, sparse layout will break

2015-05-27 Thread Benedict (JIRA)

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

Benedict updated CASSANDRA-9498:

Comment: was deleted

(was: [~aweisberg]: do you mind, and have the time to, take a look at this in 
conjunction with CASSANDRA-9500?)

> If more than 65K columns, sparse layout will break
> --
>
> Key: CASSANDRA-9498
> URL: https://issues.apache.org/jira/browse/CASSANDRA-9498
> Project: Cassandra
>  Issue Type: Bug
>  Components: Core
>Reporter: Benedict
>Priority: Minor
> Fix For: 3.0 beta 1
>
>
> Follow up to CASSANDRA-8099. It is a relatively small bug, since the exposed 
> population of users is likely to be very low, but fixing it in a good way is 
> a bit tricky. I'm filing a separate JIRA, because I would like us to address 
> this by introducing a writeVInt method to DataOutputStreamPlus, that we can 
> also exploit to improve the encoding of timestamps and deletion times, and 
> this JIRA will help to track the dependencies.



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


[jira] [Commented] (CASSANDRA-9500) SequentialWriter should extend BufferedDataOutputStreamPlus

2015-05-27 Thread Benedict (JIRA)

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

Benedict commented on CASSANDRA-9500:
-

[~aweisberg]: do you mind taking a look at this, since you did such a stellar 
job of CASSANDRA-8670?

> SequentialWriter should extend BufferedDataOutputStreamPlus
> ---
>
> Key: CASSANDRA-9500
> URL: https://issues.apache.org/jira/browse/CASSANDRA-9500
> Project: Cassandra
>  Issue Type: Improvement
>Reporter: Benedict
>Assignee: Ariel Weisberg
>Priority: Minor
>
> SequentialWriter is the last piece left not implementing 
> DataOutputStreamPlus. It should not be too tricky to extend it, and it should 
> result in improved write throughput. Further, it will permit it to exploit 
> the more efficient implementation of writeVInt being delivered in 
> CASSANDRA-9499



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


[jira] [Commented] (CASSANDRA-9498) If more than 65K columns, sparse layout will break

2015-05-27 Thread Benedict (JIRA)

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

Benedict commented on CASSANDRA-9498:
-

[~aweisberg]: do you mind, and have the time to, take a look at this in 
conjunction with CASSANDRA-9500?

> If more than 65K columns, sparse layout will break
> --
>
> Key: CASSANDRA-9498
> URL: https://issues.apache.org/jira/browse/CASSANDRA-9498
> Project: Cassandra
>  Issue Type: Bug
>  Components: Core
>Reporter: Benedict
>Priority: Minor
> Fix For: 3.0 beta 1
>
>
> Follow up to CASSANDRA-8099. It is a relatively small bug, since the exposed 
> population of users is likely to be very low, but fixing it in a good way is 
> a bit tricky. I'm filing a separate JIRA, because I would like us to address 
> this by introducing a writeVInt method to DataOutputStreamPlus, that we can 
> also exploit to improve the encoding of timestamps and deletion times, and 
> this JIRA will help to track the dependencies.



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


[jira] [Created] (CASSANDRA-9500) SequentialWriter should extend BufferedDataOutputStreamPlus

2015-05-27 Thread Benedict (JIRA)
Benedict created CASSANDRA-9500:
---

 Summary: SequentialWriter should extend 
BufferedDataOutputStreamPlus
 Key: CASSANDRA-9500
 URL: https://issues.apache.org/jira/browse/CASSANDRA-9500
 Project: Cassandra
  Issue Type: Improvement
Reporter: Benedict
Assignee: Ariel Weisberg
Priority: Minor


SequentialWriter is the last piece left not implementing DataOutputStreamPlus. 
It should not be too tricky to extend it, and it should result in improved 
write throughput. Further, it will permit it to exploit the more efficient 
implementation of writeVInt being delivered in CASSANDRA-9499



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


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

2015-05-27 Thread Benedict (JIRA)
Benedict created CASSANDRA-9499:
---

 Summary: Introduce writeVInt method to DataOutputStreamPlus
 Key: CASSANDRA-9499
 URL: https://issues.apache.org/jira/browse/CASSANDRA-9499
 Project: Cassandra
  Issue Type: Improvement
  Components: Core
Reporter: Benedict
Assignee: Ariel Weisberg
Priority: Minor
 Fix For: 3.0 beta 1


CASSANDRA-8099 really could do with a writeVInt method, for both fixing 
CASSANDRA-9498 but also efficiently encoding timestamp/deletion deltas. It 
should be possible to make an especially efficient implementation against 
BufferedDataOutputStreamPlus.




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


[jira] [Created] (CASSANDRA-9498) If more than 65K columns, sparse layout will break

2015-05-27 Thread Benedict (JIRA)
Benedict created CASSANDRA-9498:
---

 Summary: If more than 65K columns, sparse layout will break
 Key: CASSANDRA-9498
 URL: https://issues.apache.org/jira/browse/CASSANDRA-9498
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Reporter: Benedict
Priority: Minor
 Fix For: 3.0 beta 1


Follow up to CASSANDRA-8099. It is a relatively small bug, since the exposed 
population of users is likely to be very low, but fixing it in a good way is a 
bit tricky. I'm filing a separate JIRA, because I would like us to address this 
by introducing a writeVInt method to DataOutputStreamPlus, that we can also 
exploit to improve the encoding of timestamps and deletion times, and this JIRA 
will help to track the dependencies.



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


[jira] [Commented] (CASSANDRA-8584) Add rate limited logging of failed trySkipCache calls and commit log lag

2015-05-27 Thread Benedict (JIRA)

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

Benedict commented on CASSANDRA-8584:
-

That seems reasonable. However there are now a lot of failures on cassci for 
your branch (possibly due to something else, ofc, but it looks like it may have 
not been rebased)

> Add rate limited logging of failed trySkipCache calls and commit log lag
> 
>
> Key: CASSANDRA-8584
> URL: https://issues.apache.org/jira/browse/CASSANDRA-8584
> Project: Cassandra
>  Issue Type: Improvement
>Reporter: Joshua McKenzie
>Assignee: Ariel Weisberg
>Priority: Trivial
> Fix For: 2.1.x
>
> Attachments: 8584_v1.txt, NoSpamLogger.java, nospamlogger.txt
>
>
> Since trySkipCache returns an errno rather than -1 and setting errno like our 
> other CLibrary calls, it's thread-safe and we could print out more helpful 
> information if we failed to prompt the kernel to skip the page cache.  That 
> system call should always succeed unless we have an invalid fd as it's free 
> to ignore us.
> Commit log lag is already rate limited by its own implementation. Convert to 
> use NoSpamLogger.



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


[jira] [Assigned] (CASSANDRA-9482) SSTable leak after stress and repair

2015-05-27 Thread Marcus Eriksson (JIRA)

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

Marcus Eriksson reassigned CASSANDRA-9482:
--

Assignee: Marcus Eriksson

> SSTable leak after stress and repair
> 
>
> Key: CASSANDRA-9482
> URL: https://issues.apache.org/jira/browse/CASSANDRA-9482
> Project: Cassandra
>  Issue Type: Bug
>Reporter: Jim Witschey
>Assignee: Marcus Eriksson
>
> I have a dtest that fails intermittently because of SSTable leaks. The test 
> logic leading to the error is:
> - create a 5-node cluster
> - insert 5000 records with {{stress}}, RF=3 at CL=ONE
> - run {{flush}} on all nodes 
> - run {{repair}} on a single node.
> The leak is detected on a different node than {{repair}} was run on.
> The failing test is 
> [here|https://github.com/mambocab/cassandra-dtest/blob/CASSANDRA-5839-squash/repair_test.py#L317].
>  The relevant error his 
> [here|https://gist.github.com/mambocab/8aab7b03496e0b279bd3#file-node2-log-L256],
>  along with the errors from the entire 5-node cluster. In these logs, the 
> {{repair}} was run on {{node1}} and the leak was found on {{node2}}.
> I can bisect, but I thought I'd get the ball rolling in case someone knows 
> where to look.



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


[jira] [Created] (CASSANDRA-9497) Testcases failing with timeout

2015-05-27 Thread Pallavi Bhardwaj (JIRA)
Pallavi Bhardwaj created CASSANDRA-9497:
---

 Summary: Testcases failing with timeout
 Key: CASSANDRA-9497
 URL: https://issues.apache.org/jira/browse/CASSANDRA-9497
 Project: Cassandra
  Issue Type: Bug
  Components: Tests
 Environment: Red hat enterprise Linux, Arch : PPC64le
Reporter: Pallavi Bhardwaj
Priority: Minor
 Fix For: 2.1.5


While running the test cases, around 8 test cases are causing error due to 
timeout.

[junit] Testcase: 
org.apache.cassandra.db.ColumnFamilyStoreTest:testRebuildSecondaryIndex:  
Caused an ERROR
[junit] Timeout occurred. Please note the time in the report does not 
reflect the time until the timeout.
[junit] junit.framework.AssertionFailedError: Timeout occurred. Please note 
the time in the report does not reflect the time until the timeout.

 [junit] Testcase: org.apache.cassandra.cql3.DeleteTest:lostDeletesTest: 
Caused an ERROR
[junit] Timeout occurred. Please note the time in the report does not 
reflect the time until the timeout.
[junit] junit.framework.AssertionFailedError: Timeout occurred. Please note 
the time in the report does not reflect the time until the timeout.

[junit] Testcase: 
org.apache.cassandra.db.BatchlogManagerTest:testTruncatedReplay:  Caused an 
ERROR
[junit] Timeout occurred. Please note the time in the report does not 
reflect the time until the timeout.
[junit] junit.framework.AssertionFailedError: Timeout occurred. Please note 
the time in the report does not reflect the time until the timeout.

[junit] Testcase: 
org.apache.cassandra.io.sstable.SSTableRewriterTest:testOfflineAbort2:
Caused an ERROR
[junit] Timeout occurred. Please note the time in the report does not 
reflect the time until the timeout.
[junit] junit.framework.AssertionFailedError: Timeout occurred. Please note 
the time in the report does not reflect the time until the timeout.

 [junit] Testcase: 
org.apache.cassandra.io.sstable.IndexSummaryManagerTest:testCompactionRace: 
  Caused an ERROR
[junit] Timeout occurred. Please note the time in the report does not 
reflect the time until the timeout.
[junit] junit.framework.AssertionFailedError: Timeout occurred. Please note 
the time in the report does not reflect the time until the timeout.




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


[jira] [Commented] (CASSANDRA-8502) Static columns returning null for pages after first

2015-05-27 Thread Dave Brosius (JIRA)

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

Dave Brosius commented on CASSANDRA-8502:
-

something seems wrong here, please check

class: SliceQueryFilter 
method: public SliceQueryFilter withUpdatedStart(Composite newStart, CFMetaData 
cfm)
line: if (!reversed && sliceIncludesStatics(slice, cfm) && 
!newStart.equals(ByteBufferUtil.EMPTY_BYTE_BUFFER))

probably wanted 

!newStart.toByteBuffer().equals(ByteBufferUtil.EMPTY_BYTE_BUFFER)

or even

!newStart.isEmpty()

> Static columns returning null for pages after first
> ---
>
> Key: CASSANDRA-8502
> URL: https://issues.apache.org/jira/browse/CASSANDRA-8502
> Project: Cassandra
>  Issue Type: Bug
>  Components: Core
>Reporter: Flavien Charlon
>Assignee: Tyler Hobbs
> Fix For: 2.1.6, 2.0.16, 2.2.0 rc1
>
> Attachments: 8502-2.0-v2.txt, 8502-2.0.txt, 8502-2.1-v2.txt, 
> null-static-column.txt
>
>
> When paging is used for a query containing a static column, the first page 
> contains the right value for the static column, but subsequent pages have 
> null null for the static column instead of the expected value.
> Repro steps:
> - Create a table with a static column
> - Create a partition with 500 cells
> - Using cqlsh, query that partition
> Actual result:
> - You will see that first, the static column appears as expected, but if you 
> press a key after "---MORE---", the static columns will appear as null.
> See the attached file for a repro of the output.
> I am using a single node cluster.



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


[jira] [Reopened] (CASSANDRA-8502) Static columns returning null for pages after first

2015-05-27 Thread Dave Brosius (JIRA)

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

Dave Brosius reopened CASSANDRA-8502:
-

> Static columns returning null for pages after first
> ---
>
> Key: CASSANDRA-8502
> URL: https://issues.apache.org/jira/browse/CASSANDRA-8502
> Project: Cassandra
>  Issue Type: Bug
>  Components: Core
>Reporter: Flavien Charlon
>Assignee: Tyler Hobbs
> Fix For: 2.1.6, 2.0.16, 2.2.0 rc1
>
> Attachments: 8502-2.0-v2.txt, 8502-2.0.txt, 8502-2.1-v2.txt, 
> null-static-column.txt
>
>
> When paging is used for a query containing a static column, the first page 
> contains the right value for the static column, but subsequent pages have 
> null null for the static column instead of the expected value.
> Repro steps:
> - Create a table with a static column
> - Create a partition with 500 cells
> - Using cqlsh, query that partition
> Actual result:
> - You will see that first, the static column appears as expected, but if you 
> press a key after "---MORE---", the static columns will appear as null.
> See the attached file for a repro of the output.
> I am using a single node cluster.



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


[jira] [Assigned] (CASSANDRA-9496) ArrivalWindow should use primitives

2015-05-27 Thread sankalp kohli (JIRA)

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

sankalp kohli reassigned CASSANDRA-9496:


Assignee: sankalp kohli

> ArrivalWindow should use primitives 
> 
>
> Key: CASSANDRA-9496
> URL: https://issues.apache.org/jira/browse/CASSANDRA-9496
> Project: Cassandra
>  Issue Type: Improvement
>Reporter: sankalp kohli
>Assignee: sankalp kohli
>Priority: Minor
>
> While doing a heap analysis of a large cluster(1000+), I found that majority 
> of the strongly referenced objects on heap are coming from ArrivalWindow. 
> Currently ArrivalWindow uses BoundedStatsDeque which uses 
> LinkedBlockingDeque deque. 
> For a cluster of size 1000, it will translate into 2 million objects. 
> We can use primitives and use an array of long(long[]). This will cut down on 
> the number of objects and the change is not that big. 
>   



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


[jira] [Commented] (CASSANDRA-9496) ArrivalWindow should use primitives

2015-05-27 Thread sankalp kohli (JIRA)

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

sankalp kohli commented on CASSANDRA-9496:
--

cc [~brandon.williams]

> ArrivalWindow should use primitives 
> 
>
> Key: CASSANDRA-9496
> URL: https://issues.apache.org/jira/browse/CASSANDRA-9496
> Project: Cassandra
>  Issue Type: Improvement
>Reporter: sankalp kohli
>Assignee: sankalp kohli
>Priority: Minor
>
> While doing a heap analysis of a large cluster(1000+), I found that majority 
> of the strongly referenced objects on heap are coming from ArrivalWindow. 
> Currently ArrivalWindow uses BoundedStatsDeque which uses 
> LinkedBlockingDeque deque. 
> For a cluster of size 1000, it will translate into 2 million objects. 
> We can use primitives and use an array of long(long[]). This will cut down on 
> the number of objects and the change is not that big. 
>   



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


[jira] [Created] (CASSANDRA-9496) ArrivalWindow should use primitives

2015-05-27 Thread sankalp kohli (JIRA)
sankalp kohli created CASSANDRA-9496:


 Summary: ArrivalWindow should use primitives 
 Key: CASSANDRA-9496
 URL: https://issues.apache.org/jira/browse/CASSANDRA-9496
 Project: Cassandra
  Issue Type: Improvement
Reporter: sankalp kohli
Priority: Minor


While doing a heap analysis of a large cluster(1000+), I found that majority of 
the strongly referenced objects on heap are coming from ArrivalWindow. 
Currently ArrivalWindow uses BoundedStatsDeque which uses 
LinkedBlockingDeque deque. 
For a cluster of size 1000, it will translate into 2 million objects. 

We can use primitives and use an array of long(long[]). This will cut down on 
the number of objects and the change is not that big. 
  



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


[jira] [Updated] (CASSANDRA-9495) User Defined Function failure - No protocol version matching integer version 4

2015-05-27 Thread Robert Stupp (JIRA)

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

Robert Stupp updated CASSANDRA-9495:

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

> User Defined Function failure - No protocol version matching integer version 4
> --
>
> Key: CASSANDRA-9495
> URL: https://issues.apache.org/jira/browse/CASSANDRA-9495
> Project: Cassandra
>  Issue Type: Bug
>  Components: Core
> Environment: OSX 10.10.2
>Reporter: Chandran Anjur Narasimhan
> Fix For: 2.2.0 rc1
>
>
> A simple user defined function throws error while executing from the CQLSH.
> cqlsh> select release_version from system.local;
>  release_version
> -
>   3.0.0-SNAPSHOT
> cqlsh:testjson> select * from user;
>  id   | price | total
> --+--
>  16664872-01ae-11e5-a322-1697f925ec7c |10 |  1011
>  a94e129c-01ad-11e5-a322-1697f925ec7b |   101 |  1011
>  16664872-01ae-11e5-a322-1697f925ec7b |  1011 |  1011
> (3 rows)
> cqlsh:testjson> CREATE FUNCTION justecho(value double ) RETURNS NULL ON NULL 
> INPUT RETURNS double  LANGUAGE java AS 'System.out.println(value); return 
> value*value;';
> cqlsh:testjson> 
> cqlsh:testjson> select id, justecho(total) from user ;
> Traceback (most recent call last):
>   File "./cqlsh", line 1086, in perform_simple_statement
> rows = future.result(self.session.default_timeout)
>   File 
> "/Users/nchan/Programs/apache/cassandra-3.0/bin/../lib/cassandra-driver-internal-only-2.5.1.post0-074650b.zip/cassandra-driver-2.5.1.post0-074650b/cassandra/cluster.py",
>  line 3227, in result
> raise self._final_exception
> FunctionFailure: code=1400 [User Defined Function failure] message="execution 
> of 'testjson.justecho[double]' failed: java.lang.IllegalArgumentException: No 
> protocol version matching integer version 4"



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


[jira] [Commented] (CASSANDRA-9495) User Defined Function failure - No protocol version matching integer version 4

2015-05-27 Thread Robert Stupp (JIRA)

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

Robert Stupp commented on CASSANDRA-9495:
-

[~reach.nchan], thanks for reporting this.
It's a known issue and will be resolved for 2.2rc1.

> User Defined Function failure - No protocol version matching integer version 4
> --
>
> Key: CASSANDRA-9495
> URL: https://issues.apache.org/jira/browse/CASSANDRA-9495
> Project: Cassandra
>  Issue Type: Bug
>  Components: Core
> Environment: OSX 10.10.2
>Reporter: Chandran Anjur Narasimhan
> Fix For: 2.2.0 rc1
>
>
> A simple user defined function throws error while executing from the CQLSH.
> cqlsh> select release_version from system.local;
>  release_version
> -
>   3.0.0-SNAPSHOT
> cqlsh:testjson> select * from user;
>  id   | price | total
> --+--
>  16664872-01ae-11e5-a322-1697f925ec7c |10 |  1011
>  a94e129c-01ad-11e5-a322-1697f925ec7b |   101 |  1011
>  16664872-01ae-11e5-a322-1697f925ec7b |  1011 |  1011
> (3 rows)
> cqlsh:testjson> CREATE FUNCTION justecho(value double ) RETURNS NULL ON NULL 
> INPUT RETURNS double  LANGUAGE java AS 'System.out.println(value); return 
> value*value;';
> cqlsh:testjson> 
> cqlsh:testjson> select id, justecho(total) from user ;
> Traceback (most recent call last):
>   File "./cqlsh", line 1086, in perform_simple_statement
> rows = future.result(self.session.default_timeout)
>   File 
> "/Users/nchan/Programs/apache/cassandra-3.0/bin/../lib/cassandra-driver-internal-only-2.5.1.post0-074650b.zip/cassandra-driver-2.5.1.post0-074650b/cassandra/cluster.py",
>  line 3227, in result
> raise self._final_exception
> FunctionFailure: code=1400 [User Defined Function failure] message="execution 
> of 'testjson.justecho[double]' failed: java.lang.IllegalArgumentException: No 
> protocol version matching integer version 4"



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


[jira] [Updated] (CASSANDRA-9495) User Defined Function failure - No protocol version matching integer version 4

2015-05-27 Thread Robert Stupp (JIRA)

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

Robert Stupp updated CASSANDRA-9495:

Component/s: (was: Tools)
 Core

> User Defined Function failure - No protocol version matching integer version 4
> --
>
> Key: CASSANDRA-9495
> URL: https://issues.apache.org/jira/browse/CASSANDRA-9495
> Project: Cassandra
>  Issue Type: Bug
>  Components: Core
> Environment: OSX 10.10.2
>Reporter: Chandran Anjur Narasimhan
> Fix For: 3.x
>
>
> A simple user defined function throws error while executing from the CQLSH.
> cqlsh> select release_version from system.local;
>  release_version
> -
>   3.0.0-SNAPSHOT
> cqlsh:testjson> select * from user;
>  id   | price | total
> --+--
>  16664872-01ae-11e5-a322-1697f925ec7c |10 |  1011
>  a94e129c-01ad-11e5-a322-1697f925ec7b |   101 |  1011
>  16664872-01ae-11e5-a322-1697f925ec7b |  1011 |  1011
> (3 rows)
> cqlsh:testjson> CREATE FUNCTION justecho(value double ) RETURNS NULL ON NULL 
> INPUT RETURNS double  LANGUAGE java AS 'System.out.println(value); return 
> value*value;';
> cqlsh:testjson> 
> cqlsh:testjson> select id, justecho(total) from user ;
> Traceback (most recent call last):
>   File "./cqlsh", line 1086, in perform_simple_statement
> rows = future.result(self.session.default_timeout)
>   File 
> "/Users/nchan/Programs/apache/cassandra-3.0/bin/../lib/cassandra-driver-internal-only-2.5.1.post0-074650b.zip/cassandra-driver-2.5.1.post0-074650b/cassandra/cluster.py",
>  line 3227, in result
> raise self._final_exception
> FunctionFailure: code=1400 [User Defined Function failure] message="execution 
> of 'testjson.justecho[double]' failed: java.lang.IllegalArgumentException: No 
> protocol version matching integer version 4"



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


[jira] [Updated] (CASSANDRA-9495) User Defined Function failure - No protocol version matching integer version 4

2015-05-27 Thread Chandran Anjur Narasimhan (JIRA)

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

Chandran Anjur Narasimhan updated CASSANDRA-9495:
-
Description: 
A simple user defined function throws error while executing from the CQLSH.

cqlsh> select release_version from system.local;

 release_version
-
  3.0.0-SNAPSHOT

cqlsh:testjson> select * from user;

 id   | price | total
--+--
 16664872-01ae-11e5-a322-1697f925ec7c |10 |  1011
 a94e129c-01ad-11e5-a322-1697f925ec7b |   101 |  1011
 16664872-01ae-11e5-a322-1697f925ec7b |  1011 |  1011

(3 rows)


cqlsh:testjson> CREATE FUNCTION justecho(value double ) RETURNS NULL ON NULL 
INPUT RETURNS double  LANGUAGE java AS 'System.out.println(value); return 
value*value;';
cqlsh:testjson> 
cqlsh:testjson> select id, justecho(total) from user ;
Traceback (most recent call last):
  File "./cqlsh", line 1086, in perform_simple_statement
rows = future.result(self.session.default_timeout)
  File 
"/Users/nchan/Programs/apache/cassandra-3.0/bin/../lib/cassandra-driver-internal-only-2.5.1.post0-074650b.zip/cassandra-driver-2.5.1.post0-074650b/cassandra/cluster.py",
 line 3227, in result
raise self._final_exception
FunctionFailure: code=1400 [User Defined Function failure] message="execution 
of 'testjson.justecho[double]' failed: java.lang.IllegalArgumentException: No 
protocol version matching integer version 4"


  was:
A simple user defined function throws error while executing from the CQLSH.

cqlsh> select release_version from system.local;

 release_version
-
  3.0.0-SNAPSHOT

cqlsh:testjson> select * from user;

 id   | price | total
--+--
 16664872-01ae-11e5-a322-1697f925ec7c |10 |  1011
 a94e129c-01ad-11e5-a322-1697f925ec7b |   101 |  1011
 16664872-01ae-11e5-a322-1697f925ec7b |  1011 |  1011

(3 rows)


cqlsh:testjson> CREATE FUNCTION justecho(value double ) RETURNS NULL ON NULL 
INPUT RETURNS double  LANGUAGE java AS 'System.out.println(value); return 
value*value;';
cqlsh:testjson> 
cqlsh:testjson> select id, justecho(total) from user ;
Traceback (most recent call last):
  File "./cqlsh", line 1086, in perform_simple_statement
rows = future.result(self.session.default_timeout)
  File 
"/Users/nchan/Programs/apache/cassandra-3.0/bin/../lib/cassandra-driver-internal-only-2.5.1.post0-074650b.zip/cassandra-driver-2.5.1.post0-074650b/cassandra/cluster.py",
 line 3227, in result
raise self._final_exception
FunctionFailure: code=1400 [User Defined Function failure] message="execution 
of 'testjson.justechoagaind[double]' failed: 
java.lang.IllegalArgumentException: No protocol version matching integer 
version 4"



> User Defined Function failure - No protocol version matching integer version 4
> --
>
> Key: CASSANDRA-9495
> URL: https://issues.apache.org/jira/browse/CASSANDRA-9495
> Project: Cassandra
>  Issue Type: Bug
>  Components: Tools
> Environment: OSX 10.10.2
>Reporter: Chandran Anjur Narasimhan
> Fix For: 3.x
>
>
> A simple user defined function throws error while executing from the CQLSH.
> cqlsh> select release_version from system.local;
>  release_version
> -
>   3.0.0-SNAPSHOT
> cqlsh:testjson> select * from user;
>  id   | price | total
> --+--
>  16664872-01ae-11e5-a322-1697f925ec7c |10 |  1011
>  a94e129c-01ad-11e5-a322-1697f925ec7b |   101 |  1011
>  16664872-01ae-11e5-a322-1697f925ec7b |  1011 |  1011
> (3 rows)
> cqlsh:testjson> CREATE FUNCTION justecho(value double ) RETURNS NULL ON NULL 
> INPUT RETURNS double  LANGUAGE java AS 'System.out.println(value); return 
> value*value;';
> cqlsh:testjson> 
> cqlsh:testjson> select id, justecho(total) from user ;
> Traceback (most recent call last):
>   File "./cqlsh", line 1086, in perform_simple_statement
> rows = future.result(self.session.default_timeout)
>   File 
> "/Users/nchan/Programs/apache/cassandra-3.0/bin/../lib/cassandra-driver-internal-only-2.5.1.post0-074650b.zip/cassandra-driver-2.5.1.post0-074650b/cassandra/cluster.py",
>  line 3227, in result
> raise self._final_exception
> FunctionFailure: code=1400 [User Defined Function failure] message="execution 
> of 'testjson.justecho[double]' failed: java.lang.IllegalArgumentException: No 
> protocol version matching integer version 4"



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


[jira] [Created] (CASSANDRA-9495) User Defined Function failure - No protocol version matching integer version 4

2015-05-27 Thread Chandran Anjur Narasimhan (JIRA)
Chandran Anjur Narasimhan created CASSANDRA-9495:


 Summary: User Defined Function failure - No protocol version 
matching integer version 4
 Key: CASSANDRA-9495
 URL: https://issues.apache.org/jira/browse/CASSANDRA-9495
 Project: Cassandra
  Issue Type: Bug
  Components: Tools
 Environment: OSX 10.10.2
Reporter: Chandran Anjur Narasimhan
 Fix For: 3.x


A simple user defined function throws error while executing from the CQLSH.

cqlsh> select release_version from system.local;

 release_version
-
  3.0.0-SNAPSHOT

cqlsh:testjson> select * from user;

 id   | price | total
--+--
 16664872-01ae-11e5-a322-1697f925ec7c |10 |  1011
 a94e129c-01ad-11e5-a322-1697f925ec7b |   101 |  1011
 16664872-01ae-11e5-a322-1697f925ec7b |  1011 |  1011

(3 rows)


cqlsh:testjson> CREATE FUNCTION justecho(value double ) RETURNS NULL ON NULL 
INPUT RETURNS double  LANGUAGE java AS 'System.out.println(value); return 
value*value;';
cqlsh:testjson> 
cqlsh:testjson> select id, justecho(total) from user ;
Traceback (most recent call last):
  File "./cqlsh", line 1086, in perform_simple_statement
rows = future.result(self.session.default_timeout)
  File 
"/Users/nchan/Programs/apache/cassandra-3.0/bin/../lib/cassandra-driver-internal-only-2.5.1.post0-074650b.zip/cassandra-driver-2.5.1.post0-074650b/cassandra/cluster.py",
 line 3227, in result
raise self._final_exception
FunctionFailure: code=1400 [User Defined Function failure] message="execution 
of 'testjson.justechoagaind[double]' failed: 
java.lang.IllegalArgumentException: No protocol version matching integer 
version 4"




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


[jira] [Commented] (CASSANDRA-9494) Need to set TTL with COPY command

2015-05-27 Thread Ed Chen (JIRA)

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

Ed Chen commented on CASSANDRA-9494:


In http://docs.datastax.com/en/cql/3.1/cql/cql_reference/copy_r.html, I don't 
see such "USING TTL" clause in COPY command Synopsis. Is there any reference 
available?

> Need to set TTL with COPY command
> -
>
> Key: CASSANDRA-9494
> URL: https://issues.apache.org/jira/browse/CASSANDRA-9494
> Project: Cassandra
>  Issue Type: Sub-task
>  Components: API
>Reporter: Ed Chen
>  Labels: cqlsh
> Fix For: 2.0.x, 2.2.x
>
>
> I can import a chunk of data into Cassandra table with COPY command like:
> COPY my_table (name, address) FROM my_file.csv WITH option='value' ... ;
> But I am not able to specify a finite TTL in COPY command with "USING TTL 
> 3600", for example. 



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


[jira] [Commented] (CASSANDRA-9493) Integrate latest 2.2 Java Driver

2015-05-27 Thread Robert Stupp (JIRA)

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

Robert Stupp commented on CASSANDRA-9493:
-

Well 404 + 786 alone would also work - can add a temporary "Math.max(3, 
protocolVersion)" for the UDF invocations so that executions don't fail in the 
driver due to "don't know how to serialize with version 4".

> Integrate latest 2.2 Java Driver
> 
>
> Key: CASSANDRA-9493
> URL: https://issues.apache.org/jira/browse/CASSANDRA-9493
> Project: Cassandra
>  Issue Type: Task
>Reporter: Robert Stupp
> Fix For: 2.2.0 rc1
>
>
> We need some functionality from the Java Driver 2.2 for C* 2.2 - especially 
> for UDFs.
> Related Java Driver tickets:
> [JAVA-572 - protocol V4|https://datastax-oss.atlassian.net/browse/JAVA-572]
> [JAVA-783 - V4 enum 
> constant|https://datastax-oss.atlassian.net/browse/JAVA-783]
> [JAVA-404 - date + time|https://datastax-oss.atlassian.net/browse/JAVA-404]
> [JAVA-786 - smallint + 
> tinyint|https://datastax-oss.atlassian.net/browse/JAVA-786]



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


[jira] [Commented] (CASSANDRA-9071) CQLSSTableWriter gives java.lang.AssertionError: Empty partition

2015-05-27 Thread Fabien Rousseau (JIRA)

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

Fabien Rousseau commented on CASSANDRA-9071:


Hum, it's because the check for "Empty partition" is invalid...
With the current code, it's possible for the first inserted row/partition to be 
empty (due to 
https://github.com/apache/cassandra/blob/cassandra-2.1/src/java/org/apache/cassandra/io/sstable/SSTableSimpleUnsortedWriter.java#L177
 )
That's why the check allows for the first row/partition to be empty 
(https://github.com/apache/cassandra/blob/cassandra-2.1/src/java/org/apache/cassandra/io/sstable/SSTableSimpleUnsortedWriter.java#L233)

BUT the buffer is a TreeMap which reorders keys (thus the first inserted key is 
not necessarily in the first position/the first returned by the iterator).



> CQLSSTableWriter gives java.lang.AssertionError: Empty partition
> 
>
> Key: CASSANDRA-9071
> URL: https://issues.apache.org/jira/browse/CASSANDRA-9071
> Project: Cassandra
>  Issue Type: Bug
>  Components: Tools
> Environment: java 7 / 8
> cassandra 2.1.3 snapshot build locally with last commit 
> https://github.com/apache/cassandra/commit/6ee4b0989d9a3ae3e704918622024fa57fdf63e7
> macos Yosemite 10.10.2
>Reporter: Ajit Joglekar
>Assignee: Benedict
> Fix For: 2.1.x
>
> Attachments: EmailWriter.java, Screen Shot 2015-04-15 at 11.14.40 
> PM.png, data.csv.gz
>
>
> I am always getting the following error:
> Exception in thread "main" java.lang.AssertionError: Empty partition
> at 
> org.apache.cassandra.io.sstable.SSTableSimpleUnsortedWriter$DiskWriter.run(SSTableSimpleUnsortedWriter.java:228)
> It happens at a certain point that seems to be repeatable. Only issue is I am 
> converting 400 million records into multiple SSTables and creating small test 
> is a challenge
> Last comment from Benedict looks relevant here 
> https://issues.apache.org/jira/browse/CASSANDRA-8619
> Is there a work around, quick fix, fix that I can try out locally?
> Thanks,
> -Ajit



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


[jira] [Comment Edited] (CASSANDRA-9402) Implement proper sandboxing for UDFs

2015-05-27 Thread Robert Stupp (JIRA)

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

Robert Stupp edited comment on CASSANDRA-9402 at 5/27/15 10:44 PM:
---

The pl/java SM is too lax. It only prevents {{System.exit}}, 
{{System.setProperty}} and {{setSecurityManager}} - and does not restrict 
access to classes.
Further, it only checks for {{RuntimePermission}} and {{PropertyPermission}} - 
that's not everything - a lot of permissions like {{ExecPermission}}, 
{{NetPermission}}, {{LinkPermission}}, {{SOcketPermission}}, 
{{SecurityPermission}} and {{ReflectPermission}} are missing. Sure, as of now, 
we have a "very binary" permission model: either all permissions or no 
permissions.

The methods {{SecurityManager.checkPackageAccess/checkPackageDefinition()}} are 
not sufficient to prevent class access - we want people to be able to access 
{{java.lang.Long}} but not {{java.lang.Runtime}}.

With static code blocks, it's easy to execute code with a simple 
{{Class.forName()}} or by just assuming that you've managed to get that static 
code block through the UDF compile process. To check access to specific 
classes, you really have to implement a custom class loader. That's what the 
UDF CL does - it does not know about any class itself - so it's able to check 
all class names - even those in {{java.lang}}. To prevent duplicate classes 
(e.g. {{UDFunction cannot be cast to UDFunction}} it delegates to the "main" 
class loader.

EDIT: I would like to implement a custom SM - but mainly for performance 
reasons since we do not need the flexible permission concept at the moment - 
it's only "all perms" or "no perms". Well - except for Nashorn...


was (Author: snazy):
The pl/java SM is too lax. It only prevents {{System.exit}}, 
{{System.setProperty}} and {{setSecurityManager}} - and does not restrict 
access to classes.
Further, it only checks for {{RuntimePermission}} and {{PropertyPermission}} - 
that's not everything - a lot of permissions like {{ExecPermission}}, 
{{NetPermission}}, {{LinkPermission}}, {{SOcketPermission}}, 
{{SecurityPermission}} and {{ReflectPermission}} are missing. Sure, as of now, 
we have a "very binary" permission model: either all permissions or no 
permissions.

The methods {{SecurityManager.checkPackageAccess/checkPackageDefinition()}} are 
not sufficient to prevent class access - we want people to be able to access 
{{java.lang.Long}} but not {{java.lang.Runtime}}.

With static code blocks, it's easy to execute code with a simple 
{{Class.forName()}} or by just assuming that you've managed to get that static 
code block through the UDF compile process. To check access to specific 
classes, you really have to implement a custom class loader. That's what the 
UDF CL does - it does not know about any class itself - so it's able to check 
all class names - even those in {{java.lang}}. To prevent duplicate classes 
(e.g. {{UDFunction cannot be cast to UDFunction}} it delegates to the "main" 
class loader.


> Implement proper sandboxing for UDFs
> 
>
> Key: CASSANDRA-9402
> URL: https://issues.apache.org/jira/browse/CASSANDRA-9402
> Project: Cassandra
>  Issue Type: Task
>Reporter: T Jake Luciani
>Assignee: Robert Stupp
>Priority: Critical
>  Labels: doc-impacting, security
> Fix For: 3.0 beta 1
>
> Attachments: 9402-warning.txt
>
>
> We want to avoid a security exploit for our users.  We need to make sure we 
> ship 2.2 UDFs with good defaults so someone exposing it to the internet 
> accidentally doesn't open themselves up to having arbitrary code run.



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


[jira] [Commented] (CASSANDRA-9402) Implement proper sandboxing for UDFs

2015-05-27 Thread T Jake Luciani (JIRA)

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

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

bq. Can we label UDF experimental in 2.2 and ship based on the 9404 approach 
and push this to 3.0?

Yes so long as we don't remove the .yaml flag disabling the udf feature by 
default

> Implement proper sandboxing for UDFs
> 
>
> Key: CASSANDRA-9402
> URL: https://issues.apache.org/jira/browse/CASSANDRA-9402
> Project: Cassandra
>  Issue Type: Task
>Reporter: T Jake Luciani
>Assignee: Robert Stupp
>Priority: Critical
>  Labels: doc-impacting, security
> Fix For: 3.0 beta 1
>
> Attachments: 9402-warning.txt
>
>
> We want to avoid a security exploit for our users.  We need to make sure we 
> ship 2.2 UDFs with good defaults so someone exposing it to the internet 
> accidentally doesn't open themselves up to having arbitrary code run.



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


[jira] [Commented] (CASSANDRA-9402) Implement proper sandboxing for UDFs

2015-05-27 Thread Robert Stupp (JIRA)

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

Robert Stupp commented on CASSANDRA-9402:
-

The pl/java SM is too lax. It only prevents {{System.exit}}, 
{{System.setProperty}} and {{setSecurityManager}} - and does not restrict 
access to classes.
Further, it only checks for {{RuntimePermission}} and {{PropertyPermission}} - 
that's not everything - a lot of permissions like {{ExecPermission}}, 
{{NetPermission}}, {{LinkPermission}}, {{SOcketPermission}}, 
{{SecurityPermission}} and {{ReflectPermission}} are missing. Sure, as of now, 
we have a "very binary" permission model: either all permissions or no 
permissions.

The methods {{SecurityManager.checkPackageAccess/checkPackageDefinition()}} are 
not sufficient to prevent class access - we want people to be able to access 
{{java.lang.Long}} but not {{java.lang.Runtime}}.

With static code blocks, it's easy to execute code with a simple 
{{Class.forName()}} or by just assuming that you've managed to get that static 
code block through the UDF compile process. To check access to specific 
classes, you really have to implement a custom class loader. That's what the 
UDF CL does - it does not know about any class itself - so it's able to check 
all class names - even those in {{java.lang}}. To prevent duplicate classes 
(e.g. {{UDFunction cannot be cast to UDFunction}} it delegates to the "main" 
class loader.


> Implement proper sandboxing for UDFs
> 
>
> Key: CASSANDRA-9402
> URL: https://issues.apache.org/jira/browse/CASSANDRA-9402
> Project: Cassandra
>  Issue Type: Task
>Reporter: T Jake Luciani
>Assignee: Robert Stupp
>Priority: Critical
>  Labels: doc-impacting, security
> Fix For: 3.0 beta 1
>
> Attachments: 9402-warning.txt
>
>
> We want to avoid a security exploit for our users.  We need to make sure we 
> ship 2.2 UDFs with good defaults so someone exposing it to the internet 
> accidentally doesn't open themselves up to having arbitrary code run.



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


[jira] [Commented] (CASSANDRA-9402) Implement proper sandboxing for UDFs

2015-05-27 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis commented on CASSANDRA-9402:
---

I had a look at postgresql's pl/java source.  The SecurityManager is pretty 
simple: 
https://github.com/tada/pljava/blob/5489d14073f02c064583f1d4818c2bcea7fee951/pljava/src/main/java/org/postgresql/pljava/internal/Backend.java

Why can't we do something like that?

> Implement proper sandboxing for UDFs
> 
>
> Key: CASSANDRA-9402
> URL: https://issues.apache.org/jira/browse/CASSANDRA-9402
> Project: Cassandra
>  Issue Type: Task
>Reporter: T Jake Luciani
>Assignee: Robert Stupp
>Priority: Critical
>  Labels: doc-impacting, security
> Fix For: 3.0 beta 1
>
> Attachments: 9402-warning.txt
>
>
> We want to avoid a security exploit for our users.  We need to make sure we 
> ship 2.2 UDFs with good defaults so someone exposing it to the internet 
> accidentally doesn't open themselves up to having arbitrary code run.



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


[jira] [Commented] (CASSANDRA-9402) Implement proper sandboxing for UDFs

2015-05-27 Thread Robert Stupp (JIRA)

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

Robert Stupp commented on CASSANDRA-9402:
-

There are some other projects that also execute arbitrary code. Will look 
around how these projects implement security - and how restrictive their 
approaches are.
I'm fine with leaving UDFs experimental in 2.2. Gives a nice amount of time to 
thoroughly think about and test the sandbox.

> Implement proper sandboxing for UDFs
> 
>
> Key: CASSANDRA-9402
> URL: https://issues.apache.org/jira/browse/CASSANDRA-9402
> Project: Cassandra
>  Issue Type: Task
>Reporter: T Jake Luciani
>Assignee: Robert Stupp
>Priority: Critical
>  Labels: doc-impacting, security
> Fix For: 3.0 beta 1
>
> Attachments: 9402-warning.txt
>
>
> We want to avoid a security exploit for our users.  We need to make sure we 
> ship 2.2 UDFs with good defaults so someone exposing it to the internet 
> accidentally doesn't open themselves up to having arbitrary code run.



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


[jira] [Issue Comment Deleted] (CASSANDRA-9402) Implement proper sandboxing for UDFs

2015-05-27 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis updated CASSANDRA-9402:
--
Comment: was deleted

(was: Committed and edited fixver for this ticket to 3.0b1)

> Implement proper sandboxing for UDFs
> 
>
> Key: CASSANDRA-9402
> URL: https://issues.apache.org/jira/browse/CASSANDRA-9402
> Project: Cassandra
>  Issue Type: Task
>Reporter: T Jake Luciani
>Assignee: Robert Stupp
>Priority: Critical
>  Labels: doc-impacting, security
> Fix For: 3.0 beta 1
>
> Attachments: 9402-warning.txt
>
>
> We want to avoid a security exploit for our users.  We need to make sure we 
> ship 2.2 UDFs with good defaults so someone exposing it to the internet 
> accidentally doesn't open themselves up to having arbitrary code run.



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


[jira] [Updated] (CASSANDRA-9402) Implement proper sandboxing for UDFs

2015-05-27 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis updated CASSANDRA-9402:
--

Committed and edited fixver for this ticket to 3.0b1

> Implement proper sandboxing for UDFs
> 
>
> Key: CASSANDRA-9402
> URL: https://issues.apache.org/jira/browse/CASSANDRA-9402
> Project: Cassandra
>  Issue Type: Task
>Reporter: T Jake Luciani
>Assignee: Robert Stupp
>Priority: Critical
>  Labels: doc-impacting, security
> Fix For: 3.0 beta 1
>
> Attachments: 9402-warning.txt
>
>
> We want to avoid a security exploit for our users.  We need to make sure we 
> ship 2.2 UDFs with good defaults so someone exposing it to the internet 
> accidentally doesn't open themselves up to having arbitrary code run.



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


[jira] [Updated] (CASSANDRA-9402) Implement proper sandboxing for UDFs

2015-05-27 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis updated CASSANDRA-9402:
--
Fix Version/s: (was: 2.2.0 rc1)
   3.0 beta 1

Committed and edited fixver for this ticket to 3.0b1

> Implement proper sandboxing for UDFs
> 
>
> Key: CASSANDRA-9402
> URL: https://issues.apache.org/jira/browse/CASSANDRA-9402
> Project: Cassandra
>  Issue Type: Task
>Reporter: T Jake Luciani
>Assignee: Robert Stupp
>Priority: Critical
>  Labels: doc-impacting, security
> Fix For: 3.0 beta 1
>
> Attachments: 9402-warning.txt
>
>
> We want to avoid a security exploit for our users.  We need to make sure we 
> ship 2.2 UDFs with good defaults so someone exposing it to the internet 
> accidentally doesn't open themselves up to having arbitrary code run.



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


[2/3] cassandra git commit: Explain that UDF security manager will be coming in 3.0

2015-05-27 Thread jbellis
Explain that UDF security manager will be coming in 3.0


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

Branch: refs/heads/trunk
Commit: 61bea5a0d944ef446c0187796db7b33f0d872da5
Parents: 7aafe05
Author: Jonathan Ellis 
Authored: Wed May 27 17:02:01 2015 -0500
Committer: Jonathan Ellis 
Committed: Wed May 27 17:02:06 2015 -0500

--
 NEWS.txt| 11 ---
 conf/cassandra.yaml |  6 --
 2 files changed, 12 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/61bea5a0/NEWS.txt
--
diff --git a/NEWS.txt b/NEWS.txt
index 98f0499..cc80cc1 100644
--- a/NEWS.txt
+++ b/NEWS.txt
@@ -53,9 +53,14 @@ New features
  been added to CQL.
  
  IMPORTANT NOTE: user-defined functions can be used to execute
- arbitrary and possibly evil code in Cassandra 2.2-beta1.
- To enable UDFs edit cassandra.yaml and set enable_user_defined_functions
- to true. CASSANDRA-9402 will add a security manager for UDFs.
+ arbitrary and possibly evil code in Cassandra 2.2, and are
+ therefore disabled by default.  To enable UDFs edit
+ cassandra.yaml and set enable_user_defined_functions to true.
+
+ CASSANDRA-9402 will add a security manager for UDFs in Cassandra
+ 3.0.  This will inherently be backwards-incompatible with any 2.2
+ UDF that perform insecure operations such as opening a socket or
+ writing to the filesystem.
  
- Row-cache is now fully off-heap.
- jemalloc is now automatically preloaded and used on Linux and OS-X if

http://git-wip-us.apache.org/repos/asf/cassandra/blob/61bea5a0/conf/cassandra.yaml
--
diff --git a/conf/cassandra.yaml b/conf/cassandra.yaml
index fb103fa..04a78bd 100644
--- a/conf/cassandra.yaml
+++ b/conf/cassandra.yaml
@@ -845,6 +845,8 @@ tracetype_query_ttl: 86400
 tracetype_repair_ttl: 604800
 
 # UDFs (user defined functions) are disabled by default.
-# As of Cassandra 2.2-beta1, there is no security manager or anything else in 
place that
-# prevents execution of evil code. CASSANDRA-9402 will fix this issue for 
Cassandra 2.2-rc1.
+# As of Cassandra 2.2, there is no security manager or anything else in place 
that
+# prevents execution of evil code. CASSANDRA-9402 will fix this issue for 
Cassandra 3.0.
+# This will inherently be backwards-incompatible with any 2.2 UDF that perform 
insecure
+# operations such as opening a socket or writing to the filesystem.
 enable_user_defined_functions: false



[1/3] cassandra git commit: Explain that UDF security manager will be coming in 3.0

2015-05-27 Thread jbellis
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-2.2 7aafe053e -> 61bea5a0d
  refs/heads/trunk d91eb0116 -> 03f556ffa


Explain that UDF security manager will be coming in 3.0


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

Branch: refs/heads/cassandra-2.2
Commit: 61bea5a0d944ef446c0187796db7b33f0d872da5
Parents: 7aafe05
Author: Jonathan Ellis 
Authored: Wed May 27 17:02:01 2015 -0500
Committer: Jonathan Ellis 
Committed: Wed May 27 17:02:06 2015 -0500

--
 NEWS.txt| 11 ---
 conf/cassandra.yaml |  6 --
 2 files changed, 12 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/61bea5a0/NEWS.txt
--
diff --git a/NEWS.txt b/NEWS.txt
index 98f0499..cc80cc1 100644
--- a/NEWS.txt
+++ b/NEWS.txt
@@ -53,9 +53,14 @@ New features
  been added to CQL.
  
  IMPORTANT NOTE: user-defined functions can be used to execute
- arbitrary and possibly evil code in Cassandra 2.2-beta1.
- To enable UDFs edit cassandra.yaml and set enable_user_defined_functions
- to true. CASSANDRA-9402 will add a security manager for UDFs.
+ arbitrary and possibly evil code in Cassandra 2.2, and are
+ therefore disabled by default.  To enable UDFs edit
+ cassandra.yaml and set enable_user_defined_functions to true.
+
+ CASSANDRA-9402 will add a security manager for UDFs in Cassandra
+ 3.0.  This will inherently be backwards-incompatible with any 2.2
+ UDF that perform insecure operations such as opening a socket or
+ writing to the filesystem.
  
- Row-cache is now fully off-heap.
- jemalloc is now automatically preloaded and used on Linux and OS-X if

http://git-wip-us.apache.org/repos/asf/cassandra/blob/61bea5a0/conf/cassandra.yaml
--
diff --git a/conf/cassandra.yaml b/conf/cassandra.yaml
index fb103fa..04a78bd 100644
--- a/conf/cassandra.yaml
+++ b/conf/cassandra.yaml
@@ -845,6 +845,8 @@ tracetype_query_ttl: 86400
 tracetype_repair_ttl: 604800
 
 # UDFs (user defined functions) are disabled by default.
-# As of Cassandra 2.2-beta1, there is no security manager or anything else in 
place that
-# prevents execution of evil code. CASSANDRA-9402 will fix this issue for 
Cassandra 2.2-rc1.
+# As of Cassandra 2.2, there is no security manager or anything else in place 
that
+# prevents execution of evil code. CASSANDRA-9402 will fix this issue for 
Cassandra 3.0.
+# This will inherently be backwards-incompatible with any 2.2 UDF that perform 
insecure
+# operations such as opening a socket or writing to the filesystem.
 enable_user_defined_functions: false



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

2015-05-27 Thread jbellis
Merge branch 'cassandra-2.2' into trunk


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

Branch: refs/heads/trunk
Commit: 03f556ffa8718754fe4eb329af2002d83ffc7147
Parents: d91eb01 61bea5a
Author: Jonathan Ellis 
Authored: Wed May 27 17:02:12 2015 -0500
Committer: Jonathan Ellis 
Committed: Wed May 27 17:02:12 2015 -0500

--
 NEWS.txt| 11 ---
 conf/cassandra.yaml |  6 --
 2 files changed, 12 insertions(+), 5 deletions(-)
--




[3/4] cassandra git commit: Add Static Analysis to warn on unsafe use of Autocloseable instances

2015-05-27 Thread jake
Add Static Analysis to warn on unsafe use of Autocloseable instances

Patch by tjake and carlyeks, reviewed by benedict for CASSANDRA-9431


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

Branch: refs/heads/trunk
Commit: 7aafe053e7c3b2e4ac1b2a444749df3dbbaa
Parents: 6fe6c99
Author: T Jake Luciani 
Authored: Wed May 20 10:23:18 2015 -0400
Committer: T Jake Luciani 
Committed: Wed May 27 17:53:26 2015 -0400

--
 CHANGES.txt |   1 +
 build.xml   |  44 +++-
 eclipse_compiler.properties |  88 
 .../apache/cassandra/cache/AutoSavingCache.java |   1 +
 .../cassandra/cache/SerializingCache.java   |   5 +
 .../apache/cassandra/db/BatchlogManager.java|   7 +-
 .../org/apache/cassandra/db/ColumnFamily.java   |   8 +-
 .../apache/cassandra/db/ColumnFamilyStore.java  |  31 +--
 src/java/org/apache/cassandra/db/Memtable.java  |  30 +--
 .../cassandra/db/MutationVerbHandler.java   |  24 +-
 .../apache/cassandra/db/RangeSliceReply.java|   5 +-
 .../cassandra/db/SizeEstimatesRecorder.java |  17 +-
 .../org/apache/cassandra/db/SystemKeyspace.java |   8 +-
 .../cassandra/db/commitlog/CommitLog.java   |   8 +-
 .../db/commitlog/CommitLogArchiver.java |  10 +-
 .../db/commitlog/CommitLogReplayer.java |  16 +-
 .../db/commitlog/CommitLogSegment.java  |   1 +
 .../compaction/AbstractCompactionStrategy.java  |   1 +
 .../db/compaction/CompactionManager.java| 222 +++
 .../cassandra/db/compaction/CompactionTask.java |  71 +++---
 .../DateTieredCompactionStrategy.java   |   3 +
 .../db/compaction/LazilyCompactedRow.java   |  15 +-
 .../compaction/LeveledCompactionStrategy.java   |   2 +
 .../cassandra/db/compaction/Scrubber.java   |   3 +
 .../SizeTieredCompactionStrategy.java   |   3 +
 .../cassandra/db/compaction/Upgrader.java   |  12 +-
 .../compaction/WrappingCompactionStrategy.java  |   1 +
 .../writers/DefaultCompactionWriter.java|   2 +
 .../writers/MajorLeveledCompactionWriter.java   |   3 +
 .../writers/MaxSSTableSizeWriter.java   |   3 +
 .../SplittingSizeTieredCompactionWriter.java|   3 +
 .../cassandra/db/marshal/CompositeType.java |   3 +-
 .../apache/cassandra/gms/FailureDetector.java   |   8 +-
 .../hadoop/AbstractColumnFamilyInputFormat.java |  15 +-
 .../hadoop/ColumnFamilyInputFormat.java |   1 +
 .../hadoop/ColumnFamilyOutputFormat.java|   1 +
 .../hadoop/ColumnFamilyRecordReader.java|   1 +
 .../hadoop/ColumnFamilyRecordWriter.java|   1 +
 .../apache/cassandra/hadoop/ConfigHelper.java   |   1 +
 .../cassandra/hadoop/cql3/CqlConfigHelper.java  |  11 +-
 .../cassandra/hadoop/cql3/CqlRecordWriter.java  |  48 ++--
 .../cassandra/hadoop/pig/CqlNativeStorage.java  |  21 +-
 .../io/compress/CompressionMetadata.java|  65 +++---
 .../cassandra/io/sstable/CQLSSTableWriter.java  |   1 +
 .../cassandra/io/sstable/IndexSummary.java  |  14 +-
 .../io/sstable/IndexSummaryBuilder.java |   1 +
 .../io/sstable/IndexSummaryManager.java |   1 +
 .../apache/cassandra/io/sstable/SSTable.java|   8 +-
 .../cassandra/io/sstable/SSTableLoader.java |   5 +-
 .../io/sstable/format/SSTableReader.java|  62 +++---
 .../io/sstable/format/big/BigTableReader.java   |  22 +-
 .../io/sstable/format/big/BigTableWriter.java   |   8 +-
 .../format/big/SSTableNamesIterator.java|   2 +
 .../io/util/DataIntegrityMetadata.java  |   8 +-
 .../cassandra/io/util/DataOutputBuffer.java |   2 +-
 .../cassandra/io/util/PoolingSegmentedFile.java |   1 +
 .../cassandra/io/util/RandomAccessReader.java   |   4 +
 .../cassandra/io/util/SafeMemoryWriter.java |   2 +-
 .../cassandra/locator/CloudstackSnitch.java |  13 +-
 .../cassandra/locator/PropertyFileSnitch.java   |   8 +-
 .../apache/cassandra/net/MessagingService.java  |   5 +
 .../cassandra/net/OutboundTcpConnection.java|   1 +
 .../apache/cassandra/security/SSLFactory.java   |   1 +
 .../cassandra/service/ActiveRepairService.java  |   2 +
 .../cassandra/service/FileCacheService.java |   1 +
 .../apache/cassandra/service/StorageProxy.java  |   3 +-
 .../cassandra/service/pager/PagingState.java|   3 +-
 .../cassandra/streaming/ConnectionHandler.java  |   5 +
 .../cassandra/streaming/StreamReader.java   |   1 +
 .../cassandra/streaming/StreamWriter.java   |  25 +--
 .../compress/CompressedStreamReader.java|   1 +
 .../compress/CompressedStreamWriter.java|  18 +-
 .../streaming/messages/IncomingFileMessage.java |   1 +
 .../streaming/messages/StreamInitMessage.ja

[1/4] cassandra git commit: Add Static Analysis to warn on unsafe use of Autocloseable instances

2015-05-27 Thread jake
Repository: cassandra
Updated Branches:
  refs/heads/trunk 5746f602f -> d91eb0116


http://git-wip-us.apache.org/repos/asf/cassandra/blob/7aafe053/src/java/org/apache/cassandra/utils/NativeSSTableLoaderClient.java
--
diff --git a/src/java/org/apache/cassandra/utils/NativeSSTableLoaderClient.java 
b/src/java/org/apache/cassandra/utils/NativeSSTableLoaderClient.java
index 5b46700..5448390 100644
--- a/src/java/org/apache/cassandra/utils/NativeSSTableLoaderClient.java
+++ b/src/java/org/apache/cassandra/utils/NativeSSTableLoaderClient.java
@@ -61,9 +61,9 @@ public class NativeSSTableLoaderClient extends 
SSTableLoader.Client
 if (username != null && password != null)
 builder = builder.withCredentials(username, password);
 
-try (Cluster cluster = builder.build())
+try (Cluster cluster = builder.build(); Session session = 
cluster.connect())
 {
-Session session = cluster.connect();
+
 Metadata metadata = cluster.getMetadata();
 
 setPartitioner(metadata.getPartitioner());

http://git-wip-us.apache.org/repos/asf/cassandra/blob/7aafe053/src/java/org/apache/cassandra/utils/concurrent/Ref.java
--
diff --git a/src/java/org/apache/cassandra/utils/concurrent/Ref.java 
b/src/java/org/apache/cassandra/utils/concurrent/Ref.java
index ebabd79..3df3ea4 100644
--- a/src/java/org/apache/cassandra/utils/concurrent/Ref.java
+++ b/src/java/org/apache/cassandra/utils/concurrent/Ref.java
@@ -49,7 +49,7 @@ import static org.apache.cassandra.utils.Throwables.merge;
  * Once the Ref.GlobalState has been completely released, the Tidy method is 
called and it removes the global reference
  * to itself so it may also be collected.
  */
-public final class Ref implements RefCounted, AutoCloseable
+public final class Ref implements RefCounted
 {
 static final Logger logger = LoggerFactory.getLogger(Ref.class);
 public static final boolean DEBUG_ENABLED = 
System.getProperty("cassandra.debugrefcount", "false").equalsIgnoreCase("true");

http://git-wip-us.apache.org/repos/asf/cassandra/blob/7aafe053/src/java/org/apache/cassandra/utils/concurrent/Refs.java
--
diff --git a/src/java/org/apache/cassandra/utils/concurrent/Refs.java 
b/src/java/org/apache/cassandra/utils/concurrent/Refs.java
index dd65971..bbc672d 100644
--- a/src/java/org/apache/cassandra/utils/concurrent/Refs.java
+++ b/src/java/org/apache/cassandra/utils/concurrent/Refs.java
@@ -89,6 +89,12 @@ public final class Refs> extends 
AbstractCollection i
 return ref != null;
 }
 
+public void relaseAllExcept(Collection keep)
+{
+Collection release = new ArrayList<>(references.keySet());
+release.retainAll(keep);
+release(release);
+}
 /**
  * Release a retained Ref to all of the provided objects; if any is not 
held, an exception will be thrown
  * @param release

http://git-wip-us.apache.org/repos/asf/cassandra/blob/7aafe053/src/java/org/apache/cassandra/utils/obs/OffHeapBitSet.java
--
diff --git a/src/java/org/apache/cassandra/utils/obs/OffHeapBitSet.java 
b/src/java/org/apache/cassandra/utils/obs/OffHeapBitSet.java
index 02efa65..46c1bd0 100644
--- a/src/java/org/apache/cassandra/utils/obs/OffHeapBitSet.java
+++ b/src/java/org/apache/cassandra/utils/obs/OffHeapBitSet.java
@@ -125,6 +125,7 @@ public class OffHeapBitSet implements IBitSet
 return type.sizeof((int) bytes.size()) + bytes.size();
 }
 
+@SuppressWarnings("resource")
 public static OffHeapBitSet deserialize(DataInput in) throws IOException
 {
 long byteCount = in.readInt() * 8L;



[jira] [Issue Comment Deleted] (CASSANDRA-9493) Integrate latest 2.2 Java Driver

2015-05-27 Thread Robert Stupp (JIRA)

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

Robert Stupp updated CASSANDRA-9493:

Comment: was deleted

(was: yes - was basically thinking of an "unofficial internal" build of the 
driver for the rc.)

> Integrate latest 2.2 Java Driver
> 
>
> Key: CASSANDRA-9493
> URL: https://issues.apache.org/jira/browse/CASSANDRA-9493
> Project: Cassandra
>  Issue Type: Task
>Reporter: Robert Stupp
> Fix For: 2.2.0 rc1
>
>
> We need some functionality from the Java Driver 2.2 for C* 2.2 - especially 
> for UDFs.
> Related Java Driver tickets:
> [JAVA-572 - protocol V4|https://datastax-oss.atlassian.net/browse/JAVA-572]
> [JAVA-783 - V4 enum 
> constant|https://datastax-oss.atlassian.net/browse/JAVA-783]
> [JAVA-404 - date + time|https://datastax-oss.atlassian.net/browse/JAVA-404]
> [JAVA-786 - smallint + 
> tinyint|https://datastax-oss.atlassian.net/browse/JAVA-786]



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


[2/4] cassandra git commit: Add Static Analysis to warn on unsafe use of Autocloseable instances

2015-05-27 Thread jake
http://git-wip-us.apache.org/repos/asf/cassandra/blob/7aafe053/src/java/org/apache/cassandra/hadoop/AbstractColumnFamilyInputFormat.java
--
diff --git 
a/src/java/org/apache/cassandra/hadoop/AbstractColumnFamilyInputFormat.java 
b/src/java/org/apache/cassandra/hadoop/AbstractColumnFamilyInputFormat.java
index 2c04475..4dd53ff 100644
--- a/src/java/org/apache/cassandra/hadoop/AbstractColumnFamilyInputFormat.java
+++ b/src/java/org/apache/cassandra/hadoop/AbstractColumnFamilyInputFormat.java
@@ -241,13 +241,14 @@ public abstract class AbstractColumnFamilyInputFormat extends InputFormat<
 
 private Map> getRangeMap(Configuration conf, String 
keyspace)
 {
-Session session = 
CqlConfigHelper.getInputCluster(ConfigHelper.getInputInitialAddress(conf).split(","),
 conf).connect();
-
-Map> map = new HashMap<>();
-Metadata metadata = session.getCluster().getMetadata();
-for (TokenRange tokenRange : metadata.getTokenRanges())
-map.put(tokenRange, metadata.getReplicas('"' + keyspace + '"', 
tokenRange));
-return map;
+try (Session session = 
CqlConfigHelper.getInputCluster(ConfigHelper.getInputInitialAddress(conf).split(","),
 conf).connect())
+{
+Map> map = new HashMap<>();
+Metadata metadata = session.getCluster().getMetadata();
+for (TokenRange tokenRange : metadata.getTokenRanges())
+map.put(tokenRange, metadata.getReplicas('"' + keyspace + '"', 
tokenRange));
+return map;
+}
 }
 
 private Map describeSplits(String keyspace, String 
table, TokenRange tokenRange, int splitSize)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/7aafe053/src/java/org/apache/cassandra/hadoop/ColumnFamilyInputFormat.java
--
diff --git a/src/java/org/apache/cassandra/hadoop/ColumnFamilyInputFormat.java 
b/src/java/org/apache/cassandra/hadoop/ColumnFamilyInputFormat.java
index 88dd2e2..f89825f 100644
--- a/src/java/org/apache/cassandra/hadoop/ColumnFamilyInputFormat.java
+++ b/src/java/org/apache/cassandra/hadoop/ColumnFamilyInputFormat.java
@@ -61,6 +61,7 @@ public class ColumnFamilyInputFormat extends 
AbstractColumnFamilyInputFormathttp://git-wip-us.apache.org/repos/asf/cassandra/blob/7aafe053/src/java/org/apache/cassandra/hadoop/ColumnFamilyOutputFormat.java
--
diff --git a/src/java/org/apache/cassandra/hadoop/ColumnFamilyOutputFormat.java 
b/src/java/org/apache/cassandra/hadoop/ColumnFamilyOutputFormat.java
index 94ced69..92e3829 100644
--- a/src/java/org/apache/cassandra/hadoop/ColumnFamilyOutputFormat.java
+++ b/src/java/org/apache/cassandra/hadoop/ColumnFamilyOutputFormat.java
@@ -114,6 +114,7 @@ public class ColumnFamilyOutputFormat extends 
OutputFormathttp://git-wip-us.apache.org/repos/asf/cassandra/blob/7aafe053/src/java/org/apache/cassandra/hadoop/ColumnFamilyRecordReader.java
--
diff --git a/src/java/org/apache/cassandra/hadoop/ColumnFamilyRecordReader.java 
b/src/java/org/apache/cassandra/hadoop/ColumnFamilyRecordReader.java
index d205f13..c103d75 100644
--- a/src/java/org/apache/cassandra/hadoop/ColumnFamilyRecordReader.java
+++ b/src/java/org/apache/cassandra/hadoop/ColumnFamilyRecordReader.java
@@ -82,6 +82,7 @@ public class ColumnFamilyRecordReader extends 
RecordReaderhttp://git-wip-us.apache.org/repos/asf/cassandra/blob/7aafe053/src/java/org/apache/cassandra/hadoop/ColumnFamilyRecordWriter.java
--
diff --git a/src/java/org/apache/cassandra/hadoop/ColumnFamilyRecordWriter.java 
b/src/java/org/apache/cassandra/hadoop/ColumnFamilyRecordWriter.java
index 31c7047..f06f03d 100644
--- a/src/java/org/apache/cassandra/hadoop/ColumnFamilyRecordWriter.java
+++ b/src/java/org/apache/cassandra/hadoop/ColumnFamilyRecordWriter.java
@@ -249,6 +249,7 @@ final class ColumnFamilyRecordWriter extends 
RecordWriterhttp://git-wip-us.apache.org/repos/asf/cassandra/blob/7aafe053/src/java/org/apache/cassandra/hadoop/ConfigHelper.java
--
diff --git a/src/java/org/apache/cassandra/hadoop/ConfigHelper.java 
b/src/java/org/apache/cassandra/hadoop/ConfigHelper.java
index b956e23..e81860d 100644
--- a/src/java/org/apache/cassandra/hadoop/ConfigHelper.java
+++ b/src/java/org/apache/cassandra/hadoop/ConfigHelper.java
@@ -543,6 +543,7 @@ public class ConfigHelper
 return client;
 }
 
+@SuppressWarnings("resource")
 public static Cassandra.Client createConnection(Configuration conf, String 
host, Integer port) throws IOException
 {
 try

http://git-wip-us.apache.org/repos/asf/cassandra/blob/7aafe053/src/java/org/apache/cassandra/hadoop/cql3/CqlConfigHelper.java

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

2015-05-27 Thread jake
Merge branch 'cassandra-2.2' into trunk

Conflicts:
build.xml


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

Branch: refs/heads/trunk
Commit: d91eb0116950fa5fc7a1a4cf93e090d476536ea3
Parents: 5746f60 7aafe05
Author: T Jake Luciani 
Authored: Wed May 27 17:56:48 2015 -0400
Committer: T Jake Luciani 
Committed: Wed May 27 17:56:48 2015 -0400

--
 CHANGES.txt |   1 +
 build.xml   |  40 +++-
 eclipse_compiler.properties |  88 
 .../apache/cassandra/cache/AutoSavingCache.java |   1 +
 .../cassandra/cache/SerializingCache.java   |   5 +
 .../apache/cassandra/db/BatchlogManager.java|   7 +-
 .../org/apache/cassandra/db/ColumnFamily.java   |   8 +-
 .../apache/cassandra/db/ColumnFamilyStore.java  |  31 +--
 src/java/org/apache/cassandra/db/Memtable.java  |  30 +--
 .../cassandra/db/MutationVerbHandler.java   |  24 +-
 .../apache/cassandra/db/RangeSliceReply.java|   5 +-
 .../cassandra/db/SizeEstimatesRecorder.java |  17 +-
 .../org/apache/cassandra/db/SystemKeyspace.java |   8 +-
 .../cassandra/db/commitlog/CommitLog.java   |   8 +-
 .../db/commitlog/CommitLogArchiver.java |  10 +-
 .../db/commitlog/CommitLogReplayer.java |  16 +-
 .../db/commitlog/CommitLogSegment.java  |   1 +
 .../compaction/AbstractCompactionStrategy.java  |   1 +
 .../db/compaction/CompactionManager.java| 222 +++
 .../cassandra/db/compaction/CompactionTask.java |  71 +++---
 .../DateTieredCompactionStrategy.java   |   3 +
 .../db/compaction/LazilyCompactedRow.java   |  15 +-
 .../compaction/LeveledCompactionStrategy.java   |   2 +
 .../cassandra/db/compaction/Scrubber.java   |   3 +
 .../SizeTieredCompactionStrategy.java   |   3 +
 .../cassandra/db/compaction/Upgrader.java   |  12 +-
 .../compaction/WrappingCompactionStrategy.java  |   1 +
 .../writers/DefaultCompactionWriter.java|   2 +
 .../writers/MajorLeveledCompactionWriter.java   |   3 +
 .../writers/MaxSSTableSizeWriter.java   |   3 +
 .../SplittingSizeTieredCompactionWriter.java|   3 +
 .../cassandra/db/marshal/CompositeType.java |   3 +-
 .../apache/cassandra/gms/FailureDetector.java   |   8 +-
 .../hadoop/AbstractColumnFamilyInputFormat.java |  15 +-
 .../hadoop/ColumnFamilyInputFormat.java |   1 +
 .../hadoop/ColumnFamilyOutputFormat.java|   1 +
 .../hadoop/ColumnFamilyRecordReader.java|   1 +
 .../hadoop/ColumnFamilyRecordWriter.java|   1 +
 .../apache/cassandra/hadoop/ConfigHelper.java   |   1 +
 .../cassandra/hadoop/cql3/CqlConfigHelper.java  |  11 +-
 .../cassandra/hadoop/cql3/CqlRecordWriter.java  |  48 ++--
 .../cassandra/hadoop/pig/CqlNativeStorage.java  |  21 +-
 .../io/compress/CompressionMetadata.java|  65 +++---
 .../cassandra/io/sstable/CQLSSTableWriter.java  |   1 +
 .../cassandra/io/sstable/IndexSummary.java  |  14 +-
 .../io/sstable/IndexSummaryBuilder.java |   1 +
 .../io/sstable/IndexSummaryManager.java |   1 +
 .../apache/cassandra/io/sstable/SSTable.java|   8 +-
 .../cassandra/io/sstable/SSTableLoader.java |   5 +-
 .../io/sstable/format/SSTableReader.java|  62 +++---
 .../io/sstable/format/big/BigTableReader.java   |  22 +-
 .../io/sstable/format/big/BigTableWriter.java   |   8 +-
 .../format/big/SSTableNamesIterator.java|   2 +
 .../io/util/DataIntegrityMetadata.java  |   8 +-
 .../cassandra/io/util/DataOutputBuffer.java |   2 +-
 .../cassandra/io/util/PoolingSegmentedFile.java |   1 +
 .../cassandra/io/util/RandomAccessReader.java   |   4 +
 .../cassandra/io/util/SafeMemoryWriter.java |   2 +-
 .../cassandra/locator/CloudstackSnitch.java |  13 +-
 .../cassandra/locator/PropertyFileSnitch.java   |   8 +-
 .../apache/cassandra/net/MessagingService.java  |   5 +
 .../cassandra/net/OutboundTcpConnection.java|   1 +
 .../apache/cassandra/security/SSLFactory.java   |   1 +
 .../cassandra/service/ActiveRepairService.java  |   2 +
 .../cassandra/service/FileCacheService.java |   1 +
 .../apache/cassandra/service/StorageProxy.java  |   3 +-
 .../cassandra/service/pager/PagingState.java|   3 +-
 .../cassandra/streaming/ConnectionHandler.java  |   5 +
 .../cassandra/streaming/StreamReader.java   |   1 +
 .../cassandra/streaming/StreamWriter.java   |  25 +--
 .../compress/CompressedStreamReader.java|   1 +
 .../compress/CompressedStreamWriter.java|  18 +-
 .../streaming/messages/IncomingFileMessage.java |   1 +
 .../streaming/messages/StreamInitMessage.java   |   8 +-
 .../thrift/CustomTNonBlockingServer.java  

[jira] [Commented] (CASSANDRA-9402) Implement proper sandboxing for UDFs

2015-05-27 Thread Aleksey Yeschenko (JIRA)

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

Aleksey Yeschenko commented on CASSANDRA-9402:
--

LGTM

> Implement proper sandboxing for UDFs
> 
>
> Key: CASSANDRA-9402
> URL: https://issues.apache.org/jira/browse/CASSANDRA-9402
> Project: Cassandra
>  Issue Type: Task
>Reporter: T Jake Luciani
>Assignee: Robert Stupp
>Priority: Critical
>  Labels: doc-impacting, security
> Fix For: 2.2.0 rc1
>
> Attachments: 9402-warning.txt
>
>
> We want to avoid a security exploit for our users.  We need to make sure we 
> ship 2.2 UDFs with good defaults so someone exposing it to the internet 
> accidentally doesn't open themselves up to having arbitrary code run.



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


[jira] [Commented] (CASSANDRA-9493) Integrate latest 2.2 Java Driver

2015-05-27 Thread Robert Stupp (JIRA)

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

Robert Stupp commented on CASSANDRA-9493:
-

yes - was basically thinking of an "unofficial internal" build of the driver 
for the rc.

> Integrate latest 2.2 Java Driver
> 
>
> Key: CASSANDRA-9493
> URL: https://issues.apache.org/jira/browse/CASSANDRA-9493
> Project: Cassandra
>  Issue Type: Task
>Reporter: Robert Stupp
> Fix For: 2.2.0 rc1
>
>
> We need some functionality from the Java Driver 2.2 for C* 2.2 - especially 
> for UDFs.
> Related Java Driver tickets:
> [JAVA-572 - protocol V4|https://datastax-oss.atlassian.net/browse/JAVA-572]
> [JAVA-783 - V4 enum 
> constant|https://datastax-oss.atlassian.net/browse/JAVA-783]
> [JAVA-404 - date + time|https://datastax-oss.atlassian.net/browse/JAVA-404]
> [JAVA-786 - smallint + 
> tinyint|https://datastax-oss.atlassian.net/browse/JAVA-786]



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


[jira] [Commented] (CASSANDRA-9493) Integrate latest 2.2 Java Driver

2015-05-27 Thread Robert Stupp (JIRA)

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

Robert Stupp commented on CASSANDRA-9493:
-

yes - was basically thinking of an "unofficial internal" build of the driver 
for the rc.

> Integrate latest 2.2 Java Driver
> 
>
> Key: CASSANDRA-9493
> URL: https://issues.apache.org/jira/browse/CASSANDRA-9493
> Project: Cassandra
>  Issue Type: Task
>Reporter: Robert Stupp
> Fix For: 2.2.0 rc1
>
>
> We need some functionality from the Java Driver 2.2 for C* 2.2 - especially 
> for UDFs.
> Related Java Driver tickets:
> [JAVA-572 - protocol V4|https://datastax-oss.atlassian.net/browse/JAVA-572]
> [JAVA-783 - V4 enum 
> constant|https://datastax-oss.atlassian.net/browse/JAVA-783]
> [JAVA-404 - date + time|https://datastax-oss.atlassian.net/browse/JAVA-404]
> [JAVA-786 - smallint + 
> tinyint|https://datastax-oss.atlassian.net/browse/JAVA-786]



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


[3/3] cassandra git commit: Add Static Analysis to warn on unsafe use of Autocloseable instances

2015-05-27 Thread jake
Add Static Analysis to warn on unsafe use of Autocloseable instances

Patch by tjake and carlyeks, reviewed by benedict for CASSANDRA-9431


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

Branch: refs/heads/cassandra-2.2
Commit: 7aafe053e7c3b2e4ac1b2a444749df3dbbaa
Parents: 6fe6c99
Author: T Jake Luciani 
Authored: Wed May 20 10:23:18 2015 -0400
Committer: T Jake Luciani 
Committed: Wed May 27 17:53:26 2015 -0400

--
 CHANGES.txt |   1 +
 build.xml   |  44 +++-
 eclipse_compiler.properties |  88 
 .../apache/cassandra/cache/AutoSavingCache.java |   1 +
 .../cassandra/cache/SerializingCache.java   |   5 +
 .../apache/cassandra/db/BatchlogManager.java|   7 +-
 .../org/apache/cassandra/db/ColumnFamily.java   |   8 +-
 .../apache/cassandra/db/ColumnFamilyStore.java  |  31 +--
 src/java/org/apache/cassandra/db/Memtable.java  |  30 +--
 .../cassandra/db/MutationVerbHandler.java   |  24 +-
 .../apache/cassandra/db/RangeSliceReply.java|   5 +-
 .../cassandra/db/SizeEstimatesRecorder.java |  17 +-
 .../org/apache/cassandra/db/SystemKeyspace.java |   8 +-
 .../cassandra/db/commitlog/CommitLog.java   |   8 +-
 .../db/commitlog/CommitLogArchiver.java |  10 +-
 .../db/commitlog/CommitLogReplayer.java |  16 +-
 .../db/commitlog/CommitLogSegment.java  |   1 +
 .../compaction/AbstractCompactionStrategy.java  |   1 +
 .../db/compaction/CompactionManager.java| 222 +++
 .../cassandra/db/compaction/CompactionTask.java |  71 +++---
 .../DateTieredCompactionStrategy.java   |   3 +
 .../db/compaction/LazilyCompactedRow.java   |  15 +-
 .../compaction/LeveledCompactionStrategy.java   |   2 +
 .../cassandra/db/compaction/Scrubber.java   |   3 +
 .../SizeTieredCompactionStrategy.java   |   3 +
 .../cassandra/db/compaction/Upgrader.java   |  12 +-
 .../compaction/WrappingCompactionStrategy.java  |   1 +
 .../writers/DefaultCompactionWriter.java|   2 +
 .../writers/MajorLeveledCompactionWriter.java   |   3 +
 .../writers/MaxSSTableSizeWriter.java   |   3 +
 .../SplittingSizeTieredCompactionWriter.java|   3 +
 .../cassandra/db/marshal/CompositeType.java |   3 +-
 .../apache/cassandra/gms/FailureDetector.java   |   8 +-
 .../hadoop/AbstractColumnFamilyInputFormat.java |  15 +-
 .../hadoop/ColumnFamilyInputFormat.java |   1 +
 .../hadoop/ColumnFamilyOutputFormat.java|   1 +
 .../hadoop/ColumnFamilyRecordReader.java|   1 +
 .../hadoop/ColumnFamilyRecordWriter.java|   1 +
 .../apache/cassandra/hadoop/ConfigHelper.java   |   1 +
 .../cassandra/hadoop/cql3/CqlConfigHelper.java  |  11 +-
 .../cassandra/hadoop/cql3/CqlRecordWriter.java  |  48 ++--
 .../cassandra/hadoop/pig/CqlNativeStorage.java  |  21 +-
 .../io/compress/CompressionMetadata.java|  65 +++---
 .../cassandra/io/sstable/CQLSSTableWriter.java  |   1 +
 .../cassandra/io/sstable/IndexSummary.java  |  14 +-
 .../io/sstable/IndexSummaryBuilder.java |   1 +
 .../io/sstable/IndexSummaryManager.java |   1 +
 .../apache/cassandra/io/sstable/SSTable.java|   8 +-
 .../cassandra/io/sstable/SSTableLoader.java |   5 +-
 .../io/sstable/format/SSTableReader.java|  62 +++---
 .../io/sstable/format/big/BigTableReader.java   |  22 +-
 .../io/sstable/format/big/BigTableWriter.java   |   8 +-
 .../format/big/SSTableNamesIterator.java|   2 +
 .../io/util/DataIntegrityMetadata.java  |   8 +-
 .../cassandra/io/util/DataOutputBuffer.java |   2 +-
 .../cassandra/io/util/PoolingSegmentedFile.java |   1 +
 .../cassandra/io/util/RandomAccessReader.java   |   4 +
 .../cassandra/io/util/SafeMemoryWriter.java |   2 +-
 .../cassandra/locator/CloudstackSnitch.java |  13 +-
 .../cassandra/locator/PropertyFileSnitch.java   |   8 +-
 .../apache/cassandra/net/MessagingService.java  |   5 +
 .../cassandra/net/OutboundTcpConnection.java|   1 +
 .../apache/cassandra/security/SSLFactory.java   |   1 +
 .../cassandra/service/ActiveRepairService.java  |   2 +
 .../cassandra/service/FileCacheService.java |   1 +
 .../apache/cassandra/service/StorageProxy.java  |   3 +-
 .../cassandra/service/pager/PagingState.java|   3 +-
 .../cassandra/streaming/ConnectionHandler.java  |   5 +
 .../cassandra/streaming/StreamReader.java   |   1 +
 .../cassandra/streaming/StreamWriter.java   |  25 +--
 .../compress/CompressedStreamReader.java|   1 +
 .../compress/CompressedStreamWriter.java|  18 +-
 .../streaming/messages/IncomingFileMessage.java |   1 +
 .../streaming/messages/StreamInitMe

[1/3] cassandra git commit: Add Static Analysis to warn on unsafe use of Autocloseable instances

2015-05-27 Thread jake
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-2.2 6fe6c99ba -> 7aafe053e


http://git-wip-us.apache.org/repos/asf/cassandra/blob/7aafe053/src/java/org/apache/cassandra/utils/NativeSSTableLoaderClient.java
--
diff --git a/src/java/org/apache/cassandra/utils/NativeSSTableLoaderClient.java 
b/src/java/org/apache/cassandra/utils/NativeSSTableLoaderClient.java
index 5b46700..5448390 100644
--- a/src/java/org/apache/cassandra/utils/NativeSSTableLoaderClient.java
+++ b/src/java/org/apache/cassandra/utils/NativeSSTableLoaderClient.java
@@ -61,9 +61,9 @@ public class NativeSSTableLoaderClient extends 
SSTableLoader.Client
 if (username != null && password != null)
 builder = builder.withCredentials(username, password);
 
-try (Cluster cluster = builder.build())
+try (Cluster cluster = builder.build(); Session session = 
cluster.connect())
 {
-Session session = cluster.connect();
+
 Metadata metadata = cluster.getMetadata();
 
 setPartitioner(metadata.getPartitioner());

http://git-wip-us.apache.org/repos/asf/cassandra/blob/7aafe053/src/java/org/apache/cassandra/utils/concurrent/Ref.java
--
diff --git a/src/java/org/apache/cassandra/utils/concurrent/Ref.java 
b/src/java/org/apache/cassandra/utils/concurrent/Ref.java
index ebabd79..3df3ea4 100644
--- a/src/java/org/apache/cassandra/utils/concurrent/Ref.java
+++ b/src/java/org/apache/cassandra/utils/concurrent/Ref.java
@@ -49,7 +49,7 @@ import static org.apache.cassandra.utils.Throwables.merge;
  * Once the Ref.GlobalState has been completely released, the Tidy method is 
called and it removes the global reference
  * to itself so it may also be collected.
  */
-public final class Ref implements RefCounted, AutoCloseable
+public final class Ref implements RefCounted
 {
 static final Logger logger = LoggerFactory.getLogger(Ref.class);
 public static final boolean DEBUG_ENABLED = 
System.getProperty("cassandra.debugrefcount", "false").equalsIgnoreCase("true");

http://git-wip-us.apache.org/repos/asf/cassandra/blob/7aafe053/src/java/org/apache/cassandra/utils/concurrent/Refs.java
--
diff --git a/src/java/org/apache/cassandra/utils/concurrent/Refs.java 
b/src/java/org/apache/cassandra/utils/concurrent/Refs.java
index dd65971..bbc672d 100644
--- a/src/java/org/apache/cassandra/utils/concurrent/Refs.java
+++ b/src/java/org/apache/cassandra/utils/concurrent/Refs.java
@@ -89,6 +89,12 @@ public final class Refs> extends 
AbstractCollection i
 return ref != null;
 }
 
+public void relaseAllExcept(Collection keep)
+{
+Collection release = new ArrayList<>(references.keySet());
+release.retainAll(keep);
+release(release);
+}
 /**
  * Release a retained Ref to all of the provided objects; if any is not 
held, an exception will be thrown
  * @param release

http://git-wip-us.apache.org/repos/asf/cassandra/blob/7aafe053/src/java/org/apache/cassandra/utils/obs/OffHeapBitSet.java
--
diff --git a/src/java/org/apache/cassandra/utils/obs/OffHeapBitSet.java 
b/src/java/org/apache/cassandra/utils/obs/OffHeapBitSet.java
index 02efa65..46c1bd0 100644
--- a/src/java/org/apache/cassandra/utils/obs/OffHeapBitSet.java
+++ b/src/java/org/apache/cassandra/utils/obs/OffHeapBitSet.java
@@ -125,6 +125,7 @@ public class OffHeapBitSet implements IBitSet
 return type.sizeof((int) bytes.size()) + bytes.size();
 }
 
+@SuppressWarnings("resource")
 public static OffHeapBitSet deserialize(DataInput in) throws IOException
 {
 long byteCount = in.readInt() * 8L;



[2/3] cassandra git commit: Add Static Analysis to warn on unsafe use of Autocloseable instances

2015-05-27 Thread jake
http://git-wip-us.apache.org/repos/asf/cassandra/blob/7aafe053/src/java/org/apache/cassandra/hadoop/AbstractColumnFamilyInputFormat.java
--
diff --git 
a/src/java/org/apache/cassandra/hadoop/AbstractColumnFamilyInputFormat.java 
b/src/java/org/apache/cassandra/hadoop/AbstractColumnFamilyInputFormat.java
index 2c04475..4dd53ff 100644
--- a/src/java/org/apache/cassandra/hadoop/AbstractColumnFamilyInputFormat.java
+++ b/src/java/org/apache/cassandra/hadoop/AbstractColumnFamilyInputFormat.java
@@ -241,13 +241,14 @@ public abstract class AbstractColumnFamilyInputFormat extends InputFormat<
 
 private Map> getRangeMap(Configuration conf, String 
keyspace)
 {
-Session session = 
CqlConfigHelper.getInputCluster(ConfigHelper.getInputInitialAddress(conf).split(","),
 conf).connect();
-
-Map> map = new HashMap<>();
-Metadata metadata = session.getCluster().getMetadata();
-for (TokenRange tokenRange : metadata.getTokenRanges())
-map.put(tokenRange, metadata.getReplicas('"' + keyspace + '"', 
tokenRange));
-return map;
+try (Session session = 
CqlConfigHelper.getInputCluster(ConfigHelper.getInputInitialAddress(conf).split(","),
 conf).connect())
+{
+Map> map = new HashMap<>();
+Metadata metadata = session.getCluster().getMetadata();
+for (TokenRange tokenRange : metadata.getTokenRanges())
+map.put(tokenRange, metadata.getReplicas('"' + keyspace + '"', 
tokenRange));
+return map;
+}
 }
 
 private Map describeSplits(String keyspace, String 
table, TokenRange tokenRange, int splitSize)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/7aafe053/src/java/org/apache/cassandra/hadoop/ColumnFamilyInputFormat.java
--
diff --git a/src/java/org/apache/cassandra/hadoop/ColumnFamilyInputFormat.java 
b/src/java/org/apache/cassandra/hadoop/ColumnFamilyInputFormat.java
index 88dd2e2..f89825f 100644
--- a/src/java/org/apache/cassandra/hadoop/ColumnFamilyInputFormat.java
+++ b/src/java/org/apache/cassandra/hadoop/ColumnFamilyInputFormat.java
@@ -61,6 +61,7 @@ public class ColumnFamilyInputFormat extends 
AbstractColumnFamilyInputFormathttp://git-wip-us.apache.org/repos/asf/cassandra/blob/7aafe053/src/java/org/apache/cassandra/hadoop/ColumnFamilyOutputFormat.java
--
diff --git a/src/java/org/apache/cassandra/hadoop/ColumnFamilyOutputFormat.java 
b/src/java/org/apache/cassandra/hadoop/ColumnFamilyOutputFormat.java
index 94ced69..92e3829 100644
--- a/src/java/org/apache/cassandra/hadoop/ColumnFamilyOutputFormat.java
+++ b/src/java/org/apache/cassandra/hadoop/ColumnFamilyOutputFormat.java
@@ -114,6 +114,7 @@ public class ColumnFamilyOutputFormat extends 
OutputFormathttp://git-wip-us.apache.org/repos/asf/cassandra/blob/7aafe053/src/java/org/apache/cassandra/hadoop/ColumnFamilyRecordReader.java
--
diff --git a/src/java/org/apache/cassandra/hadoop/ColumnFamilyRecordReader.java 
b/src/java/org/apache/cassandra/hadoop/ColumnFamilyRecordReader.java
index d205f13..c103d75 100644
--- a/src/java/org/apache/cassandra/hadoop/ColumnFamilyRecordReader.java
+++ b/src/java/org/apache/cassandra/hadoop/ColumnFamilyRecordReader.java
@@ -82,6 +82,7 @@ public class ColumnFamilyRecordReader extends 
RecordReaderhttp://git-wip-us.apache.org/repos/asf/cassandra/blob/7aafe053/src/java/org/apache/cassandra/hadoop/ColumnFamilyRecordWriter.java
--
diff --git a/src/java/org/apache/cassandra/hadoop/ColumnFamilyRecordWriter.java 
b/src/java/org/apache/cassandra/hadoop/ColumnFamilyRecordWriter.java
index 31c7047..f06f03d 100644
--- a/src/java/org/apache/cassandra/hadoop/ColumnFamilyRecordWriter.java
+++ b/src/java/org/apache/cassandra/hadoop/ColumnFamilyRecordWriter.java
@@ -249,6 +249,7 @@ final class ColumnFamilyRecordWriter extends 
RecordWriterhttp://git-wip-us.apache.org/repos/asf/cassandra/blob/7aafe053/src/java/org/apache/cassandra/hadoop/ConfigHelper.java
--
diff --git a/src/java/org/apache/cassandra/hadoop/ConfigHelper.java 
b/src/java/org/apache/cassandra/hadoop/ConfigHelper.java
index b956e23..e81860d 100644
--- a/src/java/org/apache/cassandra/hadoop/ConfigHelper.java
+++ b/src/java/org/apache/cassandra/hadoop/ConfigHelper.java
@@ -543,6 +543,7 @@ public class ConfigHelper
 return client;
 }
 
+@SuppressWarnings("resource")
 public static Cassandra.Client createConnection(Configuration conf, String 
host, Integer port) throws IOException
 {
 try

http://git-wip-us.apache.org/repos/asf/cassandra/blob/7aafe053/src/java/org/apache/cassandra/hadoop/cql3/CqlConfigHelper.java

[jira] [Updated] (CASSANDRA-9402) Implement proper sandboxing for UDFs

2015-05-27 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis updated CASSANDRA-9402:
--
Attachment: 9402-warning.txt

Attached

> Implement proper sandboxing for UDFs
> 
>
> Key: CASSANDRA-9402
> URL: https://issues.apache.org/jira/browse/CASSANDRA-9402
> Project: Cassandra
>  Issue Type: Task
>Reporter: T Jake Luciani
>Assignee: Robert Stupp
>Priority: Critical
>  Labels: doc-impacting, security
> Fix For: 2.2.0 rc1
>
> Attachments: 9402-warning.txt
>
>
> We want to avoid a security exploit for our users.  We need to make sure we 
> ship 2.2 UDFs with good defaults so someone exposing it to the internet 
> accidentally doesn't open themselves up to having arbitrary code run.



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


[jira] [Commented] (CASSANDRA-9402) Implement proper sandboxing for UDFs

2015-05-27 Thread Aleksey Yeschenko (JIRA)

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

Aleksey Yeschenko commented on CASSANDRA-9402:
--

bq. Can we label UDF experimental in 2.2 and ship based on the 9404 approach 
and push this to 3.0?

I will be okay with it, so longer as we communicate this very clearly. 
Experimentalness is also very limited here - we are pretty certain that the 
syntax will stay the same, it's just that some functions might become broken 
for security reasons once the sandbox is in place.

> Implement proper sandboxing for UDFs
> 
>
> Key: CASSANDRA-9402
> URL: https://issues.apache.org/jira/browse/CASSANDRA-9402
> Project: Cassandra
>  Issue Type: Task
>Reporter: T Jake Luciani
>Assignee: Robert Stupp
>Priority: Critical
>  Labels: doc-impacting, security
> Fix For: 2.2.0 rc1
>
>
> We want to avoid a security exploit for our users.  We need to make sure we 
> ship 2.2 UDFs with good defaults so someone exposing it to the internet 
> accidentally doesn't open themselves up to having arbitrary code run.



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


[jira] [Updated] (CASSANDRA-9494) Need to set TTL with COPY command

2015-05-27 Thread Philip Thompson (JIRA)

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

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

> Need to set TTL with COPY command
> -
>
> Key: CASSANDRA-9494
> URL: https://issues.apache.org/jira/browse/CASSANDRA-9494
> Project: Cassandra
>  Issue Type: Sub-task
>  Components: API
>Reporter: Ed Chen
>  Labels: cqlsh
> Fix For: 2.0.x, 2.2.x
>
>
> I can import a chunk of data into Cassandra table with COPY command like:
> COPY my_table (name, address) FROM my_file.csv WITH option='value' ... ;
> But I am not able to specify a finite TTL in COPY command with "USING TTL 
> 3600", for example. 



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


[jira] [Commented] (CASSANDRA-7281) SELECT on tuple relations are broken for mixed ASC/DESC clustering order

2015-05-27 Thread Marcin Szymaniuk (JIRA)

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

Marcin Szymaniuk commented on CASSANDRA-7281:
-

Ok I will have a look. I guess we should change Fix Version/s then?

> SELECT on tuple relations are broken for mixed ASC/DESC clustering order
> 
>
> Key: CASSANDRA-7281
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7281
> Project: Cassandra
>  Issue Type: Bug
>Reporter: Sylvain Lebresne
>Assignee: Marcin Szymaniuk
> Fix For: 2.1.x
>
> Attachments: 
> 0001-CASSANDRA-7281-SELECT-on-tuple-relations-are-broken-.patch, 
> 0001-CASSANDRA-7281-SELECT-on-tuple-relations-are-broken-v2.patch, 
> 0001-CASSANDRA-7281-SELECT-on-tuple-relations-are-broken-v3.patch, 
> 0001-CASSANDRA-7281-SELECT-on-tuple-relations-are-broken-v4.patch
>
>
> As noted on 
> [CASSANDRA-6875|https://issues.apache.org/jira/browse/CASSANDRA-6875?focusedCommentId=13992153&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-13992153],
>  the tuple notation is broken when the clustering order mixes ASC and DESC 
> directives because the range of data they describe don't correspond to a 
> single continuous slice internally. To copy the example from CASSANDRA-6875:
> {noformat}
> cqlsh:ks> create table foo (a int, b int, c int, PRIMARY KEY (a, b, c)) WITH 
> CLUSTERING ORDER BY (b DESC, c ASC);
> cqlsh:ks> INSERT INTO foo (a, b, c) VALUES (0, 2, 0);
> cqlsh:ks> INSERT INTO foo (a, b, c) VALUES (0, 1, 0);
> cqlsh:ks> INSERT INTO foo (a, b, c) VALUES (0, 1, 1);
> cqlsh:ks> INSERT INTO foo (a, b, c) VALUES (0, 0, 0);
> cqlsh:ks> SELECT * FROM foo WHERE a=0;
>  a | b | c
> ---+---+---
>  0 | 2 | 0
>  0 | 1 | 0
>  0 | 1 | 1
>  0 | 0 | 0
> (4 rows)
> cqlsh:ks> SELECT * FROM foo WHERE a=0 AND (b, c) > (1, 0);
>  a | b | c
> ---+---+---
>  0 | 2 | 0
> (1 rows)
> {noformat}
> The last query should really return {{(0, 2, 0)}} and {{(0, 1, 1)}}.
> For that specific example we should generate 2 internal slices, but I believe 
> that with more clustering columns we may have more slices.



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


[jira] [Commented] (CASSANDRA-7281) SELECT on tuple relations are broken for mixed ASC/DESC clustering order

2015-05-27 Thread Marcin Szymaniuk (JIRA)

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

Marcin Szymaniuk commented on CASSANDRA-7281:
-

Ok I will have a look. I guess we should change Fix Version/s then?

> SELECT on tuple relations are broken for mixed ASC/DESC clustering order
> 
>
> Key: CASSANDRA-7281
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7281
> Project: Cassandra
>  Issue Type: Bug
>Reporter: Sylvain Lebresne
>Assignee: Marcin Szymaniuk
> Fix For: 2.1.x
>
> Attachments: 
> 0001-CASSANDRA-7281-SELECT-on-tuple-relations-are-broken-.patch, 
> 0001-CASSANDRA-7281-SELECT-on-tuple-relations-are-broken-v2.patch, 
> 0001-CASSANDRA-7281-SELECT-on-tuple-relations-are-broken-v3.patch, 
> 0001-CASSANDRA-7281-SELECT-on-tuple-relations-are-broken-v4.patch
>
>
> As noted on 
> [CASSANDRA-6875|https://issues.apache.org/jira/browse/CASSANDRA-6875?focusedCommentId=13992153&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-13992153],
>  the tuple notation is broken when the clustering order mixes ASC and DESC 
> directives because the range of data they describe don't correspond to a 
> single continuous slice internally. To copy the example from CASSANDRA-6875:
> {noformat}
> cqlsh:ks> create table foo (a int, b int, c int, PRIMARY KEY (a, b, c)) WITH 
> CLUSTERING ORDER BY (b DESC, c ASC);
> cqlsh:ks> INSERT INTO foo (a, b, c) VALUES (0, 2, 0);
> cqlsh:ks> INSERT INTO foo (a, b, c) VALUES (0, 1, 0);
> cqlsh:ks> INSERT INTO foo (a, b, c) VALUES (0, 1, 1);
> cqlsh:ks> INSERT INTO foo (a, b, c) VALUES (0, 0, 0);
> cqlsh:ks> SELECT * FROM foo WHERE a=0;
>  a | b | c
> ---+---+---
>  0 | 2 | 0
>  0 | 1 | 0
>  0 | 1 | 1
>  0 | 0 | 0
> (4 rows)
> cqlsh:ks> SELECT * FROM foo WHERE a=0 AND (b, c) > (1, 0);
>  a | b | c
> ---+---+---
>  0 | 2 | 0
> (1 rows)
> {noformat}
> The last query should really return {{(0, 2, 0)}} and {{(0, 1, 1)}}.
> For that specific example we should generate 2 internal slices, but I believe 
> that with more clustering columns we may have more slices.



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


[jira] [Commented] (CASSANDRA-7886) Coordinator should not wait for read timeouts when replicas hit Exceptions

2015-05-27 Thread Alan Boudreault (JIRA)

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

Alan Boudreault commented on CASSANDRA-7886:


marking as qa-resolve. dtest: 
https://github.com/riptano/cassandra-dtest/pull/301

> Coordinator should not wait for read timeouts when replicas hit Exceptions
> --
>
> Key: CASSANDRA-7886
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7886
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Core
> Environment: Tested with Cassandra 2.0.8
>Reporter: Christian Spriegel
>Assignee: Christian Spriegel
>Priority: Minor
>  Labels: client-impacting, protocolv4, qa-resolved
> Fix For: 2.2.0 beta 1
>
> Attachments: 7886-final.txt, 7886_v1.txt, 7886_v2_trunk.txt, 
> 7886_v3_trunk.txt, 7886_v4_trunk.txt, 7886_v5_trunk.txt, 7886_v6_trunk.txt
>
>
> *Issue*
> When you have TombstoneOverwhelmingExceptions occuring in queries, this will 
> cause the query to be simply dropped on every data-node, but no response is 
> sent back to the coordinator. Instead the coordinator waits for the specified 
> read_request_timeout_in_ms.
> On the application side this can cause memory issues, since the application 
> is waiting for the timeout interval for every request.Therefore, if our 
> application runs into TombstoneOverwhelmingExceptions, then (sooner or later) 
> our entire application cluster goes down :-(
> *Proposed solution*
> I think the data nodes should send a error message to the coordinator when 
> they run into a TombstoneOverwhelmingException. Then the coordinator does not 
> have to wait for the timeout-interval.



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


[jira] [Updated] (CASSANDRA-7886) Coordinator should not wait for read timeouts when replicas hit Exceptions

2015-05-27 Thread Alan Boudreault (JIRA)

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

Alan Boudreault updated CASSANDRA-7886:
---
Labels: client-impacting protocolv4 qa-resolved  (was: client-impacting 
protocolv4)

> Coordinator should not wait for read timeouts when replicas hit Exceptions
> --
>
> Key: CASSANDRA-7886
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7886
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Core
> Environment: Tested with Cassandra 2.0.8
>Reporter: Christian Spriegel
>Assignee: Christian Spriegel
>Priority: Minor
>  Labels: client-impacting, protocolv4, qa-resolved
> Fix For: 2.2.0 beta 1
>
> Attachments: 7886-final.txt, 7886_v1.txt, 7886_v2_trunk.txt, 
> 7886_v3_trunk.txt, 7886_v4_trunk.txt, 7886_v5_trunk.txt, 7886_v6_trunk.txt
>
>
> *Issue*
> When you have TombstoneOverwhelmingExceptions occuring in queries, this will 
> cause the query to be simply dropped on every data-node, but no response is 
> sent back to the coordinator. Instead the coordinator waits for the specified 
> read_request_timeout_in_ms.
> On the application side this can cause memory issues, since the application 
> is waiting for the timeout interval for every request.Therefore, if our 
> application runs into TombstoneOverwhelmingExceptions, then (sooner or later) 
> our entire application cluster goes down :-(
> *Proposed solution*
> I think the data nodes should send a error message to the coordinator when 
> they run into a TombstoneOverwhelmingException. Then the coordinator does not 
> have to wait for the timeout-interval.



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


[jira] [Commented] (CASSANDRA-6977) attempting to create 10K column families fails with 100 node cluster

2015-05-27 Thread Jack Krupansky (JIRA)

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

Jack Krupansky commented on CASSANDRA-6977:
---

[~jasonstack], this issue was resolved as a duplicate of CASSANDRA-7444 which 
notes:

{quote}
The patch should change it from linear wrt the total number of tables in the 
schema, to linear wrt the number of tables in a keyspace. So if you are 
creating 1000s of tables in a single keyspace we expect no change at all.
{quote}


> attempting to create 10K column families fails with 100 node cluster
> 
>
> Key: CASSANDRA-6977
> URL: https://issues.apache.org/jira/browse/CASSANDRA-6977
> Project: Cassandra
>  Issue Type: Bug
> Environment: 100 nodes, Ubuntu 12.04.3 LTS, AWS m1.large instances
>Reporter: Daniel Meyer
>Assignee: Rocco Varela
>Priority: Minor
> Fix For: 2.1.1
>
> Attachments: 100_nodes_all_data.png, all_data_5_nodes.png, 
> keyspace_create.py, logs.tar, tpstats.txt, visualvm_tracer_data.csv
>
>
> During this test we are attempting to create a total of 1K keyspaces with 10 
> column families each to bring the total column families to 10K.  With a 5 
> node cluster this operation can be completed; however, it fails with 100 
> nodes.  Please see the two charts.  For the 5 node case the time required to 
> create each keyspace and subsequent 10 column families increases linearly 
> until the number of keyspaces is 1K.  For a 100 node cluster there is a 
> sudden increase in latency between 450 keyspaces and 550 keyspaces.  The test 
> ends when the test script times out.  After the test script times out it is 
> impossible to reconnect to the cluster with the datastax python driver 
> because it cannot connect to the host:
> cassandra.cluster.NoHostAvailable: ('Unable to connect to any servers', 
> {'10.199.5.98': OperationTimedOut()}
> It was found that running the following stress command does work from the 
> same machine the test script runs on.
> cassandra-stress -d 10.199.5.98 -l 2 -e QUORUM -L3 -b -o INSERT
> It should be noted that this test was initially done with DSE 4.0 and c* 
> version 2.0.5.24 and in that case it was not possible to run stress against 
> the cluster even locally on a node due to not finding the host.
> Attached are system logs from one of the nodes, charts showing schema 
> creation latency for 5 and 100 node clusters and virtualvm tracer data for 
> cpu, memory, num_threads and gc runs, tpstat output and the test script.
> The test script was on an m1.large aws instance outside of the cluster under 
> test.



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


[jira] [Commented] (CASSANDRA-9402) Implement proper sandboxing for UDFs

2015-05-27 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis commented on CASSANDRA-9402:
---

I'm also a bit concerned about the whitelist/blacklist approach being error 
prone.

What prior art is out there for this?  Seems like something people would have 
tried to solve before.

Can we label UDF experimental in 2.2 and ship based on the 9404 approach and 
push this to 3.0?

> Implement proper sandboxing for UDFs
> 
>
> Key: CASSANDRA-9402
> URL: https://issues.apache.org/jira/browse/CASSANDRA-9402
> Project: Cassandra
>  Issue Type: Task
>Reporter: T Jake Luciani
>Assignee: Robert Stupp
>Priority: Critical
>  Labels: doc-impacting, security
> Fix For: 2.2.0 rc1
>
>
> We want to avoid a security exploit for our users.  We need to make sure we 
> ship 2.2 UDFs with good defaults so someone exposing it to the internet 
> accidentally doesn't open themselves up to having arbitrary code run.



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


[jira] [Commented] (CASSANDRA-9493) Integrate latest 2.2 Java Driver

2015-05-27 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis commented on CASSANDRA-9493:
---

... sounds like we might hit our rc first, so let's not plan on waiting for an 
official release from Olivier et al.

> Integrate latest 2.2 Java Driver
> 
>
> Key: CASSANDRA-9493
> URL: https://issues.apache.org/jira/browse/CASSANDRA-9493
> Project: Cassandra
>  Issue Type: Task
>Reporter: Robert Stupp
> Fix For: 2.2.0 rc1
>
>
> We need some functionality from the Java Driver 2.2 for C* 2.2 - especially 
> for UDFs.
> Related Java Driver tickets:
> [JAVA-572 - protocol V4|https://datastax-oss.atlassian.net/browse/JAVA-572]
> [JAVA-783 - V4 enum 
> constant|https://datastax-oss.atlassian.net/browse/JAVA-783]
> [JAVA-404 - date + time|https://datastax-oss.atlassian.net/browse/JAVA-404]
> [JAVA-786 - smallint + 
> tinyint|https://datastax-oss.atlassian.net/browse/JAVA-786]



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


[jira] [Updated] (CASSANDRA-9494) Need to set TTL with COPY command

2015-05-27 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis updated CASSANDRA-9494:
--
Assignee: (was: Stefania)

(Unassigning from Stefania since we have an intern starting full time on cqlsh 
in a couple weeks.)

> Need to set TTL with COPY command
> -
>
> Key: CASSANDRA-9494
> URL: https://issues.apache.org/jira/browse/CASSANDRA-9494
> Project: Cassandra
>  Issue Type: Sub-task
>  Components: API
>Reporter: Ed Chen
> Fix For: 2.0.x, 2.2.x
>
>
> I can import a chunk of data into Cassandra table with COPY command like:
> COPY my_table (name, address) FROM my_file.csv WITH option='value' ... ;
> But I am not able to specify a finite TTL in COPY command with "USING TTL 
> 3600", for example. 



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


[jira] [Commented] (CASSANDRA-9418) Fix dtests on WIndows

2015-05-27 Thread Joshua McKenzie (JIRA)

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

Joshua McKenzie commented on CASSANDRA-9418:


A simple ccm PR ([link|https://github.com/pcmanus/ccm/pull/289]) and a dtest PR 
([link|https://github.com/riptano/cassandra-dtest/pull/299]) have knocked off 
226 more failures and gotten us down to 338 failures from 564 ([test run 
here|http://cassci.datastax.com/view/trunk/job/trunk_dtest_win32/271/]).

In the logs there's a very high count of "Found running cassandra process with 
pid: 15776. Killing." from the dtest change to kill running cassandra processes 
during Tester.setUp(). The matching ccm PR was intended to give us something to 
correlate w/those failures to find out if there were specific tests that were 
hanging and address them, however this first test run gave us over 100 
instances of hung tests that had to be killed. Hopefully there's a systemic 
infrastructural issue that we can address that will help with those errors.

There's still a high number of errors indicating missing system.log, conf\*, or 
bin\* files; there's some environmental silliness occurring I haven't gotten 
any clarity on yet as it's CI specific. The PR for ccm didn't actually print to 
stderr so once I figure out why CI / nosetests is absorbing that output, I'll 
probably also put in some more debug information from ccm regarding starting 
and stopping clusters and point CI to that debug branch to get more information 
out of it.

> Fix dtests on WIndows
> -
>
> Key: CASSANDRA-9418
> URL: https://issues.apache.org/jira/browse/CASSANDRA-9418
> Project: Cassandra
>  Issue Type: Bug
>Reporter: Joshua McKenzie
>Assignee: Joshua McKenzie
>  Labels: Windows
> Fix For: 2.2.x
>
>
> There's a variety of infrastructural failures within dtest w/regards to 
> windows that are causing tests to fail and those failures to cascade.
> Error: failure to delete commit log after a test / ccm cluster is stopped:
> {noformat}
> Traceback (most recent call last):
>   File "C:\src\cassandra-dtest\dtest.py", line 452, in tearDown
> self._cleanup_cluster()
>   File "C:\src\cassandra-dtest\dtest.py", line 172, in _cleanup_cluster
> self.cluster.remove()
>   File "build\bdist.win-amd64\egg\ccmlib\cluster.py", line 212, in remove
> shutil.rmtree(self.get_path())
>   File "C:\Python27\lib\shutil.py", line 247, in rmtree
> rmtree(fullname, ignore_errors, onerror)
>   File "C:\Python27\lib\shutil.py", line 247, in rmtree
> rmtree(fullname, ignore_errors, onerror)
>   File "C:\Python27\lib\shutil.py", line 252, in rmtree
> onerror(os.remove, fullname, sys.exc_info())
>   File "C:\Python27\lib\shutil.py", line 250, in rmtree
> os.remove(fullname)
> WindowsError: [Error 5] Access is denied: 
> 'c:\\temp\\dtest-4rxq2i\\test\\node1\\commitlogs\\CommitLog-5-1431969131917.log'
> {noformat}
> Cascading error: implication is that tests aren't shutting down correctly and 
> subsequent tests cannot start:
> {noformat}
> 06:00:20 ERROR: test_incr_decr_super_remove (thrift_tests.TestMutations)
> 06:00:20 
> --
> 06:00:20 Traceback (most recent call last):
> 06:00:20   File 
> "D:\jenkins\workspace\trunk_dtest_win32\cassandra-dtest\thrift_tests.py", 
> line 55, in setUp
> 06:00:20 cluster.start()
> 06:00:20   File "build\bdist.win-amd64\egg\ccmlib\cluster.py", line 249, in 
> start
> 06:00:20 p = node.start(update_pid=False, jvm_args=jvm_args, 
> profile_options=profile_options)
> 06:00:20   File "build\bdist.win-amd64\egg\ccmlib\node.py", line 457, in start
> 06:00:20 common.check_socket_available(itf)
> 06:00:20   File "build\bdist.win-amd64\egg\ccmlib\common.py", line 341, in 
> check_socket_available
> 06:00:20 raise UnavailableSocketError("Inet address %s:%s is not 
> available: %s" % (addr, port, msg))
> 06:00:20 UnavailableSocketError: Inet address 127.0.0.1:9042 is not 
> available: [Errno 10013] An attempt was made to access a socket in a way 
> forbidden by its access permissions
> 06:00:20  >> begin captured logging << 
> 
> 06:00:20 dtest: DEBUG: removing ccm cluster test at: d:\temp\dtest-a5iny5
> 06:00:20 dtest: DEBUG: cluster ccm directory: d:\temp\dtest-dalzcy
> 06:00:20 - >> end captured logging << 
> -
> {noformat}
> I've also seen (and am debugging) an error where a node just fails to start 
> via ccm.
> I'll update this ticket with PR's to dtest or other observations of interest.



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


[jira] [Updated] (CASSANDRA-8584) Add rate limited logging of failed trySkipCache calls and commit log lag

2015-05-27 Thread Ariel Weisberg (JIRA)

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

Ariel Weisberg updated CASSANDRA-8584:
--
Summary: Add rate limited logging of failed trySkipCache calls and commit 
log lag  (was: Add strerror output on failed trySkipCache calls)

> Add rate limited logging of failed trySkipCache calls and commit log lag
> 
>
> Key: CASSANDRA-8584
> URL: https://issues.apache.org/jira/browse/CASSANDRA-8584
> Project: Cassandra
>  Issue Type: Improvement
>Reporter: Joshua McKenzie
>Assignee: Ariel Weisberg
>Priority: Trivial
> Fix For: 2.1.x
>
> Attachments: 8584_v1.txt, NoSpamLogger.java, nospamlogger.txt
>
>
> Since trySkipCache returns an errno rather than -1 and setting errno like our 
> other CLibrary calls, it's thread-safe and we could print out more helpful 
> information if we failed to prompt the kernel to skip the page cache.  That 
> system call should always succeed unless we have an invalid fd as it's free 
> to ignore us.



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


[jira] [Updated] (CASSANDRA-8584) Add rate limited logging of failed trySkipCache calls and commit log lag

2015-05-27 Thread Ariel Weisberg (JIRA)

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

Ariel Weisberg updated CASSANDRA-8584:
--
Description: 
Since trySkipCache returns an errno rather than -1 and setting errno like our 
other CLibrary calls, it's thread-safe and we could print out more helpful 
information if we failed to prompt the kernel to skip the page cache.  That 
system call should always succeed unless we have an invalid fd as it's free to 
ignore us.

Commit log lag is already rate limited by its own implementation. Convert to 
use NoSpamLogger.

  was:Since trySkipCache returns an errno rather than -1 and setting errno like 
our other CLibrary calls, it's thread-safe and we could print out more helpful 
information if we failed to prompt the kernel to skip the page cache.  That 
system call should always succeed unless we have an invalid fd as it's free to 
ignore us.


> Add rate limited logging of failed trySkipCache calls and commit log lag
> 
>
> Key: CASSANDRA-8584
> URL: https://issues.apache.org/jira/browse/CASSANDRA-8584
> Project: Cassandra
>  Issue Type: Improvement
>Reporter: Joshua McKenzie
>Assignee: Ariel Weisberg
>Priority: Trivial
> Fix For: 2.1.x
>
> Attachments: 8584_v1.txt, NoSpamLogger.java, nospamlogger.txt
>
>
> Since trySkipCache returns an errno rather than -1 and setting errno like our 
> other CLibrary calls, it's thread-safe and we could print out more helpful 
> information if we failed to prompt the kernel to skip the page cache.  That 
> system call should always succeed unless we have an invalid fd as it's free 
> to ignore us.
> Commit log lag is already rate limited by its own implementation. Convert to 
> use NoSpamLogger.



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


[1/4] cassandra git commit: Fix potential StackOverflow when setting CrcCheckChance over JMX

2015-05-27 Thread jake
Repository: cassandra
Updated Branches:
  refs/heads/trunk eb60f3101 -> 5746f602f


Fix potential StackOverflow when setting CrcCheckChance over JMX

Patch by tjake; reviewed by Ariel Weisberg for CASSANDRA-9488


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

Branch: refs/heads/trunk
Commit: 04eba90949a674cff21756ade74d9fef3f4878c5
Parents: d075540
Author: T Jake Luciani 
Authored: Wed May 27 16:15:06 2015 -0400
Committer: T Jake Luciani 
Committed: Wed May 27 16:15:06 2015 -0400

--
 CHANGES.txt| 1 +
 .../org/apache/cassandra/io/compress/CompressionParameters.java| 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/04eba909/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 054cf79..58f3c53 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.0.16:
+ * Fix potential StackOverflow when setting CrcCheckChance over JMX 
(CASSANDRA-9488)
  * Fix null static columns in pages after the first, paged reversed
queries (CASSANDRA-8502)
  * Fix failing bound statement after adding a collection (CASSANDRA-9411)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/04eba909/src/java/org/apache/cassandra/io/compress/CompressionParameters.java
--
diff --git 
a/src/java/org/apache/cassandra/io/compress/CompressionParameters.java 
b/src/java/org/apache/cassandra/io/compress/CompressionParameters.java
index cf16711..2ca99f5 100644
--- a/src/java/org/apache/cassandra/io/compress/CompressionParameters.java
+++ b/src/java/org/apache/cassandra/io/compress/CompressionParameters.java
@@ -116,7 +116,7 @@ public class CompressionParameters
 validateCrcCheckChance(crcCheckChance);
 this.crcCheckChance = crcCheckChance;
 
-if (liveMetadata != null)
+if (liveMetadata != null && this != liveMetadata.compressionParameters)
 
liveMetadata.compressionParameters.setCrcCheckChance(crcCheckChance);
 }
 



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

2015-05-27 Thread jake
Merge branch 'cassandra-2.1' into cassandra-2.2

Conflicts:
CHANGES.txt


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

Branch: refs/heads/trunk
Commit: 6fe6c99baabc8bc9fc363ca8f1bbc3e68d03d318
Parents: 80ba11c fb1eaab
Author: T Jake Luciani 
Authored: Wed May 27 16:21:28 2015 -0400
Committer: T Jake Luciani 
Committed: Wed May 27 16:21:28 2015 -0400

--
 CHANGES.txt   | 3 +++
 .../org/apache/cassandra/io/compress/CompressionParameters.java   | 2 +-
 test/unit/org/apache/cassandra/cql3/CrcCheckChanceTest.java   | 2 ++
 3 files changed, 6 insertions(+), 1 deletion(-)
--


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

http://git-wip-us.apache.org/repos/asf/cassandra/blob/6fe6c99b/src/java/org/apache/cassandra/io/compress/CompressionParameters.java
--

http://git-wip-us.apache.org/repos/asf/cassandra/blob/6fe6c99b/test/unit/org/apache/cassandra/cql3/CrcCheckChanceTest.java
--



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

2015-05-27 Thread jake
Merge branch 'cassandra-2.0' into cassandra-2.1

Conflicts:
CHANGES.txt


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

Branch: refs/heads/trunk
Commit: fb1eaab4120e766162b2dc397274dc68a499a4dd
Parents: a8dce22 04eba90
Author: T Jake Luciani 
Authored: Wed May 27 16:19:51 2015 -0400
Committer: T Jake Luciani 
Committed: Wed May 27 16:19:51 2015 -0400

--
 CHANGES.txt| 1 +
 .../org/apache/cassandra/io/compress/CompressionParameters.java| 2 +-
 test/unit/org/apache/cassandra/cql3/CrcCheckChanceTest.java| 2 ++
 3 files changed, 4 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/fb1eaab4/CHANGES.txt
--
diff --cc CHANGES.txt
index d00cc65,58f3c53..ecd380d
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,36 -1,8 +1,37 @@@
 -2.0.16:
 +2.1.6
 + * (cqlsh) Better float precision by default (CASSANDRA-9224)
 + * Improve estimated row count (CASSANDRA-9107)
 + * Optimize range tombstone memory footprint (CASSANDRA-8603)
 + * Use configured gcgs in anticompaction (CASSANDRA-9397)
 + * Warn on misuse of unlogged batches (CASSANDRA-9282)
 + * Failure detector detects and ignores local pauses (CASSANDRA-9183)
 + * Add utility class to support for rate limiting a given log statement 
(CASSANDRA-9029)
 + * Add missing consistency levels to cassandra-stess (CASSANDRA-9361)
 + * Fix commitlog getCompletedTasks to not increment (CASSANDRA-9339)
 + * Fix for harmless exceptions logged as ERROR (CASSANDRA-8564)
 + * Delete processed sstables in sstablesplit/sstableupgrade (CASSANDRA-8606)
 + * Improve sstable exclusion from partition tombstones (CASSANDRA-9298)
 + * Validate the indexed column rather than the cell's contents for 2i 
(CASSANDRA-9057)
 + * Add support for top-k custom 2i queries (CASSANDRA-8717)
 + * Fix error when dropping table during compaction (CASSANDRA-9251)
 + * cassandra-stress supports validation operations over user profiles 
(CASSANDRA-8773)
 + * Add support for rate limiting log messages (CASSANDRA-9029)
 + * Log the partition key with tombstone warnings (CASSANDRA-8561)
 + * Reduce runWithCompactionsDisabled poll interval to 1ms (CASSANDRA-9271)
 + * Fix PITR commitlog replay (CASSANDRA-9195)
 + * GCInspector logs very different times (CASSANDRA-9124)
 + * Fix deleting from an empty list (CASSANDRA-9198)
 + * Update tuple and collection types that use a user-defined type when that 
UDT
 +   is modified (CASSANDRA-9148, CASSANDRA-9192)
 + * Use higher timeout for prepair and snapshot in repair (CASSANDRA-9261)
 + * Fix anticompaction blocking ANTI_ENTROPY stage (CASSANDRA-9151)
 + * Repair waits for anticompaction to finish (CASSANDRA-9097)
 + * Fix streaming not holding ref when stream error (CASSANDRA-9295)
 + * Fix canonical view returning early opened SSTables (CASSANDRA-9396)
 +Merged from 2.0:
+  * Fix potential StackOverflow when setting CrcCheckChance over JMX 
(CASSANDRA-9488)
   * Fix null static columns in pages after the first, paged reversed
 queries (CASSANDRA-8502)
 - * Fix failing bound statement after adding a collection (CASSANDRA-9411)
   * Fix counting cache serialization in request metrics (CASSANDRA-9466)
   * (cqlsh) Add LOGIN command to switch users (CASSANDRA-7212)
   * Clone SliceQueryFilter in AbstractReadCommand implementations 
(CASSANDRA-8940)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/fb1eaab4/src/java/org/apache/cassandra/io/compress/CompressionParameters.java
--

http://git-wip-us.apache.org/repos/asf/cassandra/blob/fb1eaab4/test/unit/org/apache/cassandra/cql3/CrcCheckChanceTest.java
--
diff --cc test/unit/org/apache/cassandra/cql3/CrcCheckChanceTest.java
index f218c9d,000..bed3cdd
mode 100644,00..100644
--- a/test/unit/org/apache/cassandra/cql3/CrcCheckChanceTest.java
+++ b/test/unit/org/apache/cassandra/cql3/CrcCheckChanceTest.java
@@@ -1,157 -1,0 +1,159 @@@
 +/*
 + * Licensed to the Apache Software Foundation (ASF) under one
 + * or more contributor license agreements.  See the NOTICE file
 + * distributed with this work for additional information
 + * regarding copyright ownership.  The ASF licenses this file
 + * to you under the Apache License, Version 2.0 (the
 + * "License"); you may not use this file except in compliance
 + * with the License.  You may obtain a copy of the License at
 + *
 + * http://www.apache.org/licenses/LICENSE-2.0
 + *
 + * Unless required by appl

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

2015-05-27 Thread jake
Merge branch 'cassandra-2.2' into trunk


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

Branch: refs/heads/trunk
Commit: 5746f602f2bfafcc471ed11d97ca3d516932a1a2
Parents: eb60f31 6fe6c99
Author: T Jake Luciani 
Authored: Wed May 27 16:22:01 2015 -0400
Committer: T Jake Luciani 
Committed: Wed May 27 16:22:01 2015 -0400

--
 CHANGES.txt   | 3 +++
 .../org/apache/cassandra/io/compress/CompressionParameters.java   | 2 +-
 test/unit/org/apache/cassandra/cql3/CrcCheckChanceTest.java   | 2 ++
 3 files changed, 6 insertions(+), 1 deletion(-)
--


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



[1/3] cassandra git commit: Fix potential StackOverflow when setting CrcCheckChance over JMX

2015-05-27 Thread jake
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-2.2 80ba11c62 -> 6fe6c99ba


Fix potential StackOverflow when setting CrcCheckChance over JMX

Patch by tjake; reviewed by Ariel Weisberg for CASSANDRA-9488


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

Branch: refs/heads/cassandra-2.2
Commit: 04eba90949a674cff21756ade74d9fef3f4878c5
Parents: d075540
Author: T Jake Luciani 
Authored: Wed May 27 16:15:06 2015 -0400
Committer: T Jake Luciani 
Committed: Wed May 27 16:15:06 2015 -0400

--
 CHANGES.txt| 1 +
 .../org/apache/cassandra/io/compress/CompressionParameters.java| 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/04eba909/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 054cf79..58f3c53 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.0.16:
+ * Fix potential StackOverflow when setting CrcCheckChance over JMX 
(CASSANDRA-9488)
  * Fix null static columns in pages after the first, paged reversed
queries (CASSANDRA-8502)
  * Fix failing bound statement after adding a collection (CASSANDRA-9411)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/04eba909/src/java/org/apache/cassandra/io/compress/CompressionParameters.java
--
diff --git 
a/src/java/org/apache/cassandra/io/compress/CompressionParameters.java 
b/src/java/org/apache/cassandra/io/compress/CompressionParameters.java
index cf16711..2ca99f5 100644
--- a/src/java/org/apache/cassandra/io/compress/CompressionParameters.java
+++ b/src/java/org/apache/cassandra/io/compress/CompressionParameters.java
@@ -116,7 +116,7 @@ public class CompressionParameters
 validateCrcCheckChance(crcCheckChance);
 this.crcCheckChance = crcCheckChance;
 
-if (liveMetadata != null)
+if (liveMetadata != null && this != liveMetadata.compressionParameters)
 
liveMetadata.compressionParameters.setCrcCheckChance(crcCheckChance);
 }
 



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

2015-05-27 Thread jake
Merge branch 'cassandra-2.1' into cassandra-2.2

Conflicts:
CHANGES.txt


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

Branch: refs/heads/cassandra-2.2
Commit: 6fe6c99baabc8bc9fc363ca8f1bbc3e68d03d318
Parents: 80ba11c fb1eaab
Author: T Jake Luciani 
Authored: Wed May 27 16:21:28 2015 -0400
Committer: T Jake Luciani 
Committed: Wed May 27 16:21:28 2015 -0400

--
 CHANGES.txt   | 3 +++
 .../org/apache/cassandra/io/compress/CompressionParameters.java   | 2 +-
 test/unit/org/apache/cassandra/cql3/CrcCheckChanceTest.java   | 2 ++
 3 files changed, 6 insertions(+), 1 deletion(-)
--


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

http://git-wip-us.apache.org/repos/asf/cassandra/blob/6fe6c99b/src/java/org/apache/cassandra/io/compress/CompressionParameters.java
--

http://git-wip-us.apache.org/repos/asf/cassandra/blob/6fe6c99b/test/unit/org/apache/cassandra/cql3/CrcCheckChanceTest.java
--



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

2015-05-27 Thread jake
Merge branch 'cassandra-2.0' into cassandra-2.1

Conflicts:
CHANGES.txt


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

Branch: refs/heads/cassandra-2.2
Commit: fb1eaab4120e766162b2dc397274dc68a499a4dd
Parents: a8dce22 04eba90
Author: T Jake Luciani 
Authored: Wed May 27 16:19:51 2015 -0400
Committer: T Jake Luciani 
Committed: Wed May 27 16:19:51 2015 -0400

--
 CHANGES.txt| 1 +
 .../org/apache/cassandra/io/compress/CompressionParameters.java| 2 +-
 test/unit/org/apache/cassandra/cql3/CrcCheckChanceTest.java| 2 ++
 3 files changed, 4 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/fb1eaab4/CHANGES.txt
--
diff --cc CHANGES.txt
index d00cc65,58f3c53..ecd380d
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,36 -1,8 +1,37 @@@
 -2.0.16:
 +2.1.6
 + * (cqlsh) Better float precision by default (CASSANDRA-9224)
 + * Improve estimated row count (CASSANDRA-9107)
 + * Optimize range tombstone memory footprint (CASSANDRA-8603)
 + * Use configured gcgs in anticompaction (CASSANDRA-9397)
 + * Warn on misuse of unlogged batches (CASSANDRA-9282)
 + * Failure detector detects and ignores local pauses (CASSANDRA-9183)
 + * Add utility class to support for rate limiting a given log statement 
(CASSANDRA-9029)
 + * Add missing consistency levels to cassandra-stess (CASSANDRA-9361)
 + * Fix commitlog getCompletedTasks to not increment (CASSANDRA-9339)
 + * Fix for harmless exceptions logged as ERROR (CASSANDRA-8564)
 + * Delete processed sstables in sstablesplit/sstableupgrade (CASSANDRA-8606)
 + * Improve sstable exclusion from partition tombstones (CASSANDRA-9298)
 + * Validate the indexed column rather than the cell's contents for 2i 
(CASSANDRA-9057)
 + * Add support for top-k custom 2i queries (CASSANDRA-8717)
 + * Fix error when dropping table during compaction (CASSANDRA-9251)
 + * cassandra-stress supports validation operations over user profiles 
(CASSANDRA-8773)
 + * Add support for rate limiting log messages (CASSANDRA-9029)
 + * Log the partition key with tombstone warnings (CASSANDRA-8561)
 + * Reduce runWithCompactionsDisabled poll interval to 1ms (CASSANDRA-9271)
 + * Fix PITR commitlog replay (CASSANDRA-9195)
 + * GCInspector logs very different times (CASSANDRA-9124)
 + * Fix deleting from an empty list (CASSANDRA-9198)
 + * Update tuple and collection types that use a user-defined type when that 
UDT
 +   is modified (CASSANDRA-9148, CASSANDRA-9192)
 + * Use higher timeout for prepair and snapshot in repair (CASSANDRA-9261)
 + * Fix anticompaction blocking ANTI_ENTROPY stage (CASSANDRA-9151)
 + * Repair waits for anticompaction to finish (CASSANDRA-9097)
 + * Fix streaming not holding ref when stream error (CASSANDRA-9295)
 + * Fix canonical view returning early opened SSTables (CASSANDRA-9396)
 +Merged from 2.0:
+  * Fix potential StackOverflow when setting CrcCheckChance over JMX 
(CASSANDRA-9488)
   * Fix null static columns in pages after the first, paged reversed
 queries (CASSANDRA-8502)
 - * Fix failing bound statement after adding a collection (CASSANDRA-9411)
   * Fix counting cache serialization in request metrics (CASSANDRA-9466)
   * (cqlsh) Add LOGIN command to switch users (CASSANDRA-7212)
   * Clone SliceQueryFilter in AbstractReadCommand implementations 
(CASSANDRA-8940)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/fb1eaab4/src/java/org/apache/cassandra/io/compress/CompressionParameters.java
--

http://git-wip-us.apache.org/repos/asf/cassandra/blob/fb1eaab4/test/unit/org/apache/cassandra/cql3/CrcCheckChanceTest.java
--
diff --cc test/unit/org/apache/cassandra/cql3/CrcCheckChanceTest.java
index f218c9d,000..bed3cdd
mode 100644,00..100644
--- a/test/unit/org/apache/cassandra/cql3/CrcCheckChanceTest.java
+++ b/test/unit/org/apache/cassandra/cql3/CrcCheckChanceTest.java
@@@ -1,157 -1,0 +1,159 @@@
 +/*
 + * Licensed to the Apache Software Foundation (ASF) under one
 + * or more contributor license agreements.  See the NOTICE file
 + * distributed with this work for additional information
 + * regarding copyright ownership.  The ASF licenses this file
 + * to you under the Apache License, Version 2.0 (the
 + * "License"); you may not use this file except in compliance
 + * with the License.  You may obtain a copy of the License at
 + *
 + * http://www.apache.org/licenses/LICENSE-2.0
 + *
 + * Unless required

[1/2] cassandra git commit: Fix potential StackOverflow when setting CrcCheckChance over JMX

2015-05-27 Thread jake
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-2.1 a8dce228d -> fb1eaab41


Fix potential StackOverflow when setting CrcCheckChance over JMX

Patch by tjake; reviewed by Ariel Weisberg for CASSANDRA-9488


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

Branch: refs/heads/cassandra-2.1
Commit: 04eba90949a674cff21756ade74d9fef3f4878c5
Parents: d075540
Author: T Jake Luciani 
Authored: Wed May 27 16:15:06 2015 -0400
Committer: T Jake Luciani 
Committed: Wed May 27 16:15:06 2015 -0400

--
 CHANGES.txt| 1 +
 .../org/apache/cassandra/io/compress/CompressionParameters.java| 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/04eba909/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 054cf79..58f3c53 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.0.16:
+ * Fix potential StackOverflow when setting CrcCheckChance over JMX 
(CASSANDRA-9488)
  * Fix null static columns in pages after the first, paged reversed
queries (CASSANDRA-8502)
  * Fix failing bound statement after adding a collection (CASSANDRA-9411)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/04eba909/src/java/org/apache/cassandra/io/compress/CompressionParameters.java
--
diff --git 
a/src/java/org/apache/cassandra/io/compress/CompressionParameters.java 
b/src/java/org/apache/cassandra/io/compress/CompressionParameters.java
index cf16711..2ca99f5 100644
--- a/src/java/org/apache/cassandra/io/compress/CompressionParameters.java
+++ b/src/java/org/apache/cassandra/io/compress/CompressionParameters.java
@@ -116,7 +116,7 @@ public class CompressionParameters
 validateCrcCheckChance(crcCheckChance);
 this.crcCheckChance = crcCheckChance;
 
-if (liveMetadata != null)
+if (liveMetadata != null && this != liveMetadata.compressionParameters)
 
liveMetadata.compressionParameters.setCrcCheckChance(crcCheckChance);
 }
 



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

2015-05-27 Thread jake
Merge branch 'cassandra-2.0' into cassandra-2.1

Conflicts:
CHANGES.txt


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

Branch: refs/heads/cassandra-2.1
Commit: fb1eaab4120e766162b2dc397274dc68a499a4dd
Parents: a8dce22 04eba90
Author: T Jake Luciani 
Authored: Wed May 27 16:19:51 2015 -0400
Committer: T Jake Luciani 
Committed: Wed May 27 16:19:51 2015 -0400

--
 CHANGES.txt| 1 +
 .../org/apache/cassandra/io/compress/CompressionParameters.java| 2 +-
 test/unit/org/apache/cassandra/cql3/CrcCheckChanceTest.java| 2 ++
 3 files changed, 4 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/fb1eaab4/CHANGES.txt
--
diff --cc CHANGES.txt
index d00cc65,58f3c53..ecd380d
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,36 -1,8 +1,37 @@@
 -2.0.16:
 +2.1.6
 + * (cqlsh) Better float precision by default (CASSANDRA-9224)
 + * Improve estimated row count (CASSANDRA-9107)
 + * Optimize range tombstone memory footprint (CASSANDRA-8603)
 + * Use configured gcgs in anticompaction (CASSANDRA-9397)
 + * Warn on misuse of unlogged batches (CASSANDRA-9282)
 + * Failure detector detects and ignores local pauses (CASSANDRA-9183)
 + * Add utility class to support for rate limiting a given log statement 
(CASSANDRA-9029)
 + * Add missing consistency levels to cassandra-stess (CASSANDRA-9361)
 + * Fix commitlog getCompletedTasks to not increment (CASSANDRA-9339)
 + * Fix for harmless exceptions logged as ERROR (CASSANDRA-8564)
 + * Delete processed sstables in sstablesplit/sstableupgrade (CASSANDRA-8606)
 + * Improve sstable exclusion from partition tombstones (CASSANDRA-9298)
 + * Validate the indexed column rather than the cell's contents for 2i 
(CASSANDRA-9057)
 + * Add support for top-k custom 2i queries (CASSANDRA-8717)
 + * Fix error when dropping table during compaction (CASSANDRA-9251)
 + * cassandra-stress supports validation operations over user profiles 
(CASSANDRA-8773)
 + * Add support for rate limiting log messages (CASSANDRA-9029)
 + * Log the partition key with tombstone warnings (CASSANDRA-8561)
 + * Reduce runWithCompactionsDisabled poll interval to 1ms (CASSANDRA-9271)
 + * Fix PITR commitlog replay (CASSANDRA-9195)
 + * GCInspector logs very different times (CASSANDRA-9124)
 + * Fix deleting from an empty list (CASSANDRA-9198)
 + * Update tuple and collection types that use a user-defined type when that 
UDT
 +   is modified (CASSANDRA-9148, CASSANDRA-9192)
 + * Use higher timeout for prepair and snapshot in repair (CASSANDRA-9261)
 + * Fix anticompaction blocking ANTI_ENTROPY stage (CASSANDRA-9151)
 + * Repair waits for anticompaction to finish (CASSANDRA-9097)
 + * Fix streaming not holding ref when stream error (CASSANDRA-9295)
 + * Fix canonical view returning early opened SSTables (CASSANDRA-9396)
 +Merged from 2.0:
+  * Fix potential StackOverflow when setting CrcCheckChance over JMX 
(CASSANDRA-9488)
   * Fix null static columns in pages after the first, paged reversed
 queries (CASSANDRA-8502)
 - * Fix failing bound statement after adding a collection (CASSANDRA-9411)
   * Fix counting cache serialization in request metrics (CASSANDRA-9466)
   * (cqlsh) Add LOGIN command to switch users (CASSANDRA-7212)
   * Clone SliceQueryFilter in AbstractReadCommand implementations 
(CASSANDRA-8940)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/fb1eaab4/src/java/org/apache/cassandra/io/compress/CompressionParameters.java
--

http://git-wip-us.apache.org/repos/asf/cassandra/blob/fb1eaab4/test/unit/org/apache/cassandra/cql3/CrcCheckChanceTest.java
--
diff --cc test/unit/org/apache/cassandra/cql3/CrcCheckChanceTest.java
index f218c9d,000..bed3cdd
mode 100644,00..100644
--- a/test/unit/org/apache/cassandra/cql3/CrcCheckChanceTest.java
+++ b/test/unit/org/apache/cassandra/cql3/CrcCheckChanceTest.java
@@@ -1,157 -1,0 +1,159 @@@
 +/*
 + * Licensed to the Apache Software Foundation (ASF) under one
 + * or more contributor license agreements.  See the NOTICE file
 + * distributed with this work for additional information
 + * regarding copyright ownership.  The ASF licenses this file
 + * to you under the Apache License, Version 2.0 (the
 + * "License"); you may not use this file except in compliance
 + * with the License.  You may obtain a copy of the License at
 + *
 + * http://www.apache.org/licenses/LICENSE-2.0
 + *
 + * Unless required

cassandra git commit: Fix potential StackOverflow when setting CrcCheckChance over JMX

2015-05-27 Thread jake
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-2.0 d075540c4 -> 04eba9094


Fix potential StackOverflow when setting CrcCheckChance over JMX

Patch by tjake; reviewed by Ariel Weisberg for CASSANDRA-9488


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

Branch: refs/heads/cassandra-2.0
Commit: 04eba90949a674cff21756ade74d9fef3f4878c5
Parents: d075540
Author: T Jake Luciani 
Authored: Wed May 27 16:15:06 2015 -0400
Committer: T Jake Luciani 
Committed: Wed May 27 16:15:06 2015 -0400

--
 CHANGES.txt| 1 +
 .../org/apache/cassandra/io/compress/CompressionParameters.java| 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/04eba909/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 054cf79..58f3c53 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.0.16:
+ * Fix potential StackOverflow when setting CrcCheckChance over JMX 
(CASSANDRA-9488)
  * Fix null static columns in pages after the first, paged reversed
queries (CASSANDRA-8502)
  * Fix failing bound statement after adding a collection (CASSANDRA-9411)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/04eba909/src/java/org/apache/cassandra/io/compress/CompressionParameters.java
--
diff --git 
a/src/java/org/apache/cassandra/io/compress/CompressionParameters.java 
b/src/java/org/apache/cassandra/io/compress/CompressionParameters.java
index cf16711..2ca99f5 100644
--- a/src/java/org/apache/cassandra/io/compress/CompressionParameters.java
+++ b/src/java/org/apache/cassandra/io/compress/CompressionParameters.java
@@ -116,7 +116,7 @@ public class CompressionParameters
 validateCrcCheckChance(crcCheckChance);
 this.crcCheckChance = crcCheckChance;
 
-if (liveMetadata != null)
+if (liveMetadata != null && this != liveMetadata.compressionParameters)
 
liveMetadata.compressionParameters.setCrcCheckChance(crcCheckChance);
 }
 



[jira] [Comment Edited] (CASSANDRA-8576) Primary Key Pushdown For Hadoop

2015-05-27 Thread Philip Thompson (JIRA)

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

Philip Thompson edited comment on CASSANDRA-8576 at 5/27/15 8:13 PM:
-

I'm unsure after reading [~jjordan]'s comment, does this need a test of a 
hadoop job while in a mixed version cluster? 


was (Author: philipthompson):
Reading [~jjordan]'s comment, does this need a test of a hadoop job while in a 
mixed version cluster? 

> Primary Key Pushdown For Hadoop
> ---
>
> Key: CASSANDRA-8576
> URL: https://issues.apache.org/jira/browse/CASSANDRA-8576
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Hadoop
>Reporter: Russell Alexander Spitzer
>Assignee: Alex Liu
> Fix For: 2.1.x
>
> Attachments: 8576-2.1-branch.txt, 8576-trunk.txt, 
> CASSANDRA-8576-v2-2.1-branch.txt, CASSANDRA-8576-v3-2.1-branch.txt
>
>
> I've heard reports from several users that they would like to have predicate 
> pushdown functionality for hadoop (Hive in particular) based services. 
> Example usecase
> Table with wide partitions, one per customer
> Application team has HQL they would like to run on a single customer
> Currently time to complete scales with number of customers since Input Format 
> can't pushdown primary key predicate
> Current implementation requires a full table scan (since it can't recognize 
> that a single partition was specified)



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


[jira] [Commented] (CASSANDRA-8576) Primary Key Pushdown For Hadoop

2015-05-27 Thread Philip Thompson (JIRA)

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

Philip Thompson commented on CASSANDRA-8576:


Reading [~jjordan]'s comment, does this need a test of a hadoop job while in a 
mixed version cluster? 

> Primary Key Pushdown For Hadoop
> ---
>
> Key: CASSANDRA-8576
> URL: https://issues.apache.org/jira/browse/CASSANDRA-8576
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Hadoop
>Reporter: Russell Alexander Spitzer
>Assignee: Alex Liu
> Fix For: 2.1.x
>
> Attachments: 8576-2.1-branch.txt, 8576-trunk.txt, 
> CASSANDRA-8576-v2-2.1-branch.txt, CASSANDRA-8576-v3-2.1-branch.txt
>
>
> I've heard reports from several users that they would like to have predicate 
> pushdown functionality for hadoop (Hive in particular) based services. 
> Example usecase
> Table with wide partitions, one per customer
> Application team has HQL they would like to run on a single customer
> Currently time to complete scales with number of customers since Input Format 
> can't pushdown primary key predicate
> Current implementation requires a full table scan (since it can't recognize 
> that a single partition was specified)



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


[jira] [Updated] (CASSANDRA-9494) Need to set TTL with COPY command

2015-05-27 Thread Brandon Williams (JIRA)

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

Brandon Williams updated CASSANDRA-9494:

Fix Version/s: 2.2.x
   2.0.x

> Need to set TTL with COPY command
> -
>
> Key: CASSANDRA-9494
> URL: https://issues.apache.org/jira/browse/CASSANDRA-9494
> Project: Cassandra
>  Issue Type: Sub-task
>  Components: API
>Reporter: Ed Chen
>Assignee: Stefania
> Fix For: 2.0.x, 2.2.x
>
>
> I can import a chunk of data into Cassandra table with COPY command like:
> COPY my_table (name, address) FROM my_file.csv WITH option='value' ... ;
> But I am not able to specify a finite TTL in COPY command with "USING TTL 
> 3600", for example. 



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


[jira] [Assigned] (CASSANDRA-9494) Need to set TTL with COPY command

2015-05-27 Thread Brandon Williams (JIRA)

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

Brandon Williams reassigned CASSANDRA-9494:
---

Assignee: Stefania

> Need to set TTL with COPY command
> -
>
> Key: CASSANDRA-9494
> URL: https://issues.apache.org/jira/browse/CASSANDRA-9494
> Project: Cassandra
>  Issue Type: Sub-task
>  Components: API
>Reporter: Ed Chen
>Assignee: Stefania
>
> I can import a chunk of data into Cassandra table with COPY command like:
> COPY my_table (name, address) FROM my_file.csv WITH option='value' ... ;
> But I am not able to specify a finite TTL in COPY command with "USING TTL 
> 3600", for example. 



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


[jira] [Comment Edited] (CASSANDRA-8502) Static columns returning null for pages after first

2015-05-27 Thread Tyler Hobbs (JIRA)

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

Tyler Hobbs edited comment on CASSANDRA-8502 at 5/27/15 6:56 PM:
-

The test results for all four branches look good.  Committed as 
{{d075540c46209fdabde74db1e210114965372605}} to 2.0 and merged to 2.1, 2.2, and 
trunk.




was (Author: thobbs):
The test results for all for branches look good.  Committed as 
{{d075540c46209fdabde74db1e210114965372605}} to 2.0 and merged to 2.1, 2.2, and 
trunk.



> Static columns returning null for pages after first
> ---
>
> Key: CASSANDRA-8502
> URL: https://issues.apache.org/jira/browse/CASSANDRA-8502
> Project: Cassandra
>  Issue Type: Bug
>  Components: Core
>Reporter: Flavien Charlon
>Assignee: Tyler Hobbs
> Fix For: 2.1.6, 2.0.16, 2.2.0 rc1
>
> Attachments: 8502-2.0-v2.txt, 8502-2.0.txt, 8502-2.1-v2.txt, 
> null-static-column.txt
>
>
> When paging is used for a query containing a static column, the first page 
> contains the right value for the static column, but subsequent pages have 
> null null for the static column instead of the expected value.
> Repro steps:
> - Create a table with a static column
> - Create a partition with 500 cells
> - Using cqlsh, query that partition
> Actual result:
> - You will see that first, the static column appears as expected, but if you 
> press a key after "---MORE---", the static columns will appear as null.
> See the attached file for a repro of the output.
> I am using a single node cluster.



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


[jira] [Commented] (CASSANDRA-8099) Refactor and modernize the storage engine

2015-05-27 Thread Benedict (JIRA)

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

Benedict commented on CASSANDRA-8099:
-

It occurs to me that another option, for the read path at least, would be to:

# In the case of a single data request (and it being local): immediately 
transform to the resultset, and store the digest for corroboration;
# In the case of a read-repair (or other multiple data requests), delay 
performing the local read operation until the remote replies have already 
arrived. This may marginally increase latency, but only on an uncommon codepath.

> Refactor and modernize the storage engine
> -
>
> Key: CASSANDRA-8099
> URL: https://issues.apache.org/jira/browse/CASSANDRA-8099
> Project: Cassandra
>  Issue Type: Improvement
>Reporter: Sylvain Lebresne
>Assignee: Sylvain Lebresne
> Fix For: 3.0 beta 1
>
> Attachments: 8099-nit
>
>
> The current storage engine (which for this ticket I'll loosely define as "the 
> code implementing the read/write path") is suffering from old age. One of the 
> main problem is that the only structure it deals with is the cell, which 
> completely ignores the more high level CQL structure that groups cell into 
> (CQL) rows.
> This leads to many inefficiencies, like the fact that during a reads we have 
> to group cells multiple times (to count on replica, then to count on the 
> coordinator, then to produce the CQL resultset) because we forget about the 
> grouping right away each time (so lots of useless cell names comparisons in 
> particular). But outside inefficiencies, having to manually recreate the CQL 
> structure every time we need it for something is hindering new features and 
> makes the code more complex that it should be.
> Said storage engine also has tons of technical debt. To pick an example, the 
> fact that during range queries we update {{SliceQueryFilter.count}} is pretty 
> hacky and error prone. Or the overly complex ways {{AbstractQueryPager}} has 
> to go into to simply "remove the last query result".
> So I want to bite the bullet and modernize this storage engine. I propose to 
> do 2 main things:
> # Make the storage engine more aware of the CQL structure. In practice, 
> instead of having partitions be a simple iterable map of cells, it should be 
> an iterable list of row (each being itself composed of per-column cells, 
> though obviously not exactly the same kind of cell we have today).
> # Make the engine more iterative. What I mean here is that in the read path, 
> we end up reading all cells in memory (we put them in a ColumnFamily object), 
> but there is really no reason to. If instead we were working with iterators 
> all the way through, we could get to a point where we're basically 
> transferring data from disk to the network, and we should be able to reduce 
> GC substantially.
> Please note that such refactor should provide some performance improvements 
> right off the bat but it's not it's primary goal either. It's primary goal is 
> to simplify the storage engine and adds abstraction that are better suited to 
> further optimizations.



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


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

2015-05-27 Thread tylerhobbs
Merge branch 'cassandra-2.1' into cassandra-2.2


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

Branch: refs/heads/trunk
Commit: 80ba11c62acff08954a1f79d1bf9078602dfc665
Parents: f9c998c a8dce22
Author: Tyler Hobbs 
Authored: Wed May 27 13:52:34 2015 -0500
Committer: Tyler Hobbs 
Committed: Wed May 27 13:52:34 2015 -0500

--
 CHANGES.txt |  3 +
 .../apache/cassandra/db/ColumnFamilyStore.java  |  4 +-
 src/java/org/apache/cassandra/db/DataRange.java | 82 ---
 .../cassandra/db/SliceFromReadCommand.java  | 28 +++
 .../cassandra/db/filter/ColumnCounter.java  | 63 ++-
 .../cassandra/db/filter/SliceQueryFilter.java   | 83 ++--
 .../service/pager/AbstractQueryPager.java   | 40 --
 .../service/pager/RangeSliceQueryPager.java |  4 +-
 .../service/pager/SliceQueryPager.java  |  6 +-
 .../service/pager/AbstractQueryPagerTest.java   |  8 +-
 10 files changed, 281 insertions(+), 40 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/80ba11c6/CHANGES.txt
--
diff --cc CHANGES.txt
index e183137,d00cc65..0864759
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -12,124 -3,6 +12,127 @@@ Merged from 2.1
   * Improve estimated row count (CASSANDRA-9107)
   * Optimize range tombstone memory footprint (CASSANDRA-8603)
   * Use configured gcgs in anticompaction (CASSANDRA-9397)
++Merged from 2.0:
++ * Fix null static columns in pages after the first, paged reversed
++   queries (CASSANDRA-8502)
 +
 +
 +2.2.0-beta1
 + * Introduce Transactional API for internal state changes (CASSANDRA-8984)
 + * Add a flag in cassandra.yaml to enable UDFs (CASSANDRA-9404)
 + * Better support of null for UDF (CASSANDRA-8374)
 + * Use ecj instead of javassist for UDFs (CASSANDRA-8241)
 + * faster async logback configuration for tests (CASSANDRA-9376)
 + * Add `smallint` and `tinyint` data types (CASSANDRA-8951)
 + * Avoid thrift schema creation when native driver is used in stress tool 
(CASSANDRA-9374)
 + * Populate TokenMetadata early during startup (CASSANDRA-9317)
 + * Make Functions.declared thread-safe
 + * Add client warnings to native protocol v4 (CASSANDRA-8930)
 + * Allow roles cache to be invalidated (CASSANDRA-8967)
 + * Upgrade Snappy (CASSANDRA-9063)
 + * Don't start Thrift rpc by default (CASSANDRA-9319)
 + * Only stream from unrepaired sstables with incremental repair 
(CASSANDRA-8267)
 + * Aggregate UDFs allow SFUNC return type to differ from STYPE if FFUNC 
specified (CASSANDRA-9321)
 + * Remove Thrift dependencies in bundled tools (CASSANDRA-8358)
 + * Disable memory mapping of hsperfdata file for JVM statistics 
(CASSANDRA-9242)
 + * Add pre-startup checks to detect potential incompatibilities 
(CASSANDRA-8049)
 + * Distinguish between null and unset in protocol v4 (CASSANDRA-7304)
 + * Add user/role permissions for user-defined functions (CASSANDRA-7557)
 + * Allow cassandra config to be updated to restart daemon without unloading 
classes (CASSANDRA-9046)
 + * Don't initialize compaction writer before checking if iter is empty 
(CASSANDRA-9117)
 + * Don't execute any functions at prepare-time (CASSANDRA-9037)
 + * Share file handles between all instances of a SegmentedFile 
(CASSANDRA-8893)
 + * Make it possible to major compact LCS (CASSANDRA-7272)
 + * Make FunctionExecutionException extend RequestExecutionException
 +   (CASSANDRA-9055)
 + * Add support for SELECT JSON, INSERT JSON syntax and new toJson(), 
fromJson()
 +   functions (CASSANDRA-7970)
 + * Optimise max purgeable timestamp calculation in compaction (CASSANDRA-8920)
 + * Constrain internode message buffer sizes, and improve IO class hierarchy 
(CASSANDRA-8670) 
 + * New tool added to validate all sstables in a node (CASSANDRA-5791)
 + * Push notification when tracing completes for an operation (CASSANDRA-7807)
 + * Delay "node up" and "node added" notifications until native protocol 
server is started (CASSANDRA-8236)
 + * Compressed Commit Log (CASSANDRA-6809)
 + * Optimise IntervalTree (CASSANDRA-8988)
 + * Add a key-value payload for third party usage (CASSANDRA-8553, 9212)
 + * Bump metrics-reporter-config dependency for metrics 3.0 (CASSANDRA-8149)
 + * Partition intra-cluster message streams by size, not type (CASSANDRA-8789)
 + * Add WriteFailureException to native protocol, notify coordinator of
 +   write failures (CASSANDRA-8592)
 + * Convert SequentialWriter to nio (CASSANDRA-8709)
 + * Add role based access control (CASSANDRA-7653, 8650, 7216, 8760, 8849, 
8761, 8850)
 + * Record client ip address in 

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

2015-05-27 Thread tylerhobbs
Merge branch 'cassandra-2.0' into cassandra-2.1


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

Branch: refs/heads/trunk
Commit: a8dce228de443716556f59510b0494078bbe97a2
Parents: 74280b1 d075540
Author: Tyler Hobbs 
Authored: Wed May 27 13:50:58 2015 -0500
Committer: Tyler Hobbs 
Committed: Wed May 27 13:50:58 2015 -0500

--
 CHANGES.txt |  2 +
 .../apache/cassandra/db/ColumnFamilyStore.java  |  4 +-
 src/java/org/apache/cassandra/db/DataRange.java | 82 ---
 .../cassandra/db/SliceFromReadCommand.java  | 28 +++
 .../cassandra/db/filter/ColumnCounter.java  | 61 +-
 .../cassandra/db/filter/SliceQueryFilter.java   | 83 ++--
 .../service/pager/AbstractQueryPager.java   | 40 --
 .../service/pager/RangeSliceQueryPager.java |  4 +-
 .../service/pager/SliceQueryPager.java  |  6 +-
 .../service/pager/AbstractQueryPagerTest.java   |  8 +-
 10 files changed, 278 insertions(+), 40 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/a8dce228/CHANGES.txt
--
diff --cc CHANGES.txt
index cea6135,054cf79..d00cc65
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,34 -1,7 +1,36 @@@
 -2.0.16:
 +2.1.6
 + * (cqlsh) Better float precision by default (CASSANDRA-9224)
 + * Improve estimated row count (CASSANDRA-9107)
 + * Optimize range tombstone memory footprint (CASSANDRA-8603)
 + * Use configured gcgs in anticompaction (CASSANDRA-9397)
 + * Warn on misuse of unlogged batches (CASSANDRA-9282)
 + * Failure detector detects and ignores local pauses (CASSANDRA-9183)
 + * Add utility class to support for rate limiting a given log statement 
(CASSANDRA-9029)
 + * Add missing consistency levels to cassandra-stess (CASSANDRA-9361)
 + * Fix commitlog getCompletedTasks to not increment (CASSANDRA-9339)
 + * Fix for harmless exceptions logged as ERROR (CASSANDRA-8564)
 + * Delete processed sstables in sstablesplit/sstableupgrade (CASSANDRA-8606)
 + * Improve sstable exclusion from partition tombstones (CASSANDRA-9298)
 + * Validate the indexed column rather than the cell's contents for 2i 
(CASSANDRA-9057)
 + * Add support for top-k custom 2i queries (CASSANDRA-8717)
 + * Fix error when dropping table during compaction (CASSANDRA-9251)
 + * cassandra-stress supports validation operations over user profiles 
(CASSANDRA-8773)
 + * Add support for rate limiting log messages (CASSANDRA-9029)
 + * Log the partition key with tombstone warnings (CASSANDRA-8561)
 + * Reduce runWithCompactionsDisabled poll interval to 1ms (CASSANDRA-9271)
 + * Fix PITR commitlog replay (CASSANDRA-9195)
 + * GCInspector logs very different times (CASSANDRA-9124)
 + * Fix deleting from an empty list (CASSANDRA-9198)
 + * Update tuple and collection types that use a user-defined type when that 
UDT
 +   is modified (CASSANDRA-9148, CASSANDRA-9192)
 + * Use higher timeout for prepair and snapshot in repair (CASSANDRA-9261)
 + * Fix anticompaction blocking ANTI_ENTROPY stage (CASSANDRA-9151)
 + * Repair waits for anticompaction to finish (CASSANDRA-9097)
 + * Fix streaming not holding ref when stream error (CASSANDRA-9295)
 + * Fix canonical view returning early opened SSTables (CASSANDRA-9396)
 +Merged from 2.0:
+  * Fix null static columns in pages after the first, paged reversed
+queries (CASSANDRA-8502)
 - * Fix failing bound statement after adding a collection (CASSANDRA-9411)
   * Fix counting cache serialization in request metrics (CASSANDRA-9466)
   * (cqlsh) Add LOGIN command to switch users (CASSANDRA-7212)
   * Clone SliceQueryFilter in AbstractReadCommand implementations 
(CASSANDRA-8940)

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

http://git-wip-us.apache.org/repos/asf/cassandra/blob/a8dce228/src/java/org/apache/cassandra/db/DataRange.java
--
diff --cc src/java/org/apache/cassandra/db/DataRange.java
index dd4fbe8,1be9469..08fdd14
--- a/src/java/org/apache/cassandra/db/DataRange.java
+++ b/src/java/org/apache/cassandra/db/DataRange.java
@@@ -22,11 -22,12 +22,13 @@@ import java.util.ArrayList
  import java.util.Comparator;
  import java.util.List;
  
+ import com.google.common.base.Objects;
+ import org.apache.cassandra.config.CFMetaData;
  import org.apache.cassandra.db.columniterator.IdentityQueryFilter;
- import org.apache.cassandra.db.composites.CellNameType;
 +import org.apache.cassandra.

[2/6] cassandra git commit: Merge commit '63165a719cd8ec9d7f06c186f61d39403e192edc' into cassandra-2.1

2015-05-27 Thread tylerhobbs
Merge commit '63165a719cd8ec9d7f06c186f61d39403e192edc' into cassandra-2.1


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

Branch: refs/heads/trunk
Commit: 74280b1eeb0478f5c3e939aa72daedb62437f50c
Parents: 434d27b 63165a7
Author: Sylvain Lebresne 
Authored: Wed May 27 16:17:10 2015 +0200
Committer: Sylvain Lebresne 
Committed: Wed May 27 16:17:10 2015 +0200

--

--




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

2015-05-27 Thread tylerhobbs
Merge branch 'cassandra-2.2' into trunk


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

Branch: refs/heads/trunk
Commit: eb60f3101985b67eba8f96af63b0a214c4f41969
Parents: e9a263d 80ba11c
Author: Tyler Hobbs 
Authored: Wed May 27 13:54:09 2015 -0500
Committer: Tyler Hobbs 
Committed: Wed May 27 13:54:09 2015 -0500

--
 CHANGES.txt |  3 +
 .../apache/cassandra/db/ColumnFamilyStore.java  |  4 +-
 src/java/org/apache/cassandra/db/DataRange.java | 82 ---
 .../cassandra/db/SliceFromReadCommand.java  | 28 +++
 .../cassandra/db/filter/ColumnCounter.java  | 63 ++-
 .../cassandra/db/filter/SliceQueryFilter.java   | 83 ++--
 .../service/pager/AbstractQueryPager.java   | 40 --
 .../service/pager/RangeSliceQueryPager.java |  4 +-
 .../service/pager/SliceQueryPager.java  |  6 +-
 .../service/pager/AbstractQueryPagerTest.java   |  8 +-
 10 files changed, 281 insertions(+), 40 deletions(-)
--


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



[1/6] cassandra git commit: Fix error executing bound statement after adding a collection

2015-05-27 Thread tylerhobbs
Repository: cassandra
Updated Branches:
  refs/heads/trunk e9a263dae -> eb60f3101


Fix error executing bound statement after adding a collection

patch by blerer; reviewed by slebresne for CASSANDRA-9411


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

Branch: refs/heads/trunk
Commit: 63165a719cd8ec9d7f06c186f61d39403e192edc
Parents: 3e4ed96
Author: Benjamin Lerer 
Authored: Wed May 27 16:00:52 2015 +0200
Committer: Sylvain Lebresne 
Committed: Wed May 27 16:00:52 2015 +0200

--
 CHANGES.txt |   1 +
 .../cql3/statements/ModificationStatement.java  |   6 +-
 .../cql3/statements/SelectStatement.java| 186 +++
 3 files changed, 110 insertions(+), 83 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/63165a71/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index af08802..709100b 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.0.16:
+ * Fix failing bound statement after adding a collection (CASSANDRA-9411)
  * Fix counting cache serialization in request metrics (CASSANDRA-9466)
  * (cqlsh) Add LOGIN command to switch users (CASSANDRA-7212)
  * Clone SliceQueryFilter in AbstractReadCommand implementations 
(CASSANDRA-8940)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/63165a71/src/java/org/apache/cassandra/cql3/statements/ModificationStatement.java
--
diff --git 
a/src/java/org/apache/cassandra/cql3/statements/ModificationStatement.java 
b/src/java/org/apache/cassandra/cql3/statements/ModificationStatement.java
index db22e7d..3852920 100644
--- a/src/java/org/apache/cassandra/cql3/statements/ModificationStatement.java
+++ b/src/java/org/apache/cassandra/cql3/statements/ModificationStatement.java
@@ -668,7 +668,8 @@ public abstract class ModificationStatement implements 
CQLStatement, MeasurableF
 private static ResultSet buildCasFailureResultSet(ByteBuffer key, 
ColumnFamily cf, Iterable columnsWithConditions, boolean 
isBatch)
 throws InvalidRequestException
 {
-CFDefinition cfDef = cf.metadata().getCfDef();
+CFMetaData cfm = cf.metadata();
+CFDefinition cfDef = cfm.getCfDef();
 
 Selection selection;
 if (columnsWithConditions == null)
@@ -694,7 +695,8 @@ public abstract class ModificationStatement implements 
CQLStatement, MeasurableF
 
 long now = System.currentTimeMillis();
 Selection.ResultSetBuilder builder = selection.resultSetBuilder(now);
-SelectStatement.forSelection(cfDef, 
selection).processColumnFamily(key, cf, Collections.emptyList(), 
now, builder);
+SelectStatement.forSelection(cfm, selection)
+   .processColumnFamily(cfDef, key, cf, 
Collections.emptyList(), now, builder);
 
 return builder.build();
 }

http://git-wip-us.apache.org/repos/asf/cassandra/blob/63165a71/src/java/org/apache/cassandra/cql3/statements/SelectStatement.java
--
diff --git a/src/java/org/apache/cassandra/cql3/statements/SelectStatement.java 
b/src/java/org/apache/cassandra/cql3/statements/SelectStatement.java
index 8a4deb6..95e0441 100644
--- a/src/java/org/apache/cassandra/cql3/statements/SelectStatement.java
+++ b/src/java/org/apache/cassandra/cql3/statements/SelectStatement.java
@@ -46,6 +46,7 @@ import org.apache.cassandra.service.StorageProxy;
 import org.apache.cassandra.service.StorageService;
 import org.apache.cassandra.service.pager.*;
 import org.apache.cassandra.db.ConsistencyLevel;
+import org.apache.cassandra.thrift.ColumnDef;
 import org.apache.cassandra.thrift.IndexExpression;
 import org.apache.cassandra.thrift.IndexOperator;
 import org.apache.cassandra.thrift.ThriftValidation;
@@ -68,7 +69,7 @@ public class SelectStatement implements CQLStatement, 
MeasurableForPreparedCache
 private static final int DEFAULT_COUNT_PAGE_SIZE = 1;
 
 private final int boundTerms;
-public final CFDefinition cfDef;
+public final CFMetaData cfm;
 public final Parameters parameters;
 private final Selection selection;
 private final Term limit;
@@ -110,13 +111,13 @@ public class SelectStatement implements CQLStatement, 
MeasurableForPreparedCache
 }
 };
 
-public SelectStatement(CFDefinition cfDef, int boundTerms, Parameters 
parameters, Selection selection, Term limit)
+public SelectStatement(CFMetaData cfm, int boundTerms, Parameters 
parameters, Selection selection, Term limit)
 {
-

[3/6] cassandra git commit: Fix null static columns during paging, reversed queries

2015-05-27 Thread tylerhobbs
Fix null static columns during paging, reversed queries

Patch by Tyler Hobbs; reviewed by Sylvain Lebresne for CASSANDRA-8502


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

Branch: refs/heads/trunk
Commit: d075540c46209fdabde74db1e210114965372605
Parents: 63165a7
Author: Tyler Hobbs 
Authored: Wed May 27 13:48:52 2015 -0500
Committer: Tyler Hobbs 
Committed: Wed May 27 13:48:52 2015 -0500

--
 CHANGES.txt |  2 +
 .../apache/cassandra/db/ColumnFamilyStore.java  |  4 +-
 src/java/org/apache/cassandra/db/DataRange.java | 81 +---
 .../cassandra/db/SliceFromReadCommand.java  | 24 ++
 .../cassandra/db/filter/ColumnCounter.java  | 67 +++-
 .../cassandra/db/filter/ExtendedFilter.java | 13 
 .../cassandra/db/filter/SliceQueryFilter.java   | 79 ++-
 .../service/pager/AbstractQueryPager.java   | 40 --
 .../service/pager/RangeSliceQueryPager.java |  4 +-
 .../service/pager/SliceQueryPager.java  |  6 +-
 .../cassandra/cql3/MultiColumnRelationTest.java |  2 +
 .../service/pager/AbstractQueryPagerTest.java   |  8 +-
 12 files changed, 293 insertions(+), 37 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/d075540c/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 709100b..054cf79 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,6 @@
 2.0.16:
+ * Fix null static columns in pages after the first, paged reversed
+   queries (CASSANDRA-8502)
  * Fix failing bound statement after adding a collection (CASSANDRA-9411)
  * Fix counting cache serialization in request metrics (CASSANDRA-9466)
  * (cqlsh) Add LOGIN command to switch users (CASSANDRA-7212)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/d075540c/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
--
diff --git a/src/java/org/apache/cassandra/db/ColumnFamilyStore.java 
b/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
index eec4044..f81ec82 100644
--- a/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
+++ b/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
@@ -1682,7 +1682,7 @@ public class ColumnFamilyStore implements 
ColumnFamilyStoreMBean
  boolean countCQL3Rows,
  long now)
 {
-DataRange dataRange = new DataRange.Paging(keyRange, columnRange, 
columnStart, columnStop, metadata.comparator);
+DataRange dataRange = new DataRange.Paging(keyRange, columnRange, 
columnStart, columnStop, metadata);
 return ExtendedFilter.create(this, dataRange, rowFilter, maxResults, 
countCQL3Rows, now);
 }
 
@@ -1714,7 +1714,7 @@ public class ColumnFamilyStore implements 
ColumnFamilyStoreMBean
 // create a new SliceQueryFilter that selects all cells, but pass 
the original slice start and finish
 // through to DataRange.Paging to be used on the first and last 
partitions
 SliceQueryFilter newFilter = new 
SliceQueryFilter(ColumnSlice.ALL_COLUMNS_ARRAY, sfilter.isReversed(), 
sfilter.count);
-dataRange = new DataRange.Paging(range, newFilter, 
sfilter.start(), sfilter.finish(), metadata.comparator);
+dataRange = new DataRange.Paging(range, newFilter, 
sfilter.start(), sfilter.finish(), metadata);
 }
 else
 {

http://git-wip-us.apache.org/repos/asf/cassandra/blob/d075540c/src/java/org/apache/cassandra/db/DataRange.java
--
diff --git a/src/java/org/apache/cassandra/db/DataRange.java 
b/src/java/org/apache/cassandra/db/DataRange.java
index 774a3aa..1be9469 100644
--- a/src/java/org/apache/cassandra/db/DataRange.java
+++ b/src/java/org/apache/cassandra/db/DataRange.java
@@ -22,10 +22,12 @@ import java.util.ArrayList;
 import java.util.Comparator;
 import java.util.List;
 
+import com.google.common.base.Objects;
+import org.apache.cassandra.config.CFMetaData;
 import org.apache.cassandra.db.columniterator.IdentityQueryFilter;
 import org.apache.cassandra.db.filter.*;
-import org.apache.cassandra.db.marshal.AbstractType;
 import org.apache.cassandra.dht.*;
+import org.apache.cassandra.utils.ByteBufferUtil;
 
 /**
  * Groups key range and column filter for range queries.
@@ -41,7 +43,7 @@ import org.apache.cassandra.dht.*;
  */
 public class DataRange
 {
-private final AbstractBounds keyRange;
+protected final AbstractBounds keyRange

[3/5] cassandra git commit: Fix null static columns during paging, reversed queries

2015-05-27 Thread tylerhobbs
Fix null static columns during paging, reversed queries

Patch by Tyler Hobbs; reviewed by Sylvain Lebresne for CASSANDRA-8502


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

Branch: refs/heads/cassandra-2.2
Commit: d075540c46209fdabde74db1e210114965372605
Parents: 63165a7
Author: Tyler Hobbs 
Authored: Wed May 27 13:48:52 2015 -0500
Committer: Tyler Hobbs 
Committed: Wed May 27 13:48:52 2015 -0500

--
 CHANGES.txt |  2 +
 .../apache/cassandra/db/ColumnFamilyStore.java  |  4 +-
 src/java/org/apache/cassandra/db/DataRange.java | 81 +---
 .../cassandra/db/SliceFromReadCommand.java  | 24 ++
 .../cassandra/db/filter/ColumnCounter.java  | 67 +++-
 .../cassandra/db/filter/ExtendedFilter.java | 13 
 .../cassandra/db/filter/SliceQueryFilter.java   | 79 ++-
 .../service/pager/AbstractQueryPager.java   | 40 --
 .../service/pager/RangeSliceQueryPager.java |  4 +-
 .../service/pager/SliceQueryPager.java  |  6 +-
 .../cassandra/cql3/MultiColumnRelationTest.java |  2 +
 .../service/pager/AbstractQueryPagerTest.java   |  8 +-
 12 files changed, 293 insertions(+), 37 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/d075540c/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 709100b..054cf79 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,6 @@
 2.0.16:
+ * Fix null static columns in pages after the first, paged reversed
+   queries (CASSANDRA-8502)
  * Fix failing bound statement after adding a collection (CASSANDRA-9411)
  * Fix counting cache serialization in request metrics (CASSANDRA-9466)
  * (cqlsh) Add LOGIN command to switch users (CASSANDRA-7212)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/d075540c/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
--
diff --git a/src/java/org/apache/cassandra/db/ColumnFamilyStore.java 
b/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
index eec4044..f81ec82 100644
--- a/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
+++ b/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
@@ -1682,7 +1682,7 @@ public class ColumnFamilyStore implements 
ColumnFamilyStoreMBean
  boolean countCQL3Rows,
  long now)
 {
-DataRange dataRange = new DataRange.Paging(keyRange, columnRange, 
columnStart, columnStop, metadata.comparator);
+DataRange dataRange = new DataRange.Paging(keyRange, columnRange, 
columnStart, columnStop, metadata);
 return ExtendedFilter.create(this, dataRange, rowFilter, maxResults, 
countCQL3Rows, now);
 }
 
@@ -1714,7 +1714,7 @@ public class ColumnFamilyStore implements 
ColumnFamilyStoreMBean
 // create a new SliceQueryFilter that selects all cells, but pass 
the original slice start and finish
 // through to DataRange.Paging to be used on the first and last 
partitions
 SliceQueryFilter newFilter = new 
SliceQueryFilter(ColumnSlice.ALL_COLUMNS_ARRAY, sfilter.isReversed(), 
sfilter.count);
-dataRange = new DataRange.Paging(range, newFilter, 
sfilter.start(), sfilter.finish(), metadata.comparator);
+dataRange = new DataRange.Paging(range, newFilter, 
sfilter.start(), sfilter.finish(), metadata);
 }
 else
 {

http://git-wip-us.apache.org/repos/asf/cassandra/blob/d075540c/src/java/org/apache/cassandra/db/DataRange.java
--
diff --git a/src/java/org/apache/cassandra/db/DataRange.java 
b/src/java/org/apache/cassandra/db/DataRange.java
index 774a3aa..1be9469 100644
--- a/src/java/org/apache/cassandra/db/DataRange.java
+++ b/src/java/org/apache/cassandra/db/DataRange.java
@@ -22,10 +22,12 @@ import java.util.ArrayList;
 import java.util.Comparator;
 import java.util.List;
 
+import com.google.common.base.Objects;
+import org.apache.cassandra.config.CFMetaData;
 import org.apache.cassandra.db.columniterator.IdentityQueryFilter;
 import org.apache.cassandra.db.filter.*;
-import org.apache.cassandra.db.marshal.AbstractType;
 import org.apache.cassandra.dht.*;
+import org.apache.cassandra.utils.ByteBufferUtil;
 
 /**
  * Groups key range and column filter for range queries.
@@ -41,7 +43,7 @@ import org.apache.cassandra.dht.*;
  */
 public class DataRange
 {
-private final AbstractBounds keyRange;
+protected final AbstractBounds 

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

2015-05-27 Thread tylerhobbs
Merge branch 'cassandra-2.1' into cassandra-2.2


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

Branch: refs/heads/cassandra-2.2
Commit: 80ba11c62acff08954a1f79d1bf9078602dfc665
Parents: f9c998c a8dce22
Author: Tyler Hobbs 
Authored: Wed May 27 13:52:34 2015 -0500
Committer: Tyler Hobbs 
Committed: Wed May 27 13:52:34 2015 -0500

--
 CHANGES.txt |  3 +
 .../apache/cassandra/db/ColumnFamilyStore.java  |  4 +-
 src/java/org/apache/cassandra/db/DataRange.java | 82 ---
 .../cassandra/db/SliceFromReadCommand.java  | 28 +++
 .../cassandra/db/filter/ColumnCounter.java  | 63 ++-
 .../cassandra/db/filter/SliceQueryFilter.java   | 83 ++--
 .../service/pager/AbstractQueryPager.java   | 40 --
 .../service/pager/RangeSliceQueryPager.java |  4 +-
 .../service/pager/SliceQueryPager.java  |  6 +-
 .../service/pager/AbstractQueryPagerTest.java   |  8 +-
 10 files changed, 281 insertions(+), 40 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/80ba11c6/CHANGES.txt
--
diff --cc CHANGES.txt
index e183137,d00cc65..0864759
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -12,124 -3,6 +12,127 @@@ Merged from 2.1
   * Improve estimated row count (CASSANDRA-9107)
   * Optimize range tombstone memory footprint (CASSANDRA-8603)
   * Use configured gcgs in anticompaction (CASSANDRA-9397)
++Merged from 2.0:
++ * Fix null static columns in pages after the first, paged reversed
++   queries (CASSANDRA-8502)
 +
 +
 +2.2.0-beta1
 + * Introduce Transactional API for internal state changes (CASSANDRA-8984)
 + * Add a flag in cassandra.yaml to enable UDFs (CASSANDRA-9404)
 + * Better support of null for UDF (CASSANDRA-8374)
 + * Use ecj instead of javassist for UDFs (CASSANDRA-8241)
 + * faster async logback configuration for tests (CASSANDRA-9376)
 + * Add `smallint` and `tinyint` data types (CASSANDRA-8951)
 + * Avoid thrift schema creation when native driver is used in stress tool 
(CASSANDRA-9374)
 + * Populate TokenMetadata early during startup (CASSANDRA-9317)
 + * Make Functions.declared thread-safe
 + * Add client warnings to native protocol v4 (CASSANDRA-8930)
 + * Allow roles cache to be invalidated (CASSANDRA-8967)
 + * Upgrade Snappy (CASSANDRA-9063)
 + * Don't start Thrift rpc by default (CASSANDRA-9319)
 + * Only stream from unrepaired sstables with incremental repair 
(CASSANDRA-8267)
 + * Aggregate UDFs allow SFUNC return type to differ from STYPE if FFUNC 
specified (CASSANDRA-9321)
 + * Remove Thrift dependencies in bundled tools (CASSANDRA-8358)
 + * Disable memory mapping of hsperfdata file for JVM statistics 
(CASSANDRA-9242)
 + * Add pre-startup checks to detect potential incompatibilities 
(CASSANDRA-8049)
 + * Distinguish between null and unset in protocol v4 (CASSANDRA-7304)
 + * Add user/role permissions for user-defined functions (CASSANDRA-7557)
 + * Allow cassandra config to be updated to restart daemon without unloading 
classes (CASSANDRA-9046)
 + * Don't initialize compaction writer before checking if iter is empty 
(CASSANDRA-9117)
 + * Don't execute any functions at prepare-time (CASSANDRA-9037)
 + * Share file handles between all instances of a SegmentedFile 
(CASSANDRA-8893)
 + * Make it possible to major compact LCS (CASSANDRA-7272)
 + * Make FunctionExecutionException extend RequestExecutionException
 +   (CASSANDRA-9055)
 + * Add support for SELECT JSON, INSERT JSON syntax and new toJson(), 
fromJson()
 +   functions (CASSANDRA-7970)
 + * Optimise max purgeable timestamp calculation in compaction (CASSANDRA-8920)
 + * Constrain internode message buffer sizes, and improve IO class hierarchy 
(CASSANDRA-8670) 
 + * New tool added to validate all sstables in a node (CASSANDRA-5791)
 + * Push notification when tracing completes for an operation (CASSANDRA-7807)
 + * Delay "node up" and "node added" notifications until native protocol 
server is started (CASSANDRA-8236)
 + * Compressed Commit Log (CASSANDRA-6809)
 + * Optimise IntervalTree (CASSANDRA-8988)
 + * Add a key-value payload for third party usage (CASSANDRA-8553, 9212)
 + * Bump metrics-reporter-config dependency for metrics 3.0 (CASSANDRA-8149)
 + * Partition intra-cluster message streams by size, not type (CASSANDRA-8789)
 + * Add WriteFailureException to native protocol, notify coordinator of
 +   write failures (CASSANDRA-8592)
 + * Convert SequentialWriter to nio (CASSANDRA-8709)
 + * Add role based access control (CASSANDRA-7653, 8650, 7216, 8760, 8849, 
8761, 8850)
 + * Record client ip add

[4/5] cassandra git commit: Merge branch 'cassandra-2.0' into cassandra-2.1

2015-05-27 Thread tylerhobbs
Merge branch 'cassandra-2.0' into cassandra-2.1


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

Branch: refs/heads/cassandra-2.2
Commit: a8dce228de443716556f59510b0494078bbe97a2
Parents: 74280b1 d075540
Author: Tyler Hobbs 
Authored: Wed May 27 13:50:58 2015 -0500
Committer: Tyler Hobbs 
Committed: Wed May 27 13:50:58 2015 -0500

--
 CHANGES.txt |  2 +
 .../apache/cassandra/db/ColumnFamilyStore.java  |  4 +-
 src/java/org/apache/cassandra/db/DataRange.java | 82 ---
 .../cassandra/db/SliceFromReadCommand.java  | 28 +++
 .../cassandra/db/filter/ColumnCounter.java  | 61 +-
 .../cassandra/db/filter/SliceQueryFilter.java   | 83 ++--
 .../service/pager/AbstractQueryPager.java   | 40 --
 .../service/pager/RangeSliceQueryPager.java |  4 +-
 .../service/pager/SliceQueryPager.java  |  6 +-
 .../service/pager/AbstractQueryPagerTest.java   |  8 +-
 10 files changed, 278 insertions(+), 40 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/a8dce228/CHANGES.txt
--
diff --cc CHANGES.txt
index cea6135,054cf79..d00cc65
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,34 -1,7 +1,36 @@@
 -2.0.16:
 +2.1.6
 + * (cqlsh) Better float precision by default (CASSANDRA-9224)
 + * Improve estimated row count (CASSANDRA-9107)
 + * Optimize range tombstone memory footprint (CASSANDRA-8603)
 + * Use configured gcgs in anticompaction (CASSANDRA-9397)
 + * Warn on misuse of unlogged batches (CASSANDRA-9282)
 + * Failure detector detects and ignores local pauses (CASSANDRA-9183)
 + * Add utility class to support for rate limiting a given log statement 
(CASSANDRA-9029)
 + * Add missing consistency levels to cassandra-stess (CASSANDRA-9361)
 + * Fix commitlog getCompletedTasks to not increment (CASSANDRA-9339)
 + * Fix for harmless exceptions logged as ERROR (CASSANDRA-8564)
 + * Delete processed sstables in sstablesplit/sstableupgrade (CASSANDRA-8606)
 + * Improve sstable exclusion from partition tombstones (CASSANDRA-9298)
 + * Validate the indexed column rather than the cell's contents for 2i 
(CASSANDRA-9057)
 + * Add support for top-k custom 2i queries (CASSANDRA-8717)
 + * Fix error when dropping table during compaction (CASSANDRA-9251)
 + * cassandra-stress supports validation operations over user profiles 
(CASSANDRA-8773)
 + * Add support for rate limiting log messages (CASSANDRA-9029)
 + * Log the partition key with tombstone warnings (CASSANDRA-8561)
 + * Reduce runWithCompactionsDisabled poll interval to 1ms (CASSANDRA-9271)
 + * Fix PITR commitlog replay (CASSANDRA-9195)
 + * GCInspector logs very different times (CASSANDRA-9124)
 + * Fix deleting from an empty list (CASSANDRA-9198)
 + * Update tuple and collection types that use a user-defined type when that 
UDT
 +   is modified (CASSANDRA-9148, CASSANDRA-9192)
 + * Use higher timeout for prepair and snapshot in repair (CASSANDRA-9261)
 + * Fix anticompaction blocking ANTI_ENTROPY stage (CASSANDRA-9151)
 + * Repair waits for anticompaction to finish (CASSANDRA-9097)
 + * Fix streaming not holding ref when stream error (CASSANDRA-9295)
 + * Fix canonical view returning early opened SSTables (CASSANDRA-9396)
 +Merged from 2.0:
+  * Fix null static columns in pages after the first, paged reversed
+queries (CASSANDRA-8502)
 - * Fix failing bound statement after adding a collection (CASSANDRA-9411)
   * Fix counting cache serialization in request metrics (CASSANDRA-9466)
   * (cqlsh) Add LOGIN command to switch users (CASSANDRA-7212)
   * Clone SliceQueryFilter in AbstractReadCommand implementations 
(CASSANDRA-8940)

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

http://git-wip-us.apache.org/repos/asf/cassandra/blob/a8dce228/src/java/org/apache/cassandra/db/DataRange.java
--
diff --cc src/java/org/apache/cassandra/db/DataRange.java
index dd4fbe8,1be9469..08fdd14
--- a/src/java/org/apache/cassandra/db/DataRange.java
+++ b/src/java/org/apache/cassandra/db/DataRange.java
@@@ -22,11 -22,12 +22,13 @@@ import java.util.ArrayList
  import java.util.Comparator;
  import java.util.List;
  
+ import com.google.common.base.Objects;
+ import org.apache.cassandra.config.CFMetaData;
  import org.apache.cassandra.db.columniterator.IdentityQueryFilter;
- import org.apache.cassandra.db.composites.CellNameType;
 +import org.apache.ca

[1/5] cassandra git commit: Fix error executing bound statement after adding a collection

2015-05-27 Thread tylerhobbs
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-2.2 f9c998cbc -> 80ba11c62


Fix error executing bound statement after adding a collection

patch by blerer; reviewed by slebresne for CASSANDRA-9411


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

Branch: refs/heads/cassandra-2.2
Commit: 63165a719cd8ec9d7f06c186f61d39403e192edc
Parents: 3e4ed96
Author: Benjamin Lerer 
Authored: Wed May 27 16:00:52 2015 +0200
Committer: Sylvain Lebresne 
Committed: Wed May 27 16:00:52 2015 +0200

--
 CHANGES.txt |   1 +
 .../cql3/statements/ModificationStatement.java  |   6 +-
 .../cql3/statements/SelectStatement.java| 186 +++
 3 files changed, 110 insertions(+), 83 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/63165a71/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index af08802..709100b 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.0.16:
+ * Fix failing bound statement after adding a collection (CASSANDRA-9411)
  * Fix counting cache serialization in request metrics (CASSANDRA-9466)
  * (cqlsh) Add LOGIN command to switch users (CASSANDRA-7212)
  * Clone SliceQueryFilter in AbstractReadCommand implementations 
(CASSANDRA-8940)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/63165a71/src/java/org/apache/cassandra/cql3/statements/ModificationStatement.java
--
diff --git 
a/src/java/org/apache/cassandra/cql3/statements/ModificationStatement.java 
b/src/java/org/apache/cassandra/cql3/statements/ModificationStatement.java
index db22e7d..3852920 100644
--- a/src/java/org/apache/cassandra/cql3/statements/ModificationStatement.java
+++ b/src/java/org/apache/cassandra/cql3/statements/ModificationStatement.java
@@ -668,7 +668,8 @@ public abstract class ModificationStatement implements 
CQLStatement, MeasurableF
 private static ResultSet buildCasFailureResultSet(ByteBuffer key, 
ColumnFamily cf, Iterable columnsWithConditions, boolean 
isBatch)
 throws InvalidRequestException
 {
-CFDefinition cfDef = cf.metadata().getCfDef();
+CFMetaData cfm = cf.metadata();
+CFDefinition cfDef = cfm.getCfDef();
 
 Selection selection;
 if (columnsWithConditions == null)
@@ -694,7 +695,8 @@ public abstract class ModificationStatement implements 
CQLStatement, MeasurableF
 
 long now = System.currentTimeMillis();
 Selection.ResultSetBuilder builder = selection.resultSetBuilder(now);
-SelectStatement.forSelection(cfDef, 
selection).processColumnFamily(key, cf, Collections.emptyList(), 
now, builder);
+SelectStatement.forSelection(cfm, selection)
+   .processColumnFamily(cfDef, key, cf, 
Collections.emptyList(), now, builder);
 
 return builder.build();
 }

http://git-wip-us.apache.org/repos/asf/cassandra/blob/63165a71/src/java/org/apache/cassandra/cql3/statements/SelectStatement.java
--
diff --git a/src/java/org/apache/cassandra/cql3/statements/SelectStatement.java 
b/src/java/org/apache/cassandra/cql3/statements/SelectStatement.java
index 8a4deb6..95e0441 100644
--- a/src/java/org/apache/cassandra/cql3/statements/SelectStatement.java
+++ b/src/java/org/apache/cassandra/cql3/statements/SelectStatement.java
@@ -46,6 +46,7 @@ import org.apache.cassandra.service.StorageProxy;
 import org.apache.cassandra.service.StorageService;
 import org.apache.cassandra.service.pager.*;
 import org.apache.cassandra.db.ConsistencyLevel;
+import org.apache.cassandra.thrift.ColumnDef;
 import org.apache.cassandra.thrift.IndexExpression;
 import org.apache.cassandra.thrift.IndexOperator;
 import org.apache.cassandra.thrift.ThriftValidation;
@@ -68,7 +69,7 @@ public class SelectStatement implements CQLStatement, 
MeasurableForPreparedCache
 private static final int DEFAULT_COUNT_PAGE_SIZE = 1;
 
 private final int boundTerms;
-public final CFDefinition cfDef;
+public final CFMetaData cfm;
 public final Parameters parameters;
 private final Selection selection;
 private final Term limit;
@@ -110,13 +111,13 @@ public class SelectStatement implements CQLStatement, 
MeasurableForPreparedCache
 }
 };
 
-public SelectStatement(CFDefinition cfDef, int boundTerms, Parameters 
parameters, Selection selection, Term limit)
+public SelectStatement(CFMetaData cfm, int boundTerms, Parameters 
parameters, Selection selection, Term limit)

[2/5] cassandra git commit: Merge commit '63165a719cd8ec9d7f06c186f61d39403e192edc' into cassandra-2.1

2015-05-27 Thread tylerhobbs
Merge commit '63165a719cd8ec9d7f06c186f61d39403e192edc' into cassandra-2.1


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

Branch: refs/heads/cassandra-2.2
Commit: 74280b1eeb0478f5c3e939aa72daedb62437f50c
Parents: 434d27b 63165a7
Author: Sylvain Lebresne 
Authored: Wed May 27 16:17:10 2015 +0200
Committer: Sylvain Lebresne 
Committed: Wed May 27 16:17:10 2015 +0200

--

--




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

2015-05-27 Thread tylerhobbs
Merge branch 'cassandra-2.0' into cassandra-2.1


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

Branch: refs/heads/cassandra-2.1
Commit: a8dce228de443716556f59510b0494078bbe97a2
Parents: 74280b1 d075540
Author: Tyler Hobbs 
Authored: Wed May 27 13:50:58 2015 -0500
Committer: Tyler Hobbs 
Committed: Wed May 27 13:50:58 2015 -0500

--
 CHANGES.txt |  2 +
 .../apache/cassandra/db/ColumnFamilyStore.java  |  4 +-
 src/java/org/apache/cassandra/db/DataRange.java | 82 ---
 .../cassandra/db/SliceFromReadCommand.java  | 28 +++
 .../cassandra/db/filter/ColumnCounter.java  | 61 +-
 .../cassandra/db/filter/SliceQueryFilter.java   | 83 ++--
 .../service/pager/AbstractQueryPager.java   | 40 --
 .../service/pager/RangeSliceQueryPager.java |  4 +-
 .../service/pager/SliceQueryPager.java  |  6 +-
 .../service/pager/AbstractQueryPagerTest.java   |  8 +-
 10 files changed, 278 insertions(+), 40 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/a8dce228/CHANGES.txt
--
diff --cc CHANGES.txt
index cea6135,054cf79..d00cc65
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,34 -1,7 +1,36 @@@
 -2.0.16:
 +2.1.6
 + * (cqlsh) Better float precision by default (CASSANDRA-9224)
 + * Improve estimated row count (CASSANDRA-9107)
 + * Optimize range tombstone memory footprint (CASSANDRA-8603)
 + * Use configured gcgs in anticompaction (CASSANDRA-9397)
 + * Warn on misuse of unlogged batches (CASSANDRA-9282)
 + * Failure detector detects and ignores local pauses (CASSANDRA-9183)
 + * Add utility class to support for rate limiting a given log statement 
(CASSANDRA-9029)
 + * Add missing consistency levels to cassandra-stess (CASSANDRA-9361)
 + * Fix commitlog getCompletedTasks to not increment (CASSANDRA-9339)
 + * Fix for harmless exceptions logged as ERROR (CASSANDRA-8564)
 + * Delete processed sstables in sstablesplit/sstableupgrade (CASSANDRA-8606)
 + * Improve sstable exclusion from partition tombstones (CASSANDRA-9298)
 + * Validate the indexed column rather than the cell's contents for 2i 
(CASSANDRA-9057)
 + * Add support for top-k custom 2i queries (CASSANDRA-8717)
 + * Fix error when dropping table during compaction (CASSANDRA-9251)
 + * cassandra-stress supports validation operations over user profiles 
(CASSANDRA-8773)
 + * Add support for rate limiting log messages (CASSANDRA-9029)
 + * Log the partition key with tombstone warnings (CASSANDRA-8561)
 + * Reduce runWithCompactionsDisabled poll interval to 1ms (CASSANDRA-9271)
 + * Fix PITR commitlog replay (CASSANDRA-9195)
 + * GCInspector logs very different times (CASSANDRA-9124)
 + * Fix deleting from an empty list (CASSANDRA-9198)
 + * Update tuple and collection types that use a user-defined type when that 
UDT
 +   is modified (CASSANDRA-9148, CASSANDRA-9192)
 + * Use higher timeout for prepair and snapshot in repair (CASSANDRA-9261)
 + * Fix anticompaction blocking ANTI_ENTROPY stage (CASSANDRA-9151)
 + * Repair waits for anticompaction to finish (CASSANDRA-9097)
 + * Fix streaming not holding ref when stream error (CASSANDRA-9295)
 + * Fix canonical view returning early opened SSTables (CASSANDRA-9396)
 +Merged from 2.0:
+  * Fix null static columns in pages after the first, paged reversed
+queries (CASSANDRA-8502)
 - * Fix failing bound statement after adding a collection (CASSANDRA-9411)
   * Fix counting cache serialization in request metrics (CASSANDRA-9466)
   * (cqlsh) Add LOGIN command to switch users (CASSANDRA-7212)
   * Clone SliceQueryFilter in AbstractReadCommand implementations 
(CASSANDRA-8940)

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

http://git-wip-us.apache.org/repos/asf/cassandra/blob/a8dce228/src/java/org/apache/cassandra/db/DataRange.java
--
diff --cc src/java/org/apache/cassandra/db/DataRange.java
index dd4fbe8,1be9469..08fdd14
--- a/src/java/org/apache/cassandra/db/DataRange.java
+++ b/src/java/org/apache/cassandra/db/DataRange.java
@@@ -22,11 -22,12 +22,13 @@@ import java.util.ArrayList
  import java.util.Comparator;
  import java.util.List;
  
+ import com.google.common.base.Objects;
+ import org.apache.cassandra.config.CFMetaData;
  import org.apache.cassandra.db.columniterator.IdentityQueryFilter;
- import org.apache.cassandra.db.composites.CellNameType;
 +import org.apache.ca

[1/2] cassandra git commit: Fix null static columns during paging, reversed queries

2015-05-27 Thread tylerhobbs
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-2.1 74280b1ee -> a8dce228d


Fix null static columns during paging, reversed queries

Patch by Tyler Hobbs; reviewed by Sylvain Lebresne for CASSANDRA-8502


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

Branch: refs/heads/cassandra-2.1
Commit: d075540c46209fdabde74db1e210114965372605
Parents: 63165a7
Author: Tyler Hobbs 
Authored: Wed May 27 13:48:52 2015 -0500
Committer: Tyler Hobbs 
Committed: Wed May 27 13:48:52 2015 -0500

--
 CHANGES.txt |  2 +
 .../apache/cassandra/db/ColumnFamilyStore.java  |  4 +-
 src/java/org/apache/cassandra/db/DataRange.java | 81 +---
 .../cassandra/db/SliceFromReadCommand.java  | 24 ++
 .../cassandra/db/filter/ColumnCounter.java  | 67 +++-
 .../cassandra/db/filter/ExtendedFilter.java | 13 
 .../cassandra/db/filter/SliceQueryFilter.java   | 79 ++-
 .../service/pager/AbstractQueryPager.java   | 40 --
 .../service/pager/RangeSliceQueryPager.java |  4 +-
 .../service/pager/SliceQueryPager.java  |  6 +-
 .../cassandra/cql3/MultiColumnRelationTest.java |  2 +
 .../service/pager/AbstractQueryPagerTest.java   |  8 +-
 12 files changed, 293 insertions(+), 37 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/d075540c/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 709100b..054cf79 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,6 @@
 2.0.16:
+ * Fix null static columns in pages after the first, paged reversed
+   queries (CASSANDRA-8502)
  * Fix failing bound statement after adding a collection (CASSANDRA-9411)
  * Fix counting cache serialization in request metrics (CASSANDRA-9466)
  * (cqlsh) Add LOGIN command to switch users (CASSANDRA-7212)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/d075540c/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
--
diff --git a/src/java/org/apache/cassandra/db/ColumnFamilyStore.java 
b/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
index eec4044..f81ec82 100644
--- a/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
+++ b/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
@@ -1682,7 +1682,7 @@ public class ColumnFamilyStore implements 
ColumnFamilyStoreMBean
  boolean countCQL3Rows,
  long now)
 {
-DataRange dataRange = new DataRange.Paging(keyRange, columnRange, 
columnStart, columnStop, metadata.comparator);
+DataRange dataRange = new DataRange.Paging(keyRange, columnRange, 
columnStart, columnStop, metadata);
 return ExtendedFilter.create(this, dataRange, rowFilter, maxResults, 
countCQL3Rows, now);
 }
 
@@ -1714,7 +1714,7 @@ public class ColumnFamilyStore implements 
ColumnFamilyStoreMBean
 // create a new SliceQueryFilter that selects all cells, but pass 
the original slice start and finish
 // through to DataRange.Paging to be used on the first and last 
partitions
 SliceQueryFilter newFilter = new 
SliceQueryFilter(ColumnSlice.ALL_COLUMNS_ARRAY, sfilter.isReversed(), 
sfilter.count);
-dataRange = new DataRange.Paging(range, newFilter, 
sfilter.start(), sfilter.finish(), metadata.comparator);
+dataRange = new DataRange.Paging(range, newFilter, 
sfilter.start(), sfilter.finish(), metadata);
 }
 else
 {

http://git-wip-us.apache.org/repos/asf/cassandra/blob/d075540c/src/java/org/apache/cassandra/db/DataRange.java
--
diff --git a/src/java/org/apache/cassandra/db/DataRange.java 
b/src/java/org/apache/cassandra/db/DataRange.java
index 774a3aa..1be9469 100644
--- a/src/java/org/apache/cassandra/db/DataRange.java
+++ b/src/java/org/apache/cassandra/db/DataRange.java
@@ -22,10 +22,12 @@ import java.util.ArrayList;
 import java.util.Comparator;
 import java.util.List;
 
+import com.google.common.base.Objects;
+import org.apache.cassandra.config.CFMetaData;
 import org.apache.cassandra.db.columniterator.IdentityQueryFilter;
 import org.apache.cassandra.db.filter.*;
-import org.apache.cassandra.db.marshal.AbstractType;
 import org.apache.cassandra.dht.*;
+import org.apache.cassandra.utils.ByteBufferUtil;
 
 /**
  * Groups key range and column filter for range queries.
@@ -41,7 +43,7 @@ import org.apache.cassandra.dht.*;
  */
 public class D

cassandra git commit: Fix null static columns during paging, reversed queries

2015-05-27 Thread tylerhobbs
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-2.0 63165a719 -> d075540c4


Fix null static columns during paging, reversed queries

Patch by Tyler Hobbs; reviewed by Sylvain Lebresne for CASSANDRA-8502


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

Branch: refs/heads/cassandra-2.0
Commit: d075540c46209fdabde74db1e210114965372605
Parents: 63165a7
Author: Tyler Hobbs 
Authored: Wed May 27 13:48:52 2015 -0500
Committer: Tyler Hobbs 
Committed: Wed May 27 13:48:52 2015 -0500

--
 CHANGES.txt |  2 +
 .../apache/cassandra/db/ColumnFamilyStore.java  |  4 +-
 src/java/org/apache/cassandra/db/DataRange.java | 81 +---
 .../cassandra/db/SliceFromReadCommand.java  | 24 ++
 .../cassandra/db/filter/ColumnCounter.java  | 67 +++-
 .../cassandra/db/filter/ExtendedFilter.java | 13 
 .../cassandra/db/filter/SliceQueryFilter.java   | 79 ++-
 .../service/pager/AbstractQueryPager.java   | 40 --
 .../service/pager/RangeSliceQueryPager.java |  4 +-
 .../service/pager/SliceQueryPager.java  |  6 +-
 .../cassandra/cql3/MultiColumnRelationTest.java |  2 +
 .../service/pager/AbstractQueryPagerTest.java   |  8 +-
 12 files changed, 293 insertions(+), 37 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/d075540c/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 709100b..054cf79 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,6 @@
 2.0.16:
+ * Fix null static columns in pages after the first, paged reversed
+   queries (CASSANDRA-8502)
  * Fix failing bound statement after adding a collection (CASSANDRA-9411)
  * Fix counting cache serialization in request metrics (CASSANDRA-9466)
  * (cqlsh) Add LOGIN command to switch users (CASSANDRA-7212)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/d075540c/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
--
diff --git a/src/java/org/apache/cassandra/db/ColumnFamilyStore.java 
b/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
index eec4044..f81ec82 100644
--- a/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
+++ b/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
@@ -1682,7 +1682,7 @@ public class ColumnFamilyStore implements 
ColumnFamilyStoreMBean
  boolean countCQL3Rows,
  long now)
 {
-DataRange dataRange = new DataRange.Paging(keyRange, columnRange, 
columnStart, columnStop, metadata.comparator);
+DataRange dataRange = new DataRange.Paging(keyRange, columnRange, 
columnStart, columnStop, metadata);
 return ExtendedFilter.create(this, dataRange, rowFilter, maxResults, 
countCQL3Rows, now);
 }
 
@@ -1714,7 +1714,7 @@ public class ColumnFamilyStore implements 
ColumnFamilyStoreMBean
 // create a new SliceQueryFilter that selects all cells, but pass 
the original slice start and finish
 // through to DataRange.Paging to be used on the first and last 
partitions
 SliceQueryFilter newFilter = new 
SliceQueryFilter(ColumnSlice.ALL_COLUMNS_ARRAY, sfilter.isReversed(), 
sfilter.count);
-dataRange = new DataRange.Paging(range, newFilter, 
sfilter.start(), sfilter.finish(), metadata.comparator);
+dataRange = new DataRange.Paging(range, newFilter, 
sfilter.start(), sfilter.finish(), metadata);
 }
 else
 {

http://git-wip-us.apache.org/repos/asf/cassandra/blob/d075540c/src/java/org/apache/cassandra/db/DataRange.java
--
diff --git a/src/java/org/apache/cassandra/db/DataRange.java 
b/src/java/org/apache/cassandra/db/DataRange.java
index 774a3aa..1be9469 100644
--- a/src/java/org/apache/cassandra/db/DataRange.java
+++ b/src/java/org/apache/cassandra/db/DataRange.java
@@ -22,10 +22,12 @@ import java.util.ArrayList;
 import java.util.Comparator;
 import java.util.List;
 
+import com.google.common.base.Objects;
+import org.apache.cassandra.config.CFMetaData;
 import org.apache.cassandra.db.columniterator.IdentityQueryFilter;
 import org.apache.cassandra.db.filter.*;
-import org.apache.cassandra.db.marshal.AbstractType;
 import org.apache.cassandra.dht.*;
+import org.apache.cassandra.utils.ByteBufferUtil;
 
 /**
  * Groups key range and column filter for range queries.
@@ -41,7 +43,7 @@ import org.apache.cassandra.dht.*;
  */
 public class D

[jira] [Updated] (CASSANDRA-9494) Need to set TTL with COPY command

2015-05-27 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis updated CASSANDRA-9494:
--
Issue Type: Sub-task  (was: Improvement)
Parent: CASSANDRA-9303

> Need to set TTL with COPY command
> -
>
> Key: CASSANDRA-9494
> URL: https://issues.apache.org/jira/browse/CASSANDRA-9494
> Project: Cassandra
>  Issue Type: Sub-task
>  Components: API
>Reporter: Ed Chen
>
> I can import a chunk of data into Cassandra table with COPY command like:
> COPY my_table (name, address) FROM my_file.csv WITH option='value' ... ;
> But I am not able to specify a finite TTL in COPY command with "USING TTL 
> 3600", for example. 



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


[jira] [Commented] (CASSANDRA-7486) Migrate to G1GC by default

2015-05-27 Thread Albert P Tobey (JIRA)

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

Albert P Tobey commented on CASSANDRA-7486:
---

Updated patches with spelling and whitespace fixes:

https://github.com/tobert/cassandra/commits/g1gc-2

https://github.com/tobert/cassandra/commit/419d39814985a6ef165fdbafee5f1b84bf2f197b
https://github.com/tobert/cassandra/commit/89d40af978eaeb02185726a63257d979111ad317
https://github.com/tobert/cassandra/commit/0f70469985d62aeadc20b41dc9cdc9d72a035c64


> Migrate to G1GC by default
> --
>
> Key: CASSANDRA-7486
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7486
> Project: Cassandra
>  Issue Type: New Feature
>  Components: Config
>Reporter: Jonathan Ellis
>Assignee: Albert P Tobey
> Fix For: 3.0 beta 1
>
>
> See 
> http://www.slideshare.net/MonicaBeckwith/garbage-first-garbage-collector-g1-7486gc-migration-to-expectations-and-advanced-tuning
>  and https://twitter.com/rbranson/status/482113561431265281
> May want to default 2.1 to G1.
> 2.1 is a different animal from 2.0 after moving most of memtables off heap.  
> Suspect this will help G1 even more than CMS.  (NB this is off by default but 
> needs to be part of the test.)



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


[jira] [Created] (CASSANDRA-9494) Need to set TTL with COPY command

2015-05-27 Thread Ed Chen (JIRA)
Ed Chen created CASSANDRA-9494:
--

 Summary: Need to set TTL with COPY command
 Key: CASSANDRA-9494
 URL: https://issues.apache.org/jira/browse/CASSANDRA-9494
 Project: Cassandra
  Issue Type: Improvement
  Components: API
Reporter: Ed Chen


I can import a chunk of data into Cassandra table with COPY command like:

COPY my_table (name, address) FROM my_file.csv WITH option='value' ... ;

But I am not able to specify a finite TTL in COPY command with "USING TTL 
3600", for example. 



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


[jira] [Issue Comment Deleted] (CASSANDRA-7486) Migrate to G1GC by default

2015-05-27 Thread Joshua McKenzie (JIRA)

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

Joshua McKenzie updated CASSANDRA-7486:
---
Comment: was deleted

(was: Sanity check on local laptop on a variety of workloads looks comparable 
between CMS and G1, slight edge to CMS but I'm on a sub 8G heap so that's to be 
expected.

Couple of spelling nits in comments in conf:
misspelled "effecitve"
vice versa, not visa-versa

Haven't tested yet on CI as I have a dtest going I don't want to mess with but 
I'm comfortable moving forward w/the results from testing locally.)

> Migrate to G1GC by default
> --
>
> Key: CASSANDRA-7486
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7486
> Project: Cassandra
>  Issue Type: New Feature
>  Components: Config
>Reporter: Jonathan Ellis
>Assignee: Albert P Tobey
> Fix For: 3.0 beta 1
>
>
> See 
> http://www.slideshare.net/MonicaBeckwith/garbage-first-garbage-collector-g1-7486gc-migration-to-expectations-and-advanced-tuning
>  and https://twitter.com/rbranson/status/482113561431265281
> May want to default 2.1 to G1.
> 2.1 is a different animal from 2.0 after moving most of memtables off heap.  
> Suspect this will help G1 even more than CMS.  (NB this is off by default but 
> needs to be part of the test.)



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


[jira] [Updated] (CASSANDRA-7486) Migrate to G1GC by default

2015-05-27 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis updated CASSANDRA-7486:
--
Reviewer: Joshua McKenzie  (was: Ariel Weisberg)

> Migrate to G1GC by default
> --
>
> Key: CASSANDRA-7486
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7486
> Project: Cassandra
>  Issue Type: New Feature
>  Components: Config
>Reporter: Jonathan Ellis
>Assignee: Albert P Tobey
> Fix For: 3.0 beta 1
>
>
> See 
> http://www.slideshare.net/MonicaBeckwith/garbage-first-garbage-collector-g1-7486gc-migration-to-expectations-and-advanced-tuning
>  and https://twitter.com/rbranson/status/482113561431265281
> May want to default 2.1 to G1.
> 2.1 is a different animal from 2.0 after moving most of memtables off heap.  
> Suspect this will help G1 even more than CMS.  (NB this is off by default but 
> needs to be part of the test.)



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


[jira] [Commented] (CASSANDRA-7486) Migrate to G1GC by default

2015-05-27 Thread Joshua McKenzie (JIRA)

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

Joshua McKenzie commented on CASSANDRA-7486:


Sanity check on local laptop on a variety of workloads looks comparable between 
CMS and G1, slight edge to CMS but I'm on a sub 8G heap so that's to be 
expected.

Couple of spelling nits in comments in conf:
misspelled "effecitve"
vice versa, not visa-versa

Haven't tested yet on CI as I have a dtest going I don't want to mess with but 
I'm comfortable moving forward w/the results from testing locally.

> Migrate to G1GC by default
> --
>
> Key: CASSANDRA-7486
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7486
> Project: Cassandra
>  Issue Type: New Feature
>  Components: Config
>Reporter: Jonathan Ellis
>Assignee: Albert P Tobey
> Fix For: 3.0 beta 1
>
>
> See 
> http://www.slideshare.net/MonicaBeckwith/garbage-first-garbage-collector-g1-7486gc-migration-to-expectations-and-advanced-tuning
>  and https://twitter.com/rbranson/status/482113561431265281
> May want to default 2.1 to G1.
> 2.1 is a different animal from 2.0 after moving most of memtables off heap.  
> Suspect this will help G1 even more than CMS.  (NB this is off by default but 
> needs to be part of the test.)



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


[jira] [Commented] (CASSANDRA-7486) Migrate to G1GC by default

2015-05-27 Thread Joshua McKenzie (JIRA)

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

Joshua McKenzie commented on CASSANDRA-7486:


Sanity check on local laptop on a variety of workloads looks comparable between 
CMS and G1, slight edge to CMS but I'm on a sub 8G heap so that's to be 
expected.

Couple of spelling nits in comments in conf:
misspelled "effecitve"
vice versa, not visa-versa

Haven't tested yet on CI as I have a dtest going I don't want to mess with but 
I'm comfortable moving forward w/the results from testing locally.

> Migrate to G1GC by default
> --
>
> Key: CASSANDRA-7486
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7486
> Project: Cassandra
>  Issue Type: New Feature
>  Components: Config
>Reporter: Jonathan Ellis
>Assignee: Albert P Tobey
> Fix For: 3.0 beta 1
>
>
> See 
> http://www.slideshare.net/MonicaBeckwith/garbage-first-garbage-collector-g1-7486gc-migration-to-expectations-and-advanced-tuning
>  and https://twitter.com/rbranson/status/482113561431265281
> May want to default 2.1 to G1.
> 2.1 is a different animal from 2.0 after moving most of memtables off heap.  
> Suspect this will help G1 even more than CMS.  (NB this is off by default but 
> needs to be part of the test.)



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


[jira] [Commented] (CASSANDRA-9493) Integrate latest 2.2 Java Driver

2015-05-27 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis commented on CASSANDRA-9493:
---

[~omichallat] when are you looking at your next release?

> Integrate latest 2.2 Java Driver
> 
>
> Key: CASSANDRA-9493
> URL: https://issues.apache.org/jira/browse/CASSANDRA-9493
> Project: Cassandra
>  Issue Type: Task
>Reporter: Robert Stupp
> Fix For: 2.2.0 rc1
>
>
> We need some functionality from the Java Driver 2.2 for C* 2.2 - especially 
> for UDFs.
> Related Java Driver tickets:
> [JAVA-572 - protocol V4|https://datastax-oss.atlassian.net/browse/JAVA-572]
> [JAVA-783 - V4 enum 
> constant|https://datastax-oss.atlassian.net/browse/JAVA-783]
> [JAVA-404 - date + time|https://datastax-oss.atlassian.net/browse/JAVA-404]
> [JAVA-786 - smallint + 
> tinyint|https://datastax-oss.atlassian.net/browse/JAVA-786]



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


[1/2] cassandra git commit: Update commitlog archiving docs now that segments aren't recycled

2015-05-27 Thread tylerhobbs
Repository: cassandra
Updated Branches:
  refs/heads/trunk 3c98472d5 -> e9a263dae


Update commitlog archiving docs now that segments aren't recycled

Patch by Branimir Lambov; reviewed by Ariel Weisberg for CASSANDRA-9350


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

Branch: refs/heads/trunk
Commit: f9c998cbc33c1cdbd65c1b57a1e3fba6c38a17a5
Parents: 8601412
Author: Branimir Lambov 
Authored: Wed May 27 12:03:22 2015 -0500
Committer: Tyler Hobbs 
Committed: Wed May 27 12:03:22 2015 -0500

--
 CHANGES.txt | 2 ++
 conf/commitlog_archiving.properties | 7 ---
 2 files changed, 2 insertions(+), 7 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/f9c998cb/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 454bd65..e183137 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,6 @@
 2.2
+ * Update commitlog archiving examples now that commitlog segments are
+   not recycled (CASSANDRA-9350)
  * Extend Transactional API to sstable lifecycle management (CASSANDRA-8568)
  * (cqlsh) Add support for native protocol 4 (CASSANDRA-9399)
  * Ensure that UDF and UDAs are keyspace-isolated (CASSANDRA-9409)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/f9c998cb/conf/commitlog_archiving.properties
--
diff --git a/conf/commitlog_archiving.properties 
b/conf/commitlog_archiving.properties
index 109a50b..393259c 100644
--- a/conf/commitlog_archiving.properties
+++ b/conf/commitlog_archiving.properties
@@ -22,13 +22,6 @@
 # %name => Name of the commit log.
 # Example: archive_command=/bin/ln %path /backup/%name
 #
-# commitlog archiving configuration.  Leave blank to disable.
-
-# Command to execute to archive a commitlog segment
-# Parameters: %path => Fully qualified path of the segment to archive
-# %name => Name of the commit log.
-# Example: archive_command=/bin/cp -f %path /backup/%name
-#
 # Limitation: *_command= expects one command with arguments. STDOUT
 # and STDIN or multiple commands cannot be executed.  You might want
 # to script multiple commands and add a pointer here.



[jira] [Comment Edited] (CASSANDRA-9493) Integrate latest 2.2 Java Driver

2015-05-27 Thread Robert Stupp (JIRA)

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

Robert Stupp edited comment on CASSANDRA-9493 at 5/27/15 5:09 PM:
--

Yes, rc1 would be very nice. At least 783, 404, 786. I don't thing that need 
full V4 support for UDFs. So a "custom" 2.2 Java Driver build would be fine IMO.
/cc [~slebresne]]


was (Author: snazy):
Yes, rc1 would be very nice. At least 783, 404, 786. I don't thing that need 
full V4 support for UDFs. So a "custom" 2.2 Java Driver build would be fine IMO.
/cc |~slebresne|

> Integrate latest 2.2 Java Driver
> 
>
> Key: CASSANDRA-9493
> URL: https://issues.apache.org/jira/browse/CASSANDRA-9493
> Project: Cassandra
>  Issue Type: Task
>Reporter: Robert Stupp
> Fix For: 2.2.0 rc1
>
>
> We need some functionality from the Java Driver 2.2 for C* 2.2 - especially 
> for UDFs.
> Related Java Driver tickets:
> [JAVA-572 - protocol V4|https://datastax-oss.atlassian.net/browse/JAVA-572]
> [JAVA-783 - V4 enum 
> constant|https://datastax-oss.atlassian.net/browse/JAVA-783]
> [JAVA-404 - date + time|https://datastax-oss.atlassian.net/browse/JAVA-404]
> [JAVA-786 - smallint + 
> tinyint|https://datastax-oss.atlassian.net/browse/JAVA-786]



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


[jira] [Commented] (CASSANDRA-9493) Integrate latest 2.2 Java Driver

2015-05-27 Thread Robert Stupp (JIRA)

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

Robert Stupp commented on CASSANDRA-9493:
-

Yes, rc1 would be very nice. At least 783, 404, 786. I don't thing that need 
full V4 support for UDFs. So a "custom" 2.2 Java Driver build would be fine IMO.
/cc |~slebresne|

> Integrate latest 2.2 Java Driver
> 
>
> Key: CASSANDRA-9493
> URL: https://issues.apache.org/jira/browse/CASSANDRA-9493
> Project: Cassandra
>  Issue Type: Task
>Reporter: Robert Stupp
> Fix For: 2.2.0 rc1
>
>
> We need some functionality from the Java Driver 2.2 for C* 2.2 - especially 
> for UDFs.
> Related Java Driver tickets:
> [JAVA-572 - protocol V4|https://datastax-oss.atlassian.net/browse/JAVA-572]
> [JAVA-783 - V4 enum 
> constant|https://datastax-oss.atlassian.net/browse/JAVA-783]
> [JAVA-404 - date + time|https://datastax-oss.atlassian.net/browse/JAVA-404]
> [JAVA-786 - smallint + 
> tinyint|https://datastax-oss.atlassian.net/browse/JAVA-786]



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


  1   2   >