|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.hbase.client.HTable
public class HTable
Used to communicate with a single HBase table
This class is not MT safe for writing.
Nested Class Summary | |
---|---|
protected class |
HTable.ClientScanner
Implements the scanner interface for the HBase client. |
protected class |
HTable.OldClientScanner
Scanner implementation made on top of a ResultScanner . |
Field Summary | |
---|---|
protected int |
scannerCaching
|
protected int |
scannerTimeout
|
Constructor Summary | |
---|---|
HTable(byte[] tableName)
Creates an object to access a HBase table |
|
HTable(HBaseConfiguration conf,
byte[] tableName)
Creates an object to access a HBase table. |
|
HTable(HBaseConfiguration conf,
String tableName)
Creates an object to access a HBase table |
|
HTable(String tableName)
Creates an object to access a HBase table |
Method Summary | |
---|---|
boolean |
checkAndPut(byte[] row,
byte[] family,
byte[] qualifier,
byte[] value,
Put put)
Atomically checks if a row/family/qualifier value match the expectedValue. |
boolean |
checkAndSave(BatchUpdate batchUpdate,
HbaseMapWritable<byte[],byte[]> expectedValues,
RowLock rl)
Deprecated. As of hbase 0.20.0, replaced by checkAndPut(byte[], byte[], byte[], byte[], org.apache.hadoop.hbase.client.Put) |
void |
close()
Release held resources |
void |
commit(BatchUpdate batchUpdate)
Deprecated. As of hbase 0.20.0, replaced by delete(Delete) or
put(Put) |
void |
commit(BatchUpdate batchUpdate,
RowLock rl)
Deprecated. As of hbase 0.20.0, replaced by delete(Delete) or
put(Put) |
void |
commit(List<BatchUpdate> batchUpdates)
Deprecated. As of hbase 0.20.0, replaced by delete(Delete) or
put(List) |
void |
delete(Delete delete)
|
void |
deleteAll(byte[] row)
Deprecated. As of hbase 0.20.0, replaced by delete(Delete) |
void |
deleteAll(byte[] row,
byte[] column)
Deprecated. As of hbase 0.20.0, replaced by delete(Delete) |
void |
deleteAll(byte[] row,
byte[] column,
long ts)
Deprecated. As of hbase 0.20.0, replaced by delete(Delete) |
void |
deleteAll(byte[] row,
byte[] column,
long ts,
RowLock rl)
Deprecated. As of hbase 0.20.0, replaced by delete(Delete) |
void |
deleteAll(byte[] row,
long ts)
Deprecated. As of hbase 0.20.0, replaced by delete(Delete) |
void |
deleteAll(String row)
Deprecated. As of hbase 0.20.0, replaced by delete(Delete) |
void |
deleteAll(String row,
long ts)
Deprecated. As of hbase 0.20.0, replaced by delete(Delete) |
void |
deleteAll(String row,
String column)
Deprecated. As of hbase 0.20.0, replaced by delete(Delete) |
void |
deleteAll(String row,
String column,
long ts)
Deprecated. As of hbase 0.20.0, replaced by delete(Delete) |
void |
deleteAllByRegex(byte[] row,
String colRegex,
long ts)
Deprecated. As of hbase 0.20.0, replaced by delete(Delete) |
void |
deleteAllByRegex(byte[] row,
String colRegex,
long ts,
RowLock rl)
Deprecated. As of hbase 0.20.0, replaced by delete(Delete) |
void |
deleteAllByRegex(String row,
String colRegex)
Deprecated. As of hbase 0.20.0, replaced by delete(Delete) |
void |
deleteAllByRegex(String row,
String colRegex,
long ts)
Deprecated. As of hbase 0.20.0, replaced by delete(Delete) |
void |
deleteFamily(byte[] row,
byte[] family)
Deprecated. As of hbase 0.20.0, replaced by delete(Delete) |
void |
deleteFamily(byte[] row,
byte[] family,
long timestamp)
Deprecated. As of hbase 0.20.0, replaced by delete(Delete) |
void |
deleteFamily(byte[] row,
byte[] family,
long timestamp,
RowLock rl)
Deprecated. As of hbase 0.20.0, replaced by delete(Delete) |
void |
deleteFamily(String row,
String family)
Deprecated. As of hbase 0.20.0, replaced by delete(Delete) |
void |
deleteFamily(String row,
String family,
long timestamp)
Deprecated. As of hbase 0.20.0, replaced by delete(Delete) |
void |
deleteFamilyByRegex(byte[] row,
String familyRegex)
Deprecated. As of hbase 0.20.0, replaced by delete(Delete) |
void |
deleteFamilyByRegex(byte[] row,
String familyRegex,
long timestamp)
Deprecated. As of hbase 0.20.0, replaced by delete(Delete) |
void |
deleteFamilyByRegex(byte[] row,
String familyRegex,
long timestamp,
RowLock r1)
Deprecated. As of hbase 0.20.0, replaced by delete(Delete) |
void |
deleteFamilyByRegex(String row,
String familyRegex)
Deprecated. As of hbase 0.20.0, replaced by delete(Delete) |
void |
deleteFamilyByRegex(String row,
String familyRegex,
long timestamp)
Deprecated. As of hbase 0.20.0, replaced by delete(Delete) |
boolean |
exists(byte[] row)
Deprecated. As of hbase 0.20.0, replaced by exists(Get) |
boolean |
exists(byte[] row,
byte[] column)
Deprecated. As of hbase 0.20.0, replaced by exists(Get) |
boolean |
exists(byte[] row,
byte[] column,
long timestamp)
Deprecated. As of hbase 0.20.0, replaced by exists(Get) |
boolean |
exists(byte[] row,
byte[] column,
long timestamp,
RowLock rl)
Deprecated. As of hbase 0.20.0, replaced by exists(Get) |
boolean |
exists(Get get)
Test for the existence of columns in the table, as specified in the Get. |
void |
flushCommits()
Commit to the table the buffer of BatchUpdate. |
Cell |
get(byte[] row,
byte[] column)
Deprecated. As of hbase 0.20.0, replaced by get(Get) |
Cell[] |
get(byte[] row,
byte[] column,
int numVersions)
Deprecated. As of hbase 0.20.0, replaced by get(Get) |
Cell[] |
get(byte[] row,
byte[] column,
long timestamp,
int numVersions)
Deprecated. As of hbase 0.20.0, replaced by get(Get) |
Result |
get(Get get)
Method for getting data from a row |
Cell |
get(String row,
String column)
Deprecated. As of hbase 0.20.0, replaced by get(Get) |
Cell[] |
get(String row,
String column,
int numVersions)
Deprecated. As of hbase 0.20.0, replaced by get(Get) |
Cell[] |
get(String row,
String column,
long timestamp,
int numVersions)
Deprecated. As of hbase 0.20.0, replaced by get(Get) |
RowResult |
getClosestRowBefore(byte[] row,
byte[] family)
Deprecated. As of hbase 0.20.0, replaced by getRowOrBefore(byte[], byte[]) |
HConnection |
getConnection()
Used by unit tests and tools to do low-level manipulations. |
byte[][] |
getEndKeys()
Gets the ending row key for every region in the currently open table |
HRegionLocation |
getRegionLocation(byte[] row)
Find region location hosting passed row using cached info |
HRegionLocation |
getRegionLocation(String row)
Find region location hosting passed row using cached info |
Map<HRegionInfo,HServerAddress> |
getRegionsInfo()
Get all the regions and their address for this table |
RowResult |
getRow(byte[] row)
Deprecated. As of hbase 0.20.0, replaced by get(Get) |
RowResult |
getRow(byte[] row,
byte[][] columns)
Deprecated. As of hbase 0.20.0, replaced by get(Get) |
RowResult |
getRow(byte[] row,
byte[][] columns,
int numVersions)
Deprecated. As of hbase 0.20.0, replaced by get(Get) |
RowResult |
getRow(byte[] row,
byte[][] columns,
long ts)
Deprecated. As of hbase 0.20.0, replaced by get(Get) |
RowResult |
getRow(byte[] row,
byte[][] columns,
long ts,
int numVersions,
RowLock rl)
Deprecated. As of hbase 0.20.0, replaced by get(Get) |
RowResult |
getRow(byte[] row,
int numVersions)
Deprecated. As of hbase 0.20.0, replaced by get(Get) |
RowResult |
getRow(byte[] row,
long ts)
Deprecated. As of hbase 0.20.0, replaced by get(Get) |
RowResult |
getRow(byte[] row,
long timestamp,
int numVersions)
Deprecated. As of hbase 0.20.0, replaced by get(Get) |
RowResult |
getRow(String row)
Deprecated. As of hbase 0.20.0, replaced by get(Get) |
RowResult |
getRow(String row,
int numVersions)
Deprecated. As of hbase 0.20.0, replaced by get(Get) |
RowResult |
getRow(String row,
long ts)
Deprecated. As of hbase 0.20.0, replaced by get(Get) |
RowResult |
getRow(String row,
long ts,
int numVersions)
Deprecated. As of hbase 0.20.0, replaced by get(Get) |
RowResult |
getRow(String row,
String[] columns)
Deprecated. As of hbase 0.20.0, replaced by get(Get) |
RowResult |
getRow(String row,
String[] columns,
int numVersions)
Deprecated. As of hbase 0.20.0, replaced by get(Get) |
RowResult |
getRow(String row,
String[] columns,
long ts)
Deprecated. As of hbase 0.20.0, replaced by get(Get) |
RowResult |
getRow(String row,
String[] columns,
long timestamp,
int numVersions,
RowLock rowLock)
Deprecated. As of hbase 0.20.0, replaced by get(Get) |
Result |
getRowOrBefore(byte[] row,
byte[] family)
Return the row that matches row exactly, or the one that immediately preceeds it. |
ResultScanner |
getScanner(byte[] family)
Get a scanner on the current table as specified by the Scan object |
Scanner |
getScanner(byte[][] columns)
Deprecated. As of hbase 0.20.0, replaced by getScanner(Scan) |
Scanner |
getScanner(byte[][] columns,
byte[] startRow)
Deprecated. As of hbase 0.20.0, replaced by getScanner(Scan) |
Scanner |
getScanner(byte[][] columns,
byte[] startRow,
byte[] stopRow)
Deprecated. As of hbase 0.20.0, replaced by getScanner(Scan) |
Scanner |
getScanner(byte[][] columns,
byte[] startRow,
byte[] stopRow,
long timestamp)
Deprecated. As of hbase 0.20.0, replaced by getScanner(Scan) |
Scanner |
getScanner(byte[][] columns,
byte[] startRow,
long timestamp)
Deprecated. As of hbase 0.20.0, replaced by getScanner(Scan) |
Scanner |
getScanner(byte[][] columns,
byte[] startRow,
long timestamp,
RowFilterInterface filter)
Deprecated. As of hbase 0.20.0, replaced by getScanner(Scan) |
Scanner |
getScanner(byte[][] columns,
byte[] startRow,
RowFilterInterface filter)
Deprecated. As of hbase 0.20.0, replaced by getScanner(Scan) |
ResultScanner |
getScanner(byte[] family,
byte[] qualifier)
Get a scanner on the current table as specified by the Scan object |
ResultScanner |
getScanner(Scan scan)
Get a scanner on the current table as specified by the Scan object |
Scanner |
getScanner(String[] columns)
Deprecated. As of hbase 0.20.0, replaced by getScanner(Scan) |
Scanner |
getScanner(String[] columns,
String startRow)
Deprecated. As of hbase 0.20.0, replaced by getScanner(Scan) |
Scanner |
getScanner(String[] columns,
String startRow,
long timestamp,
RowFilterInterface filter)
Deprecated. As of hbase 0.20.0, replaced by getScanner(Scan) |
Scanner |
getScanner(String[] columns,
String startRow,
String stopRow,
long timestamp)
Deprecated. As of hbase 0.20.0, replaced by getScanner(Scan) |
int |
getScannerCaching()
Get the number of rows for caching that will be passed to scanners |
Pair<byte[][],byte[][]> |
getStartEndKeys()
Gets the starting and ending row keys for every region in the currently open table |
byte[][] |
getStartKeys()
Gets the starting row key for every region in the currently open table |
HTableDescriptor |
getTableDescriptor()
|
byte[] |
getTableName()
|
long |
getWriteBufferSize()
Get the maximum size in bytes of the write buffer for this HTable |
long |
incrementColumnValue(byte[] row,
byte[] family,
byte[] qualifier,
long amount)
Atomically increments a column value. |
long |
incrementColumnValue(byte[] row,
byte[] family,
byte[] qualifier,
long amount,
boolean writeToWAL)
Atomically increments a column value. |
boolean |
isAutoFlush()
Get the value of autoFlush. |
static boolean |
isTableEnabled(byte[] tableName)
|
static boolean |
isTableEnabled(HBaseConfiguration conf,
byte[] tableName)
|
static boolean |
isTableEnabled(HBaseConfiguration conf,
String tableName)
|
static boolean |
isTableEnabled(String tableName)
|
RowLock |
lockRow(byte[] row)
Obtain a row lock |
void |
put(List<Put> puts)
Commit a List of Puts to the table. |
void |
put(Put put)
Commit a Put to the table. |
void |
setAutoFlush(boolean autoFlush)
Set if this instanciation of HTable will autoFlush |
void |
setScannerCaching(int scannerCaching)
Set the number of rows for caching that will be passed to scanners |
void |
setWriteBufferSize(long writeBufferSize)
Set the size of the buffer in bytes. |
void |
unlockRow(RowLock rl)
Release a row lock |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected final int scannerTimeout
protected int scannerCaching
Constructor Detail |
---|
public HTable(String tableName) throws IOException
tableName
- name of the table
IOException
public HTable(byte[] tableName) throws IOException
tableName
- name of the table
IOException
public HTable(HBaseConfiguration conf, String tableName) throws IOException
conf
- configuration objecttableName
- name of the table
IOException
public HTable(HBaseConfiguration conf, byte[] tableName) throws IOException
conf
- configuration objecttableName
- name of the table
IOException
Method Detail |
---|
public static boolean isTableEnabled(String tableName) throws IOException
tableName
- name of table to check
IOException
public static boolean isTableEnabled(byte[] tableName) throws IOException
tableName
- name of table to check
IOException
public static boolean isTableEnabled(HBaseConfiguration conf, String tableName) throws IOException
conf
- HBaseConfiguration objecttableName
- name of table to check
IOException
public static boolean isTableEnabled(HBaseConfiguration conf, byte[] tableName) throws IOException
conf
- HBaseConfiguration objecttableName
- name of table to check
IOException
public HRegionLocation getRegionLocation(String row) throws IOException
row
- Row to find.
IOException
public HRegionLocation getRegionLocation(byte[] row) throws IOException
row
- Row to find.
IOException
public byte[] getTableName()
public HConnection getConnection()
public int getScannerCaching()
public void setScannerCaching(int scannerCaching)
scannerCaching
- the number of rows for cachingpublic HTableDescriptor getTableDescriptor() throws IOException
IOException
public byte[][] getStartKeys() throws IOException
IOException
public byte[][] getEndKeys() throws IOException
IOException
public Pair<byte[][],byte[][]> getStartEndKeys() throws IOException
IOException
public Map<HRegionInfo,HServerAddress> getRegionsInfo() throws IOException
IOException
public Result getRowOrBefore(byte[] row, byte[] family) throws IOException
row
- row keyfamily
- Column family to look for row in.
IOException
public RowResult getClosestRowBefore(byte[] row, byte[] family) throws IOException
getRowOrBefore(byte[], byte[])
row
- row keyfamily
- Column family to look for row in.
IOException
public ResultScanner getScanner(Scan scan) throws IOException
Scan
object
scan
- a configured Scan
object
IOException
public ResultScanner getScanner(byte[] family) throws IOException
Scan
object
family
- The column family to scan.
IOException
public ResultScanner getScanner(byte[] family, byte[] qualifier) throws IOException
Scan
object
family
- The column family to scan.qualifier
- The column qualifier to scan.
IOException
public Result get(Get get) throws IOException
get
- the Get to fetch
IOException
public void delete(Delete delete) throws IOException
delete
-
IOException
public void put(Put put) throws IOException
If autoFlush is false, the update is buffered.
put
-
IOException
public void put(List<Put> puts) throws IOException
If autoFlush is false, the update is buffered.
puts
-
IOException
public long incrementColumnValue(byte[] row, byte[] family, byte[] qualifier, long amount) throws IOException
row
- family
- qualifier
- amount
-
IOException
public long incrementColumnValue(byte[] row, byte[] family, byte[] qualifier, long amount, boolean writeToWAL) throws IOException
Setting writeToWAL to false means that in a fail scenario, you will lose any increments that have not been flushed.
row
- family
- qualifier
- amount
- writeToWAL
- true if increment should be applied to WAL, false if not
IOException
public boolean checkAndPut(byte[] row, byte[] family, byte[] qualifier, byte[] value, Put put) throws IOException
row
- family
- qualifier
- value
- the expected valueput
-
IOException
public boolean exists(Get get) throws IOException
This will return true if the Get matches one or more keys, false if not.
This is a server-side call so it prevents any data from being transfered to the client.
get
-
IOException
public void flushCommits() throws IOException
IOException
public void close() throws IOException
IOException
public RowLock lockRow(byte[] row) throws IOException
row
- The row to lock
IOException
public void unlockRow(RowLock rl) throws IOException
rl
- The row lock to release
IOException
public boolean isAutoFlush()
public void setAutoFlush(boolean autoFlush)
autoFlush
- public long getWriteBufferSize()
public void setWriteBufferSize(long writeBufferSize) throws IOException
writeBufferSize
-
IOException
public Cell get(String row, String column) throws IOException
get(Get)
row
- row keycolumn
- column name
IOException
public Cell[] get(String row, String column, int numVersions) throws IOException
get(Get)
row
- row keycolumn
- column namenumVersions
- - number of versions to retrieve
IOException
public Cell get(byte[] row, byte[] column) throws IOException
get(Get)
row
- row keycolumn
- column name
IOException
public Cell[] get(byte[] row, byte[] column, int numVersions) throws IOException
get(Get)
row
- row keycolumn
- column namenumVersions
- number of versions to retrieve
IOException
public Cell[] get(String row, String column, long timestamp, int numVersions) throws IOException
get(Get)
row
- - row keycolumn
- - column nametimestamp
- - timestampnumVersions
- - number of versions to retrieve
IOException
public Cell[] get(byte[] row, byte[] column, long timestamp, int numVersions) throws IOException
get(Get)
row
- - row keycolumn
- - column nametimestamp
- - timestampnumVersions
- - number of versions to retrieve
IOException
public RowResult getRow(String row) throws IOException
get(Get)
row
- row key
null
if row does not exist.
IOException
public RowResult getRow(byte[] row) throws IOException
get(Get)
row
- row key
null
if row does not exist.
IOException
public RowResult getRow(String row, int numVersions) throws IOException
get(Get)
row
- row keynumVersions
- number of versions to return
null
if row does not exist.
IOException
public RowResult getRow(byte[] row, int numVersions) throws IOException
get(Get)
row
- row keynumVersions
- number of versions to return
null
if row does not exist.
IOException
public RowResult getRow(String row, long ts) throws IOException
get(Get)
row
- row keyts
- timestamp
null
if row does not exist.
IOException
public RowResult getRow(byte[] row, long ts) throws IOException
get(Get)
row
- row keyts
- timestamp
null
if row does not exist.
IOException
public RowResult getRow(String row, long ts, int numVersions) throws IOException
get(Get)
row
- row keyts
- timestampnumVersions
- number of versions to return
null
if row does not exist.
IOException
public RowResult getRow(byte[] row, long timestamp, int numVersions) throws IOException
get(Get)
row
- row keytimestamp
- timestampnumVersions
- number of versions to return
null
if row does not exist.
IOException
public RowResult getRow(String row, String[] columns) throws IOException
get(Get)
row
- row keycolumns
- Array of column names and families you want to retrieve.
null
if row does not exist.
IOException
public RowResult getRow(byte[] row, byte[][] columns) throws IOException
get(Get)
row
- row keycolumns
- Array of column names and families you want to retrieve.
null
if row does not exist.
IOException
public RowResult getRow(String row, String[] columns, int numVersions) throws IOException
get(Get)
row
- row keycolumns
- Array of column names and families you want to retrieve.numVersions
- number of versions to return
null
if row does not exist.
IOException
public RowResult getRow(byte[] row, byte[][] columns, int numVersions) throws IOException
get(Get)
row
- row keycolumns
- Array of column names and families you want to retrieve.numVersions
- number of versions to return
null
if row does not exist.
IOException
public RowResult getRow(String row, String[] columns, long ts) throws IOException
get(Get)
row
- row keycolumns
- Array of column names and families you want to retrieve.ts
- timestamp
null
if row does not exist.
IOException
public RowResult getRow(byte[] row, byte[][] columns, long ts) throws IOException
get(Get)
row
- row keycolumns
- Array of column names and families you want to retrieve.ts
- timestamp
null
if row does not exist.
IOException
public RowResult getRow(String row, String[] columns, long timestamp, int numVersions, RowLock rowLock) throws IOException
get(Get)
row
- row keycolumns
- Array of column names and families you want to retrieve.numVersions
- number of versions to returnrowLock
- previously acquired row lock
null
if row does not exist.
IOException
public RowResult getRow(byte[] row, byte[][] columns, long ts, int numVersions, RowLock rl) throws IOException
get(Get)
row
- row keycolumns
- Array of column names and families you want to retrieve.ts
- timestampnumVersions
- rl
- row lock
null
if row does not exist.
IOException
public Scanner getScanner(String[] columns) throws IOException
getScanner(Scan)
columns
- 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 in the column qualifier. A column qualifier is judged to
be a regex if it contains at least one of the following characters:
\+|^&*$[]]}{)(
.
IOException
public Scanner getScanner(String[] columns, String startRow) throws IOException
getScanner(Scan)
columns
- 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 in the column qualifier. A column qualifier is judged to
be a regex if it contains at least one of the following characters:
\+|^&*$[]]}{)(
.startRow
- starting row in table to scan
IOException
public Scanner getScanner(byte[][] columns) throws IOException
getScanner(Scan)
columns
- 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 in the column qualifier. A column qualifier is judged to
be a regex if it contains at least one of the following characters:
\+|^&*$[]]}{)(
.
IOException
public Scanner getScanner(byte[][] columns, byte[] startRow) throws IOException
getScanner(Scan)
columns
- 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 in the column qualifier. A column qualifier is judged to
be a regex if it contains at least one of the following characters:
\+|^&*$[]]}{)(
.startRow
- starting row in table to scan
IOException
public Scanner getScanner(byte[][] columns, byte[] startRow, long timestamp) throws IOException
getScanner(Scan)
columns
- 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 in the column qualifier. A column qualifier is judged to
be a regex if it contains at least one of the following characters:
\+|^&*$[]]}{)(
.startRow
- starting row in table to scantimestamp
- only return results whose timestamp <= this value
IOException
public Scanner getScanner(byte[][] columns, byte[] startRow, RowFilterInterface filter) throws IOException
getScanner(Scan)
columns
- 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 in the column qualifier. A column qualifier is judged to
be a regex if it contains at least one of the following characters:
\+|^&*$[]]}{)(
.startRow
- starting row in table to scanfilter
- a row filter using row-key regexp and/or column data filter.
IOException
public Scanner getScanner(byte[][] columns, byte[] startRow, byte[] stopRow) throws IOException
getScanner(Scan)
stopRow.
Return the specified columns.
- Parameters:
columns
- 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 in the column qualifier. A column qualifier is judged to
be a regex if it contains at least one of the following characters:
\+|^&*$[]]}{)(
.startRow
- starting row in table to scanstopRow
- Row to stop scanning on. Once we hit this row we stop
returning values; i.e. we return the row before this one but not the
stopRow
itself.
- Returns:
- scanner
- Throws:
IOException
public Scanner getScanner(String[] columns, String startRow, String stopRow, long timestamp) throws IOException
getScanner(Scan)
stopRow.
Return the specified columns.
- Parameters:
columns
- 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 in the column qualifier. A column qualifier is judged to
be a regex if it contains at least one of the following characters:
\+|^&*$[]]}{)(
.startRow
- starting row in table to scanstopRow
- Row to stop scanning on. Once we hit this row we stop
returning values; i.e. we return the row before this one but not the
stopRow
itself.timestamp
- only return results whose timestamp <= this value
- Returns:
- scanner
- Throws:
IOException
public Scanner getScanner(byte[][] columns, byte[] startRow, byte[] stopRow, long timestamp) throws IOException
getScanner(Scan)
stopRow.
Return the specified columns.
- Parameters:
columns
- 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 in the column qualifier. A column qualifier is judged to
be a regex if it contains at least one of the following characters:
\+|^&*$[]]}{)(
.startRow
- starting row in table to scanstopRow
- Row to stop scanning on. Once we hit this row we stop
returning values; i.e. we return the row before this one but not the
stopRow
itself.timestamp
- only return results whose timestamp <= this value
- Returns:
- scanner
- Throws:
IOException
public Scanner getScanner(String[] columns, String startRow, long timestamp, RowFilterInterface filter) throws IOException
getScanner(Scan)
columns
- 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 in the column qualifier. A column qualifier is judged to
be a regex if it contains at least one of the following characters:
\+|^&*$[]]}{)(
.startRow
- starting row in table to scantimestamp
- only return results whose timestamp <= this valuefilter
- a row filter using row-key regexp and/or column data filter.
IOException
public Scanner getScanner(byte[][] columns, byte[] startRow, long timestamp, RowFilterInterface filter) throws IOException
getScanner(Scan)
columns
- 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 in the column qualifier. A column qualifier is judged to
be a regex if it contains at least one of the following characters:
\+|^&*$[]]}{)(
.startRow
- starting row in table to scantimestamp
- only return results whose timestamp <= this valuefilter
- a row filter using row-key regexp and/or column data filter.
IOException
public void deleteAll(byte[] row) throws IOException
delete(Delete)
row
- Key of the row you want to completely delete.
IOException
public void deleteAll(String row) throws IOException
delete(Delete)
row
- Key of the row you want to completely delete.
IOException
public void deleteAll(byte[] row, byte[] column) throws IOException
delete(Delete)
row
- Key of the row you want to completely delete.column
- column to be deleted
IOException
public void deleteAll(byte[] row, long ts) throws IOException
delete(Delete)
row
- Key of the row you want to completely delete.ts
- Delete all cells of the same timestamp or older.
IOException
public void deleteAll(String row, long ts) throws IOException
delete(Delete)
row
- Key of the row you want to completely delete.ts
- Delete all cells of the same timestamp or older.
IOException
public void deleteAll(String row, String column) throws IOException
delete(Delete)
row
- Row to updatecolumn
- name of column whose value is to be deleted
IOException
public void deleteAll(String row, String column, long ts) throws IOException
delete(Delete)
row
- Row to updatecolumn
- name of column whose value is to be deletedts
- Delete all cells of the same timestamp or older.
IOException
public void deleteAll(byte[] row, byte[] column, long ts) throws IOException
delete(Delete)
row
- Row to updatecolumn
- name of column whose value is to be deletedts
- Delete all cells of the same timestamp or older.
IOException
public void deleteAll(byte[] row, byte[] column, long ts, RowLock rl) throws IOException
delete(Delete)
row
- Row to updatecolumn
- name of column whose value is to be deletedts
- Delete all cells of the same timestamp or older.rl
- Existing row lock
IOException
public void deleteAllByRegex(String row, String colRegex) throws IOException
delete(Delete)
row
- Row to updatecolRegex
- column regex expression
IOException
public void deleteAllByRegex(String row, String colRegex, long ts) throws IOException
delete(Delete)
row
- Row to updatecolRegex
- Column Regex expressionts
- Delete all cells of the same timestamp or older.
IOException
public void deleteAllByRegex(byte[] row, String colRegex, long ts) throws IOException
delete(Delete)
row
- Row to updatecolRegex
- Column Regex expressionts
- Delete all cells of the same timestamp or older.
IOException
public void deleteAllByRegex(byte[] row, String colRegex, long ts, RowLock rl) throws IOException
delete(Delete)
row
- Row to updatecolRegex
- Column regex expressionts
- Delete all cells of the same timestamp or older.rl
- Existing row lock
IOException
public void deleteFamily(String row, String family) throws IOException
delete(Delete)
row
- The row to operate onfamily
- The column family to match
IOException
public void deleteFamily(byte[] row, byte[] family) throws IOException
delete(Delete)
row
- The row to operate onfamily
- The column family to match
IOException
public void deleteFamily(String row, String family, long timestamp) throws IOException
delete(Delete)
row
- The row to operate onfamily
- The column family to matchtimestamp
- Timestamp to match
IOException
public void deleteFamily(byte[] row, byte[] family, long timestamp) throws IOException
delete(Delete)
row
- The row to operate onfamily
- The column family to matchtimestamp
- Timestamp to match
IOException
public void deleteFamily(byte[] row, byte[] family, long timestamp, RowLock rl) throws IOException
delete(Delete)
row
- The row to operate onfamily
- The column family to matchtimestamp
- Timestamp to matchrl
- Existing row lock
IOException
public void deleteFamilyByRegex(String row, String familyRegex) throws IOException
delete(Delete)
row
- The row to operate onfamilyRegex
- Column family regex
IOException
public void deleteFamilyByRegex(byte[] row, String familyRegex) throws IOException
delete(Delete)
row
- The row to operate onfamilyRegex
- Column family regex
IOException
public void deleteFamilyByRegex(String row, String familyRegex, long timestamp) throws IOException
delete(Delete)
row
- The row to operate onfamilyRegex
- Column family regextimestamp
- Timestamp to match
IOException
public void deleteFamilyByRegex(byte[] row, String familyRegex, long timestamp) throws IOException
delete(Delete)
row
- The row to operate onfamilyRegex
- Column family regextimestamp
- Timestamp to match
IOException
public void deleteFamilyByRegex(byte[] row, String familyRegex, long timestamp, RowLock r1) throws IOException
delete(Delete)
row
- The row to operate onfamilyRegex
- Column Family Regextimestamp
- Timestamp to matchr1
- Existing row lock
IOException
public boolean exists(byte[] row) throws IOException
exists(Get)
row
- The row
IOException
public boolean exists(byte[] row, byte[] column) throws IOException
exists(Get)
row
- The rowcolumn
- The column
IOException
public boolean exists(byte[] row, byte[] column, long timestamp) throws IOException
exists(Get)
row
- The rowcolumn
- The columntimestamp
- The timestamp
IOException
public boolean exists(byte[] row, byte[] column, long timestamp, RowLock rl) throws IOException
exists(Get)
row
- The rowcolumn
- The columntimestamp
- The timestamprl
- Existing row lock
IOException
public void commit(BatchUpdate batchUpdate) throws IOException
delete(Delete)
or
put(Put)
batchUpdate
-
IOException
public void commit(BatchUpdate batchUpdate, RowLock rl) throws IOException
delete(Delete)
or
put(Put)
batchUpdate
- rl
- Existing row lock
IOException
public void commit(List<BatchUpdate> batchUpdates) throws IOException
delete(Delete)
or
put(List)
batchUpdates
-
IOException
public boolean checkAndSave(BatchUpdate batchUpdate, HbaseMapWritable<byte[],byte[]> expectedValues, RowLock rl) throws IOException
checkAndPut(byte[], byte[], byte[], byte[], org.apache.hadoop.hbase.client.Put)
This operation is not currently supported, use checkAndPut(byte[], byte[], byte[], byte[], org.apache.hadoop.hbase.client.Put)
batchUpdate
- batchupdate to apply if check is successfulexpectedValues
- values to checkrl
- rowlock
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |