[2/3] cassandra git commit: Merge branch 'cassandra-3.0' into cassandra-3.11

2018-12-06 Thread jzhuang
Merge branch 'cassandra-3.0' into cassandra-3.11


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

Branch: refs/heads/trunk
Commit: 6a449b88d9ca7e6a73a9335c9983301f8e72bcff
Parents: 8961246 bbf7dac
Author: Jay Zhuang 
Authored: Thu Dec 6 16:39:50 2018 -0800
Committer: Jay Zhuang 
Committed: Thu Dec 6 16:42:41 2018 -0800

--
 CHANGES.txt| 1 +
 tools/stress/src/org/apache/cassandra/stress/StressAction.java | 6 +-
 2 files changed, 6 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/6a449b88/CHANGES.txt
--
diff --cc CHANGES.txt
index 57d493b,f9b59df..369d96e
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,8 -1,7 +1,9 @@@
 -3.0.18
 +3.11.4
 + * Make stop-server.bat wait for Cassandra to terminate (CASSANDRA-14829)
 + * Correct sstable sorting for garbagecollect and levelled compaction 
(CASSANDRA-14870)
 +Merged from 3.0:
+  * Fix cassandra-stress write hang with default options (CASSANDRA-14616)
   * Differentiate between slices and RTs when decoding legacy bounds 
(CASSANDRA-14919)
 - * CommitLogReplayer.handleReplayError should print stack traces 
(CASSANDRA-14589)
   * Netty epoll IOExceptions caused by unclean client disconnects being logged 
at INFO (CASSANDRA-14909)
   * Unfiltered.isEmpty conflicts with Row extends AbstractCollection.isEmpty 
(CASSANDRA-14588)
   * RangeTombstoneList doesn't properly clean up mergeable or superseded rts 
in some cases (CASSANDRA-14894)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/6a449b88/tools/stress/src/org/apache/cassandra/stress/StressAction.java
--
diff --cc tools/stress/src/org/apache/cassandra/stress/StressAction.java
index 670c187,657117c..4e268eb
--- a/tools/stress/src/org/apache/cassandra/stress/StressAction.java
+++ b/tools/stress/src/org/apache/cassandra/stress/StressAction.java
@@@ -101,11 -90,15 +101,15 @@@ public class StressAction implements Ru
  }
  
  // type provided separately to support recursive call for mixed command 
with each command type it is performing
 +@SuppressWarnings("resource") // warmupOutput doesn't need closing
  private void warmup(OpDistributionFactory operations)
  {
 -PrintStream warmupOutput = new PrintStream(new OutputStream() { 
@Override public void write(int b) throws IOException { } } );
  // do 25% of iterations as warmup but no more than 50k (by default 
hotspot compiles methods after 10k invocations)
- int iterations = Math.min(5, (int) (settings.command.count * 
0.25)) * settings.node.nodes.size();
+ int iterations = (settings.command.count >= 0
+   ? Math.min(5, (int)(settings.command.count * 
0.25))
+   : 5) * settings.node.nodes.size();
+ if (iterations <= 0) return;
+ 
  int threads = 100;
  
  if (settings.rate.maxThreads > 0)


-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[2/3] cassandra git commit: Merge branch 'cassandra-3.0' into cassandra-3.11

2018-11-06 Thread bdeggleston
Merge branch 'cassandra-3.0' into cassandra-3.11


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

Branch: refs/heads/trunk
Commit: 4b2692fc978764d93209db27c13b0fbdb5896034
Parents: a6a9dce e04efab
Author: Blake Eggleston 
Authored: Tue Nov 6 11:59:49 2018 -0800
Committer: Blake Eggleston 
Committed: Tue Nov 6 15:48:06 2018 -0800

--
 .../io/sstable/format/big/BigFormat.java|  2 +-
 .../io/sstable/metadata/MetadataCollector.java  | 18 ---
 .../org/apache/cassandra/db/KeyspaceTest.java   | 34 --
 .../apache/cassandra/db/filter/SliceTest.java   | 42 -
 .../io/sstable/SSTableMetadataTest.java | 49 
 5 files changed, 12 insertions(+), 133 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/4b2692fc/src/java/org/apache/cassandra/io/sstable/format/big/BigFormat.java
--
diff --cc src/java/org/apache/cassandra/io/sstable/format/big/BigFormat.java
index ea0214b,d4549dd..b62cb11
--- a/src/java/org/apache/cassandra/io/sstable/format/big/BigFormat.java
+++ b/src/java/org/apache/cassandra/io/sstable/format/big/BigFormat.java
@@@ -110,7 -111,7 +110,7 @@@ public class BigFormat implements SSTab
  // we always incremented the major version.
  static class BigVersion extends Version
  {
--public static final String current_version = "mc";
++public static final String current_version = "md";
  public static final String earliest_supported_version = "jb";
  
  // jb (2.0.1): switch from crc32 to adler32 for compression checksums

http://git-wip-us.apache.org/repos/asf/cassandra/blob/4b2692fc/src/java/org/apache/cassandra/io/sstable/metadata/MetadataCollector.java
--
diff --cc 
src/java/org/apache/cassandra/io/sstable/metadata/MetadataCollector.java
index a618c96,437d80f..0ac5187
--- a/src/java/org/apache/cassandra/io/sstable/metadata/MetadataCollector.java
+++ b/src/java/org/apache/cassandra/io/sstable/metadata/MetadataCollector.java
@@@ -273,8 -272,11 +274,11 @@@ public class MetadataCollector implemen
  
  public Map finalizeMetadata(String 
partitioner, double bloomFilterFPChance, long repairedAt, SerializationHeader 
header)
  {
- Preconditions.checkState(comparator.compare(maxClustering, 
minClustering) >= 0);
+ Preconditions.checkState((minClustering == null && maxClustering == 
null)
+  || comparator.compare(maxClustering, 
minClustering) >= 0);
+ ByteBuffer[] minValues = minClustering != null ? 
minClustering.getRawValues() : EMPTY_CLUSTERING;
+ ByteBuffer[] maxValues = maxClustering != null ? 
maxClustering.getRawValues() : EMPTY_CLUSTERING;
 -Map components = Maps.newHashMap();
 +Map components = new 
EnumMap<>(MetadataType.class);
  components.put(MetadataType.VALIDATION, new 
ValidationMetadata(partitioner, bloomFilterFPChance));
  components.put(MetadataType.STATS, new 
StatsMetadata(estimatedPartitionSize,
   
estimatedCellPerPartitionCount,

http://git-wip-us.apache.org/repos/asf/cassandra/blob/4b2692fc/test/unit/org/apache/cassandra/db/KeyspaceTest.java
--
diff --cc test/unit/org/apache/cassandra/db/KeyspaceTest.java
index f2a9984,d864fa3..3c3b04b
--- a/test/unit/org/apache/cassandra/db/KeyspaceTest.java
+++ b/test/unit/org/apache/cassandra/db/KeyspaceTest.java
@@@ -452,40 -433,40 +452,6 @@@ public class KeyspaceTest extends CQLTe
  assertRowsInResult(cfs, command, expectedValues);
  }
  
--@Test
--public void testLimitSSTablesComposites() throws Throwable
--{
--// creates 10 sstables, composite columns like this:
--// -
--// k   |a0:0|a1:1|..|a9:9
--// -
--// -
--// k   |a0:10|a1:11|..|a9:19
--// -
--// ...
--// -
--// k   |a0:90|a1:91|..|a9:99
--// -
--// then we slice out col1 = a5 and col2 > 85 -> which should let us 
just check 2 sstables and get 2 columns
- createTable("CREATE TABLE %s (a text, b text, c int, d int, PRIMARY 
KEY (a, b, c))");
- final ColumnFamilyStore cfs = getCurrentColumnFamilyStore();
 -String tableName = createTable("CREATE TABLE %s (a text, b text, c 
int, d int, PRIMARY KEY 

[2/3] cassandra git commit: Merge branch 'cassandra-3.0' into cassandra-3.11

2018-10-28 Thread bdeggleston
Merge branch 'cassandra-3.0' into cassandra-3.11


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

Branch: refs/heads/trunk
Commit: 69f8cc7d25722dbed9ab6126fa2dddc77babbd31
Parents: 6308fb2 e4bac44
Author: Blake Eggleston 
Authored: Sun Oct 28 19:37:34 2018 -0700
Committer: Blake Eggleston 
Committed: Sun Oct 28 19:37:51 2018 -0700

--
 CHANGES.txt |  1 +
 .../columniterator/SSTableReversedIterator.java |  9 +-
 .../SSTableReverseIteratorTest.java | 98 
 3 files changed, 103 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/69f8cc7d/CHANGES.txt
--
diff --cc CHANGES.txt
index d28ba32,cc8e348..03abb5b
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,5 -1,5 +1,6 @@@
 -3.0.18
 +3.11.4
 +Merged from 3.0:
+  * Dropped columns can cause reverse sstable iteration to return prematurely 
(CASSANDRA-14838)
   * Legacy sstables with  multi block range tombstones create invalid bound 
sequences (CASSANDRA-14823)
   * Expand range tombstone validation checks to multiple interim request 
stages (CASSANDRA-14824)
   * Reverse order reads can return incomplete results (CASSANDRA-14803)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/69f8cc7d/src/java/org/apache/cassandra/db/columniterator/SSTableReversedIterator.java
--

http://git-wip-us.apache.org/repos/asf/cassandra/blob/69f8cc7d/test/unit/org/apache/cassandra/db/columniterator/SSTableReverseIteratorTest.java
--
diff --cc 
test/unit/org/apache/cassandra/db/columniterator/SSTableReverseIteratorTest.java
index 000,2f183c0..9040f11
mode 00,100644..100644
--- 
a/test/unit/org/apache/cassandra/db/columniterator/SSTableReverseIteratorTest.java
+++ 
b/test/unit/org/apache/cassandra/db/columniterator/SSTableReverseIteratorTest.java
@@@ -1,0 -1,98 +1,98 @@@
+ /*
+  * 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.db.columniterator;
+ 
+ import java.nio.ByteBuffer;
+ import java.util.Random;
+ 
+ import com.google.common.collect.Iterables;
+ import org.junit.Assert;
+ import org.junit.Before;
+ import org.junit.BeforeClass;
+ import org.junit.Test;
+ 
+ import org.apache.cassandra.SchemaLoader;
+ import org.apache.cassandra.cql3.QueryProcessor;
+ import org.apache.cassandra.cql3.UntypedResultSet;
+ import org.apache.cassandra.db.ColumnFamilyStore;
+ import org.apache.cassandra.db.DecoratedKey;
+ import org.apache.cassandra.db.Keyspace;
+ import org.apache.cassandra.db.RowIndexEntry;
+ import org.apache.cassandra.db.marshal.Int32Type;
+ import org.apache.cassandra.io.sstable.format.SSTableReader;
+ import org.apache.cassandra.schema.KeyspaceParams;
+ 
+ public class SSTableReverseIteratorTest
+ {
+ private static final String KEYSPACE = "ks";
+ private Random random;
+ 
+ @BeforeClass
+ public static void setupClass()
+ {
+ SchemaLoader.prepareServer();
+ SchemaLoader.createKeyspace(KEYSPACE, KeyspaceParams.simple(1));
+ }
+ 
+ @Before
+ public void setUp()
+ {
+ random = new Random(0);
+ }
+ 
+ private ByteBuffer bytes(int size)
+ {
+ byte[] b = new byte[size];
+ random.nextBytes(b);
+ return ByteBuffer.wrap(b);
+ }
+ 
+ /**
+  * SSTRI shouldn't bail out if it encounters empty blocks (due to dropped 
columns)
+  */
+ @Test
+ public void emptyBlockTolerance()
+ {
+ String table = "empty_block_tolerance";
+ QueryProcessor.executeInternal(String.format("CREATE TABLE %s.%s (k 
INT, c int, v1 blob, v2 blob, primary key (k, c))", KEYSPACE, table));
+ ColumnFamilyStore 

[2/3] cassandra git commit: Merge branch 'cassandra-3.0' into cassandra-3.11

2018-07-31 Thread aleksey
Merge branch 'cassandra-3.0' into cassandra-3.11


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

Branch: refs/heads/trunk
Commit: 559d61af6e2f8c6b6779168d86f05646f6cb6bf6
Parents: 31d5d87 4b00601
Author: Aleksey Yeshchenko 
Authored: Tue Jul 31 20:28:55 2018 +0100
Committer: Aleksey Yeshchenko 
Committed: Tue Jul 31 20:28:55 2018 +0100

--
 CHANGES.txt | 5 +
 src/java/org/apache/cassandra/config/ColumnDefinition.java  | 1 -
 src/java/org/apache/cassandra/cql3/ColumnIdentifier.java| 5 +
 src/java/org/apache/cassandra/schema/SchemaKeyspace.java| 4 +---
 .../org/apache/cassandra/utils/NativeSSTableLoaderClient.java   | 4 +---
 5 files changed, 12 insertions(+), 7 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/559d61af/CHANGES.txt
--
diff --cc CHANGES.txt
index 5e39b5e,d2ca759..3557863
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,25 -1,11 +1,30 @@@
 -3.0.18
++3.11.4
++Merged from 3.0:
+  * Fix reading columns with non-UTF names from schema (CASSANDRA-14468)
+ 
+ 
 -3.0.17
 +3.11.3
 + * Validate supported column type with SASI analyzer (CASSANDRA-13669)
 + * Remove BTree.Builder Recycler to reduce memory usage (CASSANDRA-13929)
 + * Reduce nodetool GC thread count (CASSANDRA-14475)
 + * Fix New SASI view creation during Index Redistribution (CASSANDRA-14055)
 + * Remove string formatting lines from BufferPool hot path (CASSANDRA-14416)
 + * Update metrics to 3.1.5 (CASSANDRA-12924)
 + * Detect OpenJDK jvm type and architecture (CASSANDRA-12793)
 + * Don't use guava collections in the non-system keyspace jmx attributes 
(CASSANDRA-12271)
 + * Allow existing nodes to use all peers in shadow round (CASSANDRA-13851)
 + * Fix cqlsh to read connection.ssl cqlshrc option again (CASSANDRA-14299)
 + * Downgrade log level to trace for CommitLogSegmentManager (CASSANDRA-14370)
 + * CQL fromJson(null) throws NullPointerException (CASSANDRA-13891)
 + * Serialize empty buffer as empty string for json output format 
(CASSANDRA-14245)
 + * Allow logging implementation to be interchanged for embedded testing 
(CASSANDRA-13396)
 + * SASI tokenizer for simple delimiter based entries (CASSANDRA-14247)
 + * Fix Loss of digits when doing CAST from varint/bigint to decimal 
(CASSANDRA-14170)
 + * RateBasedBackPressure unnecessarily invokes a lock on the Guava 
RateLimiter (CASSANDRA-14163)
 + * Fix wildcard GROUP BY queries (CASSANDRA-14209)
 +Merged from 3.0:
   * Fix corrupted static collection deletions in 3.0 -> 2.{1,2} messages 
(CASSANDRA-14568)
   * Fix potential IndexOutOfBoundsException with counters (CASSANDRA-14167)
 - * Restore resumable hints delivery, backport CASSANDRA-11960 
(CASSANDRA-14419)
   * Always close RT markers returned by ReadCommand#executeLocally() 
(CASSANDRA-14515)
   * Reverse order queries with range tombstones can cause data loss 
(CASSANDRA-14513)
   * Fix regression of lagging commitlog flush log message (CASSANDRA-14451)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/559d61af/src/java/org/apache/cassandra/config/ColumnDefinition.java
--

http://git-wip-us.apache.org/repos/asf/cassandra/blob/559d61af/src/java/org/apache/cassandra/cql3/ColumnIdentifier.java
--

http://git-wip-us.apache.org/repos/asf/cassandra/blob/559d61af/src/java/org/apache/cassandra/schema/SchemaKeyspace.java
--

http://git-wip-us.apache.org/repos/asf/cassandra/blob/559d61af/src/java/org/apache/cassandra/utils/NativeSSTableLoaderClient.java
--


-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[2/3] cassandra git commit: Merge branch 'cassandra-3.0' into cassandra-3.11

2018-06-20 Thread aleksey
Merge branch 'cassandra-3.0' into cassandra-3.11


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

Branch: refs/heads/trunk
Commit: 08a515dc7440db1530987a480afb27f5faaf8e0f
Parents: 191ad7b 4e23c9e
Author: Aleksey Yeshchenko 
Authored: Wed Jun 20 16:03:25 2018 +0100
Committer: Aleksey Yeshchenko 
Committed: Wed Jun 20 16:03:25 2018 +0100

--
 CHANGES.txt |   1 +
 .../org/apache/cassandra/db/ReadCommand.java|  44 +-
 .../db/rows/UnfilteredRowIterators.java |  26 +
 .../cassandra/db/transform/RTBoundCloser.java   | 110 +
 .../db/transform/RTBoundValidator.java  | 106 
 .../apache/cassandra/service/DataResolver.java  |  21 +-
 .../db/transform/RTTransformationsTest.java | 483 +++
 7 files changed, 760 insertions(+), 31 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/08a515dc/CHANGES.txt
--
diff --cc CHANGES.txt
index e807340,aeeb0ae..d9c62ea
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,22 -1,5 +1,23 @@@
 -3.0.17
 +3.11.3
 + * Remove BTree.Builder Recycler to reduce memory usage (CASSANDRA-13929)
 + * Reduce nodetool GC thread count (CASSANDRA-14475)
 + * Fix New SASI view creation during Index Redistribution (CASSANDRA-14055)
 + * Remove string formatting lines from BufferPool hot path (CASSANDRA-14416)
 + * Update metrics to 3.1.5 (CASSANDRA-12924)
 + * Detect OpenJDK jvm type and architecture (CASSANDRA-12793)
 + * Don't use guava collections in the non-system keyspace jmx attributes 
(CASSANDRA-12271)
 + * Allow existing nodes to use all peers in shadow round (CASSANDRA-13851)
 + * Fix cqlsh to read connection.ssl cqlshrc option again (CASSANDRA-14299)
 + * Downgrade log level to trace for CommitLogSegmentManager (CASSANDRA-14370)
 + * CQL fromJson(null) throws NullPointerException (CASSANDRA-13891)
 + * Serialize empty buffer as empty string for json output format 
(CASSANDRA-14245)
 + * Allow logging implementation to be interchanged for embedded testing 
(CASSANDRA-13396)
 + * SASI tokenizer for simple delimiter based entries (CASSANDRA-14247)
 + * Fix Loss of digits when doing CAST from varint/bigint to decimal 
(CASSANDRA-14170)
 + * RateBasedBackPressure unnecessarily invokes a lock on the Guava 
RateLimiter (CASSANDRA-14163)
 + * Fix wildcard GROUP BY queries (CASSANDRA-14209)
 +Merged from 3.0:
+  * Always close RT markers returned by ReadCommand#executeLocally() 
(CASSANDRA-14515)
   * Reverse order queries with range tombstones can cause data loss 
(CASSANDRA-14513)
   * Fix regression of lagging commitlog flush log message (CASSANDRA-14451)
   * Add Missing dependencies in pom-all (CASSANDRA-14422)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/08a515dc/src/java/org/apache/cassandra/db/ReadCommand.java
--
diff --cc src/java/org/apache/cassandra/db/ReadCommand.java
index c8b256a,f8a0795..8bcfcbc
--- a/src/java/org/apache/cassandra/db/ReadCommand.java
+++ b/src/java/org/apache/cassandra/db/ReadCommand.java
@@@ -31,11 -31,10 +31,13 @@@ import org.slf4j.LoggerFactory
  import org.apache.cassandra.config.*;
  import org.apache.cassandra.cql3.Operator;
  import org.apache.cassandra.db.filter.*;
 +import org.apache.cassandra.db.monitoring.ApproximateTime;
 +import org.apache.cassandra.db.monitoring.MonitorableImpl;
  import org.apache.cassandra.db.partitions.*;
  import org.apache.cassandra.db.rows.*;
+ import org.apache.cassandra.db.transform.RTBoundCloser;
+ import org.apache.cassandra.db.transform.RTBoundValidator;
 +import org.apache.cassandra.db.transform.StoppingTransformation;
  import org.apache.cassandra.db.transform.Transformation;
  import org.apache.cassandra.dht.AbstractBounds;
  import org.apache.cassandra.index.Index;
@@@ -413,14 -407,12 +419,13 @@@ public abstract class ReadCommand exten
  Tracing.trace("Executing read on {}.{} using index {}", 
cfs.metadata.ksName, cfs.metadata.cfName, index.getIndexMetadata().name);
  }
  
- UnfilteredPartitionIterator resultIterator = searcher == null
-  ? queryStorage(cfs, 
executionController)
-  : 
searcher.search(executionController);
 -UnfilteredPartitionIterator iterator = (null == searcher) ? 
queryStorage(cfs, orderGroup) : searcher.search(orderGroup);
++UnfilteredPartitionIterator iterator = (null == searcher) ? 
queryStorage(cfs, executionController) : searcher.search(executionController);
  
  try
  

[2/3] cassandra git commit: Merge branch 'cassandra-3.0' into cassandra-3.11

2018-02-27 Thread jzhuang
Merge branch 'cassandra-3.0' into cassandra-3.11


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

Branch: refs/heads/trunk
Commit: c4946960a20e12f0f574b5608c886467466ee3b9
Parents: abd9be1 79cead0
Author: Jay Zhuang 
Authored: Tue Feb 27 21:37:59 2018 -0800
Committer: Jay Zhuang 
Committed: Tue Feb 27 21:40:25 2018 -0800

--
 build.xml | 1 +
 1 file changed, 1 insertion(+)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/c4946960/build.xml
--


-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[2/3] cassandra git commit: Merge branch 'cassandra-3.0' into cassandra-3.11

2018-02-12 Thread jasobrown
Merge branch 'cassandra-3.0' into cassandra-3.11


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

Branch: refs/heads/trunk
Commit: f6ec5c5d18c2900af0ef6e314edbd19aaa682a55
Parents: fa39b6e 91e83c7
Author: Jason Brown 
Authored: Mon Feb 12 05:08:17 2018 -0800
Committer: Jason Brown 
Committed: Mon Feb 12 05:09:58 2018 -0800

--
 CHANGES.txt   | 1 +
 bin/cassandra | 2 +-
 bin/debug-cql | 2 +-
 3 files changed, 3 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/f6ec5c5d/CHANGES.txt
--
diff --cc CHANGES.txt
index 5b49f48,197ba58..bce7e1d
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,28 -1,9 +1,29 @@@
 -3.0.16
 - * Add MinGW uname check to start scripts (CASSANDRA-12940)
 - * Protect against overflow of local expiration time (CASSANDRA-14092)
 +3.11.2
 + * Remove dependencies on JVM internal classes from JMXServerUtils 
(CASSANDRA-14173) 
 + * Add DEFAULT, UNSET, MBEAN and MBEANS to `ReservedKeywords` 
(CASSANDRA-14205)
 + * Add Unittest for schema migration fix (CASSANDRA-14140)
 + * Print correct snitch info from nodetool describecluster (CASSANDRA-13528)
 + * Close socket on error during connect on OutboundTcpConnection 
(CASSANDRA-9630)
 + * Enable CDC unittest (CASSANDRA-14141)
 + * Acquire read lock before accessing CompactionStrategyManager fields 
(CASSANDRA-14139)
 + * Split CommitLogStressTest to avoid timeout (CASSANDRA-14143)
 + * Avoid invalidating disk boundaries unnecessarily (CASSANDRA-14083)
 + * Avoid exposing compaction strategy index externally (CASSANDRA-14082)
 + * Prevent continuous schema exchange between 3.0 and 3.11 nodes 
(CASSANDRA-14109)
 + * Fix imbalanced disks when replacing node with same address with JBOD 
(CASSANDRA-14084)
 + * Reload compaction strategies when disk boundaries are invalidated 
(CASSANDRA-13948)
 + * Remove OpenJDK log warning (CASSANDRA-13916)
 + * Prevent compaction strategies from looping indefinitely (CASSANDRA-14079)
 + * Cache disk boundaries (CASSANDRA-13215)
 + * Add asm jar to build.xml for maven builds (CASSANDRA-11193)
 + * Round buffer size to powers of 2 for the chunk cache (CASSANDRA-13897)
 + * Update jackson JSON jars (CASSANDRA-13949)
 + * Avoid locks when checking LCS fanout and if we should defrag 
(CASSANDRA-13930)
 + * Correctly count range tombstones in traces and tombstone thresholds 
(CASSANDRA-8527)
 +Merged from 3.0:
++ * Add MinGW uname check to start scripts (CASSANDRA-12840)
   * Use the correct digest file and reload sstable metadata in nodetool verify 
(CASSANDRA-14217)
   * Handle failure when mutating repaired status in Verifier (CASSANDRA-13933)
 - * Close socket on error during connect on OutboundTcpConnection 
(CASSANDRA-9630)
   * Set encoding for javadoc generation (CASSANDRA-14154)
   * Fix index target computation for dense composite tables with dropped 
compact storage (CASSANDRA-14104)
   * Improve commit log chain marker updating (CASSANDRA-14108)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/f6ec5c5d/bin/cassandra
--


-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[2/3] cassandra git commit: Merge branch cassandra-3.0 into cassandra-3.11

2018-02-05 Thread dbrosius
Merge branch cassandra-3.0 into cassandra-3.11


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

Branch: refs/heads/trunk
Commit: de6c62dd6ce60d8493319deb05b71f90d85bc2b0
Parents: 28ee665 7df3605
Author: Dave Brosius 
Authored: Mon Feb 5 22:40:56 2018 -0500
Committer: Dave Brosius 
Committed: Mon Feb 5 22:40:56 2018 -0500

--
 .../apache/cassandra/cql3/statements/AlterTableStatement.java| 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/de6c62dd/src/java/org/apache/cassandra/cql3/statements/AlterTableStatement.java
--
diff --cc src/java/org/apache/cassandra/cql3/statements/AlterTableStatement.java
index de42647,59c4e08..12abba7
--- a/src/java/org/apache/cassandra/cql3/statements/AlterTableStatement.java
+++ b/src/java/org/apache/cassandra/cql3/statements/AlterTableStatement.java
@@@ -190,59 -192,54 +190,59 @@@ public class AlterTableStatement extend
  if (!meta.isCQLTable())
  throw new InvalidRequestException("Cannot drop columns 
from a non-CQL3 table");
  
 -if (def == null)
 -throw new InvalidRequestException(String.format("Column 
%s was not found in table %s", columnName, columnFamily()));
 -
  cfm = meta.copy();
  
 -switch (def.kind)
 +for (AlterTableStatementColumn colData : colNameList)
  {
 -case PARTITION_KEY:
 -case CLUSTERING:
 -throw new 
InvalidRequestException(String.format("Cannot drop PRIMARY KEY part %s", 
columnName));
 -case REGULAR:
 -case STATIC:
 -ColumnDefinition toDelete = null;
 -for (ColumnDefinition columnDef : 
cfm.partitionColumns())
 -{
 -if (columnDef.name.equals(columnName))
 -{
 -toDelete = columnDef;
 -break;
 -}
 -}
 -assert toDelete != null;
 -cfm.removeColumnDefinition(toDelete);
 -cfm.recordColumnDrop(toDelete, deleteTimestamp == 
null ? queryState.getTimestamp() : deleteTimestamp);
 -break;
 -}
 +columnName = colData.getColumnName().getIdentifier(cfm);
 +def = cfm.getColumnDefinition(columnName);
  
 -// If the dropped column is required by any secondary indexes
 -// we reject the operation, as the indexes must be dropped 
first
 -Indexes allIndexes = cfm.getIndexes();
 -if (!allIndexes.isEmpty())
 -{
 -ColumnFamilyStore store = Keyspace.openAndGetStore(cfm);
 -Set dependentIndexes = 
store.indexManager.getDependentIndexes(def);
 -if (!dependentIndexes.isEmpty())
 -throw new 
InvalidRequestException(String.format("Cannot drop column %s because it has " +
 -
"dependent secondary indexes (%s)",
 -def,
 -
dependentIndexes.stream()
 -  
  .map(i -> i.name)
 -  
  .collect(Collectors.joining(",";
 -}
 +if (def == null)
 +throw new 
InvalidRequestException(String.format("Column %s was not found in table %s", 
columnName, columnFamily()));
  
 -if (!Iterables.isEmpty(views))
 +switch (def.kind)
 +{
 + case PARTITION_KEY:
 + case CLUSTERING:
 +  throw new 
InvalidRequestException(String.format("Cannot drop PRIMARY KEY part %s", 
columnName));
 + case REGULAR:
 + case STATIC:
 +  ColumnDefinition toDelete = null;
 +  for (ColumnDefinition columnDef : 
cfm.partitionColumns())
 

[2/3] cassandra git commit: Merge branch 'cassandra-3.0' into cassandra-3.11

2017-08-10 Thread bdeggleston
Merge branch 'cassandra-3.0' into cassandra-3.11


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

Branch: refs/heads/trunk
Commit: e018bec8ad482a1892b97b5f829ff5fa5801190a
Parents: 303dba6 eb6f03c
Author: Blake Eggleston 
Authored: Thu Aug 10 15:43:45 2017 -0700
Committer: Blake Eggleston 
Committed: Thu Aug 10 15:47:22 2017 -0700

--
 CHANGES.txt |  1 +
 src/java/org/apache/cassandra/db/rows/AbstractCell.java | 10 +-
 test/unit/org/apache/cassandra/db/CounterCellTest.java  |  4 ++--
 3 files changed, 12 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/e018bec8/CHANGES.txt
--
diff --cc CHANGES.txt
index 145a746,0b92a7e..3308287
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,9 -1,5 +1,10 @@@
 -3.0.15
 +3.11.1
 + * "ignore" option is ignored in sstableloader (CASSANDRA-13721)
 + * Deadlock in AbstractCommitLogSegmentManager (CASSANDRA-13652)
 + * Duplicate the buffer before passing it to analyser in SASI operation 
(CASSANDRA-13512)
 + * Properly evict pstmts from prepared statements cache (CASSANDRA-13641)
 +Merged from 3.0:
+  * Fix digest calculation for counter cells (CASSANDRA-13750)
   * Fix ColumnDefinition.cellValueType() for non-frozen collection and change 
SSTabledump to use type.toJSONString() (CASSANDRA-13573)
   * Skip materialized view addition if the base table doesn't exist 
(CASSANDRA-13737)
   * Drop table should remove corresponding entries in dropped_columns table 
(CASSANDRA-13730)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/e018bec8/src/java/org/apache/cassandra/db/rows/AbstractCell.java
--
diff --cc src/java/org/apache/cassandra/db/rows/AbstractCell.java
index 54c8f24,576351e..744d113
--- a/src/java/org/apache/cassandra/db/rows/AbstractCell.java
+++ b/src/java/org/apache/cassandra/db/rows/AbstractCell.java
@@@ -44,84 -40,17 +44,92 @@@ public abstract class AbstractCell exte
  super(column);
  }
  
 +public boolean isCounterCell()
 +{
 +return !isTombstone() && column.isCounterColumn();
 +}
 +
 +public boolean isLive(int nowInSec)
 +{
 +return localDeletionTime() == NO_DELETION_TIME || (ttl() != NO_TTL && 
nowInSec < localDeletionTime());
 +}
 +
 +public boolean isTombstone()
 +{
 +return localDeletionTime() != NO_DELETION_TIME && ttl() == NO_TTL;
 +}
 +
 +public boolean isExpiring()
 +{
 +return ttl() != NO_TTL;
 +}
 +
 +public Cell markCounterLocalToBeCleared()
 +{
 +if (!isCounterCell())
 +return this;
 +
 +ByteBuffer value = value();
 +ByteBuffer marked = 
CounterContext.instance().markLocalToBeCleared(value);
 +return marked == value ? this : new BufferCell(column, timestamp(), 
ttl(), localDeletionTime(), marked, path());
 +}
 +
 +public Cell purge(DeletionPurger purger, int nowInSec)
 +{
 +if (!isLive(nowInSec))
 +{
 +if (purger.shouldPurge(timestamp(), localDeletionTime()))
 +return null;
 +
 +// We slightly hijack purging to convert expired but not 
purgeable columns to tombstones. The reason we do that is
 +// that once a column has expired it is equivalent to a tombstone 
but actually using a tombstone is more compact since
 +// we don't keep the column value. The reason we do it here is 
that 1) it's somewhat related to dealing with tombstones
 +// so hopefully not too surprising and 2) we want to this and 
purging at the same places, so it's simpler/more efficient
 +// to do both here.
 +if (isExpiring())
 +{
 +// Note that as long as the expiring column and the tombstone 
put together live longer than GC grace seconds,
 +// we'll fulfil our responsibility to repair. See discussion 
at
 +// 
http://cassandra-user-incubator-apache-org.3065146.n2.nabble.com/repair-compaction-and-tombstone-rows-td7583481.html
 +return BufferCell.tombstone(column, timestamp(), 
localDeletionTime() - ttl(), path()).purge(purger, nowInSec);
 +}
 +}
 +return this;
 +}
 +
 +public Cell copy(AbstractAllocator allocator)
 +{
 +CellPath path = path();
 +return new BufferCell(column, timestamp(), ttl(), 
localDeletionTime(), allocator.clone(value()), path == null ? null : 

[2/3] cassandra git commit: Merge branch cassandra-3.0 into cassandra-3.11

2017-02-07 Thread blerer
Merge branch cassandra-3.0 into cassandra-3.11


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

Branch: refs/heads/trunk
Commit: 3acdcaf8d3d3d5b959e4a14ac468d75d32b9177e
Parents: 97861e6 fb606dd
Author: Benjamin Lerer 
Authored: Tue Feb 7 10:42:20 2017 +0100
Committer: Benjamin Lerer 
Committed: Tue Feb 7 10:47:37 2017 +0100

--
 CHANGES.txt |  1 +
 .../cql3/statements/ModificationStatement.java  |  4 ++
 .../cql3/validation/operations/DeleteTest.java  | 54 
 .../cql3/validation/operations/UpdateTest.java  | 54 ++--
 4 files changed, 110 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/3acdcaf8/CHANGES.txt
--
diff --cc CHANGES.txt
index 65efebc,4387019..e346722
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,11 -1,6 +1,12 @@@
 -3.0.11
 +3.11.0
 + * Move to FastThreadLocalThread and FastThreadLocal (CASSANDRA-13034)
 + * nodetool stopdaemon errors out (CASSANDRA-13030)
 + * Tables in system_distributed should not use gcgs of 0 (CASSANDRA-12954)
 + * Fix primary index calculation for SASI (CASSANDRA-12910)
 + * More fixes to the TokenAllocator (CASSANDRA-12990)
 + * NoReplicationTokenAllocator should work with zero replication factor 
(CASSANDRA-12983)
 +Merged from 3.0:
+  * Fix UPDATE queries with empty IN restrictions (CASSANDRA-13152)
 - * Abort or retry on failed hints delivery (CASSANDRA-13124)
   * Fix handling of partition with partition-level deletion plus
 live rows in sstabledump (CASSANDRA-13177)
   * Provide user workaround when system_schema.columns does not contain entries

http://git-wip-us.apache.org/repos/asf/cassandra/blob/3acdcaf8/src/java/org/apache/cassandra/cql3/statements/ModificationStatement.java
--
diff --cc 
src/java/org/apache/cassandra/cql3/statements/ModificationStatement.java
index 08bb6ba,1722f02..832d417
--- a/src/java/org/apache/cassandra/cql3/statements/ModificationStatement.java
+++ b/src/java/org/apache/cassandra/cql3/statements/ModificationStatement.java
@@@ -661,7 -657,11 +661,11 @@@ public abstract class ModificationState
  {
  NavigableSet clusterings = createClustering(options);
  
+ // If some of the restrictions were unspecified (e.g. empty IN 
restrictions) we do not need to do anything.
 -if (restrictions.hasClusteringColumnsRestriction() && 
clusterings.isEmpty())
++if (restrictions.hasClusteringColumnsRestrictions() && 
clusterings.isEmpty())
+ return;
+ 
 -UpdateParameters params = makeUpdateParameters(keys, clusterings, 
options, local, now);
 +UpdateParameters params = makeUpdateParameters(keys, clusterings, 
options, local, now, queryStartNanoTime);
  
  for (ByteBuffer key : keys)
  {

http://git-wip-us.apache.org/repos/asf/cassandra/blob/3acdcaf8/test/unit/org/apache/cassandra/cql3/validation/operations/DeleteTest.java
--

http://git-wip-us.apache.org/repos/asf/cassandra/blob/3acdcaf8/test/unit/org/apache/cassandra/cql3/validation/operations/UpdateTest.java
--
diff --cc 
test/unit/org/apache/cassandra/cql3/validation/operations/UpdateTest.java
index 72d3466,a49f828..af6c4f9
--- a/test/unit/org/apache/cassandra/cql3/validation/operations/UpdateTest.java
+++ b/test/unit/org/apache/cassandra/cql3/validation/operations/UpdateTest.java
@@@ -23,14 -23,13 +23,16 @@@ import java.util.Arrays
  import org.junit.Assert;
  import org.junit.Test;
  
--import static org.apache.commons.lang3.StringUtils.isEmpty;
 -import static org.junit.Assert.assertTrue;
--
 +import org.apache.cassandra.cql3.Attributes;
  import org.apache.cassandra.cql3.CQLTester;
 +import org.apache.cassandra.cql3.UntypedResultSet;
 +import org.apache.cassandra.cql3.UntypedResultSet.Row;
- import org.apache.cassandra.utils.ByteBufferUtil;
+ import org.apache.cassandra.db.ColumnFamilyStore;
+ import org.apache.cassandra.db.Keyspace;
+ 
++import static org.apache.commons.lang3.StringUtils.isEmpty;
++import static org.junit.Assert.assertTrue;
 +
  public class UpdateTest extends CQLTester
  {
  @Test



[2/3] cassandra git commit: Merge branch cassandra-3.0 into cassandra-3.11

2017-01-20 Thread blerer
Merge branch cassandra-3.0 into cassandra-3.11


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

Branch: refs/heads/trunk
Commit: 1a56dd063d8d032c33427013ff0e990f4e5b4760
Parents: e3d26b6 f3b452c
Author: Benjamin Lerer 
Authored: Fri Jan 20 16:02:27 2017 +0100
Committer: Benjamin Lerer 
Committed: Fri Jan 20 16:02:27 2017 +0100

--
 src/java/org/apache/cassandra/config/CFMetaData.java | 13 +++--
 1 file changed, 7 insertions(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/1a56dd06/src/java/org/apache/cassandra/config/CFMetaData.java
--
diff --cc src/java/org/apache/cassandra/config/CFMetaData.java
index 1d3bb3a,44f3a96..d0932ed
--- a/src/java/org/apache/cassandra/config/CFMetaData.java
+++ b/src/java/org/apache/cassandra/config/CFMetaData.java
@@@ -297,22 -283,18 +297,20 @@@ public final class CFMetaDat
  this.clusteringColumns = clusteringColumns;
  this.partitionColumns = partitionColumns;
  
- this.comparator = new 
ClusteringComparator(extractTypes(clusteringColumns));
- List keyTypes = extractTypes(partitionKeyColumns);
- this.keyValidator = keyTypes.size() == 1 ? keyTypes.get(0) : 
CompositeType.getInstance(keyTypes);
 -this.serializers = new Serializers(this);
--
  rebuild();
 +
 +this.resource = DataResource.table(ksName, cfName);
 +this.serializers = new Serializers(this);
  }
  
  // This rebuild informations that are intrinsically duplicate of the 
table definition but
  // are kept because they are often useful in a different format.
  private void rebuild()
  {
+ this.comparator = new 
ClusteringComparator(extractTypes(clusteringColumns));
+ 
 -Map newColumnMetadata = new HashMap<>();
 +Map newColumnMetadata = 
Maps.newHashMapWithExpectedSize(partitionKeyColumns.size() + 
clusteringColumns.size() + partitionColumns.size());
 +
  for (ColumnDefinition def : partitionKeyColumns)
  newColumnMetadata.put(def.name.bytes, def);
  for (ColumnDefinition def : clusteringColumns)
@@@ -322,10 -304,11 +320,13 @@@
  
  this.columnMetadata = newColumnMetadata;
  
+ List keyTypes = extractTypes(partitionKeyColumns);
+ this.keyValidator = keyTypes.size() == 1 ? keyTypes.get(0) : 
CompositeType.getInstance(keyTypes);
+ 
  if (isCompactTable())
  this.compactValueColumn = 
CompactTables.getCompactValueColumn(partitionColumns, isSuper());
 +
 +this.allColumnFilter = ColumnFilter.all(this);
  }
  
  public Indexes getIndexes()



[2/3] cassandra git commit: Merge branch cassandra-3.0 into cassandra-3.11

2017-01-18 Thread blerer
http://git-wip-us.apache.org/repos/asf/cassandra/blob/d3882895/doc/source/cql/types.rst
--
diff --cc doc/source/cql/types.rst
index b0d205b,000..8954d87
mode 100644,00..100644
--- a/doc/source/cql/types.rst
+++ b/doc/source/cql/types.rst
@@@ -1,560 -1,0 +1,557 @@@
 +.. 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.
 +
 +.. highlight:: cql
 +
 +.. _UUID: https://en.wikipedia.org/wiki/Universally_unique_identifier
 +
 +.. _data-types:
 +
 +Data Types
 +--
 +
 +CQL is a typed language and supports a rich set of data types, including 
:ref:`native types `,
 +:ref:`collection types `, :ref:`user-defined types `, 
:ref:`tuple types ` and :ref:`custom
 +types `:
 +
 +.. productionlist::
 +   cql_type: `native_type` | `collection_type` | `user_defined_type` | 
`tuple_type` | `custom_type`
 +
 +
 +.. _native-types:
 +
 +Native Types
 +
 +
 +The native types supported by CQL are:
 +
 +.. productionlist::
 +   native_type: ASCII
 +  : | BIGINT
 +  : | BLOB
 +  : | BOOLEAN
 +  : | COUNTER
 +  : | DATE
 +  : | DECIMAL
 +  : | DOUBLE
 +  : | DURATION
 +  : | FLOAT
 +  : | INET
 +  : | INT
 +  : | SMALLINT
 +  : | TEXT
 +  : | TIME
 +  : | TIMESTAMP
 +  : | TIMEUUID
 +  : | TINYINT
 +  : | UUID
 +  : | VARCHAR
 +  : | VARINT
 +
 +The following table gives additional informations on the native data types, 
and on which kind of :ref:`constants
 +` each type supports:
 +
 +=== = 
==
 + typeconstants supported   description
 +=== = 
==
 + ``ascii``   :token:`string`   ASCII character string
 + ``bigint``  :token:`integer`  64-bit signed long
 + ``blob``:token:`blob` Arbitrary bytes (no validation)
 + ``boolean`` :token:`boolean`  Either ``true`` or ``false``
 + ``counter`` :token:`integer`  Counter column (64-bit signed value). 
See :ref:`counters` for details
 + ``date``:token:`integer`, A date (with no corresponding time 
value). See :ref:`dates` below for details
 + :token:`string`
 + ``decimal`` :token:`integer`, Variable-precision decimal
 + :token:`float`
 + ``double``  :token:`integer`  64-bit IEEE-754 floating point
 + :token:`float`
 + ``duration``:token:`duration`,A duration with nanosecond precision. 
See :ref:`durations` below for details
 + ``float``   :token:`integer`, 32-bit IEEE-754 floating point
 + :token:`float`
 + ``inet``:token:`string`   An IP address, either IPv4 (4 bytes 
long) or IPv6 (16 bytes long). Note that
 +   there is no ``inet`` constant, IP 
address should be input as strings
 + ``int`` :token:`integer`  32-bit signed int
 + ``smallint``:token:`integer`  16-bit signed int
 + ``text``:token:`string`   UTF8 encoded string
 + ``time``:token:`integer`, A time (with no corresponding date 
value) with nanosecond precision. See
 + :token:`string`   :ref:`times` below for details
 + ``timestamp``   :token:`integer`, A timestamp (date and time) with 
millisecond precision. See :ref:`timestamps`
 + :token:`string`   below for details
 + ``timeuuid``:token:`uuid` Version 1 UUID_, generally used as a 
“conflict-free” timestamp. Also see
 +   :ref:`timeuuid-functions`
 + ``tinyint`` :token:`integer`  8-bit signed int
 + ``uuid``:token:`uuid` A UUID_ (of any version)
 + ``varchar`` :token:`string`   UTF8 encoded string
 + ``varint``  :token:`integer`  Arbitrary-precision integer
 +=== 

[2/3] cassandra git commit: Merge branch 'cassandra-3.0' into cassandra-3.11

2016-12-20 Thread paulo
Merge branch 'cassandra-3.0' into cassandra-3.11


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

Branch: refs/heads/cassandra-3.X
Commit: 4ed9df6dfc2bb484c6fc5497a0bdc23dc076d04d
Parents: e35f4f9 13e9396
Author: Paulo Motta 
Authored: Tue Dec 20 12:14:43 2016 -0200
Committer: Paulo Motta 
Committed: Tue Dec 20 12:15:20 2016 -0200

--
 src/java/org/apache/cassandra/db/Keyspace.java | 24 +
 1 file changed, 15 insertions(+), 9 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/4ed9df6d/src/java/org/apache/cassandra/db/Keyspace.java
--
diff --cc src/java/org/apache/cassandra/db/Keyspace.java
index d9f8f62,217cf54..6e7e141
--- a/src/java/org/apache/cassandra/db/Keyspace.java
+++ b/src/java/org/apache/cassandra/db/Keyspace.java
@@@ -488,54 -466,24 +494,54 @@@ public class Keyspac
  if (requiresViewUpdate)
  {
  mutation.viewLockAcquireStart.compareAndSet(0L, 
System.currentTimeMillis());
 -while (true)
 -{
 -if (TEST_FAIL_MV_LOCKS_COUNT == 0)
 -lock = 
ViewManager.acquireLockFor(mutation.key().getKey());
 -else
 -TEST_FAIL_MV_LOCKS_COUNT--;
  
 -if (lock == null)
 +// the order of lock acquisition doesn't matter (from a deadlock 
perspective) because we only use tryLock()
 +Collection columnFamilyIds = mutation.getColumnFamilyIds();
 +Iterator idIterator = columnFamilyIds.iterator();
 +
 +locks = new Lock[columnFamilyIds.size()];
 +for (int i = 0; i < columnFamilyIds.size(); i++)
 +{
 +UUID cfid = idIterator.next();
 +int lockKey = Objects.hash(mutation.key().getKey(), cfid);
 +while (true)
  {
 -//throw WTE only if request is droppable
 -if (isDroppable && (System.currentTimeMillis() - 
mutation.createdAt) > DatabaseDescriptor.getWriteRpcTimeout())
 +Lock lock = null;
 +
 +if (TEST_FAIL_MV_LOCKS_COUNT == 0)
 +lock = ViewManager.acquireLockFor(lockKey);
 +else
 +TEST_FAIL_MV_LOCKS_COUNT--;
 +
 +if (lock == null)
  {
 -logger.trace("Could not acquire lock for {}", 
ByteBufferUtil.bytesToHex(mutation.key().getKey()));
 -Tracing.trace("Could not acquire MV lock");
 -if (future != null)
 +//throw WTE only if request is droppable
 +if (isDroppable && (System.currentTimeMillis() - 
mutation.createdAt) > DatabaseDescriptor.getWriteRpcTimeout())
 +{
 +for (int j = 0; j < i; j++)
 +locks[j].unlock();
 +
 +logger.trace("Could not acquire lock for {} and 
table {}", ByteBufferUtil.bytesToHex(mutation.key().getKey()), 
columnFamilyStores.get(cfid).name);
 +Tracing.trace("Could not acquire MV lock");
 +if (future != null)
 +{
 +future.completeExceptionally(new 
WriteTimeoutException(WriteType.VIEW, ConsistencyLevel.LOCAL_ONE, 0, 1));
 +return future;
 +}
 +else
 +throw new 
WriteTimeoutException(WriteType.VIEW, ConsistencyLevel.LOCAL_ONE, 0, 1);
 +}
 +else if (isDeferrable)
  {
 -future.completeExceptionally(new 
WriteTimeoutException(WriteType.VIEW, ConsistencyLevel.LOCAL_ONE, 0, 1));
 +for (int j = 0; j < i; j++)
 +locks[j].unlock();
 +
 +// This view update can't happen right now. so 
rather than keep this thread busy
 +// we will re-apply ourself to the queue and try 
again later
 +final CompletableFuture mark = future;
 +StageManager.getStage(Stage.MUTATION).execute(() 
->
-   
apply(mutation, writeCommitLog, true, isDroppable, true, mark)
++   

[2/3] cassandra git commit: Merge branch cassandra-3.0 into cassandra-3.11

2016-12-16 Thread blerer
Merge branch cassandra-3.0 into cassandra-3.11


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

Branch: refs/heads/cassandra-3.X
Commit: 01cb7879f2c6c497f9d2ae4a0ce73f7fd77a422d
Parents: 9924756 c612cd8
Author: Benjamin Lerer 
Authored: Fri Dec 16 12:44:29 2016 +0100
Committer: Benjamin Lerer 
Committed: Fri Dec 16 12:44:29 2016 +0100

--
 CHANGES.txt| 1 +
 src/java/org/apache/cassandra/db/LegacyLayout.java | 6 +-
 2 files changed, 6 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/01cb7879/CHANGES.txt
--
diff --cc CHANGES.txt
index 562b63d,5ae..e24dd19
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,114 -1,5 +1,115 @@@
 -3.0.11
 +3.10
 + * Remove outboundBindAny configuration property (CASSANDRA-12673)
 + * Use correct bounds for all-data range when filtering (CASSANDRA-12666)
 + * Remove timing window in test case (CASSANDRA-12875)
 + * Resolve unit testing without JCE security libraries installed 
(CASSANDRA-12945)
 + * Fix inconsistencies in cassandra-stress load balancing policy 
(CASSANDRA-12919)
 + * Fix validation of non-frozen UDT cells (CASSANDRA-12916)
 + * Don't shut down socket input/output on StreamSession (CASSANDRA-12903)
 + * Fix Murmur3PartitionerTest (CASSANDRA-12858)
 + * Move cqlsh syntax rules into separate module and allow easier 
customization (CASSANDRA-12897)
 + * Fix CommitLogSegmentManagerTest (CASSANDRA-12283)
 + * Fix cassandra-stress truncate option (CASSANDRA-12695)
 + * Fix crossNode value when receiving messages (CASSANDRA-12791)
 + * Don't load MX4J beans twice (CASSANDRA-12869)
 + * Extend native protocol request flags, add versions to SUPPORTED, and 
introduce ProtocolVersion enum (CASSANDRA-12838)
 + * Set JOINING mode when running pre-join tasks (CASSANDRA-12836)
 + * remove net.mintern.primitive library due to license issue (CASSANDRA-12845)
 + * Properly format IPv6 addresses when logging JMX service URL 
(CASSANDRA-12454)
 + * Optimize the vnode allocation for single replica per DC (CASSANDRA-12777)
 + * Use non-token restrictions for bounds when token restrictions are 
overridden (CASSANDRA-12419)
 + * Fix CQLSH auto completion for PER PARTITION LIMIT (CASSANDRA-12803)
 + * Use different build directories for Eclipse and Ant (CASSANDRA-12466)
 + * Avoid potential AttributeError in cqlsh due to no table metadata 
(CASSANDRA-12815)
 + * Fix RandomReplicationAwareTokenAllocatorTest.testExistingCluster 
(CASSANDRA-12812)
 + * Upgrade commons-codec to 1.9 (CASSANDRA-12790)
 + * Make the fanout size for LeveledCompactionStrategy to be configurable 
(CASSANDRA-11550)
 + * Add duration data type (CASSANDRA-11873)
 + * Fix timeout in ReplicationAwareTokenAllocatorTest (CASSANDRA-12784)
 + * Improve sum aggregate functions (CASSANDRA-12417)
 + * Make cassandra.yaml docs for batch_size_*_threshold_in_kb reflect changes 
in CASSANDRA-10876 (CASSANDRA-12761)
 + * cqlsh fails to format collections when using aliases (CASSANDRA-11534)
 + * Check for hash conflicts in prepared statements (CASSANDRA-12733)
 + * Exit query parsing upon first error (CASSANDRA-12598)
 + * Fix cassandra-stress to use single seed in UUID generation 
(CASSANDRA-12729)
 + * CQLSSTableWriter does not allow Update statement (CASSANDRA-12450)
 + * Config class uses boxed types but DD exposes primitive types 
(CASSANDRA-12199)
 + * Add pre- and post-shutdown hooks to Storage Service (CASSANDRA-12461)
 + * Add hint delivery metrics (CASSANDRA-12693)
 + * Remove IndexInfo cache from FileIndexInfoRetriever (CASSANDRA-12731)
 + * ColumnIndex does not reuse buffer (CASSANDRA-12502)
 + * cdc column addition still breaks schema migration tasks (CASSANDRA-12697)
 + * Upgrade metrics-reporter dependencies (CASSANDRA-12089)
 + * Tune compaction thread count via nodetool (CASSANDRA-12248)
 + * Add +=/-= shortcut syntax for update queries (CASSANDRA-12232)
 + * Include repair session IDs in repair start message (CASSANDRA-12532)
 + * Add a blocking task to Index, run before joining the ring (CASSANDRA-12039)
 + * Fix NPE when using CQLSSTableWriter (CASSANDRA-12667)
 + * Support optional backpressure strategies at the coordinator 
(CASSANDRA-9318)
 + * Make randompartitioner work with new vnode allocation (CASSANDRA-12647)
 + * Fix cassandra-stress graphing (CASSANDRA-12237)
 + * Allow filtering on partition key columns for queries without secondary 
indexes (CASSANDRA-11031)
 + * Fix Cassandra Stress reporting thread model and precision (CASSANDRA-12585)
 + * Add JMH 

[2/3] cassandra git commit: Merge branch 'cassandra-3.0' into cassandra-3.11

2016-12-15 Thread paulo
Merge branch 'cassandra-3.0' into cassandra-3.11


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

Branch: refs/heads/cassandra-3.X
Commit: 9924756da9c248c2365448998e63a36708188260
Parents: 489be96 2256778
Author: Paulo Motta 
Authored: Thu Dec 15 17:40:12 2016 -0200
Committer: Paulo Motta 
Committed: Thu Dec 15 17:40:12 2016 -0200

--
 CHANGES.txt |  1 +
 .../db/compaction/CompactionManager.java| 21 +++-
 .../cassandra/service/ActiveRepairService.java  |  4 ++--
 .../db/compaction/AntiCompactionTest.java   | 17 ++--
 4 files changed, 26 insertions(+), 17 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/9924756d/CHANGES.txt
--
diff --cc CHANGES.txt
index fa0c94a,a40dabd..562b63d
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,114 -1,5 +1,115 @@@
 -3.0.11
 +3.10
 + * Remove outboundBindAny configuration property (CASSANDRA-12673)
 + * Use correct bounds for all-data range when filtering (CASSANDRA-12666)
 + * Remove timing window in test case (CASSANDRA-12875)
 + * Resolve unit testing without JCE security libraries installed 
(CASSANDRA-12945)
 + * Fix inconsistencies in cassandra-stress load balancing policy 
(CASSANDRA-12919)
 + * Fix validation of non-frozen UDT cells (CASSANDRA-12916)
 + * Don't shut down socket input/output on StreamSession (CASSANDRA-12903)
 + * Fix Murmur3PartitionerTest (CASSANDRA-12858)
 + * Move cqlsh syntax rules into separate module and allow easier 
customization (CASSANDRA-12897)
 + * Fix CommitLogSegmentManagerTest (CASSANDRA-12283)
 + * Fix cassandra-stress truncate option (CASSANDRA-12695)
 + * Fix crossNode value when receiving messages (CASSANDRA-12791)
 + * Don't load MX4J beans twice (CASSANDRA-12869)
 + * Extend native protocol request flags, add versions to SUPPORTED, and 
introduce ProtocolVersion enum (CASSANDRA-12838)
 + * Set JOINING mode when running pre-join tasks (CASSANDRA-12836)
 + * remove net.mintern.primitive library due to license issue (CASSANDRA-12845)
 + * Properly format IPv6 addresses when logging JMX service URL 
(CASSANDRA-12454)
 + * Optimize the vnode allocation for single replica per DC (CASSANDRA-12777)
 + * Use non-token restrictions for bounds when token restrictions are 
overridden (CASSANDRA-12419)
 + * Fix CQLSH auto completion for PER PARTITION LIMIT (CASSANDRA-12803)
 + * Use different build directories for Eclipse and Ant (CASSANDRA-12466)
 + * Avoid potential AttributeError in cqlsh due to no table metadata 
(CASSANDRA-12815)
 + * Fix RandomReplicationAwareTokenAllocatorTest.testExistingCluster 
(CASSANDRA-12812)
 + * Upgrade commons-codec to 1.9 (CASSANDRA-12790)
 + * Make the fanout size for LeveledCompactionStrategy to be configurable 
(CASSANDRA-11550)
 + * Add duration data type (CASSANDRA-11873)
 + * Fix timeout in ReplicationAwareTokenAllocatorTest (CASSANDRA-12784)
 + * Improve sum aggregate functions (CASSANDRA-12417)
 + * Make cassandra.yaml docs for batch_size_*_threshold_in_kb reflect changes 
in CASSANDRA-10876 (CASSANDRA-12761)
 + * cqlsh fails to format collections when using aliases (CASSANDRA-11534)
 + * Check for hash conflicts in prepared statements (CASSANDRA-12733)
 + * Exit query parsing upon first error (CASSANDRA-12598)
 + * Fix cassandra-stress to use single seed in UUID generation 
(CASSANDRA-12729)
 + * CQLSSTableWriter does not allow Update statement (CASSANDRA-12450)
 + * Config class uses boxed types but DD exposes primitive types 
(CASSANDRA-12199)
 + * Add pre- and post-shutdown hooks to Storage Service (CASSANDRA-12461)
 + * Add hint delivery metrics (CASSANDRA-12693)
 + * Remove IndexInfo cache from FileIndexInfoRetriever (CASSANDRA-12731)
 + * ColumnIndex does not reuse buffer (CASSANDRA-12502)
 + * cdc column addition still breaks schema migration tasks (CASSANDRA-12697)
 + * Upgrade metrics-reporter dependencies (CASSANDRA-12089)
 + * Tune compaction thread count via nodetool (CASSANDRA-12248)
 + * Add +=/-= shortcut syntax for update queries (CASSANDRA-12232)
 + * Include repair session IDs in repair start message (CASSANDRA-12532)
 + * Add a blocking task to Index, run before joining the ring (CASSANDRA-12039)
 + * Fix NPE when using CQLSSTableWriter (CASSANDRA-12667)
 + * Support optional backpressure strategies at the coordinator 
(CASSANDRA-9318)
 + * Make randompartitioner work with new vnode allocation (CASSANDRA-12647)
 + * Fix cassandra-stress graphing (CASSANDRA-12237)
 + * Allow filtering on partition key columns for queries without 

[2/3] cassandra git commit: Merge branch cassandra-3.0 into cassandra-3.11

2016-12-15 Thread blerer
Merge branch cassandra-3.0 into cassandra-3.11


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

Branch: refs/heads/cassandra-3.X
Commit: 73547a3421cc92e07d0373846fc1bff796570275
Parents: 249e4b1 9fc1ffb
Author: Benjamin Lerer 
Authored: Thu Dec 15 18:04:34 2016 +0100
Committer: Benjamin Lerer 
Committed: Thu Dec 15 18:07:59 2016 +0100

--
 CHANGES.txt |  1 +
 .../restrictions/StatementRestrictions.java | 11 +++
 .../cql3/statements/BatchStatement.java | 11 ++-
 .../cql3/statements/ModificationStatement.java  | 10 ++-
 .../cql3/validation/operations/BatchTest.java   | 40 +++
 .../cql3/validation/operations/DeleteTest.java  | 57 
 .../operations/InsertUpdateIfConditionTest.java |  6 ++
 .../cql3/validation/operations/UpdateTest.java  | 70 
 8 files changed, 194 insertions(+), 12 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/73547a34/CHANGES.txt
--
diff --cc CHANGES.txt
index f95dd81,e69bf08..3db0179
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,114 -1,5 +1,115 @@@
 -3.0.11
 +3.10
 + * Remove outboundBindAny configuration property (CASSANDRA-12673)
 + * Use correct bounds for all-data range when filtering (CASSANDRA-12666)
 + * Remove timing window in test case (CASSANDRA-12875)
 + * Resolve unit testing without JCE security libraries installed 
(CASSANDRA-12945)
 + * Fix inconsistencies in cassandra-stress load balancing policy 
(CASSANDRA-12919)
 + * Fix validation of non-frozen UDT cells (CASSANDRA-12916)
 + * Don't shut down socket input/output on StreamSession (CASSANDRA-12903)
 + * Fix Murmur3PartitionerTest (CASSANDRA-12858)
 + * Move cqlsh syntax rules into separate module and allow easier 
customization (CASSANDRA-12897)
 + * Fix CommitLogSegmentManagerTest (CASSANDRA-12283)
 + * Fix cassandra-stress truncate option (CASSANDRA-12695)
 + * Fix crossNode value when receiving messages (CASSANDRA-12791)
 + * Don't load MX4J beans twice (CASSANDRA-12869)
 + * Extend native protocol request flags, add versions to SUPPORTED, and 
introduce ProtocolVersion enum (CASSANDRA-12838)
 + * Set JOINING mode when running pre-join tasks (CASSANDRA-12836)
 + * remove net.mintern.primitive library due to license issue (CASSANDRA-12845)
 + * Properly format IPv6 addresses when logging JMX service URL 
(CASSANDRA-12454)
 + * Optimize the vnode allocation for single replica per DC (CASSANDRA-12777)
 + * Use non-token restrictions for bounds when token restrictions are 
overridden (CASSANDRA-12419)
 + * Fix CQLSH auto completion for PER PARTITION LIMIT (CASSANDRA-12803)
 + * Use different build directories for Eclipse and Ant (CASSANDRA-12466)
 + * Avoid potential AttributeError in cqlsh due to no table metadata 
(CASSANDRA-12815)
 + * Fix RandomReplicationAwareTokenAllocatorTest.testExistingCluster 
(CASSANDRA-12812)
 + * Upgrade commons-codec to 1.9 (CASSANDRA-12790)
 + * Make the fanout size for LeveledCompactionStrategy to be configurable 
(CASSANDRA-11550)
 + * Add duration data type (CASSANDRA-11873)
 + * Fix timeout in ReplicationAwareTokenAllocatorTest (CASSANDRA-12784)
 + * Improve sum aggregate functions (CASSANDRA-12417)
 + * Make cassandra.yaml docs for batch_size_*_threshold_in_kb reflect changes 
in CASSANDRA-10876 (CASSANDRA-12761)
 + * cqlsh fails to format collections when using aliases (CASSANDRA-11534)
 + * Check for hash conflicts in prepared statements (CASSANDRA-12733)
 + * Exit query parsing upon first error (CASSANDRA-12598)
 + * Fix cassandra-stress to use single seed in UUID generation 
(CASSANDRA-12729)
 + * CQLSSTableWriter does not allow Update statement (CASSANDRA-12450)
 + * Config class uses boxed types but DD exposes primitive types 
(CASSANDRA-12199)
 + * Add pre- and post-shutdown hooks to Storage Service (CASSANDRA-12461)
 + * Add hint delivery metrics (CASSANDRA-12693)
 + * Remove IndexInfo cache from FileIndexInfoRetriever (CASSANDRA-12731)
 + * ColumnIndex does not reuse buffer (CASSANDRA-12502)
 + * cdc column addition still breaks schema migration tasks (CASSANDRA-12697)
 + * Upgrade metrics-reporter dependencies (CASSANDRA-12089)
 + * Tune compaction thread count via nodetool (CASSANDRA-12248)
 + * Add +=/-= shortcut syntax for update queries (CASSANDRA-12232)
 + * Include repair session IDs in repair start message (CASSANDRA-12532)
 + * Add a blocking task to Index, run before joining the ring (CASSANDRA-12039)
 + * Fix NPE when using CQLSSTableWriter (CASSANDRA-12667)
 + * Support optional backpressure