org.apache.hadoop.hbase.client
Class Append
java.lang.Object
org.apache.hadoop.hbase.client.Operation
org.apache.hadoop.hbase.client.OperationWithAttributes
org.apache.hadoop.hbase.client.Mutation
org.apache.hadoop.hbase.client.Append
- All Implemented Interfaces:
- Comparable<Row>, Attributes, Row, org.apache.hadoop.io.Writable, org.apache.hadoop.io.WritableComparable<Row>
public class Append
- extends Mutation
Performs Append operations on a single row.
Note that this operation does not appear atomic to readers. Appends are done
under a single row lock, so write operations to a row are synchronized, but
readers do not take row locks so get and scan operations can see this
operation partially completed.
To append to a set of columns of a row, instantiate an Append object with the
row to append to. At least one column to append must be specified using the
add(byte[], byte[], byte[])
method.
Constructor Summary |
Append()
Constructor for Writable. |
Append(byte[] row)
Create a Append operation for the specified row. |
Methods inherited from class org.apache.hadoop.hbase.client.Mutation |
compareTo, getClusterId, getClusterIds, getDurability, getFamilyMap, getFingerprint, getLockId, getRow, getRowLock, getTimeStamp, getWriteToWAL, isEmpty, numFamilies, setClusterId, setClusterIds, setDurability, setFamilyMap, setWriteToWAL, size, toMap |
Append
public Append()
- Constructor for Writable. DO NOT USE
Append
public Append(byte[] row)
- Create a Append operation for the specified row.
At least one column must be appended to.
- Parameters:
row
- row key
setReturnResults
public void setReturnResults(boolean returnResults)
- Parameters:
returnResults
- True (default) if the append operation should return the results.
A client that is not interested in the result can save network
bandwidth setting this to false.
isReturnResults
public boolean isReturnResults()
- Returns:
- current setting for returnResults
add
public Append add(byte[] family,
byte[] qualifier,
byte[] value)
- Add the specified column and value to this Append operation.
- Parameters:
family
- family namequalifier
- column qualifiervalue
- value to append to specified column
- Returns:
- this
readFields
public void readFields(DataInput in)
throws IOException
- Throws:
IOException
write
public void write(DataOutput out)
throws IOException
- Throws:
IOException
Copyright © 2013 The Apache Software Foundation. All Rights Reserved.