From cddd6184ad4f7ffbfa6aef84c7a095cfa54e4692 Mon Sep 17 00:00:00 2001 From: Uma Maheswara Rao G Date: Tue, 8 Jul 2014 13:50:49 +0000 Subject: [PATCH] HDFS-5411. Update Bookkeeper dependency to 4.2.3. Contributed by Rakesh R. git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1608781 13f79535-47bb-0310-9956-ffa450edef68 --- hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt | 2 ++ .../hadoop/contrib/bkjournal/BookKeeperJournalManager.java | 2 +- .../java/org/apache/hadoop/contrib/bkjournal/BKJMUtil.java | 6 ++++-- hadoop-project/pom.xml | 2 +- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt index ad85157080..4ff5855299 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt +++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt @@ -790,6 +790,8 @@ Release 2.5.0 - UNRELEASED HDFS-4221. Remove the format limitation point from BKJM documentation as HDFS-3810 closed. (Rakesh R via umamahesh) + HDFS-5411. Update Bookkeeper dependency to 4.2.3. (Rakesh R via umamahesh) + BREAKDOWN OF HDFS-2006 SUBTASKS AND RELATED JIRAS HDFS-6299. Protobuf for XAttr and client-side implementation. (Yi Liu via umamahesh) diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/contrib/bkjournal/src/main/java/org/apache/hadoop/contrib/bkjournal/BookKeeperJournalManager.java b/hadoop-hdfs-project/hadoop-hdfs/src/contrib/bkjournal/src/main/java/org/apache/hadoop/contrib/bkjournal/BookKeeperJournalManager.java index ac3bd0253c..227be6b2c1 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/contrib/bkjournal/src/main/java/org/apache/hadoop/contrib/bkjournal/BookKeeperJournalManager.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/contrib/bkjournal/src/main/java/org/apache/hadoop/contrib/bkjournal/BookKeeperJournalManager.java @@ -237,7 +237,7 @@ public void processResult(int rc, String path, Object ctx, String name) { zkPathLatch.countDown(); } }; - ZkUtils.createFullPathOptimistic(zkc, zkAvailablePath, new byte[0], + ZkUtils.asyncCreateFullPathOptimistic(zkc, zkAvailablePath, new byte[0], Ids.OPEN_ACL_UNSAFE, CreateMode.PERSISTENT, callback, null); try { diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/contrib/bkjournal/src/test/java/org/apache/hadoop/contrib/bkjournal/BKJMUtil.java b/hadoop-hdfs-project/hadoop-hdfs/src/contrib/bkjournal/src/test/java/org/apache/hadoop/contrib/bkjournal/BKJMUtil.java index 32b0583c94..b1fc3d7dbc 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/contrib/bkjournal/src/test/java/org/apache/hadoop/contrib/bkjournal/BKJMUtil.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/contrib/bkjournal/src/test/java/org/apache/hadoop/contrib/bkjournal/BKJMUtil.java @@ -149,13 +149,16 @@ BookieServer newBookie() throws Exception { int checkBookiesUp(int count, int timeout) throws Exception { ZooKeeper zkc = connectZooKeeper(); try { - boolean up = false; int mostRecentSize = 0; for (int i = 0; i < timeout; i++) { try { List children = zkc.getChildren("/ledgers/available", false); mostRecentSize = children.size(); + // Skip 'readonly znode' which is used for keeping R-O bookie details + if (children.contains("readonly")) { + mostRecentSize = children.size() - 1; + } if (LOG.isDebugEnabled()) { LOG.debug("Found " + mostRecentSize + " bookies up, " + "waiting for " + count); @@ -166,7 +169,6 @@ int checkBookiesUp(int count, int timeout) throws Exception { } } if (mostRecentSize == count) { - up = true; break; } } catch (KeeperException e) { diff --git a/hadoop-project/pom.xml b/hadoop-project/pom.xml index 511c21e9f4..2dc83dd4f9 100644 --- a/hadoop-project/pom.xml +++ b/hadoop-project/pom.xml @@ -722,7 +722,7 @@ org.apache.bookkeeper bookkeeper-server - 4.0.0 + 4.2.3 compile