You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by vi...@apache.org on 2014/03/27 19:26:30 UTC

[1/3] git commit: Fixed tabs in mesos.

Repository: mesos
Updated Branches:
  refs/heads/master bc0028d66 -> 616321c7c


Fixed tabs in mesos.

Review: https://reviews.apache.org/r/19740


Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/616321c7
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/616321c7
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/616321c7

Branch: refs/heads/master
Commit: 616321c7cd731d985dbdc4c24e01ab17c8f9ab8d
Parents: 963afaa
Author: Vinod Kone <vi...@twitter.com>
Authored: Thu Mar 27 10:55:50 2014 -0700
Committer: Vinod Kone <vi...@twitter.com>
Committed: Thu Mar 27 11:26:33 2014 -0700

----------------------------------------------------------------------
 src/master/detector.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/616321c7/src/master/detector.cpp
----------------------------------------------------------------------
diff --git a/src/master/detector.cpp b/src/master/detector.cpp
index ef9f1f5..2de1fd4 100644
--- a/src/master/detector.cpp
+++ b/src/master/detector.cpp
@@ -114,7 +114,7 @@ Try<MasterDetector*> MasterDetector::create(const string& master)
     }
     if (url.get().path == "/") {
       return Error(
-	  "Expecting a (chroot) path for ZooKeeper ('/' is not supported)");
+          "Expecting a (chroot) path for ZooKeeper ('/' is not supported)");
     }
     return new ZooKeeperMasterDetector(url.get());
   } else if (master.find("file://") == 0) {


[3/3] git commit: Fixed tabs in stout.

Posted by vi...@apache.org.
Fixed tabs in stout.

Review: https://reviews.apache.org/r/19738


Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/36063eda
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/36063eda
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/36063eda

Branch: refs/heads/master
Commit: 36063eda992c7e6e49804f9a1dda064fd6248b89
Parents: bc0028d
Author: Vinod Kone <vi...@twitter.com>
Authored: Thu Mar 27 10:55:04 2014 -0700
Committer: Vinod Kone <vi...@twitter.com>
Committed: Thu Mar 27 11:26:33 2014 -0700

----------------------------------------------------------------------
 .../3rdparty/stout/include/stout/foreach.hpp    | 32 ++++++++++----------
 .../3rdparty/stout/include/stout/format.hpp     |  2 +-
 2 files changed, 17 insertions(+), 17 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/36063eda/3rdparty/libprocess/3rdparty/stout/include/stout/foreach.hpp
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/3rdparty/stout/include/stout/foreach.hpp b/3rdparty/libprocess/3rdparty/stout/include/stout/foreach.hpp
index b76b0b0..428e4ba 100644
--- a/3rdparty/libprocess/3rdparty/stout/include/stout/foreach.hpp
+++ b/3rdparty/libprocess/3rdparty/stout/include/stout/foreach.hpp
@@ -33,22 +33,22 @@ swallow_assign const ignore = swallow_assign();
 
 } // namespace __foreach__ {
 
-#define BOOST_FOREACH_PAIR(VARFIRST, VARSECOND, COL)                                            \
-    BOOST_FOREACH_PREAMBLE()                                                                    \
-    if (boost::foreach_detail_::auto_any_t BOOST_FOREACH_ID(_foreach_col) = BOOST_FOREACH_CONTAIN(COL)) {} else   \
-    if (boost::foreach_detail_::auto_any_t BOOST_FOREACH_ID(_foreach_cur) = BOOST_FOREACH_BEGIN(COL)) {} else     \
-    if (boost::foreach_detail_::auto_any_t BOOST_FOREACH_ID(_foreach_end) = BOOST_FOREACH_END(COL)) {} else       \
-    for (bool BOOST_FOREACH_ID(_foreach_continue) = true, BOOST_FOREACH_ID(_foreach_onetime) = true;                                \
-              BOOST_FOREACH_ID(_foreach_continue) && !BOOST_FOREACH_DONE(COL);                                    \
-              BOOST_FOREACH_ID(_foreach_continue) ? BOOST_FOREACH_NEXT(COL) : (void)0)                            \
-        if  (boost::foreach_detail_::set_false(BOOST_FOREACH_ID(_foreach_onetime))) {} else                       \
-        for (VARFIRST = BOOST_FOREACH_DEREF(COL).first;                                         \
-	     !BOOST_FOREACH_ID(_foreach_onetime);                                                                 \
-	     BOOST_FOREACH_ID(_foreach_onetime) = true)                                                           \
-            if  (boost::foreach_detail_::set_false(BOOST_FOREACH_ID(_foreach_continue))) {} else                  \
-            for (VARSECOND = BOOST_FOREACH_DEREF(COL).second;                                   \
-		 !BOOST_FOREACH_ID(_foreach_continue);                                                            \
-		 BOOST_FOREACH_ID(_foreach_continue) = true)
+#define BOOST_FOREACH_PAIR(VARFIRST, VARSECOND, COL)                                                            \
+    BOOST_FOREACH_PREAMBLE()                                                                                    \
+    if (boost::foreach_detail_::auto_any_t BOOST_FOREACH_ID(_foreach_col) = BOOST_FOREACH_CONTAIN(COL)) {} else \
+    if (boost::foreach_detail_::auto_any_t BOOST_FOREACH_ID(_foreach_cur) = BOOST_FOREACH_BEGIN(COL)) {} else   \
+    if (boost::foreach_detail_::auto_any_t BOOST_FOREACH_ID(_foreach_end) = BOOST_FOREACH_END(COL)) {} else     \
+    for (bool BOOST_FOREACH_ID(_foreach_continue) = true, BOOST_FOREACH_ID(_foreach_onetime) = true;            \
+              BOOST_FOREACH_ID(_foreach_continue) && !BOOST_FOREACH_DONE(COL);                                  \
+              BOOST_FOREACH_ID(_foreach_continue) ? BOOST_FOREACH_NEXT(COL) : (void)0)                          \
+        if  (boost::foreach_detail_::set_false(BOOST_FOREACH_ID(_foreach_onetime))) {} else                     \
+        for (VARFIRST = BOOST_FOREACH_DEREF(COL).first;                                                         \
+       !BOOST_FOREACH_ID(_foreach_onetime);                                                                     \
+       BOOST_FOREACH_ID(_foreach_onetime) = true)                                                               \
+            if  (boost::foreach_detail_::set_false(BOOST_FOREACH_ID(_foreach_continue))) {} else                \
+            for (VARSECOND = BOOST_FOREACH_DEREF(COL).second;                                                   \
+     !BOOST_FOREACH_ID(_foreach_continue);                                                                      \
+     BOOST_FOREACH_ID(_foreach_continue) = true)
 
 #define foreach BOOST_FOREACH
 #define foreachpair BOOST_FOREACH_PAIR

http://git-wip-us.apache.org/repos/asf/mesos/blob/36063eda/3rdparty/libprocess/3rdparty/stout/include/stout/format.hpp
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/3rdparty/stout/include/stout/format.hpp b/3rdparty/libprocess/3rdparty/stout/include/stout/format.hpp
index d6b070f..58ab742 100644
--- a/3rdparty/libprocess/3rdparty/stout/include/stout/format.hpp
+++ b/3rdparty/libprocess/3rdparty/stout/include/stout/format.hpp
@@ -307,7 +307,7 @@ template <typename T1,
           typename T8,
           typename T9,
           typename T10,
-	  typename T11>
+          typename T11>
 Try<std::string> format(const std::string& s,
                         const T1& t1,
                         const T2& t2,


[2/3] git commit: Fixed tabs in libprocess.

Posted by vi...@apache.org.
Fixed tabs in libprocess.

Review: https://reviews.apache.org/r/19739


Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/963afaa5
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/963afaa5
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/963afaa5

Branch: refs/heads/master
Commit: 963afaa5ae040672b9960d434dc8a8cdaca7307d
Parents: 36063ed
Author: Vinod Kone <vi...@twitter.com>
Authored: Thu Mar 27 10:55:19 2014 -0700
Committer: Vinod Kone <vi...@twitter.com>
Committed: Thu Mar 27 11:26:33 2014 -0700

----------------------------------------------------------------------
 3rdparty/libprocess/src/gate.hpp |  7 ++---
 3rdparty/libprocess/src/net.hpp  | 51 ++++++++++++++++++-----------------
 2 files changed, 30 insertions(+), 28 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/963afaa5/3rdparty/libprocess/src/gate.hpp
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/src/gate.hpp b/3rdparty/libprocess/src/gate.hpp
index 954f620..200fce2 100644
--- a/3rdparty/libprocess/src/gate.hpp
+++ b/3rdparty/libprocess/src/gate.hpp
@@ -46,8 +46,9 @@ public:
     {
       waiters++;
       state_t old = state;
-      while (old == state)
-	pthread_cond_wait(&cond, &mutex);
+      while (old == state) {
+        pthread_cond_wait(&cond, &mutex);
+      }
       waiters--;
     }
     pthread_mutex_unlock(&mutex);
@@ -70,7 +71,7 @@ public:
     pthread_mutex_lock(&mutex);
     {
       while (old == state) {
-	pthread_cond_wait(&cond, &mutex);
+        pthread_cond_wait(&cond, &mutex);
       }
       waiters--;
     }

http://git-wip-us.apache.org/repos/asf/mesos/blob/963afaa5/3rdparty/libprocess/src/net.hpp
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/src/net.hpp b/3rdparty/libprocess/src/net.hpp
index f4783fd..1ba3dbb 100644
--- a/3rdparty/libprocess/src/net.hpp
+++ b/3rdparty/libprocess/src/net.hpp
@@ -81,13 +81,13 @@ protected:
       len = ::recv(s, buf, bytes, 0);
 
       if (len > 0)
-	return len;
+        return len;
       else if (len < 0 && errno == EWOULDBLOCK)
-	while (!await(s, RDONLY));
+        while (!await(s, RDONLY));
       else if (len == 0)
-	throw runtime_error(string("recv: connection terminated"));
+        throw runtime_error(string("recv: connection terminated"));
       else
-	throw runtime_error(string("recv: ") += strerror(errno));
+        throw runtime_error(string("recv: ") += strerror(errno));
     } while (!(len > 0));
 
     return len;
