| Modifier and Type | Field and Description |
|---|---|
protected ZKWatcher |
ZKListener.watcher |
| Modifier and Type | Method and Description |
|---|---|
ZKWatcher |
ZKListener.getWatcher() |
| Modifier and Type | Method and Description |
|---|---|
static void |
ZKUtil.asyncCreate(ZKWatcher zkw,
String znode,
byte[] data,
org.apache.zookeeper.AsyncCallback.StringCallback cb,
Object ctx)
Async creates the specified node with the specified data.
|
ServerName |
MetaTableLocator.blockUntilAvailable(ZKWatcher zkw,
int replicaId,
long timeout)
Wait until the meta region is available and is not in transition.
|
ServerName |
MetaTableLocator.blockUntilAvailable(ZKWatcher zkw,
long timeout)
Wait until the meta region is available and is not in transition.
|
List<ServerName> |
MetaTableLocator.blockUntilAvailable(ZKWatcher zkw,
long timeout,
org.apache.hadoop.conf.Configuration conf)
Wait until the primary meta region is available.
|
static int |
ZKUtil.checkExists(ZKWatcher zkw,
String znode)
Check if the specified node exists.
|
static ArrayList<org.apache.zookeeper.data.ACL> |
ZKUtil.createACL(ZKWatcher zkw,
String node,
boolean isSecureZooKeeper) |
static void |
ZKUtil.createAndFailSilent(ZKWatcher zkw,
String znode)
Creates the specified node, iff the node does not exist.
|
static void |
ZKUtil.createAndFailSilent(ZKWatcher zkw,
String znode,
byte[] data)
Creates the specified node containing specified data, iff the node does not exist.
|
static int |
ZKUtil.createAndWatch(ZKWatcher zkw,
String znode,
byte[] data)
Creates the specified node with the specified data and watches it.
|
static boolean |
ZKUtil.createEphemeralNodeAndWatch(ZKWatcher zkw,
String znode,
byte[] data)
Set the specified znode to be an ephemeral node carrying the specified
data.
|
static boolean |
ZKUtil.createNodeIfNotExistsAndWatch(ZKWatcher zkw,
String znode,
byte[] data)
Creates the specified znode to be a persistent node carrying the specified
data.
|
static String |
ZKUtil.createNodeIfNotExistsNoWatch(ZKWatcher zkw,
String znode,
byte[] data,
org.apache.zookeeper.CreateMode createMode)
Creates the specified znode with the specified data but does not watch it.
|
static void |
ZKUtil.createSetData(ZKWatcher zkw,
String znode,
byte[] data)
Set data into node creating node if it doesn't yet exist.
|
static void |
ZKUtil.createWithParents(ZKWatcher zkw,
String znode)
Creates the specified node and all parent nodes required for it to exist.
|
static void |
ZKUtil.createWithParents(ZKWatcher zkw,
String znode,
byte[] data)
Creates the specified node and all parent nodes required for it to exist.
|
static void |
ZKUtil.deleteChildrenRecursively(ZKWatcher zkw,
String node)
Delete all the children of the specified node but not the node itself.
|
static void |
ZKUtil.deleteChildrenRecursivelyMultiOrSequential(ZKWatcher zkw,
boolean runSequentialOnMultiFailure,
String... pathRoots)
Delete all the children of the specified node but not the node itself.
|
static boolean |
MasterAddressTracker.deleteIfEquals(ZKWatcher zkw,
String content)
delete the master znode if its content is same as the parameter
|
void |
MetaTableLocator.deleteMetaLocation(ZKWatcher zookeeper)
Deletes the location of
hbase:meta in ZooKeeper. |
void |
MetaTableLocator.deleteMetaLocation(ZKWatcher zookeeper,
int replicaId) |
static void |
ZKUtil.deleteNode(ZKWatcher zkw,
String node)
Delete the specified node.
|
static boolean |
ZKUtil.deleteNode(ZKWatcher zkw,
String node,
int version)
Delete the specified node with the specified version.
|
static void |
ZKUtil.deleteNodeFailSilent(ZKWatcher zkw,
String node)
Deletes the specified node.
|
static void |
ZKUtil.deleteNodeRecursively(ZKWatcher zkw,
String node)
Delete the specified node and all of it's children.
|
static void |
ZKUtil.deleteNodeRecursivelyMultiOrSequential(ZKWatcher zkw,
boolean runSequentialOnMultiFailure,
String... pathRoots)
Delete the specified node and its children.
|
static String |
ZKUtil.dump(ZKWatcher zkw) |
static List<ZKUtil.NodeAndData> |
ZKUtil.getChildDataAndWatchForNewChildren(ZKWatcher zkw,
String baseNode)
Deprecated.
Unused
|
static byte[] |
ZKUtil.getData(ZKWatcher zkw,
String znode)
Get znode data.
|
static byte[] |
ZKUtil.getDataAndWatch(ZKWatcher zkw,
String znode)
Get the data at the specified znode and set a watch.
|
static byte[] |
ZKUtil.getDataAndWatch(ZKWatcher zkw,
String znode,
org.apache.zookeeper.data.Stat stat)
Get the data at the specified znode and set a watch.
|
static byte[] |
ZKUtil.getDataNoWatch(ZKWatcher zkw,
String znode,
org.apache.zookeeper.data.Stat stat)
Get the data at the specified znode without setting a watch.
|
static String |
ZKSplitLog.getEncodedNodeName(ZKWatcher zkw,
String filename)
Gets the full path node name for the log file being split.
|
static ServerName |
MasterAddressTracker.getMasterAddress(ZKWatcher zkw)
Get master address.
|
static int |
MasterAddressTracker.getMasterInfoPort(ZKWatcher zkw)
Get master info port.
|
ServerName |
MetaTableLocator.getMetaRegionLocation(ZKWatcher zkw)
Gets the meta region location, if available.
|
ServerName |
MetaTableLocator.getMetaRegionLocation(ZKWatcher zkw,
int replicaId)
Gets the meta region location, if available.
|
List<RegionInfo> |
MetaTableLocator.getMetaRegions(ZKWatcher zkw)
Gets the meta regions for the given path with the default replica ID.
|
List<RegionInfo> |
MetaTableLocator.getMetaRegions(ZKWatcher zkw,
int replicaId)
Gets the meta regions for the given path and replica ID.
|
List<Pair<RegionInfo,ServerName>> |
MetaTableLocator.getMetaRegionsAndLocations(ZKWatcher zkw) |
List<Pair<RegionInfo,ServerName>> |
MetaTableLocator.getMetaRegionsAndLocations(ZKWatcher zkw,
int replicaId)
Gets the meta regions and their locations for the given path and replica ID.
|
static RegionState |
MetaTableLocator.getMetaRegionState(ZKWatcher zkw)
Load the meta region state from the meta server ZNode.
|
static RegionState |
MetaTableLocator.getMetaRegionState(ZKWatcher zkw,
int replicaId)
Load the meta region state from the meta server ZNode.
|
static int |
ZKUtil.getNumberOfChildren(ZKWatcher zkw,
String znode)
Get the number of children of the specified node.
|
static String |
ZKUtil.getReplicationZnodesDump(ZKWatcher zkw)
Returns a string with replication znodes and position of the replication log
|
static String |
ZKSplitLog.getRescanNode(ZKWatcher zkw) |
static UUID |
ZKClusterId.getUUIDForCluster(ZKWatcher zkw)
Get the UUID for the provided ZK watcher.
|
boolean |
MetaTableLocator.isLocationAvailable(ZKWatcher zkw)
Checks if the meta region location is available.
|
static boolean |
ZKSplitLog.isRescanNode(ZKWatcher zkw,
String path)
Checks if the given path represents a rescan node.
|
static List<String> |
ZKUtil.listChildrenAndWatchForNewChildren(ZKWatcher zkw,
String znode)
Lists the children znodes of the specified znode.
|
static List<String> |
ZKUtil.listChildrenAndWatchThem(ZKWatcher zkw,
String znode)
List all the children of the specified znode, setting a watch for children
changes and also setting a watch on every individual child in order to get
the NodeCreated and NodeDeleted events.
|
static List<String> |
ZKUtil.listChildrenNoWatch(ZKWatcher zkw,
String znode)
Lists the children of the specified znode without setting any watches.
|
static void |
ZKUtil.logZKTree(ZKWatcher zkw,
String root)
Recursively print the current state of ZK (non-transactional)
|
protected static void |
ZKUtil.logZKTree(ZKWatcher zkw,
String root,
String prefix)
Helper method to print the current state of the ZK tree.
|
static void |
ZKUtil.multiOrSequential(ZKWatcher zkw,
List<ZKUtil.ZKUtilOp> ops,
boolean runSequentialOnMultiFailure)
Use ZooKeeper's multi-update functionality.
|
static boolean |
ZKUtil.nodeHasChildren(ZKWatcher zkw,
String znode)
Checks if the specified znode has any children.
|
static String |
ZKClusterId.readClusterIdZNode(ZKWatcher watcher) |
static void |
ZKClusterId.setClusterId(ZKWatcher watcher,
ClusterId id) |
static void |
ZKUtil.setData(ZKWatcher zkw,
String znode,
byte[] data)
Sets the data of the existing znode to be the specified data.
|
static boolean |
ZKUtil.setData(ZKWatcher zkw,
String znode,
byte[] data,
int expectedVersion)
Sets the data of the existing znode to be the specified data.
|
static boolean |
MasterAddressTracker.setMasterAddress(ZKWatcher zkw,
String znode,
ServerName master,
int infoPort)
Set master address into the
master znode or into the backup
subdirectory of backup masters; switch off the passed in znode
path. |
static void |
MetaTableLocator.setMetaLocation(ZKWatcher zookeeper,
ServerName serverName,
int replicaId,
RegionState.State state)
Sets the location of
hbase:meta in ZooKeeper to the specified server address. |
static void |
MetaTableLocator.setMetaLocation(ZKWatcher zookeeper,
ServerName serverName,
RegionState.State state)
Sets the location of
hbase:meta in ZooKeeper to the
specified server address. |
static boolean |
ZKUtil.setWatchIfNodeExists(ZKWatcher zkw,
String znode)
Watch the specified znode, but only if exists.
|
static void |
ZKUtil.updateExistingNodeData(ZKWatcher zkw,
String znode,
byte[] data,
int expectedVersion)
Deprecated.
Unused
|
boolean |
MetaTableLocator.verifyMetaRegionLocation(ClusterConnection hConnection,
ZKWatcher zkw,
long timeout)
Verify
hbase:meta is deployed and accessible. |
boolean |
MetaTableLocator.verifyMetaRegionLocation(ClusterConnection connection,
ZKWatcher zkw,
long timeout,
int replicaId)
Verify
hbase:meta is deployed and accessible. |
void |
MetaTableLocator.waitMetaRegionLocation(ZKWatcher zkw)
Waits indefinitely for availability of
hbase:meta. |
ServerName |
MetaTableLocator.waitMetaRegionLocation(ZKWatcher zkw,
int replicaId,
long timeout)
Gets the meta region location, if available, and waits for up to the specified timeout if not
immediately available.
|
ServerName |
MetaTableLocator.waitMetaRegionLocation(ZKWatcher zkw,
long timeout)
Gets the meta region location, if available, and waits for up to the
specified timeout if not immediately available.
|
static boolean |
ZKUtil.watchAndCheckExists(ZKWatcher zkw,
String znode)
Watch the specified znode for delete/create/change events.
|
| Constructor and Description |
|---|
ClusterStatusTracker(ZKWatcher watcher,
Abortable abortable)
Creates a cluster status tracker.
|
DeletionListener(ZKWatcher zkWatcher,
String pathToWatch,
CountDownLatch deletedLatch)
Create a new instance of the deletion watcher.
|
LoadBalancerTracker(ZKWatcher watcher,
Abortable abortable) |
MasterAddressTracker(ZKWatcher watcher,
Abortable abortable)
Construct a master address listener with the specified
zookeeper reference. |
MasterMaintenanceModeTracker(ZKWatcher watcher) |
RegionNormalizerTracker(ZKWatcher watcher,
Abortable abortable) |
ZKClusterId(ZKWatcher watcher,
Abortable abortable) |
ZKLeaderManager(ZKWatcher watcher,
String leaderZNode,
byte[] identifier,
Stoppable candidate)
Deprecated.
|
ZKListener(ZKWatcher watcher)
Construct a ZooKeeper event listener.
|
ZKNodeTracker(ZKWatcher watcher,
String node,
Abortable abortable)
Constructs a new ZK node tracker.
|
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.