HBASE-8142 Sporadic TestZKProcedureControllers failures on trunk
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1458102 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
15c0385d4f
commit
955e0232ba
|
@ -883,9 +883,6 @@ public class ZKUtil {
|
|||
* Set data into node creating node if it doesn't yet exist.
|
||||
* Does not set watch.
|
||||
*
|
||||
* WARNING: this is not atomic -- it is possible to get a 0-byte data value in the znode before
|
||||
* data is written
|
||||
*
|
||||
* @param zkw zk reference
|
||||
* @param znode path of node
|
||||
* @param data data to set for node
|
||||
|
@ -895,10 +892,11 @@ public class ZKUtil {
|
|||
final byte [] data)
|
||||
throws KeeperException {
|
||||
if (checkExists(zkw, znode) == -1) {
|
||||
ZKUtil.createWithParents(zkw, znode);
|
||||
}
|
||||
ZKUtil.createWithParents(zkw, znode, data);
|
||||
} else {
|
||||
ZKUtil.setData(zkw, znode, data);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the data of the existing znode to be the specified data. The node
|
||||
|
|
Loading…
Reference in New Issue