[42/50] [abbrv] cassandra git commit: Merge branch 'cassandra-2.1' into cassandra-2.2

2016-09-19 Thread zznate
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/465496f3
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/465496f3
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/465496f3

Branch: refs/heads/cassandra-2.2
Commit: 465496f3a356f44d3754adbc1cbe305100854956
Parents: ad4a91d 6fb89b9
Author: Nate McCall 
Authored: Tue Sep 20 14:10:10 2016 +1200
Committer: Nate McCall 
Committed: Tue Sep 20 14:11:33 2016 +1200

--
 CHANGES.txt   | 3 ++-
 .../org/apache/cassandra/transport/RequestThreadPoolExecutor.java | 2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/465496f3/CHANGES.txt
--
diff --cc CHANGES.txt
index fae713e,1438e98..6c5fded
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,33 -1,7 +1,34 @@@
 -2.1.16
 +2.2.8
 + * Add local address entry in PropertyFileSnitch (CASSANDRA-11332)
 + * cqlshlib tests: increase default execute timeout (CASSANDRA-12481)
 + * Forward writes to replacement node when replace_address != 
broadcast_address (CASSANDRA-8523)
 + * Enable repair -pr and -local together (fix regression of CASSANDRA-7450) 
(CASSANDRA-12522)
 + * Fail repair on non-existing table (CASSANDRA-12279)
 + * cqlsh copy: fix missing counter values (CASSANDRA-12476)
 + * Move migration tasks to non-periodic queue, assure flush executor shutdown 
after non-periodic executor (CASSANDRA-12251)
 + * cqlsh copy: fixed possible race in initializing feeding thread 
(CASSANDRA-11701)
 + * Only set broadcast_rpc_address on Ec2MultiRegionSnitch if it's not set 
(CASSANDRA-11357)
 + * Update StorageProxy range metrics for timeouts, failures and unavailables 
(CASSANDRA-9507)
 + * Add Sigar to classes included in clientutil.jar (CASSANDRA-11635)
 + * Add decay to histograms and timers used for metrics (CASSANDRA-11752)
 + * Fix hanging stream session (CASSANDRA-10992)
 + * Add byteman support for testing (CASSANDRA-12377)
 + * Fix INSERT JSON, fromJson() support of smallint, tinyint types 
(CASSANDRA-12371)
 + * Restore JVM metric export for metric reporters (CASSANDRA-12312)
 + * Release sstables of failed stream sessions only when outgoing transfers 
are finished (CASSANDRA-11345)
 + * Revert CASSANDRA-11427 (CASSANDRA-12351)
 + * Wait for tracing events before returning response and query at same 
consistency level client side (CASSANDRA-11465)
 + * cqlsh copyutil should get host metadata by connected address 
(CASSANDRA-11979)
 + * Fixed cqlshlib.test.remove_test_db (CASSANDRA-12214)
 + * Synchronize ThriftServer::stop() (CASSANDRA-12105)
 + * Use dedicated thread for JMX notifications (CASSANDRA-12146)
 + * NPE when trying to remove purgable tombstones from result (CASSANDRA-12143)
 + * Improve streaming synchronization and fault tolerance (CASSANDRA-11414)
 + * MemoryUtil.getShort() should return an unsigned short also for 
architectures not supporting unaligned memory accesses (CASSANDRA-11973)
 + * Don't write shadowed range tombstone (CASSANDRA-12030)
 +Merged from 2.1:
-  * Fix queries with empty ByteBuffer values in clustering column restrictions 
(CASSANDRA-12127)
+  * Add system property to set the max number of native transport requests in 
queue (CASSANDRA-11363)
 - * Include column family parameter when -st and -et are provided 
(CASSANDRA-11866)
+  * Fix queries with empty ByteBuffer values in clustering column restrictions 
(CASSANDRA-12127) 
   * Disable passing control to post-flush after flush failure to prevent data 
loss (CASSANDRA-11828)
   * Allow STCS-in-L0 compactions to reduce scope with LCS (CASSANDRA-12040)
   * cannot use cql since upgrading python to 2.7.11+ (CASSANDRA-11850)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/465496f3/src/java/org/apache/cassandra/transport/RequestThreadPoolExecutor.java
--
diff --cc src/java/org/apache/cassandra/transport/RequestThreadPoolExecutor.java
index 289f3e3,75b983a..75dd05d
--- a/src/java/org/apache/cassandra/transport/RequestThreadPoolExecutor.java
+++ b/src/java/org/apache/cassandra/transport/RequestThreadPoolExecutor.java
@@@ -30,12 -30,12 +30,12 @@@ import static org.apache.cassandra.conc
  
  public class RequestThreadPoolExecutor extends AbstractEventExecutor
  {
- private final static int MAX_QUEUED_REQUESTS = 128;
+ private final static int MAX_QUEUED_REQUESTS = 
Integer.getInteger("cassandra.max_queued_native_transport_requests", 128);
  private final static String THREAD_FACTORY_ID = 
"Native-Transport-Requests";
 -private final TracingAwareExecutorService 

[42/50] [abbrv] cassandra git commit: Merge branch cassandra-2.1 into cassandra-2.2

2016-08-16 Thread mshuler
http://git-wip-us.apache.org/repos/asf/cassandra/blob/9583b6b3/test/unit/org/apache/cassandra/cql3/restrictions/PrimaryKeyRestrictionSetTest.java
--
diff --cc 
test/unit/org/apache/cassandra/cql3/restrictions/PrimaryKeyRestrictionSetTest.java
index bf5128f,000..bd5395a
mode 100644,00..100644
--- 
a/test/unit/org/apache/cassandra/cql3/restrictions/PrimaryKeyRestrictionSetTest.java
+++ 
b/test/unit/org/apache/cassandra/cql3/restrictions/PrimaryKeyRestrictionSetTest.java
@@@ -1,1957 -1,0 +1,1957 @@@
 +/*
 + * 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.ArrayList;
 +import java.util.List;
 +
 +import org.junit.Test;
 +
 +import org.apache.cassandra.config.CFMetaData;
 +import org.apache.cassandra.config.ColumnDefinition;
 +import org.apache.cassandra.cql3.*;
 +import org.apache.cassandra.cql3.Term.MultiItemTerminal;
 +import org.apache.cassandra.cql3.statements.Bound;
 +import org.apache.cassandra.db.ColumnFamilyType;
 +import org.apache.cassandra.db.composites.Composite;
 +import org.apache.cassandra.db.composites.Composite.EOC;
 +import org.apache.cassandra.db.composites.Composites;
 +import org.apache.cassandra.db.composites.CompoundSparseCellNameType;
 +import org.apache.cassandra.db.marshal.AbstractType;
 +import org.apache.cassandra.db.marshal.Int32Type;
 +import org.apache.cassandra.db.marshal.ReversedType;
 +import org.apache.cassandra.utils.ByteBufferUtil;
 +
 +import static java.util.Arrays.asList;
 +import static org.junit.Assert.assertEquals;
 +import static org.junit.Assert.assertTrue;
 +
 +public class PrimaryKeyRestrictionSetTest
 +{
 +@Test
 +public void testBoundsAsCompositesWithNoRestrictions()
 +{
 +CFMetaData cfMetaData = newCFMetaData(Sort.ASC);
 +
 +PrimaryKeyRestrictions restrictions = new 
PrimaryKeyRestrictionSet(cfMetaData.comparator);
 +
- List bounds = restrictions.boundsAsComposites(Bound.START, 
QueryOptions.DEFAULT);
++List bounds = restrictions.boundsAsComposites(cfMetaData, 
Bound.START, QueryOptions.DEFAULT);
 +assertEquals(1, bounds.size());
 +assertEmptyComposite(bounds.get(0));
 +
- bounds = restrictions.boundsAsComposites(Bound.END, 
QueryOptions.DEFAULT);
++bounds = restrictions.boundsAsComposites(cfMetaData, Bound.END, 
QueryOptions.DEFAULT);
 +assertEquals(1, bounds.size());
 +assertEmptyComposite(bounds.get(0));
 +}
 +
 +/**
 + * Test 'clustering_0 = 1' with only one clustering column
 + */
 +@Test
 +public void 
testBoundsAsCompositesWithOneEqRestrictionsAndOneClusteringColumn()
 +{
 +CFMetaData cfMetaData = newCFMetaData(Sort.ASC);
 +
 +ByteBuffer clustering_0 = ByteBufferUtil.bytes(1);
 +Restriction eq = newSingleEq(cfMetaData, 0, clustering_0);
 +
 +PrimaryKeyRestrictions restrictions = new 
PrimaryKeyRestrictionSet(cfMetaData.comparator);
 +restrictions = restrictions.mergeWith(eq);
 +
- List bounds = restrictions.boundsAsComposites(Bound.START, 
QueryOptions.DEFAULT);
++List bounds = restrictions.boundsAsComposites(cfMetaData, 
Bound.START, QueryOptions.DEFAULT);
 +assertEquals(1, bounds.size());
 +assertComposite(bounds.get(0), clustering_0, EOC.START);
 +
- bounds = restrictions.boundsAsComposites(Bound.END, 
QueryOptions.DEFAULT);
++bounds = restrictions.boundsAsComposites(cfMetaData, Bound.END, 
QueryOptions.DEFAULT);
 +assertEquals(1, bounds.size());
 +assertComposite(bounds.get(0), clustering_0, EOC.END);
 +}
 +
 +/**
 + * Test 'clustering_1 = 1' with 2 clustering columns
 + */
 +@Test
 +public void 
testBoundsAsCompositesWithOneEqRestrictionsAndTwoClusteringColumns()
 +{
 +CFMetaData cfMetaData = newCFMetaData(Sort.ASC, Sort.ASC);
 +
 +ByteBuffer clustering_0 = ByteBufferUtil.bytes(1);
 +Restriction eq = newSingleEq(cfMetaData, 0, clustering_0);
 +
 +PrimaryKeyRestrictions restrictions = new