@InterfaceAudience.Private public class ClusterStatusPublisher extends ScheduledChore
Modifier and Type | Class and Description |
---|---|
static class |
ClusterStatusPublisher.MulticastPublisher |
static interface |
ClusterStatusPublisher.Publisher |
Modifier and Type | Field and Description |
---|---|
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.
|
Modifier | Constructor and Description |
---|---|
protected |
ClusterStatusPublisher() |
|
ClusterStatusPublisher(HMaster master,
org.apache.hadoop.conf.Configuration conf,
Class<? extends ClusterStatusPublisher.Publisher> publisherClass) |
Modifier and Type | Method and Description |
---|---|
protected void |
chore()
The task to execute on each scheduled execution of the Chore
|
protected void |
cleanup()
Override to run cleanup tasks when the Chore encounters an error and must stop running
|
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.
|
cancel, cancel, choreForTesting, getInitialDelay, getName, getPeriod, getStopper, getTimeUnit, initialChore, isInitialChoreComplete, isScheduled, run, toString, triggerNow
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
public ClusterStatusPublisher(HMaster master, org.apache.hadoop.conf.Configuration conf, Class<? extends ClusterStatusPublisher.Publisher> publisherClass) throws IOException
IOException
protected ClusterStatusPublisher()
protected void chore()
ScheduledChore
chore
in class ScheduledChore
protected void cleanup()
ScheduledChore
cleanup
in class ScheduledChore
protected List<ServerName> generateDeadServersListToSend()
protected List<Pair<ServerName,Long>> getDeadServers(long since)
Copyright © 2007–2019 Cloudera. All rights reserved.