Merge branch 'cassandra-2.0' into cassandra-2.1
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/4b1d59e1 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/4b1d59e1 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/4b1d59e1 Branch: refs/heads/cassandra-3.0 Commit: 4b1d59e13143f5a55478a7cfcaca61ba22259f9f Parents: b8b4eb7 257cdaa Author: Aleksey Yeschenko <[email protected]> Authored: Wed Sep 16 11:44:28 2015 +0100 Committer: Aleksey Yeschenko <[email protected]> Committed: Wed Sep 16 11:44:28 2015 +0100 ---------------------------------------------------------------------- CHANGES.txt | 1 + .../locator/GossipingPropertyFileSnitch.java | 1 + .../cassandra/locator/PropertyFileSnitch.java | 1 + .../apache/cassandra/locator/TokenMetadata.java | 142 +++++++++---- .../locator/YamlFileNetworkTopologySnitch.java | 1 + .../cassandra/service/StorageService.java | 16 ++ .../cassandra/locator/TokenMetadataTest.java | 209 ++++++++++++++++++- 7 files changed, 333 insertions(+), 38 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cassandra/blob/4b1d59e1/CHANGES.txt ---------------------------------------------------------------------- diff --cc CHANGES.txt index 5f11049,3c47427..12523be --- a/CHANGES.txt +++ b/CHANGES.txt @@@ -1,46 -1,7 +1,47 @@@ -2.0.17 +2.1.10 + * (Pig) support BulkOutputFormat as a URL parameter (CASSANDRA-7410) + * BATCH statement is broken in cqlsh (CASSANDRA-10272) + * Added configurable warning threshold for GC duration (CASSANDRA-8907) + * (cqlsh) Make cqlsh PEP8 compliant (CASSANDRA-10066) + * (cqlsh) Fix error when starting cqlsh with --debug (CASSANDRA-10282) + * Scrub, Cleanup and Upgrade do not unmark compacting until all operations + have completed, regardless of the occurence of exceptions (CASSANDRA-10274) + * Fix handling of streaming EOF (CASSANDRA-10206) + * Only check KeyCache when it is enabled + * Change streaming_socket_timeout_in_ms default to 1 hour (CASSANDRA-8611) + * (cqlsh) update list of CQL keywords (CASSANDRA-9232) +Merged from 2.0: + * Fix consolidating racks violating the RF contract (CASSANDRA-10238) * Disallow decommission when node is in drained state (CASSANDRA-8741) - * Backport CASSANDRA-8013 to 2.0 (CASSANDRA-10144) + + +2.1.9 + * Avoid race condition during read repair (CASSANDRA-9460) + * (cqlsh) default load-from-file encoding to utf-8 (CASSANDRA-9898) + * Avoid returning Permission.NONE when failing to query users table (CASSANDRA-10168) + * (cqlsh) Allow encoding to be set through command line (CASSANDRA-10004) + * Add new JMX methods to change local compaction strategy (CASSANDRA-9965) + * Write hints for paxos commits (CASSANDRA-7342) + * (cqlsh) Fix timestamps before 1970 on Windows, always + use UTC for timestamp display (CASSANDRA-10000) + * (cqlsh) Avoid overwriting new config file with old config + when both exist (CASSANDRA-9777) + * Release snapshot selfRef when doing snapshot repair (CASSANDRA-9998) + * Cannot replace token does not exist - DN node removed as Fat Client (CASSANDRA-9871) + * Fix handling of enable/disable autocompaction (CASSANDRA-9899) + * Commit log segment recycling is disabled by default (CASSANDRA-9896) + * Add consistency level to tracing ouput (CASSANDRA-9827) + * 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) + * (cqlsh) Allow the SSL protocol version to be specified through the + config file or environment variables (CASSANDRA-9544) + * Remove repair snapshot leftover on startup (CASSANDRA-7357) + * Use random nodes for batch log when only 2 racks (CASSANDRA-8735) + * Ensure atomicity inside thrift and stream session (CASSANDRA-7757) + * Fix nodetool info error when the node is not joined (CASSANDRA-9031) +Merged from 2.0: * Make getFullyExpiredSSTables less expensive (CASSANDRA-9882) * Add tool to find why expired sstables are not getting dropped (CASSANDRA-10015) * Remove erroneous pending HH tasks from tpstats/jmx (CASSANDRA-9129) http://git-wip-us.apache.org/repos/asf/cassandra/blob/4b1d59e1/src/java/org/apache/cassandra/locator/GossipingPropertyFileSnitch.java ---------------------------------------------------------------------- diff --cc src/java/org/apache/cassandra/locator/GossipingPropertyFileSnitch.java index 2c0980a,dd1637d..da43600 --- a/src/java/org/apache/cassandra/locator/GossipingPropertyFileSnitch.java +++ b/src/java/org/apache/cassandra/locator/GossipingPropertyFileSnitch.java @@@ -72,24 -62,7 +72,25 @@@ public class GossipingPropertyFileSnitc } catch (ConfigurationException e) { - logger.info("Unable to load " + PropertyFileSnitch.SNITCH_PROPERTIES_FILENAME + "; compatibility mode disabled"); + logger.info("Unable to load {}; compatibility mode disabled", PropertyFileSnitch.SNITCH_PROPERTIES_FILENAME); + } + + try + { + FBUtilities.resourceToFile(SnitchProperties.RACKDC_PROPERTY_FILENAME); + Runnable runnable = new WrappedRunnable() + { + protected void runMayThrow() throws ConfigurationException + { + reloadConfiguration(); ++ StorageService.instance.updateTopology(FBUtilities.getBroadcastAddress()); + } + }; + ResourceWatcher.watch(SnitchProperties.RACKDC_PROPERTY_FILENAME, runnable, refreshPeriodInSeconds * 1000); + } + catch (ConfigurationException ex) + { + logger.error("{} found, but does not look like a plain file. Will not watch it for changes", SnitchProperties.RACKDC_PROPERTY_FILENAME); } } http://git-wip-us.apache.org/repos/asf/cassandra/blob/4b1d59e1/src/java/org/apache/cassandra/locator/PropertyFileSnitch.java ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cassandra/blob/4b1d59e1/src/java/org/apache/cassandra/locator/TokenMetadata.java ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cassandra/blob/4b1d59e1/src/java/org/apache/cassandra/locator/YamlFileNetworkTopologySnitch.java ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cassandra/blob/4b1d59e1/src/java/org/apache/cassandra/service/StorageService.java ---------------------------------------------------------------------- diff --cc src/java/org/apache/cassandra/service/StorageService.java index acc82e6,c5f159e..f5950e3 --- a/src/java/org/apache/cassandra/service/StorageService.java +++ b/src/java/org/apache/cassandra/service/StorageService.java @@@ -1520,26 -1375,21 +1520,28 @@@ public class StorageService extends Not switch (state) { case RELEASE_VERSION: - SystemKeyspace.updatePeerInfo(endpoint, "release_version", quote(value.value)); + SystemKeyspace.updatePeerInfo(endpoint, "release_version", value.value); break; case DC: + updateTopology(endpoint); - SystemKeyspace.updatePeerInfo(endpoint, "data_center", quote(value.value)); + SystemKeyspace.updatePeerInfo(endpoint, "data_center", value.value); break; case RACK: + updateTopology(endpoint); - SystemKeyspace.updatePeerInfo(endpoint, "rack", quote(value.value)); + SystemKeyspace.updatePeerInfo(endpoint, "rack", value.value); break; case RPC_ADDRESS: - SystemKeyspace.updatePeerInfo(endpoint, "rpc_address", quote(value.value)); + try + { + SystemKeyspace.updatePeerInfo(endpoint, "rpc_address", InetAddress.getByName(value.value)); + } + catch (UnknownHostException e) + { + throw new RuntimeException(e); + } break; case SCHEMA: - SystemKeyspace.updatePeerInfo(endpoint, "schema_version", value.value); + SystemKeyspace.updatePeerInfo(endpoint, "schema_version", UUID.fromString(value.value)); MigrationManager.instance.scheduleSchemaPull(endpoint, epState); break; case HOST_ID:
