diff --git a/debian/cassandra.install b/debian/cassandra.install index e1966051ba..6fa84ce11b 100644 --- a/debian/cassandra.install +++ b/debian/cassandra.install @@ -1,6 +1,7 @@ conf/log4j-server.properties etc/cassandra conf/cassandra.yaml etc/cassandra conf/cassandra-env.sh etc/cassandra +conf/cassandra-rackdc.properties etc/cassandra debian/cassandra.in.sh usr/share/cassandra debian/cassandra.conf etc/security/limits.d debian/cassandra-sysctl.conf etc/sysctl.d diff --git a/src/java/org/apache/cassandra/locator/GossipingPropertyFileSnitch.java b/src/java/org/apache/cassandra/locator/GossipingPropertyFileSnitch.java index a75f3f7a13..0b36a3c52f 100644 --- a/src/java/org/apache/cassandra/locator/GossipingPropertyFileSnitch.java +++ b/src/java/org/apache/cassandra/locator/GossipingPropertyFileSnitch.java @@ -47,7 +47,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); myDC = myDC.trim(); myRack = myRack.trim(); diff --git a/src/java/org/apache/cassandra/locator/SnitchProperties.java b/src/java/org/apache/cassandra/locator/SnitchProperties.java index 16989ff6ff..ae27fbe913 100644 --- a/src/java/org/apache/cassandra/locator/SnitchProperties.java +++ b/src/java/org/apache/cassandra/locator/SnitchProperties.java @@ -21,9 +21,12 @@ import java.io.InputStream; import java.util.Properties; import org.apache.cassandra.io.util.FileUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; 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 +39,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 {