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

org::apache::hadoop::hbase::regionserver::transactional::TransactionalRegionServer Class Reference

Inheritance diagram for org::apache::hadoop::hbase::regionserver::transactional::TransactionalRegionServer:

org::apache::hadoop::hbase::regionserver::HRegionServer org::apache::hadoop::hbase::ipc::TransactionalRegionInterface org::apache::hadoop::hbase::HConstants org::apache::hadoop::hbase::ipc::HRegionInterface org::apache::hadoop::hbase::ipc::HBaseRPCErrorHandler org::apache::hadoop::hbase::ipc::HRegionInterface org::apache::hadoop::hbase::ipc::HBaseRPCProtocolVersion org::apache::hadoop::hbase::ipc::HBaseRPCProtocolVersion org::apache::hadoop::hbase::regionserver::tableindexed::IndexedRegionServer

List of all members.


Detailed Description

RegionServer with support for transactions. Transactional logic is at the region level, so we mostly just delegate to the appropriate TransactionalRegion.

Definition at line 55 of file TransactionalRegionServer.java.


Public Types

enum  Modify {
  CLOSE_REGION, TABLE_COMPACT, TABLE_FLUSH, TABLE_MAJOR_COMPACT,
  TABLE_SET_HTD, TABLE_SPLIT
}

Public Member Functions

void abort (final byte[] regionName, long transactionId) throws IOException
void abort ()
void abort (final byte[] regionName, final long transactionId) throws IOException
void addProcessingMessage (final HRegionInfo hri)
void beginTransaction (long transactionId, final byte[] regionName) throws IOException
void beginTransaction (final long transactionId, final byte[] regionName) throws IOException
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
void commit (final byte[] regionName, long transactionId) throws IOException
void commit (final byte[] regionName, final long transactionId) throws IOException
boolean commitIfPossible (final byte[] regionName, long transactionId) throws IOException
boolean commitIfPossible (byte[] regionName, long transactionId) throws IOException
int commitRequest (final byte[] regionName, long transactionId) throws IOException
int commitRequest (final byte[] regionName, final long transactionId) throws IOException
HServerLoad.RegionLoad createRegionLoad (final byte[] regionName)
void delete (long transactionId, final byte[] regionName, final Delete delete) throws IOException
int delete (final byte[] regionName, final Delete[] deletes) throws IOException
void delete (final byte[] regionName, final Delete delete) throws IOException
void delete (long transactionId, byte[] regionName, Delete delete) throws IOException
boolean exists (byte[] regionName, Get get) throws IOException
Result get (byte[] regionName, Get get) throws IOException
Result get (long transactionId, 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 ()
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 (long transactionId, final byte[] regionName, final Scan scan) throws IOException
long openScanner (final byte[] regionName, final Scan scan) throws IOException
long openScanner (byte[] regionName, Scan scan) throws IOException
long openScanner (final long transactionId, byte[] regionName, Scan scan) throws IOException
void process (WatchedEvent event)
int put (long transactionId, final byte[] regionName, final Put[] puts) throws IOException
void put (long transactionId, final byte[] regionName, final Put put) throws IOException
int put (final byte[] regionName, final Put[] puts) throws IOException
void put (final byte[] regionName, final Put put) throws IOException
int put (long transactionId, byte[] regionName, Put[] puts) throws IOException
void put (long transactionId, byte[] regionName, Put put) throws IOException
void run ()
void runThread (final Thread t, final long dfsShutdownWait)
Thread setHDFSShutdownThreadOnExit (final Thread t)
void stop ()
 TransactionalRegionServer (final HBaseConfiguration conf) throws IOException
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)

Public Attributes

int COMMIT_OK_READ_ONLY = 2
int COMMIT_UNSUCESSFUL = 3

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 long DEFAULT_HBASE_CLIENT_SCANNER_MAX_RESULT_SIZE = Long.MAX_VALUE
static final String DEFAULT_HOST = "0.0.0.0"
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 final String HBASE_CLIENT_RETRIES_NUMBER_KEY
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 ()
Leases getTransactionalLeases ()
TransactionalRegion getTransactionalRegion (final byte[] regionName) throws NotServingRegionException
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)

Static Package Functions

 [static initializer]

Package Attributes

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

Static Package Attributes

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

Private Attributes

final CleanOldTransactionsChore cleanOldTransactionsThread
final Leases transactionLeases

Static Private Attributes

static final int DEFAULT_LEASE_TIME = 60 * 1000
static final int LEASE_CHECK_FREQUENCY = 1000
static final String LEASE_TIME = "hbase.transaction.leasetime"

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

Generated by  Doxygen 1.6.0   Back to index