@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) |
Date |
getTimeOfDeath(ServerName deadServerName)
Get the time when a server died
|
boolean |
isDeadServer(ServerName serverName) |
boolean |
isEmpty() |
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 areDeadServersInProgress()
public Set<ServerName> copyServerNames()
public void add(ServerName sn)
sn
- the server namepublic void finish(ServerName sn)
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 name