@@ -100,13 +100,13 @@ protected:
       len = ::recv(s, (char *) buf + offset, bytes - offset, 0);
 
       if (len > 0)
-	offset += len;
+        offset += len;
       else if (len < 0 && errno == EWOULDBLOCK)
-	while (!await(s, RDONLY));
+        while (!await(s, RDONLY));
       else if (len == 0)
-	throw runtime_error(string("recvall: connection terminated"));
+        throw runtime_error(string("recvall: connection terminated"));
       else
-	throw runtime_error(string("recvall: ") += strerror(errno));
+        throw runtime_error(string("recvall: ") += strerror(errno));
     } while (offset != bytes);
 
     return offset;
@@ -117,16 +117,16 @@ protected:
     size_t offset = 0;
     do {
       size_t len =
-	::send(s, (char *) buf + offset, bytes - offset, MSG_NOSIGNAL);
+        ::send(s, (char *) buf + offset, bytes - offset, MSG_NOSIGNAL);
 
       if (len > 0)
-	offset += len;
+        offset += len;
       else if (len < 0 && errno == EWOULDBLOCK)
-	while (!await(s, WRONLY));
+        while (!await(s, WRONLY));
       else if (len == 0)
-	throw runtime_error(string("send: connection terminated"));
+        throw runtime_error(string("send: connection terminated"));
       else
-	throw runtime_error(string("send: ") += strerror(errno));
+        throw runtime_error(string("send: ") += strerror(errno));
     } while (offset != bytes);
   }
 
@@ -137,13 +137,13 @@ protected:
       size_t len = ::sendfile(s, fd, 0, bytes - offset);
 
       if (len > 0)
-	offset += len;
+        offset += len;
       else if (len < 0 && errno == EWOULDBLOCK)
-	while (!await(s, WRONLY));
+        while (!await(s, WRONLY));
       else if (len == 0)
-	throw runtime_error(string("sendfile: connection terminated"));
+        throw runtime_error(string("sendfile: connection terminated"));
       else
-	throw runtime_error(string("sendfile: ") += strerror(errno));
+        throw runtime_error(string("sendfile: ") += strerror(errno));
     } while (offset != bytes);
   }
 
@@ -153,9 +153,9 @@ public:
   {
     int flags = 1;
     if (ioctl(s, FIONBIO, &flags) &&
-	((flags = fcntl(s, F_GETFL, 0)) < 0 ||
-	 fcntl(s, F_SETFL, flags | O_NONBLOCK) < 0))
-	throw runtime_error(string("ioctl/fcntl: ") += strerror(errno));
+        ((flags = fcntl(s, F_GETFL, 0)) < 0 ||
+          fcntl(s, F_SETFL, flags | O_NONBLOCK) < 0))
+      throw runtime_error(string("ioctl/fcntl: ") += strerror(errno));
   }
   ~SocketProcess() { os::close(s); }
 };
@@ -174,14 +174,15 @@ protected:
 
       size_t size = sizeof(struct sockaddr_in);
 
-      c = ::accept(SocketProcess<protocol>::s,
-		       (struct sockaddr *) &addr,
-		       (socklen_t *) &size);
+      c = ::accept(
+          SocketProcess<protocol>::s,
+          (struct sockaddr *) &addr,
+          (socklen_t *) &size);
 
       if (c == 0)
-	throw runtime_error(string("accept: ") += strerror(errno));
+        throw runtime_error(string("accept: ") += strerror(errno));
       else if (c < 0 && (errno != EWOULDBLOCK))
-	throw runtime_error(string("accept: ") += strerror(errno));
+        throw runtime_error(string("accept: ") += strerror(errno));
     } while (!(c > 0));
 
     return c;