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

@InterfaceAudience.Private
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
 
Field Summary
protected  DeadServer deadServers
           
protected  int regionAssignmentWaitTimeout
           
protected  ServerName serverName
           
protected  MasterServices services
           
protected  boolean shouldSplitHlog
           
 
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
 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, 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, handleException, prepare, run, setListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

serverName

protected final ServerName serverName

services

protected final MasterServices services

deadServers

protected final DeadServer deadServers

shouldSplitHlog

protected final boolean shouldSplitHlog

regionAssignmentWaitTimeout

protected final int regionAssignmentWaitTimeout
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,
                                        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 -
assignmentManager -
catalogTracker -
Returns:
Returns true if specified region should be assigned, false if not.
Throws:
IOException


Copyright © 2015 The Apache Software Foundation. All rights reserved.