org.apache.hadoop.hbase.regionserver
Class HRegionServer

java.lang.Object
  extended by org.apache.hadoop.hbase.regionserver.HRegionServer
All Implemented Interfaces:
Runnable, HBaseRPCErrorHandler, HBaseRPCProtocolVersion, HRegionInterface, org.apache.hadoop.ipc.VersionedProtocol, org.apache.zookeeper.Watcher

public class HRegionServer
extends Object
implements HRegionInterface, HBaseRPCErrorHandler, Runnable, org.apache.zookeeper.Watcher

HRegionServer makes a set of HRegions available to clients. It checks in with the HMaster. There are many HRegionServers in a single HBase deployment.


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.apache.zookeeper.Watcher
org.apache.zookeeper.Watcher.Event
 
Field Summary
protected  boolean abortRequested
           
protected  org.apache.hadoop.conf.Configuration conf
           
protected  boolean fsOk
           
protected  AtomicBoolean haveRootRegion
           
protected  HLog hlog
           
protected  boolean isOnline
           
protected  ReentrantReadWriteLock lock
           
static org.apache.commons.logging.Log LOG
           
protected  int numRegionsToReport
           
protected  Map<Integer,HRegion> onlineRegions
           
protected  AtomicBoolean quiesced
           
static String REGIONSERVER
          region server process name
protected  HServerInfo serverInfo
           
protected  AtomicBoolean stopRequested
           
protected  int threadWakeFrequency
           
 
Fields inherited from interface org.apache.hadoop.hbase.ipc.HBaseRPCProtocolVersion
versionID
 
Constructor Summary
HRegionServer(org.apache.hadoop.conf.Configuration conf)
          Starts a HRegionServer at the default location
 
Method Summary
 void abort(String reason)
           
 void abort(String reason, Throwable cause)
          Cause the server to exit without closing the regions it is serving, the log it is using and without notifying the master.
 void addProcessingMessage(HRegionInfo hri)
          Add a MSG_REPORT_PROCESS_OPEN to the outbound queue.
protected  long addRowLock(Integer r, HRegion region)
           
protected  long addScanner(InternalScanner s)
           
 void addToOnlineRegions(HRegion r)
          Add to online regions.
 void bulkLoadHFile(String hfilePath, byte[] regionName, byte[] familyName)
          Bulk load an HFile into an open region
 boolean checkAndDelete(byte[] regionName, byte[] row, byte[] family, byte[] qualifier, byte[] value, Delete delete)
          Atomically checks if a row/family/qualifier value match the expectedValue.
 boolean checkAndPut(byte[] regionName, byte[] row, byte[] family, byte[] qualifier, byte[] value, Put put)
          Atomically checks if a row/family/qualifier value match the expectedValue.
protected  boolean checkFileSystem()
          Checks to see if the file system is still accessible.
 boolean checkOOME(Throwable e)
          Take actions on the event of an OutOfMemoryError.
protected  void checkOpen()
          Called to verify that this server is up and running.
 void close(long scannerId)
          Close a scanner
protected  void closeRegion(HRegionInfo hri, boolean reportWhenCompleted)
           
static HRegionServer constructRegionServer(Class<? extends HRegionServer> regionServerClass, org.apache.hadoop.conf.Configuration conf2)
          Utility for constructing an instance of the passed HRegionServer class.
 HServerLoad.RegionLoad createRegionLoad(byte[] regionName)
           
 void delete(byte[] regionName, Delete delete)
          Deletes all the KeyValues that match those found in the Delete object, if their ts <= to the Delete.
 int delete(byte[] regionName, List<Delete> deletes)
          Put an array of deletes into the specified region
protected static void doMain(String[] args, Class<? extends HRegionServer> regionServerClass)
          Do class main.
protected  void doMetrics()
           
 boolean exists(byte[] regionName, Get get)
          Perform exists operation.
 Result get(byte[] regionName, Get get)
          Perform Get operation.
 Result getClosestRowBefore(byte[] regionName, byte[] row, byte[] family)
          Return all the data for the row that matches row exactly, or the one that immediately preceeds it.
 org.apache.hadoop.conf.Configuration getConfiguration()
           
 SortedMap<Long,HRegion> getCopyOfOnlineRegionsSortedBySize()
           
protected  org.apache.hadoop.fs.FileSystem getFileSystem()
           
 FlushRequester getFlushRequester()
           
 long getGlobalMemStoreSize()
          Return the total size of all memstores in every region.
 HServerInfo getHServerInfo()
          Method used when a master is taking the place of another failed one.
 InfoServer getInfoServer()
           
protected  Leases getLeases()
           
 HLog getLog()
           
protected  org.apache.hadoop.hbase.regionserver.LogRoller getLogRoller()
           
 RegionServerMetrics getMetrics()
           
protected  HRegionInfo[] getMostLoadedRegions()
          Get the top N most loaded regions this server is serving so we can tell the master which regions it can reallocate if we're overloaded.
 int getNumberOfOnlineRegions()
           
 HRegion getOnlineRegion(byte[] regionName)
           
 Collection<HRegion> getOnlineRegions()
           
 HRegion[] getOnlineRegionsAsArray()
           
protected  LinkedBlockingQueue<HMsg> getOutboundMsgs()
           
 long getProtocolVersion(String protocol, long clientVersion)
           
protected  HRegion getRegion(byte[] regionName)
          Protected utility method for safely obtaining an HRegion handle.
 HRegionInfo getRegionInfo(byte[] regionName)
          Get metainfo about an HRegion
 HRegionInfo[] getRegionsAssignment()
          Method used when a master is taking the place of another failed one.
protected  Set<HRegion> getRegionsToCheck()
           
 AtomicInteger getRequestCount()
           
protected  org.apache.hadoop.fs.Path getRootDir()
           
 HServerInfo getServerInfo()
           
 SortedSet<HRegionInfo> getSortedOnlineRegionInfos()
           
 int getThreadWakeFrequency()
          Interval at which threads should run
 ZooKeeperWrapper getZooKeeperWrapper()
           
 long incrementColumnValue(byte[] regionName, byte[] row, byte[] family, byte[] qualifier, long amount, boolean writeToWAL)
          Atomically increments a column value.
protected  void init(org.apache.hadoop.io.MapWritable c)
           
protected  HLog instantiateHLog(org.apache.hadoop.fs.Path logdir, org.apache.hadoop.fs.Path oldLogDir)
           
protected  HRegion instantiateRegion(HRegionInfo regionInfo, HLog wal)
           
 boolean isOnline()
          Report the status of the server.
 boolean isStopRequested()
           
protected  void join()
          Wait on all threads to finish.
protected  void kill()
           
 long lockRow(byte[] regionName, byte[] row)
          Opens a remote row lock.
static void main(String[] args)
           
protected  void metrics()
           
 MultiPutResponse multiPut(MultiPut puts)
          Multi put for putting multiple regions worth of puts at once.
 Result next(long scannerId)
          Get the next set of values
 Result[] next(long scannerId, int nbRows)
          Get the next set of values
 long openScanner(byte[] regionName, Scan scan)
          Opens a remote scanner with a RowFilter.
 void process(org.apache.zookeeper.WatchedEvent event)
          We register ourselves as a watcher on the master address ZNode.
 int put(byte[] regionName, List<Put> puts)
          Put an array of puts into the specified region
 void put(byte[] regionName, Put put)
          Put data into the specified region
 HRegion removeFromOnlineRegions(HRegionInfo hri)
          This method removes HRegion corresponding to hri from the Map of onlineRegions.
 void replicateLogEntries(HLog.Entry[] entries)
          Replicates the given entries.
 void run()
          The HRegionServer sticks in this loop until closed.
static Thread startRegionServer(HRegionServer hrs)
           
static Thread startRegionServer(HRegionServer hrs, String name)
           
 void stop()
          Sets a flag that will cause all the HRegionServer threads to shut down in an orderly fashion.
 String toString()
           
 void unlockRow(byte[] regionName, long lockId)
          Releases a remote row lock.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

LOG

public static final org.apache.commons.logging.Log LOG

stopRequested

protected final AtomicBoolean stopRequested

quiesced

protected final AtomicBoolean quiesced

abortRequested

protected volatile boolean abortRequested

fsOk

protected volatile boolean fsOk

serverInfo

protected HServerInfo serverInfo

conf

protected final org.apache.hadoop.conf.Configuration conf

haveRootRegion

protected final AtomicBoolean haveRootRegion

onlineRegions

protected final Map<Integer,HRegion> onlineRegions

lock

protected final ReentrantReadWriteLock lock

threadWakeFrequency

protected final int threadWakeFrequency

numRegionsToReport

