|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.hadoop.hbase.util.HasThread
org.apache.hadoop.hbase.master.HMaster
@InterfaceAudience.Private public class HMaster
HMaster is the "master server" for HBase. An HBase cluster has one active master. If many masters are started, all compete. Whichever wins goes on to run the cluster. All others park themselves in their constructor until master or cluster shutdown or until the active master loses its lease in zookeeper. Thereafter, all running master jostle to take over master role.
The Master can be asked shutdown the cluster. See shutdown(). In
this case it will tell all regionservers to go down and then wait on them
all reporting in that they are down. This master will then shut itself down.
You can also shutdown just this master. Call stopMaster().
Watcher| Field Summary | |
|---|---|
static String |
MASTER
|
| Constructor Summary | |
|---|---|
HMaster(org.apache.hadoop.conf.Configuration conf)
Initializes the HMaster. |
|
| Method Summary | |
|---|---|
void |
abort(String msg,
Throwable t)
Abort the server or client. |
void |
addColumn(byte[] tableName,
HColumnDescriptor column)
Add a new column to an existing table |
MasterAdminProtos.AddColumnResponse |
addColumn(com.google.protobuf.RpcController controller,
MasterAdminProtos.AddColumnRequest req)
|
void |
assignRegion(HRegionInfo hri)
|
MasterAdminProtos.AssignRegionResponse |
assignRegion(com.google.protobuf.RpcController controller,
MasterAdminProtos.AssignRegionRequest req)
|
boolean |
balance()
|
MasterAdminProtos.BalanceResponse |
balance(com.google.protobuf.RpcController c,
MasterAdminProtos.BalanceRequest request)
|
boolean |
balanceSwitch(boolean b)
|
void |
checkTableModifiable(byte[] tableName)
Check table is modifiable; i.e. |
static HMaster |
constructMaster(Class<? extends HMaster> masterClass,
org.apache.hadoop.conf.Configuration conf)
Utility for constructing an instance of the passed HMaster class. |
protected RegionServerStatusProtos.RegionServerStartupResponse.Builder |
createConfigurationSubset()
|
void |
createTable(HTableDescriptor hTableDescriptor,
byte[][] splitKeys)
Create a table using the given table definition. |
MasterAdminProtos.CreateTableResponse |
createTable(com.google.protobuf.RpcController controller,
MasterAdminProtos.CreateTableRequest req)
|
void |
deleteColumn(byte[] tableName,
byte[] columnName)
Delete a column from an existing table |
MasterAdminProtos.DeleteColumnResponse |
deleteColumn(com.google.protobuf.RpcController controller,
MasterAdminProtos.DeleteColumnRequest req)
|
MasterAdminProtos.DeleteSnapshotResponse |
deleteSnapshot(com.google.protobuf.RpcController controller,
MasterAdminProtos.DeleteSnapshotRequest request)
Execute Delete Snapshot operation. |
void |
deleteTable(byte[] tableName)
Delete a table |
MasterAdminProtos.DeleteTableResponse |
deleteTable(com.google.protobuf.RpcController controller,
MasterAdminProtos.DeleteTableRequest request)
|
void |
disableTable(byte[] tableName)
Disable an existing table |
MasterAdminProtos.DisableTableResponse |
disableTable(com.google.protobuf.RpcController controller,
MasterAdminProtos.DisableTableRequest request)
|
void |
dispatchMergingRegions(HRegionInfo region_a,
HRegionInfo region_b,
boolean forcible)
Merge two regions. |
MasterAdminProtos.DispatchMergingRegionsResponse |
dispatchMergingRegions(com.google.protobuf.RpcController controller,
MasterAdminProtos.DispatchMergingRegionsRequest request)
|
MasterAdminProtos.EnableCatalogJanitorResponse |
enableCatalogJanitor(com.google.protobuf.RpcController c,
MasterAdminProtos.EnableCatalogJanitorRequest req)
|
void |
enableTable(byte[] tableName)
Enable an existing table |
MasterAdminProtos.EnableTableResponse |
enableTable(com.google.protobuf.RpcController controller,
MasterAdminProtos.EnableTableRequest request)
|
ClientProtos.CoprocessorServiceResponse |
execMasterService(com.google.protobuf.RpcController controller,
ClientProtos.CoprocessorServiceRequest request)
|
AssignmentManager |
getAssignmentManager()
|
double |
getAverageLoad()
Compute the average load across all region servers. |
CatalogTracker |
getCatalogTracker()
|
String |
getClusterId()
|
ClusterStatus |
getClusterStatus()
|
MasterMonitorProtos.GetClusterStatusResponse |
getClusterStatus(com.google.protobuf.RpcController controller,
MasterMonitorProtos.GetClusterStatusRequest req)
|
MasterAdminProtos.ListSnapshotResponse |
getCompletedSnapshots(com.google.protobuf.RpcController controller,
MasterAdminProtos.ListSnapshotRequest request)
List the currently available/stored snapshots. |
org.apache.hadoop.conf.Configuration |
getConfiguration()
Gets the configuration object for this server. |
MasterCoprocessorHost |
getCoprocessorHost()
|
String[] |
getCoprocessors()
|
ExecutorService |
getExecutorService()
|
HFileCleaner |
getHFileCleaner()
|
InfoServer |
getInfoServer()
|
RegionServerStatusProtos.GetLastFlushedSequenceIdResponse |
getLastFlushedSequenceId(com.google.protobuf.RpcController controller,
RegionServerStatusProtos.GetLastFlushedSequenceIdRequest request)
|
static String |
getLoadedCoprocessors()
The set of loaded coprocessors is stored in a static set. |
long |
getMasterActiveTime()
|
MasterFileSystem |
getMasterFileSystem()
|
long |
getMasterStartTime()
|
MemoryBoundedLogMessageBuffer |
getRegionServerFatalLogBuffer()
|
MasterMonitorProtos.GetSchemaAlterStatusResponse |
getSchemaAlterStatus(com.google.protobuf.RpcController controller,
MasterMonitorProtos.GetSchemaAlterStatusRequest req)
Get the number of regions of the table that have been updated by the alter. |
ServerManager |
getServerManager()
|
ServerName |
getServerName()
|
SnapshotManager |
getSnapshotManagerForTesting()
Exposed for TESTING! |
TableDescriptors |
getTableDescriptors()
|
MasterMonitorProtos.GetTableDescriptorsResponse |
getTableDescriptors(com.google.protobuf.RpcController controller,
MasterMonitorProtos.GetTableDescriptorsRequest req)
Get list of TableDescriptors for requested tables. |
TableLockManager |
getTableLockManager()
|
ZooKeeperWatcher |
getZooKeeper()
Gets the ZooKeeper instance for this server. |
ZooKeeperWatcher |
getZooKeeperWatcher()
Get the ZK wrapper object - needed by master_jsp.java |
boolean |
isAborted()
Check if the server or client was aborted. |
boolean |
isActiveMaster()
Report whether this master is currently the active master or not. |
MasterAdminProtos.IsCatalogJanitorEnabledResponse |
isCatalogJanitorEnabled(com.google.protobuf.RpcController c,
MasterAdminProtos.IsCatalogJanitorEnabledRequest req)
|
boolean |
isInitializationStartsMetaRegionAssignment()
Report whether this master has started initialization and is about to do meta region assignment |
boolean |
isInitialized()
Report whether this master has completed with its initialization and is ready. |
boolean |
isMasterRunning()
|
MasterProtos.IsMasterRunningResponse |
isMasterRunning(com.google.protobuf.RpcController c,
MasterProtos.IsMasterRunningRequest req)
|
MasterAdminProtos.IsRestoreSnapshotDoneResponse |
isRestoreSnapshotDone(com.google.protobuf.RpcController controller,
MasterAdminProtos.IsRestoreSnapshotDoneRequest request)
Returns the status of the requested snapshot restore/clone operation. |
boolean |
isServerShutdownHandlerEnabled()
ServerShutdownHandlerEnabled is set false before completing assignMeta to prevent processing of ServerShutdownHandler. |
MasterAdminProtos.IsSnapshotDoneResponse |
isSnapshotDone(com.google.protobuf.RpcController controller,
MasterAdminProtos.IsSnapshotDoneRequest request)
Checks if the specified snapshot is done. |
boolean |
isStopped()
|
static void |
main(String[] args)
|
void |
modifyColumn(byte[] tableName,
HColumnDescriptor descriptor)
Modify the column descriptor of an existing column in an existing table |
MasterAdminProtos.ModifyColumnResponse |
modifyColumn(com.google.protobuf.RpcController controller,
MasterAdminProtos.ModifyColumnRequest req)
|
void |
modifyTable(byte[] tableName,
HTableDescriptor descriptor)
Modify the descriptor of an existing table |
MasterAdminProtos.ModifyTableResponse |
modifyTable(com.google.protobuf.RpcController controller,
MasterAdminProtos.ModifyTableRequest req)
|
MasterAdminProtos.MoveRegionResponse |
moveRegion(com.google.protobuf.RpcController controller,
MasterAdminProtos.MoveRegionRequest req)
|
MasterAdminProtos.OfflineRegionResponse |
offlineRegion(com.google.protobuf.RpcController controller,
MasterAdminProtos.OfflineRegionRequest request)
Offline specified region from master's in-memory state. |
RegionServerStatusProtos.RegionServerReportResponse |
regionServerReport(com.google.protobuf.RpcController controller,
RegionServerStatusProtos.RegionServerReportRequest request)
|
RegionServerStatusProtos.RegionServerStartupResponse |
regionServerStartup(com.google.protobuf.RpcController controller,
RegionServerStatusProtos.RegionServerStartupRequest request)
|
boolean |
registerService(com.google.protobuf.Service instance)
Registers a new protocol buffer Service subclass as a master coprocessor endpoint. |
RegionServerStatusProtos.ReportRSFatalErrorResponse |
reportRSFatalError(com.google.protobuf.RpcController controller,
RegionServerStatusProtos.ReportRSFatalErrorRequest request)
|
MasterAdminProtos.RestoreSnapshotResponse |
restoreSnapshot(com.google.protobuf.RpcController controller,
MasterAdminProtos.RestoreSnapshotRequest request)
Execute Restore/Clone snapshot operation. |
void |
run()
Main processing loop for the HMaster. |
MasterAdminProtos.CatalogScanResponse |
runCatalogScan(com.google.protobuf.RpcController c,
MasterAdminProtos.CatalogScanRequest req)
|
MasterAdminProtos.SetBalancerRunningResponse |
setBalancerRunning(com.google.protobuf.RpcController controller,
MasterAdminProtos.SetBalancerRunningRequest req)
|
void |
setCatalogJanitorEnabled(boolean b)
Switch for the background CatalogJanitor thread. |
void |
shutdown()
|
MasterAdminProtos.ShutdownResponse |
shutdown(com.google.protobuf.RpcController controller,
MasterAdminProtos.ShutdownRequest request)
|
MasterAdminProtos.TakeSnapshotResponse |
snapshot(com.google.protobuf.RpcController controller,
MasterAdminProtos.TakeSnapshotRequest request)
Triggers an asynchronous attempt to take a snapshot. |
protected void |
startCatalogJanitorChore()
Useful for testing purpose also where we have master restart scenarios. |
void |
stop(String why)
Stop this service. |
void |
stopMaster()
|
MasterAdminProtos.StopMasterResponse |
stopMaster(com.google.protobuf.RpcController controller,
MasterAdminProtos.StopMasterRequest request)
|
boolean |
switchBalancer(boolean b,
org.apache.hadoop.hbase.master.HMaster.BalanceSwitchMode mode)
Assigns balancer switch according to BalanceSwitchMode |
boolean |
synchronousBalanceSwitch(boolean b)
|
MasterAdminProtos.UnassignRegionResponse |
unassignRegion(com.google.protobuf.RpcController controller,
MasterAdminProtos.UnassignRegionRequest req)
|
| Methods inherited from class org.apache.hadoop.hbase.util.HasThread |
|---|
getName, getThread, interrupt, isAlive, isInterrupted, join, join, join, setDaemon, setName, setPriority, setUncaughtExceptionHandler, start |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String MASTER
| Constructor Detail |
|---|
public HMaster(org.apache.hadoop.conf.Configuration conf)
throws IOException,
org.apache.zookeeper.KeeperException,
InterruptedException
Remaining steps of initialization occur in run() so that they
run in their own thread rather than within the context of the constructor.
InterruptedException
IOException
org.apache.zookeeper.KeeperException| Method Detail |
|---|
public void run()
run in interface Runnablerun in class HasThreadprotected void startCatalogJanitorChore()
public TableDescriptors getTableDescriptors()
getTableDescriptors in interface MasterServicespublic InfoServer getInfoServer()
public org.apache.hadoop.conf.Configuration getConfiguration()
Server
getConfiguration in interface Serverpublic ServerManager getServerManager()
getServerManager in interface MasterServicesServerManager instance.public ExecutorService getExecutorService()
getExecutorService in interface MasterServicesExecutorServicepublic MasterFileSystem getMasterFileSystem()
getMasterFileSystem in interface MasterServicesMasterFileSystem utility class.public ZooKeeperWatcher getZooKeeperWatcher()
public RegionServerStatusProtos.RegionServerStartupResponse regionServerStartup(com.google.protobuf.RpcController controller,
RegionServerStatusProtos.RegionServerStartupRequest request)
throws com.google.protobuf.ServiceException
regionServerStartup in interface RegionServerStatusProtos.RegionServerStatusService.BlockingInterfacecom.google.protobuf.ServiceExceptionprotected RegionServerStatusProtos.RegionServerStartupResponse.Builder createConfigurationSubset()
public RegionServerStatusProtos.GetLastFlushedSequenceIdResponse getLastFlushedSequenceId(com.google.protobuf.RpcController controller,
RegionServerStatusProtos.GetLastFlushedSequenceIdRequest request)
throws com.google.protobuf.ServiceException
getLastFlushedSequenceId in interface RegionServerStatusProtos.RegionServerStatusService.BlockingInterfacecom.google.protobuf.ServiceException
public RegionServerStatusProtos.RegionServerReportResponse regionServerReport(com.google.protobuf.RpcController controller,
RegionServerStatusProtos.RegionServerReportRequest request)
throws com.google.protobuf.ServiceException
regionServerReport in interface RegionServerStatusProtos.RegionServerStatusService.BlockingInterfacecom.google.protobuf.ServiceException
public RegionServerStatusProtos.ReportRSFatalErrorResponse reportRSFatalError(com.google.protobuf.RpcController controller,
RegionServerStatusProtos.ReportRSFatalErrorRequest request)
throws com.google.protobuf.ServiceException
reportRSFatalError in interface RegionServerStatusProtos.RegionServerStatusService.BlockingInterfacecom.google.protobuf.ServiceExceptionpublic boolean isMasterRunning()
public MasterProtos.IsMasterRunningResponse isMasterRunning(com.google.protobuf.RpcController c,
MasterProtos.IsMasterRunningRequest req)
throws com.google.protobuf.ServiceException
isMasterRunning in interface MasterAdminProtos.MasterAdminService.BlockingInterfaceisMasterRunning in interface MasterMonitorProtos.MasterMonitorService.BlockingInterfacecom.google.protobuf.ServiceException
public MasterAdminProtos.CatalogScanResponse runCatalogScan(com.google.protobuf.RpcController c,
MasterAdminProtos.CatalogScanRequest req)
throws com.google.protobuf.ServiceException
runCatalogScan in interface MasterAdminProtos.MasterAdminService.BlockingInterfacecom.google.protobuf.ServiceException
public MasterAdminProtos.EnableCatalogJanitorResponse enableCatalogJanitor(com.google.protobuf.RpcController c,
MasterAdminProtos.EnableCatalogJanitorRequest req)
throws com.google.protobuf.ServiceException
enableCatalogJanitor in interface MasterAdminProtos.MasterAdminService.BlockingInterfacecom.google.protobuf.ServiceException
public MasterAdminProtos.IsCatalogJanitorEnabledResponse isCatalogJanitorEnabled(com.google.protobuf.RpcController c,
MasterAdminProtos.IsCatalogJanitorEnabledRequest req)
throws com.google.protobuf.ServiceException
isCatalogJanitorEnabled in interface MasterAdminProtos.MasterAdminService.BlockingInterfacecom.google.protobuf.ServiceExceptionpublic boolean balance()
public MasterAdminProtos.BalanceResponse balance(com.google.protobuf.RpcController c,
MasterAdminProtos.BalanceRequest request)
throws com.google.protobuf.ServiceException
balance in interface MasterAdminProtos.MasterAdminService.BlockingInterfacecom.google.protobuf.ServiceException
public boolean switchBalancer(boolean b,
org.apache.hadoop.hbase.master.HMaster.BalanceSwitchMode mode)
throws IOException
b - new balancer switchmode - BalanceSwitchMode
IOException
public boolean synchronousBalanceSwitch(boolean b)
throws IOException
IOException
public boolean balanceSwitch(boolean b)
throws IOException
IOException
public MasterAdminProtos.SetBalancerRunningResponse setBalancerRunning(com.google.protobuf.RpcController controller,
MasterAdminProtos.SetBalancerRunningRequest req)
throws com.google.protobuf.ServiceException
setBalancerRunning in interface MasterAdminProtos.MasterAdminService.BlockingInterfacecom.google.protobuf.ServiceExceptionpublic void setCatalogJanitorEnabled(boolean b)
b - If false, the catalog janitor won't do anything.
public MasterAdminProtos.DispatchMergingRegionsResponse dispatchMergingRegions(com.google.protobuf.RpcController controller,
MasterAdminProtos.DispatchMergingRegionsRequest request)
throws com.google.protobuf.ServiceException
dispatchMergingRegions in interface MasterAdminProtos.MasterAdminService.BlockingInterfacecom.google.protobuf.ServiceException
public void dispatchMergingRegions(HRegionInfo region_a,
HRegionInfo region_b,
boolean forcible)
throws IOException
MasterServices
dispatchMergingRegions in interface MasterServicesregion_a - region to mergeregion_b - region to mergeforcible - true if do a compulsory merge, otherwise we will only merge
two adjacent regions
IOException
public MasterAdminProtos.MoveRegionResponse moveRegion(com.google.protobuf.RpcController controller,
MasterAdminProtos.MoveRegionRequest req)
throws com.google.protobuf.ServiceException
moveRegion in interface MasterAdminProtos.MasterAdminService.BlockingInterfacecom.google.protobuf.ServiceException
public void createTable(HTableDescriptor hTableDescriptor,
byte[][] splitKeys)
throws IOException
MasterServices
createTable in interface MasterServiceshTableDescriptor - The table definitionsplitKeys - Starting row keys for the initial table regions. If null
a single region is created.
IOException
public MasterAdminProtos.CreateTableResponse createTable(com.google.protobuf.RpcController controller,
MasterAdminProtos.CreateTableRequest req)
throws com.google.protobuf.ServiceException
createTable in interface MasterAdminProtos.MasterAdminService.BlockingInterfacecom.google.protobuf.ServiceException
public void deleteTable(byte[] tableName)
throws IOException
MasterServices
deleteTable in interface MasterServicestableName - The table name
IOException
public MasterAdminProtos.DeleteTableResponse deleteTable(com.google.protobuf.RpcController controller,
MasterAdminProtos.DeleteTableRequest request)
throws com.google.protobuf.ServiceException
deleteTable in interface MasterAdminProtos.MasterAdminService.BlockingInterfacecom.google.protobuf.ServiceException
public MasterMonitorProtos.GetSchemaAlterStatusResponse getSchemaAlterStatus(com.google.protobuf.RpcController controller,
MasterMonitorProtos.GetSchemaAlterStatusRequest req)
throws com.google.protobuf.ServiceException
getSchemaAlterStatus in interface MasterMonitorProtos.MasterMonitorService.BlockingInterfaceIOException
com.google.protobuf.ServiceException
public void addColumn(byte[] tableName,
HColumnDescriptor column)
throws IOException
MasterServices
addColumn in interface MasterServicestableName - The table namecolumn - The column definition
IOException
public MasterAdminProtos.AddColumnResponse addColumn(com.google.protobuf.RpcController controller,
MasterAdminProtos.AddColumnRequest req)
throws com.google.protobuf.ServiceException
addColumn in interface MasterAdminProtos.MasterAdminService.BlockingInterfacecom.google.protobuf.ServiceException
public void modifyColumn(byte[] tableName,
HColumnDescriptor descriptor)
throws IOException
MasterServices
modifyColumn in interface MasterServicestableName - The table namedescriptor - The updated column definition
IOException
public MasterAdminProtos.ModifyColumnResponse modifyColumn(com.google.protobuf.RpcController controller,
MasterAdminProtos.ModifyColumnRequest req)
throws com.google.protobuf.ServiceException
modifyColumn in interface MasterAdminProtos.MasterAdminService.BlockingInterfacecom.google.protobuf.ServiceException
public void deleteColumn(byte[] tableName,
byte[] columnName)
throws IOException
MasterServices
deleteColumn in interface MasterServicestableName - The table namecolumnName - The column name
IOException
public MasterAdminProtos.DeleteColumnResponse deleteColumn(com.google.protobuf.RpcController controller,
MasterAdminProtos.DeleteColumnRequest req)
throws com.google.protobuf.ServiceException
deleteColumn in interface MasterAdminProtos.MasterAdminService.BlockingInterfacecom.google.protobuf.ServiceException
public void enableTable(byte[] tableName)
throws IOException
MasterServices
enableTable in interface MasterServicestableName - The table name
IOException
public MasterAdminProtos.EnableTableResponse enableTable(com.google.protobuf.RpcController controller,
MasterAdminProtos.EnableTableRequest request)
throws com.google.protobuf.ServiceException
enableTable in interface MasterAdminProtos.MasterAdminService.BlockingInterfacecom.google.protobuf.ServiceException
public void disableTable(byte[] tableName)
throws IOException
MasterServices
disableTable in interface MasterServicestableName - The table name
IOException
public MasterAdminProtos.DisableTableResponse disableTable(com.google.protobuf.RpcController controller,
MasterAdminProtos.DisableTableRequest request)
throws com.google.protobuf.ServiceException
disableTable in interface MasterAdminProtos.MasterAdminService.BlockingInterfacecom.google.protobuf.ServiceException
public void modifyTable(byte[] tableName,
HTableDescriptor descriptor)
throws IOException
MasterServices
modifyTable in interface MasterServicestableName - The table namedescriptor - The updated table descriptor
IOException
public MasterAdminProtos.ModifyTableResponse modifyTable(com.google.protobuf.RpcController controller,
MasterAdminProtos.ModifyTableRequest req)
throws com.google.protobuf.ServiceException
modifyTable in interface MasterAdminProtos.MasterAdminService.BlockingInterfacecom.google.protobuf.ServiceException
public void checkTableModifiable(byte[] tableName)
throws IOException,
TableNotFoundException,
TableNotDisabledException
MasterServices
checkTableModifiable in interface MasterServicestableName - Name of table to check.
TableNotDisabledException
TableNotFoundException
IOException
public MasterMonitorProtos.GetClusterStatusResponse getClusterStatus(com.google.protobuf.RpcController controller,
MasterMonitorProtos.GetClusterStatusRequest req)
throws com.google.protobuf.ServiceException
getClusterStatus in interface MasterMonitorProtos.MasterMonitorService.BlockingInterfacecom.google.protobuf.ServiceExceptionpublic ClusterStatus getClusterStatus()
public String getClusterId()
public static String getLoadedCoprocessors()
public long getMasterStartTime()
public long getMasterActiveTime()
public String[] getCoprocessors()
public void abort(String msg,
Throwable t)
Abortable
abort in interface Abortablemsg - Why we're aborting.t - Throwable that caused abort. Can be null.public ZooKeeperWatcher getZooKeeper()
Server
getZooKeeper in interface Serverpublic MasterCoprocessorHost getCoprocessorHost()
getCoprocessorHost in interface MasterServicesMasterCoprocessorHostpublic ServerName getServerName()
getServerName in interface Serverpublic CatalogTracker getCatalogTracker()
getCatalogTracker in interface ServerCatalogTrackerpublic AssignmentManager getAssignmentManager()
getAssignmentManager in interface MasterServicesAssignmentManagerpublic TableLockManager getTableLockManager()
getTableLockManager in interface MasterServicesTableLockManagerpublic MemoryBoundedLogMessageBuffer getRegionServerFatalLogBuffer()
public void shutdown()
public MasterAdminProtos.ShutdownResponse shutdown(com.google.protobuf.RpcController controller,
MasterAdminProtos.ShutdownRequest request)
throws com.google.protobuf.ServiceException
shutdown in interface MasterAdminProtos.MasterAdminService.BlockingInterfacecom.google.protobuf.ServiceExceptionpublic void stopMaster()
public MasterAdminProtos.StopMasterResponse stopMaster(com.google.protobuf.RpcController controller,
MasterAdminProtos.StopMasterRequest request)
throws com.google.protobuf.ServiceException
stopMaster in interface MasterAdminProtos.MasterAdminService.BlockingInterfacecom.google.protobuf.ServiceExceptionpublic void stop(String why)
Stoppable
stop in interface Stoppablewhy - Why we're stopping.public boolean isStopped()
isStopped in interface StoppableStoppable.stop(String) has been closed.public boolean isAborted()
Abortable
isAborted in interface Abortablepublic boolean isActiveMaster()
public boolean isInitialized()
isInitialized in interface MasterServicespublic boolean isServerShutdownHandlerEnabled()
isServerShutdownHandlerEnabled in interface MasterServicespublic boolean isInitializationStartsMetaRegionAssignment()
public MasterAdminProtos.AssignRegionResponse assignRegion(com.google.protobuf.RpcController controller,
MasterAdminProtos.AssignRegionRequest req)
throws com.google.protobuf.ServiceException
assignRegion in interface MasterAdminProtos.MasterAdminService.BlockingInterfacecom.google.protobuf.ServiceExceptionpublic void assignRegion(HRegionInfo hri)
public MasterAdminProtos.UnassignRegionResponse unassignRegion(com.google.protobuf.RpcController controller,
MasterAdminProtos.UnassignRegionRequest req)
throws com.google.protobuf.ServiceException
unassignRegion in interface MasterAdminProtos.MasterAdminService.BlockingInterfacecom.google.protobuf.ServiceException
public MasterMonitorProtos.GetTableDescriptorsResponse getTableDescriptors(com.google.protobuf.RpcController controller,
MasterMonitorProtos.GetTableDescriptorsRequest req)
throws com.google.protobuf.ServiceException
getTableDescriptors in interface MasterMonitorProtos.MasterMonitorService.BlockingInterfacecontroller - Unused (set to null).req - GetTableDescriptorsRequest that contains:
- tableNames: requested tables, or if empty, all are requested
com.google.protobuf.ServiceExceptionpublic double getAverageLoad()
public MasterAdminProtos.OfflineRegionResponse offlineRegion(com.google.protobuf.RpcController controller,
MasterAdminProtos.OfflineRegionRequest request)
throws com.google.protobuf.ServiceException
offlineRegion in interface MasterAdminProtos.MasterAdminService.BlockingInterfacecom.google.protobuf.ServiceExceptionpublic boolean registerService(com.google.protobuf.Service instance)
MasterServicesService subclass as a master coprocessor endpoint.
Only a single instance may be registered for a given Service subclass (the
instances are keyed on Descriptors.ServiceDescriptor.getFullName().
After the first registration, subsequent calls with the same service name will fail with
a return value of false.
registerService in interface MasterServicesinstance - the Service subclass instance to expose as a coprocessor endpoint
true if the registration was successful, false
otherwise
public ClientProtos.CoprocessorServiceResponse execMasterService(com.google.protobuf.RpcController controller,
ClientProtos.CoprocessorServiceRequest request)
throws com.google.protobuf.ServiceException
execMasterService in interface MasterAdminProtos.MasterAdminService.BlockingInterfacecom.google.protobuf.ServiceException
public static HMaster constructMaster(Class<? extends HMaster> masterClass,
org.apache.hadoop.conf.Configuration conf)
masterClass - conf -
public static void main(String[] args)
HMasterCommandLinepublic HFileCleaner getHFileCleaner()
public SnapshotManager getSnapshotManagerForTesting()
public MasterAdminProtos.TakeSnapshotResponse snapshot(com.google.protobuf.RpcController controller,
MasterAdminProtos.TakeSnapshotRequest request)
throws com.google.protobuf.ServiceException
snapshot in interface MasterAdminProtos.MasterAdminService.BlockingInterfacecom.google.protobuf.ServiceException
public MasterAdminProtos.ListSnapshotResponse getCompletedSnapshots(com.google.protobuf.RpcController controller,
MasterAdminProtos.ListSnapshotRequest request)
throws com.google.protobuf.ServiceException
getCompletedSnapshots in interface MasterAdminProtos.MasterAdminService.BlockingInterfacecom.google.protobuf.ServiceException
public MasterAdminProtos.DeleteSnapshotResponse deleteSnapshot(com.google.protobuf.RpcController controller,
MasterAdminProtos.DeleteSnapshotRequest request)
throws com.google.protobuf.ServiceException
deleteSnapshot in interface MasterAdminProtos.MasterAdminService.BlockingInterfacecom.google.protobuf.ServiceException - wrapping SnapshotDoesNotExistException if specified snapshot did not
exist.
public MasterAdminProtos.IsSnapshotDoneResponse isSnapshotDone(com.google.protobuf.RpcController controller,
MasterAdminProtos.IsSnapshotDoneRequest request)
throws com.google.protobuf.ServiceException
isSnapshotDone in interface MasterAdminProtos.MasterAdminService.BlockingInterfacecom.google.protobuf.ServiceException - wrapping UnknownSnapshotException if invalid snapshot, or
a wrapped HBaseSnapshotException with progress failure reason.
public MasterAdminProtos.RestoreSnapshotResponse restoreSnapshot(com.google.protobuf.RpcController controller,
MasterAdminProtos.RestoreSnapshotRequest request)
throws com.google.protobuf.ServiceException
If the specified table exists a "Restore" is executed, replacing the table schema and directory data with the content of the snapshot. The table must be disabled, or a UnsupportedOperationException will be thrown.
If the table doesn't exist a "Clone" is executed, a new table is created using the schema at the time of the snapshot, and the content of the snapshot.
The restore/clone operation does not require copying HFiles. Since HFiles are immutable the table can point to and use the same files as the original one.
restoreSnapshot in interface MasterAdminProtos.MasterAdminService.BlockingInterfacecom.google.protobuf.ServiceException
public MasterAdminProtos.IsRestoreSnapshotDoneResponse isRestoreSnapshotDone(com.google.protobuf.RpcController controller,
MasterAdminProtos.IsRestoreSnapshotDoneRequest request)
throws com.google.protobuf.ServiceException
isRestoreSnapshotDone in interface MasterAdminProtos.MasterAdminService.BlockingInterfacecom.google.protobuf.ServiceException - if the operation failed.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||