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