@InterfaceAudience.Private public class DeadServer extends Object
Constructor and Description |
---|
DeadServer() |
Modifier and Type | Method and Description |
---|---|
void |
add(ServerName sn)
Adds the server to the dead server list if it's not there already.
|
boolean |
areDeadServersInProgress()
Checks if there are currently any dead servers being processed by the
master.
|
void |
cleanAllPreviousInstances(ServerName newServerName) |
boolean |
cleanPreviousInstance(ServerName newServerName)
A dead server that comes back alive has a different start code.
|
List<Pair<ServerName,Long>> |
copyDeadServersSince(long ts)
Extract all the servers dead since a given time, and sort them.
|
Set<ServerName> |
copyServerNames() |
void |
finish(ServerName sn)
Complete processing for this dead server.
|
Date |
getTimeOfDeath(ServerName deadServerName)
Get the time when a server died
|
boolean |
isDeadServer(ServerName serverName) |
boolean |
isEmpty() |
boolean |
isProcessingServer(ServerName serverName) |
void |
notifyServer(ServerName sn)
Notify that we started processing this dead server.
|
boolean |
removeDeadServer(ServerName deadServerName)
remove the specified dead server
|
int |
size() |
String |
toString() |
public boolean cleanPreviousInstance(ServerName newServerName)
newServerName
- Servername as either host:port
or
host,port,startcode
.public boolean isDeadServer(ServerName serverName)
serverName
- server name.public boolean isProcessingServer(ServerName serverName)
serverName
- server name.public boolean areDeadServersInProgress()
public Set<ServerName> copyServerNames()
public void add(ServerName sn)
sn
- the server namepublic void notifyServer(ServerName sn)
sn
- ServerName for the dead server.public void finish(ServerName sn)
sn
- ServerName for the dead server.public int size()
public boolean isEmpty()
public void cleanAllPreviousInstances(ServerName newServerName)
public List<Pair<ServerName,Long>> copyDeadServersSince(long ts)
ts
- the time, 0 for allpublic Date getTimeOfDeath(ServerName deadServerName)
deadServerName
- the dead server namepublic boolean removeDeadServer(ServerName deadServerName)
deadServerName
- the dead server nameCopyright © 2007–2019 The Apache Software Foundation. All rights reserved.