|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.hbase.util.HasThread
org.apache.hadoop.hbase.Chore
org.apache.hadoop.hbase.master.ClusterStatusPublisher
@InterfaceAudience.Private public class ClusterStatusPublisher
Class to publish the cluster status to the client. This allows them to know immediately the dead region servers, hence to cut the connection they have with them, eventually stop waiting on the socket. This improves the mean time to recover, and as well allows to increase on the client the different timeouts, as the dead servers will be detected separately.
Nested Class Summary | |
---|---|
static class |
ClusterStatusPublisher.MulticastPublisher
|
static interface |
ClusterStatusPublisher.Publisher
|
Field Summary | |
---|---|
static int |
DEFAULT_STATUS_PUBLISH_PERIOD
|
static Class<? extends ClusterStatusPublisher.Publisher> |
DEFAULT_STATUS_PUBLISHER_CLASS
|
static int |
MAX_SERVER_PER_MESSAGE
We want to limit the size of the protobuf message sent, do fit into a single packet. |
static int |
NB_SEND
If a server dies, we're sending the information multiple times in case a receiver misses the message. |
static String |
STATUS_PUBLISH_PERIOD
The minimum time between two status messages, in milliseconds. |
static String |
STATUS_PUBLISHER_CLASS
The implementation class used to publish the status. |
Fields inherited from class org.apache.hadoop.hbase.Chore |
---|
stopper |
Constructor Summary | |
---|---|
protected |
ClusterStatusPublisher()
|
|
ClusterStatusPublisher(HMaster master,
org.apache.hadoop.conf.Configuration conf,
Class<? extends ClusterStatusPublisher.Publisher> publisherClass)
|
Method Summary | |
---|---|
protected void |
chore()
Look for chores. |
protected void |
cleanup()
Called when the chore has completed, allowing subclasses to cleanup any extra overhead |
protected List<ServerName> |
generateDeadServersListToSend()
Create the dead server to send. |
protected List<Pair<ServerName,Long>> |
getDeadServers(long since)
Get the servers which died since a given timestamp. |
Methods inherited from class org.apache.hadoop.hbase.Chore |
---|
choreForTesting, initialChore, run, sleep, triggerNow |
Methods inherited from class org.apache.hadoop.hbase.util.HasThread |
---|
getName, getThread, interrupt, isAlive, isInterrupted, join, join, join, setDaemon, setName, setPriority, setUncaughtExceptionHandler, start |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String STATUS_PUBLISHER_CLASS
public static final Class<? extends ClusterStatusPublisher.Publisher> DEFAULT_STATUS_PUBLISHER_CLASS
public static final String STATUS_PUBLISH_PERIOD
public static final int DEFAULT_STATUS_PUBLISH_PERIOD
public static final int MAX_SERVER_PER_MESSAGE
public static final int NB_SEND
Constructor Detail |
---|
public ClusterStatusPublisher(HMaster master, org.apache.hadoop.conf.Configuration conf, Class<? extends ClusterStatusPublisher.Publisher> publisherClass) throws IOException
IOException
protected ClusterStatusPublisher()
Method Detail |
---|
protected void chore()
Chore
chore
in class Chore
protected void cleanup()
Chore
cleanup
in class Chore
protected List<ServerName> generateDeadServersListToSend()
protected List<Pair<ServerName,Long>> getDeadServers(long since)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |