|
||||||||||
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 |
batchUpdate(byte[] regionName,
BatchUpdate b,
long lockId)
Applies a batch of updates via one RPC |
int |
batchUpdates(byte[] regionName,
BatchUpdate[] b)
Applies a batch of updates via one RPC for many rows |
boolean |
checkAndSave(byte[] regionName,
BatchUpdate b,
HbaseMapWritable<byte[],byte[]> expectedValues)
Applies a batch of updates to one row atomically via one RPC if the columns specified in expectedValues match the given values in expectedValues |
void |
close(long scannerId)
Close a scanner |
void |
deleteAll(byte[] regionName,
byte[] row,
byte[] column,
long timestamp,
long lockId)
Delete all cells that match the passed row and column and whose timestamp is equal-to or older than the passed timestamp. |
void |
deleteAll(byte[] regionName,
byte[] row,
long timestamp,
long lockId)
Delete all cells that match the passed row and whose timestamp is equal-to or older than the passed timestamp. |
void |
deleteAllByRegex(byte[] regionName,
byte[] row,
String colRegex,
long timestamp,
long lockId)
Delete all cells that match the passed row & the column regex and whose timestamp is equal-to or older than the passed timestamp. |
void |
deleteFamily(byte[] regionName,
byte[] row,
byte[] family,
long timestamp,
long lockId)
Delete all cells for a row with matching column family with timestamps less than or equal to timestamp. |
void |
deleteFamilyByRegex(byte[] regionName,
byte[] row,
String familyRegex,
long timestamp,
long lockId)
Delete all cells for a row with matching column family regex with timestamps less than or equal to timestamp. |
boolean |
exists(byte[] regionName,
byte[] row,
byte[] column,
long timestamp,
long lockID)
Returns true if any cells exist for the given coordinate. |
Cell[] |
get(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. |
RowResult |
getClosestRowBefore(byte[] regionName,
byte[] row,
byte[] columnFamily)
Return all the data for the row that matches row exactly, or the one that immediately preceeds it. |
HRegionInfo |
getRegionInfo(byte[] regionName)
Get metainfo about an HRegion |
RowResult |
getRow(byte[] regionName,
byte[] row,
byte[][] columns,
long ts,
int numVersions,
long lockId)
Get selected columns for the specified row at a given timestamp. |
long |
lockRow(byte[] regionName,
byte[] row)
Opens a remote row lock. |
RowResult |
next(long scannerId)
Get the next set of values |
RowResult[] |
next(long scannerId,
int numberOfRows)
Get the next set of values |
long |
openScanner(byte[] regionName,
byte[][] columns,
byte[] startRow,
long timestamp,
RowFilterInterface filter)
Opens a remote scanner with a RowFilter. |
void |
unlockRow(byte[] regionName,
long lockId)
Releases a remote row lock. |
Methods inherited from interface org.apache.hadoop.ipc.VersionedProtocol |
---|
getProtocolVersion |
Method Detail |
---|
HRegionInfo getRegionInfo(byte[] regionName) throws NotServingRegionException
regionName
- name of the region
NotServingRegionException
Cell[] get(byte[] regionName, byte[] row, byte[] column, long timestamp, int numVersions) throws IOException
regionName
- region namerow
- row keycolumn
- column keytimestamp
- timestampnumVersions
- number of versions to return
IOException
RowResult getClosestRowBefore(byte[] regionName, byte[] row, byte[] columnFamily) throws IOException
regionName
- region namerow
- row keycolumnFamily
- Column family to look for row in.
IOException
RowResult getRow(byte[] regionName, byte[] row, byte[][] columns, long ts, int numVersions, long lockId) throws IOException
regionName
- region namerow
- row keycolumns
- columns to getts
- time stampnumVersions
- number of versionslockId
- lock id
IOException
void batchUpdate(byte[] regionName, BatchUpdate b, long lockId) throws IOException
regionName
- name of the region to updateb
- BatchUpdatelockId
- lock id
IOException
int batchUpdates(byte[] regionName, BatchUpdate[] b) throws IOException
regionName
- name of the region to updateb
- BatchUpdate[]
IOException
boolean checkAndSave(byte[] regionName, BatchUpdate b, HbaseMapWritable<byte[],byte[]> expectedValues) throws IOException
regionName
- name of the region to updateb
- BatchUpdateexpectedValues
- map of column names to expected data values.
IOException
void deleteAll(byte[] regionName, byte[] row, byte[] column, long timestamp, long lockId) throws IOException
regionName
- region namerow
- row keycolumn
- column keytimestamp
- Delete all entries that have this timestamp or olderlockId
- lock id
IOException
void deleteAll(byte[] regionName, byte[] row, long timestamp, long lockId) throws IOException
regionName
- region namerow
- row keytimestamp
- Delete all entries that have this timestamp or olderlockId
- lock id
IOException
void deleteAllByRegex(byte[] regionName, byte[] row, String colRegex, long timestamp, long lockId) throws IOException
regionName
- row
- colRegex
- timestamp
- lockId
-
IOException
void deleteFamily(byte[] regionName, byte[] row, byte[] family, long timestamp, long lockId) throws IOException
regionName
- The name of the region to operate onrow
- The row to operate onfamily
- The column family to matchtimestamp
- Timestamp to matchlockId
- lock id
IOException
void deleteFamilyByRegex(byte[] regionName, byte[] row, String familyRegex, long timestamp, long lockId) throws IOException
regionName
- The name of the region to operate onrow
- The row to operate onfamilyRegex
- column family regextimestamp
- Timestamp to matchlockId
- lock id
IOException
boolean exists(byte[] regionName, byte[] row, byte[] column, long timestamp, long lockID) throws IOException
regionName
- The name of the regionrow
- The rowcolumn
- The column, or null for anytimestamp
- The timestamp, or LATEST_TIMESTAMP for anylockID
- lock id
IOException
long openScanner(byte[] regionName, byte[][] columns, byte[] startRow, long timestamp, RowFilterInterface filter) throws IOException
regionName
- name of region to scancolumns
- 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:
\+|^&*$[]]}{)(
.startRow
- starting row to scantimestamp
- only return values whose timestamp is <= this valuefilter
- RowFilter for filtering results at the row-level.
IOException
RowResult next(long scannerId) throws IOException
scannerId
- clientId passed to openScanner
IOException
RowResult[] next(long scannerId, int numberOfRows) throws IOException
scannerId
- clientId passed to openScannernumberOfRows
- the number of rows to fetch
IOException
void close(long scannerId) throws IOException
scannerId
- the scanner id returned by openScanner
IOException
long lockRow(byte[] regionName, byte[] row) throws IOException
regionName
- name of regionrow
- row to lock
IOException
void unlockRow(byte[] regionName, long lockId) throws IOException
regionName
- lockId
- the lock id returned by lockRow
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |