public class ZooUtil extends Object
Modifier and Type | Class and Description |
---|---|
static class |
ZooUtil.LockID |
static class |
ZooUtil.NodeExistsPolicy |
static class |
ZooUtil.NodeMissingPolicy |
protected static class |
ZooUtil.ZooKeeperConnectionInfo |
Modifier and Type | Field and Description |
---|---|
static Retry.RetryFactory |
DEFAULT_RETRY |
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(ZooUtil.ZooKeeperConnectionInfo info,
String zPath) |
static List<org.apache.zookeeper.data.ACL> |
getACL(ZooUtil.ZooKeeperConnectionInfo info,
String zPath,
org.apache.zookeeper.data.Stat stat) |
static byte[] |
getData(ZooUtil.ZooKeeperConnectionInfo info,
String zPath,
org.apache.zookeeper.data.Stat stat) |
static String |
getInstanceIDFromHdfs(org.apache.hadoop.fs.Path instanceDirectory,
AccumuloConfiguration conf)
Utility to support certain client side utilities to minimize command-line options.
|
static String |
getInstanceIDFromHdfs(org.apache.hadoop.fs.Path instanceDirectory,
AccumuloConfiguration conf,
org.apache.hadoop.conf.Configuration hadoopConf) |
static byte[] |
getLockData(ZooCache zc,
String path) |
static String |
getRoot(String instanceId) |
static org.apache.zookeeper.data.Stat |
getStatus(ZooUtil.ZooKeeperConnectionInfo info,
String zPath) |
protected static org.apache.zookeeper.ZooKeeper |
getZooKeeper(String keepers,
int timeout,
String scheme,
byte[] auth) |
protected static org.apache.zookeeper.ZooKeeper |
getZooKeeper(ZooUtil.ZooKeeperConnectionInfo info) |
static boolean |
isLockHeld(ZooUtil.ZooKeeperConnectionInfo info,
ZooUtil.LockID lid) |
static String |
putEphemeralData(ZooUtil.ZooKeeperConnectionInfo info,
String zPath,
byte[] data) |
static String |
putEphemeralSequential(ZooUtil.ZooKeeperConnectionInfo info,
String zPath,
byte[] data) |
static boolean |
putPersistentData(ZooUtil.ZooKeeperConnectionInfo info,
String zPath,
byte[] data,
int version,
ZooUtil.NodeExistsPolicy policy) |
static boolean |
putPersistentData(ZooUtil.ZooKeeperConnectionInfo info,
String zPath,
byte[] data,
int version,
ZooUtil.NodeExistsPolicy policy,
List<org.apache.zookeeper.data.ACL> acls) |
static boolean |
putPersistentData(ZooUtil.ZooKeeperConnectionInfo info,
String zPath,
byte[] data,
ZooUtil.NodeExistsPolicy policy)
Create a persistent node with the default ACL
|
static String |
putPersistentSequential(ZooUtil.ZooKeeperConnectionInfo info,
String zPath,
byte[] data) |
static boolean |
putPrivatePersistentData(ZooUtil.ZooKeeperConnectionInfo info,
String zPath,
byte[] data,
ZooUtil.NodeExistsPolicy policy) |
static void |
recursiveCopyPersistent(ZooUtil.ZooKeeperConnectionInfo info,
String source,
String destination,
ZooUtil.NodeExistsPolicy policy) |
protected static void |
retryOrThrow(Retry retry,
org.apache.zookeeper.KeeperException e) |
public static final Retry.RetryFactory DEFAULT_RETRY
public static final List<org.apache.zookeeper.data.ACL> PRIVATE
public static final List<org.apache.zookeeper.data.ACL> PUBLIC
protected static org.apache.zookeeper.ZooKeeper getZooKeeper(ZooUtil.ZooKeeperConnectionInfo info)
protected static org.apache.zookeeper.ZooKeeper getZooKeeper(String keepers, int timeout, String scheme, byte[] auth)
protected static void retryOrThrow(Retry retry, org.apache.zookeeper.KeeperException e) throws org.apache.zookeeper.KeeperException
org.apache.zookeeper.KeeperException
public static boolean putPersistentData(ZooUtil.ZooKeeperConnectionInfo info, String zPath, byte[] data, ZooUtil.NodeExistsPolicy policy) throws org.apache.zookeeper.KeeperException, InterruptedException
org.apache.zookeeper.KeeperException
InterruptedException
public static boolean putPersistentData(ZooUtil.ZooKeeperConnectionInfo info, String zPath, byte[] data, int version, ZooUtil.NodeExistsPolicy policy) throws org.apache.zookeeper.KeeperException, InterruptedException
org.apache.zookeeper.KeeperException
InterruptedException
public static boolean putPersistentData(ZooUtil.ZooKeeperConnectionInfo info, 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.KeeperException
InterruptedException
public static byte[] getData(ZooUtil.ZooKeeperConnectionInfo info, String zPath, org.apache.zookeeper.data.Stat stat) throws org.apache.zookeeper.KeeperException, InterruptedException
org.apache.zookeeper.KeeperException
InterruptedException
public static org.apache.zookeeper.data.Stat getStatus(ZooUtil.ZooKeeperConnectionInfo info, String zPath) throws org.apache.zookeeper.KeeperException, InterruptedException
org.apache.zookeeper.KeeperException
InterruptedException
public static boolean exists(ZooUtil.ZooKeeperConnectionInfo info, String zPath) throws org.apache.zookeeper.KeeperException, InterruptedException
org.apache.zookeeper.KeeperException
InterruptedException
public static void recursiveCopyPersistent(ZooUtil.ZooKeeperConnectionInfo info, String source, String destination, ZooUtil.NodeExistsPolicy policy) throws org.apache.zookeeper.KeeperException, InterruptedException
org.apache.zookeeper.KeeperException
InterruptedException
public static boolean putPrivatePersistentData(ZooUtil.ZooKeeperConnectionInfo info, String zPath, byte[] data, ZooUtil.NodeExistsPolicy policy) throws org.apache.zookeeper.KeeperException, InterruptedException
org.apache.zookeeper.KeeperException
InterruptedException
public static String putPersistentSequential(ZooUtil.ZooKeeperConnectionInfo info, String zPath, byte[] data) throws org.apache.zookeeper.KeeperException, InterruptedException
org.apache.zookeeper.KeeperException
InterruptedException
public static String putEphemeralData(ZooUtil.ZooKeeperConnectionInfo info, String zPath, byte[] data) throws org.apache.zookeeper.KeeperException, InterruptedException
org.apache.zookeeper.KeeperException
InterruptedException
public static String putEphemeralSequential(ZooUtil.ZooKeeperConnectionInfo info, String zPath, byte[] data) throws org.apache.zookeeper.KeeperException, InterruptedException
org.apache.zookeeper.KeeperException
InterruptedException
public static boolean isLockHeld(ZooUtil.ZooKeeperConnectionInfo info, ZooUtil.LockID lid) throws org.apache.zookeeper.KeeperException, InterruptedException
org.apache.zookeeper.KeeperException
InterruptedException
public static List<org.apache.zookeeper.data.ACL> getACL(ZooUtil.ZooKeeperConnectionInfo info, String zPath, org.apache.zookeeper.data.Stat stat) throws org.apache.zookeeper.KeeperException, InterruptedException
org.apache.zookeeper.KeeperException
InterruptedException
public static String getInstanceIDFromHdfs(org.apache.hadoop.fs.Path instanceDirectory, AccumuloConfiguration conf)
public static String getInstanceIDFromHdfs(org.apache.hadoop.fs.Path instanceDirectory, AccumuloConfiguration conf, org.apache.hadoop.conf.Configuration hadoopConf)
Copyright © 2011–2018 The Apache Software Foundation. All rights reserved.