cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vi...@apache.org
Subject git commit: Unable to start when using Ec2Snitch Patch by Vijay, reviewed by Brandon Williams for CASSANDRA-5212
Date Fri, 01 Feb 2013 19:32:45 GMT
Updated Branches:
  refs/heads/cassandra-1.1 73d828e4e -> 082ea28cd


Unable to start when using Ec2Snitch
Patch by Vijay, reviewed by Brandon Williams for CASSANDRA-5212

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

Branch: refs/heads/cassandra-1.1
Commit: 082ea28cd7286e9882e60913444b322ea691fc3d
Parents: 73d828e
Author: Vijay Parthasarathy <vijay2win@gmail.com>
Authored: Fri Feb 1 11:30:31 2013 -0800
Committer: Vijay Parthasarathy <vijay2win@gmail.com>
Committed: Fri Feb 1 11:30:31 2013 -0800

----------------------------------------------------------------------
 .../locator/GossipingPropertyFileSnitch.java       |    2 +-
 .../apache/cassandra/locator/SnitchProperties.java |    5 ++++-
 2 files changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/082ea28c/src/java/org/apache/cassandra/locator/GossipingPropertyFileSnitch.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/locator/GossipingPropertyFileSnitch.java b/src/java/org/apache/cassandra/locator/GossipingPropertyFileSnitch.java
index 72c9bb8..0674cfa 100644
--- a/src/java/org/apache/cassandra/locator/GossipingPropertyFileSnitch.java
+++ b/src/java/org/apache/cassandra/locator/GossipingPropertyFileSnitch.java
@@ -45,7 +45,7 @@ public class GossipingPropertyFileSnitch extends AbstractNetworkTopologySnitch
         myDC = SnitchProperties.get("dc", null);
         myRack = SnitchProperties.get("rack", null);
         if (myDC == null || myRack == null)
-            throw new ConfigurationException("DC or rack not found in snitch properties");
+            throw new ConfigurationException("DC or rack not found in snitch properties,
Plz check your configuration in: " + SnitchProperties.RACKDC_PROPERTY_FILENAME);
         try
         {
             psnitch = new PropertyFileSnitch();

http://git-wip-us.apache.org/repos/asf/cassandra/blob/082ea28c/src/java/org/apache/cassandra/locator/SnitchProperties.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/locator/SnitchProperties.java b/src/java/org/apache/cassandra/locator/SnitchProperties.java
index 16989ff..a71decd 100644
--- a/src/java/org/apache/cassandra/locator/SnitchProperties.java
+++ b/src/java/org/apache/cassandra/locator/SnitchProperties.java
@@ -21,9 +21,11 @@ import java.io.InputStream;
 import java.util.Properties;
 
 import org.apache.cassandra.io.util.FileUtils;
+import org.apache.log4j.Logger;
 
 public class SnitchProperties
 {
+    private static final Logger logger = LoggerFactory.getLogger(GossipingPropertyFileSnitch.class);
     public static final String RACKDC_PROPERTY_FILENAME = "cassandra-rackdc.properties";
     private static Properties properties = new Properties();
 
@@ -36,7 +38,8 @@ public class SnitchProperties
         }
         catch (Exception e)
         {
-            throw new RuntimeException("Unable to read " + RACKDC_PROPERTY_FILENAME, e);
+            // do not throw exception here, just consider this a incomplete or a empty property
file.
+            logger.warn("Unable to read " + RACKDC_PROPERTY_FILENAME);
         }
         finally
         {


Mime
View raw message