|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.hbase.regionserver.HRegionServer
org.apache.hadoop.hbase.regionserver.transactional.TransactionalRegionServer
public class TransactionalRegionServer
RegionServer with support for transactions. Transactional logic is at the region level, so we mostly just delegate to the appropriate TransactionalRegion.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface org.apache.hadoop.hbase.HConstants |
---|
HConstants.Modify |
Nested classes/interfaces inherited from interface org.apache.zookeeper.Watcher |
---|
org.apache.zookeeper.Watcher.Event |
Field Summary |
---|
Fields inherited from class org.apache.hadoop.hbase.regionserver.HRegionServer |
---|
abortRequested, conf, fsOk, haveRootRegion, hlog, isOnline, lock, numRegionsToReport, onlineRegions, quiesced, REGIONSERVER, safeMode, serverInfo, stopRequested, threadWakeFrequency |
Fields inherited from interface org.apache.hadoop.hbase.ipc.TransactionalRegionInterface |
---|
COMMIT_OK, COMMIT_OK_READ_ONLY, COMMIT_UNSUCESSFUL |
Fields inherited from interface org.apache.hadoop.hbase.ipc.HBaseRPCProtocolVersion |
---|
versionID |
Constructor Summary | |
---|---|
TransactionalRegionServer(HBaseConfiguration conf)
|
Method Summary | |
---|---|
void |
abort(byte[] regionName,
long transactionId)
Abort the transaction. |
void |
beginTransaction(long transactionId,
byte[] regionName)
Sent to initiate a transaction. |
protected void |
closeRegion(HRegionInfo hri,
boolean reportWhenCompleted)
We want to delay the close region for a bit if we have commit pending transactions. |
void |
commit(byte[] regionName,
long transactionId)
Commit the transaction. |
boolean |
commitIfPossible(byte[] regionName,
long transactionId)
Try to commit the given transaction. |
int |
commitRequest(byte[] regionName,
long transactionId)
Ask if we can commit the given transaction. |
void |
delete(long transactionId,
byte[] regionName,
Delete delete)
Deletes all the KeyValues that match those found in the Delete object, if their ts <= to the Delete. |
Result |
get(long transactionId,
byte[] regionName,
Get get)
Perform a transactional Get operation. |
long |
getProtocolVersion(String protocol,
long clientVersion)
|
protected Leases |
getTransactionalLeases()
|
protected TransactionalRegion |
getTransactionalRegion(byte[] regionName)
|
protected void |
init(org.apache.hadoop.io.MapWritable c)
|
protected HLog |
instantiateHLog(org.apache.hadoop.fs.Path logdir)
|
protected HRegion |
instantiateRegion(HRegionInfo regionInfo)
|
long |
openScanner(long transactionId,
byte[] regionName,
Scan scan)
Opens a remote transactional scanner with a RowFilter. |
void |
put(long transactionId,
byte[] regionName,
Put put)
Transactional put data into the specified region |
int |
put(long transactionId,
byte[] regionName,
Put[] puts)
Put an array of puts into the specified region |
Methods inherited from class org.apache.hadoop.hbase.regionserver.HRegionServer |
---|
abort, addProcessingMessage, addRowLock, addScanner, checkAndPut, checkFileSystem, checkOOME, checkOpen, close, createRegionLoad, delete, delete, doMain, doMetrics, exists, get, getClosestRowBefore, getConfiguration, getCopyOfOnlineRegionsSortedBySize, getFileSystem, getFlushRequester, getGlobalMemStoreSize, getHServerInfo, getInfoServer, getLeases, getLogRoller, getMetrics, getMostLoadedRegions, getOnlineRegion, getOnlineRegions, getOnlineRegionsAsArray, getOutboundMsgs, getRegion, getRegionInfo, getRegionsAssignment, getRegionsToCheck, getRequestCount, getRootDir, getSortedOnlineRegionInfos, getZooKeeperWrapper, incrementColumnValue, isInSafeMode, isOnline, isStopRequested, lockRow, main, metrics, next, next, openScanner, process, put, put, run, runThread, setHDFSShutdownThreadOnExit, stop, unlockRow |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.hadoop.hbase.ipc.HRegionInterface |
---|
checkAndPut, close, delete, delete, exists, get, getClosestRowBefore, getHServerInfo, getOnlineRegionsAsArray, getRegionInfo, getRegionsAssignment, incrementColumnValue, lockRow, next, next, openScanner, put, put, unlockRow |
Constructor Detail |
---|
public TransactionalRegionServer(HBaseConfiguration conf) throws IOException
conf
-
IOException
Method Detail |
---|
public long getProtocolVersion(String protocol, long clientVersion) throws IOException
getProtocolVersion
in interface org.apache.hadoop.ipc.VersionedProtocol
getProtocolVersion
in class HRegionServer
IOException
protected void init(org.apache.hadoop.io.MapWritable c) throws IOException
init
in class HRegionServer
IOException
protected HLog instantiateHLog(org.apache.hadoop.fs.Path logdir) throws IOException
instantiateHLog
in class HRegionServer
IOException
protected HRegion instantiateRegion(HRegionInfo regionInfo) throws IOException
instantiateRegion
in class HRegionServer
IOException
protected TransactionalRegion getTransactionalRegion(byte[] regionName) throws NotServingRegionException
NotServingRegionException
protected Leases getTransactionalLeases()
protected void closeRegion(HRegionInfo hri, boolean reportWhenCompleted) throws IOException
closeRegion
in class HRegionServer
IOException
public void abort(byte[] regionName, long transactionId) throws IOException
TransactionalRegionInterface
abort
in interface TransactionalRegionInterface
IOException
public void commit(byte[] regionName, long transactionId) throws IOException
TransactionalRegionInterface
commit
in interface TransactionalRegionInterface
IOException
public int commitRequest(byte[] regionName, long transactionId) throws IOException
TransactionalRegionInterface
commitRequest
in interface TransactionalRegionInterface
IOException
public boolean commitIfPossible(byte[] regionName, long transactionId) throws IOException
TransactionalRegionInterface
commitIfPossible
in interface TransactionalRegionInterface
IOException
public long openScanner(long transactionId, byte[] regionName, Scan scan) throws IOException
TransactionalRegionInterface
openScanner
in interface TransactionalRegionInterface
regionName
- name of region to scanscan
- configured scan object
IOException
public void beginTransaction(long transactionId, byte[] regionName) throws IOException
TransactionalRegionInterface
beginTransaction
in interface TransactionalRegionInterface
regionName
- name of region
IOException
public void delete(long transactionId, byte[] regionName, Delete delete) throws IOException
TransactionalRegionInterface
delete
in interface TransactionalRegionInterface
IOException
public Result get(long transactionId, byte[] regionName, Get get) throws IOException
TransactionalRegionInterface
get
in interface TransactionalRegionInterface
regionName
- name of region to get fromget
- Get operation
IOException
public void put(long transactionId, byte[] regionName, Put put) throws IOException
TransactionalRegionInterface
put
in interface TransactionalRegionInterface
put
- the data to be put
IOException
public int put(long transactionId, byte[] regionName, Put[] puts) throws IOException
TransactionalRegionInterface
put
in interface TransactionalRegionInterface
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |