org.apache.hadoop.hbase.master
Class DeadServer

java.lang.Object
  extended by org.apache.hadoop.hbase.master.DeadServer
All Implemented Interfaces:
Iterable<String>, Collection<String>, Set<String>

public class DeadServer
extends Object
implements Set<String>

Class to hold dead servers list and utility querying dead server list.


Constructor Summary
DeadServer(int maxDeadServers)
           
 
Method Summary
 boolean add(String e)
           
 boolean addAll(Collection<? extends String> c)
           
 boolean areDeadServersInProgress()
          Checks if there are currently any dead servers being processed by the master.
 boolean cleanPreviousInstance(String newServerName)
          A dead server that comes back alive has a different start code.
 void clear()
           
 Set<String> clone()
           
 boolean contains(Object o)
           
 boolean containsAll(Collection<?> c)
           
 boolean equals(Object o)
           
 void finish(String e)
           
 int hashCode()
           
 boolean isDeadServer(String serverName)
           
 boolean isEmpty()
           
 Iterator<String> iterator()
           
 boolean remove(Object o)
           
 boolean removeAll(Collection<?> c)
           
 boolean retainAll(Collection<?> c)
           
 int size()
           
 Object[] toArray()
           
<T> T[]
toArray(T[] a)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DeadServer

public DeadServer(int maxDeadServers)
Method Detail

isDeadServer

public boolean isDeadServer(String serverName)
Parameters:
serverName -
Returns:
true if server is dead

cleanPreviousInstance

public boolean cleanPreviousInstance(String newServerName)
A dead server that comes back alive has a different start code.

Parameters:
newServerName - Servername as either host:port or host,port,startcode.
Returns:
true if this server was dead before and coming back alive again

areDeadServersInProgress

public boolean areDeadServersInProgress()
Checks if there are currently any dead servers being processed by the master. Returns true if at least one region server is currently being processed as dead.

Returns:
true if any RS are being processed as dead

clone

public Set<String> clone()
Overrides:
clone in class Object

add

public boolean add(String e)
Specified by:
add in interface Collection<String>
Specified by:
add in interface Set<String>

finish

public void finish(String e)

size

public int size()
Specified by:
size in interface Collection<String>
Specified by:
size in interface Set<String>

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface Collection<String>
Specified by:
isEmpty in interface Set<String>

contains

public boolean contains(Object o)
Specified by:
contains in interface Collection<String>
Specified by:
contains in interface Set<String>

iterator

public Iterator<String> iterator()
Specified by:
iterator in interface Iterable<String>
Specified by:
iterator in interface Collection<String>
Specified by:
iterator in interface Set<String>

toArray

public Object[] toArray()
Specified by:
toArray in interface Collection<String>
Specified by:
toArray in interface Set<String>

toArray

public <T> T[] toArray(T[] a)
Specified by:
toArray in interface Collection<String>
Specified by:
toArray in interface Set<String>

remove

public boolean remove(Object o)
Specified by:
remove in interface Collection<String>
Specified by:
remove in interface Set<String>

containsAll

public boolean containsAll(Collection<?> c)
Specified by:
containsAll in interface Collection<String>
Specified by:
containsAll in interface Set<String>

addAll

public boolean addAll(Collection<? extends String> c)
Specified by:
addAll in interface Collection<String>
Specified by:
addAll in interface Set<String>

retainAll

public boolean retainAll(Collection<?> c)
Specified by:
retainAll in interface Collection<String>
Specified by:
retainAll in interface Set<String>

removeAll

public boolean removeAll(Collection<?> c)
Specified by:
removeAll in interface Collection<String>
Specified by:
removeAll in interface Set<String>

clear

public void clear()
Specified by:
clear in interface Collection<String>
Specified by:
clear in interface Set<String>

equals

public boolean equals(Object o)
Specified by:
equals in interface Collection<String>
Specified by:
equals in interface Set<String>
Overrides:
equals in class Object

hashCode

public int hashCode()
Specified by:
hashCode in interface Collection<String>
Specified by:
hashCode in interface Set<String>
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2011 The Apache Software Foundation. All Rights Reserved.