org.apache.accumulo.fate.zookeeper
public class ZooUtil extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
ZooUtil.LockID |
static class |
ZooUtil.NodeExistsPolicy |
static class |
ZooUtil.NodeMissingPolicy |
| Modifier and Type | Field and Description |
|---|---|
static List<org.apache.zookeeper.data.ACL> |
PRIVATE |
static List<org.apache.zookeeper.data.ACL> |
PUBLIC |
| Constructor and Description |
|---|
ZooUtil() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
exists(org.apache.zookeeper.ZooKeeper zk,
String zPath) |
static byte[] |
getData(org.apache.zookeeper.ZooKeeper zk,
String zPath,
org.apache.zookeeper.data.Stat stat) |
static byte[] |
getLockData(ZooCache zc,
String path) |
static org.apache.zookeeper.data.Stat |
getStatus(org.apache.zookeeper.ZooKeeper zk,
String zPath) |
static boolean |
isLockHeld(org.apache.zookeeper.ZooKeeper zk,
ZooUtil.LockID lid) |
static String |
putEphemeralData(org.apache.zookeeper.ZooKeeper zk,
String zPath,
byte[] data) |
static String |
putEphemeralSequential(org.apache.zookeeper.ZooKeeper zk,
String zPath,
byte[] data) |
static boolean |
putPersistentData(org.apache.zookeeper.ZooKeeper zk,
String zPath,
byte[] data,
int version,
ZooUtil.NodeExistsPolicy policy) |
static boolean |
putPersistentData(org.apache.zookeeper.ZooKeeper zk,
String zPath,
byte[] data,
int version,
ZooUtil.NodeExistsPolicy policy,
List<org.apache.zookeeper.data.ACL> acls) |
static boolean |
putPersistentData(org.apache.zookeeper.ZooKeeper zk,
String zPath,
byte[] data,
ZooUtil.NodeExistsPolicy policy)
Create a persistent node with the default ACL
|
static String |
putPersistentSequential(org.apache.zookeeper.ZooKeeper zk,
String zPath,
byte[] data) |
static boolean |
putPrivatePersistentData(org.apache.zookeeper.ZooKeeper zk,
String zPath,
byte[] data,
ZooUtil.NodeExistsPolicy policy) |
static void |
recursiveCopyPersistent(org.apache.zookeeper.ZooKeeper zk,
String source,
String destination,
ZooUtil.NodeExistsPolicy policy) |
static void |
recursiveDelete(org.apache.zookeeper.ZooKeeper zk,
String zPath,
int version,
ZooUtil.NodeMissingPolicy policy)
This method will delete a node and all its children from zookeeper
|
static void |
recursiveDelete(org.apache.zookeeper.ZooKeeper zk,
String zPath,
ZooUtil.NodeMissingPolicy policy) |
public static final List<org.apache.zookeeper.data.ACL> PRIVATE
public static final List<org.apache.zookeeper.data.ACL> PUBLIC
public static void recursiveDelete(org.apache.zookeeper.ZooKeeper zk,
String zPath,
int version,
ZooUtil.NodeMissingPolicy policy)
throws org.apache.zookeeper.KeeperException,
InterruptedException
zPath - the path to deleteorg.apache.zookeeper.KeeperExceptionInterruptedExceptionpublic static void recursiveDelete(org.apache.zookeeper.ZooKeeper zk,
String zPath,
ZooUtil.NodeMissingPolicy policy)
throws org.apache.zookeeper.KeeperException,
InterruptedException
org.apache.zookeeper.KeeperExceptionInterruptedExceptionpublic static boolean putPersistentData(org.apache.zookeeper.ZooKeeper zk,
String zPath,
byte[] data,
ZooUtil.NodeExistsPolicy policy)
throws org.apache.zookeeper.KeeperException,
InterruptedException
org.apache.zookeeper.KeeperExceptionInterruptedExceptionpublic static boolean putPersistentData(org.apache.zookeeper.ZooKeeper zk,
String zPath,
byte[] data,
int version,
ZooUtil.NodeExistsPolicy policy)
throws org.apache.zookeeper.KeeperException,
InterruptedException
org.apache.zookeeper.KeeperExceptionInterruptedExceptionpublic static boolean putPersistentData(org.apache.zookeeper.ZooKeeper zk,
String zPath,
byte[] data,
int version,
ZooUtil.NodeExistsPolicy policy,
List<org.apache.zookeeper.data.ACL> acls)
throws org.apache.zookeeper.KeeperException,
InterruptedException
org.apache.zookeeper.KeeperExceptionInterruptedExceptionpublic static byte[] getData(org.apache.zookeeper.ZooKeeper zk,
String zPath,
org.apache.zookeeper.data.Stat stat)
throws org.apache.zookeeper.KeeperException,
InterruptedException
org.apache.zookeeper.KeeperExceptionInterruptedExceptionpublic static org.apache.zookeeper.data.Stat getStatus(org.apache.zookeeper.ZooKeeper zk,
String zPath)
throws org.apache.zookeeper.KeeperException,
InterruptedException
org.apache.zookeeper.KeeperExceptionInterruptedExceptionpublic static boolean exists(org.apache.zookeeper.ZooKeeper zk,
String zPath)
throws org.apache.zookeeper.KeeperException,
InterruptedException
org.apache.zookeeper.KeeperExceptionInterruptedExceptionpublic static void recursiveCopyPersistent(org.apache.zookeeper.ZooKeeper zk,
String source,
String destination,
ZooUtil.NodeExistsPolicy policy)
throws org.apache.zookeeper.KeeperException,
InterruptedException
org.apache.zookeeper.KeeperExceptionInterruptedExceptionpublic static boolean putPrivatePersistentData(org.apache.zookeeper.ZooKeeper zk,
String zPath,
byte[] data,
ZooUtil.NodeExistsPolicy policy)
throws org.apache.zookeeper.KeeperException,
InterruptedException
org.apache.zookeeper.KeeperExceptionInterruptedExceptionpublic static String putPersistentSequential(org.apache.zookeeper.ZooKeeper zk, String zPath, byte[] data) throws org.apache.zookeeper.KeeperException, InterruptedException
org.apache.zookeeper.KeeperExceptionInterruptedExceptionpublic static String putEphemeralData(org.apache.zookeeper.ZooKeeper zk, String zPath, byte[] data) throws org.apache.zookeeper.KeeperException, InterruptedException
org.apache.zookeeper.KeeperExceptionInterruptedExceptionpublic static String putEphemeralSequential(org.apache.zookeeper.ZooKeeper zk, String zPath, byte[] data) throws org.apache.zookeeper.KeeperException, InterruptedException
org.apache.zookeeper.KeeperExceptionInterruptedExceptionpublic static boolean isLockHeld(org.apache.zookeeper.ZooKeeper zk,
ZooUtil.LockID lid)
throws org.apache.zookeeper.KeeperException,
InterruptedException
org.apache.zookeeper.KeeperExceptionInterruptedExceptionCopyright © 2014 Apache Accumulo Project. All Rights Reserved.