|
||||||||||
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.
Field Summary |
---|
Fields inherited from class org.apache.hadoop.hbase.regionserver.HRegionServer |
---|
abortRequested, conf, fsOk, isOnline, lock, log, 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)
|
|
TransactionalRegionServer(HServerAddress address,
HBaseConfiguration conf)
|
Method Summary | |
---|---|
void |
abort(byte[] regionName,
long transactionId)
Abort the transaction. |
void |
batchUpdate(long transactionId,
byte[] regionName,
BatchUpdate b)
Applies a batch of updates via one RPC |
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 |
deleteAll(long transactionId,
byte[] regionName,
byte[] row,
long timestamp)
Delete all cells that match the passed row and whose timestamp is equal-to or older than the passed timestamp. |
Cell |
get(long transactionId,
byte[] regionName,
byte[] row,
byte[] column)
Retrieve a single value from the specified region for the specified row and column keys |
Cell[] |
get(long transactionId,
byte[] regionName,
byte[] row,
byte[] column,
int numVersions)
Get the specified number of versions of the specified row and column |
Cell[] |
get(long transactionId,
byte[] regionName,
byte[] row,
byte[] column,
long timestamp,
int numVersions)
Get the specified number of versions of the specified row and column with the specified timestamp. |
long |
getProtocolVersion(String protocol,
long clientVersion)
|
RowResult |
getRow(long transactionId,
byte[] regionName,
byte[] row,
byte[][] columns)
Get selected columns for the specified row at the latest timestamp. |
RowResult |
getRow(long transactionId,
byte[] regionName,
byte[] row,
byte[][] columns,
long ts)
Get selected columns for the specified row at a given timestamp. |
RowResult |
getRow(long transactionId,
byte[] regionName,
byte[] row,
long ts)
Get all the data for the specified row at a given timestamp |
protected Leases |
getTransactionalLeases()
|
protected TransactionalRegion |
getTransactionalRegion(byte[] regionName)
|
protected void |
init(org.apache.hadoop.io.MapWritable c)
|
protected HRegion |
instantiateRegion(HRegionInfo regionInfo)
|
long |
openScanner(long transactionId,
byte[] regionName,
byte[][] cols,
byte[] firstRow,
long timestamp,
RowFilterInterface filter)
Opens a remote scanner with a RowFilter. |
Methods inherited from class org.apache.hadoop.hbase.regionserver.HRegionServer |
---|
abort, addProcessingMessage, addRowLock, addScanner, batchUpdate, batchUpdates, checkAndSave, checkFileSystem, checkOOME, checkOpen, close, createRegionLoad, deleteAll, deleteAll, deleteAllByRegex, deleteFamily, deleteFamilyByRegex, doMain, doMetrics, exists, get, getClosestRowBefore, getConfiguration, getCopyOfOnlineRegionsSortedBySize, getFileSystem, getFlushRequester, getGlobalMemcacheSize, getInfoServer, getLeases, getMetrics, getMostLoadedRegions, getOnlineRegion, getOnlineRegions, getOutboundMsgs, getRegion, getRegionInfo, getRegionsToCheck, getRequestCount, getRootDir, getRow, getServerInfo, getSortedOnlineRegionInfos, incrementColumnValue, isInSafeMode, isOnline, isStopRequested, lockRow, main, next, next, openScanner, 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 |
---|
batchUpdate, batchUpdates, checkAndSave, close, deleteAll, deleteAll, deleteAllByRegex, deleteFamily, deleteFamilyByRegex, exists, get, getClosestRowBefore, getRegionInfo, getRow, incrementColumnValue, lockRow, next, next, openScanner, unlockRow |
Constructor Detail |
---|
public TransactionalRegionServer(HBaseConfiguration conf) throws IOException
conf
-
IOException
public TransactionalRegionServer(HServerAddress address, HBaseConfiguration conf) throws IOException
address
- 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 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 batchUpdate(long transactionId, byte[] regionName, BatchUpdate b) throws IOException
TransactionalRegionInterface
batchUpdate
in interface TransactionalRegionInterface
regionName
- name of the region to updateb
- BatchUpdate
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 Cell get(long transactionId, byte[] regionName, byte[] row, byte[] column) throws IOException
TransactionalRegionInterface
get
in interface TransactionalRegionInterface
regionName
- name of regionrow
- row keycolumn
- column key
IOException
public Cell[] get(long transactionId, byte[] regionName, byte[] row, byte[] column, int numVersions) throws IOException
TransactionalRegionInterface
get
in interface TransactionalRegionInterface
regionName
- region namerow
- row keycolumn
- column keynumVersions
- number of versions to return
IOException
public Cell[] get(long transactionId, byte[] regionName, byte[] row, byte[] column, long timestamp, int numVersions) throws IOException
TransactionalRegionInterface
get
in interface TransactionalRegionInterface
regionName
- region namerow
- row keycolumn
- column keytimestamp
- timestampnumVersions
- number of versions to return
IOException
public RowResult getRow(long transactionId, byte[] regionName, byte[] row, long ts) throws IOException
TransactionalRegionInterface
getRow
in interface TransactionalRegionInterface
regionName
- region namerow
- row keyts
- timestamp
IOException
public RowResult getRow(long transactionId, byte[] regionName, byte[] row, byte[][] columns) throws IOException
TransactionalRegionInterface
getRow
in interface TransactionalRegionInterface
regionName
- region namerow
- row keycolumns
- columns to get
IOException
public RowResult getRow(long transactionId, byte[] regionName, byte[] row, byte[][] columns, long ts) throws IOException
TransactionalRegionInterface
getRow
in interface TransactionalRegionInterface
regionName
- region namerow
- row keycolumns
- colums to getts
- timestamp
IOException
public void deleteAll(long transactionId, byte[] regionName, byte[] row, long timestamp) throws IOException
TransactionalRegionInterface
deleteAll
in interface TransactionalRegionInterface
regionName
- region namerow
- row keytimestamp
- Delete all entries that have this timestamp or older
IOException
public long openScanner(long transactionId, byte[] regionName, byte[][] cols, byte[] firstRow, long timestamp, RowFilterInterface filter) throws IOException
TransactionalRegionInterface
openScanner
in interface TransactionalRegionInterface
regionName
- name of region to scancols
- columns to scan. If column name is a column family, all
columns of the specified column family are returned. Its also possible to
pass a regex for column family name. A column name is judged to be regex if
it contains at least one of the following characters:
\+|^&*$[]]}{)(
.firstRow
- starting row to scantimestamp
- only return values whose timestamp is <= this valuefilter
- RowFilter for filtering results at the row-level.
IOException
public void beginTransaction(long transactionId, byte[] regionName) throws IOException
TransactionalRegionInterface
beginTransaction
in interface TransactionalRegionInterface
regionName
- name of region
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |