zookeeper-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mic...@apache.org
Subject svn commit: r1625462 - in /zookeeper/trunk: CHANGES.txt src/java/main/org/apache/zookeeper/server/quorum/QuorumPeerConfig.java
Date Wed, 17 Sep 2014 05:34:28 GMT
Author: michim
Date: Wed Sep 17 05:34:28 2014
New Revision: 1625462

URL: http://svn.apache.org/r1625462
Log:
ZOOKEEPER-2030 dynamicConfigFile should have an absolute path, not a relative
path, to the dynamic configuration file (Alexander Shraer via michim)

Modified:
    zookeeper/trunk/CHANGES.txt
    zookeeper/trunk/src/java/main/org/apache/zookeeper/server/quorum/QuorumPeerConfig.java

Modified: zookeeper/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/zookeeper/trunk/CHANGES.txt?rev=1625462&r1=1625461&r2=1625462&view=diff
==============================================================================
--- zookeeper/trunk/CHANGES.txt (original)
+++ zookeeper/trunk/CHANGES.txt Wed Sep 17 05:34:28 2014
@@ -10,6 +10,9 @@ IMPROVEMENTS:
   ZOOKEEPER-2017 New tests for reconfig failure cases (Alexander Shraer and
   Hongchao Deng via michim)
 
+  ZOOKEEPER-2030 dynamicConfigFile should have an absolute path, not a relative
+  path, to the dynamic configuration file (Alexander Shraer via michim)
+
 Release 3.5.0 - 8/4/2014
 
 NEW FEATURES:

Modified: zookeeper/trunk/src/java/main/org/apache/zookeeper/server/quorum/QuorumPeerConfig.java
URL: http://svn.apache.org/viewvc/zookeeper/trunk/src/java/main/org/apache/zookeeper/server/quorum/QuorumPeerConfig.java?rev=1625462&r1=1625461&r2=1625462&view=diff
==============================================================================
--- zookeeper/trunk/src/java/main/org/apache/zookeeper/server/quorum/QuorumPeerConfig.java
(original)
+++ zookeeper/trunk/src/java/main/org/apache/zookeeper/server/quorum/QuorumPeerConfig.java
Wed Sep 17 05:34:28 2014
@@ -405,6 +405,11 @@ public class QuorumPeerConfig {
                 .failForNonExistingPath()
                 .build()).create(configFileStr);
 
+        final File dynamicFile = (new VerifyingFileFactory.Builder(LOG)
+                .warnForRelativePath()
+                .failForNonExistingPath()
+                .build()).create(dynamicFileStr);
+        
         final Properties cfg = new Properties();
         FileInputStream in = new FileInputStream(configFile);
         try {
@@ -436,7 +441,7 @@ public class QuorumPeerConfig {
 
                 // updates the dynamic file pointer
                 out.write("dynamicConfigFile="
-                         .concat(dynamicFileStr)
+                         .concat(dynamicFile.getCanonicalPath())
                          .concat("\n"));
             }
         });



Mime
View raw message