| Package | Description |
|---|---|
| org.apache.hadoop.hbase.zookeeper |
| Modifier and Type | Field and Description |
|---|---|
protected ZooKeeperWatcher |
ZooKeeperListener.watcher |
| Modifier and Type | Method and Description |
|---|---|
ZooKeeperWatcher |
ZooKeeperListener.getWatcher() |
| Modifier and Type | Method and Description |
|---|---|
static void |
ZKUtil.asyncCreate(ZooKeeperWatcher 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(ZooKeeperWatcher zkw,
int replicaId,
long timeout)
Wait until the meta region is available and is not in transition.
|
ServerName |
MetaTableLocator.blockUntilAvailable(ZooKeeperWatcher zkw,
long timeout)
Wait until the meta region is available and is not in transition.
|
List<ServerName> |
MetaTableLocator.blockUntilAvailable(ZooKeeperWatcher zkw,
long timeout,
org.apache.hadoop.conf.Configuration conf)
Wait until the primary meta region is available.
|
static int |
ZKUtil.checkExists(ZooKeeperWatcher zkw,
String znode)
Check if the specified node exists.
|
static ArrayList<org.apache.zookeeper.data.ACL> |
ZKUtil.createACL(ZooKeeperWatcher zkw,
String node,
boolean isSecureZooKeeper) |
static void |
ZKUtil.createAndFailSilent(ZooKeeperWatcher zkw,
String znode)
Creates the specified node, iff the node does not exist.
|
static void |
ZKUtil.createAndFailSilent(ZooKeeperWatcher zkw,
String znode,
byte[] data)
Creates the specified node containing specified data, iff the node does not exist.
|
static int |
ZKUtil.createAndWatch(ZooKeeperWatcher zkw,
String znode,
byte[] data)
Creates the specified node with the specified data and watches it.
|
static boolean |
ZKUtil.createEphemeralNodeAndWatch(ZooKeeperWatcher zkw,
String znode,
byte[] data)
Set the specified znode to be an ephemeral node carrying the specified
data.
|
static boolean |
ZKUtil.createNodeIfNotExistsAndWatch(ZooKeeperWatcher zkw,
String znode,
byte[] data)
Creates the specified znode to be a persistent node carrying the specified
data.
|
static String |
ZKUtil.createNodeIfNotExistsNoWatch(ZooKeeperWatcher 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(ZooKeeperWatcher zkw,
String znode,
byte[] data)
Set data into node creating node if it doesn't yet exist.
|
static void |
ZKUtil.createWithParents(ZooKeeperWatcher zkw,
String znode)
Creates the specified node and all parent nodes required for it to exist.
|
static void |
ZKUtil.createWithParents(ZooKeeperWatcher zkw,
String znode,
byte[] data)
Creates the specified node and all parent nodes required for it to exist.
|
static void |
ZKUtil.deleteChildrenRecursively(ZooKeeperWatcher zkw,
String node)
Delete all the children of the specified node but not the node itself.
|
static void |
ZKUtil.deleteChildrenRecursivelyMultiOrSequential(ZooKeeperWatcher zkw,
boolean runSequentialOnMultiFailure,
String... pathRoots)
Delete all the children of the specified node but not the node itself.
|
static boolean |
MasterAddressTracker.deleteIfEquals(ZooKeeperWatcher zkw,
String content)
delete the master znode if its content is same as the parameter
|
void |
MetaTableLocator.deleteMetaLocation(ZooKeeperWatcher zookeeper)
Deletes the location of
hbase:meta in ZooKeeper. |
void |
MetaTableLocator.deleteMetaLocation(ZooKeeperWatcher zookeeper,
int replicaId) |
static void |
ZKUtil.deleteNode(ZooKeeperWatcher zkw,
String node)
Delete the specified node.
|
static boolean |
ZKUtil.deleteNode(ZooKeeperWatcher zkw,
String node,
int version)
Delete the specified node with the specified version.
|
static void |
ZKUtil.deleteNodeFailSilent(ZooKeeperWatcher zkw,
String node)
Deletes the specified node.
|
static void |
ZKUtil.deleteNodeRecursively(ZooKeeperWatcher zkw,
String node)
Delete the specified node and all of it's children.
|
static void |
ZKUtil.deleteNodeRecursivelyMultiOrSequential(ZooKeeperWatcher zkw,
boolean runSequentialOnMultiFailure,
String... pathRoots)
Delete the specified node and its children.
|
static String |
ZKUtil.dump(ZooKeeperWatcher zkw) |
static List<ZKUtil.NodeAndData> |
ZKUtil.getChildDataAndWatchForNewChildren(ZooKeeperWatcher zkw,
String baseNode)
Deprecated.
Unused
|
static byte[] |
ZKUtil.getData(ZooKeeperWatcher zkw,
String znode)
Get znode data.
|
static byte[] |
ZKUtil.getDataAndWatch(ZooKeeperWatcher zkw,
String znode)
Get the data at the specified znode and set a watch.
|
static byte[] |
ZKUtil.getDataAndWatch(ZooKeeperWatcher zkw,
String znode,
org.apache.zookeeper.data.Stat stat)
Get the data at the specified znode and set a watch.
|
static byte[] |
ZKUtil.getDataNoWatch(ZooKeeperWatcher zkw,
String znode,
org.apache.zookeeper.data.Stat stat)
Get the data at the specified znode without setting a watch.
|
static ServerName |
MasterAddressTracker.getMasterAddress(ZooKeeperWatcher zkw)
Get master address.
|
static int |
MasterAddressTracker.getMasterInfoPort(ZooKeeperWatcher zkw)
Get master info port.
|
ServerName |
MetaTableLocator.getMetaRegionLocation(ZooKeeperWatcher zkw)
Gets the meta region location, if available.
|
ServerName |
MetaTableLocator.getMetaRegionLocation(ZooKeeperWatcher zkw,
int replicaId)
Gets the meta region location, if available.
|
List<RegionInfo> |
MetaTableLocator.getMetaRegions(ZooKeeperWatcher zkw) |
List<RegionInfo> |
MetaTableLocator.getMetaRegions(ZooKeeperWatcher zkw,
int replicaId) |
List<Pair<RegionInfo,ServerName>> |
MetaTableLocator.getMetaRegionsAndLocations(ZooKeeperWatcher zkw) |
List<Pair<RegionInfo,ServerName>> |
MetaTableLocator.getMetaRegionsAndLocations(ZooKeeperWatcher zkw,
int replicaId) |
static RegionState |
MetaTableLocator.getMetaRegionState(ZooKeeperWatcher zkw)
Load the meta region state from the meta server ZNode.
|
static RegionState |
MetaTableLocator.getMetaRegionState(ZooKeeperWatcher zkw,
int replicaId)
Load the meta region state from the meta server ZNode.
|
static int |
ZKUtil.getNumberOfChildren(ZooKeeperWatcher zkw,
String znode)
Get the number of children of the specified node.
|
static String |
ZKUtil.getReplicationZnodesDump(ZooKeeperWatcher zkw)
Returns a string with replication znodes and position of the replication log
|
static UUID |
ZKClusterId.getUUIDForCluster(ZooKeeperWatcher zkw)
Get the UUID for the provided ZK watcher.
|
boolean |
MetaTableLocator.isLocationAvailable(ZooKeeperWatcher zkw)
Checks if the meta region location is available.
|
static List<String> |
ZKUtil.listChildrenAndWatchForNewChildren(ZooKeeperWatcher zkw,
String znode)
Lists the children znodes of the specified znode.
|
static List<String> |
ZKUtil.listChildrenAndWatchThem(ZooKeeperWatcher 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(ZooKeeperWatcher zkw,
String znode)
Lists the children of the specified znode without setting any watches.
|
static void |
ZKUtil.logZKTree(ZooKeeperWatcher zkw,
String root)
Recursively print the current state of ZK (non-transactional)
|
protected static void |
ZKUtil.logZKTree(ZooKeeperWatcher zkw,
String root,
String prefix)
Helper method to print the current state of the ZK tree.
|
static void |
ZKUtil.multiOrSequential(ZooKeeperWatcher zkw,
List<ZKUtil.ZKUtilOp> ops,
boolean runSequentialOnMultiFailure)
Use ZooKeeper's multi-update functionality.
|
static boolean |
ZKUtil.nodeHasChildren(ZooKeeperWatcher zkw,
String znode)
Checks if the specified znode has any children.
|
static String |
ZKClusterId.readClusterIdZNode(ZooKeeperWatcher watcher) |
static void |
ZKClusterId.setClusterId(ZooKeeperWatcher watcher,
ClusterId id) |
static void |
ZKUtil.setData(ZooKeeperWatcher zkw,
String znode,
byte[] data)
Sets the data of the existing znode to be the specified data.
|
static boolean |
ZKUtil.setData(ZooKeeperWatcher zkw,
String znode,
byte[] data,
int expectedVersion)
Sets the data of the existing znode to be the specified data.
|
static boolean |
MasterAddressTracker.setMasterAddress(ZooKeeperWatcher 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(ZooKeeperWatcher 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(ZooKeeperWatcher zookeeper,
ServerName serverName,
RegionState.State state)
Sets the location of
hbase:meta in ZooKeeper to the
specified server address. |
static boolean |
ZKUtil.setWatchIfNodeExists(ZooKeeperWatcher zkw,
String znode)
Watch the specified znode, but only if exists.
|
static void |
ZKUtil.updateExistingNodeData(ZooKeeperWatcher zkw,
String znode,
byte[] data,
int expectedVersion)
Deprecated.
Unused
|
boolean |
MetaTableLocator.verifyMetaRegionLocation(ClusterConnection hConnection,
ZooKeeperWatcher zkw,
long timeout)
Verify
hbase:meta is deployed and accessible. |
boolean |
MetaTableLocator.verifyMetaRegionLocation(ClusterConnection connection,
ZooKeeperWatcher zkw,
long timeout,
int replicaId)
Verify
hbase:meta is deployed and accessible. |
void |
MetaTableLocator.waitMetaRegionLocation(ZooKeeperWatcher zkw)
Waits indefinitely for availability of
hbase:meta. |
ServerName |
MetaTableLocator.waitMetaRegionLocation(ZooKeeperWatcher 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(ZooKeeperWatcher 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(ZooKeeperWatcher zkw,
String znode)
Watch the specified znode for delete/create/change events.
|
| Constructor and Description |
|---|
MasterAddressTracker(ZooKeeperWatcher watcher,
Abortable abortable)
Construct a master address listener with the specified
zookeeper reference. |
ZKClusterId(ZooKeeperWatcher watcher,
Abortable abortable) |
ZKLeaderManager(ZooKeeperWatcher watcher,
String leaderZNode,
byte[] identifier,
Stoppable candidate)
Deprecated.
|
ZooKeeperListener(ZooKeeperWatcher watcher)
Construct a ZooKeeper event listener.
|
ZooKeeperNodeTracker(ZooKeeperWatcher watcher,
String node,
Abortable abortable)
Constructs a new ZK node tracker.
|
Copyright © 2007–2017 The Apache Software Foundation. All rights reserved.