You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by be...@apache.org on 2011/06/05 07:35:29 UTC

svn commit: r1131805 - /incubator/mesos/trunk/src/master_detector.cpp

Author: benh
Date: Sun Jun  5 05:35:29 2011
New Revision: 1131805

URL: http://svn.apache.org/viewvc?rev=1131805&view=rev
Log:
More minor updates to removing znode path from compile time configuration.

Modified:
    incubator/mesos/trunk/src/master_detector.cpp

Modified: incubator/mesos/trunk/src/master_detector.cpp
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/master_detector.cpp?rev=1131805&r1=1131804&r2=1131805&view=diff
==============================================================================
--- incubator/mesos/trunk/src/master_detector.cpp (original)
+++ incubator/mesos/trunk/src/master_detector.cpp Sun Jun  5 05:35:29 2011
@@ -272,6 +272,10 @@ ZooKeeperMasterDetector::ZooKeeperMaster
   // TODO(benh): Put this in the C++ API.
   zoo_set_debug_level(quiet ? ZOO_LOG_LEVEL_ERROR : ZOO_LOG_LEVEL_DEBUG);
 
+  // TODO(benh): Don't deal with znode like this!
+  if (znode == "/")
+    znode = "";
+
   // Start up the ZooKeeper connection!
   zk = new ZooKeeper(servers, 10000, this);
 }
@@ -298,7 +302,7 @@ void ZooKeeperMasterDetector::process(Zo
     // Check if this is a reconnect.
     if (!reconnect) {
       // Assume the znode that was created does not end with a "/".
-      CHECK(znode.at(znode.length() - 1) != '/' || znode.length() == 1);
+      CHECK(znode.at(znode.length() - 1) != '/');
 
       // Create directory path znodes as necessary.
       size_t index = znode.find(delimiter, 0);