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

2015-12-15 Thread aleksey
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/57d558fc
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/57d558fc
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/57d558fc

Branch: refs/heads/cassandra-3.0
Commit: 57d558fc1ef8117c41567541b967e2b782d04a50
Parents: de55c39 124f1bd
Author: Aleksey Yeschenko 
Authored: Tue Dec 15 21:37:09 2015 +
Committer: Aleksey Yeschenko 
Committed: Tue Dec 15 21:37:09 2015 +

--
 CHANGES.txt|   4 +
 bin/cqlsh.py   | 329 ++-
 pylib/cqlshlib/copyutil.py | 912 ++--
 pylib/cqlshlib/util.py |  19 +
 4 files changed, 843 insertions(+), 421 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/57d558fc/CHANGES.txt
--
diff --cc CHANGES.txt
index c9074fc,90f1bca..c969a4d
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,36 -1,15 +1,40 @@@
 -2.1.13
 +2.2.5
 + * Add property to allow listening on broadcast interface (CASSANDRA-9748)
 + * Fix regression in split size on CqlInputFormat (CASSANDRA-10835)
 + * Better handling of SSL connection errors inter-node (CASSANDRA-10816)
 + * Disable reloading of GossipingPropertyFileSnitch (CASSANDRA-9474)
 + * Verify tables in pseudo-system keyspaces at startup (CASSANDRA-10761)
 +Merged from 2.1:
+  * (cqlsh) further optimise COPY FROM (CASSANDRA-9302)
   * Allow CREATE TABLE WITH ID (CASSANDRA-9179)
   * Make Stress compiles within eclipse (CASSANDRA-10807)
   * Cassandra Daemon should print JVM arguments (CASSANDRA-10764)
   * Allow cancellation of index summary redistribution (CASSANDRA-8805)
+  * sstableloader will fail if there are collections in the schema tables 
(CASSANDRA-10700)
+  * Disable reloading of GossipingPropertyFileSnitch (CASSANDRA-9474)
   * Fix Stress profile parsing on Windows (CASSANDRA-10808)
  
+ 
 -2.1.12
 +2.2.4
 + * Show CQL help in cqlsh in web browser (CASSANDRA-7225)
 + * Serialize on disk the proper SSTable compression ratio (CASSANDRA-10775)
 + * Reject index queries while the index is building (CASSANDRA-8505)
 + * CQL.textile syntax incorrectly includes optional keyspace for aggregate 
SFUNC and FINALFUNC (CASSANDRA-10747)
 + * Fix JSON update with prepared statements (CASSANDRA-10631)
 + * Don't do anticompaction after subrange repair (CASSANDRA-10422)
 + * Fix SimpleDateType type compatibility (CASSANDRA-10027)
 + * (Hadoop) fix splits calculation (CASSANDRA-10640)
 + * (Hadoop) ensure that Cluster instances are always closed (CASSANDRA-10058)
 + * (cqlsh) show partial trace if incomplete after max_trace_wait 
(CASSANDRA-7645)
 + * Use most up-to-date version of schema for system tables (CASSANDRA-10652)
 + * Deprecate memory_allocator in cassandra.yaml (CASSANDRA-10581,10628)
 + * Expose phi values from failure detector via JMX and tweak debug
 +   and trace logging (CASSANDRA-9526)
 + * Fix RangeNamesQueryPager (CASSANDRA-10509)
 + * Deprecate Pig support (CASSANDRA-10542)
 + * Reduce contention getting instances of CompositeType (CASSANDRA-10433)
 + * Fix IllegalArgumentException in DataOutputBuffer.reallocate for large 
buffers (CASSANDRA-10592)
 +Merged from 2.1:
   * Fix incremental repair hang when replica is down (CASSANDRA-10288)
   * Avoid writing range tombstones after END_OF_ROW marker (CASSANDRA-10791)
   * Optimize the way we check if a token is repaired in anticompaction 
(CASSANDRA-10768)



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

