|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.hadoop.hbase.client.Operation
org.apache.hadoop.hbase.client.OperationWithAttributes
org.apache.hadoop.hbase.client.Mutation
org.apache.hadoop.hbase.client.Put
public class Put
Used to perform Put operations for a single row.
To perform a Put, instantiate a Put object with the row to insert to and
for each column to be inserted, execute add or
add if setting the timestamp.
| Field Summary |
|---|
| Fields inherited from class org.apache.hadoop.hbase.client.Mutation |
|---|
familyMap, lockId, row, ts, writeToWAL |
| Constructor Summary | |
|---|---|
Put()
Constructor for Writable. |
|
Put(byte[] row)
Create a Put operation for the specified row. |
|
Put(byte[] row,
long ts)
Create a Put operation for the specified row, using a given timestamp. |
|
Put(byte[] row,
long ts,
RowLock rowLock)
Create a Put operation for the specified row, using a given timestamp, and an existing row lock. |
|
Put(byte[] row,
RowLock rowLock)
Create a Put operation for the specified row, using an existing row lock. |
|
Put(Put putToCopy)
Copy constructor. |
|
| Method Summary | |
|---|---|
Put |
add(byte[] family,
byte[] qualifier,
byte[] value)
Add the specified column and value to this Put operation. |
Put |
add(byte[] family,
byte[] qualifier,
long ts,
byte[] value)
Add the specified column and value, with the specified timestamp as its version to this Put operation. |
Put |
add(KeyValue kv)
Add the specified KeyValue to this Put operation. |
List<KeyValue> |
get(byte[] family,
byte[] qualifier)
Returns a list of all KeyValue objects with matching column family and qualifier. |
boolean |
has(byte[] family,
byte[] qualifier)
A convenience method to determine if this object's familyMap contains a value assigned to the given family & qualifier. |
boolean |
has(byte[] family,
byte[] qualifier,
byte[] value)
A convenience method to determine if this object's familyMap contains a value assigned to the given family, qualifier and timestamp. |
boolean |
has(byte[] family,
byte[] qualifier,
long ts)
A convenience method to determine if this object's familyMap contains a value assigned to the given family, qualifier and timestamp. |
boolean |
has(byte[] family,
byte[] qualifier,
long ts,
byte[] value)
A convenience method to determine if this object's familyMap contains the given value assigned to the given family, qualifier and timestamp. |
long |
heapSize()
|
int |
numFamilies()
|
void |
readFields(DataInput in)
|
int |
size()
|
void |
write(DataOutput out)
|
| Methods inherited from class org.apache.hadoop.hbase.client.Mutation |
|---|
compareTo, getClusterId, getFamilyMap, getFingerprint, getLockId, getRow, getRowLock, getTimeStamp, getWriteToWAL, isEmpty, setClusterId, setFamilyMap, setWriteToWAL, toMap |
| Methods inherited from class org.apache.hadoop.hbase.client.OperationWithAttributes |
|---|
getAttribute, getAttributeSize, getAttributesMap, readAttributes, setAttribute, writeAttributes |
| Methods inherited from class org.apache.hadoop.hbase.client.Operation |
|---|
toJSON, toJSON, toMap, toString, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.apache.hadoop.hbase.client.Row |
|---|
getRow |
| Methods inherited from interface java.lang.Comparable |
|---|
compareTo |
| Constructor Detail |
|---|
public Put()
public Put(byte[] row)
row - row key
public Put(byte[] row,
RowLock rowLock)
row - row keyrowLock - previously acquired row lock, or null
public Put(byte[] row,
long ts)
row - row keyts - timestamp
public Put(byte[] row,
long ts,
RowLock rowLock)
row - row keyts - timestamprowLock - previously acquired row lock, or nullpublic Put(Put putToCopy)
putToCopy - put to copy| Method Detail |
|---|
public Put add(byte[] family,
byte[] qualifier,
byte[] value)
family - family namequalifier - column qualifiervalue - column value
public Put add(byte[] family,
byte[] qualifier,
long ts,
byte[] value)
family - family namequalifier - column qualifierts - version timestampvalue - column value
public Put add(KeyValue kv)
throws IOException
kv - individual KeyValue
IOException - e
public boolean has(byte[] family,
byte[] qualifier)
family - column familyqualifier - column qualifier
public boolean has(byte[] family,
byte[] qualifier,
long ts)
family - column familyqualifier - column qualifierts - timestamp
public boolean has(byte[] family,
byte[] qualifier,
byte[] value)
family - column familyqualifier - column qualifiervalue - value to check
public boolean has(byte[] family,
byte[] qualifier,
long ts,
byte[] value)
family - column familyqualifier - column qualifierts - timestampvalue - value to check
public List<KeyValue> get(byte[] family,
byte[] qualifier)
family - column familyqualifier - column qualifier
public int numFamilies()
public int size()
public long heapSize()
heapSize in interface HeapSize
public void readFields(DataInput in)
throws IOException
readFields in interface org.apache.hadoop.io.WritableIOException
public void write(DataOutput out)
throws IOException
write in interface org.apache.hadoop.io.WritableIOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||