Merge branch 'cassandra-1.1' into cassandra-1.2

Conflicts:
	src/java/org/apache/cassandra/locator/GossipingPropertyFileSnitch.java
This commit is contained in:
Vijay Parthasarathy 2013-02-01 12:30:40 -08:00
commit fa1f9bab71
3 changed files with 7 additions and 2 deletions

View File

@ -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

View File

@ -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();

View File

@ -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
{