|
||||||||||
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,
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)
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. |
int |
compareTo(Put p)
|
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()
|
long |
heapSize()
|
boolean |
isEmpty()
Method to check if the familyMap is empty |
int |
numFamilies()
|
void |
readFields(DataInput in)
|
Put |
setTimeStamp(long timestamp)
Method for setting the timestamp |
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(Put putToCopy)
putToCopy
- put to copyMethod Detail |
---|
public Put add(byte[] family, byte[] qualifier, byte[] value)
family
- family namequalifier
- column qualifiervalue
- column valuepublic Put add(byte[] column, long ts, byte[] value)
column
- Old style column name with family and qualifier put together
with a colon.ts
- version timestampvalue
- column valuepublic Put add(byte[] family, byte[] qualifier, long ts, byte[] value)
family
- family namequalifier
- column qualifierts
- version timestampvalue
- column valuepublic Put add(KeyValue kv) throws IOException
kv
-
IOException
public Map<byte[],List<KeyValue>> getFamilyMap()
public byte[] getRow()
public RowLock getRowLock()
public long getLockId()
public boolean isEmpty()
public long getTimeStamp()
public Put setTimeStamp(long timestamp)
timestamp
- 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(Put p)
compareTo
in interface Comparable<Put>
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
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |