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 |
|---|---|
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.
|
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.
|
byte[] |
table()
Returns the name of the table this RPC is for.
|
String |
toString() |
GetRequest |
withRowLock(RowLock lock)
Specifies an explicit row lock to use with this request.
|
failfast, setFailfastpublic 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 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[] family()
HBaseRpc.HasFamilyDO NOT MODIFY THE CONTENTS OF THE ARRAY RETURNED.
family in interface HBaseRpc.HasFamilypublic byte[][] qualifiers()
HBaseRpc.HasQualifiersDO NOT MODIFY THE CONTENTS OF THE ARRAY RETURNED.
qualifiers in interface HBaseRpc.HasQualifiers