protected final int numRegionsToReport

REGIONSERVER

public static final String REGIONSERVER
region server process name

See Also:
Constant Field Values

hlog

protected volatile HLog hlog

isOnline

protected volatile boolean isOnline
Constructor Detail

HRegionServer

public HRegionServer(org.apache.hadoop.conf.Configuration conf)
              throws IOException
Starts a HRegionServer at the default location

Parameters:
conf -
Throws:
IOException
Method Detail

process

public void process(org.apache.zookeeper.WatchedEvent event)
We register ourselves as a watcher on the master address ZNode. This is called by ZooKeeper when we get an event on that ZNode. When this method is called it means either our master has died, or a new one has come up. Either way we need to update our knowledge of the master.

Specified by:
process in interface org.apache.zookeeper.Watcher
Parameters:
event - WatchedEvent from ZooKeeper.

getZooKeeperWrapper

public ZooKeeperWrapper getZooKeeperWrapper()
Returns:
ZooKeeperWrapper used by RegionServer.

run

public void run()
The HRegionServer sticks in this loop until closed. It repeatedly checks in with the HMaster, sending heartbeats & reports, and receiving HRegion load/unload instructions.

Specified by:
run in interface Runnable

init

protected void init(org.apache.hadoop.io.MapWritable c)
             throws IOException
Throws:
IOException

createRegionLoad

public HServerLoad.RegionLoad createRegionLoad(byte[] regionName)
Parameters:
regionName -
Returns:
An instance of RegionLoad.
Throws:
IOException

checkOOME

public boolean checkOOME(Throwable e)
Description copied from interface: HBaseRPCErrorHandler
Take actions on the event of an OutOfMemoryError.

Specified by:
checkOOME in interface HBaseRPCErrorHandler
Parameters:
e - the throwable
Returns:
if the server should be shut down

checkFileSystem

protected boolean checkFileSystem()
Checks to see if the file system is still accessible. If not, sets abortRequested and stopRequested

Returns:
false if file system is not available

isOnline

public boolean isOnline()
Report the status of the server. A server is online once all the startup is completed (setting up filesystem, starting service threads, etc.). This method is designed mostly to be useful in tests.

Returns:
true if online, false if not.

instantiateHLog

protected HLog instantiateHLog(org.apache.hadoop.fs.Path logdir,
                               org.apache.hadoop.fs.Path oldLogDir)
                        throws IOException
Throws:
IOException

getLogRoller

protected org.apache.hadoop.hbase.regionserver.LogRoller getLogRoller()

doMetrics

protected void doMetrics()

metrics

protected void metrics()

getMetrics

public RegionServerMetrics getMetrics()
Returns:
Region server metrics instance.

getLog

public HLog getLog()
Returns:
the HLog

stop

public void stop()
Sets a flag that will cause all the HRegionServer threads to shut down in an orderly fashion. Used by unit tests.


abort

public void abort(String reason,
                  Throwable cause)
Cause the server to exit without closing the regions it is serving, the log it is using and without notifying the master. Used unit testing and on catastrophic events such as HDFS is yanked out from under hbase or we OOME.

Parameters:
reason - the reason we are aborting
cause - the exception that caused the abort, or null

abort

public void abort(String reason)
See Also:
abort(String, Throwable)

kill

protected void kill()

join

protected void join()
Wait on all threads to finish. Presumption is that all closes and stops have already been called.


instantiateRegion

protected HRegion instantiateRegion(HRegionInfo regionInfo,
                                    HLog wal)
                             throws IOException
Throws:
IOException

addProcessingMessage

public void addProcessingMessage(HRegionInfo hri)
Add a MSG_REPORT_PROCESS_OPEN to the outbound queue. This method is called while region is in the queue of regions to process and then while the region is being opened, it is called from the Worker thread that is running the region open.

Parameters:
hri - Region to add the message for

closeRegion

protected void closeRegion(HRegionInfo hri,
                           boolean reportWhenCompleted)
                    throws IOException
Throws:
IOException

getRegionInfo

public HRegionInfo getRegionInfo(byte[] regionName)
                          throws NotServingRegionException
Description copied from interface: HRegionInterface
Get metainfo about an HRegion

Specified by:
getRegionInfo in interface HRegionInterface
Parameters:
regionName - name of the region
Returns:
HRegionInfo object for region
Throws:
NotServingRegionException - e

