|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.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.
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(byte[] column,
long ts,
byte[] value)
Deprecated. use add(byte[], byte[], long, byte[]) instead |
Put |
add(KeyValue kv)
Add the specified KeyValue to this Put operation. |
int |
compareTo(Row p)
|
List<KeyValue> |
get(byte[] family,
byte[] qualifier)
Returns a list of all KeyValue objects with matching column family and qualifier. |
Map<byte[],List<KeyValue>> |
getFamilyMap()
Method for retrieving the put's familyMap |
long |
getLockId()
Method for retrieving the put's lockId |
byte[] |
getRow()
Method for retrieving the put's row |
RowLock |
getRowLock()
Method for retrieving the put's RowLock |
long |
getTimeStamp()
|
boolean |
getWriteToWAL()
|
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()
|
boolean |
isEmpty()
Method to check if the familyMap is empty |
int |
numFamilies()
|
void |
readFields(DataInput in)
|
void |
setWriteToWAL(boolean write)
Set whether this Put should be written to the WAL or not. |
int |
size()
|
String |
toString()
|
void |
write(DataOutput out)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Put()
public Put(byte[] row)
row
- row keypublic Put(byte[] row, RowLock rowLock)
row
- row keyrowLock
- previously acquired row lock, or nullpublic Put(byte[] row, long ts)
row
- row keyts
- timestamppublic Put(byte[] row, long ts, RowLock rowLock)
row
- row keyts
- timestamprowLock
- previously acquired row lock, or nullpublic Put(Put putToCopy)
putToCopy
- put to copyMethod 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
- epublic 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 Map<byte[],List<KeyValue>> getFamilyMap()
public byte[] getRow()
getRow
in interface Row
public RowLock getRowLock()
public long getLockId()
public boolean isEmpty()
public long getTimeStamp()
public int numFamilies()
public int size()
public boolean getWriteToWAL()
public void setWriteToWAL(boolean write)
write
- true if edits should be written to WAL, false if notpublic String toString()
toString
in class Object
public int compareTo(Row p)
compareTo
in interface Comparable<Row>
public long heapSize()
heapSize
in interface HeapSize
public void readFields(DataInput in) throws IOException
readFields
in interface org.apache.hadoop.io.Writable
IOException
public void write(DataOutput out) throws IOException
write
in interface org.apache.hadoop.io.Writable
IOException
public Put add(byte[] column, long ts, byte[] value)
add(byte[], byte[], long, byte[])
instead
column
- Old style column name with family and qualifier put together
with a colon.ts
- version timestampvalue
- column value
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |