|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.hadoop.hbase.zookeeper.ZooKeeperListener
org.apache.hadoop.hbase.zookeeper.ZooKeeperNodeTracker
org.apache.hadoop.hbase.zookeeper.MetaRegionTracker
@InterfaceAudience.Private public class MetaRegionTracker
Tracks the meta region server location node in zookeeper.
Meta region location is set by RegionServerServices.
This class has a watcher on the meta location and notices changes.
| Field Summary |
|---|
| Fields inherited from class org.apache.hadoop.hbase.zookeeper.ZooKeeperNodeTracker |
|---|
abortable, node |
| Fields inherited from class org.apache.hadoop.hbase.zookeeper.ZooKeeperListener |
|---|
watcher |
| Constructor Summary | |
|---|---|
MetaRegionTracker(ZooKeeperWatcher watcher,
Abortable abortable)
Creates a meta region location tracker. |
|
| Method Summary | |
|---|---|
static ServerName |
blockUntilAvailable(ZooKeeperWatcher zkw,
long timeout)
Wait until the meta region is available. |
static void |
deleteMetaLocation(ZooKeeperWatcher zookeeper)
Deletes the location of .META. in ZooKeeper. |
ServerName |
getMetaRegionLocation()
Gets the meta region location, if available. |
static ServerName |
getMetaRegionLocation(ZooKeeperWatcher zkw)
Gets the meta region location, if available. |
boolean |
isLocationAvailable()
Checks if the meta region location is available. |
static void |
setMetaLocation(ZooKeeperWatcher zookeeper,
ServerName location)
Sets the location of .META. in ZooKeeper to the
specified server address. |
ServerName |
waitMetaRegionLocation(long timeout)
Gets the meta region location, if available, and waits for up to the specified timeout if not immediately available. |
| Methods inherited from class org.apache.hadoop.hbase.zookeeper.ZooKeeperNodeTracker |
|---|
blockUntilAvailable, blockUntilAvailable, checkIfBaseNodeAvailable, getData, getNode, nodeCreated, nodeDataChanged, nodeDeleted, start, stop |
| Methods inherited from class org.apache.hadoop.hbase.zookeeper.ZooKeeperListener |
|---|
nodeChildrenChanged |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MetaRegionTracker(ZooKeeperWatcher watcher,
Abortable abortable)
After construction, use ZooKeeperNodeTracker.start() to kick off tracking.
watcher - abortable - | Method Detail |
|---|
public boolean isLocationAvailable()
public ServerName getMetaRegionLocation()
throws InterruptedException
InterruptedException
public static ServerName getMetaRegionLocation(ZooKeeperWatcher zkw)
throws org.apache.zookeeper.KeeperException
getMetaRegionLocation().
zkw -
org.apache.zookeeper.KeeperException
public ServerName waitMetaRegionLocation(long timeout)
throws InterruptedException
timeout - maximum time to wait, in millis
ServerName, or null if none available
InterruptedException - if interrupted while waiting
public static void setMetaLocation(ZooKeeperWatcher zookeeper,
ServerName location)
throws org.apache.zookeeper.KeeperException
.META. in ZooKeeper to the
specified server address.
zookeeper - zookeeper referencelocation - The server hosting .META.
org.apache.zookeeper.KeeperException - unexpected zookeeper exception
public static void deleteMetaLocation(ZooKeeperWatcher zookeeper)
throws org.apache.zookeeper.KeeperException
.META. in ZooKeeper.
zookeeper - zookeeper reference
org.apache.zookeeper.KeeperException - unexpected zookeeper exception
public static ServerName blockUntilAvailable(ZooKeeperWatcher zkw,
long timeout)
throws InterruptedException
zkw - timeout -
InterruptedException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||