Author: stack
Date: Thu Apr 14 04:32:18 2011
New Revision: 1091997
URL: http://svn.apache.org/viewvc?rev=1091997&view=rev
Log:
HBASE-3708 createAndFailSilent is not so silent; leaves lots of logging in
ensemble logs
Modified:
hbase/branches/0.90/CHANGES.txt
hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/zookeeper/ZKUtil.java
Modified: hbase/branches/0.90/CHANGES.txt
URL:
http://svn.apache.org/viewvc/hbase/branches/0.90/CHANGES.txt?rev=1091997&r1=1091996&r2=1091997&view=diff
==============================================================================
--- hbase/branches/0.90/CHANGES.txt (original)
+++ hbase/branches/0.90/CHANGES.txt Thu Apr 14 04:32:18 2011
@@ -20,6 +20,8 @@ Release 0.90.3 - Unreleased
HBASE-3771 All jsp pages don't clean their HBA
HBASE-3685 when multiple columns are combined with TimestampFilter,
only one column is returned (Jerry Chen)
+ HBASE-3708 createAndFailSilent is not so silent; leaves lots of logging in
+ ensemble logs (Dmitriy Ryaboy)
IMPROVEMENT
HBASE-3717 deprecate HTable isTableEnabled() methods in favor of HBaseAdmin
Modified:
hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/zookeeper/ZKUtil.java
URL:
http://svn.apache.org/viewvc/hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/zookeeper/ZKUtil.java?rev=1091997&r1=1091996&r2=1091997&view=diff
==============================================================================
---
hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/zookeeper/ZKUtil.java
(original)
+++
hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/zookeeper/ZKUtil.java
Thu Apr 14 04:32:18 2011
@@ -320,7 +320,7 @@ public class ZKUtil {
* @return list of znode names, null if the node doesn't exist
* @throws KeeperException
*/
- public static List<String> listChildrenAndWatchThem(ZooKeeperWatcher zkw,
+ public static List<String> listChildrenAndWatchThem(ZooKeeperWatcher zkw,
String znode) throws KeeperException {
List<String> children = listChildrenAndWatchForNewChildren(zkw, znode);
if (children == null) {
@@ -718,7 +718,7 @@ public class ZKUtil {
* @param zkw zk reference
* @param znode path of node
* @param data data to set for node
- * @throws KeeperException
+ * @throws KeeperException
*/
public static void createSetData(final ZooKeeperWatcher zkw, final String
znode,
final byte [] data)
@@ -899,8 +899,11 @@ public class ZKUtil {
String znode)
throws KeeperException {
try {
- zkw.getZooKeeper().create(znode, new byte[0], Ids.OPEN_ACL_UNSAFE,
- CreateMode.PERSISTENT);
+ ZooKeeper zk = zkw.getZooKeeper();
+ if (zk.exists(znode, false) != null) {
+ zk.create(znode, new byte[0], Ids.OPEN_ACL_UNSAFE,
+ CreateMode.PERSISTENT);
+ }
} catch(KeeperException.NodeExistsException nee) {
} catch(InterruptedException ie) {
zkw.interruptedException(ie);