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 2016/04/04 21:20:02 UTC

[1/2] mesos git commit: Upgrade zookeeper to 3.4.8.

Repository: mesos
Updated Branches:
  refs/heads/master 098f93fac -> 5ff13bece


Upgrade zookeeper to 3.4.8.

This closes #93


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

Branch: refs/heads/master
Commit: b9ffcd7b2722511cd9f3e6125390c0eba9e0b8f5
Parents: 098f93f
Author: Chen Zhiwei <zh...@gmail.com>
Authored: Mon Apr 4 11:42:48 2016 -0700
Committer: Vinod Kone <vi...@gmail.com>
Committed: Mon Apr 4 11:42:48 2016 -0700

----------------------------------------------------------------------
 3rdparty/Makefile.am                       |   3 +-
 3rdparty/cmake/Versions.cmake              |   2 +-
 3rdparty/versions.am                       |   2 +-
 3rdparty/zookeeper-3.4.5.patch             | 106 ------------------------
 3rdparty/zookeeper-3.4.5.tar.gz            | Bin 16402010 -> 0 bytes
 3rdparty/zookeeper-3.4.8.tar.gz            | Bin 0 -> 22261552 bytes
 src/examples/java/test-log.in              |   4 +-
 src/python/native_common/ext_modules.py.in |   2 +-
 src/tests/zookeeper_test_server.cpp        |   2 +-
 9 files changed, 7 insertions(+), 114 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/b9ffcd7b/3rdparty/Makefile.am
----------------------------------------------------------------------
diff --git a/3rdparty/Makefile.am b/3rdparty/Makefile.am
index 49aa557..0523151 100644
--- a/3rdparty/Makefile.am
+++ b/3rdparty/Makefile.am
@@ -51,8 +51,7 @@ EXTRA_DIST =		\
 EXTRA_DIST +=		\
   $(LEVELDB).patch
 
-# We need to patch ZooKeeper in order to get 3.4.5 to compile on
-# OS X 10.10. See: MESOS-1797.
+# We need to patch ZooKeeper in order to get 3.4.8 to compile on PPC LE.
 EXTRA_DIST +=		\
   $(ZOOKEEPER).patch
 

http://git-wip-us.apache.org/repos/asf/mesos/blob/b9ffcd7b/3rdparty/cmake/Versions.cmake
----------------------------------------------------------------------
diff --git a/3rdparty/cmake/Versions.cmake b/3rdparty/cmake/Versions.cmake
index fd6183f..86c51ed 100644
--- a/3rdparty/cmake/Versions.cmake
+++ b/3rdparty/cmake/Versions.cmake
@@ -10,5 +10,5 @@ set(LIBEV_VERSION       "4.22")
 set(LIBEVENT_VERSION    "2.1.5-beta")
 set(PICOJSON_VERSION    "1.3.0")
 set(PROTOBUF_VERSION    "2.6.1")
-set(ZOOKEEPER_VERSION   "3.4.5")
+set(ZOOKEEPER_VERSION   "3.4.8")
 set(ZLIB_VERSION        "1.2.8")

http://git-wip-us.apache.org/repos/asf/mesos/blob/b9ffcd7b/3rdparty/versions.am
----------------------------------------------------------------------
diff --git a/3rdparty/versions.am b/3rdparty/versions.am
index c2dae2f..a94723e 100644
--- a/3rdparty/versions.am
+++ b/3rdparty/versions.am
@@ -23,4 +23,4 @@ DISTRIBUTE_VERSION = 0.6.26
 LEVELDB_VERSION = 1.4
 PIP_VERSION = 7.1.2
 WHEEL_VERSION = 0.24.0
-ZOOKEEPER_VERSION = 3.4.5
+ZOOKEEPER_VERSION = 3.4.8

http://git-wip-us.apache.org/repos/asf/mesos/blob/b9ffcd7b/3rdparty/zookeeper-3.4.5.patch
----------------------------------------------------------------------
diff --git a/3rdparty/zookeeper-3.4.5.patch b/3rdparty/zookeeper-3.4.5.patch
deleted file mode 100644
index 3ca180d..0000000
--- a/3rdparty/zookeeper-3.4.5.patch
+++ /dev/null
@@ -1,106 +0,0 @@
-diff --git a/src/c/include/recordio.h b/src/c/include/recordio.h
-index 4e1b78e..90f458b 100644
---- a/src/c/include/recordio.h
-+++ b/src/c/include/recordio.h
-@@ -73,7 +73,7 @@ void close_buffer_iarchive(struct iarchive **ia);
- char *get_buffer(struct oarchive *);
- int get_buffer_len(struct oarchive *);
- 
--int64_t htonll(int64_t v);
-+int64_t zoo_htonll(int64_t v);
- 
- #ifdef __cplusplus
- }
-diff --git a/src/c/src/recordio.c b/src/c/src/recordio.c
-index cf8a1ac..41797fb 100644
---- a/src/c/src/recordio.c
-+++ b/src/c/src/recordio.c
-@@ -80,7 +80,7 @@ int oa_serialize_int(struct oarchive *oa, const char *tag, const int32_t *d)
-     priv->off+=sizeof(i);
-     return 0;
- }
--int64_t htonll(int64_t v)
-+int64_t zoo_htonll(int64_t v)
- {
-     int i = 0;
-     char *s = (char *)&v;
-@@ -98,7 +98,7 @@ int64_t htonll(int64_t v)
- 
- int oa_serialize_long(struct oarchive *oa, const char *tag, const int64_t *d)
- {
--    const int64_t i = htonll(*d);
-+    const int64_t i = zoo_htonll(*d);
-     struct buff_struct *priv = oa->priv;
-     if ((priv->len - priv->off) < sizeof(i)) {
-         int rc = resize_buffer(priv, priv->len + sizeof(i));
-@@ -207,7 +207,7 @@ int ia_deserialize_long(struct iarchive *ia, const char *tag, int64_t *count)
-     }
-     memcpy(count, priv->buffer+priv->off, sizeof(*count));
-     priv->off+=sizeof(*count);
--    v = htonll(*count); // htonll and  ntohll do the same
-+    v = zoo_htonll(*count); // htonll and  ntohll do the same
-     *count = v;
-     return 0;
- }
-diff --git a/src/c/src/zookeeper.c b/src/c/src/zookeeper.c
-index 27ecf8a..ba55d27 100644
---- a/src/c/src/zookeeper.c
-+++ b/src/c/src/zookeeper.c
-@@ -1408,7 +1408,7 @@ static int serialize_prime_connect(struct connect_req *req, char* buffer){
-     memcpy(buffer + offset, &req->protocolVersion, sizeof(req->protocolVersion));
-     offset = offset +  sizeof(req->protocolVersion);
- 
--    req->lastZxidSeen = htonll(req->lastZxidSeen);
-+    req->lastZxidSeen = zoo_htonll(req->lastZxidSeen);
-     memcpy(buffer + offset, &req->lastZxidSeen, sizeof(req->lastZxidSeen));
-     offset = offset +  sizeof(req->lastZxidSeen);
- 
-@@ -1416,7 +1416,7 @@ static int serialize_prime_connect(struct connect_req *req, char* buffer){
-     memcpy(buffer + offset, &req->timeOut, sizeof(req->timeOut));
-     offset = offset +  sizeof(req->timeOut);
- 
--    req->sessionId = htonll(req->sessionId);
-+    req->sessionId = zoo_htonll(req->sessionId);
-     memcpy(buffer + offset, &req->sessionId, sizeof(req->sessionId));
-     offset = offset +  sizeof(req->sessionId);
- 
-@@ -1447,7 +1447,7 @@ static int serialize_prime_connect(struct connect_req *req, char* buffer){
-      memcpy(&req->sessionId, buffer + offset, sizeof(req->sessionId));
-      offset = offset +  sizeof(req->sessionId);
- 
--     req->sessionId = htonll(req->sessionId);
-+     req->sessionId = zoo_htonll(req->sessionId);
-      memcpy(&req->passwd_len, buffer + offset, sizeof(req->passwd_len));
-      offset = offset +  sizeof(req->passwd_len);
- 
-diff --git a/src/c/tests/ZKMocks.cc b/src/c/tests/ZKMocks.cc
-index 8916674..69bea16 100644
---- a/src/c/tests/ZKMocks.cc
-+++ b/src/c/tests/ZKMocks.cc
-@@ -41,7 +41,7 @@ HandshakeRequest* HandshakeRequest::parse(const std::string& buf){
-     int offset=sizeof(req->protocolVersion);
-     
-     memcpy(&req->lastZxidSeen,buf.data()+offset,sizeof(req->lastZxidSeen));
--    req->lastZxidSeen = htonll(req->lastZxidSeen);
-+    req->lastZxidSeen = zoo_htonll(req->lastZxidSeen);
-     offset+=sizeof(req->lastZxidSeen);
-     
-     memcpy(&req->timeOut,buf.data()+offset,sizeof(req->timeOut));
-@@ -49,7 +49,7 @@ HandshakeRequest* HandshakeRequest::parse(const std::string& buf){
-     offset+=sizeof(req->timeOut);
-     
-     memcpy(&req->sessionId,buf.data()+offset,sizeof(req->sessionId));
--    req->sessionId = htonll(req->sessionId);
-+    req->sessionId = zoo_htonll(req->sessionId);
-     offset+=sizeof(req->sessionId);
-     
-     memcpy(&req->passwd_len,buf.data()+offset,sizeof(req->passwd_len));
-@@ -322,7 +322,7 @@ string HandshakeResponse::toString() const {
-     buf.append((char*)&tmp,sizeof(tmp));
-     tmp=htonl(timeOut);
-     buf.append((char*)&tmp,sizeof(tmp));
--    int64_t tmp64=htonll(sessionId);
-+    int64_t tmp64=zoo_htonll(sessionId);
-     buf.append((char*)&tmp64,sizeof(sessionId));
-     tmp=htonl(passwd_len);
-     buf.append((char*)&tmp,sizeof(tmp));

http://git-wip-us.apache.org/repos/asf/mesos/blob/b9ffcd7b/3rdparty/zookeeper-3.4.5.tar.gz
----------------------------------------------------------------------
diff --git a/3rdparty/zookeeper-3.4.5.tar.gz b/3rdparty/zookeeper-3.4.5.tar.gz
deleted file mode 100644
index 1a547fe..0000000
Binary files a/3rdparty/zookeeper-3.4.5.tar.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/mesos/blob/b9ffcd7b/3rdparty/zookeeper-3.4.8.tar.gz
----------------------------------------------------------------------
diff --git a/3rdparty/zookeeper-3.4.8.tar.gz b/3rdparty/zookeeper-3.4.8.tar.gz
new file mode 100644
index 0000000..a23d68b
Binary files /dev/null and b/3rdparty/zookeeper-3.4.8.tar.gz differ

http://git-wip-us.apache.org/repos/asf/mesos/blob/b9ffcd7b/src/examples/java/test-log.in
----------------------------------------------------------------------
diff --git a/src/examples/java/test-log.in b/src/examples/java/test-log.in
index 4c8547a..4132617 100644
--- a/src/examples/java/test-log.in
+++ b/src/examples/java/test-log.in
@@ -20,8 +20,8 @@ test ! -e ${PROTOBUF_JAR} && \
   exit 1
 
 # TODO(vinod): Deduce the zookeeper version.
-ZOOKEEPER=${MESOS_BUILD_DIR}/3rdparty/zookeeper-3.4.5
-ZOOKEEPER_JAR=${ZOOKEEPER}/zookeeper-3.4.5.jar
+ZOOKEEPER=${MESOS_BUILD_DIR}/3rdparty/zookeeper-3.4.8
+ZOOKEEPER_JAR=${ZOOKEEPER}/zookeeper-3.4.8.jar
 
 test ! -e ${ZOOKEEPER_JAR} && \
   echo "${RED}Failed to find ${ZOOKEEPER_JAR}${NORMAL}" && \

http://git-wip-us.apache.org/repos/asf/mesos/blob/b9ffcd7b/src/python/native_common/ext_modules.py.in
----------------------------------------------------------------------
diff --git a/src/python/native_common/ext_modules.py.in b/src/python/native_common/ext_modules.py.in
index 125b55e..ad98a57 100644
--- a/src/python/native_common/ext_modules.py.in
+++ b/src/python/native_common/ext_modules.py.in
@@ -32,7 +32,7 @@ def _create_module(module_name):
         'src', 'python', 'native_common')
 
     leveldb = os.path.join('3rdparty', 'leveldb-1.4')
-    zookeeper = os.path.join('3rdparty', 'zookeeper-3.4.5', 'src', 'c')
+    zookeeper = os.path.join('3rdparty', 'zookeeper-3.4.8', 'src', 'c')
     libprocess = os.path.join('3rdparty', 'libprocess')
 
     # Even though a statically compiled libprocess should include glog,

http://git-wip-us.apache.org/repos/asf/mesos/blob/b9ffcd7b/src/tests/zookeeper_test_server.cpp
----------------------------------------------------------------------
diff --git a/src/tests/zookeeper_test_server.cpp b/src/tests/zookeeper_test_server.cpp
index 0dc041f..c4fd447 100644
--- a/src/tests/zookeeper_test_server.cpp
+++ b/src/tests/zookeeper_test_server.cpp
@@ -139,7 +139,7 @@ int ZooKeeperTestServer::startNetwork()
     // instance will get created and everything will work out. Until
     // ZooKeeper provides mechanisms for doing in-memory testing this
     // hack (or something like it) will need to exist. This hack is
-    // specific to ZooKeeper 3.4.5 and may need to change if up
+    // specific to ZooKeeper 3.4.8 and may need to change if up
     // upgrade ZooKeeper.
     zooKeeperServer->sessionTracker = Jvm::Null();
 


[2/2] mesos git commit: Add zookeeper patch for 3.4.8 to support PPC LE platform.

Posted by vi...@apache.org.
Add zookeeper patch for 3.4.8 to support PPC LE platform.

Carried this patch from upstream zookeeper, since the
fetch_and_add function in zookeeper is not 64bit-compatible.
Details see: https://issues.apache.org/jira/browse/ZOOKEEPER-1643

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


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

Branch: refs/heads/master
Commit: 5ff13bece66e4381ff00cecb07d722143e3b6b48
Parents: b9ffcd7
Author: Zhiwei Chen <zh...@gmail.com>
Authored: Mon Apr 4 11:44:01 2016 -0700
Committer: Vinod Kone <vi...@gmail.com>
Committed: Mon Apr 4 11:44:01 2016 -0700

----------------------------------------------------------------------
 3rdparty/zookeeper-3.4.8.patch | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/5ff13bec/3rdparty/zookeeper-3.4.8.patch
----------------------------------------------------------------------
diff --git a/3rdparty/zookeeper-3.4.8.patch b/3rdparty/zookeeper-3.4.8.patch
new file mode 100644
index 0000000..486df1a
--- /dev/null
+++ b/3rdparty/zookeeper-3.4.8.patch
@@ -0,0 +1,19 @@
+diff --git a/src/c/src/mt_adaptor.c b/src/c/src/mt_adaptor.c
+index 7dc7878..9c62991 100644
+--- a/src/c/src/mt_adaptor.c
++++ b/src/c/src/mt_adaptor.c
+@@ -483,13 +483,7 @@ int32_t inc_ref_counter(zhandle_t* zh,int i)
+ int32_t fetch_and_add(volatile int32_t* operand, int incr)
+ {
+ #ifndef WIN32
+-    int32_t result;
+-    asm __volatile__(
+-         "lock xaddl %0,%1\n"
+-         : "=r"(result), "=m"(*(int *)operand)
+-         : "0"(incr)
+-         : "memory");
+-   return result;
++    return __sync_fetch_and_add(operand, incr);
+ #else
+     volatile int32_t result;
+     _asm