HADOOP-2401 Add convenience put method that takes writable
git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk/src/contrib/hbase@584844 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
920c6b2021
commit
f07a9fd89a
13
CHANGES.txt
13
CHANGES.txt
|
@ -2,6 +2,19 @@ HBase Change Log
|
||||||
|
|
||||||
|
|
||||||
Trunk (unreleased changes)
|
Trunk (unreleased changes)
|
||||||
|
INCOMPATIBLE CHANGES
|
||||||
|
|
||||||
|
NEW FEATURES
|
||||||
|
|
||||||
|
OPTIMIZATIONS
|
||||||
|
|
||||||
|
BUG FIXES
|
||||||
|
|
||||||
|
IMPROVEMENTS
|
||||||
|
HADOOP-2401 Add convenience put method that takes writable
|
||||||
|
(Johan Oskarsson via Stack)
|
||||||
|
|
||||||
|
Branch 0.15 (unreleased changes)
|
||||||
|
|
||||||
INCOMPATIBLE CHANGES
|
INCOMPATIBLE CHANGES
|
||||||
HADOOP-1931 Hbase scripts take --ARG=ARG_VALUE when should be like hadoop
|
HADOOP-1931 Hbase scripts take --ARG=ARG_VALUE when should be like hadoop
|
||||||
|
|
|
@ -35,6 +35,7 @@ import org.apache.hadoop.conf.Configuration;
|
||||||
import org.apache.hadoop.hbase.filter.RowFilterInterface;
|
import org.apache.hadoop.hbase.filter.RowFilterInterface;
|
||||||
import org.apache.hadoop.hbase.io.BatchUpdate;
|
import org.apache.hadoop.hbase.io.BatchUpdate;
|
||||||
import org.apache.hadoop.hbase.io.ImmutableBytesWritable;
|
import org.apache.hadoop.hbase.io.ImmutableBytesWritable;
|
||||||
|
import org.apache.hadoop.hbase.util.Writables;
|
||||||
import org.apache.hadoop.io.MapWritable;
|
import org.apache.hadoop.io.MapWritable;
|
||||||
import org.apache.hadoop.io.Text;
|
import org.apache.hadoop.io.Text;
|
||||||
import org.apache.hadoop.io.Writable;
|
import org.apache.hadoop.io.Writable;
|
||||||
|
@ -545,6 +546,20 @@ public class HTable implements HConstants {
|
||||||
batch.get().put(lockid, column, val);
|
batch.get().put(lockid, column, val);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Change a value for the specified column.
|
||||||
|
* Runs {@link #abort(long)} if exception thrown.
|
||||||
|
*
|
||||||
|
* @param lockid lock id returned from startUpdate
|
||||||
|
* @param column column whose value is being set
|
||||||
|
* @param val new value for column
|
||||||
|
* @throws IOException throws this if the writable can't be
|
||||||
|
* converted into a byte array
|
||||||
|
*/
|
||||||
|
public void put(long lockid, Text column, Writable val) throws IOException {
|
||||||
|
put(lockid, column, Writables.getBytes(val));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Delete the value for a column.
|
* Delete the value for a column.
|
||||||
* Deletes the cell whose row/column/commit-timestamp match those of the
|
* Deletes the cell whose row/column/commit-timestamp match those of the
|
||||||
|
|
Loading…
Reference in New Issue