You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by br...@apache.org on 2014/05/01 22:23:04 UTC
[1/6] git commit: Add Google Compute Engine snitch.
Repository: cassandra
Updated Branches:
refs/heads/cassandra-2.0 427fdd476 -> f2bbd6fcc
refs/heads/cassandra-2.1 1491f75dd -> 5bd6a756e
refs/heads/trunk f74063c6e -> c2579b92b
Add Google Compute Engine snitch.
Patch by Brian Lynch, reviewed by brandonwilliams for CASSANDRA-7132
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/f2bbd6fc
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/f2bbd6fc
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/f2bbd6fc
Branch: refs/heads/cassandra-2.0
Commit: f2bbd6fcc670b9cb2eecbe0d2964d7e4b785e543
Parents: 427fdd4
Author: Brandon Williams <br...@apache.org>
Authored: Thu May 1 15:12:55 2014 -0500
Committer: Brandon Williams <br...@apache.org>
Committed: Thu May 1 15:12:55 2014 -0500
----------------------------------------------------------------------
CHANGES.txt | 1 +
.../cassandra/locator/GoogleCloudSnitch.java | 128 +++++++++++++++++++
.../locator/GoogleCloudSnitchTest.java | 108 ++++++++++++++++
3 files changed, 237 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/f2bbd6fc/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index e25e71f..827003b 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
2.0.8
+ * Add Google Compute Engine snitch (CASSANDRA-7132)
* Allow overriding cassandra-rackdc.properties file (CASSANDRA-7072)
* Set JMX RMI port to 7199 (CASSANDRA-7087)
* Use LOCAL_QUORUM for data reads at LOCAL_SERIAL (CASSANDRA-6939)
http://git-wip-us.apache.org/repos/asf/cassandra/blob/f2bbd6fc/src/java/org/apache/cassandra/locator/GoogleCloudSnitch.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/locator/GoogleCloudSnitch.java b/src/java/org/apache/cassandra/locator/GoogleCloudSnitch.java
new file mode 100644
index 0000000..05fbea2
--- /dev/null
+++ b/src/java/org/apache/cassandra/locator/GoogleCloudSnitch.java
@@ -0,0 +1,128 @@
+/*
+ * 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.DataInputStream;
+import java.io.FilterInputStream;
+import java.io.IOException;
+import java.net.HttpURLConnection;
+import java.net.InetAddress;
+import java.net.URL;
+import java.nio.charset.StandardCharsets;
+import java.util.Map;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.apache.cassandra.db.SystemKeyspace;
+import org.apache.cassandra.exceptions.ConfigurationException;
+import org.apache.cassandra.gms.ApplicationState;
+import org.apache.cassandra.gms.EndpointState;
+import org.apache.cassandra.gms.Gossiper;
+import org.apache.cassandra.io.util.FileUtils;
+import org.apache.cassandra.utils.FBUtilities;
+
+/**
+ * A snitch that assumes an GCE region is a DC and an GCE availability_zone
+ * is a rack. This information is available in the config for the node.
+ */
+public class GoogleCloudSnitch extends AbstractNetworkTopologySnitch
+{
+ protected static final Logger logger = LoggerFactory.getLogger(GoogleCloudSnitch.class);
+ protected static final String ZONE_NAME_QUERY_URL = "http://metadata.google.internal/computeMetadata/v1/instance/zone";
+ private static final String DEFAULT_DC = "UNKNOWN-DC";
+ private static final String DEFAULT_RACK = "UNKNOWN-RACK";
+ private Map<InetAddress, Map<String, String>> savedEndpoints;
+ protected String gceZone;
+ protected String gceRegion;
+
+ public GoogleCloudSnitch() throws IOException, ConfigurationException
+ {
+ String response = gceApiCall(ZONE_NAME_QUERY_URL);
+ String[] splits = response.split("/");
+ String az = splits[splits.length - 1];
+
+ // Split "us-central1-a" or "asia-east1-a" into "us-central1"/"a" and "asia-east1"/"a".
+ splits = az.split("-");
+ gceZone = splits[splits.length - 1];
+
+ int lastRegionIndex = az.lastIndexOf("-");
+ gceRegion = az.substring(0, lastRegionIndex);
+
+ String datacenterSuffix = (new SnitchProperties()).get("dc_suffix", "");
+ gceRegion = gceRegion.concat(datacenterSuffix);
+ logger.info("GCESnitch using region: {}, zone: {}.", gceRegion, gceZone);
+ }
+
+ String gceApiCall(String url) throws IOException, ConfigurationException
+ {
+ // Populate the region and zone by introspection, fail if 404 on metadata
+ HttpURLConnection conn = (HttpURLConnection) new URL(url).openConnection();
+ DataInputStream d = null;
+ try
+ {
+ conn.setRequestMethod("GET");
+ conn.setRequestProperty("Metadata-Flavor", "Google");
+ if (conn.getResponseCode() != 200)
+ throw new ConfigurationException("GoogleCloudSnitch was unable to execute the API call. Not a gce node?");
+
+ // Read the information.
+ int cl = conn.getContentLength();
+ byte[] b = new byte[cl];
+ d = new DataInputStream((FilterInputStream) conn.getContent());
+ d.readFully(b);
+ return new String(b, StandardCharsets.UTF_8);
+ }
+ finally
+ {
+ FileUtils.close(d);
+ conn.disconnect();
+ }
+ }
+
+ public String getRack(InetAddress endpoint)
+ {
+ if (endpoint.equals(FBUtilities.getBroadcastAddress()))
+ return gceZone;
+ EndpointState state = Gossiper.instance.getEndpointStateForEndpoint(endpoint);
+ if (state == null || state.getApplicationState(ApplicationState.RACK) == null)
+ {
+ if (savedEndpoints == null)
+ savedEndpoints = SystemKeyspace.loadDcRackInfo();
+ if (savedEndpoints.containsKey(endpoint))
+ return savedEndpoints.get(endpoint).get("rack");
+ return DEFAULT_RACK;
+ }
+ return state.getApplicationState(ApplicationState.RACK).value;
+ }
+
+ public String getDatacenter(InetAddress endpoint)
+ {
+ if (endpoint.equals(FBUtilities.getBroadcastAddress()))
+ return gceRegion;
+ EndpointState state = Gossiper.instance.getEndpointStateForEndpoint(endpoint);
+ if (state == null || state.getApplicationState(ApplicationState.DC) == null)
+ {
+ if (savedEndpoints == null)
+ savedEndpoints = SystemKeyspace.loadDcRackInfo();
+ if (savedEndpoints.containsKey(endpoint))
+ return savedEndpoints.get(endpoint).get("data_center");
+ return DEFAULT_DC;
+ }
+ return state.getApplicationState(ApplicationState.DC).value;
+ }
+}
http://git-wip-us.apache.org/repos/asf/cassandra/blob/f2bbd6fc/test/unit/org/apache/cassandra/locator/GoogleCloudSnitchTest.java
----------------------------------------------------------------------
diff --git a/test/unit/org/apache/cassandra/locator/GoogleCloudSnitchTest.java b/test/unit/org/apache/cassandra/locator/GoogleCloudSnitchTest.java
new file mode 100644
index 0000000..70080a8
--- /dev/null
+++ b/test/unit/org/apache/cassandra/locator/GoogleCloudSnitchTest.java
@@ -0,0 +1,108 @@
+package org.apache.cassandra.locator;
+/*
+ *
+ * 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.
+ *
+ */
+
+
+import java.io.IOException;
+import java.net.InetAddress;
+import java.net.UnknownHostException;
+import java.util.Map;
+
+import org.junit.AfterClass;
+import org.junit.Assert;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+import org.apache.cassandra.SchemaLoader;
+import org.apache.cassandra.db.Keyspace;
+import org.apache.cassandra.exceptions.ConfigurationException;
+import org.apache.cassandra.gms.ApplicationState;
+import org.apache.cassandra.gms.Gossiper;
+import org.apache.cassandra.gms.VersionedValue;
+import org.apache.cassandra.net.MessagingService;
+import org.apache.cassandra.net.OutboundTcpConnectionPool;
+import org.apache.cassandra.service.StorageService;
+
+import static org.junit.Assert.assertEquals;
+
+public class GoogleCloudSnitchTest
+{
+ private static String az;
+
+ @BeforeClass
+ public static void setup() throws Exception
+ {
+ SchemaLoader.mkdirs();
+ SchemaLoader.cleanup();
+ Keyspace.setInitialized();
+ StorageService.instance.initServer(0);
+ }
+
+ private class TestGoogleCloudSnitch extends GoogleCloudSnitch
+ {
+ public TestGoogleCloudSnitch() throws IOException, ConfigurationException
+ {
+ super();
+ }
+
+ @Override
+ String gceApiCall(String url) throws IOException, ConfigurationException
+ {
+ return az;
+ }
+ }
+
+ @Test
+ public void testRac() throws IOException, ConfigurationException
+ {
+ az = "us-central1-a";
+ GoogleCloudSnitch snitch = new TestGoogleCloudSnitch();
+ InetAddress local = InetAddress.getByName("127.0.0.1");
+ InetAddress nonlocal = InetAddress.getByName("127.0.0.7");
+
+ Gossiper.instance.addSavedEndpoint(nonlocal);
+ Map<ApplicationState,VersionedValue> stateMap = Gossiper.instance.getEndpointStateForEndpoint(nonlocal).getApplicationStateMap();
+ stateMap.put(ApplicationState.DC, StorageService.instance.valueFactory.datacenter("europe-west1"));
+ stateMap.put(ApplicationState.RACK, StorageService.instance.valueFactory.datacenter("a"));
+
+ assertEquals("europe-west1", snitch.getDatacenter(nonlocal));
+ assertEquals("a", snitch.getRack(nonlocal));
+
+ assertEquals("us-central1", snitch.getDatacenter(local));
+ assertEquals("a", snitch.getRack(local));
+ }
+
+ @Test
+ public void testNewRegions() throws IOException, ConfigurationException
+ {
+ az = "asia-east1-a";
+ GoogleCloudSnitch snitch = new TestGoogleCloudSnitch();
+ InetAddress local = InetAddress.getByName("127.0.0.1");
+ assertEquals("asia-east1", snitch.getDatacenter(local));
+ assertEquals("a", snitch.getRack(local));
+ }
+
+ @AfterClass
+ public static void tearDown()
+ {
+ StorageService.instance.stopClient();
+ }
+}
[3/6] git commit: Add Google Compute Engine snitch.
Posted by br...@apache.org.
Add Google Compute Engine snitch.
Patch by Brian Lynch, reviewed by brandonwilliams for CASSANDRA-7132
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/f2bbd6fc
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/f2bbd6fc
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/f2bbd6fc
Branch: refs/heads/trunk
Commit: f2bbd6fcc670b9cb2eecbe0d2964d7e4b785e543
Parents: 427fdd4
Author: Brandon Williams <br...@apache.org>
Authored: Thu May 1 15:12:55 2014 -0500
Committer: Brandon Williams <br...@apache.org>
Committed: Thu May 1 15:12:55 2014 -0500
----------------------------------------------------------------------
CHANGES.txt | 1 +
.../cassandra/locator/GoogleCloudSnitch.java | 128 +++++++++++++++++++
.../locator/GoogleCloudSnitchTest.java | 108 ++++++++++++++++
3 files changed, 237 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/f2bbd6fc/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index e25e71f..827003b 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
2.0.8
+ * Add Google Compute Engine snitch (CASSANDRA-7132)
* Allow overriding cassandra-rackdc.properties file (CASSANDRA-7072)
* Set JMX RMI port to 7199 (CASSANDRA-7087)
* Use LOCAL_QUORUM for data reads at LOCAL_SERIAL (CASSANDRA-6939)
http://git-wip-us.apache.org/repos/asf/cassandra/blob/f2bbd6fc/src/java/org/apache/cassandra/locator/GoogleCloudSnitch.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/locator/GoogleCloudSnitch.java b/src/java/org/apache/cassandra/locator/GoogleCloudSnitch.java
new file mode 100644
index 0000000..05fbea2
--- /dev/null
+++ b/src/java/org/apache/cassandra/locator/GoogleCloudSnitch.java
@@ -0,0 +1,128 @@
+/*
+ * 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.DataInputStream;
+import java.io.FilterInputStream;
+import java.io.IOException;
+import java.net.HttpURLConnection;
+import java.net.InetAddress;
+import java.net.URL;
+import java.nio.charset.StandardCharsets;
+import java.util.Map;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.apache.cassandra.db.SystemKeyspace;
+import org.apache.cassandra.exceptions.ConfigurationException;
+import org.apache.cassandra.gms.ApplicationState;
+import org.apache.cassandra.gms.EndpointState;
+import org.apache.cassandra.gms.Gossiper;
+import org.apache.cassandra.io.util.FileUtils;
+import org.apache.cassandra.utils.FBUtilities;
+
+/**
+ * A snitch that assumes an GCE region is a DC and an GCE availability_zone
+ * is a rack. This information is available in the config for the node.
+ */
+public class GoogleCloudSnitch extends AbstractNetworkTopologySnitch
+{
+ protected static final Logger logger = LoggerFactory.getLogger(GoogleCloudSnitch.class);
+ protected static final String ZONE_NAME_QUERY_URL = "http://metadata.google.internal/computeMetadata/v1/instance/zone";
+ private static final String DEFAULT_DC = "UNKNOWN-DC";
+ private static final String DEFAULT_RACK = "UNKNOWN-RACK";
+ private Map<InetAddress, Map<String, String>> savedEndpoints;
+ protected String gceZone;
+ protected String gceRegion;
+
+ public GoogleCloudSnitch() throws IOException, ConfigurationException
+ {
+ String response = gceApiCall(ZONE_NAME_QUERY_URL);
+ String[] splits = response.split("/");
+ String az = splits[splits.length - 1];
+
+ // Split "us-central1-a" or "asia-east1-a" into "us-central1"/"a" and "asia-east1"/"a".
+ splits = az.split("-");
+ gceZone = splits[splits.length - 1];
+
+ int lastRegionIndex = az.lastIndexOf("-");
+ gceRegion = az.substring(0, lastRegionIndex);
+
+ String datacenterSuffix = (new SnitchProperties()).get("dc_suffix", "");
+ gceRegion = gceRegion.concat(datacenterSuffix);
+ logger.info("GCESnitch using region: {}, zone: {}.", gceRegion, gceZone);
+ }
+
+ String gceApiCall(String url) throws IOException, ConfigurationException
+ {
+ // Populate the region and zone by introspection, fail if 404 on metadata
+ HttpURLConnection conn = (HttpURLConnection) new URL(url).openConnection();
+ DataInputStream d = null;
+ try
+ {
+ conn.setRequestMethod("GET");
+ conn.setRequestProperty("Metadata-Flavor", "Google");
+ if (conn.getResponseCode() != 200)
+ throw new ConfigurationException("GoogleCloudSnitch was unable to execute the API call. Not a gce node?");
+
+ // Read the information.
+ int cl = conn.getContentLength();
+ byte[] b = new byte[cl];
+ d = new DataInputStream((FilterInputStream) conn.getContent());
+ d.readFully(b);
+ return new String(b, StandardCharsets.UTF_8);
+ }
+ finally
+ {
+ FileUtils.close(d);
+ conn.disconnect();
+ }
+ }
+
+ public String getRack(InetAddress endpoint)
+ {
+ if (endpoint.equals(FBUtilities.getBroadcastAddress()))
+ return gceZone;
+ EndpointState state = Gossiper.instance.getEndpointStateForEndpoint(endpoint);
+ if (state == null || state.getApplicationState(ApplicationState.RACK) == null)
+ {
+ if (savedEndpoints == null)
+ savedEndpoints = SystemKeyspace.loadDcRackInfo();
+ if (savedEndpoints.containsKey(endpoint))
+ return savedEndpoints.get(endpoint).get("rack");
+ return DEFAULT_RACK;
+ }
+ return state.getApplicationState(ApplicationState.RACK).value;
+ }
+
+ public String getDatacenter(InetAddress endpoint)
+ {
+ if (endpoint.equals(FBUtilities.getBroadcastAddress()))
+ return gceRegion;
+ EndpointState state = Gossiper.instance.getEndpointStateForEndpoint(endpoint);
+ if (state == null || state.getApplicationState(ApplicationState.DC) == null)
+ {
+ if (savedEndpoints == null)
+ savedEndpoints = SystemKeyspace.loadDcRackInfo();
+ if (savedEndpoints.containsKey(endpoint))
+ return savedEndpoints.get(endpoint).get("data_center");
+ return DEFAULT_DC;
+ }
+ return state.getApplicationState(ApplicationState.DC).value;
+ }
+}
http://git-wip-us.apache.org/repos/asf/cassandra/blob/f2bbd6fc/test/unit/org/apache/cassandra/locator/GoogleCloudSnitchTest.java
----------------------------------------------------------------------
diff --git a/test/unit/org/apache/cassandra/locator/GoogleCloudSnitchTest.java b/test/unit/org/apache/cassandra/locator/GoogleCloudSnitchTest.java
new file mode 100644
index 0000000..70080a8
--- /dev/null
+++ b/test/unit/org/apache/cassandra/locator/GoogleCloudSnitchTest.java
@@ -0,0 +1,108 @@
+package org.apache.cassandra.locator;
+/*
+ *
+ * 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.
+ *
+ */
+
+
+import java.io.IOException;
+import java.net.InetAddress;
+import java.net.UnknownHostException;
+import java.util.Map;
+
+import org.junit.AfterClass;
+import org.junit.Assert;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+import org.apache.cassandra.SchemaLoader;
+import org.apache.cassandra.db.Keyspace;
+import org.apache.cassandra.exceptions.ConfigurationException;
+import org.apache.cassandra.gms.ApplicationState;
+import org.apache.cassandra.gms.Gossiper;
+import org.apache.cassandra.gms.VersionedValue;
+import org.apache.cassandra.net.MessagingService;
+import org.apache.cassandra.net.OutboundTcpConnectionPool;
+import org.apache.cassandra.service.StorageService;
+
+import static org.junit.Assert.assertEquals;
+
+public class GoogleCloudSnitchTest
+{
+ private static String az;
+
+ @BeforeClass
+ public static void setup() throws Exception
+ {
+ SchemaLoader.mkdirs();
+ SchemaLoader.cleanup();
+ Keyspace.setInitialized();
+ StorageService.instance.initServer(0);
+ }
+
+ private class TestGoogleCloudSnitch extends GoogleCloudSnitch
+ {
+ public TestGoogleCloudSnitch() throws IOException, ConfigurationException
+ {
+ super();
+ }
+
+ @Override
+ String gceApiCall(String url) throws IOException, ConfigurationException
+ {
+ return az;
+ }
+ }
+
+ @Test
+ public void testRac() throws IOException, ConfigurationException
+ {
+ az = "us-central1-a";
+ GoogleCloudSnitch snitch = new TestGoogleCloudSnitch();
+ InetAddress local = InetAddress.getByName("127.0.0.1");
+ InetAddress nonlocal = InetAddress.getByName("127.0.0.7");
+
+ Gossiper.instance.addSavedEndpoint(nonlocal);
+ Map<ApplicationState,VersionedValue> stateMap = Gossiper.instance.getEndpointStateForEndpoint(nonlocal).getApplicationStateMap();
+ stateMap.put(ApplicationState.DC, StorageService.instance.valueFactory.datacenter("europe-west1"));
+ stateMap.put(ApplicationState.RACK, StorageService.instance.valueFactory.datacenter("a"));
+
+ assertEquals("europe-west1", snitch.getDatacenter(nonlocal));
+ assertEquals("a", snitch.getRack(nonlocal));
+
+ assertEquals("us-central1", snitch.getDatacenter(local));
+ assertEquals("a", snitch.getRack(local));
+ }
+
+ @Test
+ public void testNewRegions() throws IOException, ConfigurationException
+ {
+ az = "asia-east1-a";
+ GoogleCloudSnitch snitch = new TestGoogleCloudSnitch();
+ InetAddress local = InetAddress.getByName("127.0.0.1");
+ assertEquals("asia-east1", snitch.getDatacenter(local));
+ assertEquals("a", snitch.getRack(local));
+ }
+
+ @AfterClass
+ public static void tearDown()
+ {
+ StorageService.instance.stopClient();
+ }
+}
[6/6] git commit: Merge branch 'cassandra-2.1' into trunk
Posted by br...@apache.org.
Merge branch 'cassandra-2.1' into trunk
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/c2579b92
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/c2579b92
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/c2579b92
Branch: refs/heads/trunk
Commit: c2579b92bf2e721c099720a27b5d9e56be66e49c
Parents: f74063c 5bd6a75
Author: Brandon Williams <br...@apache.org>
Authored: Thu May 1 15:19:15 2014 -0500
Committer: Brandon Williams <br...@apache.org>
Committed: Thu May 1 15:19:15 2014 -0500
----------------------------------------------------------------------
CHANGES.txt | 3 +
.../cassandra/locator/GoogleCloudSnitch.java | 128 +++++++++++++++++++
.../locator/GoogleCloudSnitchTest.java | 108 ++++++++++++++++
3 files changed, 239 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/c2579b92/CHANGES.txt
----------------------------------------------------------------------
diff --cc CHANGES.txt
index d98174b,16fcdfc..0c32f3c
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,11 -1,6 +1,14 @@@
+3.0
+ * Move sstable RandomAccessReader to nio2, which allows using the
+ FILE_SHARE_DELETE flag on Windows (CASSANDRA-4050)
+ * Remove CQL2 (CASSANDRA-5918)
+ * Add Thrift get_multi_slice call (CASSANDRA-6757)
+ * Optimize fetching multiple cells by name (CASSANDRA-6933)
+ * Allow compilation in java 8 (CASSANDRA-7208)
+
+ 2.1.0-rc1
+ Merged from 2.0:
+ * Add Google Compute Engine snitch (CASSANDRA-7132)
2.1.0-beta2
* Increase default CL space to 8GB (CASSANDRA-7031)
[4/6] git commit: Merge branch 'cassandra-2.0' into cassandra-2.1
Posted by br...@apache.org.
Merge branch 'cassandra-2.0' into cassandra-2.1
Conflicts:
CHANGES.txt
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/5bd6a756
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/5bd6a756
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/5bd6a756
Branch: refs/heads/trunk
Commit: 5bd6a756e10b4e869f1babb3bb6f9dfb223bd75e
Parents: 1491f75 f2bbd6f
Author: Brandon Williams <br...@apache.org>
Authored: Thu May 1 15:14:34 2014 -0500
Committer: Brandon Williams <br...@apache.org>
Committed: Thu May 1 15:14:34 2014 -0500
----------------------------------------------------------------------
CHANGES.txt | 4 +
.../cassandra/locator/GoogleCloudSnitch.java | 128 +++++++++++++++++++
.../locator/GoogleCloudSnitchTest.java | 108 ++++++++++++++++
3 files changed, 240 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/5bd6a756/CHANGES.txt
----------------------------------------------------------------------
diff --cc CHANGES.txt
index be72ad1,827003b..16fcdfc
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,63 -1,5 +1,67 @@@
-2.0.8
++2.1.0-rc1
++Merged from 2.0:
+ * Add Google Compute Engine snitch (CASSANDRA-7132)
++
+2.1.0-beta2
+ * Increase default CL space to 8GB (CASSANDRA-7031)
+ * Add range tombstones to read repair digests (CASSANDRA-6863)
+ * Fix BTree.clear for large updates (CASSANDRA-6943)
+ * Fail write instead of logging a warning when unable to append to CL
+ (CASSANDRA-6764)
+ * Eliminate possibility of CL segment appearing twice in active list
+ (CASSANDRA-6557)
+ * Apply DONTNEED fadvise to commitlog segments (CASSANDRA-6759)
+ * Switch CRC component to Adler and include it for compressed sstables
+ (CASSANDRA-4165)
+ * Allow cassandra-stress to set compaction strategy options (CASSANDRA-6451)
+ * Add broadcast_rpc_address option to cassandra.yaml (CASSANDRA-5899)
+ * Auto reload GossipingPropertyFileSnitch config (CASSANDRA-5897)
+ * Fix overflow of memtable_total_space_in_mb (CASSANDRA-6573)
+ * Fix ABTC NPE and apply update function correctly (CASSANDRA-6692)
+ * Allow nodetool to use a file or prompt for password (CASSANDRA-6660)
+ * Fix AIOOBE when concurrently accessing ABSC (CASSANDRA-6742)
+ * Fix assertion error in ALTER TYPE RENAME (CASSANDRA-6705)
+ * Scrub should not always clear out repaired status (CASSANDRA-5351)
+ * Improve handling of range tombstone for wide partitions (CASSANDRA-6446)
+ * Fix ClassCastException for compact table with composites (CASSANDRA-6738)
+ * Fix potentially repairing with wrong nodes (CASSANDRA-6808)
+ * Change caching option syntax (CASSANDRA-6745)
+ * Fix stress to do proper counter reads (CASSANDRA-6835)
+ * Fix help message for stress counter_write (CASSANDRA-6824)
+ * Fix stress smart Thrift client to pick servers correctly (CASSANDRA-6848)
+ * Add logging levels (minimal, normal or verbose) to stress tool (CASSANDRA-6849)
+ * Fix race condition in Batch CLE (CASSANDRA-6860)
+ * Improve cleanup/scrub/upgradesstables failure handling (CASSANDRA-6774)
+ * ByteBuffer write() methods for serializing sstables (CASSANDRA-6781)
+ * Proper compare function for CollectionType (CASSANDRA-6783)
+ * Update native server to Netty 4 (CASSANDRA-6236)
+ * Fix off-by-one error in stress (CASSANDRA-6883)
+ * Make OpOrder AutoCloseable (CASSANDRA-6901)
+ * Remove sync repair JMX interface (CASSANDRA-6900)
+ * Add multiple memory allocation options for memtables (CASSANDRA-6689, 6694)
+ * Remove adjusted op rate from stress output (CASSANDRA-6921)
+ * Add optimized CF.hasColumns() implementations (CASSANDRA-6941)
+ * Serialize batchlog mutations with the version of the target node
+ (CASSANDRA-6931)
+ * Optimize CounterColumn#reconcile() (CASSANDRA-6953)
+ * Properly remove 1.2 sstable support in 2.1 (CASSANDRA-6869)
+ * Lock counter cells, not partitions (CASSANDRA-6880)
+ * Track presence of legacy counter shards in sstables (CASSANDRA-6888)
+ * Ensure safe resource cleanup when replacing sstables (CASSANDRA-6912)
+ * Add failure handler to async callback (CASSANDRA-6747)
+ * Fix AE when closing SSTable without releasing reference (CASSANDRA-7000)
+ * Clean up IndexInfo on keyspace/table drops (CASSANDRA-6924)
+ * Only snapshot relative SSTables when sequential repair (CASSANDRA-7024)
+ * Require nodetool rebuild_index to specify index names (CASSANDRA-7038)
+ * fix cassandra stress errors on reads with native protocol (CASSANDRA-7033)
+ * Use OpOrder to guard sstable references for reads (CASSANDRA-6919)
+ * Preemptive opening of compaction result (CASSANDRA-6916)
+ * Multi-threaded scrub/cleanup/upgradesstables (CASSANDRA-5547)
+ * Optimize cellname comparison (CASSANDRA-6934)
+ * Native protocol v3 (CASSANDRA-6855)
+ * Optimize Cell liveness checks and clean up Cell (CASSANDRA-7119)
+ * Support consistent range movements (CASSANDRA-2434)
+Merged from 2.0:
* Allow overriding cassandra-rackdc.properties file (CASSANDRA-7072)
* Set JMX RMI port to 7199 (CASSANDRA-7087)
* Use LOCAL_QUORUM for data reads at LOCAL_SERIAL (CASSANDRA-6939)
[2/6] git commit: Add Google Compute Engine snitch.
Posted by br...@apache.org.
Add Google Compute Engine snitch.
Patch by Brian Lynch, reviewed by brandonwilliams for CASSANDRA-7132
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/f2bbd6fc
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/f2bbd6fc
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/f2bbd6fc
Branch: refs/heads/cassandra-2.1
Commit: f2bbd6fcc670b9cb2eecbe0d2964d7e4b785e543
Parents: 427fdd4
Author: Brandon Williams <br...@apache.org>
Authored: Thu May 1 15:12:55 2014 -0500
Committer: Brandon Williams <br...@apache.org>
Committed: Thu May 1 15:12:55 2014 -0500
----------------------------------------------------------------------
CHANGES.txt | 1 +
.../cassandra/locator/GoogleCloudSnitch.java | 128 +++++++++++++++++++
.../locator/GoogleCloudSnitchTest.java | 108 ++++++++++++++++
3 files changed, 237 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/f2bbd6fc/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index e25e71f..827003b 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
2.0.8
+ * Add Google Compute Engine snitch (CASSANDRA-7132)
* Allow overriding cassandra-rackdc.properties file (CASSANDRA-7072)
* Set JMX RMI port to 7199 (CASSANDRA-7087)
* Use LOCAL_QUORUM for data reads at LOCAL_SERIAL (CASSANDRA-6939)
http://git-wip-us.apache.org/repos/asf/cassandra/blob/f2bbd6fc/src/java/org/apache/cassandra/locator/GoogleCloudSnitch.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/locator/GoogleCloudSnitch.java b/src/java/org/apache/cassandra/locator/GoogleCloudSnitch.java
new file mode 100644
index 0000000..05fbea2
--- /dev/null
+++ b/src/java/org/apache/cassandra/locator/GoogleCloudSnitch.java
@@ -0,0 +1,128 @@
+/*
+ * 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.DataInputStream;
+import java.io.FilterInputStream;
+import java.io.IOException;
+import java.net.HttpURLConnection;
+import java.net.InetAddress;
+import java.net.URL;
+import java.nio.charset.StandardCharsets;
+import java.util.Map;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.apache.cassandra.db.SystemKeyspace;
+import org.apache.cassandra.exceptions.ConfigurationException;
+import org.apache.cassandra.gms.ApplicationState;
+import org.apache.cassandra.gms.EndpointState;
+import org.apache.cassandra.gms.Gossiper;
+import org.apache.cassandra.io.util.FileUtils;
+import org.apache.cassandra.utils.FBUtilities;
+
+/**
+ * A snitch that assumes an GCE region is a DC and an GCE availability_zone
+ * is a rack. This information is available in the config for the node.
+ */
+public class GoogleCloudSnitch extends AbstractNetworkTopologySnitch
+{
+ protected static final Logger logger = LoggerFactory.getLogger(GoogleCloudSnitch.class);
+ protected static final String ZONE_NAME_QUERY_URL = "http://metadata.google.internal/computeMetadata/v1/instance/zone";
+ private static final String DEFAULT_DC = "UNKNOWN-DC";
+ private static final String DEFAULT_RACK = "UNKNOWN-RACK";
+ private Map<InetAddress, Map<String, String>> savedEndpoints;
+ protected String gceZone;
+ protected String gceRegion;
+
+ public GoogleCloudSnitch() throws IOException, ConfigurationException
+ {
+ String response = gceApiCall(ZONE_NAME_QUERY_URL);
+ String[] splits = response.split("/");
+ String az = splits[splits.length - 1];
+
+ // Split "us-central1-a" or "asia-east1-a" into "us-central1"/"a" and "asia-east1"/"a".
+ splits = az.split("-");
+ gceZone = splits[splits.length - 1];
+
+ int lastRegionIndex = az.lastIndexOf("-");
+ gceRegion = az.substring(0, lastRegionIndex);
+
+ String datacenterSuffix = (new SnitchProperties()).get("dc_suffix", "");
+ gceRegion = gceRegion.concat(datacenterSuffix);
+ logger.info("GCESnitch using region: {}, zone: {}.", gceRegion, gceZone);
+ }
+
+ String gceApiCall(String url) throws IOException, ConfigurationException
+ {
+ // Populate the region and zone by introspection, fail if 404 on metadata
+ HttpURLConnection conn = (HttpURLConnection) new URL(url).openConnection();
+ DataInputStream d = null;
+ try
+ {
+ conn.setRequestMethod("GET");
+ conn.setRequestProperty("Metadata-Flavor", "Google");
+ if (conn.getResponseCode() != 200)
+ throw new ConfigurationException("GoogleCloudSnitch was unable to execute the API call. Not a gce node?");
+
+ // Read the information.
+ int cl = conn.getContentLength();
+ byte[] b = new byte[cl];
+ d = new DataInputStream((FilterInputStream) conn.getContent());
+ d.readFully(b);
+ return new String(b, StandardCharsets.UTF_8);
+ }
+ finally
+ {
+ FileUtils.close(d);
+ conn.disconnect();
+ }
+ }
+
+ public String getRack(InetAddress endpoint)
+ {
+ if (endpoint.equals(FBUtilities.getBroadcastAddress()))
+ return gceZone;
+ EndpointState state = Gossiper.instance.getEndpointStateForEndpoint(endpoint);
+ if (state == null || state.getApplicationState(ApplicationState.RACK) == null)
+ {
+ if (savedEndpoints == null)
+ savedEndpoints = SystemKeyspace.loadDcRackInfo();
+ if (savedEndpoints.containsKey(endpoint))
+ return savedEndpoints.get(endpoint).get("rack");
+ return DEFAULT_RACK;
+ }
+ return state.getApplicationState(ApplicationState.RACK).value;
+ }
+
+ public String getDatacenter(InetAddress endpoint)
+ {
+ if (endpoint.equals(FBUtilities.getBroadcastAddress()))
+ return gceRegion;
+ EndpointState state = Gossiper.instance.getEndpointStateForEndpoint(endpoint);
+ if (state == null || state.getApplicationState(ApplicationState.DC) == null)
+ {
+ if (savedEndpoints == null)
+ savedEndpoints = SystemKeyspace.loadDcRackInfo();
+ if (savedEndpoints.containsKey(endpoint))
+ return savedEndpoints.get(endpoint).get("data_center");
+ return DEFAULT_DC;
+ }
+ return state.getApplicationState(ApplicationState.DC).value;
+ }
+}
http://git-wip-us.apache.org/repos/asf/cassandra/blob/f2bbd6fc/test/unit/org/apache/cassandra/locator/GoogleCloudSnitchTest.java
----------------------------------------------------------------------
diff --git a/test/unit/org/apache/cassandra/locator/GoogleCloudSnitchTest.java b/test/unit/org/apache/cassandra/locator/GoogleCloudSnitchTest.java
new file mode 100644
index 0000000..70080a8
--- /dev/null
+++ b/test/unit/org/apache/cassandra/locator/GoogleCloudSnitchTest.java
@@ -0,0 +1,108 @@
+package org.apache.cassandra.locator;
+/*
+ *
+ * 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.
+ *
+ */
+
+
+import java.io.IOException;
+import java.net.InetAddress;
+import java.net.UnknownHostException;
+import java.util.Map;
+
+import org.junit.AfterClass;
+import org.junit.Assert;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+import org.apache.cassandra.SchemaLoader;
+import org.apache.cassandra.db.Keyspace;
+import org.apache.cassandra.exceptions.ConfigurationException;
+import org.apache.cassandra.gms.ApplicationState;
+import org.apache.cassandra.gms.Gossiper;
+import org.apache.cassandra.gms.VersionedValue;
+import org.apache.cassandra.net.MessagingService;
+import org.apache.cassandra.net.OutboundTcpConnectionPool;
+import org.apache.cassandra.service.StorageService;
+
+import static org.junit.Assert.assertEquals;
+
+public class GoogleCloudSnitchTest
+{
+ private static String az;
+
+ @BeforeClass
+ public static void setup() throws Exception
+ {
+ SchemaLoader.mkdirs();
+ SchemaLoader.cleanup();
+ Keyspace.setInitialized();
+ StorageService.instance.initServer(0);
+ }
+
+ private class TestGoogleCloudSnitch extends GoogleCloudSnitch
+ {
+ public TestGoogleCloudSnitch() throws IOException, ConfigurationException
+ {
+ super();
+ }
+
+ @Override
+ String gceApiCall(String url) throws IOException, ConfigurationException
+ {
+ return az;
+ }
+ }
+
+ @Test
+ public void testRac() throws IOException, ConfigurationException
+ {
+ az = "us-central1-a";
+ GoogleCloudSnitch snitch = new TestGoogleCloudSnitch();
+ InetAddress local = InetAddress.getByName("127.0.0.1");
+ InetAddress nonlocal = InetAddress.getByName("127.0.0.7");
+
+ Gossiper.instance.addSavedEndpoint(nonlocal);
+ Map<ApplicationState,VersionedValue> stateMap = Gossiper.instance.getEndpointStateForEndpoint(nonlocal).getApplicationStateMap();
+ stateMap.put(ApplicationState.DC, StorageService.instance.valueFactory.datacenter("europe-west1"));
+ stateMap.put(ApplicationState.RACK, StorageService.instance.valueFactory.datacenter("a"));
+
+ assertEquals("europe-west1", snitch.getDatacenter(nonlocal));
+ assertEquals("a", snitch.getRack(nonlocal));
+
+ assertEquals("us-central1", snitch.getDatacenter(local));
+ assertEquals("a", snitch.getRack(local));
+ }
+
+ @Test
+ public void testNewRegions() throws IOException, ConfigurationException
+ {
+ az = "asia-east1-a";
+ GoogleCloudSnitch snitch = new TestGoogleCloudSnitch();
+ InetAddress local = InetAddress.getByName("127.0.0.1");
+ assertEquals("asia-east1", snitch.getDatacenter(local));
+ assertEquals("a", snitch.getRack(local));
+ }
+
+ @AfterClass
+ public static void tearDown()
+ {
+ StorageService.instance.stopClient();
+ }
+}
[5/6] git commit: Merge branch 'cassandra-2.0' into cassandra-2.1
Posted by br...@apache.org.
Merge branch 'cassandra-2.0' into cassandra-2.1
Conflicts:
CHANGES.txt
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/5bd6a756
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/5bd6a756
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/5bd6a756
Branch: refs/heads/cassandra-2.1
Commit: 5bd6a756e10b4e869f1babb3bb6f9dfb223bd75e
Parents: 1491f75 f2bbd6f
Author: Brandon Williams <br...@apache.org>
Authored: Thu May 1 15:14:34 2014 -0500
Committer: Brandon Williams <br...@apache.org>
Committed: Thu May 1 15:14:34 2014 -0500
----------------------------------------------------------------------
CHANGES.txt | 4 +
.../cassandra/locator/GoogleCloudSnitch.java | 128 +++++++++++++++++++
.../locator/GoogleCloudSnitchTest.java | 108 ++++++++++++++++
3 files changed, 240 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/5bd6a756/CHANGES.txt
----------------------------------------------------------------------
diff --cc CHANGES.txt
index be72ad1,827003b..16fcdfc
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,63 -1,5 +1,67 @@@
-2.0.8
++2.1.0-rc1
++Merged from 2.0:
+ * Add Google Compute Engine snitch (CASSANDRA-7132)
++
+2.1.0-beta2
+ * Increase default CL space to 8GB (CASSANDRA-7031)
+ * Add range tombstones to read repair digests (CASSANDRA-6863)
+ * Fix BTree.clear for large updates (CASSANDRA-6943)
+ * Fail write instead of logging a warning when unable to append to CL
+ (CASSANDRA-6764)
+ * Eliminate possibility of CL segment appearing twice in active list
+ (CASSANDRA-6557)
+ * Apply DONTNEED fadvise to commitlog segments (CASSANDRA-6759)
+ * Switch CRC component to Adler and include it for compressed sstables
+ (CASSANDRA-4165)
+ * Allow cassandra-stress to set compaction strategy options (CASSANDRA-6451)
+ * Add broadcast_rpc_address option to cassandra.yaml (CASSANDRA-5899)
+ * Auto reload GossipingPropertyFileSnitch config (CASSANDRA-5897)
+ * Fix overflow of memtable_total_space_in_mb (CASSANDRA-6573)
+ * Fix ABTC NPE and apply update function correctly (CASSANDRA-6692)
+ * Allow nodetool to use a file or prompt for password (CASSANDRA-6660)
+ * Fix AIOOBE when concurrently accessing ABSC (CASSANDRA-6742)
+ * Fix assertion error in ALTER TYPE RENAME (CASSANDRA-6705)
+ * Scrub should not always clear out repaired status (CASSANDRA-5351)
+ * Improve handling of range tombstone for wide partitions (CASSANDRA-6446)
+ * Fix ClassCastException for compact table with composites (CASSANDRA-6738)
+ * Fix potentially repairing with wrong nodes (CASSANDRA-6808)
+ * Change caching option syntax (CASSANDRA-6745)
+ * Fix stress to do proper counter reads (CASSANDRA-6835)
+ * Fix help message for stress counter_write (CASSANDRA-6824)
+ * Fix stress smart Thrift client to pick servers correctly (CASSANDRA-6848)
+ * Add logging levels (minimal, normal or verbose) to stress tool (CASSANDRA-6849)
+ * Fix race condition in Batch CLE (CASSANDRA-6860)
+ * Improve cleanup/scrub/upgradesstables failure handling (CASSANDRA-6774)
+ * ByteBuffer write() methods for serializing sstables (CASSANDRA-6781)
+ * Proper compare function for CollectionType (CASSANDRA-6783)
+ * Update native server to Netty 4 (CASSANDRA-6236)
+ * Fix off-by-one error in stress (CASSANDRA-6883)
+ * Make OpOrder AutoCloseable (CASSANDRA-6901)
+ * Remove sync repair JMX interface (CASSANDRA-6900)
+ * Add multiple memory allocation options for memtables (CASSANDRA-6689, 6694)
+ * Remove adjusted op rate from stress output (CASSANDRA-6921)
+ * Add optimized CF.hasColumns() implementations (CASSANDRA-6941)
+ * Serialize batchlog mutations with the version of the target node
+ (CASSANDRA-6931)
+ * Optimize CounterColumn#reconcile() (CASSANDRA-6953)
+ * Properly remove 1.2 sstable support in 2.1 (CASSANDRA-6869)
+ * Lock counter cells, not partitions (CASSANDRA-6880)
+ * Track presence of legacy counter shards in sstables (CASSANDRA-6888)
+ * Ensure safe resource cleanup when replacing sstables (CASSANDRA-6912)
+ * Add failure handler to async callback (CASSANDRA-6747)
+ * Fix AE when closing SSTable without releasing reference (CASSANDRA-7000)
+ * Clean up IndexInfo on keyspace/table drops (CASSANDRA-6924)
+ * Only snapshot relative SSTables when sequential repair (CASSANDRA-7024)
+ * Require nodetool rebuild_index to specify index names (CASSANDRA-7038)
+ * fix cassandra stress errors on reads with native protocol (CASSANDRA-7033)
+ * Use OpOrder to guard sstable references for reads (CASSANDRA-6919)
+ * Preemptive opening of compaction result (CASSANDRA-6916)
+ * Multi-threaded scrub/cleanup/upgradesstables (CASSANDRA-5547)
+ * Optimize cellname comparison (CASSANDRA-6934)
+ * Native protocol v3 (CASSANDRA-6855)
+ * Optimize Cell liveness checks and clean up Cell (CASSANDRA-7119)
+ * Support consistent range movements (CASSANDRA-2434)
+Merged from 2.0:
* Allow overriding cassandra-rackdc.properties file (CASSANDRA-7072)
* Set JMX RMI port to 7199 (CASSANDRA-7087)
* Use LOCAL_QUORUM for data reads at LOCAL_SERIAL (CASSANDRA-6939)