2015-11-27 Thread snazy
http://git-wip-us.apache.org/repos/asf/cassandra/blob/b3e6a433/test/unit/org/apache/cassandra/cql3/validation/entities/UFTest.java
--
diff --cc test/unit/org/apache/cassandra/cql3/validation/entities/UFTest.java
index 25566ad,000..0d11a82
mode 100644,00..100644
--- a/test/unit/org/apache/cassandra/cql3/validation/entities/UFTest.java
+++ b/test/unit/org/apache/cassandra/cql3/validation/entities/UFTest.java
@@@ -1,2649 -1,0 +1,2663 @@@
 +/*
 + * Licensed to the Apache Software Foundation (ASF) under one
 + * or more contributor license agreements.  See the NOTICE file
 + * distributed with this work for additional information
 + * regarding copyright ownership.  The ASF licenses this file
 + * to you under the Apache License, Version 2.0 (the
 + * "License"); you may not use this file except in compliance
 + * with the License.  You may obtain a copy of the License at
 + *
 + * http://www.apache.org/licenses/LICENSE-2.0
 + *
 + * Unless required by applicable law or agreed to in writing, software
 + * distributed under the License is distributed on an "AS IS" BASIS,
 + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 + * See the License for the specific language governing permissions and
 + * limitations under the License.
 + */
 +package org.apache.cassandra.cql3.validation.entities;
 +
 +import java.math.BigDecimal;
 +import java.math.BigInteger;
 +import java.nio.ByteBuffer;
 +import java.util.ArrayList;
 +import java.util.Arrays;
 +import java.util.Date;
 +import java.util.List;
 +import java.util.Map;
 +import java.util.Set;
 +import java.util.TreeMap;
 +import java.util.TreeSet;
 +import java.util.UUID;
 +
 +import org.junit.Assert;
 +import org.junit.BeforeClass;
 +import org.junit.Test;
 +
 +import com.datastax.driver.core.DataType;
 +import com.datastax.driver.core.Row;
 +import com.datastax.driver.core.TupleType;
 +import com.datastax.driver.core.TupleValue;
 +import com.datastax.driver.core.UDTValue;
 +import com.datastax.driver.core.exceptions.InvalidQueryException;
 +import org.apache.cassandra.config.DatabaseDescriptor;
 +import org.apache.cassandra.cql3.CQL3Type;
 +import org.apache.cassandra.cql3.CQLTester;
 +import org.apache.cassandra.cql3.QueryProcessor;
 +import org.apache.cassandra.cql3.UntypedResultSet;
 +import org.apache.cassandra.cql3.functions.FunctionName;
 +import org.apache.cassandra.cql3.functions.Functions;
 +import org.apache.cassandra.cql3.functions.UDFunction;
 +import org.apache.cassandra.db.marshal.CollectionType;
 +import org.apache.cassandra.dht.ByteOrderedPartitioner;
 +import org.apache.cassandra.exceptions.FunctionExecutionException;
 +import org.apache.cassandra.exceptions.InvalidRequestException;
 +import org.apache.cassandra.service.ClientState;
 +import org.apache.cassandra.transport.Event;
 +import org.apache.cassandra.transport.Server;
 +import org.apache.cassandra.transport.messages.ResultMessage;
 +import org.apache.cassandra.utils.ByteBufferUtil;
 +import org.apache.cassandra.utils.UUIDGen;
 +
 +public class UFTest extends CQLTester
 +{
 +@BeforeClass
 +public static void setUp()
 +{
 +DatabaseDescriptor.setPartitioner(ByteOrderedPartitioner.instance);
 +}
 +
 +@Test
++public void testNonExistingOnes() throws Throwable
++{
++assertInvalidMessage("Cannot drop non existing function", "DROP 
FUNCTION " + KEYSPACE + ".func_does_not_exist");
++assertInvalidMessage("Cannot drop non existing function", "DROP 
FUNCTION " + KEYSPACE + ".func_does_not_exist(int,text)");
++assertInvalidMessage("Cannot drop non existing function", "DROP 
FUNCTION keyspace_does_not_exist.func_does_not_exist");
++assertInvalidMessage("Cannot drop non existing function", "DROP 
FUNCTION keyspace_does_not_exist.func_does_not_exist(int,text)");
++
++execute("DROP FUNCTION IF EXISTS " + KEYSPACE + 
".func_does_not_exist");
++execute("DROP FUNCTION IF EXISTS " + KEYSPACE + 
".func_does_not_exist(int,text)");
++execute("DROP FUNCTION IF EXISTS 
keyspace_does_not_exist.func_does_not_exist");
++execute("DROP FUNCTION IF EXISTS 
keyspace_does_not_exist.func_does_not_exist(int,text)");
++}
++
++@Test
 +public void testSchemaChange() throws Throwable
 +{
 +String f = createFunction(KEYSPACE,
 +  "double, double",
 +  "CREATE OR REPLACE FUNCTION %s(state 
double, val double) " +
 +  "RETURNS NULL ON NULL INPUT " +
 +  "RETURNS double " +
 +  "LANGUAGE javascript " +
 +  "AS '\"string\";';");
 +
 +assertLastSchemaChange(Event.SchemaChange.Change.CREATED, 
Event.SchemaChange.Target.FUNCTION,
 +   KEYSPACE, parseFunctionName(f).name,
 + 

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

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

Branch: refs/heads/cassandra-3.0
Commit: d2f243ee5c656eb51053e553d7371802255dfc54
Parents: d09b6c6 1b629c1
Author: Tyler Hobbs 
Authored: Wed Nov 18 18:25:18 2015 -0600
Committer: Tyler Hobbs 
Committed: Wed Nov 18 18:25:18 2015 -0600

--
 CHANGES.txt  |   1 +
 bin/cqlsh.py | 153 +++--
 pylib/cqlshlib/copy.py   | 647 ++
 pylib/cqlshlib/displaying.py |  10 +
 pylib/cqlshlib/formatting.py |  32 +-
 5 files changed, 725 insertions(+), 118 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/d2f243ee/CHANGES.txt
--
diff --cc CHANGES.txt
index c3dacc2,42dcf3e..4e19b23
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,17 -1,5 +1,18 @@@
 -2.1.12
 - * (cqlsh) Improve COPY TO performance and error handling (CASSANDRA-9304)
 +2.2.4
 + * Don't do anticompaction after subrange repair (CASSANDRA-10422)
 + * Fix SimpleDateType type compatibility (CASSANDRA-10027)
 + * (Hadoop) fix splits calculation (CASSANDRA-10640)
 + * (Hadoop) ensure that Cluster instances are always closed (CASSANDRA-10058)
 + * (cqlsh) show partial trace if incomplete after max_trace_wait 
(CASSANDRA-7645)
 + * Use most up-to-date version of schema for system tables (CASSANDRA-10652)
 + * Deprecate memory_allocator in cassandra.yaml (CASSANDRA-10581,10628)
 + * Expose phi values from failure detector via JMX and tweak debug
 +   and trace logging (CASSANDRA-9526)
 + * Fix RangeNamesQueryPager (CASSANDRA-10509)
 + * Deprecate Pig support (CASSANDRA-10542)
 + * Reduce contention getting instances of CompositeType (CASSANDRA-10433)
 +Merged from 2.1:
++ * * (cqlsh) Improve COPY TO performance and error handling (CASSANDRA-9304)
   * Don't remove level info when running upgradesstables (CASSANDRA-10692)
   * Create compression chunk for sending file only (CASSANDRA-10680)
   * Make buffered read size configurable (CASSANDRA-10249)



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

2015-11-10 Thread aleksey
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/ef0e447a
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/ef0e447a
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/ef0e447a

Branch: refs/heads/cassandra-3.0
Commit: ef0e447addccf97aadc527cea67d303523a88989
Parents: 48b685e 3674ad9
Author: Aleksey Yeschenko 
Authored: Tue Nov 10 13:44:49 2015 +
Committer: Aleksey Yeschenko 
Committed: Tue Nov 10 13:44:49 2015 +

--
 CHANGES.txt |  1 +
 .../cassandra/io/sstable/CQLSSTableWriter.java  |  2 ++
 .../io/sstable/CQLSSTableWriterTest.java| 22 
 3 files changed, 25 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/ef0e447a/CHANGES.txt
--
diff --cc CHANGES.txt
index fa868fe,fa2017a..5edad20
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,13 -1,5 +1,14 @@@
 -2.1.12
 +2.2.4
 + * (cqlsh) show partial trace if incomplete after max_trace_wait 
(CASSANDRA-7645)
 + * Use most up-to-date version of schema for system tables (CASSANDRA-10652)
 + * Deprecate memory_allocator in cassandra.yaml (CASSANDRA-10581,10628)
 + * Expose phi values from failure detector via JMX and tweak debug
 +   and trace logging (CASSANDRA-9526)
 + * Fix RangeNamesQueryPager (CASSANDRA-10509)
 + * Deprecate Pig support (CASSANDRA-10542)
 + * Reduce contention getting instances of CompositeType (CASSANDRA-10433)
 +Merged from 2.1:
+  * Reject counter writes in CQLSSTableWriter (CASSANDRA-10258)
   * Remove superfluous COUNTER_MUTATION stage mapping (CASSANDRA-10605)
   * Improve json2sstable error reporting on nonexistent columns 
(CASSANDRA-10401)
   * (cqlsh) fix COPY using wrong variable name for time_format 
(CASSANDRA-10633)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/ef0e447a/src/java/org/apache/cassandra/io/sstable/CQLSSTableWriter.java
--

http://git-wip-us.apache.org/repos/asf/cassandra/blob/ef0e447a/test/unit/org/apache/cassandra/io/sstable/CQLSSTableWriterTest.java
--



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

2015-11-06 Thread aleksey
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/cb429063
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/cb429063
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/cb429063

Branch: refs/heads/cassandra-3.0
Commit: cb429063c1a4ec2b8d48d6e4e6e8a2f524033df7
Parents: edca4dc 2548365
Author: Aleksey Yeschenko 
Authored: Fri Nov 6 17:56:33 2015 +
Committer: Aleksey Yeschenko 
Committed: Fri Nov 6 17:56:33 2015 +

--
 CHANGES.txt   |   2 +-
 bin/cqlsh.py  |   6 +++---
 ...driver-internal-only-3.0.0a2.post0-95c6008.zip | Bin 233564 -> 0 bytes
 ...driver-internal-only-3.0.0a3.post0-c535450.zip | Bin 0 -> 233938 bytes
 pylib/cqlshlib/tracing.py |   8 
 5 files changed, 8 insertions(+), 8 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/cb429063/CHANGES.txt
--
diff --cc CHANGES.txt
index c33b8c9,7771969..f47e1dd
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,12 -1,4 +1,13 @@@
 -2.1.12
 +2.2.4
++ * (cqlsh) show partial trace if incomplete after max_trace_wait 
(CASSANDRA-7645)
 + * Use most up-to-date version of schema for system tables (CASSANDRA-10652)
 + * Deprecate memory_allocator in cassandra.yaml (CASSANDRA-10581,10628)
 + * Expose phi values from failure detector via JMX and tweak debug
 +   and trace logging (CASSANDRA-9526)
 + * Fix RangeNamesQueryPager (CASSANDRA-10509)
 + * Deprecate Pig support (CASSANDRA-10542)
 + * Reduce contention getting instances of CompositeType (CASSANDRA-10433)
 +Merged from 2.1:
   * (cqlsh) fix COPY using wrong variable name for time_format 
(CASSANDRA-10633)
   * Do not run SizeEstimatesRecorder if a node is not a member of the ring 
(CASSANDRA-9912)
   * Improve handling of dead nodes in gossip (CASSANDRA-10298)



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

2015-09-17 Thread blerer
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/eecfb07d
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/eecfb07d
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/eecfb07d

Branch: refs/heads/cassandra-3.0
Commit: eecfb07d46f4bd2e89e6fff748519413e286a1fe
Parents: 6dcc89f 4e3555c
Author: blerer 
Authored: Thu Sep 17 22:12:50 2015 +0200
Committer: blerer 
Committed: Thu Sep 17 22:13:49 2015 +0200

--
 NEWS.txt|  9 +++-
 bin/cqlsh.py|  2 +-
 doc/cql3/CQL.textile| 10 +++-
 pylib/cqlshlib/cql3handling.py  |  2 +-
 src/java/org/apache/cassandra/cql3/Cql.g|  2 +-
 .../apache/cassandra/cql3/QueryProcessor.java   |  2 +-
 .../validation/operations/TruncateTest.java | 48 
 7 files changed, 68 insertions(+), 7 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/eecfb07d/NEWS.txt
--
diff --cc NEWS.txt
index 49744cf,6ec24ef..78d90f6
--- a/NEWS.txt
+++ b/NEWS.txt
@@@ -13,137 -13,14 +13,144 @@@ restore snapshots created with the prev
  'sstableloader' tool. You can upgrade the file format of your snapshots
  using the provided 'sstableupgrade' tool.
  
- 
 +2.2.2
 +=
 +
 +Upgrading
 +-
 +- Version 1 and 2 of the native protocol are now deprecated and support
 +  will be removed in Cassandra 3.0. You are encouraged to upgrade to a
 +  client driver using version 3 of the native protocol.
 +
 +Changed Defaults
 +
 +   - commitlog_total_space_in_mb will use the smaller of 8192, and 1/4
 + of the total space of the commitlog volume. (Before: always used
 + 8192)
 +   - Incremental repair is on by default since 2.2.0, run full repairs by
 + providing the '-full' parameter to nodetool repair.
 +   - Parallel repairs are the default since 2.2.0, run sequential repairs
 + by providing the '-seq' parameter to nodetool repair.
 +
 +New features
 +
 +   - Custom QueryHandlers can retrieve the column specifications for the bound
 + variables from QueryOptions by using the hasColumnSpecifications()
 + and getColumnSpecifications() methods.
 +
 +
 +2.2.1
 +=
 +
 +Upgrading
 +-
 +- Nothing specific to this release, but please see 2.2 if you are 
upgrading
 +  from a previous version.
 +
 +New features
 +
 +   - COUNT(*) and COUNT(1) can be selected with other columns or functions
 +
 +
 +2.2
 +===
 +
 +New features
 +
 +   - Very large batches will now be rejected (defaults to 50kb). This
 + can be customized by modifying batch_size_fail_threshold_in_kb.
 +   - Selecting columns,scalar functions, UDT fields, writetime or ttl together
 + with aggregated is now possible. The value returned for the columns,
 + scalar functions, UDT fields, writetime and ttl will be the ones for
 + the first row matching the query.
 +   - Windows is now a supported platform. Powershell execution for startup 
scripts
 + is highly recommended and can be enabled via an administrator 
command-prompt
 + with: 'powershell set-executionpolicy unrestricted'
 +   - It is now possible to do major compactions when using leveled compaction.
 + Doing that will take all sstables and compact them out in levels. The
 + levels will be non overlapping so doing this will still not be something
 + you want to do very often since it might cause more compactions for a 
while.
 + It is also possible to split output when doing a major compaction with
 + STCS - files will be split in sizes 50%, 25%, 12.5% etc of the total 
size.
 + This might be a bit better than old major compactions which created one 
big
 + file on disk.
 +   - A new tool has been added bin/sstableverify that checks for errors/bitrot
 + in all sstables.  Unlike scrub, this is a non-invasive tool.
 +   - Authentication & Authorization APIs have been updated to introduce
 + roles. Roles and Permissions granted to them are inherited, supporting
 + role based access control. The role concept supercedes that of users
 + and CQL constructs such as CREATE USER are deprecated but retained for
 + compatibility. The requirement to explicitly create Roles in Cassandra
 + even when auth is handled by an external system has been removed, so
 + authentication & authorization can be delegated to such systems in their
 + entirety.
 +   - In addition to the above, Roles are also first class resources and can 
be the
 + subject of permissions. Users 

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

2015-08-28 Thread blerer
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/5fb4e58b
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/5fb4e58b
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/5fb4e58b

Branch: refs/heads/cassandra-3.0
Commit: 5fb4e58bc9d85f8248852982d4ef7a216967ade7
Parents: 01a11fd 264cf36
Author: blerer benjamin.le...@datastax.com
Authored: Fri Aug 28 16:03:16 2015 +0200
Committer: blerer benjamin.le...@datastax.com
Committed: Fri Aug 28 16:07:49 2015 +0200

--
 src/java/org/apache/cassandra/tools/NodeTool.java| 8 
 src/java/org/apache/cassandra/tools/nodetool/Status.java | 3 ++-
 2 files changed, 6 insertions(+), 5 deletions(-)
--




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

2015-08-25 Thread tylerhobbs
Merge branch 'cassandra-2.1' into cassandra-2.2

Conflicts:
CHANGES.txt
pylib/cqlshlib/cql3handling.py


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

Branch: refs/heads/cassandra-3.0
Commit: 134bcda0cd780a298c087733b44edd7315bf
Parents: d526536 386f197
Author: Tyler Hobbs tylerlho...@gmail.com
Authored: Tue Aug 25 09:57:18 2015 -0500
Committer: Tyler Hobbs tylerlho...@gmail.com
Committed: Tue Aug 25 09:57:18 2015 -0500

--
 CHANGES.txt|  3 ++-
 pylib/cqlshlib/cql3handling.py | 38 ++---
 pylib/cqlshlib/cqlhandling.py  | 12 ++--
 3 files changed, 14 insertions(+), 39 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/134bcda0/CHANGES.txt
--
diff --cc CHANGES.txt
index 3065d0b,92dcf59..97d8b8b
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,17 -1,5 +1,18 @@@
 -2.1.9
 +2.2.1
-  * add CLEAR cqlsh command (CASSANDRA-10086)
++ * (cqlsh) add CLEAR command (CASSANDRA-10086)
 + * Support string literals as Role names for compatibility (CASSANDRA-10135)
 + * Allow count(*) and count(1) to be use as normal aggregation 
(CASSANDRA-10114)
 + * An NPE is thrown if the column name is unknown for an IN relation 
(CASSANDRA-10043)
 + * Apply commit_failure_policy to more errors on startup (CASSANDRA-9749)
 + * Fix histogram overflow exception (CASSANDRA-9973)
 + * Route gossip messages over dedicated socket (CASSANDRA-9237)
 + * Add checksum to saved cache files (CASSANDRA-9265)
 + * Log warning when using an aggregate without partition key (CASSANDRA-9737)
 + * Avoid grouping sstables for anticompaction with DTCS (CASSANDRA-9900)
 + * UDF / UDA execution time in trace (CASSANDRA-9723)
 + * Fix broken internode SSL (CASSANDRA-9884)
 +Merged from 2.1:
+  * (cqlsh) update list of CQL keywords (CASSANDRA-9232)
   * Avoid race condition during read repair (CASSANDRA-9460)
   * (cqlsh) default load-from-file encoding to utf-8 (CASSANDRA-9898)
   * Avoid returning Permission.NONE when failing to query users table 
(CASSANDRA-10168)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/134bcda0/pylib/cqlshlib/cql3handling.py
--

http://git-wip-us.apache.org/repos/asf/cassandra/blob/134bcda0/pylib/cqlshlib/cqlhandling.py
--



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

2015-08-14 Thread tylerhobbs
http://git-wip-us.apache.org/repos/asf/cassandra/blob/da3a5a7f/bin/cqlsh.py
--
diff --cc bin/cqlsh.py
index 11f110d,000..9a348bc
mode 100644,00..100644
--- a/bin/cqlsh.py
+++ b/bin/cqlsh.py
@@@ -1,2675 -1,0 +1,2679 @@@
 +#!/bin/sh
 +# -*- mode: Python -*-
 +
 +# Licensed to the Apache Software Foundation (ASF) under one
 +# or more contributor license agreements.  See the NOTICE file
 +# distributed with this work for additional information
 +# regarding copyright ownership.  The ASF licenses this file
 +# to you under the Apache License, Version 2.0 (the
 +# License); you may not use this file except in compliance
 +# with the License.  You may obtain a copy of the License at
 +#
 +# http://www.apache.org/licenses/LICENSE-2.0
 +#
 +# Unless required by applicable law or agreed to in writing, software
 +# distributed under the License is distributed on an AS IS BASIS,
 +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 +# See the License for the specific language governing permissions and
 +# limitations under the License.
 +
 +:
 +# bash code here; finds a suitable python interpreter and execs this file.
 +# prefer unqualified python if suitable:
 +python -c 'import sys; sys.exit(not (0x020500b0  sys.hexversion  
0x0300))' 2/dev/null \
 + exec python $0 $@
 +for pyver in 2.6 2.7 2.5; do
 +which python$pyver  /dev/null 21  exec python$pyver $0 $@
 +done
 +echo No appropriate python interpreter found. 2
 +exit 1
 +:
 +
 +from __future__ import with_statement
 +from uuid import UUID
 +
 +description = CQL Shell for Apache Cassandra
 +version = 5.0.1
 +
 +from StringIO import StringIO
 +from contextlib import contextmanager
 +from glob import glob
 +
 +import cmd
 +import sys
 +import os
 +import time
 +import optparse
 +import ConfigParser
 +import codecs
 +import locale
 +import platform
 +import warnings
 +import csv
 +import getpass
 +from functools import partial
 +import traceback
 +
 +
 +readline = None
 +try:
 +# check if tty first, cause readline doesn't check, and only cares
 +# about $TERM. we don't want the funky escape code stuff to be
 +# output if not a tty.
 +if sys.stdin.isatty():
 +import readline
 +except ImportError:
 +pass
 +
 +CQL_LIB_PREFIX = 'cassandra-driver-internal-only-'
 +
 +CASSANDRA_PATH = os.path.join(os.path.dirname(os.path.realpath(__file__)), 
'..')
 +
 +# use bundled libs for python-cql and thrift, if available. if there
 +# is a ../lib dir, use bundled libs there preferentially.
 +ZIPLIB_DIRS = [os.path.join(CASSANDRA_PATH, 'lib')]
 +myplatform = platform.system()
 +if myplatform == 'Linux':
 +ZIPLIB_DIRS.append('/usr/share/cassandra/lib')
 +
 +if os.environ.get('CQLSH_NO_BUNDLED', ''):
 +ZIPLIB_DIRS = ()
 +
 +
 +def find_zip(libprefix):
 +for ziplibdir in ZIPLIB_DIRS:
 +zips = glob(os.path.join(ziplibdir, libprefix + '*.zip'))
 +if zips:
 +return max(zips)   # probably the highest version, if multiple
 +
 +cql_zip = find_zip(CQL_LIB_PREFIX)
 +if cql_zip:
 +ver = os.path.splitext(os.path.basename(cql_zip))[0][len(CQL_LIB_PREFIX):]
 +sys.path.insert(0, os.path.join(cql_zip, 'cassandra-driver-' + ver))
 +
 +third_parties = ('futures-', 'six-')
 +
 +for lib in third_parties:
 +lib_zip = find_zip(lib)
 +if lib_zip:
 +sys.path.insert(0, lib_zip)
 +
 +warnings.filterwarnings(ignore, r.*blist.*)
 +try:
 +import cassandra
 +except ImportError, e:
 +sys.exit(\nPython Cassandra driver not installed, or not on 
PYTHONPATH.\n
 + 'You might try pip install cassandra-driver.\n\n'
 + 'Python: %s\n'
 + 'Module load path: %r\n\n'
 + 'Error: %s\n' % (sys.executable, sys.path, e))
 +
 +from cassandra.cluster import Cluster, PagedResult
 +from cassandra.query import SimpleStatement, ordered_dict_factory
 +from cassandra.policies import WhiteListRoundRobinPolicy
 +from cassandra.protocol import QueryMessage, ResultMessage
 +from cassandra.metadata import protect_name, protect_names, protect_value, 
KeyspaceMetadata, TableMetadata, ColumnMetadata
 +from cassandra.auth import PlainTextAuthProvider
 +
 +# cqlsh should run correctly when run out of a Cassandra source tree,
 +# out of an unpacked Cassandra tarball, and after a proper package install.
 +cqlshlibdir = os.path.join(CASSANDRA_PATH, 'pylib')
 +if os.path.isdir(cqlshlibdir):
 +sys.path.insert(0, cqlshlibdir)
 +
 +from cqlshlib import cqlhandling, cql3handling, pylexotron, sslhandling
 +from cqlshlib.displaying import (RED, BLUE, CYAN, ANSI_RESET, 
COLUMN_NAME_COLORS,
 + FormattedValue, colorme)
 +from cqlshlib.formatting import format_by_type, formatter_for, 
format_value_utype
 +from cqlshlib.util import trim_if_present, get_file_encoding_bomsize
 +from cqlshlib.formatting import DateTimeFormat
 +from cqlshlib.formatting import 

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

2015-08-09 Thread blerer
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/6d0cf7db
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/6d0cf7db
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/6d0cf7db

Branch: refs/heads/cassandra-3.0
Commit: 6d0cf7dbd2221c13434958e9e0d5e418f58fe23f
Parents: 0b99d33 c8d163f
Author: blerer benjamin.le...@datastax.com
Authored: Sun Aug 9 22:11:14 2015 +0200
Committer: blerer benjamin.le...@datastax.com
Committed: Sun Aug 9 22:12:16 2015 +0200

--
 .../restrictions/MultiColumnRestriction.java| 37 +++
 .../restrictions/SingleColumnRestriction.java   | 68 ++--
 .../SelectMultiColumnRelationTest.java  | 45 +
 .../SelectSingleColumnRelationTest.java | 28 
 4 files changed, 149 insertions(+), 29 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/6d0cf7db/src/java/org/apache/cassandra/cql3/restrictions/MultiColumnRestriction.java
--
diff --cc 
src/java/org/apache/cassandra/cql3/restrictions/MultiColumnRestriction.java
index c4bce4c,000..84a3952
mode 100644,00..100644
--- 
a/src/java/org/apache/cassandra/cql3/restrictions/MultiColumnRestriction.java
+++ 
b/src/java/org/apache/cassandra/cql3/restrictions/MultiColumnRestriction.java
@@@ -1,448 -1,0 +1,461 @@@
 +/*
 + * Licensed to the Apache Software Foundation (ASF) under one
 + * or more contributor license agreements.  See the NOTICE file
 + * distributed with this work for additional information
 + * regarding copyright ownership.  The ASF licenses this file
 + * to you under the Apache License, Version 2.0 (the
 + * License); you may not use this file except in compliance
 + * with the License.  You may obtain a copy of the License at
 + *
 + * http://www.apache.org/licenses/LICENSE-2.0
 + *
 + * Unless required by applicable law or agreed to in writing, software
 + * distributed under the License is distributed on an AS IS BASIS,
 + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 + * See the License for the specific language governing permissions and
 + * limitations under the License.
 + */
 +package org.apache.cassandra.cql3.restrictions;
 +
 +import java.nio.ByteBuffer;
 +import java.util.*;
 +
++import org.apache.cassandra.cql3.Term.Terminal;
++
++import org.apache.cassandra.cql3.Term;
 +import org.apache.cassandra.config.ColumnDefinition;
 +import org.apache.cassandra.cql3.*;
 +import org.apache.cassandra.cql3.functions.Function;
 +import org.apache.cassandra.cql3.statements.Bound;
 +import org.apache.cassandra.db.IndexExpression;
 +import org.apache.cassandra.db.composites.CompositesBuilder;
 +import org.apache.cassandra.db.index.SecondaryIndex;
 +import org.apache.cassandra.db.index.SecondaryIndexManager;
 +import org.apache.cassandra.exceptions.InvalidRequestException;
- 
 +import static 
org.apache.cassandra.cql3.statements.RequestValidations.checkFalse;
 +import static 
org.apache.cassandra.cql3.statements.RequestValidations.checkNotNull;
 +import static 
org.apache.cassandra.cql3.statements.RequestValidations.checkTrue;
 +import static 
org.apache.cassandra.cql3.statements.RequestValidations.invalidRequest;
 +
 +public abstract class MultiColumnRestriction extends AbstractRestriction
 +{
 +/**
 + * The columns to which the restriction apply.
 + */
 +protected final ListColumnDefinition columnDefs;
 +
 +public MultiColumnRestriction(ListColumnDefinition columnDefs)
 +{
 +this.columnDefs = columnDefs;
 +}
 +
 +@Override
 +public boolean isMultiColumn()
 +{
 +return true;
 +}
 +
 +@Override
 +public ColumnDefinition getFirstColumn()
 +{
 +return columnDefs.get(0);
 +}
 +
 +@Override
 +public ColumnDefinition getLastColumn()
 +{
 +return columnDefs.get(columnDefs.size() - 1);
 +}
 +
 +@Override
 +public CollectionColumnDefinition getColumnDefs()
 +{
 +return columnDefs;
 +}
 +
 +@Override
 +public final Restriction mergeWith(Restriction otherRestriction) throws 
InvalidRequestException
 +{
- checkTrue(otherRestriction.isMultiColumn(),
-   Mixing single column relations and multi column 
relations on clustering columns is not allowed);
- return doMergeWith(otherRestriction);
++// We want to allow query like: (b,c)  (?, ?) AND b  ?
++if (!otherRestriction.isMultiColumn()
++ ((SingleColumnRestriction) 
otherRestriction).canBeConvertedToMultiColumnRestriction())
++{
++return doMergeWith(((SingleColumnRestriction) 

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

2015-07-17 Thread slebresne
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/22c97bc5
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/22c97bc5
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/22c97bc5

Branch: refs/heads/cassandra-2.2
Commit: 22c97bc5ef5017663a40d25bd5b7283c09e25dd5
Parents: f74419c 2d462c0
Author: Sylvain Lebresne sylv...@datastax.com
Authored: Fri Jul 17 15:36:49 2015 +0200
Committer: Sylvain Lebresne sylv...@datastax.com
Committed: Fri Jul 17 15:36:49 2015 +0200

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


http://git-wip-us.apache.org/repos/asf/cassandra/blob/22c97bc5/CHANGES.txt
--
diff --cc CHANGES.txt
index e6c093d,c6774c2..9a262dc
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,17 -1,14 +1,17 @@@
 -2.1.9
 +2.2.0-rc3
 + * sum() and avg() functions missing for smallint and tinyint types 
(CASSANDRA-9671)
 + * Revert CASSANDRA-9542 (allow native functions in UDA) (CASSANDRA-9771)
 +Merged from 2.1:
   * Fix broken logging for empty flushes in Memtable (CASSANDRA-9837)
-  * Complete CASSANDRA-8448 fix (CASSANDRA-9519)
   * Handle corrupt files on startup (CASSANDRA-9686)
   * Fix clientutil jar and tests (CASSANDRA-9760)
   * (cqlsh) Allow the SSL protocol version to be specified through the
 config file or environment variables (CASSANDRA-9544)
  Merged from 2.0:
+  * Complete CASSANDRA-8448 fix (CASSANDRA-9519)
   * Don't include auth credentials in debug log (CASSANDRA-9682)
   * Can't transition from write survey to normal mode (CASSANDRA-9740)
 - * Scrub (recover) sstables even when -Index.db is missing, (CASSANDRA-9591)
 + * Scrub (recover) sstables even when -Index.db is missing (CASSANDRA-9591)
   * Fix growing pending background compaction (CASSANDRA-9662)
  
  



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

2015-07-13 Thread marcuse
Merge branch 'cassandra-2.1' into cassandra-2.2

Conflicts:
CHANGES.txt
src/java/org/apache/cassandra/io/sstable/format/SSTableReader.java
src/java/org/apache/cassandra/service/CassandraDaemon.java


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

Branch: refs/heads/trunk
Commit: 5a090cc5a13d01a22776378b65116868359b8f8c
Parents: 01f3d0a 1eccced
Author: Marcus Eriksson marc...@apache.org
Authored: Mon Jul 13 19:22:55 2015 +0200
Committer: Marcus Eriksson marc...@apache.org
Committed: Mon Jul 13 19:23:41 2015 +0200

--
 CHANGES.txt |  1 +
 conf/cassandra.yaml |  9 +--
 .../io/sstable/format/SSTableReader.java| 71 
 .../org/apache/cassandra/io/util/FileUtils.java | 23 +++
 .../apache/cassandra/io/util/SegmentedFile.java | 13 +++-
 .../cassandra/service/CassandraDaemon.java  |  9 +++
 .../cassandra/service/StorageService.java   |  7 ++
 .../cassandra/utils/JVMStabilityInspector.java  | 17 -
 8 files changed, 128 insertions(+), 22 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/5a090cc5/CHANGES.txt
--
diff --cc CHANGES.txt
index 03458b2,5f4fdf2..3046ceb
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,7 -1,5 +1,8 @@@
 -2.1.9
 +2.2.0-rc3
 + * sum() and avg() functions missing for smallint and tinyint types 
(CASSANDRA-9671)
 + * Revert CASSANDRA-9542 (allow native functions in UDA) (CASSANDRA-9771)
 +Merged from 2.1:
+  * Handle corrupt files on startup (CASSANDRA-9686)
   * Fix clientutil jar and tests (CASSANDRA-9760)
   * (cqlsh) Allow the SSL protocol version to be specified through the
 config file or environment variables (CASSANDRA-9544)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/5a090cc5/conf/cassandra.yaml
--



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

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

Branch: refs/heads/trunk
Commit: ff74eaf0e05b9dfecfb9f04850791114da2b3cf4
Parents: 269059e db39257
Author: T Jake Luciani j...@apache.org
Authored: Mon Jul 6 12:26:01 2015 -0400
Committer: T Jake Luciani j...@apache.org
Committed: Mon Jul 6 12:26:01 2015 -0400

--
 CHANGES.txt   |   2 ++
 ...assandra-driver-internal-only-2.6.0c2.post.zip | Bin 0 - 198346 bytes
 lib/cassandra-driver-internal-only-2.6.0c2.zip| Bin 199328 - 0 bytes
 3 files changed, 2 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/ff74eaf0/CHANGES.txt
--
diff --cc CHANGES.txt
index 9973bbc,95dc8be..7c6b4ad
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,26 -1,7 +1,28 @@@
 -2.1.8
 +2.2.0-rc2
 + * Re-enable memory-mapped I/O on Windows (CASSANDRA-9658)
 + * Warn when an extra-large partition is compacted (CASSANDRA-9643)
 + * (cqlsh) Allow setting the initial connection timeout (CASSANDRA-9601)
 + * BulkLoader has --transport-factory option but does not use it 
(CASSANDRA-9675)
 + * Allow JMX over SSL directly from nodetool (CASSANDRA-9090)
 + * Update cqlsh for UDFs (CASSANDRA-7556)
 + * Change Windows kernel default timer resolution (CASSANDRA-9634)
 + * Deprected sstable2json and json2sstable (CASSANDRA-9618)
 + * Allow native functions in user-defined aggregates (CASSANDRA-9542)
 + * Don't repair system_distributed by default (CASSANDRA-9621)
 + * Fix mixing min, max, and count aggregates for blob type (CASSANRA-9622)
 + * Rename class for DATE type in Java driver (CASSANDRA-9563)
 + * Duplicate compilation of UDFs on coordinator (CASSANDRA-9475)
 + * Fix connection leak in CqlRecordWriter (CASSANDRA-9576)
 + * Mlockall before opening system sstables  remove boot_without_jna option 
(CASSANDRA-9573)
 + * Add functions to convert timeuuid to date or time, deprecate dateOf and 
unixTimestampOf (CASSANDRA-9229)
 + * Make sure we cancel non-compacting sstables from LifecycleTransaction 
(CASSANDRA-9566)
 + * Fix deprecated repair JMX API (CASSANDRA-9570)
 + * Add logback metrics (CASSANDRA-9378)
 + * Update and refactor ant test/test-compression to run the tests in parallel 
(CASSANDRA-9583)
 + * Fix upgrading to new directory for secondary index (CASSANDRA-9687)
 +Merged from 2.1:
+  * (cqlsh) Fix bad check for CQL compatibility when DESCRIBE'ing
+COMPACT STORAGE tables with no clustering columns
 - * Warn when an extra-large partition is compacted (CASSANDRA-9643)
   * Eliminate strong self-reference chains in sstable ref tidiers 
(CASSANDRA-9656)
   * Ensure StreamSession uses canonical sstable reader instances 
(CASSANDRA-9700) 
   * Ensure memtable book keeping is not corrupted in the event we shrink usage 
(CASSANDRA-9681)



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

2015-06-30 Thread benedict
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/58927321
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/58927321
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/58927321

Branch: refs/heads/cassandra-2.2
Commit: 5892732149f05693385a74eb74ba4c235b546eb9
Parents: c1e7643 b6dd6b4
Author: Benedict Elliott Smith bened...@apache.org
Authored: Tue Jun 30 13:22:43 2015 +0100
Committer: Benedict Elliott Smith bened...@apache.org
Committed: Tue Jun 30 13:22:43 2015 +0100

--

--




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

2015-06-29 Thread slebresne
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/75e85b96
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/75e85b96
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/75e85b96

Branch: refs/heads/trunk
Commit: 75e85b961a9d6cb04223358cb52de3c675ab090c
Parents: 02a7c34 fe65707
Author: Sylvain Lebresne sylv...@datastax.com
Authored: Mon Jun 29 09:30:10 2015 +0200
Committer: Sylvain Lebresne sylv...@datastax.com
Committed: Mon Jun 29 09:30:10 2015 +0200

--
 CHANGES.txt  |  1 +
 .../cql3/statements/ModificationStatement.java   |  4 +---
 .../apache/cassandra/service/ClientState.java| 19 ++-
 .../apache/cassandra/service/StorageProxy.java   | 19 +++
 src/java/org/apache/cassandra/utils/UUIDGen.java |  7 +++
 5 files changed, 26 insertions(+), 24 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/75e85b96/CHANGES.txt
--
diff --cc CHANGES.txt
index 8f4f752,7aee45b..e58d524
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,29 -1,11 +1,30 @@@
 -2.1.8
 +2.2
 + * Allow JMX over SSL directly from nodetool (CASSANDRA-9090)
 + * Update cqlsh for UDFs (CASSANDRA-7556)
 + * Change Windows kernel default timer resolution (CASSANDRA-9634)
 + * Deprected sstable2json and json2sstable (CASSANDRA-9618)
 + * Allow native functions in user-defined aggregates (CASSANDRA-9542)
 + * Don't repair system_distributed by default (CASSANDRA-9621)
 + * Fix mixing min, max, and count aggregates for blob type (CASSANRA-9622)
 + * Rename class for DATE type in Java driver (CASSANDRA-9563)
 + * Duplicate compilation of UDFs on coordinator (CASSANDRA-9475)
 + * Fix connection leak in CqlRecordWriter (CASSANDRA-9576)
 + * Mlockall before opening system sstables  remove boot_without_jna option 
(CASSANDRA-9573)
 + * Add functions to convert timeuuid to date or time, deprecate dateOf and 
unixTimestampOf (CASSANDRA-9229)
 + * Make sure we cancel non-compacting sstables from LifecycleTransaction 
(CASSANDRA-9566)
 + * Fix deprecated repair JMX API (CASSANDRA-9570)
 + * Add logback metrics (CASSANDRA-9378)
 + * Update and refactor ant test/test-compression to run the tests in parallel 
(CASSANDRA-9583)
 +Merged from 2.1:
+  * Avoids ballot clash in Paxos (CASSANDRA-9649)
   * Fix IndexOutOfBoundsException when inserting tuple with too many
 elements using the string literal notation (CASSANDRA-9559)
 - * Allow JMX over SSL directly from nodetool (CASSANDRA-9090)
 - * Fix incorrect result for IN queries where column not found (CASSANDRA-9540)
   * Enable describe on indices (CASSANDRA-7814)
 + * Fix incorrect result for IN queries where column not found (CASSANDRA-9540)
   * ColumnFamilyStore.selectAndReference may block during compaction 
(CASSANDRA-9637)
 + * Fix bug in cardinality check when compacting (CASSANDRA-9580)
 + * Fix memory leak in Ref due to ConcurrentLinkedQueue.remove() behaviour 
(CASSANDRA-9549)
 + * Make rebuild only run one at a time (CASSANDRA-9119)
  Merged from 2.0
   * Improve trace messages for RR (CASSANDRA-9479)
   * Fix suboptimal secondary index selection when restricted

http://git-wip-us.apache.org/repos/asf/cassandra/blob/75e85b96/src/java/org/apache/cassandra/cql3/statements/ModificationStatement.java
--
diff --cc 
src/java/org/apache/cassandra/cql3/statements/ModificationStatement.java
index aac94be,3838909..888cdb7
--- a/src/java/org/apache/cassandra/cql3/statements/ModificationStatement.java
+++ b/src/java/org/apache/cassandra/cql3/statements/ModificationStatement.java
@@@ -645,10 -653,9 +645,8 @@@ public abstract class ModificationState
  }
  
  static ColumnFamily casInternal(CQL3CasRequest request, QueryState state)
 -throws InvalidRequestException
  {
- long millis = state.getTimestamp() / 1000;
- long nanos = ((state.getTimestamp() - (millis * 1000)) + 1) * 10;
- UUID ballot = UUIDGen.getTimeUUID(millis, nanos);
+ UUID ballot = UUIDGen.getTimeUUIDFromMicros(state.getTimestamp());
  CFMetaData metadata = 
Schema.instance.getCFMetaData(request.cfm.ksName, request.cfm.cfName);
  
  ReadCommand readCommand = ReadCommand.create(request.cfm.ksName, 
request.key, request.cfm.cfName, request.now, request.readFilter());

http://git-wip-us.apache.org/repos/asf/cassandra/blob/75e85b96/src/java/org/apache/cassandra/service/ClientState.java
--
diff --cc src/java/org/apache/cassandra/service/ClientState.java
index b9e89f5,23eec73..a8e13d1
--- 

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

2015-06-18 Thread jake
http://git-wip-us.apache.org/repos/asf/cassandra/blob/70d0d5f2/src/java/org/apache/cassandra/io/sstable/format/SSTableReader.java
--
diff --cc src/java/org/apache/cassandra/io/sstable/format/SSTableReader.java
index f4a59a2,000..1458461
mode 100644,00..100644
--- a/src/java/org/apache/cassandra/io/sstable/format/SSTableReader.java
+++ b/src/java/org/apache/cassandra/io/sstable/format/SSTableReader.java
@@@ -1,2175 -1,0 +1,2178 @@@
 +/*
 + * Licensed to the Apache Software Foundation (ASF) under one
 + * or more contributor license agreements.  See the NOTICE file
 + * distributed with this work for additional information
 + * regarding copyright ownership.  The ASF licenses this file
 + * to you under the Apache License, Version 2.0 (the
 + * License); you may not use this file except in compliance
 + * with the License.  You may obtain a copy of the License at
 + *
 + * http://www.apache.org/licenses/LICENSE-2.0
 + *
 + * Unless required by applicable law or agreed to in writing, software
 + * distributed under the License is distributed on an AS IS BASIS,
 + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 + * See the License for the specific language governing permissions and
 + * limitations under the License.
 + */
 +package org.apache.cassandra.io.sstable.format;
 +
 +import java.io.*;
 +import java.nio.ByteBuffer;
 +import java.util.*;
 +import java.util.concurrent.*;
 +import java.util.concurrent.atomic.AtomicBoolean;
 +import java.util.concurrent.atomic.AtomicLong;
 +
 +import com.google.common.annotations.VisibleForTesting;
 +import com.google.common.base.Predicate;
 +import com.google.common.collect.Iterators;
 +import com.google.common.collect.Ordering;
 +import com.google.common.primitives.Longs;
 +import com.google.common.util.concurrent.RateLimiter;
 +
 +import com.clearspring.analytics.stream.cardinality.CardinalityMergeException;
 +import com.clearspring.analytics.stream.cardinality.HyperLogLogPlus;
 +import com.clearspring.analytics.stream.cardinality.ICardinality;
 +import org.apache.cassandra.cache.CachingOptions;
 +import org.apache.cassandra.cache.InstrumentingCache;
 +import org.apache.cassandra.cache.KeyCacheKey;
 +import org.apache.cassandra.concurrent.DebuggableThreadPoolExecutor;
 +import org.apache.cassandra.concurrent.ScheduledExecutors;
 +import org.apache.cassandra.config.*;
 +import org.apache.cassandra.db.*;
 +import org.apache.cassandra.db.columniterator.OnDiskAtomIterator;
 +import org.apache.cassandra.db.commitlog.ReplayPosition;
 +import org.apache.cassandra.db.composites.CellName;
 +import org.apache.cassandra.db.filter.ColumnSlice;
 +import org.apache.cassandra.db.index.SecondaryIndex;
 +import org.apache.cassandra.db.lifecycle.Tracker;
 +import org.apache.cassandra.dht.*;
 +import org.apache.cassandra.io.compress.CompressionMetadata;
 +import org.apache.cassandra.io.sstable.*;
 +import org.apache.cassandra.io.sstable.metadata.*;
 +import org.apache.cassandra.io.util.*;
 +import org.apache.cassandra.metrics.RestorableMeter;
 +import org.apache.cassandra.metrics.StorageMetrics;
 +import org.apache.cassandra.service.ActiveRepairService;
 +import org.apache.cassandra.service.CacheService;
 +import org.apache.cassandra.service.StorageService;
 +import org.apache.cassandra.utils.*;
 +import org.apache.cassandra.utils.concurrent.OpOrder;
 +import org.slf4j.Logger;
 +import org.slf4j.LoggerFactory;
 +import org.apache.cassandra.utils.concurrent.Ref;
 +import org.apache.cassandra.utils.concurrent.SelfRefCounted;
 +
 +import static 
org.apache.cassandra.db.Directories.SECONDARY_INDEX_NAME_SEPARATOR;
 +
 +/**
 + * An SSTableReader can be constructed in a number of places, but typically 
is either
 + * read from disk at startup, or constructed from a flushed memtable, or 
after compaction
 + * to replace some existing sstables. However once created, an sstablereader 
may also be modified.
 + *
 + * A reader's OpenReason describes its current stage in its lifecycle, as 
follows:
 + * 
 + * 
 + * pre {@code
 + * NORMAL
 + * From:   None= Reader has been read from disk, either at 
startup or from a flushed memtable
 + * EARLY   = Reader is the final result of a compaction
 + * MOVED_START = Reader WAS being compacted, but this failed and 
it has been restored to NORMAL status
 + *
 + * EARLY
 + * From:   None= Reader is a compaction replacement that is 
either incomplete and has been opened
 + *to represent its partial result status, or has 
been finished but the compaction
 + *it is a part of has not yet completed fully
 + * EARLY   = Same as from None, only it is not the first 
time it has been
 + *
 + * MOVED_START
 + * From:   NORMAL  = Reader is being compacted. This compaction has 
not finished, but the compaction result
 + *

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

2015-06-02 Thread slebresne
http://git-wip-us.apache.org/repos/asf/cassandra/blob/a30d8bd2/src/java/org/apache/cassandra/io/sstable/format/SSTableReader.java
--
diff --cc src/java/org/apache/cassandra/io/sstable/format/SSTableReader.java
index ba634b6,000..f4a59a2
mode 100644,00..100644
--- a/src/java/org/apache/cassandra/io/sstable/format/SSTableReader.java
+++ b/src/java/org/apache/cassandra/io/sstable/format/SSTableReader.java
@@@ -1,2142 -1,0 +1,2175 @@@
 +/*
 + * Licensed to the Apache Software Foundation (ASF) under one
 + * or more contributor license agreements.  See the NOTICE file
 + * distributed with this work for additional information
 + * regarding copyright ownership.  The ASF licenses this file
 + * to you under the Apache License, Version 2.0 (the
 + * License); you may not use this file except in compliance
 + * with the License.  You may obtain a copy of the License at
 + *
 + * http://www.apache.org/licenses/LICENSE-2.0
 + *
 + * Unless required by applicable law or agreed to in writing, software
 + * distributed under the License is distributed on an AS IS BASIS,
 + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 + * See the License for the specific language governing permissions and
 + * limitations under the License.
 + */
 +package org.apache.cassandra.io.sstable.format;
 +
 +import java.io.*;
 +import java.nio.ByteBuffer;
 +import java.util.*;
 +import java.util.concurrent.*;
 +import java.util.concurrent.atomic.AtomicBoolean;
 +import java.util.concurrent.atomic.AtomicLong;
 +
 +import com.google.common.annotations.VisibleForTesting;
 +import com.google.common.base.Predicate;
 +import com.google.common.collect.Iterators;
 +import com.google.common.collect.Ordering;
 +import com.google.common.primitives.Longs;
 +import com.google.common.util.concurrent.RateLimiter;
 +
 +import com.clearspring.analytics.stream.cardinality.CardinalityMergeException;
 +import com.clearspring.analytics.stream.cardinality.HyperLogLogPlus;
 +import com.clearspring.analytics.stream.cardinality.ICardinality;
 +import org.apache.cassandra.cache.CachingOptions;
 +import org.apache.cassandra.cache.InstrumentingCache;
 +import org.apache.cassandra.cache.KeyCacheKey;
 +import org.apache.cassandra.concurrent.DebuggableThreadPoolExecutor;
 +import org.apache.cassandra.concurrent.ScheduledExecutors;
 +import org.apache.cassandra.config.*;
 +import org.apache.cassandra.db.*;
 +import org.apache.cassandra.db.columniterator.OnDiskAtomIterator;
 +import org.apache.cassandra.db.commitlog.ReplayPosition;
 +import org.apache.cassandra.db.composites.CellName;
 +import org.apache.cassandra.db.filter.ColumnSlice;
 +import org.apache.cassandra.db.index.SecondaryIndex;
 +import org.apache.cassandra.db.lifecycle.Tracker;
 +import org.apache.cassandra.dht.*;
 +import org.apache.cassandra.io.compress.CompressionMetadata;
 +import org.apache.cassandra.io.sstable.*;
 +import org.apache.cassandra.io.sstable.metadata.*;
 +import org.apache.cassandra.io.util.*;
 +import org.apache.cassandra.metrics.RestorableMeter;
 +import org.apache.cassandra.metrics.StorageMetrics;
 +import org.apache.cassandra.service.ActiveRepairService;
 +import org.apache.cassandra.service.CacheService;
 +import org.apache.cassandra.service.StorageService;
 +import org.apache.cassandra.utils.*;
 +import org.apache.cassandra.utils.concurrent.OpOrder;
 +import org.slf4j.Logger;
 +import org.slf4j.LoggerFactory;
 +import org.apache.cassandra.utils.concurrent.Ref;
 +import org.apache.cassandra.utils.concurrent.SelfRefCounted;
 +
 +import static 
org.apache.cassandra.db.Directories.SECONDARY_INDEX_NAME_SEPARATOR;
 +
 +/**
 + * An SSTableReader can be constructed in a number of places, but typically 
is either
 + * read from disk at startup, or constructed from a flushed memtable, or 
after compaction
 + * to replace some existing sstables. However once created, an sstablereader 
may also be modified.
 + *
 + * A reader's OpenReason describes its current stage in its lifecycle, as 
follows:
 + * 
 + * 
 + * pre {@code
 + * NORMAL
 + * From:   None= Reader has been read from disk, either at 
startup or from a flushed memtable
 + * EARLY   = Reader is the final result of a compaction
 + * MOVED_START = Reader WAS being compacted, but this failed and 
it has been restored to NORMAL status
 + *
 + * EARLY
 + * From:   None= Reader is a compaction replacement that is 
either incomplete and has been opened
 + *to represent its partial result status, or has 
been finished but the compaction
 + *it is a part of has not yet completed fully
 + * EARLY   = Same as from None, only it is not the first 
time it has been
 + *
 + * MOVED_START
 + * From:   NORMAL  = Reader is being compacted. This compaction has 
not finished, but the compaction result
 + *