cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brandonwilli...@apache.org
Subject [03/11] git commit: Merge branch 'cassandra-1.2' into cassandra-2.0
Date Tue, 05 Aug 2014 22:55:13 GMT
Merge branch 'cassandra-1.2' into cassandra-2.0

Conflicts:
	src/java/org/apache/cassandra/locator/SimpleSeedProvider.java


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

Branch: refs/heads/cassandra-2.1
Commit: d5d1adb4407f226c23257c300d9184c0abe32aa9
Parents: 4b6d6eb 73eb68c
Author: Brandon Williams <brandonwilliams@apache.org>
Authored: Tue Aug 5 13:57:39 2014 -0500
Committer: Brandon Williams <brandonwilliams@apache.org>
Committed: Tue Aug 5 13:57:39 2014 -0500

----------------------------------------------------------------------
 .../cassandra/locator/SimpleSeedProvider.java   | 27 ++++++++++++++++----
 1 file changed, 22 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/d5d1adb4/src/java/org/apache/cassandra/locator/SimpleSeedProvider.java
----------------------------------------------------------------------
diff --cc src/java/org/apache/cassandra/locator/SimpleSeedProvider.java
index a9ca15b,6c426bd..eda9fff
--- a/src/java/org/apache/cassandra/locator/SimpleSeedProvider.java
+++ b/src/java/org/apache/cassandra/locator/SimpleSeedProvider.java
@@@ -50,8 -61,22 +61,14 @@@ public class SimpleSeedProvider impleme
          }
          catch (Exception e)
          {
-             throw new AssertionError(e);
+             logger.warn("Could not refresh seeds from configuration file: {}", e);
          }
+         return Collections.unmodifiableList(seeds);
+     }
+ 
+     private List<InetAddress> loadSeeds() throws IOException, ConfigurationException
+     {
 -        InputStream input;
 -        URL url = DatabaseDescriptor.getStorageConfigURL();
 -        input = url.openStream();
 -        org.yaml.snakeyaml.constructor.Constructor constructor = new org.yaml.snakeyaml.constructor.Constructor(Config.class);
 -        TypeDescription seedDesc = new TypeDescription(SeedProviderDef.class);
 -        seedDesc.putMapPropertyType("parameters", String.class, String.class);
 -        constructor.addTypeDescription(seedDesc);
 -        Yaml yaml = new Yaml(new Loader(constructor));
 -        Config conf = (Config)yaml.load(input);
++        Config conf = DatabaseDescriptor.loadConfig();
          String[] hosts = conf.seed_provider.parameters.get("seeds").split(",", -1);
          List<InetAddress> seeds = new ArrayList<InetAddress>(hosts.length);
          for (String host : hosts)


Mime
View raw message