HBASE-1231 Today, going from a RowResult to a BatchUpdate reqiures some data processing even though they are pretty much the same thing.
git-svn-id: https://svn.apache.org/repos/asf/hadoop/hbase/trunk@750777 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
7dd31ec417
commit
353c716a54
|
@ -73,6 +73,9 @@ Release 0.20.0 - Unreleased
|
||||||
HeapSize (Erik Holstad via Stack)
|
HeapSize (Erik Holstad via Stack)
|
||||||
HBASE-1230 Document installation of HBase on Windows
|
HBASE-1230 Document installation of HBase on Windows
|
||||||
HBASE-1241 HBase additions to ZooKeeper part 1 (Nitay Joffe via JD)
|
HBASE-1241 HBase additions to ZooKeeper part 1 (Nitay Joffe via JD)
|
||||||
|
HBASE-1231 Today, going from a RowResult to a BatchUpdate reqiures some
|
||||||
|
data processing even though they are pretty much the same thing
|
||||||
|
(Erik Holstad via Stack)
|
||||||
|
|
||||||
Release 0.19.0 - 01/21/2009
|
Release 0.19.0 - 01/21/2009
|
||||||
INCOMPATIBLE CHANGES
|
INCOMPATIBLE CHANGES
|
||||||
|
|
|
@ -27,10 +27,12 @@ import java.lang.management.RuntimeMXBean;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
import org.apache.commons.logging.Log;
|
import org.apache.commons.logging.Log;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.apache.commons.logging.LogFactory;
|
||||||
import org.apache.hadoop.hbase.HConstants;
|
import org.apache.hadoop.hbase.HConstants;
|
||||||
|
import org.apache.hadoop.hbase.io.RowResult;
|
||||||
import org.apache.hadoop.hbase.util.Bytes;
|
import org.apache.hadoop.hbase.util.Bytes;
|
||||||
import org.apache.hadoop.io.WritableComparable;
|
import org.apache.hadoop.io.WritableComparable;
|
||||||
|
|
||||||
|
@ -129,6 +131,18 @@ implements WritableComparable<BatchUpdate>, Iterable<BatchOperation>, HeapSize {
|
||||||
this.operations = new ArrayList<BatchOperation>();
|
this.operations = new ArrayList<BatchOperation>();
|
||||||
this.size = (row == null)? 0: row.length;
|
this.size = (row == null)? 0: row.length;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a batch operation.
|
||||||
|
* @param rr the RowResult
|
||||||
|
*/
|
||||||
|
public BatchUpdate(final RowResult rr) {
|
||||||
|
this(rr.getRow());
|
||||||
|
for(Map.Entry<byte[], Cell> entry : rr.entrySet()){
|
||||||
|
this.put(entry.getKey(), entry.getValue().getValue());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the row lock associated with this update
|
* Get the row lock associated with this update
|
||||||
* @return the row lock
|
* @return the row lock
|
||||||
|
|
Loading…
Reference in New Issue