HBASE-3633 ZKUtil::createSetData should only create a node when it nonexists

git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1081427 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Michael Stack 2011-03-14 15:40:34 +00:00
parent c96566d022
commit df2d501052
2 changed files with 3 additions and 1 deletions

View File

@ -147,6 +147,8 @@ Release 0.90.2 - Unreleased
HBASE-3582 Allow HMaster and HRegionServer to login from keytab
hen on secure Hadoop
HBASE-3608 MemstoreFlusher error message doesnt include exception!
HBASE-3633 ZKUtil::createSetData should only create a node when it
nonexists (Guanpeng Xu via Stack)
IMPROVEMENTS
HBASE-3542 MultiGet methods in Thrift

View File

@ -723,7 +723,7 @@ public class ZKUtil {
public static void createSetData(final ZooKeeperWatcher zkw, final String znode,
final byte [] data)
throws KeeperException {
if (checkExists(zkw, znode) != -1) {
if (checkExists(zkw, znode) == -1) {
ZKUtil.createWithParents(zkw, znode);
}
ZKUtil.setData(zkw, znode, data);