public final class GetRequest extends HBaseRpc implements HBaseRpc.HasTable, HBaseRpc.HasKey, HBaseRpc.HasFamily, HBaseRpc.HasQualifiers
byte arrays in argumentbyte[] in argument will copy it.
For more info, please refer to the documentation of HBaseRpc.
Strings in argumentHBaseRpc.HasFamily, HBaseRpc.HasKey, HBaseRpc.HasQualifier, HBaseRpc.HasQualifiers, HBaseRpc.HasTable, HBaseRpc.HasTimestamp, HBaseRpc.HasValue, HBaseRpc.HasValues| Constructor and Description |
|---|
GetRequest(byte[] table,
byte[] key)
Constructor.
|
GetRequest(byte[] table,
byte[] key,
byte[] family)
Constructor.
|
GetRequest(byte[] table,
byte[] key,
byte[] family,
byte[] qualifier)
Constructor.
|
GetRequest(String table,
byte[] key)
Constructor.
|
GetRequest(String table,
String key)
Constructor.
|
GetRequest(String table,
String key,
String family)
Constructor.
|
GetRequest(String table,
String key,
String family,
String qualifier)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
clearFilter()
Clears any filter that was previously set on this get request.
|
byte[] |
family()
Returns the family this RPC is for.
|
GetRequest |
family(byte[] family)
Specifies a particular column family to get.
|
GetRequest |
family(String family)
Specifies a particular column family to get.
|
ScanFilter |
getFilter()
Returns the possibly-
null filter applied to cells in this row. |
long |
getMaxTimestamp()
Returns the maximum timestamp to scan (exclusive).
|
long |
getMinTimestamp()
Returns the minimum timestamp to scan (inclusive).
|
byte[] |
key()
Returns the row key this RPC is for.
|
int |
maxVersions()
Returns the maximum number of versions to return for each cell scanned.
|
GetRequest |
maxVersions(int versions)
Sets the maximum number of versions to return for each cell read.
|
GetRequest |
qualifier(byte[] qualifier)
Specifies a particular column qualifier to get.
|
GetRequest |
qualifier(String qualifier)
Specifies a particular column qualifier to get.
|
byte[][] |
qualifiers()
Returns the column qualifiers this RPC is for.
|
GetRequest |
qualifiers(byte[][] qualifiers)
Specifies a particular set of column qualifiers to get.
|
void |
setBufferable(boolean bufferable)
Sets whether or not this RPC is can be buffered on the client side.
|
void |
setDurable(boolean durable)
Changes the durability setting of this edit.
|
GetRequest |
setFilter(ScanFilter filter)
Specifies the filter to apply to cells in this row.
|
GetRequest |
setMaxTimestamp(long timestamp)
Sets the maximum timestamp to scan (exclusive).
|
GetRequest |
setMinTimestamp(long timestamp)
Sets the minimum timestamp to scan (inclusive).
|
void |
setServerBlockCache(boolean populate_blockcache) |
GetRequest |
setTimeRange(long min_timestamp,
long max_timestamp)
Sets the time range to scan.
|
byte[] |
table()
Returns the name of the table this RPC is for.
|
long |
timestamp()
Returns the strictly positive timestamp contained in this RPC.
|
String |
toString() |
GetRequest |
withRowLock(RowLock lock)
Specifies an explicit row lock to use with this request.
|
failfast, getTimeout, isProbe, isTraceRPC, setFailfast, setProbe, setTimeout, setTraceRPCclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitfamilypublic GetRequest(byte[] table,
byte[] key)
table - The non-empty name of the table to use.key - The row key to get in that table.public GetRequest(String table, byte[] key)
table - The non-empty name of the table to use.key - The row key to get in that table.
This byte array will NOT be copied.public GetRequest(String table, String key)
table - The non-empty name of the table to use.key - The row key to get in that table.public GetRequest(byte[] table,
byte[] key,
byte[] family)
table - The non-empty name of the table to use.key - The row key to get in that table.family - The column family.public GetRequest(String table, String key, String family)
table - The non-empty name of the table to use.key - The row key to get in that table.family - The column family.public GetRequest(byte[] table,
byte[] key,
byte[] family,
byte[] qualifier)
table - The non-empty name of the table to use.key - The row key to get in that table.family - The column family.qualifier - The column qualifier.public GetRequest family(byte[] family)
family - The column family.
This byte array will NOT be copied.this, always.public GetRequest family(String family)
public GetRequest qualifier(byte[] qualifier)
qualifier - The column qualifier.
This byte array will NOT be copied.this, always.public GetRequest qualifiers(byte[][] qualifiers)
qualifiers - The column qualifiers.
This byte array will NOT be copied.this, always.public GetRequest qualifier(String qualifier)
public GetRequest withRowLock(RowLock lock)
public GetRequest maxVersions(int versions)
By default only the most recent version of each cell is read.
If you want to get all possible versions available, pass
Integer.MAX_VALUE in argument.
versions - A strictly positive number of versions to return.this, always.IllegalArgumentException - if versions <= 0public int maxVersions()
public GetRequest setMinTimestamp(long timestamp)
KeyValues that have a timestamp strictly less than this one
will not be returned by the scanner. HBase has internal optimizations to
avoid loading in memory data filtered out in some cases.
timestamp - The minimum timestamp to scan (inclusive).IllegalArgumentException - if timestamp < 0.IllegalArgumentException - if timestamp > getMaxTimestamp().setTimeRange(long, long)public long getMinTimestamp()
public GetRequest setMaxTimestamp(long timestamp)
KeyValues that have a timestamp greater than or equal to this one
will not be returned by the scanner. HBase has internal optimizations to
avoid loading in memory data filtered out in some cases.
timestamp - The maximum timestamp to scan (exclusive).IllegalArgumentException - if timestamp < 0.IllegalArgumentException - if timestamp < getMinTimestamp().setTimeRange(long, long)public long getMaxTimestamp()
public GetRequest setTimeRange(long min_timestamp, long max_timestamp)
KeyValues that have a timestamp that do not fall in the range
[min_timestamp; max_timestamp[ will not be returned by the
scanner. HBase has internal optimizations to avoid loading in memory
data filtered out in some cases.
min_timestamp - The minimum timestamp to scan (inclusive).max_timestamp - The maximum timestamp to scan (exclusive).IllegalArgumentException - if min_timestamp < 0IllegalArgumentException - if max_timestamp < 0IllegalArgumentException - if min_timestamp > max_timestamppublic GetRequest setFilter(ScanFilter filter)
filter - The filter. If null, then no filter will be used.public ScanFilter getFilter()
null filter applied to cells in this row.public void clearFilter()
This is a shortcut for setFilter(org.hbase.async.ScanFilter)(null)
public byte[] table()
HBaseRpc.HasTableDO NOT MODIFY THE CONTENTS OF THE ARRAY RETURNED.
table in interface HBaseRpc.HasTablepublic byte[] key()
HBaseRpc.HasKeyDO NOT MODIFY THE CONTENTS OF THE ARRAY RETURNED.
key in interface HBaseRpc.HasKeypublic byte[][] qualifiers()
HBaseRpc.HasQualifiersDO NOT MODIFY THE CONTENTS OF THE ARRAY RETURNED.
qualifiers in interface HBaseRpc.HasQualifierspublic void setServerBlockCache(boolean populate_blockcache)
public final void setBufferable(boolean bufferable)
true.
Setting this to false bypasses the client-side buffering, which
is used to send RPCs in batches for greater throughput, and causes this
RPC to be sent directly to the server.
bufferable - Whether or not this RPC can be buffered (i.e. delayed)
before being sent out to HBase.HBaseClient.setFlushInterval(short)public final void setDurable(boolean durable)
true.
Make sure you've read and understood the
data durability section before
setting this to false.durable - Whether or not this edit should be stored with data
durability guarantee.public final byte[] family()
HBaseRpc.HasFamilyDO NOT MODIFY THE CONTENTS OF THE ARRAY RETURNED.
family in interface HBaseRpc.HasFamilypublic final long timestamp()
HBaseRpc.HasTimestamptimestamp in interface HBaseRpc.HasTimestampCopyright © 2010-2017, The Async HBase Authors