[2/2] cassandra git commit: Merge branch 'cassandra-2.1' into cassandra-2.2
Merge branch 'cassandra-2.1' into cassandra-2.2 Conflicts: src/java/org/apache/cassandra/service/pager/SliceQueryPager.java Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/0355a77a Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/0355a77a Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/0355a77a Branch: refs/heads/cassandra-2.2 Commit: 0355a77aa5273de54972daf46be5f6ebeb6f9a9e Parents: 9ad1330 b087897 Author: Sylvain Lebresne Authored: Fri Jul 24 09:25:15 2015 +0200 Committer: Sylvain Lebresne Committed: Fri Jul 24 09:25:15 2015 +0200 -- .../cassandra/service/pager/RangeSliceQueryPager.java | 5 - .../cassandra/service/pager/SliceQueryPager.java | 13 + 2 files changed, 13 insertions(+), 5 deletions(-) --
[2/2] cassandra git commit: Merge branch 'cassandra-2.1' into cassandra-2.2
Merge branch 'cassandra-2.1' into cassandra-2.2 Conflicts: CHANGES.txt src/java/org/apache/cassandra/config/ColumnDefinition.java Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/ee89c7e3 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/ee89c7e3 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/ee89c7e3 Branch: refs/heads/cassandra-2.2 Commit: ee89c7e308c5d853cf250dfbf0c0b3ee9ba1a984 Parents: fb4656f 172a975 Author: Sylvain Lebresne Authored: Wed Jul 22 10:04:32 2015 +0200 Committer: Sylvain Lebresne Committed: Wed Jul 22 10:04:32 2015 +0200 -- CHANGES.txt | 1 + src/java/org/apache/cassandra/schema/LegacySchemaTables.java | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/ee89c7e3/CHANGES.txt -- diff --cc CHANGES.txt index e1d1fba,0d015db..3895e1f --- a/CHANGES.txt +++ b/CHANGES.txt @@@ -1,13 -1,5 +1,14 @@@ -2.1.9 +2.2.1 + * UDF / UDA execution time in trace (CASSANDRA-9723) + * Remove repair snapshot leftover on startup (CASSANDRA-7357) + +2.2.0 + * Fix cqlsh copy methods and other windows specific issues (CASSANDRA-9795) + * Don't wrap byte arrays in SequentialWriter (CASSANDRA-9797) + * sum() and avg() functions missing for smallint and tinyint types (CASSANDRA-9671) + * Revert CASSANDRA-9542 (allow native functions in UDA) (CASSANDRA-9771) +Merged from 2.1: + * Fix MarshalException when upgrading superColumn family (CASSANDRA-9582) * Fix broken logging for "empty" flushes in Memtable (CASSANDRA-9837) * Handle corrupt files on startup (CASSANDRA-9686) * Fix clientutil jar and tests (CASSANDRA-9760) http://git-wip-us.apache.org/repos/asf/cassandra/blob/ee89c7e3/src/java/org/apache/cassandra/schema/LegacySchemaTables.java -- diff --cc src/java/org/apache/cassandra/schema/LegacySchemaTables.java index 1840829,000..30fe013 mode 100644,00..100644 --- a/src/java/org/apache/cassandra/schema/LegacySchemaTables.java +++ b/src/java/org/apache/cassandra/schema/LegacySchemaTables.java @@@ -1,1502 -1,0 +1,1502 @@@ +/* + * 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.schema; + +import java.io.IOException; +import java.nio.ByteBuffer; +import java.security.MessageDigest; +import java.security.NoSuchAlgorithmException; +import java.util.*; +import java.util.concurrent.TimeUnit; + +import com.google.common.base.Function; +import com.google.common.collect.Iterables; +import com.google.common.collect.MapDifference; +import com.google.common.collect.Maps; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import org.apache.cassandra.cache.CachingOptions; +import org.apache.cassandra.config.*; +import org.apache.cassandra.cql3.*; +import org.apache.cassandra.cql3.functions.*; +import org.apache.cassandra.db.*; +import org.apache.cassandra.db.columniterator.IdentityQueryFilter; +import org.apache.cassandra.db.composites.CellNameType; +import org.apache.cassandra.db.composites.CellNames; +import org.apache.cassandra.db.composites.Composite; +import org.apache.cassandra.db.filter.QueryFilter; +import org.apache.cassandra.db.index.SecondaryIndexManager; +import org.apache.cassandra.db.marshal.*; +import org.apache.cassandra.dht.Range; +import org.apache.cassandra.dht.Token; +import org.apache.cassandra.exceptions.ConfigurationException; +import org.apache.cassandra.exceptions.InvalidRequestException; +import org.apache.cassandra.io.compress.CompressionParameters; +import org.apache.cassandra.locator.AbstractReplicationStrategy; +import org.apache.cassandra.service.StorageService; +import org.apache.cassandra.utils.ByteBufferUtil; +import org.apache.cassandra.utils.FBUtilities; + +import static org.apache.cassandra.cql3.QueryProcessor.executeO
[2/2] cassandra git commit: Merge branch 'cassandra-2.1' into cassandra-2.2
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/d7a03e6c Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/d7a03e6c Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/d7a03e6c Branch: refs/heads/cassandra-2.2 Commit: d7a03e6c78ed759338663661fd6ed1e7a3b0d130 Parents: a65953d e726cf6 Author: Aleksey Yeschenko Authored: Tue Jul 21 22:02:08 2015 +0300 Committer: Aleksey Yeschenko Committed: Tue Jul 21 22:02:08 2015 +0300 -- .../org/apache/cassandra/cql3/statements/SelectStatement.java | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/d7a03e6c/src/java/org/apache/cassandra/cql3/statements/SelectStatement.java -- diff --cc src/java/org/apache/cassandra/cql3/statements/SelectStatement.java index e2708cd,26a1ee1..cd0eeaa --- a/src/java/org/apache/cassandra/cql3/statements/SelectStatement.java +++ b/src/java/org/apache/cassandra/cql3/statements/SelectStatement.java @@@ -1053,10 -2379,12 +1053,11 @@@ public class SelectStatement implement public static class Parameters { - private final Map orderings; - private final boolean isDistinct; - private final boolean allowFiltering; + // Public because CASSANDRA-9858 + public final Map orderings; + public final boolean isDistinct; -public final boolean isCount; -public final ColumnIdentifier countAlias; + public final boolean allowFiltering; +public final boolean isJson; public Parameters(Map orderings, boolean isDistinct,
[2/2] cassandra git commit: Merge branch 'cassandra-2.1' into cassandra-2.2
Merge branch 'cassandra-2.1' into cassandra-2.2 Conflicts: test/unit/org/apache/cassandra/locator/DynamicEndpointSnitchTest.java Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/d97fc9b7 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/d97fc9b7 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/d97fc9b7 Branch: refs/heads/cassandra-2.2 Commit: d97fc9b77f9ea332f9a908ee6c47326334a1211d Parents: 5e930e4 4fcd7d4 Author: Sylvain Lebresne Authored: Thu Jul 16 15:26:17 2015 +0200 Committer: Sylvain Lebresne Committed: Thu Jul 16 15:26:17 2015 +0200 -- .../locator/DynamicEndpointSnitchLongTest.java | 104 +++ .../locator/DynamicEndpointSnitchTest.java | 64 2 files changed, 104 insertions(+), 64 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/d97fc9b7/test/long/org/apache/cassandra/locator/DynamicEndpointSnitchLongTest.java -- diff --cc test/long/org/apache/cassandra/locator/DynamicEndpointSnitchLongTest.java index 000,1c628fa..841f73e mode 00,100644..100644 --- a/test/long/org/apache/cassandra/locator/DynamicEndpointSnitchLongTest.java +++ b/test/long/org/apache/cassandra/locator/DynamicEndpointSnitchLongTest.java @@@ -1,0 -1,104 +1,104 @@@ + /* + * 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.locator; + + import java.io.IOException; + import java.net.InetAddress; + import java.util.*; + + import org.apache.cassandra.config.DatabaseDescriptor; + import org.apache.cassandra.exceptions.ConfigurationException; + import org.apache.cassandra.service.StorageService; + import org.junit.Test; + + import org.apache.cassandra.utils.FBUtilities; + + import static org.junit.Assert.assertEquals; + + public class DynamicEndpointSnitchLongTest + { + @Test + public void testConcurrency() throws InterruptedException, IOException, ConfigurationException + { + // The goal of this test is to check for CASSANDRA-8448/CASSANDRA-9519 + double badness = DatabaseDescriptor.getDynamicBadnessThreshold(); + DatabaseDescriptor.setDynamicBadnessThreshold(0.0); + + try + { + final int ITERATIONS = 1; + + // do this because SS needs to be initialized before DES can work properly. -StorageService.instance.initClient(0); ++StorageService.instance.unsafeInitialize(); + SimpleSnitch ss = new SimpleSnitch(); + DynamicEndpointSnitch dsnitch = new DynamicEndpointSnitch(ss, String.valueOf(ss.hashCode())); + InetAddress self = FBUtilities.getBroadcastAddress(); + + List hosts = new ArrayList<>(); + // We want a big list of hosts so sorting takes time, making it much more likely to reproduce the + // problem we're looking for. + for (int i = 0; i < 100; i++) + for (int j = 0; j < 256; j++) + hosts.add(InetAddress.getByAddress(new byte[]{127, 0, (byte)i, (byte)j})); + + ScoreUpdater updater = new ScoreUpdater(dsnitch, hosts); + updater.start(); + + List result = null; + for (int i = 0; i < ITERATIONS; i++) + result = dsnitch.getSortedListByProximity(self, hosts); + + updater.stopped = true; + updater.join(); + } + finally + { + DatabaseDescriptor.setDynamicBadnessThreshold(badness); + } + } + + public static class ScoreUpdater extends Thread + { + private static final int SCORE_RANGE = 100; + + public volatile boolean stopped; + + private final DynamicEndpointSnitch dsnitch; + private final List hosts; + private final Random random = new Random(); + + public ScoreUpdater(DynamicEndpointSnitch dsnitch, List hosts) + { + this.dsnitch =
[2/2] cassandra git commit: Merge branch 'cassandra-2.1' into cassandra-2.2
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/5e930e4e Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/5e930e4e Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/5e930e4e Branch: refs/heads/cassandra-2.2 Commit: 5e930e4e1b46233011675f08ebdf5f4c10137332 Parents: 82e2004 9ff5d44 Author: blerer Authored: Thu Jul 16 14:30:35 2015 +0200 Committer: blerer Committed: Thu Jul 16 14:30:58 2015 +0200 -- src/java/org/apache/cassandra/db/ReadResponse.java | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) --
[2/2] cassandra git commit: Merge branch 'cassandra-2.1' into cassandra-2.2
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/6a40b812 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/6a40b812 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/6a40b812 Branch: refs/heads/cassandra-2.2 Commit: 6a40b8128697cffc586059984dce71fcf6dfda59 Parents: af0cd32 07103dd Author: blerer Authored: Wed Jul 15 17:02:58 2015 +0200 Committer: blerer Committed: Wed Jul 15 17:05:06 2015 +0200 -- .../cassandra/service/ResponseResolverTest.java | 325 +++ 1 file changed, 325 insertions(+) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/6a40b812/test/unit/org/apache/cassandra/service/ResponseResolverTest.java -- diff --cc test/unit/org/apache/cassandra/service/ResponseResolverTest.java index 000,54e584d..7e42825 mode 00,100644..100644 --- a/test/unit/org/apache/cassandra/service/ResponseResolverTest.java +++ b/test/unit/org/apache/cassandra/service/ResponseResolverTest.java @@@ -1,0 -1,306 +1,325 @@@ + /* + * 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.service; + + + import java.net.InetAddress; + import java.net.UnknownHostException; + import java.nio.ByteBuffer; + import java.util.*; + import java.util.concurrent.CountDownLatch; + import java.util.concurrent.ExecutorService; + import java.util.concurrent.Executors; + ++import org.junit.BeforeClass; + import org.junit.Test; + ++import org.apache.cassandra.config.KSMetaData; ++import org.apache.cassandra.exceptions.ConfigurationException; ++import org.apache.cassandra.locator.SimpleStrategy; ++ + import org.apache.cassandra.SchemaLoader; + import org.apache.cassandra.db.*; + import org.apache.cassandra.db.filter.ColumnSlice; + import org.apache.cassandra.db.filter.SliceQueryFilter; + import org.apache.cassandra.net.MessageIn; + import org.apache.cassandra.net.MessagingService; + + import static org.apache.cassandra.Util.column; + import static org.apache.cassandra.utils.ByteBufferUtil.bytes; + import static org.junit.Assert.assertEquals; + import static org.junit.Assert.assertNotNull; + import static org.junit.Assert.fail; + + public class ResponseResolverTest extends SchemaLoader + { -private final String KEYSPACE = "Keyspace1"; -private final String TABLE = "Standard1"; ++private final static String KEYSPACE = "Keyspace1"; ++private final static String TABLE = "Standard1"; ++private final static int MAX_RESPONSE_COUNT = 3; + ++@BeforeClass ++public static void defineSchema() throws ConfigurationException ++{ ++SchemaLoader.prepareServer(); ++SchemaLoader.createKeyspace(KEYSPACE, ++SimpleStrategy.class, ++KSMetaData.optsWithRF(MAX_RESPONSE_COUNT), ++SchemaLoader.standardCFMD(KEYSPACE, TABLE)); ++} ++ + @Test + public void testSingleMessage_RowDigestResolver() throws DigestMismatchException, UnknownHostException + { + ByteBuffer key = bytes("key"); + ColumnFamily cf = ArrayBackedSortedColumns.factory.create(KEYSPACE, TABLE); + cf.addColumn(column("c1", "v1", 0)); + Row row = new Row(key, cf); + -testReadResponses(new RowDigestResolver(KEYSPACE, key), row, makeReadResponse("127.0.0.1", row)); ++testReadResponses(new RowDigestResolver(KEYSPACE, key, MAX_RESPONSE_COUNT), row, makeReadResponse("127.0.0.1", row)); + } + + @Test + public void testMultipleMessages_RowDigestResolver() throws DigestMismatchException, UnknownHostException + { + ByteBuffer key = bytes("key"); + ColumnFamily cf = ArrayBackedSortedColumns.factory.create(KEYSPACE, TABLE); + cf.addColumn(column("c1", "v1", 0)); + Row row = new Row(key, cf); + -testReadResponses(new RowDigestResolver(KEYSPACE, key), ++
[2/2] cassandra git commit: Merge branch 'cassandra-2.1' into cassandra-2.2
Merge branch 'cassandra-2.1' into cassandra-2.2 Conflicts: CHANGES.txt Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/c33ebcd2 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/c33ebcd2 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/c33ebcd2 Branch: refs/heads/cassandra-2.2 Commit: c33ebcd2fd09704ac1cdfa81d12978b9f582b404 Parents: 056 9d44186 Author: Sylvain Lebresne Authored: Wed Jul 15 10:30:32 2015 +0200 Committer: Sylvain Lebresne Committed: Wed Jul 15 10:30:32 2015 +0200 -- CHANGES.txt | 1 + .../locator/DynamicEndpointSnitch.java | 34 -- .../locator/DynamicEndpointSnitchTest.java | 69 +++- 3 files changed, 95 insertions(+), 9 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/c33ebcd2/CHANGES.txt -- diff --cc CHANGES.txt index 3046ceb,1e21c8d..c2d06e4 --- a/CHANGES.txt +++ b/CHANGES.txt @@@ -1,7 -1,5 +1,8 @@@ -2.1.9 +2.2.0-rc3 + * sum() and avg() functions missing for smallint and tinyint types (CASSANDRA-9671) + * Revert CASSANDRA-9542 (allow native functions in UDA) (CASSANDRA-9771) +Merged from 2.1: + * 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 http://git-wip-us.apache.org/repos/asf/cassandra/blob/c33ebcd2/src/java/org/apache/cassandra/locator/DynamicEndpointSnitch.java -- diff --cc src/java/org/apache/cassandra/locator/DynamicEndpointSnitch.java index b670b6a,6b6286f..3e89dd4 --- a/src/java/org/apache/cassandra/locator/DynamicEndpointSnitch.java +++ b/src/java/org/apache/cassandra/locator/DynamicEndpointSnitch.java @@@ -216,12 -229,20 +230,20 @@@ public class DynamicEndpointSnitch exte return 1; } + public int compareEndpoints(InetAddress target, InetAddress a1, InetAddress a2) + { + // That function is fundamentally unsafe because the scores can change at any time and so the result of that + // method is not stable for identical arguments. This is why we don't rely on super.sortByProximity() in + // sortByProximityWithScore(). + throw new UnsupportedOperationException("You shouldn't wrap the DynamicEndpointSnitch (within itself or otherwise)"); + } + public void receiveTiming(InetAddress host, long latency) // this is cheap { -ExponentiallyDecayingSample sample = samples.get(host); +ExponentiallyDecayingReservoir sample = samples.get(host); if (sample == null) { -ExponentiallyDecayingSample maybeNewSample = new ExponentiallyDecayingSample(WINDOW_SIZE, ALPHA); +ExponentiallyDecayingReservoir maybeNewSample = new ExponentiallyDecayingReservoir(WINDOW_SIZE, ALPHA); sample = samples.putIfAbsent(host, maybeNewSample); if (sample == null) sample = maybeNewSample; @@@ -265,10 -286,10 +287,9 @@@ scores = newScores; } - private void reset() { -for (ExponentiallyDecayingSample sample : samples.values()) -sample.clear(); + samples.clear(); } public Map getScores() http://git-wip-us.apache.org/repos/asf/cassandra/blob/c33ebcd2/test/unit/org/apache/cassandra/locator/DynamicEndpointSnitchTest.java -- diff --cc test/unit/org/apache/cassandra/locator/DynamicEndpointSnitchTest.java index c7c1f17,3f90532..64da6d3 --- a/test/unit/org/apache/cassandra/locator/DynamicEndpointSnitchTest.java +++ b/test/unit/org/apache/cassandra/locator/DynamicEndpointSnitchTest.java @@@ -90,4 -90,67 +90,67 @@@ public class DynamicEndpointSnitchTes order = Arrays.asList(host1, host3, host2); assertEquals(order, dsnitch.getSortedListByProximity(self, Arrays.asList(host1, host2, host3))); } - } + + @Test + public void testConcurrency() throws InterruptedException, IOException, ConfigurationException + { + // The goal of this test is to check for CASSANDRA-8448/CASSANDRA-9519 + double badness = DatabaseDescriptor.getDynamicBadnessThreshold(); + DatabaseDescriptor.setDynamicBadnessThreshold(0.0); + + final int ITERATIONS = 10; + + // do this because SS needs to be initialized before DES can work properly. -StorageService.instance.initClient(0); ++StorageService.instance.unsafeInitialize(); + SimpleSnitch ss = new SimpleSnitch();
[2/2] cassandra git commit: Merge branch 'cassandra-2.1' into cassandra-2.2
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/591216bf Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/591216bf Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/591216bf Branch: refs/heads/cassandra-2.2 Commit: 591216bf6f67bd1fe23647ede31ab3c48d76f7cd Parents: 136ffed 19c00f7 Author: Tyler Hobbs Authored: Thu Jul 9 12:30:46 2015 -0500 Committer: Tyler Hobbs Committed: Thu Jul 9 12:30:46 2015 -0500 -- --
[2/2] cassandra git commit: Merge branch 'cassandra-2.1' into cassandra-2.2
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/a11f9b6f Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/a11f9b6f Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/a11f9b6f Branch: refs/heads/cassandra-2.2 Commit: a11f9b6f0d9b8752a1d6ea1eec4a1b038ef7cc8f Parents: 882cf25 89d8134 Author: Sylvain Lebresne Authored: Wed Jul 8 21:54:31 2015 +0200 Committer: Sylvain Lebresne Committed: Wed Jul 8 21:54:31 2015 +0200 -- .../operations/InsertUpdateIfCondition.java | 861 --- .../operations/InsertUpdateIfConditionTest.java | 861 +++ 2 files changed, 861 insertions(+), 861 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/a11f9b6f/test/unit/org/apache/cassandra/cql3/validation/operations/InsertUpdateIfConditionTest.java -- diff --cc test/unit/org/apache/cassandra/cql3/validation/operations/InsertUpdateIfConditionTest.java index 000,0438f13..522495c mode 00,100644..100644 --- a/test/unit/org/apache/cassandra/cql3/validation/operations/InsertUpdateIfConditionTest.java +++ b/test/unit/org/apache/cassandra/cql3/validation/operations/InsertUpdateIfConditionTest.java @@@ -1,0 -1,861 +1,861 @@@ + /* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + package org.apache.cassandra.cql3.validation.operations; + + import org.junit.Test; + + import org.apache.cassandra.cql3.CQLTester; + import org.apache.cassandra.exceptions.InvalidRequestException; + import org.apache.cassandra.exceptions.SyntaxException; + + import static org.junit.Assert.assertEquals; + import static org.junit.Assert.assertTrue; + import static org.junit.Assert.fail; + + public class InsertUpdateIfConditionTest extends CQLTester + { + /** + * Migrated from cql_tests.py:TestCQL.cas_simple_test() + */ + @Test + public void testSimpleCas() throws Throwable + { + createTable("CREATE TABLE %s (tkn int, consumed boolean, PRIMARY KEY (tkn))"); + + for (int i = 0; i < 10; i++) + { + execute("INSERT INTO %s (tkn, consumed) VALUES (?, FALSE)", i); + + assertRows(execute("UPDATE %s SET consumed = TRUE WHERE tkn = ? IF consumed = FALSE", i), row(true)); + assertRows(execute("UPDATE %s SET consumed = TRUE WHERE tkn = ? IF consumed = FALSE", i), row(false, true)); + } + } + + /** + * Migrated from cql_tests.py:TestCQL.conditional_update_test() + */ + @Test + public void testConditionalUpdate() throws Throwable + { + createTable(" CREATE TABLE %s (k int PRIMARY KEY, v1 int, v2 text, v3 int)"); + + // Shouldn't apply + assertRows(execute("UPDATE %s SET v1 = 3, v2 = 'bar' WHERE k = 0 IF v1 = 4"), row(false)); + assertRows(execute("UPDATE %s SET v1 = 3, v2 = 'bar' WHERE k = 0 IF EXISTS"), row(false)); + + // Should apply + assertRows(execute("INSERT INTO %s (k, v1, v2) VALUES (0, 2, 'foo') IF NOT EXISTS"), row(true)); + + // Shouldn't apply + assertRows(execute("INSERT INTO %s (k, v1, v2) VALUES (0, 5, 'bar') IF NOT EXISTS"), row(false, 0, 2, "foo", null)); + assertRows(execute("SELECT * FROM %s"), row(0, 2, "foo", null)); + + // Shouldn't apply + assertRows(execute("UPDATE %s SET v1 = 3, v2 = 'bar' WHERE k = 0 IF v1 = 4"), row(false, 2)); + assertRows(execute("SELECT * FROM %s"), row(0, 2, "foo", null)); + + // Should apply (note: we want v2 before v1 in the statement order to exercise #5786) + assertRows(execute("UPDATE %s SET v2 = 'bar', v1 = 3 WHERE k = 0 IF v1 = 2"), row(true)); + assertRows(execute("UPDATE %s SET v2 = 'bar', v1 = 3 WHERE k = 0 IF EXISTS"), row(true)); + assertRows(execute("SELECT * FROM %s"), row(0, 3, "bar", null)); + + // Shouldn't apply, only one condition is ok + asse
[2/2] cassandra git commit: Merge branch 'cassandra-2.1' into cassandra-2.2
Merge branch 'cassandra-2.1' into cassandra-2.2 Conflicts: CHANGES.txt src/java/org/apache/cassandra/utils/FBUtilities.java Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/882cf258 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/882cf258 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/882cf258 Branch: refs/heads/cassandra-2.2 Commit: 882cf258412e54724dbcfd9c8c7ecc84d315693e Parents: 1644599 08f4f5a Author: T Jake Luciani Authored: Wed Jul 8 15:15:37 2015 -0400 Committer: T Jake Luciani Committed: Wed Jul 8 15:15:58 2015 -0400 -- CHANGES.txt | 4 +- build.xml | 13 ++- .../org/apache/cassandra/utils/FBUtilities.java | 41 +--- 3 files changed, 16 insertions(+), 42 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/882cf258/CHANGES.txt -- diff --cc CHANGES.txt index 2172672,568571d..cc7b109 --- a/CHANGES.txt +++ b/CHANGES.txt @@@ -1,8 -1,9 +1,10 @@@ -2.1.9 +2.2.0-rc3 - Merged from 2.0: ++Merged from 2.1: + * 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: - * Scrub (recover) sstables even when -Index.db is missing, (CASSANDRA-9591) + * Scrub (recover) sstables even when -Index.db is missing (CASSANDRA-9591) * Fix growing pending background compaction (CASSANDRA-9662) http://git-wip-us.apache.org/repos/asf/cassandra/blob/882cf258/build.xml -- diff --cc build.xml index 360accf,435d4a0..ebde62a --- a/build.xml +++ b/build.xml @@@ -848,6 -832,7 +848,7 @@@ - ++ http://git-wip-us.apache.org/repos/asf/cassandra/blob/882cf258/src/java/org/apache/cassandra/utils/FBUtilities.java -- diff --cc src/java/org/apache/cassandra/utils/FBUtilities.java index df65572,1b118ba..ce118b9 --- a/src/java/org/apache/cassandra/utils/FBUtilities.java +++ b/src/java/org/apache/cassandra/utils/FBUtilities.java @@@ -48,12 -52,10 +48,12 @@@ import org.apache.cassandra.dht.Range import org.apache.cassandra.dht.Token; import org.apache.cassandra.exceptions.ConfigurationException; import org.apache.cassandra.io.IVersionedSerializer; +import org.apache.cassandra.io.compress.CompressionParameters; import org.apache.cassandra.io.util.DataOutputBuffer; -import org.apache.cassandra.io.util.IAllocator; +import org.apache.cassandra.io.util.DataOutputBufferFixed; +import org.apache.cassandra.io.util.FileUtils; import org.apache.cassandra.net.AsyncOneResponse; - import org.apache.thrift.*; + import org.codehaus.jackson.JsonFactory; import org.codehaus.jackson.map.ObjectMapper;
[2/2] cassandra git commit: Merge branch 'cassandra-2.1' into cassandra-2.2
Merge branch 'cassandra-2.1' into cassandra-2.2 Conflicts: CHANGES.txt Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/12ff1cda Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/12ff1cda Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/12ff1cda Branch: refs/heads/cassandra-2.2 Commit: 12ff1cda7027f76c9b649f674d1e99459164a3fe Parents: 0f5dd22 30df089 Author: Tyler Hobbs Authored: Tue Jul 7 15:49:00 2015 -0500 Committer: Tyler Hobbs Committed: Tue Jul 7 15:49:00 2015 -0500 -- CHANGES.txt | 2 ++ pylib/cqlshlib/sslhandling.py | 15 +-- 2 files changed, 15 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/12ff1cda/CHANGES.txt -- diff --cc CHANGES.txt index a863ad8,0fbadbc..864eed2 --- a/CHANGES.txt +++ b/CHANGES.txt @@@ -1,33 -1,14 +1,35 @@@ -2.1.9 +2.2.0-rc3 +Merged from 2.0: + * (cqlsh) Allow the SSL protocol version to be specified through the +config file or environment variables (CASSANDRA-9544) -Merged from 2.0: - * Scrub (recover) sstables even when -Index.db is missing, (CASSANDRA-9591) + * Scrub (recover) sstables even when -Index.db is missing (CASSANDRA-9591) -2.1.8 +2.2.0-rc2 + * Re-enable memory-mapped I/O on Windows (CASSANDRA-9658) + * Warn when an extra-large partition is compacted (CASSANDRA-9643) + * (cqlsh) Allow setting the initial connection timeout (CASSANDRA-9601) + * BulkLoader has --transport-factory option but does not use it (CASSANDRA-9675) + * Allow JMX over SSL directly from nodetool (CASSANDRA-9090) + * Update cqlsh for UDFs (CASSANDRA-7556) + * Change Windows kernel default timer resolution (CASSANDRA-9634) + * Deprected sstable2json and json2sstable (CASSANDRA-9618) + * Allow native functions in user-defined aggregates (CASSANDRA-9542) + * Don't repair system_distributed by default (CASSANDRA-9621) + * Fix mixing min, max, and count aggregates for blob type (CASSANRA-9622) + * Rename class for DATE type in Java driver (CASSANDRA-9563) + * Duplicate compilation of UDFs on coordinator (CASSANDRA-9475) + * Fix connection leak in CqlRecordWriter (CASSANDRA-9576) + * Mlockall before opening system sstables & remove boot_without_jna option (CASSANDRA-9573) + * Add functions to convert timeuuid to date or time, deprecate dateOf and unixTimestampOf (CASSANDRA-9229) + * Make sure we cancel non-compacting sstables from LifecycleTransaction (CASSANDRA-9566) + * Fix deprecated repair JMX API (CASSANDRA-9570) + * Add logback metrics (CASSANDRA-9378) + * Update and refactor ant test/test-compression to run the tests in parallel (CASSANDRA-9583) + * Fix upgrading to new directory for secondary index (CASSANDRA-9687) +Merged from 2.1: * (cqlsh) Fix bad check for CQL compatibility when DESCRIBE'ing COMPACT STORAGE tables with no clustering columns - * Warn when an extra-large partition is compacted (CASSANDRA-9643) * Eliminate strong self-reference chains in sstable ref tidiers (CASSANDRA-9656) * Ensure StreamSession uses canonical sstable reader instances (CASSANDRA-9700) * Ensure memtable book keeping is not corrupted in the event we shrink usage (CASSANDRA-9681)
[2/2] cassandra git commit: Merge branch 'cassandra-2.1' into cassandra-2.2
Merge branch 'cassandra-2.1' into cassandra-2.2 Conflicts: build.xml Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/7d31068d Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/7d31068d Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/7d31068d Branch: refs/heads/cassandra-2.2 Commit: 7d31068da952fb2990226057b52d17fb93f4eaa8 Parents: ebc50d7 4de943f Author: T Jake Luciani Authored: Tue Jul 7 10:47:36 2015 -0400 Committer: T Jake Luciani Committed: Tue Jul 7 10:47:36 2015 -0400 -- build.xml | 1 + 1 file changed, 1 insertion(+) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/7d31068d/build.xml -- diff --cc build.xml index 2300ca3,cf9788a..360accf --- a/build.xml +++ b/build.xml @@@ -360,8 -388,7 +360,9 @@@ - + + ++
[2/2] cassandra git commit: Merge branch 'cassandra-2.1' into cassandra-2.2
Merge branch 'cassandra-2.1' into cassandra-2.2 Conflicts: CHANGES.txt Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/ff74eaf0 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/ff74eaf0 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/ff74eaf0 Branch: refs/heads/cassandra-2.2 Commit: ff74eaf0e05b9dfecfb9f04850791114da2b3cf4 Parents: 269059e db39257 Author: T Jake Luciani Authored: Mon Jul 6 12:26:01 2015 -0400 Committer: T Jake Luciani Committed: Mon Jul 6 12:26:01 2015 -0400 -- CHANGES.txt | 2 ++ ...assandra-driver-internal-only-2.6.0c2.post.zip | Bin 0 -> 198346 bytes lib/cassandra-driver-internal-only-2.6.0c2.zip| Bin 199328 -> 0 bytes 3 files changed, 2 insertions(+) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/ff74eaf0/CHANGES.txt -- diff --cc CHANGES.txt index 9973bbc,95dc8be..7c6b4ad --- a/CHANGES.txt +++ b/CHANGES.txt @@@ -1,26 -1,7 +1,28 @@@ -2.1.8 +2.2.0-rc2 + * Re-enable memory-mapped I/O on Windows (CASSANDRA-9658) + * Warn when an extra-large partition is compacted (CASSANDRA-9643) + * (cqlsh) Allow setting the initial connection timeout (CASSANDRA-9601) + * BulkLoader has --transport-factory option but does not use it (CASSANDRA-9675) + * Allow JMX over SSL directly from nodetool (CASSANDRA-9090) + * Update cqlsh for UDFs (CASSANDRA-7556) + * Change Windows kernel default timer resolution (CASSANDRA-9634) + * Deprected sstable2json and json2sstable (CASSANDRA-9618) + * Allow native functions in user-defined aggregates (CASSANDRA-9542) + * Don't repair system_distributed by default (CASSANDRA-9621) + * Fix mixing min, max, and count aggregates for blob type (CASSANRA-9622) + * Rename class for DATE type in Java driver (CASSANDRA-9563) + * Duplicate compilation of UDFs on coordinator (CASSANDRA-9475) + * Fix connection leak in CqlRecordWriter (CASSANDRA-9576) + * Mlockall before opening system sstables & remove boot_without_jna option (CASSANDRA-9573) + * Add functions to convert timeuuid to date or time, deprecate dateOf and unixTimestampOf (CASSANDRA-9229) + * Make sure we cancel non-compacting sstables from LifecycleTransaction (CASSANDRA-9566) + * Fix deprecated repair JMX API (CASSANDRA-9570) + * Add logback metrics (CASSANDRA-9378) + * Update and refactor ant test/test-compression to run the tests in parallel (CASSANDRA-9583) + * Fix upgrading to new directory for secondary index (CASSANDRA-9687) +Merged from 2.1: + * (cqlsh) Fix bad check for CQL compatibility when DESCRIBE'ing +COMPACT STORAGE tables with no clustering columns - * Warn when an extra-large partition is compacted (CASSANDRA-9643) * Eliminate strong self-reference chains in sstable ref tidiers (CASSANDRA-9656) * Ensure StreamSession uses canonical sstable reader instances (CASSANDRA-9700) * Ensure memtable book keeping is not corrupted in the event we shrink usage (CASSANDRA-9681)
[2/2] cassandra git commit: Merge branch 'cassandra-2.1' into cassandra-2.2
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/269059e8 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/269059e8 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/269059e8 Branch: refs/heads/cassandra-2.2 Commit: 269059e8eb09bfa03bdd6ade9c33d91cc0cf5f3b Parents: 63e122c eb875b4 Author: T Jake Luciani Authored: Mon Jul 6 11:20:44 2015 -0400 Committer: T Jake Luciani Committed: Mon Jul 6 11:20:44 2015 -0400 -- --
[2/2] cassandra git commit: Merge branch 'cassandra-2.1' into cassandra-2.2
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/92e2e4e4 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/92e2e4e4 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/92e2e4e4 Branch: refs/heads/cassandra-2.2 Commit: 92e2e4e46d93003e025add6c2c7ab4840bcfdabf Parents: c80964a c5f03a9 Author: Tyler Hobbs Authored: Wed Jul 1 17:23:05 2015 -0500 Committer: Tyler Hobbs Committed: Wed Jul 1 17:23:05 2015 -0500 -- --
[2/2] cassandra git commit: Merge branch 'cassandra-2.1' into cassandra-2.2
Merge branch 'cassandra-2.1' into cassandra-2.2 Conflicts: CHANGES.txt Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/1e237d5a Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/1e237d5a Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/1e237d5a Branch: refs/heads/cassandra-2.2 Commit: 1e237d5a884687805a007410a15328c5ba97cc24 Parents: 5892732 c65d81b Author: T Jake Luciani Authored: Tue Jun 30 09:28:02 2015 -0400 Committer: T Jake Luciani Committed: Tue Jun 30 09:28:02 2015 -0400 -- CHANGES.txt| 1 + lib/cassandra-driver-internal-only-2.6.0c1.zip | Bin 198898 -> 0 bytes lib/cassandra-driver-internal-only-2.6.0c2.zip | Bin 0 -> 199328 bytes 3 files changed, 1 insertion(+) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/1e237d5a/CHANGES.txt -- diff --cc CHANGES.txt index fe71ea7,052ced1..fc3c4c8 --- a/CHANGES.txt +++ b/CHANGES.txt @@@ -1,22 -1,5 +1,23 @@@ -2.1.8 +2.2 + * BulkLoader has --transport-factory option but does not use it (CASSANDRA-9675) + * Allow JMX over SSL directly from nodetool (CASSANDRA-9090) + * Update cqlsh for UDFs (CASSANDRA-7556) + * Change Windows kernel default timer resolution (CASSANDRA-9634) + * Deprected sstable2json and json2sstable (CASSANDRA-9618) + * Allow native functions in user-defined aggregates (CASSANDRA-9542) + * Don't repair system_distributed by default (CASSANDRA-9621) + * Fix mixing min, max, and count aggregates for blob type (CASSANRA-9622) + * Rename class for DATE type in Java driver (CASSANDRA-9563) + * Duplicate compilation of UDFs on coordinator (CASSANDRA-9475) + * Fix connection leak in CqlRecordWriter (CASSANDRA-9576) + * Mlockall before opening system sstables & remove boot_without_jna option (CASSANDRA-9573) + * Add functions to convert timeuuid to date or time, deprecate dateOf and unixTimestampOf (CASSANDRA-9229) + * Make sure we cancel non-compacting sstables from LifecycleTransaction (CASSANDRA-9566) + * Fix deprecated repair JMX API (CASSANDRA-9570) + * Add logback metrics (CASSANDRA-9378) + * Update and refactor ant test/test-compression to run the tests in parallel (CASSANDRA-9583) +Merged from 2.1: + * Update internal python driver for cqlsh (CASSANDRA-9064) * Avoids ballot clash in Paxos (CASSANDRA-9649) * Fix IndexOutOfBoundsException when inserting tuple with too many elements using the string literal notation (CASSANDRA-9559)
[2/2] cassandra git commit: Merge branch 'cassandra-2.1' into cassandra-2.2
Merge branch 'cassandra-2.1' into cassandra-2.2 Conflicts: CHANGES.txt src/java/org/apache/cassandra/db/marshal/TupleType.java Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/afc50938 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/afc50938 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/afc50938 Branch: refs/heads/cassandra-2.2 Commit: afc509384c219f503211f1440479495d30c4ebb8 Parents: 3200d6c c233270 Author: Tyler Hobbs Authored: Fri Jun 26 12:30:54 2015 -0500 Committer: Tyler Hobbs Committed: Fri Jun 26 12:30:54 2015 -0500 -- CHANGES.txt | 2 ++ .../apache/cassandra/db/marshal/TupleType.java | 6 - .../cql3/validation/entities/TupleTypeTest.java | 27 +++- 3 files changed, 33 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/afc50938/CHANGES.txt -- diff --cc CHANGES.txt index 8cac598,874c8ee..a4e348e --- a/CHANGES.txt +++ b/CHANGES.txt @@@ -1,29 -1,18 +1,31 @@@ -2.1.8 +2.2 + * Allow JMX over SSL directly from nodetool (CASSANDRA-9090) + * Update cqlsh for UDFs (CASSANDRA-7556) + * Change Windows kernel default timer resolution (CASSANDRA-9634) + * Deprected sstable2json and json2sstable (CASSANDRA-9618) + * Allow native functions in user-defined aggregates (CASSANDRA-9542) + * Don't repair system_distributed by default (CASSANDRA-9621) + * Fix mixing min, max, and count aggregates for blob type (CASSANRA-9622) + * Rename class for DATE type in Java driver (CASSANDRA-9563) + * Duplicate compilation of UDFs on coordinator (CASSANDRA-9475) + * Fix connection leak in CqlRecordWriter (CASSANDRA-9576) + * Mlockall before opening system sstables & remove boot_without_jna option (CASSANDRA-9573) + * Add functions to convert timeuuid to date or time, deprecate dateOf and unixTimestampOf (CASSANDRA-9229) + * Make sure we cancel non-compacting sstables from LifecycleTransaction (CASSANDRA-9566) + * Fix deprecated repair JMX API (CASSANDRA-9570) + * Add logback metrics (CASSANDRA-9378) + * Update and refactor ant test/test-compression to run the tests in parallel (CASSANDRA-9583) +Merged from 2.1: + * Fix IndexOutOfBoundsException when inserting tuple with too many +elements using the string literal notation (CASSANDRA-9559) - * Allow JMX over SSL directly from nodetool (CASSANDRA-9090) - * Fix incorrect result for IN queries where column not found (CASSANDRA-9540) * Enable describe on indices (CASSANDRA-7814) + * Fix incorrect result for IN queries where column not found (CASSANDRA-9540) * ColumnFamilyStore.selectAndReference may block during compaction (CASSANDRA-9637) -Merged from 2.0 - * 'WITH WITH' in alter keyspace statements causes NPE (CASSANDRA-9565) - - -2.1.7 * Fix bug in cardinality check when compacting (CASSANDRA-9580) * Fix memory leak in Ref due to ConcurrentLinkedQueue.remove() behaviour (CASSANDRA-9549) + * Make rebuild only run one at a time (CASSANDRA-9119) Merged from 2.0 + * 'WITH WITH' in alter keyspace statements causes NPE (CASSANDRA-9565) * Expose some internals of SelectStatement for inspection (CASSANDRA-9532) * ArrivalWindow should use primitives (CASSANDRA-9496) * Periodically submit background compaction tasks (CASSANDRA-9592) http://git-wip-us.apache.org/repos/asf/cassandra/blob/afc50938/src/java/org/apache/cassandra/db/marshal/TupleType.java -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/afc50938/test/unit/org/apache/cassandra/cql3/validation/entities/TupleTypeTest.java -- diff --cc test/unit/org/apache/cassandra/cql3/validation/entities/TupleTypeTest.java index 362756b,177def7..0e7084f --- a/test/unit/org/apache/cassandra/cql3/validation/entities/TupleTypeTest.java +++ b/test/unit/org/apache/cassandra/cql3/validation/entities/TupleTypeTest.java @@@ -97,22 -120,11 +120,24 @@@ public class TupleTypeTest extends CQLT createTable("CREATE TABLE %s (k int PRIMARY KEY, t frozen>)"); assertInvalidSyntax("INSERT INTO %s (k, t) VALUES (0, ())"); - assertInvalid("INSERT INTO %s (k, t) VALUES (0, (2, 'foo', 3.1, 'bar'))"); + + assertInvalidMessage("Invalid tuple literal for t: too many elements. Type tuple expects 3 but got 4", + "INSERT INTO %s (k, t) VALUES (0, (2, 'foo', 3.1, 'bar'))"); } +@Test +public void testTupleWithUnsetValues() throws Throwable +{ +createTable("CREATE TABLE %s (k int PRIMARY KEY, t tuple)"); +// invalid positional field substi
[2/2] cassandra git commit: Merge branch 'cassandra-2.1' into cassandra-2.2
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/676099e1 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/676099e1 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/676099e1 Branch: refs/heads/cassandra-2.2 Commit: 676099e1c2b49efa5183d04c1d6163f93a078a10 Parents: d6f9555 1119983 Author: Marcus Eriksson Authored: Fri Jun 26 08:33:04 2015 +0200 Committer: Marcus Eriksson Committed: Fri Jun 26 08:33:04 2015 +0200 -- --
[2/2] cassandra git commit: Merge branch 'cassandra-2.1' into cassandra-2.2
Merge branch 'cassandra-2.1' into cassandra-2.2 Conflicts: bin/cqlsh Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/d6f9555b Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/d6f9555b Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/d6f9555b Branch: refs/heads/cassandra-2.2 Commit: d6f9555ba63f3c9d3e552cef14032add91aa5a9e Parents: 26bd512 5d9729b Author: Marcus Eriksson Authored: Fri Jun 26 08:21:06 2015 +0200 Committer: Marcus Eriksson Committed: Fri Jun 26 08:21:06 2015 +0200 -- CHANGES.txt | 2 +- bin/cqlsh | 104 ++- 2 files changed, 97 insertions(+), 9 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/d6f9555b/CHANGES.txt -- diff --cc CHANGES.txt index d2f40af,70efc81..8cac598 --- a/CHANGES.txt +++ b/CHANGES.txt @@@ -1,23 -1,7 +1,23 @@@ -2.1.7 +2.2 * Allow JMX over SSL directly from nodetool (CASSANDRA-9090) - * Fix incorrect result for IN queries where column not found (CASSANDRA-9540) + * Update cqlsh for UDFs (CASSANDRA-7556) + * Change Windows kernel default timer resolution (CASSANDRA-9634) + * Deprected sstable2json and json2sstable (CASSANDRA-9618) + * Allow native functions in user-defined aggregates (CASSANDRA-9542) + * Don't repair system_distributed by default (CASSANDRA-9621) + * Fix mixing min, max, and count aggregates for blob type (CASSANRA-9622) + * Rename class for DATE type in Java driver (CASSANDRA-9563) + * Duplicate compilation of UDFs on coordinator (CASSANDRA-9475) + * Fix connection leak in CqlRecordWriter (CASSANDRA-9576) + * Mlockall before opening system sstables & remove boot_without_jna option (CASSANDRA-9573) + * Add functions to convert timeuuid to date or time, deprecate dateOf and unixTimestampOf (CASSANDRA-9229) + * Make sure we cancel non-compacting sstables from LifecycleTransaction (CASSANDRA-9566) + * Fix deprecated repair JMX API (CASSANDRA-9570) + * Add logback metrics (CASSANDRA-9378) + * Update and refactor ant test/test-compression to run the tests in parallel (CASSANDRA-9583) +Merged from 2.1: - + * Enable describe on indices (CASSANDRA-7814) + * Fix incorrect result for IN queries where column not found (CASSANDRA-9540) * ColumnFamilyStore.selectAndReference may block during compaction (CASSANDRA-9637) * Fix bug in cardinality check when compacting (CASSANDRA-9580) * Fix memory leak in Ref due to ConcurrentLinkedQueue.remove() behaviour (CASSANDRA-9549) http://git-wip-us.apache.org/repos/asf/cassandra/blob/d6f9555b/bin/cqlsh -- diff --cc bin/cqlsh index a556a92,9f872f8..ab295ed --- a/bin/cqlsh +++ b/bin/cqlsh @@@ -265,13 -264,10 +265,14 @@@ cqlsh_extra_syntax_rules = r'' ; ::= ( "DESCRIBE" | "DESC" ) - ( "KEYSPACES" + ( "FUNCTIONS" ksname=? + | "FUNCTION" udf= + | "AGGREGATES" ksname=? + | "AGGREGATE" uda= + | "KEYSPACES" | "KEYSPACE" ksname=? | ( "COLUMNFAMILY" | "TABLE" ) cf= + | "INDEX" idx= | ( "COLUMNFAMILIES" | "TABLES" ) | "FULL"? "SCHEMA" | "CLUSTER" @@@ -832,32 -802,42 +837,64 @@@ class Shell(cmd.Cmd) ksmeta = self.get_keyspace_meta(ksname) if tablename not in ksmeta.tables: +if ksname == 'system_auth' and tablename in ['roles', 'role_permissions']: +self.get_fake_auth_table_meta(ksname, tablename) +else: +raise ColumnFamilyNotFound("Column family %r not found" % tablename) +else: +return ksmeta.tables[tablename] + +def get_fake_auth_table_meta(self, ksname, tablename): +# may be using external auth implementation so internal tables +# aren't actually defined in schema. In this case, we'll fake +# them up +if tablename == 'roles': +ks_meta = KeyspaceMetadata(ksname, True, None, None) +table_meta = TableMetadata(ks_meta, 'roles') +table_meta.columns['role'] = ColumnMetadata(table_meta, 'role', cassandra.cqltypes.UTF8Type) +table_meta.columns['is_superuser'] = ColumnMetadata(table_meta, 'is_superuser', cassandra.cqltypes.BooleanType) +table_meta.columns['can_login'] = ColumnMetadata(table_meta, 'can_
[2/2] cassandra git commit: Merge branch 'cassandra-2.1' into cassandra-2.2
Merge branch 'cassandra-2.1' into cassandra-2.2 Conflicts: CHANGES.txt src/java/org/apache/cassandra/tools/NodeProbe.java Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/f4449bd4 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/f4449bd4 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/f4449bd4 Branch: refs/heads/cassandra-2.2 Commit: f4449bd455650cacec480bb5a4d6c12f5a3a6b8e Parents: 8b9c91e 628394a Author: Jason Brown Authored: Thu Jun 25 10:45:02 2015 -0700 Committer: Jason Brown Committed: Thu Jun 25 10:45:02 2015 -0700 -- CHANGES.txt| 2 ++ bin/nodetool | 13 + conf/cassandra-env.sh | 8 src/java/org/apache/cassandra/tools/NodeProbe.java | 15 +++ 4 files changed, 38 insertions(+) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/f4449bd4/CHANGES.txt -- diff --cc CHANGES.txt index 59f1c18,fded5fc..d2f40af --- a/CHANGES.txt +++ b/CHANGES.txt @@@ -1,20 -1,5 +1,22 @@@ -2.1.7 +2.2 + * Allow JMX over SSL directly from nodetool (CASSANDRA-9090) + * Update cqlsh for UDFs (CASSANDRA-7556) + * Change Windows kernel default timer resolution (CASSANDRA-9634) + * Deprected sstable2json and json2sstable (CASSANDRA-9618) + * Allow native functions in user-defined aggregates (CASSANDRA-9542) + * Don't repair system_distributed by default (CASSANDRA-9621) + * Fix mixing min, max, and count aggregates for blob type (CASSANRA-9622) + * Rename class for DATE type in Java driver (CASSANDRA-9563) + * Duplicate compilation of UDFs on coordinator (CASSANDRA-9475) + * Fix connection leak in CqlRecordWriter (CASSANDRA-9576) + * Mlockall before opening system sstables & remove boot_without_jna option (CASSANDRA-9573) + * Add functions to convert timeuuid to date or time, deprecate dateOf and unixTimestampOf (CASSANDRA-9229) + * Make sure we cancel non-compacting sstables from LifecycleTransaction (CASSANDRA-9566) + * Fix deprecated repair JMX API (CASSANDRA-9570) + * Add logback metrics (CASSANDRA-9378) + * Update and refactor ant test/test-compression to run the tests in parallel (CASSANDRA-9583) +Merged from 2.1: ++ * Fix incorrect result for IN queries where column not found (CASSANDRA-9540) * ColumnFamilyStore.selectAndReference may block during compaction (CASSANDRA-9637) * Fix bug in cardinality check when compacting (CASSANDRA-9580) http://git-wip-us.apache.org/repos/asf/cassandra/blob/f4449bd4/conf/cassandra-env.sh -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/f4449bd4/src/java/org/apache/cassandra/tools/NodeProbe.java -- diff --cc src/java/org/apache/cassandra/tools/NodeProbe.java index 14215dc,d3bce4d..dbe1fe6 --- a/src/java/org/apache/cassandra/tools/NodeProbe.java +++ b/src/java/org/apache/cassandra/tools/NodeProbe.java @@@ -25,8 -27,13 +25,11 @@@ import java.lang.management.MemoryUsage import java.lang.management.RuntimeMXBean; import java.net.InetAddress; import java.net.UnknownHostException; + import java.rmi.server.RMIClientSocketFactory; + import java.rmi.server.RMISocketFactory; + import java.text.SimpleDateFormat; import java.util.AbstractMap; import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collection; import java.util.Collections; import java.util.Comparator; import java.util.HashMap; @@@ -49,8 -59,10 +52,9 @@@ import javax.management.openmbean.Tabul import javax.management.remote.JMXConnector; import javax.management.remote.JMXConnectorFactory; import javax.management.remote.JMXServiceURL; + import javax.rmi.ssl.SslRMIClientSocketFactory; -import org.apache.cassandra.concurrent.JMXEnabledThreadPoolExecutorMBean; +import org.apache.cassandra.concurrent.Stage; import org.apache.cassandra.db.ColumnFamilyStoreMBean; import org.apache.cassandra.db.HintedHandOffManager; import org.apache.cassandra.db.HintedHandOffManagerMBean;
[2/2] cassandra git commit: Merge branch 'cassandra-2.1' into cassandra-2.2
Merge branch 'cassandra-2.1' into cassandra-2.2 Conflicts: CHANGES.txt Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/6068efba Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/6068efba Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/6068efba Branch: refs/heads/cassandra-2.2 Commit: 6068efbaf43a18c6f9250638bece98010ce59100 Parents: 514dcd9 7c5fc40 Author: Benedict Elliott Smith Authored: Wed Jun 17 17:08:07 2015 +0100 Committer: Benedict Elliott Smith Committed: Wed Jun 17 17:08:07 2015 +0100 -- CHANGES.txt | 4 +++- .../org/apache/cassandra/utils/concurrent/Ref.java | 8 +++- .../cassandra/utils/concurrent/RefCountedTest.java | 15 +++ 3 files changed, 21 insertions(+), 6 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/6068efba/CHANGES.txt -- diff --cc CHANGES.txt index 9dccd84,009d974..3e9940c --- a/CHANGES.txt +++ b/CHANGES.txt @@@ -1,38 -1,11 +1,40 @@@ -2.1.7 +2.2 + * Fix connection leak in CqlRecordWriter (CASSANDRA-9576) + * Mlockall before opening system sstables & remove boot_without_jna option (CASSANDRA-9573) + * Add functions to convert timeuuid to date or time, deprecate dateOf and unixTimestampOf (CASSANDRA-9229) + * Make sure we cancel non-compacting sstables from LifecycleTransaction (CASSANDRA-9566) + * Fix deprecated repair JMX API (CASSANDRA-9570) - Merged from 2.0: ++Merged from 2.1: + * Fix memory leak in Ref due to ConcurrentLinkedQueue.remove() behaviour (CASSANDRA-9549) + Merged from 2.0 * Periodically submit background compaction tasks (CASSANDRA-9592) * Set HAS_MORE_PAGES flag to false when PagingState is null (CASSANDRA-9571) + * Add logback metrics (CASSANDRA-9378) -2.1.6 +2.2.0-rc1 + * Compressed commit log should measure compressed space used (CASSANDRA-9095) + * Fix comparison bug in CassandraRoleManager#collectRoles (CASSANDRA-9551) + * Add tinyint,smallint,time,date support for UDFs (CASSANDRA-9400) + * Deprecates SSTableSimpleWriter and SSTableSimpleUnsortedWriter (CASSANDRA-9546) + * Empty INITCOND treated as null in aggregate (CASSANDRA-9457) + * Remove use of Cell in Thrift MapReduce classes (CASSANDRA-8609) + * Integrate pre-release Java Driver 2.2-rc1, custom build (CASSANDRA-9493) + * Clean up gossiper logic for old versions (CASSANDRA-9370) + * Fix custom payload coding/decoding to match the spec (CASSANDRA-9515) + * ant test-all results incomplete when parsed (CASSANDRA-9463) + * Disallow frozen<> types in function arguments and return types for + clarity (CASSANDRA-9411) + * Static Analysis to warn on unsafe use of Autocloseable instances (CASSANDRA-9431) + * Update commitlog archiving examples now that commitlog segments are + not recycled (CASSANDRA-9350) + * Extend Transactional API to sstable lifecycle management (CASSANDRA-8568) + * (cqlsh) Add support for native protocol 4 (CASSANDRA-9399) + * Ensure that UDF and UDAs are keyspace-isolated (CASSANDRA-9409) + * Revert CASSANDRA-7807 (tracing completion client notifications) (CASSANDRA-9429) + * Add ability to stop compaction by ID (CASSANDRA-7207) + * Let CassandraVersion handle SNAPSHOT version (CASSANDRA-9438) +Merged from 2.1: * (cqlsh) Fix using COPY through SOURCE or -f (CASSANDRA-9083) * Fix occasional lack of `system` keyspace in schema tables (CASSANDRA-8487) * Use ProtocolError code instead of ServerError code for native protocol http://git-wip-us.apache.org/repos/asf/cassandra/blob/6068efba/src/java/org/apache/cassandra/utils/concurrent/Ref.java --
[2/2] cassandra git commit: Merge branch 'cassandra-2.1' into cassandra-2.2
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/84136cef Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/84136cef Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/84136cef Branch: refs/heads/cassandra-2.2 Commit: 84136cefde7c70fb5c416cc428c36c66d0391a6d Parents: 2c9b82d 8934a02 Author: Tyler Hobbs Authored: Tue Jun 16 12:32:42 2015 -0500 Committer: Tyler Hobbs Committed: Tue Jun 16 12:32:42 2015 -0500 -- doc/cql3/CQL.textile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/84136cef/doc/cql3/CQL.textile --
[2/2] cassandra git commit: Merge branch 'cassandra-2.1' into cassandra-2.2
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/2e92cf89 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/2e92cf89 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/2e92cf89 Branch: refs/heads/cassandra-2.2 Commit: 2e92cf8996f42dc40fade41b73001affdfbd6f7d Parents: a5be8f1 c1702b0 Author: Josh McKenzie Authored: Fri Jun 12 18:18:45 2015 -0400 Committer: Josh McKenzie Committed: Fri Jun 12 18:18:45 2015 -0400 -- bin/cassandra.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --
[2/2] cassandra git commit: Merge branch 'cassandra-2.1' into cassandra-2.2
Merge branch 'cassandra-2.1' into cassandra-2.2 Conflicts: CHANGES.txt Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/38421872 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/38421872 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/38421872 Branch: refs/heads/cassandra-2.2 Commit: 38421872c428a3d650840dd70e3e1d0602c2f4f7 Parents: c08aaab 16665ee Author: Marcus Eriksson Authored: Thu Jun 11 10:57:33 2015 +0200 Committer: Marcus Eriksson Committed: Thu Jun 11 10:57:33 2015 +0200 -- CHANGES.txt | 1 - 1 file changed, 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/38421872/CHANGES.txt -- diff --cc CHANGES.txt index 0a03e60,928eb55..e0447e9 --- a/CHANGES.txt +++ b/CHANGES.txt @@@ -1,32 -1,4 +1,31 @@@ -2.1.6 +2.2 + * Make sure we cancel non-compacting sstables from LifecycleTransaction (CASSANDRA-9566) + + +2.2.0-rc1 + * Compressed commit log should measure compressed space used (CASSANDRA-9095) + * Fix comparison bug in CassandraRoleManager#collectRoles (CASSANDRA-9551) + * Add tinyint,smallint,time,date support for UDFs (CASSANDRA-9400) + * Deprecates SSTableSimpleWriter and SSTableSimpleUnsortedWriter (CASSANDRA-9546) + * Empty INITCOND treated as null in aggregate (CASSANDRA-9457) + * Remove use of Cell in Thrift MapReduce classes (CASSANDRA-8609) + * Integrate pre-release Java Driver 2.2-rc1, custom build (CASSANDRA-9493) + * Clean up gossiper logic for old versions (CASSANDRA-9370) + * Fix custom payload coding/decoding to match the spec (CASSANDRA-9515) + * ant test-all results incomplete when parsed (CASSANDRA-9463) + * Disallow frozen<> types in function arguments and return types for + clarity (CASSANDRA-9411) + * Static Analysis to warn on unsafe use of Autocloseable instances (CASSANDRA-9431) + * Update commitlog archiving examples now that commitlog segments are + not recycled (CASSANDRA-9350) + * Extend Transactional API to sstable lifecycle management (CASSANDRA-8568) + * (cqlsh) Add support for native protocol 4 (CASSANDRA-9399) + * Ensure that UDF and UDAs are keyspace-isolated (CASSANDRA-9409) + * Revert CASSANDRA-7807 (tracing completion client notifications) (CASSANDRA-9429) + * Add ability to stop compaction by ID (CASSANDRA-7207) + * Let CassandraVersion handle SNAPSHOT version (CASSANDRA-9438) + * Add functions to convert timeuuid to date or time, deprecate dateOf and unixTimestampOf (CASSANDRA-9229) +Merged from 2.1: - * Make nodetool exit with non-0 status on failure (CASSANDRA-9569) * (cqlsh) Fix using COPY through SOURCE or -f (CASSANDRA-9083) * Fix occasional lack of `system` keyspace in schema tables (CASSANDRA-8487) * Use ProtocolError code instead of ServerError code for native protocol
[2/2] cassandra git commit: Merge branch 'cassandra-2.1' into cassandra-2.2
Merge branch 'cassandra-2.1' into cassandra-2.2 Conflicts: CHANGES.txt src/java/org/apache/cassandra/tools/NodeTool.java Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/6dfde0e3 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/6dfde0e3 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/6dfde0e3 Branch: refs/heads/cassandra-2.2 Commit: 6dfde0e32e9b2c7a7b36e26997001a28316664a2 Parents: 081a372 e7d02e3 Author: Marcus Eriksson Authored: Thu Jun 11 09:25:32 2015 +0200 Committer: Marcus Eriksson Committed: Thu Jun 11 09:25:32 2015 +0200 -- CHANGES.txt | 1 + src/java/org/apache/cassandra/tools/NodeTool.java | 2 ++ 2 files changed, 3 insertions(+) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/6dfde0e3/CHANGES.txt -- diff --cc CHANGES.txt index 1b75756,5c31509..355eefb --- a/CHANGES.txt +++ b/CHANGES.txt @@@ -1,30 -1,5 +1,31 @@@ -2.1.6 +2.2 + * Make sure we cancel non-compacting sstables from LifecycleTransaction (CASSANDRA-9566) + + +2.2.0-rc1 + * Compressed commit log should measure compressed space used (CASSANDRA-9095) + * Fix comparison bug in CassandraRoleManager#collectRoles (CASSANDRA-9551) + * Add tinyint,smallint,time,date support for UDFs (CASSANDRA-9400) + * Deprecates SSTableSimpleWriter and SSTableSimpleUnsortedWriter (CASSANDRA-9546) + * Empty INITCOND treated as null in aggregate (CASSANDRA-9457) + * Remove use of Cell in Thrift MapReduce classes (CASSANDRA-8609) + * Integrate pre-release Java Driver 2.2-rc1, custom build (CASSANDRA-9493) + * Clean up gossiper logic for old versions (CASSANDRA-9370) + * Fix custom payload coding/decoding to match the spec (CASSANDRA-9515) + * ant test-all results incomplete when parsed (CASSANDRA-9463) + * Disallow frozen<> types in function arguments and return types for + clarity (CASSANDRA-9411) + * Static Analysis to warn on unsafe use of Autocloseable instances (CASSANDRA-9431) + * Update commitlog archiving examples now that commitlog segments are + not recycled (CASSANDRA-9350) + * Extend Transactional API to sstable lifecycle management (CASSANDRA-8568) + * (cqlsh) Add support for native protocol 4 (CASSANDRA-9399) + * Ensure that UDF and UDAs are keyspace-isolated (CASSANDRA-9409) + * Revert CASSANDRA-7807 (tracing completion client notifications) (CASSANDRA-9429) + * Add ability to stop compaction by ID (CASSANDRA-7207) + * Let CassandraVersion handle SNAPSHOT version (CASSANDRA-9438) +Merged from 2.1: + * Make nodetool exit with non-0 status on failure (CASSANDRA-9569) * (cqlsh) Fix using COPY through SOURCE or -f (CASSANDRA-9083) * Fix occasional lack of `system` keyspace in schema tables (CASSANDRA-8487) * Use ProtocolError code instead of ServerError code for native protocol http://git-wip-us.apache.org/repos/asf/cassandra/blob/6dfde0e3/src/java/org/apache/cassandra/tools/NodeTool.java --
[2/2] cassandra git commit: Merge branch 'cassandra-2.1' into cassandra-2.2
Merge branch 'cassandra-2.1' into cassandra-2.2 Conflicts: CHANGES.txt Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/24a1a5d7 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/24a1a5d7 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/24a1a5d7 Branch: refs/heads/cassandra-2.2 Commit: 24a1a5d71923e723c035eed67bb3a64d658784ec Parents: d3e00ef 5d26943 Author: Tyler Hobbs Authored: Thu Jun 4 11:40:02 2015 -0500 Committer: Tyler Hobbs Committed: Thu Jun 4 11:40:02 2015 -0500 -- CHANGES.txt | 1 + pylib/cqlshlib/cqlhandling.py | 18 +- pylib/cqlshlib/pylexotron.py | 12 +++- 3 files changed, 29 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/24a1a5d7/CHANGES.txt -- diff --cc CHANGES.txt index af51a9d,928eb55..9aadeff --- a/CHANGES.txt +++ b/CHANGES.txt @@@ -1,24 -1,5 +1,25 @@@ -2.1.6 +2.2 + * Add tinyint,smallint,time,date support for UDFs (CASSANDRA-9400) + * Deprecates SSTableSimpleWriter and SSTableSimpleUnsortedWriter (CASSANDRA-9546) + * Empty INITCOND treated as null in aggregate (CASSANDRA-9457) + * Remove use of Cell in Thrift MapReduce classes (CASSANDRA-8609) + * Integrate pre-release Java Driver 2.2-rc1, custom build (CASSANDRA-9493) + * Clean up gossiper logic for old versions (CASSANDRA-9370) + * Fix custom payload coding/decoding to match the spec (CASSANDRA-9515) + * ant test-all results incomplete when parsed (CASSANDRA-9463) + * Disallow frozen<> types in function arguments and return types for + clarity (CASSANDRA-9411) + * Static Analysis to warn on unsafe use of Autocloseable instances (CASSANDRA-9431) + * Update commitlog archiving examples now that commitlog segments are + not recycled (CASSANDRA-9350) + * Extend Transactional API to sstable lifecycle management (CASSANDRA-8568) + * (cqlsh) Add support for native protocol 4 (CASSANDRA-9399) + * Ensure that UDF and UDAs are keyspace-isolated (CASSANDRA-9409) + * Revert CASSANDRA-7807 (tracing completion client notifications) (CASSANDRA-9429) + * Add ability to stop compaction by ID (CASSANDRA-7207) + * Let CassandraVersion handle SNAPSHOT version (CASSANDRA-9438) +Merged from 2.1: + * (cqlsh) Fix using COPY through SOURCE or -f (CASSANDRA-9083) * Fix occasional lack of `system` keyspace in schema tables (CASSANDRA-8487) * Use ProtocolError code instead of ServerError code for native protocol error responses to unsupported protocol versions (CASSANDRA-9451) http://git-wip-us.apache.org/repos/asf/cassandra/blob/24a1a5d7/pylib/cqlshlib/cqlhandling.py --
[2/2] cassandra git commit: Merge branch 'cassandra-2.1' into cassandra-2.2
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/9befa376 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/9befa376 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/9befa376 Branch: refs/heads/cassandra-2.2 Commit: 9befa3766679066d77f51a5782ce5fdfeba2c6e1 Parents: 96677ca f1b22df Author: Aleksey Yeschenko Authored: Thu Jun 4 18:32:03 2015 +0300 Committer: Aleksey Yeschenko Committed: Thu Jun 4 18:32:03 2015 +0300 -- CHANGES.txt | 1 + .../org/apache/cassandra/schema/LegacySchemaTables.java | 9 +++-- 2 files changed, 8 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/9befa376/CHANGES.txt -- diff --cc CHANGES.txt index 232e264,ac3fc53..20beea9 --- a/CHANGES.txt +++ b/CHANGES.txt @@@ -1,24 -1,5 +1,25 @@@ -2.1.6 +2.2 + * Add tinyint,smallint,time,date support for UDFs (CASSANDRA-9400) + * Deprecates SSTableSimpleWriter and SSTableSimpleUnsortedWriter (CASSANDRA-9546) + * Empty INITCOND treated as null in aggregate (CASSANDRA-9457) + * Remove use of Cell in Thrift MapReduce classes (CASSANDRA-8609) + * Integrate pre-release Java Driver 2.2-rc1, custom build (CASSANDRA-9493) + * Clean up gossiper logic for old versions (CASSANDRA-9370) + * Fix custom payload coding/decoding to match the spec (CASSANDRA-9515) + * ant test-all results incomplete when parsed (CASSANDRA-9463) + * Disallow frozen<> types in function arguments and return types for + clarity (CASSANDRA-9411) + * Static Analysis to warn on unsafe use of Autocloseable instances (CASSANDRA-9431) + * Update commitlog archiving examples now that commitlog segments are + not recycled (CASSANDRA-9350) + * Extend Transactional API to sstable lifecycle management (CASSANDRA-8568) + * (cqlsh) Add support for native protocol 4 (CASSANDRA-9399) + * Ensure that UDF and UDAs are keyspace-isolated (CASSANDRA-9409) + * Revert CASSANDRA-7807 (tracing completion client notifications) (CASSANDRA-9429) + * Add ability to stop compaction by ID (CASSANDRA-7207) + * Let CassandraVersion handle SNAPSHOT version (CASSANDRA-9438) +Merged from 2.1: + * Fix occasional lack of `system` keyspace in schema tables (CASSANDRA-8487) * Use ProtocolError code instead of ServerError code for native protocol error responses to unsupported protocol versions (CASSANDRA-9451) * Default commitlog_sync_batch_window_in_ms changed to 2ms (CASSANDRA-9504) http://git-wip-us.apache.org/repos/asf/cassandra/blob/9befa376/src/java/org/apache/cassandra/schema/LegacySchemaTables.java -- diff --cc src/java/org/apache/cassandra/schema/LegacySchemaTables.java index a825972,000..9553df0 mode 100644,00..100644 --- a/src/java/org/apache/cassandra/schema/LegacySchemaTables.java +++ b/src/java/org/apache/cassandra/schema/LegacySchemaTables.java @@@ -1,1497 -1,0 +1,1502 @@@ +/* + * 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.schema; + +import java.io.IOException; +import java.nio.ByteBuffer; +import java.security.MessageDigest; +import java.security.NoSuchAlgorithmException; +import java.util.*; +import java.util.concurrent.TimeUnit; + +import com.google.common.base.Function; +import com.google.common.collect.Iterables; +import com.google.common.collect.MapDifference; +import com.google.common.collect.Maps; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import org.apache.cassandra.cache.CachingOptions; +import org.apache.cassandra.config.*; +import org.apache.cassandra.cql3.*; +import org.apache.cassandra.cql3.functions.*; +import org.apache.cassandra.db.*; +import org.apache.cassandra.db.columniterator.IdentityQueryFilter; +import org.apache.cassandra.db.composites.CellNameType; +import org.apache.cassandra.d
[2/2] cassandra git commit: Merge branch 'cassandra-2.1' into cassandra-2.2
Merge branch 'cassandra-2.1' into cassandra-2.2 Conflicts: CHANGES.txt Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/05253cc2 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/05253cc2 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/05253cc2 Branch: refs/heads/cassandra-2.2 Commit: 05253cc28d572f13287e66e5200306058cac1d14 Parents: 30be921 b3177f1 Author: Tyler Hobbs Authored: Thu Jun 4 10:20:09 2015 -0500 Committer: Tyler Hobbs Committed: Thu Jun 4 10:20:09 2015 -0500 -- CHANGES.txt | 2 ++ .../org/apache/cassandra/transport/Frame.java | 4 ++- .../transport/messages/ErrorMessage.java| 13 +++-- .../cassandra/transport/ProtocolErrorTest.java | 30 4 files changed, 45 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/05253cc2/CHANGES.txt -- diff --cc CHANGES.txt index 43a6cc5,eea1640..0ff9363 --- a/CHANGES.txt +++ b/CHANGES.txt @@@ -1,24 -1,6 +1,26 @@@ -2.1.6 +2.2 + * Add tinyint,smallint,time,date support for UDFs (CASSANDRA-9400) + * Deprecates SSTableSimpleWriter and SSTableSimpleUnsortedWriter (CASSANDRA-9546) + * Empty INITCOND treated as null in aggregate (CASSANDRA-9457) + * Remove use of Cell in Thrift MapReduce classes (CASSANDRA-8609) + * Integrate pre-release Java Driver 2.2-rc1, custom build (CASSANDRA-9493) + * Clean up gossiper logic for old versions (CASSANDRA-9370) + * Fix custom payload coding/decoding to match the spec (CASSANDRA-9515) + * ant test-all results incomplete when parsed (CASSANDRA-9463) + * Disallow frozen<> types in function arguments and return types for + clarity (CASSANDRA-9411) + * Static Analysis to warn on unsafe use of Autocloseable instances (CASSANDRA-9431) + * Update commitlog archiving examples now that commitlog segments are + not recycled (CASSANDRA-9350) + * Extend Transactional API to sstable lifecycle management (CASSANDRA-8568) + * (cqlsh) Add support for native protocol 4 (CASSANDRA-9399) + * Ensure that UDF and UDAs are keyspace-isolated (CASSANDRA-9409) + * Revert CASSANDRA-7807 (tracing completion client notifications) (CASSANDRA-9429) + * Add ability to stop compaction by ID (CASSANDRA-7207) + * Let CassandraVersion handle SNAPSHOT version (CASSANDRA-9438) +Merged from 2.1: + * Use ProtocolError code instead of ServerError code for native protocol +error responses to unsupported protocol versions (CASSANDRA-9451) * Default commitlog_sync_batch_window_in_ms changed to 2ms (CASSANDRA-9504) * Fix empty partition assertion in unsorted sstable writing tools (CASSANDRA-9071) * Ensure truncate without snapshot cannot produce corrupt responses (CASSANDRA-9388) http://git-wip-us.apache.org/repos/asf/cassandra/blob/05253cc2/src/java/org/apache/cassandra/transport/Frame.java -- diff --cc src/java/org/apache/cassandra/transport/Frame.java index 0c038ea,f5c3834..14fe589 --- a/src/java/org/apache/cassandra/transport/Frame.java +++ b/src/java/org/apache/cassandra/transport/Frame.java @@@ -180,11 -180,10 +182,11 @@@ public class Fram int firstByte = buffer.getByte(idx++); Message.Direction direction = Message.Direction.extractFromVersion(firstByte); - int version = firstByte & 0x7F; + int version = firstByte & PROTOCOL_VERSION_MASK; if (version > Server.CURRENT_VERSION) -throw new ProtocolException("Invalid or unsupported protocol version: " + version); +throw new ProtocolException(String.format("Invalid or unsupported protocol version (%d); highest supported is %d ", + version, Server.CURRENT_VERSION)); // Wait until we have the complete V3+ header if (version >= Server.VERSION_3 && buffer.readableBytes() < Header.MODERN_LENGTH) http://git-wip-us.apache.org/repos/asf/cassandra/blob/05253cc2/src/java/org/apache/cassandra/transport/messages/ErrorMessage.java --
[2/2] cassandra git commit: Merge branch 'cassandra-2.1' into cassandra-2.2
Merge branch 'cassandra-2.1' into cassandra-2.2 Conflicts: CHANGES.txt Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/c34a3292 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/c34a3292 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/c34a3292 Branch: refs/heads/cassandra-2.2 Commit: c34a329216ee2c73aed623a50501edc15bdea92c Parents: 06e742f f294ee1 Author: Tyler Hobbs Authored: Fri May 29 14:16:43 2015 -0500 Committer: Tyler Hobbs Committed: Fri May 29 14:16:43 2015 -0500 -- CHANGES.txt | 2 ++ .../cassandra/cql3/statements/CreateTableStatement.java | 9 - 2 files changed, 10 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/c34a3292/CHANGES.txt -- diff --cc CHANGES.txt index dc13bea,0eb0751..c73a188 --- a/CHANGES.txt +++ b/CHANGES.txt @@@ -1,17 -1,6 +1,19 @@@ -2.1.6 +2.2 + * ant test-all results incomplete when parsed (CASSANDRA-9463) + * Disallow frozen<> types in function arguments and return types for + clarity (CASSANDRA-9411) + * Static Analysis to warn on unsafe use of Autocloseable instances (CASSANDRA-9431) + * Update commitlog archiving examples now that commitlog segments are + not recycled (CASSANDRA-9350) + * Extend Transactional API to sstable lifecycle management (CASSANDRA-8568) + * (cqlsh) Add support for native protocol 4 (CASSANDRA-9399) + * Ensure that UDF and UDAs are keyspace-isolated (CASSANDRA-9409) + * Revert CASSANDRA-7807 (tracing completion client notifications) (CASSANDRA-9429) + * Add ability to stop compaction by ID (CASSANDRA-7207) + * Let CassandraVersion handle SNAPSHOT version (CASSANDRA-9438) +Merged from 2.1: + * Consistent error message when a table mixes counter and non-counter +columns (CASSANDRA-9492) * Avoid getting unreadable keys during anticompaction (CASSANDRA-9508) * (cqlsh) Better float precision by default (CASSANDRA-9224) * Improve estimated row count (CASSANDRA-9107) http://git-wip-us.apache.org/repos/asf/cassandra/blob/c34a3292/src/java/org/apache/cassandra/cql3/statements/CreateTableStatement.java --
[2/2] cassandra git commit: Merge branch 'cassandra-2.1' into cassandra-2.2
Merge branch 'cassandra-2.1' into cassandra-2.2 Conflicts: CHANGES.txt src/java/org/apache/cassandra/db/compaction/CompactionManager.java src/java/org/apache/cassandra/io/sstable/SSTableRewriter.java test/unit/org/apache/cassandra/io/sstable/SSTableRewriterTest.java Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/180130a8 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/180130a8 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/180130a8 Branch: refs/heads/cassandra-2.2 Commit: 180130a8e59b2848ad843d74c09fabfa5e82eab1 Parents: 7d06762 eaeabff Author: Marcus Eriksson Authored: Fri May 29 09:57:54 2015 +0200 Committer: Marcus Eriksson Committed: Fri May 29 09:57:54 2015 +0200 -- CHANGES.txt | 1 + .../db/compaction/CompactionManager.java| 4 +- .../cassandra/io/sstable/SSTableRewriter.java | 41 +- .../unit/org/apache/cassandra/db/ScrubTest.java | 6 +- .../io/sstable/SSTableRewriterTest.java | 82 ++-- 5 files changed, 88 insertions(+), 46 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/180130a8/CHANGES.txt -- diff --cc CHANGES.txt index 618f063,0e759b7..262f8c8 --- a/CHANGES.txt +++ b/CHANGES.txt @@@ -1,16 -1,5 +1,17 @@@ -2.1.6 +2.2 + * Disallow frozen<> types in function arguments and return types for + clarity (CASSANDRA-9411) + * Static Analysis to warn on unsafe use of Autocloseable instances (CASSANDRA-9431) + * Update commitlog archiving examples now that commitlog segments are + not recycled (CASSANDRA-9350) + * Extend Transactional API to sstable lifecycle management (CASSANDRA-8568) + * (cqlsh) Add support for native protocol 4 (CASSANDRA-9399) + * Ensure that UDF and UDAs are keyspace-isolated (CASSANDRA-9409) + * Revert CASSANDRA-7807 (tracing completion client notifications) (CASSANDRA-9429) + * Add ability to stop compaction by ID (CASSANDRA-7207) + * Let CassandraVersion handle SNAPSHOT version (CASSANDRA-9438) +Merged from 2.1: + * Avoid getting unreadable keys during anticompaction (CASSANDRA-9508) * (cqlsh) Better float precision by default (CASSANDRA-9224) * Improve estimated row count (CASSANDRA-9107) * Optimize range tombstone memory footprint (CASSANDRA-8603) http://git-wip-us.apache.org/repos/asf/cassandra/blob/180130a8/src/java/org/apache/cassandra/db/compaction/CompactionManager.java -- diff --cc src/java/org/apache/cassandra/db/compaction/CompactionManager.java index 26dab7c,2f3f7df..a2783da --- a/src/java/org/apache/cassandra/db/compaction/CompactionManager.java +++ b/src/java/org/apache/cassandra/db/compaction/CompactionManager.java @@@ -1187,90 -1060,68 +1187,90 @@@ public class CompactionManager implemen if (!new File(sstable.getFilename()).exists()) { logger.info("Skipping anticompaction for {}, required sstable was compacted and is no longer available.", sstable); +i.remove(); continue; } +if (groupMaxDataAge < sstable.maxDataAge) +groupMaxDataAge = sstable.maxDataAge; +} -logger.info("Anticompacting {}", sstable); -Set sstableAsSet = new HashSet<>(); -sstableAsSet.add(sstable); +if (anticompactionGroup.originals().size() == 0) +{ +logger.info("No valid anticompactions for this group, All sstables were compacted and are no longer available"); +return 0; +} -File destination = cfs.directories.getWriteableLocationAsFile(cfs.getExpectedCompactedFileSize(sstableAsSet, OperationType.ANTICOMPACTION)); -SSTableRewriter repairedSSTableWriter = new SSTableRewriter(cfs, sstableAsSet, sstable.maxDataAge, false, false); -SSTableRewriter unRepairedSSTableWriter = new SSTableRewriter(cfs, sstableAsSet, sstable.maxDataAge, false, false); +logger.info("Anticompacting {}", anticompactionGroup); +Set sstableAsSet = anticompactionGroup.originals(); + +File destination = cfs.directories.getWriteableLocationAsFile(cfs.getExpectedCompactedFileSize(sstableAsSet, OperationType.ANTICOMPACTION)); +long repairedKeyCount = 0; +long unrepairedKeyCount = 0; +AbstractCompactionStrategy strategy = cfs.getCompactionStrategy(); - try (SSTableRewriter repairedSSTableWriter = new SSTableRewriter(cfs, anticompactionGroup, groupMaxDataAge, false); - SSTableRewriter unRepairedSSTableWriter = new SSTableRewriter(cfs, anticompact
[2/2] cassandra git commit: Merge branch 'cassandra-2.1' into cassandra-2.2
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/14b98665 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/14b98665 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/14b98665 Branch: refs/heads/cassandra-2.2 Commit: 14b98665bdb1d4a6074317587d52082e17026506 Parents: 61bea5a f1662b1 Author: Tyler Hobbs Authored: Thu May 28 10:39:37 2015 -0500 Committer: Tyler Hobbs Committed: Thu May 28 10:39:37 2015 -0500 -- src/java/org/apache/cassandra/db/filter/SliceQueryFilter.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/14b98665/src/java/org/apache/cassandra/db/filter/SliceQueryFilter.java --
[2/2] cassandra git commit: Merge branch 'cassandra-2.1' into cassandra-2.2
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/28afa1c2 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/28afa1c2 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/28afa1c2 Branch: refs/heads/cassandra-2.2 Commit: 28afa1c27b48b664534576277a88cf6b90c8fe33 Parents: d85bf4a f3ca368 Author: Dave Brosius Authored: Tue May 26 01:29:06 2015 -0400 Committer: Dave Brosius Committed: Tue May 26 01:29:06 2015 -0400 -- src/java/org/apache/cassandra/db/compaction/Scrubber.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/28afa1c2/src/java/org/apache/cassandra/db/compaction/Scrubber.java -- diff --cc src/java/org/apache/cassandra/db/compaction/Scrubber.java index 3941c48,ce98a13..93b76bd --- a/src/java/org/apache/cassandra/db/compaction/Scrubber.java +++ b/src/java/org/apache/cassandra/db/compaction/Scrubber.java @@@ -190,8 -185,8 +190,8 @@@ public class Scrubber implements Closea ByteBufferUtil.bytesToHex(key.getKey()), ByteBufferUtil.bytesToHex(currentIndexKey; } -if (dataSize > dataFile.length()) -throw new IOError(new IOException("Impossible row size (greater than file length): " + dataSize)); +if (dataSizeFromIndex > dataFile.length()) - throw new IOError(new IOException("Impossible row size " + dataSizeFromIndex)); ++throw new IOError(new IOException("Impossible row size (greater than file length): " + dataSizeFromIndex)); if (dataStart != dataStartFromIndex) outputHandler.warn(String.format("Data file row position %d differs from index file row position %d", dataStart, dataStartFromIndex));
[2/2] cassandra git commit: Merge branch 'cassandra-2.1' into cassandra-2.2
Merge branch 'cassandra-2.1' into cassandra-2.2 Conflicts: CHANGES.txt pylib/cqlshlib/formatting.py Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/321f5e82 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/321f5e82 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/321f5e82 Branch: refs/heads/cassandra-2.2 Commit: 321f5e82f3083927d642416f1f51e54476225437 Parents: 4900538 7f855d1 Author: Tyler Hobbs Authored: Fri May 22 17:40:58 2015 -0500 Committer: Tyler Hobbs Committed: Fri May 22 17:40:58 2015 -0500 -- CHANGES.txt | 1 + pylib/cqlshlib/formatting.py | 9 - 2 files changed, 9 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/321f5e82/CHANGES.txt -- diff --cc CHANGES.txt index ca87385,a4430c0..d4a8150 --- a/CHANGES.txt +++ b/CHANGES.txt @@@ -1,10 -1,5 +1,11 @@@ -2.1.6 +2.2 + * Extend Transactional API to sstable lifecycle management (CASSANDRA-8568) + * (cqlsh) Add support for native protocol 4 (CASSANDRA-9399) + * Ensure that UDF and UDAs are keyspace-isolated (CASSANDRA-9409) + * Revert CASSANDRA-7807 (tracing completion client notifications) (CASSANDRA-9429) + * Add ability to stop compaction by ID (CASSANDRA-7207) +Merged from 2.1: + * (cqlsh) Better float precision by default (CASSANDRA-9224) * Improve estimated row count (CASSANDRA-9107) * Optimize range tombstone memory footprint (CASSANDRA-8603) * Use configured gcgs in anticompaction (CASSANDRA-9397) http://git-wip-us.apache.org/repos/asf/cassandra/blob/321f5e82/pylib/cqlshlib/formatting.py -- diff --cc pylib/cqlshlib/formatting.py index 2310fa9,2a99e23..c0c3163 --- a/pylib/cqlshlib/formatting.py +++ b/pylib/cqlshlib/formatting.py @@@ -14,11 -14,11 +14,11 @@@ # See the License for the specific language governing permissions and # limitations under the License. -import sys -import re -import time import calendar import math +import re - import time +import sys ++import time from collections import defaultdict from . import wcwidth from .displaying import colorme, FormattedValue, DEFAULT_VALUE_COLORS
[2/2] cassandra git commit: Merge branch 'cassandra-2.1' into cassandra-2.2
Merge branch 'cassandra-2.1' into cassandra-2.2 Conflicts: test/unit/org/apache/cassandra/io/util/DataOutputTest.java Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/49005382 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/49005382 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/49005382 Branch: refs/heads/cassandra-2.2 Commit: 490053820c47cc9cd8a9bf5057bcc516c20a5be9 Parents: 0d24b1a 744db70 Author: Tyler Hobbs Authored: Fri May 22 13:41:56 2015 -0500 Committer: Tyler Hobbs Committed: Fri May 22 13:41:56 2015 -0500 -- --
[2/2] cassandra git commit: Merge branch 'cassandra-2.1' into cassandra-2.2
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/5ab14968 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/5ab14968 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/5ab14968 Branch: refs/heads/cassandra-2.2 Commit: 5ab14968ec3819a94d9c3abdeb93a812c4a45b4a Parents: e5a76bd 4362e71 Author: T Jake Luciani Authored: Fri May 22 11:57:36 2015 -0400 Committer: T Jake Luciani Committed: Fri May 22 11:57:36 2015 -0400 -- src/java/org/apache/cassandra/db/compaction/CompactionManager.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/5ab14968/src/java/org/apache/cassandra/db/compaction/CompactionManager.java --
[2/2] cassandra git commit: Merge branch 'cassandra-2.1' into cassandra-2.2
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/76b5f30e Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/76b5f30e Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/76b5f30e Branch: refs/heads/cassandra-2.2 Commit: 76b5f30e73ec8bcef03e81a51181d2ee89c85360 Parents: 52dc63b 2248780 Author: Aleksey Yeschenko Authored: Wed May 20 20:02:56 2015 +0300 Committer: Aleksey Yeschenko Committed: Wed May 20 20:02:56 2015 +0300 -- CHANGES.txt | 2 ++ src/java/org/apache/cassandra/db/RangeTombstone.java | 4 2 files changed, 6 insertions(+) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/76b5f30e/CHANGES.txt -- diff --cc CHANGES.txt index 44f9e4c,92d4d54..281d10b --- a/CHANGES.txt +++ b/CHANGES.txt @@@ -1,127 -1,6 +1,129 @@@ +2.2 + * Ensure that UDF and UDAs are keyspace-isolated (CASSANDRA-9409) + * Revert CASSANDRA-7807 (tracing completion client notifications) (CASSANDRA-9429) + * Add ability to stop compaction by ID (CASSANDRA-7207) +Merged from 2.1: + 2.1.6 + * Optimize range tombstone memory footprint (CASSANDRA-8603) * Use configured gcgs in anticompaction (CASSANDRA-9397) + + +2.2.0-beta1 + * Introduce Transactional API for internal state changes (CASSANDRA-8984) + * Add a flag in cassandra.yaml to enable UDFs (CASSANDRA-9404) + * Better support of null for UDF (CASSANDRA-8374) + * Use ecj instead of javassist for UDFs (CASSANDRA-8241) + * faster async logback configuration for tests (CASSANDRA-9376) + * Add `smallint` and `tinyint` data types (CASSANDRA-8951) + * Avoid thrift schema creation when native driver is used in stress tool (CASSANDRA-9374) + * Populate TokenMetadata early during startup (CASSANDRA-9317) + * Make Functions.declared thread-safe + * Add client warnings to native protocol v4 (CASSANDRA-8930) + * Allow roles cache to be invalidated (CASSANDRA-8967) + * Upgrade Snappy (CASSANDRA-9063) + * Don't start Thrift rpc by default (CASSANDRA-9319) + * Only stream from unrepaired sstables with incremental repair (CASSANDRA-8267) + * Aggregate UDFs allow SFUNC return type to differ from STYPE if FFUNC specified (CASSANDRA-9321) + * Remove Thrift dependencies in bundled tools (CASSANDRA-8358) + * Disable memory mapping of hsperfdata file for JVM statistics (CASSANDRA-9242) + * Add pre-startup checks to detect potential incompatibilities (CASSANDRA-8049) + * Distinguish between null and unset in protocol v4 (CASSANDRA-7304) + * Add user/role permissions for user-defined functions (CASSANDRA-7557) + * Allow cassandra config to be updated to restart daemon without unloading classes (CASSANDRA-9046) + * Don't initialize compaction writer before checking if iter is empty (CASSANDRA-9117) + * Don't execute any functions at prepare-time (CASSANDRA-9037) + * Share file handles between all instances of a SegmentedFile (CASSANDRA-8893) + * Make it possible to major compact LCS (CASSANDRA-7272) + * Make FunctionExecutionException extend RequestExecutionException + (CASSANDRA-9055) + * Add support for SELECT JSON, INSERT JSON syntax and new toJson(), fromJson() + functions (CASSANDRA-7970) + * Optimise max purgeable timestamp calculation in compaction (CASSANDRA-8920) + * Constrain internode message buffer sizes, and improve IO class hierarchy (CASSANDRA-8670) + * New tool added to validate all sstables in a node (CASSANDRA-5791) + * Push notification when tracing completes for an operation (CASSANDRA-7807) + * Delay "node up" and "node added" notifications until native protocol server is started (CASSANDRA-8236) + * Compressed Commit Log (CASSANDRA-6809) + * Optimise IntervalTree (CASSANDRA-8988) + * Add a key-value payload for third party usage (CASSANDRA-8553, 9212) + * Bump metrics-reporter-config dependency for metrics 3.0 (CASSANDRA-8149) + * Partition intra-cluster message streams by size, not type (CASSANDRA-8789) + * Add WriteFailureException to native protocol, notify coordinator of + write failures (CASSANDRA-8592) + * Convert SequentialWriter to nio (CASSANDRA-8709) + * Add role based access control (CASSANDRA-7653, 8650, 7216, 8760, 8849, 8761, 8850) + * Record client ip address in tracing sessions (CASSANDRA-8162) + * Indicate partition key columns in response metadata for prepared + statements (CASSANDRA-7660) + * Merge UUIDType and TimeUUIDType parse logic (CASSANDRA-8759) + * Avoid memory allocation when searching index summary (CASSANDRA-8793) + * Optimise (Time)?UUIDType Comparisons (CASSANDRA-8730) + * Make CRC32Ex into a separate maven dependency (CASSANDRA-8836) + * Use preloaded jemalloc w/ Unsafe (C
[2/2] cassandra git commit: Merge branch 'cassandra-2.1' into cassandra-2.2
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/e8766e53 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/e8766e53 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/e8766e53 Branch: refs/heads/cassandra-2.2 Commit: e8766e53d11645b41e25d904d5bdbdb2b1c0c9a9 Parents: ff1a156 7af9c6a Author: T Jake Luciani Authored: Tue May 19 10:13:14 2015 -0400 Committer: T Jake Luciani Committed: Tue May 19 10:13:14 2015 -0400 -- .../DebuggableScheduledThreadPoolExecutor.java | 9 ++ ...buggableScheduledThreadPoolExecutorTest.java | 115 +++ 2 files changed, 124 insertions(+) --
[2/2] cassandra git commit: Merge branch 'cassandra-2.1' into cassandra-2.2
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/816c2b3f Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/816c2b3f Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/816c2b3f Branch: refs/heads/cassandra-2.2 Commit: 816c2b3f777843279295e67b0906f3df92ccc84a Parents: aa133b7 59b8e17 Author: Sylvain Lebresne Authored: Tue May 19 10:33:06 2015 +0200 Committer: Sylvain Lebresne Committed: Tue May 19 10:33:06 2015 +0200 -- .../org/apache/cassandra/streaming/ConnectionHandler.java | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/816c2b3f/src/java/org/apache/cassandra/streaming/ConnectionHandler.java --
[2/2] cassandra git commit: Merge branch 'cassandra-2.1' into cassandra-2.2
Merge branch 'cassandra-2.1' into cassandra-2.2 Conflicts: src/java/org/apache/cassandra/db/compaction/CompactionManager.java Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/efc57cdf Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/efc57cdf Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/efc57cdf Branch: refs/heads/cassandra-2.2 Commit: efc57cdfe262c78db82ba029f5ba7f9294c38c04 Parents: 1735249 bdbc61f Author: Marcus Eriksson Authored: Mon May 18 06:45:36 2015 +0200 Committer: Marcus Eriksson Committed: Mon May 18 06:45:36 2015 +0200 -- CHANGES.txt| 1 + src/java/org/apache/cassandra/db/compaction/CompactionManager.java | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/efc57cdf/CHANGES.txt -- diff --cc CHANGES.txt index 9f14fba,198935b..7885e0e --- a/CHANGES.txt +++ b/CHANGES.txt @@@ -1,119 -1,5 +1,120 @@@ +2.2.0-beta1 + * Introduce Transactional API for internal state changes (CASSANDRA-8984) + * Add a flag in cassandra.yaml to enable UDFs (CASSANDRA-9404) + * Better support of null for UDF (CASSANDRA-8374) + * Use ecj instead of javassist for UDFs (CASSANDRA-8241) + * faster async logback configuration for tests (CASSANDRA-9376) + * Add `smallint` and `tinyint` data types (CASSANDRA-8951) + * Avoid thrift schema creation when native driver is used in stress tool (CASSANDRA-9374) + * Populate TokenMetadata early during startup (CASSANDRA-9317) + * Make Functions.declared thread-safe + * Add client warnings to native protocol v4 (CASSANDRA-8930) + * Allow roles cache to be invalidated (CASSANDRA-8967) + * Upgrade Snappy (CASSANDRA-9063) + * Don't start Thrift rpc by default (CASSANDRA-9319) + * Only stream from unrepaired sstables with incremental repair (CASSANDRA-8267) + * Aggregate UDFs allow SFUNC return type to differ from STYPE if FFUNC specified (CASSANDRA-9321) + * Remove Thrift dependencies in bundled tools (CASSANDRA-8358) + * Disable memory mapping of hsperfdata file for JVM statistics (CASSANDRA-9242) + * Add pre-startup checks to detect potential incompatibilities (CASSANDRA-8049) + * Distinguish between null and unset in protocol v4 (CASSANDRA-7304) + * Add user/role permissions for user-defined functions (CASSANDRA-7557) + * Allow cassandra config to be updated to restart daemon without unloading classes (CASSANDRA-9046) + * Don't initialize compaction writer before checking if iter is empty (CASSANDRA-9117) + * Don't execute any functions at prepare-time (CASSANDRA-9037) + * Share file handles between all instances of a SegmentedFile (CASSANDRA-8893) + * Make it possible to major compact LCS (CASSANDRA-7272) + * Make FunctionExecutionException extend RequestExecutionException + (CASSANDRA-9055) + * Add support for SELECT JSON, INSERT JSON syntax and new toJson(), fromJson() + functions (CASSANDRA-7970) + * Optimise max purgeable timestamp calculation in compaction (CASSANDRA-8920) + * Constrain internode message buffer sizes, and improve IO class hierarchy (CASSANDRA-8670) + * New tool added to validate all sstables in a node (CASSANDRA-5791) + * Push notification when tracing completes for an operation (CASSANDRA-7807) + * Delay "node up" and "node added" notifications until native protocol server is started (CASSANDRA-8236) + * Compressed Commit Log (CASSANDRA-6809) + * Optimise IntervalTree (CASSANDRA-8988) + * Add a key-value payload for third party usage (CASSANDRA-8553, 9212) + * Bump metrics-reporter-config dependency for metrics 3.0 (CASSANDRA-8149) + * Partition intra-cluster message streams by size, not type (CASSANDRA-8789) + * Add WriteFailureException to native protocol, notify coordinator of + write failures (CASSANDRA-8592) + * Convert SequentialWriter to nio (CASSANDRA-8709) + * Add role based access control (CASSANDRA-7653, 8650, 7216, 8760, 8849, 8761, 8850) + * Record client ip address in tracing sessions (CASSANDRA-8162) + * Indicate partition key columns in response metadata for prepared + statements (CASSANDRA-7660) + * Merge UUIDType and TimeUUIDType parse logic (CASSANDRA-8759) + * Avoid memory allocation when searching index summary (CASSANDRA-8793) + * Optimise (Time)?UUIDType Comparisons (CASSANDRA-8730) + * Make CRC32Ex into a separate maven dependency (CASSANDRA-8836) + * Use preloaded jemalloc w/ Unsafe (CASSANDRA-8714, 9197) + * Avoid accessing partitioner through StorageProxy (CASSANDRA-8244, 8268) + * Upgrade Metrics library and remove depricated metrics (CASSANDRA-5657) + * Serializing Row cache alternative, fully off heap (CASSANDRA-7438) + * Dupl