org.apache.hadoop.hbase.master.handler
Class ServerShutdownHandler
java.lang.Object
org.apache.hadoop.hbase.executor.EventHandler
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)
ServerShutdownHandler
public ServerShutdownHandler(Server server,
MasterServices services,
DeadServer deadServers,
ServerName serverName,
boolean shouldSplitHlog)
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.