Logo Search packages:      
Sourcecode: hbase version File versions  Download package

org::apache::hadoop::hbase::regionserver::HRegionServer Class Reference

Inheritance diagram for org::apache::hadoop::hbase::regionserver::HRegionServer:

org::apache::hadoop::hbase::HConstants org::apache::hadoop::hbase::ipc::HRegionInterface org::apache::hadoop::hbase::ipc::HBaseRPCErrorHandler org::apache::hadoop::hbase::ipc::HBaseRPCProtocolVersion org::apache::hadoop::hbase::regionserver::OOMERegionServer org::apache::hadoop::hbase::regionserver::transactional::TransactionalRegionServer org::apache::hadoop::hbase::regionserver::tableindexed::IndexedRegionServer

List of all members.

Detailed Description

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

Definition at line 114 of file HRegionServer.java.

Public Types

enum  Modify {

Public Member Functions

void abort ()
void addProcessingMessage (final HRegionInfo hri)
boolean checkAndPut (final byte[] regionName, final byte[] row, final byte[] family, final byte[] qualifier, final byte[] value, final Put put) throws IOException
boolean checkOOME (final Throwable e)
void close (long scannerId) throws IOException
void close (final long scannerId) throws IOException
HServerLoad.RegionLoad createRegionLoad (final byte[] regionName)
int delete (final byte[] regionName, final Delete[] deletes) throws IOException
void delete (final byte[] regionName, final Delete delete) throws IOException
boolean exists (byte[] regionName, Get get) throws IOException
Result get (byte[] regionName, Get get) throws IOException
Result getClosestRowBefore (final byte[] regionName, final byte[] row, final byte[] family) throws IOException
HBaseConfiguration getConfiguration ()
SortedMap< Long, HRegiongetCopyOfOnlineRegionsSortedBySize ()
FlushRequester getFlushRequester ()
long getGlobalMemStoreSize ()
HServerInfo getHServerInfo () throws IOException
InfoServer getInfoServer ()
RegionServerMetrics getMetrics ()
HRegion getOnlineRegion (final byte[] regionName)
Collection< HRegiongetOnlineRegions ()
HRegion[] getOnlineRegionsAsArray ()
long getProtocolVersion (final String protocol, final long clientVersion) throws IOException
HRegionInfo getRegionInfo (final byte[] regionName) throws NotServingRegionException
HRegionInfo[] getRegionsAssignment () throws IOException
AtomicInteger getRequestCount ()
SortedSet< HRegionInfogetSortedOnlineRegionInfos ()
ZooKeeperWrapper getZooKeeperWrapper ()
 HRegionServer (HBaseConfiguration conf) throws IOException
long incrementColumnValue (byte[] regionName, byte[] row, byte[] family, byte[] qualifier, long amount, boolean writeToWAL) throws IOException
boolean isInSafeMode ()
boolean isOnline ()
boolean isStopRequested ()
long lockRow (final byte[] regionName, final byte[] row) throws IOException
long lockRow (byte[] regionName, byte[] row) throws IOException
Result[] next (long scannerId, int numberOfRows) throws IOException
Result next (long scannerId) throws IOException
Result[] next (final long scannerId, int nbRows) throws IOException
Result next (final long scannerId) throws IOException
long openScanner (final byte[] regionName, final Scan scan) throws IOException
long openScanner (byte[] regionName, Scan scan) throws IOException
void process (WatchedEvent event)
int put (final byte[] regionName, final Put[] puts) throws IOException
void put (final byte[] regionName, final Put put) throws IOException
void run ()
void runThread (final Thread t, final long dfsShutdownWait)
Thread setHDFSShutdownThreadOnExit (final Thread t)
void stop ()
void unlockRow (final byte[] regionName, final long lockId) throws IOException
void unlockRow (byte[] regionName, long lockId) throws IOException

Static Public Member Functions

static void main (String[] args)

Static Public Attributes

static final int ALL_VERSIONS = Integer.MAX_VALUE
static final byte[] CATALOG_FAMILY = Bytes.toBytes(CATALOG_FAMILY_STR)
static final String CATALOG_FAMILY_STR = "info"
static final byte[] CATALOG_HISTORIAN_FAMILY = Bytes.toBytes("historian")
static final String CLUSTER_DISTRIBUTED = "hbase.cluster.distributed"
static final String CLUSTER_IS_DISTRIBUTED = "true"
static final String CLUSTER_IS_LOCAL = "false"
static final String DEFAULT_HOST = ""
static final int DEFAULT_MASTER_INFOPORT = 60010
static final int DEFAULT_MASTER_PORT = 60000
static final long DEFAULT_MAX_FILE_SIZE = 256 * 1024 * 1024
static final String DEFAULT_REGION_SERVER_CLASS = HRegionInterface.class.getName()
static final int DEFAULT_REGIONSERVER_INFOPORT = 60030
static final int DEFAULT_REGIONSERVER_PORT = 60020
static final int DEFAULT_SIZE_RESERVATION_BLOCK = 1024 * 1024 * 5
static final int DEFAULT_ZOOKEEPER_PAUSE = 2 * 1000
static final int DEFAULT_ZOOKEEPER_RETRIES = 5
static final byte[] EMPTY_BYTE_ARRAY = new byte [0]
static final byte[] EMPTY_END_ROW = EMPTY_START_ROW
static final byte[] EMPTY_START_ROW = EMPTY_BYTE_ARRAY
static final String FILE_SYSTEM_VERSION = "7"
static final int FOREVER = Integer.MAX_VALUE
static String HBASE_CLIENT_SCANNER_MAX_RESULT_SIZE_KEY = "hbase.client.scanner.max.result.size"
static final String HBASE_DIR = "hbase.rootdir"
static final String HREGION_COMPACTIONDIR_NAME = "compaction.dir"
static final String HREGION_LOGDIR_NAME = ".logs"
static final String HREGION_OLDLOGFILE_NAME = "oldlogfile.log"
static final String IN_MEMORY = "IN_MEMORY"
static final byte[] LAST_ROW = EMPTY_BYTE_ARRAY
static final long LATEST_TIMESTAMP = Long.MAX_VALUE
static final byte[] LATEST_TIMESTAMP_BYTES = Bytes.toBytes(LATEST_TIMESTAMP)
static final String MAJOR_COMPACTION_PERIOD = "hbase.hregion.majorcompaction"
static final String MASTER_PORT = "hbase.master.port"
static final int MAX_ROW_LENGTH = Short.MAX_VALUE
static final int MAXIMUM_VALUE_LENGTH = Integer.MAX_VALUE
static final int META_ROW_DELIMITER = ','
static final byte[] META_TABLE_NAME = Bytes.toBytes(".META.")
static final String NAME = "NAME"
static final String NINES = "99999999999999"
static final String REGION_IMPL = "hbase.hregion.impl"
static final String REGION_SERVER_CLASS = "hbase.regionserver.class"
static final String REGION_SERVER_IMPL = "hbase.regionserver.impl"
static final byte[] REGIONINFO_QUALIFIER = Bytes.toBytes("regioninfo")
static final String REGIONSERVER = "regionserver"
static final String REGIONSERVER_PORT = "hbase.regionserver.port"
static int RETRY_BACKOFF [] = { 1, 1, 1, 2, 2, 4, 4, 8, 16, 32 }
static final byte[] ROOT_TABLE_NAME = Bytes.toBytes("-ROOT-")
static final byte[] SERVER_QUALIFIER = Bytes.toBytes("server")
static final byte[] SPLITA_QUALIFIER = Bytes.toBytes("splitA")
static final byte[] SPLITB_QUALIFIER = Bytes.toBytes("splitB")
static final byte[] STARTCODE_QUALIFIER = Bytes.toBytes("serverstartcode")
static final String THREAD_WAKE_FREQUENCY = "hbase.server.thread.wakefrequency"
static final String UTF8_ENCODING = "UTF-8"
static final String VERSION_FILE_NAME = "hbase.version"
static final long versionID = 21L
static final String VERSIONS = "VERSIONS"
static final int WEEK_IN_SECONDS = 7 * 24 * 3600
static final String ZEROES = "00000000000000"
static final String ZOOKEEPER_CONFIG_NAME = "zoo.cfg"
static final String ZOOKEEPER_PAUSE = "zookeeper.pause"
static final String ZOOKEEPER_QUORUM = "hbase.zookeeper.quorum"
static final String ZOOKEEPER_RETRIES = "zookeeper.retries"

Protected Member Functions

long addRowLock (Integer r, HRegion region) throws LeaseStillHeldException
long addScanner (InternalScanner s) throws LeaseStillHeldException
boolean checkFileSystem ()
void checkOpen () throws IOException
void closeRegion (final HRegionInfo hri, final boolean reportWhenCompleted) throws IOException
void doMetrics ()
FileSystem getFileSystem ()
Leases getLeases ()
LogRoller getLogRoller ()
HRegionInfo[] getMostLoadedRegions ()
LinkedBlockingQueue< HMsggetOutboundMsgs ()
HRegion getRegion (final byte[] regionName) throws NotServingRegionException
Set< HRegiongetRegionsToCheck ()
Path getRootDir ()
void init (final MapWritable c) throws IOException
HLog instantiateHLog (Path logdir) throws IOException
HRegion instantiateRegion (final HRegionInfo regionInfo) throws IOException
void metrics ()

Static Protected Member Functions

static void doMain (final String[] args, final Class<?extends HRegionServer > regionServerClass)

Protected Attributes

volatile boolean abortRequested
final HBaseConfiguration conf
volatile boolean fsOk
final AtomicBoolean haveRootRegion = new AtomicBoolean(false)
volatile HLog hlog
volatile boolean isOnline
final ReentrantReadWriteLock lock = new ReentrantReadWriteLock()
final int numRegionsToReport
final Map< Integer, HRegiononlineRegions
final AtomicBoolean quiesced = new AtomicBoolean(false)
final AtomicBoolean safeMode = new AtomicBoolean(true)
HServerInfo serverInfo
final AtomicBoolean stopRequested = new AtomicBoolean(false)
final int threadWakeFrequency

Package Functions

ArrayList< HRegioncloseAllRegions ()
void closeUserRegions ()
Integer getLockFromId (long lockId) throws IOException
HLog getLog ()
ReentrantReadWriteLock.WriteLock getWriteLock ()
void join ()
void openRegion (final HRegionInfo regionInfo)
HRegion removeFromOnlineRegions (HRegionInfo hri)
void reportSplit (HRegionInfo oldRegion, HRegionInfo newRegionA, HRegionInfo newRegionB)

Package Attributes

MemStoreFlusher cacheFlusher
CompactSplitThread compactSplitThread
LogFlusher hlogFlusher
LogRoller hlogRoller
InfoServer infoServer
Chore majorCompactionChecker
final int numRetries
Map< String, Integer > rowlocks
final Map< String,
HBaseServer server
final BlockingQueue< ToDoEntry > toDo = new LinkedBlockingQueue<ToDoEntry>()

Static Package Attributes

static final Log LOG = LogFactory.getLog(HRegionServer.class)
static final Long ZERO_L = Long.valueOf(0L)

Private Member Functions

void addOutboundMsgs (final List< HMsg > msgs)
Throwable cleanup (final Throwable t, final String msg)
Throwable cleanup (final Throwable t)
IOException convertThrowableToIOE (final Throwable t, final String msg)
IOException convertThrowableToIOE (final Throwable t)
HServerLoad.RegionLoad createRegionLoad (final HRegion r)
boolean getMaster ()
void housekeeping ()
boolean isHealthy ()
void reinitialize () throws IOException
void reinitializeThreads ()
void reinitializeZooKeeper () throws IOException
void reportClose (final HRegionInfo region, final byte[] message)
void reportClose (HRegionInfo region)
MapWritable reportForDuty ()
void reportOpen (HRegionInfo region)
void restart ()
HLog setupHLog () throws RegionServerRunningException, IOException
void startServiceThreads () throws IOException
Thread suppressHdfsShutdownHook ()
void updateOutboundMsgs (final List< HMsg > msgs)
void watchMasterAddress ()

Static Private Member Functions

static void printUsageAndExit (final String message)
static void printUsageAndExit ()

Private Attributes

final HServerAddress address
final ServerConnection connection
FileSystem fs
HMasterRegionInterface hbaseMaster
Thread hdfsShutdownThread
Leases leases
final String machineName
final long maxScannerResultSize
RegionServerMetrics metrics
final int msgInterval
final LinkedBlockingQueue< HMsgoutboundMsgs
final Random rand = new Random()
Thread regionServerThread
volatile AtomicInteger requestCount = new AtomicInteger()
final LinkedList< byte[]> reservedSpace = new LinkedList<byte []>()
Path rootDir
final long rpcTimeout
final int serverLeaseTimeout
final AtomicBoolean shutdownHDFS = new AtomicBoolean(true)
final Sleeper sleeper
Worker worker
Thread workerThread
ZooKeeperWrapper zooKeeperWrapper

Static Private Attributes

static final HMsg[] EMPTY_HMSG_ARRAY = new HMsg [] {}
static final HMsg REPORT_EXITING = new HMsg(Type.MSG_REPORT_EXITING)


class  MajorCompactionChecker
class  RegionCloserThread
class  RowLockListener
class  ScannerListener
class  ShutdownThread
class  ToDoEntry
class  Worker

The documentation for this class was generated from the following file:

Generated by  Doxygen 1.6.0   Back to index