@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 | 
|---|---|
| private boolean | connected | 
| static int | DEFAULT_STATUS_PUBLISH_PERIOD | 
| static Class<? extends ClusterStatusPublisher.Publisher> | DEFAULT_STATUS_PUBLISHER_CLASS | 
| private long | lastMessageTime | 
| private ConcurrentMap<ServerName,Integer> | lastSent | 
| private static org.slf4j.Logger | LOG | 
| private HMaster | master | 
| static int | MAX_SERVER_PER_MESSAGEWe want to limit the size of the protobuf message sent, do fit into a single packet. | 
| private int | messagePeriod | 
| static int | NB_SENDIf a server dies, we're sending the information multiple times in case a receiver misses the
 message. | 
| private ClusterStatusPublisher.Publisher | publisher | 
| static String | STATUS_PUBLISH_PERIODThe minimum time between two status messages, in milliseconds. | 
| static String | STATUS_PUBLISHER_CLASSThe 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. | 
| private boolean | isConnected() | 
| String | toString()A summation of this chore in human readable format. | 
cancel, cancel, choreForTesting, getInitialDelay, getName, getPeriod, getStopper, getTimeUnit, initialChore, isInitialChoreComplete, isScheduled, run, triggerNowprivate static org.slf4j.Logger LOG
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
private long lastMessageTime
private final int messagePeriod
private final ConcurrentMap<ServerName,Integer> lastSent
private ClusterStatusPublisher.Publisher publisher
private boolean connected
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
IOExceptionprotected ClusterStatusPublisher()
public String toString()
ScheduledChoretoString in class ScheduledChoreprotected void chore()
ScheduledChorechore in class ScheduledChoreprotected void cleanup()
ScheduledChorecleanup in class ScheduledChoreprivate boolean isConnected()
protected List<ServerName> generateDeadServersListToSend()
protected List<Pair<ServerName,Long>> getDeadServers(long since)
Copyright © 2007–2021 The Apache Software Foundation. All rights reserved.