getClosestRowBefore

public Result getClosestRowBefore(byte[] regionName,
                                  byte[] row,
                                  byte[] family)
                           throws IOException
Description copied from interface: HRegionInterface
Return all the data for the row that matches row exactly, or the one that immediately preceeds it.

Specified by:
getClosestRowBefore in interface HRegionInterface
Parameters:
regionName - region name
row - row key
family - Column family to look for row in.
Returns:
map of values
Throws:
IOException - e

get

public Result get(byte[] regionName,
                  Get get)
           throws IOException
Perform Get operation.

Specified by:
get in interface HRegionInterface
Parameters:
regionName - name of region to get from
get - Get operation
Returns:
Result
Throws:
IOException - e

exists

public boolean exists(byte[] regionName,
                      Get get)
               throws IOException
Description copied from interface: HRegionInterface
Perform exists operation.

Specified by:
exists in interface HRegionInterface
Parameters:
regionName - name of region to get from
get - Get operation describing cell to test
Returns:
true if exists
Throws:
IOException - e

put

public void put(byte[] regionName,
                Put put)
         throws IOException
Description copied from interface: HRegionInterface
Put data into the specified region

Specified by:
put in interface HRegionInterface
Parameters:
regionName - region name
put - the data to be put
Throws:
IOException - e

put

public int put(byte[] regionName,
               List<Put> puts)
        throws IOException
Description copied from interface: HRegionInterface
Put an array of puts into the specified region

Specified by:
put in interface HRegionInterface
Parameters:
regionName - region name
puts - List of puts to execute
Returns:
The number of processed put's. Returns -1 if all Puts processed successfully.
Throws:
IOException - e

checkAndPut

public boolean checkAndPut(byte[] regionName,
                           byte[] row,
                           byte[] family,
                           byte[] qualifier,
                           byte[] value,
                           Put put)
                    throws IOException
Description copied from interface: HRegionInterface
Atomically checks if a row/family/qualifier value match the expectedValue. If it does, it adds the put. If passed expected value is null, then the check is for non-existance of the row/column.

Specified by:
checkAndPut in interface HRegionInterface
Parameters:
regionName -
row -
family -
qualifier -
value - the expected value
put -
Returns:
true if the new put was execute, false otherwise
Throws:
IOException

checkAndDelete

public boolean checkAndDelete(byte[] regionName,
                              byte[] row,
                              byte[] family,
                              byte[] qualifier,
                              byte[] value,
                              Delete delete)
                       throws IOException
Description copied from interface: HRegionInterface
Atomically checks if a row/family/qualifier value match the expectedValue. If it does, it adds the delete. If passed expected value is null, then the check is for non-existance of the row/column.

Specified by:
checkAndDelete in interface HRegionInterface
Parameters:
regionName -
row -
family -
qualifier -
value - the expected value
delete -
Returns:
true if the new put was execute, false otherwise
Throws:
IOException

openScanner

public long openScanner(byte[] regionName,
                        Scan scan)
                 throws IOException
Description copied from interface: HRegionInterface
Opens a remote scanner with a RowFilter.

Specified by:
openScanner in interface HRegionInterface
Parameters:
regionName - name of region to scan
scan - configured scan object
Returns:
scannerId scanner identifier used in other calls
Throws:
IOException - e

addScanner

protected long addScanner(InternalScanner s)
                   throws Leases.LeaseStillHeldException
Throws:
Leases.LeaseStillHeldException

next

public Result next(long scannerId)
            throws IOException
Description copied from interface: HRegionInterface
Get the next set of values

Specified by:
next in interface HRegionInterface
Parameters:
scannerId - clientId passed to openScanner
Returns:
map of values; returns null if no results.
Throws:
IOException - e

next

public Result[] next(long scannerId,
                     int nbRows)
              throws IOException
Description copied from interface: HRegionInterface
Get the next set of values

Specified by:
next in interface HRegionInterface
Parameters:
scannerId - clientId passed to openScanner
nbRows - the number of rows to fetch
Returns:
Array of Results (map of values); array is empty if done with this region and null if we are NOT to go to the next region (happens when a filter rules that the scan is done).
Throws:
IOException - e

close

public void close(long scannerId)
           throws IOException
Description copied from interface: HRegionInterface
Close a scanner

Specified by:
close in interface HRegionInterface
Parameters:
scannerId - the scanner id returned by openScanner
Throws:
IOException - e

