cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbel...@apache.org
Subject svn commit: r1165405 - in /cassandra/branches/cassandra-0.8: CHANGES.txt src/java/org/apache/cassandra/locator/PropertyFileSnitch.java
Date Mon, 05 Sep 2011 19:58:27 GMT
Author: jbellis
Date: Mon Sep  5 19:58:27 2011
New Revision: 1165405

URL: http://svn.apache.org/viewvc?rev=1165405&view=rev
Log:
avoid trying to watch cassandra-topology.properties when loaded from jar
patch by Mck SembWever; reviewed by jbellis for CASSANDRA-3138

Modified:
    cassandra/branches/cassandra-0.8/CHANGES.txt
    cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/locator/PropertyFileSnitch.java

Modified: cassandra/branches/cassandra-0.8/CHANGES.txt
URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.8/CHANGES.txt?rev=1165405&r1=1165404&r2=1165405&view=diff
==============================================================================
--- cassandra/branches/cassandra-0.8/CHANGES.txt (original)
+++ cassandra/branches/cassandra-0.8/CHANGES.txt Mon Sep  5 19:58:27 2011
@@ -1,3 +1,8 @@
+0.8.6
+ * avoid trying to watch cassandra-topology.properties when loaded from jar
+   (CASSANDRA-3138)
+
+
 0.8.5
  * fix NPE when encryption_options is unspecified (CASSANDRA-3007)
  * include column name in validation failure exceptions (CASSANDRA-2849)

Modified: cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/locator/PropertyFileSnitch.java
URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/locator/PropertyFileSnitch.java?rev=1165405&r1=1165404&r2=1165405&view=diff
==============================================================================
--- cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/locator/PropertyFileSnitch.java
(original)
+++ cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/locator/PropertyFileSnitch.java
Mon Sep  5 19:58:27 2011
@@ -58,14 +58,22 @@ public class PropertyFileSnitch extends 
     public PropertyFileSnitch() throws ConfigurationException
     {
         reloadConfiguration();
-        Runnable runnable = new WrappedRunnable()
+        try
         {
-            protected void runMayThrow() throws ConfigurationException
+            FBUtilities.resourceToFile(RACK_PROPERTY_FILENAME);
+            Runnable runnable = new WrappedRunnable()
             {
-                reloadConfiguration();
-            }
-        };
-        ResourceWatcher.watch(RACK_PROPERTY_FILENAME, runnable, 60 * 1000);
+                protected void runMayThrow() throws ConfigurationException
+                {
+                    reloadConfiguration();
+                }
+            };
+            ResourceWatcher.watch(RACK_PROPERTY_FILENAME, runnable, 60 * 1000);
+        }
+        catch (ConfigurationException ex)
+        {
+            logger.debug(RACK_PROPERTY_FILENAME + " found, but does not look like a plain
file. Will not watch it for changes");
+        }
     }
 
     /**



Mime
View raw message