org.apache.hadoop.hbase.master.handler
Class ServerShutdownHandler

java.lang.Object
  extended by org.apache.hadoop.hbase.executor.EventHandler
      extended by org.apache.hadoop.hbase.master.handler.ServerShutdownHandler
All Implemented Interfaces:
Comparable<Runnable>, Runnable
Direct Known Subclasses:
MetaServerShutdownHandler

public class ServerShutdownHandler
extends EventHandler

Process server shutdown. Server-to-handle must be already in the deadservers lists. See ServerManager.expireServer(ServerName)


Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.hadoop.hbase.executor.EventHandler
EventHandler.EventHandlerListener, EventHandler.EventType
 
Field Summary
 
Fields inherited from class org.apache.hadoop.hbase.executor.EventHandler
eventType, seqids, server, waitingTimeForEvents
 
Constructor Summary
ServerShutdownHandler(Server server, MasterServices services, DeadServer deadServers, ServerName serverName, boolean shouldSplitHlog)
           
 
Method Summary
static int fixupDaughters(Result result, AssignmentManager assignmentManager, CatalogTracker catalogTracker)
          Check that daughter regions are up in .META.
 String getInformativeName()
          Event implementations should override thie class to provide an informative name about what event they are handling.
 void process()
          This method is the main processing loop to be implemented by the various subclasses.
static boolean processDeadRegion(HRegionInfo hri, Result result, AssignmentManager assignmentManager, CatalogTracker catalogTracker)
          Process a dead region from a dead RS.
 String toString()
           
 
Methods inherited from class org.apache.hadoop.hbase.executor.EventHandler
compareTo, getEventType, getListener, getPriority, getSeqid, run, setListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ServerShutdownHandler

public ServerShutdownHandler(Server server,
                             MasterServices services,
                             DeadServer deadServers,
                             ServerName serverName,
                             boolean shouldSplitHlog)
Method Detail

getInformativeName

public String getInformativeName()
Description copied from class: EventHandler
Event implementations should override thie class to provide an informative name about what event they are handling. For example, event-specific information such as which region or server is being processed should be included if possible.

Overrides:
getInformativeName in class EventHandler

toString

public String toString()
Overrides:
toString in class EventHandler

process

public void process()
             throws IOException
Description copied from class: EventHandler
This method is the main processing loop to be implemented by the various subclasses.

Specified by:
process in class EventHandler
Throws:
IOException

processDeadRegion

public static boolean processDeadRegion(HRegionInfo hri,
                                        Result result,
                                        AssignmentManager assignmentManager,
                                        CatalogTracker catalogTracker)
                                 throws IOException
Process a dead region from a dead RS. Checks if the region is disabled or disabling or if the region has a partially completed split.

Parameters:
hri -
result -
assignmentManager -
catalogTracker -
Returns:
Returns true if specified region should be assigned, false if not.
Throws:
IOException

fixupDaughters

public static int fixupDaughters(Result result,
                                 AssignmentManager assignmentManager,
                                 CatalogTracker catalogTracker)
                          throws IOException
Check that daughter regions are up in .META. and if not, add them.

Parameters:
hris - All regions for this server in meta.
result - The contents of the parent row in .META.
Returns:
the number of daughters missing and fixed
Throws:
IOException


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