delete

public void delete(byte[] regionName,
                   Delete delete)
            throws IOException
Description copied from interface: HRegionInterface
Deletes all the KeyValues that match those found in the Delete object, if their ts <= to the Delete. In case of a delete with a specific ts it only deletes that specific KeyValue.

Specified by:
delete in interface HRegionInterface
Parameters:
regionName - region name
delete - delete object
Throws:
IOException - e

delete

public int delete(byte[] regionName,
                  List<Delete> deletes)
           throws IOException
Description copied from interface: HRegionInterface
Put an array of deletes into the specified region

Specified by:
delete in interface HRegionInterface
Parameters:
regionName - region name
deletes - delete List to execute
Returns:
The number of processed deletes. Returns -1 if all Deletes processed successfully.
Throws:
IOException - e

lockRow

public long lockRow(byte[] regionName,
                    byte[] row)
             throws IOException
Description copied from interface: HRegionInterface
Opens a remote row lock.

Specified by:
lockRow in interface HRegionInterface
Parameters:
regionName - name of region
row - row to lock
Returns:
lockId lock identifier
Throws:
IOException - e

addRowLock

protected long addRowLock(Integer r,
                          HRegion region)
                   throws Leases.LeaseStillHeldException
Throws:
Leases.LeaseStillHeldException

unlockRow

public void unlockRow(byte[] regionName,
                      long lockId)
               throws IOException
Description copied from interface: HRegionInterface
Releases a remote row lock.

Specified by:
unlockRow in interface HRegionInterface
Parameters:
regionName - region name
lockId - the lock id returned by lockRow
Throws:
IOException - e

bulkLoadHFile

public void bulkLoadHFile(String hfilePath,
                          byte[] regionName,
                          byte[] familyName)
                   throws IOException
Description copied from interface: HRegionInterface
Bulk load an HFile into an open region

Specified by:
bulkLoadHFile in interface HRegionInterface
Throws:
IOException

getInfoServer

public InfoServer getInfoServer()
Returns:
the info server

isStopRequested

public boolean isStopRequested()
Returns:
true if a stop has been requested.

getConfiguration

public org.apache.hadoop.conf.Configuration getConfiguration()
Returns:
the configuration

getOnlineRegions

public Collection<HRegion> getOnlineRegions()
Returns:
Immutable list of this servers regions.

getOnlineRegionsAsArray

public HRegion[] getOnlineRegionsAsArray()
Specified by:
getOnlineRegionsAsArray in interface HRegionInterface
Returns:
the regions served by this regionserver

getSortedOnlineRegionInfos

public SortedSet<HRegionInfo> getSortedOnlineRegionInfos()
Returns:
The HRegionInfos from online regions sorted

addToOnlineRegions

public void addToOnlineRegions(HRegion r)
Add to online regions.


removeFromOnlineRegions

public HRegion removeFromOnlineRegions(HRegionInfo hri)
This method removes HRegion corresponding to hri from the Map of onlineRegions.

Parameters:
hri - the HRegionInfo corresponding to the HRegion to-be-removed.
Returns:
the removed HRegion, or null if the HRegion was not in onlineRegions.

getCopyOfOnlineRegionsSortedBySize

public SortedMap<Long,HRegion> getCopyOfOnlineRegionsSortedBySize()
Returns:
A new Map of online regions sorted by region size with the first entry being the biggest.

getOnlineRegion

public HRegion getOnlineRegion(byte[] regionName)
Parameters:
regionName -
Returns:
HRegion for the passed regionName or null if named region is not member of the online regions.

getRequestCount

public AtomicInteger getRequestCount()
Returns:
the request count

getFlushRequester

public FlushRequester getFlushRequester()
Returns:
reference to FlushRequester

getRegion

protected HRegion getRegion(byte[] regionName)
                     throws NotServingRegionException
Protected utility method for safely obtaining an HRegion handle.

Parameters:
regionName - Name of online HRegion to return
Returns:
HRegion for regionName
Throws:
NotServingRegionException

getMostLoadedRegions

protected HRegionInfo[] getMostLoadedRegions()
Get the top N most loaded regions this server is serving so we can tell the master which regions it can reallocate if we're overloaded. TODO: actually calculate which regions are most loaded. (Right now, we're just grabbing the first N regions being served regardless of load.)


checkOpen

protected void checkOpen()
                  throws IOException
Called to verify that this server is up and running.

Throws:
IOException

getRegionsToCheck

protected Set<HRegion> getRegionsToCheck()
Returns:
Returns list of non-closed regions hosted on this server. If no regions to check, returns an empty list.

getProtocolVersion

public long getProtocolVersion(String protocol,
                               long clientVersion)
                        throws IOException
Specified by:
getProtocolVersion in interface org.apache.hadoop.ipc.VersionedProtocol
Throws:
IOException

getOutboundMsgs

protected LinkedBlockingQueue<HMsg> getOutboundMsgs()
Returns:
Queue to which you can add outbound messages.

getGlobalMemStoreSize

public long getGlobalMemStoreSize()
Return the total size of all memstores in every region.

Returns:
memstore size in bytes

getLeases

protected Leases getLeases()
Returns:
Return the leases.

getRootDir

protected org.apache.hadoop.fs.Path getRootDir()
Returns:
Return the rootDir.

getFileSystem

protected org.apache.hadoop.fs.FileSystem getFileSystem()
Returns:
Return the fs.

getServerInfo

public HServerInfo getServerInfo()
Returns:
Info on port this server has bound to, etc.

incrementColumnValue

public long incrementColumnValue(byte[] regionName,
                                 byte[] row,
                                 byte[] family,
                                 byte[] qualifier,
                                 long amount,
                                 boolean writeToWAL)
                          throws IOException
Atomically increments a column value. If the column value isn't long-like, this could throw an exception. If passed expected value is null, then the check is for non-existance of the row/column.

Specified by:
incrementColumnValue in interface HRegionInterface
Parameters:
regionName - region name
row - row to check
family - column family
qualifier - column qualifier
amount - long amount to increment
writeToWAL - whether to write the increment to the WAL
Returns:
new incremented column value
Throws:
IOException - e

getRegionsAssignment

public HRegionInfo[] getRegionsAssignment()
                                   throws IOException
Method used when a master is taking the place of another failed one.

Specified by:
getRegionsAssignment in interface HRegionInterface
Returns:
All regions assigned on this region server
Throws:
IOException - e

getHServerInfo

public HServerInfo getHServerInfo()
                           throws IOException
Method used when a master is taking the place of another failed one.

Specified by:
getHServerInfo in interface HRegionInterface
Returns:
The HSI
Throws:
IOException - e

multiPut

public MultiPutResponse multiPut(MultiPut puts)
                          throws IOException
Description copied from interface: HRegionInterface
Multi put for putting multiple regions worth of puts at once.

Specified by:
multiPut in interface HRegionInterface
Parameters:
puts - the request
Returns:
the reply
Throws:
IOException - e

toString

public String toString()
Overrides:
toString in class Object

getThreadWakeFrequency

public int getThreadWakeFrequency()
Interval at which threads should run

Returns:
the interval

startRegionServer

public static Thread startRegionServer(HRegionServer hrs)
                                throws IOException
Parameters:
hrs -
Returns:
Thread the RegionServer is running in correctly named.
Throws:
IOException

startRegionServer

public static Thread startRegionServer(HRegionServer hrs,
                                       String name)
                                throws IOException
Parameters:
hrs -
name -
Returns:
Thread the RegionServer is running in correctly named.
Throws:
IOException

constructRegionServer

public static HRegionServer constructRegionServer(Class<? extends HRegionServer> regionServerClass,
                                                  org.apache.hadoop.conf.Configuration conf2)
Utility for constructing an instance of the passed HRegionServer class.

Parameters:
regionServerClass -
conf2 -
Returns:
HRegionServer instance.

replicateLogEntries

public void replicateLogEntries(HLog.Entry[] entries)
                         throws IOException
Description copied from interface: HRegionInterface
Replicates the given entries. The guarantee is that the given entries will be durable on the slave cluster if this method returns without any exception. hbase.replication has to be set to true for this to work.

Specified by:
replicateLogEntries in interface HRegionInterface
Parameters:
entries - entries to replicate
Throws:
IOException

doMain

protected static void doMain(String[] args,
                             Class<? extends HRegionServer> regionServerClass)
Do class main.

Parameters:
args -
regionServerClass - HRegionServer to instantiate.

main

public static void main(String[] args)
Parameters:
args -

getNumberOfOnlineRegions

public int getNumberOfOnlineRegions()


Copyright © 2010 Apache Software Foundation. All Rights Reserved.