org.apache.hadoop.hbase.ipc
Interface HMasterRegionInterface

All Superinterfaces:
HBaseRPCProtocolVersion, org.apache.hadoop.ipc.VersionedProtocol
All Known Implementing Classes:
HMaster, HMasterCommandLine.LocalHMaster

public interface HMasterRegionInterface
extends HBaseRPCProtocolVersion

HRegionServers interact with the HMasterRegionInterface to report on local goings-on and to obtain data-handling instructions from the HMaster.

Changes here need to be reflected in HbaseObjectWritable HbaseRPC#Invoker.

NOTE: if you change the interface, you must change the RPC version number in HBaseRPCProtocolVersion


Field Summary
 
Fields inherited from interface org.apache.hadoop.hbase.ipc.HBaseRPCProtocolVersion
versionID
 
Method Summary
 HMsg[] regionServerReport(HServerInfo info, HMsg[] msgs, HRegionInfo[] mostLoadedRegions)
          Called to renew lease, tell master what the region server is doing and to receive new instructions from the master
 org.apache.hadoop.io.MapWritable regionServerStartup(HServerInfo info, long serverCurrentTime)
          Called when a region server first starts
 
Methods inherited from interface org.apache.hadoop.ipc.VersionedProtocol
getProtocolVersion
 

Method Detail

regionServerStartup

org.apache.hadoop.io.MapWritable regionServerStartup(HServerInfo info,
                                                     long serverCurrentTime)
                                                     throws IOException
Called when a region server first starts

Parameters:
info - server info
serverCurrentTime - The current time of the region server in ms
Returns:
Configuration for the regionserver to use: e.g. filesystem, hbase rootdir, etc.
Throws:
IOException - e

regionServerReport

HMsg[] regionServerReport(HServerInfo info,
                          HMsg[] msgs,
                          HRegionInfo[] mostLoadedRegions)
                          throws IOException
Called to renew lease, tell master what the region server is doing and to receive new instructions from the master

Parameters:
info - server's address and start code
msgs - things the region server wants to tell the master
mostLoadedRegions - Array of HRegionInfos that should contain the reporting server's most loaded regions. These are candidates for being rebalanced.
Returns:
instructions from the master to the region server
Throws:
IOException - e


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