|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface HRegionInterface
Clients interact with HRegionServers using a handle to the HRegionInterface.
NOTE: if you change the interface, you must change the RPC version number in HBaseRPCProtocolVersion
| Field Summary |
|---|
| Fields inherited from interface org.apache.hadoop.hbase.ipc.HBaseRPCProtocolVersion |
|---|
versionID |
| Method Summary | |
|---|---|
void |
bulkLoadHFile(java.lang.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. |
void |
close(long scannerId)
Close a scanner |
boolean |
closeRegion(HRegionInfo region)
Closes the specified region. |
boolean |
closeRegion(HRegionInfo region,
boolean zk)
Closes the specified region and will use or not use ZK during the close according to the specified flag. |
void |
compactRegion(HRegionInfo regionInfo,
boolean major)
Compacts the specified region. |
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,
java.util.List<Delete> deletes)
Put an array of deletes into the specified region |
boolean |
exists(byte[] regionName,
Get get)
Perform exists operation. |
void |
flushRegion(HRegionInfo regionInfo)
Flushes the MemStore of the specified region. |
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. |
HServerInfo |
getHServerInfo()
Method used when a master is taking the place of another failed one. |
java.util.List<HRegionInfo> |
getOnlineRegions()
|
HRegionInfo |
getRegionInfo(byte[] regionName)
Get metainfo about an HRegion |
Result |
increment(byte[] regionName,
Increment increment)
Increments one or more columns values in a row. |
long |
incrementColumnValue(byte[] regionName,
byte[] row,
byte[] family,
byte[] qualifier,
long amount,
boolean writeToWAL)
Atomically increments a column value. |
long |
lockRow(byte[] regionName,
byte[] row)
Opens a remote row lock. |
MultiResponse |
multi(MultiAction multi)
Method used for doing multiple actions(Deletes, Gets and Puts) in one call |
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 numberOfRows)
Get the next set of values |
void |
openRegion(HRegionInfo region)
Opens the specified region. |
void |
openRegions(java.util.List<HRegionInfo> regions)
Opens the specified regions. |
long |
openScanner(byte[] regionName,
Scan scan)
Opens a remote scanner with a RowFilter. |
int |
put(byte[] regionName,
java.util.List<Put> puts)
Put an array of puts into the specified region |
void |
put(byte[] regionName,
Put put)
Put data into the specified region |
void |
replicateLogEntries(HLog.Entry[] entries)
Replicates the given entries. |
void |
splitRegion(HRegionInfo regionInfo)
Splits the specified region. |
void |
unlockRow(byte[] regionName,
long lockId)
Releases a remote row lock. |
| Methods inherited from interface org.apache.hadoop.ipc.VersionedProtocol |
|---|
getProtocolVersion |
| Methods inherited from interface org.apache.hadoop.hbase.Stoppable |
|---|
isStopped, stop |
| Methods inherited from interface org.apache.hadoop.hbase.Abortable |
|---|
abort |
| Method Detail |
|---|
HRegionInfo getRegionInfo(byte[] regionName)
throws NotServingRegionException,
java.net.ConnectException,
java.io.IOException
regionName - name of the region
NotServingRegionException
java.net.ConnectException
java.io.IOException - This can manifest as an Hadoop ipc RemoteException
Result getClosestRowBefore(byte[] regionName,
byte[] row,
byte[] family)
throws java.io.IOException
regionName - region namerow - row keyfamily - Column family to look for row in.
java.io.IOException - e
Result get(byte[] regionName,
Get get)
throws java.io.IOException
regionName - name of region to get fromget - Get operation
java.io.IOException - e
boolean exists(byte[] regionName,
Get get)
throws java.io.IOException
regionName - name of region to get fromget - Get operation describing cell to test
java.io.IOException - e
void put(byte[] regionName,
Put put)
throws java.io.IOException
regionName - region nameput - the data to be put
java.io.IOException - e
int put(byte[] regionName,
java.util.List<Put> puts)
throws java.io.IOException
regionName - region nameputs - List of puts to execute
java.io.IOException - e
void delete(byte[] regionName,
Delete delete)
throws java.io.IOException
regionName - region namedelete - delete object
java.io.IOException - e
int delete(byte[] regionName,
java.util.List<Delete> deletes)
throws java.io.IOException
regionName - region namedeletes - delete List to execute
java.io.IOException - e
boolean checkAndPut(byte[] regionName,
byte[] row,
byte[] family,
byte[] qualifier,
byte[] value,
Put put)
throws java.io.IOException
regionName - region namerow - row to checkfamily - column familyqualifier - column qualifiervalue - the expected valueput - data to put if check succeeds
java.io.IOException - e
boolean checkAndDelete(byte[] regionName,
byte[] row,
byte[] family,
byte[] qualifier,
byte[] value,
Delete delete)
throws java.io.IOException
regionName - region namerow - row to checkfamily - column familyqualifier - column qualifiervalue - the expected valuedelete - data to delete if check succeeds
java.io.IOException - e
long incrementColumnValue(byte[] regionName,
byte[] row,
byte[] family,
byte[] qualifier,
long amount,
boolean writeToWAL)
throws java.io.IOException
regionName - region namerow - row to checkfamily - column familyqualifier - column qualifieramount - long amount to incrementwriteToWAL - whether to write the increment to the WAL
java.io.IOException - e
Result increment(byte[] regionName,
Increment increment)
throws java.io.IOException
This operation does not appear atomic to readers. Increments are done under a row lock but readers do not take row locks.
regionName - region nameincrement - increment operation
java.io.IOException
long openScanner(byte[] regionName,
Scan scan)
throws java.io.IOException
regionName - name of region to scanscan - configured scan object
java.io.IOException - e
Result next(long scannerId)
throws java.io.IOException
scannerId - clientId passed to openScanner
java.io.IOException - e
Result[] next(long scannerId,
int numberOfRows)
throws java.io.IOException
scannerId - clientId passed to openScannernumberOfRows - the number of rows to fetch
java.io.IOException - e
void close(long scannerId)
throws java.io.IOException
scannerId - the scanner id returned by openScanner
java.io.IOException - e
long lockRow(byte[] regionName,
byte[] row)
throws java.io.IOException
regionName - name of regionrow - row to lock
java.io.IOException - e
void unlockRow(byte[] regionName,
long lockId)
throws java.io.IOException
regionName - region namelockId - the lock id returned by lockRow
java.io.IOException - ejava.util.List<HRegionInfo> getOnlineRegions()
java.io.IOException - e
HServerInfo getHServerInfo()
throws java.io.IOException
java.io.IOException - e
MultiResponse multi(MultiAction multi)
throws java.io.IOException
multi -
java.io.IOException
MultiPutResponse multiPut(MultiPut puts)
throws java.io.IOException
puts - the request
java.io.IOException - e
void bulkLoadHFile(java.lang.String hfilePath,
byte[] regionName,
byte[] familyName)
throws java.io.IOException
java.io.IOException
void openRegion(HRegionInfo region)
throws java.io.IOException
region - region to open
java.io.IOException
void openRegions(java.util.List<HRegionInfo> regions)
throws java.io.IOException
regions - regions to open
java.io.IOException
boolean closeRegion(HRegionInfo region)
throws java.io.IOException
region - region to close
java.io.IOException
boolean closeRegion(HRegionInfo region,
boolean zk)
throws java.io.IOException
region - region to closezk - true if transitions should be done in ZK, false if not
java.io.IOException
void flushRegion(HRegionInfo regionInfo)
throws NotServingRegionException,
java.io.IOException
This method is synchronous.
regionInfo - region to flush
NotServingRegionException
java.io.IOException
void splitRegion(HRegionInfo regionInfo)
throws NotServingRegionException,
java.io.IOException
This method currently flushes the region and then forces a compaction which will then trigger a split. The flush is done synchronously but the compaction is asynchronous.
regionInfo - region to split
NotServingRegionException
java.io.IOException
void compactRegion(HRegionInfo regionInfo,
boolean major)
throws NotServingRegionException,
java.io.IOException
This method is asynchronous.
regionInfo - region to compactmajor - true to force major compaction
NotServingRegionException
java.io.IOException
void replicateLogEntries(HLog.Entry[] entries)
throws java.io.IOException
entries - entries to replicate
java.io.IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||