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

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

Branch: refs/heads/cassandra-2.2
Commit: 2d462c04973a15e84ca550ce3913d08d7c5ee8c8
Parents: 1eda7cb 0ef1888
Author: Sylvain Lebresne sylv...@datastax.com
Authored: Fri Jul 17 15:36:24 2015 +0200
Committer: Sylvain Lebresne sylv...@datastax.com
Committed: Fri Jul 17 15:36:24 2015 +0200

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


http://git-wip-us.apache.org/repos/asf/cassandra/blob/2d462c04/CHANGES.txt
--
diff --cc CHANGES.txt
index 49cc850,f20fad8..c6774c2
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,32 -1,7 +1,32 @@@
 -2.0.17
 +2.1.9
 + * 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)
 + * Fix growing pending background compaction (CASSANDRA-9662)
 +
 +
 +2.1.8
 + * (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)
 + * Update internal python driver for cqlsh (CASSANDRA-9064)
 + * 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)
 + * ColumnFamilyStore.selectAndReference may block during compaction 
(CASSANDRA-9637)
 +Merged from 2.0:
   * Avoid NPE in AuthSuccess#decode (CASSANDRA-9727)
   * Add listen_address to system.local (CASSANDRA-9603)
   * Bug fixes to resultset metadata construction (CASSANDRA-9636)



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

2015-04-15 Thread brandonwilliams
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/730d4d4c
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/730d4d4c
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/730d4d4c

Branch: refs/heads/trunk
Commit: 730d4d4c4a324d598eb90fee584789d071851b6d
Parents: f7884c5 e3e2de0
Author: Brandon Williams brandonwilli...@apache.org
Authored: Wed Apr 15 10:11:58 2015 -0500
Committer: Brandon Williams brandonwilli...@apache.org
Committed: Wed Apr 15 10:11:58 2015 -0500

--
 src/java/org/apache/cassandra/gms/Gossiper.java | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/730d4d4c/src/java/org/apache/cassandra/gms/Gossiper.java
--



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

2015-03-24 Thread jmckenzie
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/5639eac1
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/5639eac1
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/5639eac1

Branch: refs/heads/trunk
Commit: 5639eac1af7b24a3a0584b2a8dc25d8d3d7aa1f2
Parents: 9ff8270 f5f97d8
Author: Joshua McKenzie jmcken...@apache.org
Authored: Tue Mar 24 13:20:17 2015 -0500
Committer: Joshua McKenzie jmcken...@apache.org
Committed: Tue Mar 24 13:20:17 2015 -0500

--

--




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

2015-03-05 Thread tylerhobbs
http://git-wip-us.apache.org/repos/asf/cassandra/blob/9c7a601b/test/unit/org/apache/cassandra/cql3/statements/SelectStatementTest.java
--
diff --cc 
test/unit/org/apache/cassandra/cql3/statements/SelectStatementTest.java
index 000,1a66002..2a1330d
mode 00,100644..100644
--- a/test/unit/org/apache/cassandra/cql3/statements/SelectStatementTest.java
+++ b/test/unit/org/apache/cassandra/cql3/statements/SelectStatementTest.java
@@@ -1,0 -1,973 +1,965 @@@
+ /*
+  * 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.statements;
+ 
+ import java.nio.ByteBuffer;
+ import java.util.ArrayList;
 -import java.util.Collections;
+ 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.CFDefinition.Name;
++import org.apache.cassandra.cql3.Term.MultiItemTerminal;
+ 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.CompositeType;
+ import org.apache.cassandra.db.marshal.Int32Type;
 -import org.apache.cassandra.exceptions.ConfigurationException;
+ import org.apache.cassandra.exceptions.InvalidRequestException;
+ import org.apache.cassandra.utils.ByteBufferUtil;
+ 
 -import static org.junit.Assert.assertArrayEquals;
 -
+ import static java.util.Arrays.asList;
+ import static org.junit.Assert.assertEquals;
+ 
+ public class SelectStatementTest
+ {
+ @Test
 -public void testBuildBoundWithNoRestrictions() throws Exception
++public void testBuildBoundWithNoRestrictions() throws 
InvalidRequestException
+ {
+ Restriction[] restrictions = new Restriction[2];
 -CFDefinition cfDef = createCFDefinition(restrictions.length);
+ 
 -ListByteBuffer bounds = executeBuildBound(cfDef, restrictions, 
Bound.START);
++ListComposite bounds = executeBuildBound(restrictions, Bound.START);
+ assertEquals(1, bounds.size());
 -assertComposite(cfDef, bounds.get(0));
++assertEmptyComposite(bounds.get(0));
+ 
 -bounds = executeBuildBound(cfDef, restrictions, Bound.END);
++bounds = executeBuildBound(restrictions, Bound.END);
+ assertEquals(1, bounds.size());
 -assertComposite(cfDef, bounds.get(0));
++assertEmptyComposite(bounds.get(0));
+ }
+ 
+ /**
+  * Test 'clustering_0 = 1' with only one clustering column
+  */
+ @Test
 -public void testBuildBoundWithOneEqRestrictionsAndOneClusteringColumn() 
throws Exception
++public void testBuildBoundWithOneEqRestrictionsAndOneClusteringColumn() 
throws InvalidRequestException
+ {
+ ByteBuffer clustering_0 = ByteBufferUtil.bytes(1);
+ SingleColumnRestriction.EQ eq = new 
SingleColumnRestriction.EQ(toTerm(clustering_0), false);
+ Restriction[] restrictions = new Restriction[] { eq };
 -CFDefinition cfDef = createCFDefinition(restrictions.length);
+ 
 -ListByteBuffer bounds = executeBuildBound(cfDef, restrictions, 
Bound.START);
++ListComposite bounds = executeBuildBound(restrictions, Bound.START);
+ assertEquals(1, bounds.size());
 -assertComposite(cfDef, bounds.get(0), clustering_0);
++assertComposite(bounds.get(0), clustering_0, EOC.START);
+ 
 -bounds = executeBuildBound(cfDef, restrictions, Bound.END);
++bounds = executeBuildBound(restrictions, Bound.END);
+ assertEquals(1, bounds.size());
 -assertComposite(cfDef, bounds.get(0), clustering_0);
++assertComposite(bounds.get(0), clustering_0, EOC.END);
+ }
+ 
+ /**
+  * Test 'clustering_1 = 1' with 2 clustering columns
+  */
+ @Test
 -public void testBuildBoundWithOneEqRestrictionsAndTwoClusteringColumns() 
throws 

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

2015-03-03 Thread yukim
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/2d1e46e4
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/2d1e46e4
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/2d1e46e4

Branch: refs/heads/trunk
Commit: 2d1e46e40a2c9205ab42ebe5bddfd2bc3837f719
Parents: bef1d0c e7d802e
Author: Yuki Morishita yu...@apache.org
Authored: Tue Mar 3 17:13:06 2015 -0600
Committer: Yuki Morishita yu...@apache.org
Committed: Tue Mar 3 17:13:06 2015 -0600

--
 .../cassandra/db/compaction/LongCompactionsTest.java  | 14 --
 1 file changed, 12 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/2d1e46e4/test/long/org/apache/cassandra/db/compaction/LongCompactionsTest.java
--
diff --cc test/long/org/apache/cassandra/db/compaction/LongCompactionsTest.java
index 94bc09f,a21cee5..e87e336
--- a/test/long/org/apache/cassandra/db/compaction/LongCompactionsTest.java
+++ b/test/long/org/apache/cassandra/db/compaction/LongCompactionsTest.java
@@@ -99,7 -108,8 +108,8 @@@ public class LongCompactionsTest extend
  
  long start = System.nanoTime();
  final int gcBefore = (int) (System.currentTimeMillis() / 1000) - 
Schema.instance.getCFMetaData(KEYSPACE1, Standard1).getGcGraceSeconds();
+ assert store.getDataTracker().markCompacting(sstables): Cannot 
markCompacting all sstables;
 -new CompactionTask(store, sstables, gcBefore).execute(null);
 +new CompactionTask(store, sstables, gcBefore, false).execute(null);
  System.out.println(String.format(%s: sstables=%d rowsper=%d 
colsper=%d: %d ms,
   this.getClass().getName(),
   sstableCount,



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

2015-02-13 Thread benedict
Merge branch 'cassandra-2.0' into cassandra-2.1

Conflicts:
CHANGES.txt
src/java/org/apache/cassandra/io/sstable/SSTableReader.java
src/java/org/apache/cassandra/io/sstable/SSTableWriter.java


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

Branch: refs/heads/trunk
Commit: d6200a80164c4214f71508929dd529c4c6ec4ec3
Parents: 056f627 c14a7d5
Author: Benedict Elliott Smith bened...@apache.org
Authored: Fri Feb 13 10:12:15 2015 +
Committer: Benedict Elliott Smith bened...@apache.org
Committed: Fri Feb 13 10:12:15 2015 +

--
 CHANGES.txt| 1 +
 .../apache/cassandra/io/sstable/SSTableSimpleUnsortedWriter.java   | 2 +-
 src/java/org/apache/cassandra/io/sstable/SSTableSimpleWriter.java  | 2 +-
 3 files changed, 3 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/d6200a80/CHANGES.txt
--
diff --cc CHANGES.txt
index 81785e2,096e630..bca3dc8
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,119 -1,12 +1,120 @@@
 -2.0.13:
 +2.1.4
 + * 'nodetool info' prints exception against older node (CASSANDRA-8796)
 + * Ensure SSTableReader.last corresponds exactly with the file end 
(CASSANDRA-8750)
 + * Make SSTableWriter.openEarly more robust and obvious (CASSANDRA-8747)
 + * Enforce SSTableReader.first/last (CASSANDRA-8744)
 + * Cleanup SegmentedFile API (CASSANDRA-8749)
 + * Avoid overlap with early compaction replacement (CASSANDRA-8683)
 + * Safer Resource Management++ (CASSANDRA-8707)
 + * Write partition size estimates into a system table (CASSANDRA-7688)
 + * cqlsh: Fix keys() and full() collection indexes in DESCRIBE output
 +   (CASSANDRA-8154)
 +Merged from 2.0:
 + * Fix some multi-column relations with indexes on some clustering
 +   columns (CASSANDRA-8275)
+  * Fix memory leak in SSTableSimple*Writer and SSTableReader.validate() 
(CASSANDRA-8748)
   * Throw OOM if allocating memory fails to return a valid pointer 
(CASSANDRA-8726)
   * Fix SSTableSimpleUnsortedWriter ConcurrentModificationException 
(CASSANDRA-8619)
 - * Round up time deltas lower than 1ms in BulkLoader (CASSANDRA-8645)
 - * Add batch remove iterator to ABSC (CASSANDRA-8414, 8666)
  
  
 -2.0.12:
 +2.1.3
 + * Fix HSHA/offheap_objects corruption (CASSANDRA-8719)
 + * Upgrade libthrift to 0.9.2 (CASSANDRA-8685)
 + * Don't use the shared ref in sstableloader (CASSANDRA-8704)
 + * Purge internal prepared statements if related tables or
 +   keyspaces are dropped (CASSANDRA-8693)
 + * (cqlsh) Handle unicode BOM at start of files (CASSANDRA-8638)
 + * Stop compactions before exiting offline tools (CASSANDRA-8623)
 + * Update tools/stress/README.txt to match current behaviour (CASSANDRA-7933)
 + * Fix schema from Thrift conversion with empty metadata (CASSANDRA-8695)
 + * Safer Resource Management (CASSANDRA-7705)
 + * Make sure we compact highly overlapping cold sstables with
 +   STCS (CASSANDRA-8635)
 + * rpc_interface and listen_interface generate NPE on startup when specified
 +   interface doesn't exist (CASSANDRA-8677)
 + * Fix ArrayIndexOutOfBoundsException in nodetool cfhistograms 
(CASSANDRA-8514)
 + * Switch from yammer metrics for nodetool cf/proxy histograms 
(CASSANDRA-8662)
 + * Make sure we don't add tmplink files to the compaction
 +   strategy (CASSANDRA-8580)
 + * (cqlsh) Handle maps with blob keys (CASSANDRA-8372)
 + * (cqlsh) Handle DynamicCompositeType schemas correctly (CASSANDRA-8563)
 + * Duplicate rows returned when in clause has repeated values (CASSANDRA-6706)
 + * Add tooling to detect hot partitions (CASSANDRA-7974)
 + * Fix cassandra-stress user-mode truncation of partition generation 
(CASSANDRA-8608)
 + * Only stream from unrepaired sstables during inc repair (CASSANDRA-8267)
 + * Don't allow starting multiple inc repairs on the same sstables 
(CASSANDRA-8316)
 + * Invalidate prepared BATCH statements when related tables
 +   or keyspaces are dropped (CASSANDRA-8652)
 + * Fix missing results in secondary index queries on collections
 +   with ALLOW FILTERING (CASSANDRA-8421)
 + * Expose EstimatedHistogram metrics for range slices (CASSANDRA-8627)
 + * (cqlsh) Escape clqshrc passwords properly (CASSANDRA-8618)
 + * Fix NPE when passing wrong argument in ALTER TABLE statement 
(CASSANDRA-8355)
 + * Pig: Refactor and deprecate CqlStorage (CASSANDRA-8599)
 + * Don't reuse the same cleanup strategy for all sstables (CASSANDRA-8537)
 + * Fix case-sensitivity of index name on CREATE and DROP INDEX
 +   statements (CASSANDRA-8365)
 + * Better detection/logging for corruption in compressed 

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

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

Branch: refs/heads/trunk
Commit: bf43534dcc77f923debf2af5086f5ca34ef1b34b
Parents: 4b05b20 a72869c
Author: Benedict Elliott Smith bened...@apache.org
Authored: Wed Feb 11 16:07:31 2015 +
Committer: Benedict Elliott Smith bened...@apache.org
Committed: Wed Feb 11 16:07:31 2015 +

--
 CHANGES.txt   | 2 ++
 src/java/org/apache/cassandra/io/util/Memory.java | 4 +++-
 2 files changed, 5 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/bf43534d/CHANGES.txt
--
diff --cc CHANGES.txt
index b2f894e,d2e..2466b19
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,114 -1,11 +1,116 @@@
 -2.0.13:
 +2.1.4
 + * Enforce SSTableReader.first/last (CASSANDRA-8744)
 + * Cleanup SegmentedFile API (CASSANDRA-8749)
 + * Avoid overlap with early compaction replacement (CASSANDRA-8683)
 + * Safer Resource Management++ (CASSANDRA-8707)
 + * Write partition size estimates into a system table (CASSANDRA-7688)
 + * cqlsh: Fix keys() and full() collection indexes in DESCRIBE output
 +   (CASSANDRA-8154)
 +Merged from 2.0:
 + * Fix some multi-column relations with indexes on some clustering
 +   columns (CASSANDRA-8275)
+  * Throw OOM if allocating memory fails to return a valid pointer 
(CASSANDRA-8726)
+  * Fix SSTableSimpleUnsortedWriter ConcurrentModificationException 
(CASSANDRA-8619)
 - * Round up time deltas lower than 1ms in BulkLoader (CASSANDRA-8645)
 - * Add batch remove iterator to ABSC (CASSANDRA-8414, 8666)
  
  
 -2.0.12:
 +2.1.3
 + * Fix HSHA/offheap_objects corruption (CASSANDRA-8719)
 + * Upgrade libthrift to 0.9.2 (CASSANDRA-8685)
 + * Don't use the shared ref in sstableloader (CASSANDRA-8704)
 + * Purge internal prepared statements if related tables or
 +   keyspaces are dropped (CASSANDRA-8693)
 + * (cqlsh) Handle unicode BOM at start of files (CASSANDRA-8638)
 + * Stop compactions before exiting offline tools (CASSANDRA-8623)
 + * Update tools/stress/README.txt to match current behaviour (CASSANDRA-7933)
 + * Fix schema from Thrift conversion with empty metadata (CASSANDRA-8695)
 + * Safer Resource Management (CASSANDRA-7705)
 + * Make sure we compact highly overlapping cold sstables with
 +   STCS (CASSANDRA-8635)
 + * rpc_interface and listen_interface generate NPE on startup when specified
 +   interface doesn't exist (CASSANDRA-8677)
 + * Fix ArrayIndexOutOfBoundsException in nodetool cfhistograms 
(CASSANDRA-8514)
 + * Switch from yammer metrics for nodetool cf/proxy histograms 
(CASSANDRA-8662)
 + * Make sure we don't add tmplink files to the compaction
 +   strategy (CASSANDRA-8580)
 + * (cqlsh) Handle maps with blob keys (CASSANDRA-8372)
 + * (cqlsh) Handle DynamicCompositeType schemas correctly (CASSANDRA-8563)
 + * Duplicate rows returned when in clause has repeated values (CASSANDRA-6706)
 + * Add tooling to detect hot partitions (CASSANDRA-7974)
 + * Fix cassandra-stress user-mode truncation of partition generation 
(CASSANDRA-8608)
 + * Only stream from unrepaired sstables during inc repair (CASSANDRA-8267)
 + * Don't allow starting multiple inc repairs on the same sstables 
(CASSANDRA-8316)
 + * Invalidate prepared BATCH statements when related tables
 +   or keyspaces are dropped (CASSANDRA-8652)
 + * Fix missing results in secondary index queries on collections
 +   with ALLOW FILTERING (CASSANDRA-8421)
 + * Expose EstimatedHistogram metrics for range slices (CASSANDRA-8627)
 + * (cqlsh) Escape clqshrc passwords properly (CASSANDRA-8618)
 + * Fix NPE when passing wrong argument in ALTER TABLE statement 
(CASSANDRA-8355)
 + * Pig: Refactor and deprecate CqlStorage (CASSANDRA-8599)
 + * Don't reuse the same cleanup strategy for all sstables (CASSANDRA-8537)
 + * Fix case-sensitivity of index name on CREATE and DROP INDEX
 +   statements (CASSANDRA-8365)
 + * Better detection/logging for corruption in compressed sstables 
(CASSANDRA-8192)
 + * Use the correct repairedAt value when closing writer (CASSANDRA-8570)
 + * (cqlsh) Handle a schema mismatch being detected on startup (CASSANDRA-8512)
 + * Properly calculate expected write size during compaction (CASSANDRA-8532)
 + * Invalidate affected prepared statements when a table's columns
 +   are altered (CASSANDRA-7910)
 + * Stress - user defined writes should populate sequentally (CASSANDRA-8524)
 + * Fix regression in SSTableRewriter causing some rows to become unreadable 
 +   during compaction (CASSANDRA-8429)
 + * Run 

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

2014-11-27 Thread aleksey
http://git-wip-us.apache.org/repos/asf/cassandra/blob/9aaea248/src/java/org/apache/cassandra/tools/NodeTool.java
--
diff --cc src/java/org/apache/cassandra/tools/NodeTool.java
index 1db0245,000..fe4535b
mode 100644,00..100644
--- a/src/java/org/apache/cassandra/tools/NodeTool.java
+++ b/src/java/org/apache/cassandra/tools/NodeTool.java
@@@ -1,2476 -1,0 +1,2516 @@@
 +/*
 + * 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.tools;
 +
 +import java.io.*;
 +import java.lang.management.MemoryUsage;
 +import java.net.InetAddress;
 +import java.net.UnknownHostException;
 +import java.text.DecimalFormat;
 +import java.text.SimpleDateFormat;
 +import java.util.*;
 +import java.util.Map.Entry;
 +import java.util.concurrent.ExecutionException;
 +
 +import javax.management.openmbean.TabularData;
 +
 +import com.google.common.base.Joiner;
 +import com.google.common.base.Throwables;
 +import com.google.common.collect.ArrayListMultimap;
 +import com.google.common.collect.LinkedHashMultimap;
 +import com.google.common.collect.Maps;
 +import com.yammer.metrics.reporting.JmxReporter;
 +
 +import io.airlift.command.*;
 +
 +import org.apache.cassandra.concurrent.JMXEnabledThreadPoolExecutorMBean;
 +import org.apache.cassandra.config.Schema;
 +import org.apache.cassandra.db.ColumnFamilyStoreMBean;
 +import org.apache.cassandra.db.Keyspace;
 +import org.apache.cassandra.db.compaction.CompactionManagerMBean;
 +import org.apache.cassandra.db.compaction.OperationType;
 +import org.apache.cassandra.io.util.FileUtils;
 +import org.apache.cassandra.locator.EndpointSnitchInfoMBean;
 +import org.apache.cassandra.locator.LocalStrategy;
 +import org.apache.cassandra.net.MessagingServiceMBean;
 +import org.apache.cassandra.repair.RepairParallelism;
 +import org.apache.cassandra.service.CacheServiceMBean;
 +import org.apache.cassandra.streaming.ProgressInfo;
 +import org.apache.cassandra.streaming.SessionInfo;
 +import org.apache.cassandra.streaming.StreamState;
 +import org.apache.cassandra.utils.EstimatedHistogram;
 +import org.apache.cassandra.utils.FBUtilities;
 +import org.apache.cassandra.utils.JVMStabilityInspector;
 +
 +import static com.google.common.base.Preconditions.checkArgument;
 +import static com.google.common.base.Preconditions.checkState;
 +import static com.google.common.base.Throwables.getStackTraceAsString;
 +import static com.google.common.collect.Iterables.toArray;
 +import static com.google.common.collect.Lists.newArrayList;
 +import static java.lang.Integer.parseInt;
 +import static java.lang.String.format;
 +import static org.apache.commons.lang3.ArrayUtils.EMPTY_STRING_ARRAY;
 +import static org.apache.commons.lang3.StringUtils.*;
 +
 +public class NodeTool
 +{
 +private static final String HISTORYFILE = nodetool.history;
 +
 +public static void main(String... args)
 +{
 +ListClass? extends Runnable commands = newArrayList(
 +Help.class,
 +Info.class,
 +Ring.class,
 +NetStats.class,
 +CfStats.class,
 +CfHistograms.class,
 +Cleanup.class,
 +ClearSnapshot.class,
 +Compact.class,
 +Scrub.class,
 +Flush.class,
 +UpgradeSSTable.class,
 +DisableAutoCompaction.class,
 +EnableAutoCompaction.class,
 +CompactionStats.class,
 +CompactionHistory.class,
 +Decommission.class,
 +DescribeCluster.class,
 +DisableBinary.class,
 +EnableBinary.class,
 +EnableGossip.class,
 +DisableGossip.class,
 +EnableHandoff.class,
 +EnableThrift.class,
 +GcStats.class,
 +GetCompactionThreshold.class,
 +GetCompactionThroughput.class,
 +GetStreamThroughput.class,
 +GetEndpoints.class,
 +GetSSTables.class,
 +GossipInfo.class,
 +InvalidateKeyCache.class,
 + 

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

2014-11-19 Thread tylerhobbs
http://git-wip-us.apache.org/repos/asf/cassandra/blob/25a4c9e1/test/unit/org/apache/cassandra/cql3/MultiColumnRelationTest.java
--
diff --cc test/unit/org/apache/cassandra/cql3/MultiColumnRelationTest.java
index bcf4f27,ea4f1a6..4c3ba2a
--- a/test/unit/org/apache/cassandra/cql3/MultiColumnRelationTest.java
+++ b/test/unit/org/apache/cassandra/cql3/MultiColumnRelationTest.java
@@@ -17,522 -17,1234 +17,542 @@@
   */
  package org.apache.cassandra.cql3;
  
 -import org.apache.cassandra.SchemaLoader;
 -import org.apache.cassandra.db.ConsistencyLevel;
 -import org.apache.cassandra.db.marshal.*;
 -import org.apache.cassandra.exceptions.InvalidRequestException;
 -import org.apache.cassandra.exceptions.RequestExecutionException;
 -import org.apache.cassandra.exceptions.RequestValidationException;
 -import org.apache.cassandra.exceptions.SyntaxException;
 -import org.apache.cassandra.gms.Gossiper;
 -import org.apache.cassandra.service.ClientState;
 -import org.apache.cassandra.service.QueryState;
 -import org.apache.cassandra.transport.messages.ResultMessage;
 -import org.apache.cassandra.utils.ByteBufferUtil;
 -import org.apache.cassandra.utils.MD5Digest;
 -import org.junit.AfterClass;
 -import org.junit.BeforeClass;
  import org.junit.Test;
 -import org.slf4j.Logger;
 -import org.slf4j.LoggerFactory;
  
 -import java.nio.ByteBuffer;
 -import java.util.*;
 -
 -import static org.apache.cassandra.cql3.QueryProcessor.process;
 -import static org.apache.cassandra.cql3.QueryProcessor.processInternal;
 -import static org.junit.Assert.assertTrue;
 -import static org.junit.Assert.assertEquals;
 -import static com.google.common.collect.Lists.newArrayList;
 -import static org.junit.Assert.fail;
 -
 -public class MultiColumnRelationTest
 +public class MultiColumnRelationTest extends CQLTester
  {
 -private static final Logger logger = 
LoggerFactory.getLogger(MultiColumnRelationTest.class);
 -static ClientState clientState;
 -static String keyspace = multi_column_relation_test;
 -
 -@BeforeClass
 -public static void setUpClass() throws Throwable
 -{
 -SchemaLoader.loadSchema();
 -executeSchemaChange(CREATE KEYSPACE IF NOT EXISTS %s WITH 
replication = {'class': 'SimpleStrategy', 'replication_factor': '1'});
 -for (boolean isCompact : new boolean[]{false, true})
 -{
 -String tableSuffix = isCompact ? _compact : ;
 -String compactOption = isCompact ?  WITH COMPACT STORAGE : ;
 -
 -executeSchemaChange(
 -CREATE TABLE IF NOT EXISTS %s.single_partition + 
tableSuffix + (a int PRIMARY KEY, b int) + compactOption);
 -executeSchemaChange(
 -CREATE TABLE IF NOT EXISTS %s.compound_partition 
+tableSuffix + (a int, b int, c int, PRIMARY KEY ((a, b))) + compactOption);
 -executeSchemaChange(
 -CREATE TABLE IF NOT EXISTS %s.single_clustering + 
tableSuffix + (a int, b int, c int, PRIMARY KEY (a, b)) + compactOption);
 -executeSchemaChange(
 -CREATE TABLE IF NOT EXISTS %s.multiple_clustering + 
tableSuffix + (a int, b int, c int, d int, PRIMARY KEY (a, b, c, d)) + 
compactOption);
 -
 -compactOption = isCompact ?  COMPACT STORAGE AND  : ;
 -executeSchemaChange(
 -CREATE TABLE IF NOT EXISTS 
%s.multiple_clustering_reversed + tableSuffix +
 -(a int, b int, c int, d int, PRIMARY KEY (a, b, c, 
d)) WITH  + compactOption +  CLUSTERING ORDER BY (b DESC, c ASC, d DESC));
 -}
 -clientState = ClientState.forInternalCalls();
 -}
 -
 -@AfterClass
 -public static void stopGossiper()
 -{
 -Gossiper.instance.stop();
 -}
 -
 -private static void executeSchemaChange(String query) throws Throwable
 -{
 -try
 -{
 -process(String.format(query, keyspace), ConsistencyLevel.ONE);
 -} catch (RuntimeException exc)
 -{
 -throw exc.getCause();
 -}
 -}
 -
 -private static UntypedResultSet execute(String query) throws Throwable
 -{
 -try
 -{
 -return processInternal(String.format(query, keyspace));
 -} catch (RuntimeException exc)
 -{
 -if (exc.getCause() != null)
 -throw exc.getCause();
 -throw exc;
 -}
 -}
 -
 -private MD5Digest prepare(String query) throws RequestValidationException
 -{
 -ResultMessage.Prepared prepared = 
QueryProcessor.prepare(String.format(query, keyspace), clientState, false);
 -return prepared.statementId;
 -}
 -
 -private UntypedResultSet executePrepared(MD5Digest statementId, 
QueryOptions options) throws RequestValidationException, 
RequestExecutionException
 -{
 -CQLStatement statement =