You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by jm...@apache.org on 2013/08/09 01:50:25 UTC
svn commit: r1512102 - in /hbase/branches/0.95:
hbase-client/src/main/java/org/apache/hadoop/hbase/client/
hbase-client/src/main/java/org/apache/hadoop/hbase/protobuf/
hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/
hbase-server/src/main/...
Author: jmhsieh
Date: Thu Aug 8 23:50:25 2013
New Revision: 1512102
URL: http://svn.apache.org/r1512102
Log:
HBASE-9142 Mutation#getFamilyMap() return type change between HBase 94 and 96 breaks downstream apps
For 0.95/0.96, we need to preserve the getFamilyMap signature through a deprecation cycle. The new
method needs to be present alongside the old in 0.95, so we rename the method with the new signature
to getFamilyCellMap() in both trunk and 0.95, and restore a deprecated version of the old in 0.95.
Modified:
hbase/branches/0.95/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Delete.java
hbase/branches/0.95/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HTable.java
hbase/branches/0.95/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Increment.java
hbase/branches/0.95/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Mutation.java
hbase/branches/0.95/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Put.java
hbase/branches/0.95/hbase-client/src/main/java/org/apache/hadoop/hbase/protobuf/ProtobufUtil.java
hbase/branches/0.95/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/PutCombiner.java
hbase/branches/0.95/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/PutSortReducer.java
hbase/branches/0.95/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
hbase/branches/0.95/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/MultiRowMutationProcessor.java
hbase/branches/0.95/hbase-server/src/main/java/org/apache/hadoop/hbase/rest/client/RemoteHTable.java
hbase/branches/0.95/hbase-server/src/main/java/org/apache/hadoop/hbase/security/access/AccessController.java
hbase/branches/0.95/hbase-server/src/main/java/org/apache/hadoop/hbase/thrift2/ThriftUtilities.java
hbase/branches/0.95/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestFromClientSide.java
hbase/branches/0.95/hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/SimpleRegionObserver.java
hbase/branches/0.95/hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/TestRegionObserverBypass.java
hbase/branches/0.95/hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/TestWALObserver.java
hbase/branches/0.95/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/wal/HLogPerformanceEvaluation.java
hbase/branches/0.95/hbase-server/src/test/java/org/apache/hadoop/hbase/util/TestCoprocessorScanPolicy.java
Modified: hbase/branches/0.95/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Delete.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.95/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Delete.java?rev=1512102&r1=1512101&r2=1512102&view=diff
==============================================================================
--- hbase/branches/0.95/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Delete.java (original)
+++ hbase/branches/0.95/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Delete.java Thu Aug 8 23:50:25 2013
@@ -137,7 +137,7 @@ public class Delete extends Mutation imp
public Delete(final Delete d) {
this.row = d.getRow();
this.ts = d.getTimeStamp();
- this.familyMap.putAll(d.getFamilyMap());
+ this.familyMap.putAll(d.getFamilyCellMap());
this.durability = d.durability;
}
Modified: hbase/branches/0.95/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HTable.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.95/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HTable.java?rev=1512102&r1=1512101&r2=1512102&view=diff
==============================================================================
--- hbase/branches/0.95/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HTable.java (original)
+++ hbase/branches/0.95/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HTable.java Thu Aug 8 23:50:25 2013
@@ -1328,7 +1328,7 @@ public class HTable implements HTableInt
throw new IllegalArgumentException("No columns to insert");
}
if (maxKeyValueSize > 0) {
- for (List<? extends Cell> list : put.getFamilyMap().values()) {
+ for (List<? extends Cell> list : put.getFamilyCellMap().values()) {
for (Cell cell : list) {
// KeyValue v1 expectation. Cast for now.
KeyValue kv = KeyValueUtil.ensureKeyValue(cell);
Modified: hbase/branches/0.95/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Increment.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.95/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Increment.java?rev=1512102&r1=1512101&r2=1512102&view=diff
==============================================================================
--- hbase/branches/0.95/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Increment.java (original)
+++ hbase/branches/0.95/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Increment.java Thu Aug 8 23:50:25 2013
@@ -174,7 +174,7 @@ public class Increment extends Mutation
* @since 0.95.0
*/
public Map<byte[], NavigableMap<byte [], Long>> getFamilyMapOfLongs() {
- NavigableMap<byte[], List<? extends Cell>> map = super.getFamilyMap();
+ NavigableMap<byte[], List<? extends Cell>> map = super.getFamilyCellMap();
Map<byte [], NavigableMap<byte[], Long>> results =
new TreeMap<byte[], NavigableMap<byte [], Long>>(Bytes.BYTES_COMPARATOR);
for (Map.Entry<byte [], List<? extends Cell>> entry: map.entrySet()) {
Modified: hbase/branches/0.95/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Mutation.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.95/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Mutation.java?rev=1512102&r1=1512101&r2=1512102&view=diff
==============================================================================
--- hbase/branches/0.95/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Mutation.java (original)
+++ hbase/branches/0.95/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Mutation.java Thu Aug 8 23:50:25 2013
@@ -70,7 +70,7 @@ public abstract class Mutation extends O
@Override
public CellScanner cellScanner() {
- return CellUtil.createCellScanner(getFamilyMap());
+ return CellUtil.createCellScanner(getFamilyCellMap());
}
/**
@@ -206,11 +206,33 @@ public abstract class Mutation extends O
return Durability.SKIP_WAL != getDurability();
}
+ /*
+ * Method for retrieving the put's familyMap (family -> KeyValues)
+ * Application should use the getFamilyCellMap and the Cell interface instead of KeyValue.
+ *
+ * @return familyMap
+ */
+ @Deprecated
+ public Map<byte[], List<KeyValue>> getFamilyMap() {
+ Map<byte[], List<KeyValue>> fm = new TreeMap();
+ for (Map.Entry<byte[], List<? extends Cell>> e : this.familyMap.entrySet()) {
+ byte[] family = e.getKey();
+ List<? extends Cell> cells = e.getValue();
+ List<KeyValue> kvs = new ArrayList(cells.size());
+ for (Cell c : cells) {
+ KeyValue kv = KeyValueUtil.ensureKeyValue(c);
+ kvs.add(kv);
+ }
+ fm.put(family, kvs);
+ }
+ return fm;
+ }
+
/**
* Method for retrieving the put's familyMap
* @return familyMap
*/
- public NavigableMap<byte [], List<? extends Cell>> getFamilyMap() {
+ public NavigableMap<byte [], List<? extends Cell>> getFamilyCellMap() {
return this.familyMap;
}
Modified: hbase/branches/0.95/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Put.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.95/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Put.java?rev=1512102&r1=1512101&r2=1512102&view=diff
==============================================================================
--- hbase/branches/0.95/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Put.java (original)
+++ hbase/branches/0.95/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Put.java Thu Aug 8 23:50:25 2013
@@ -93,7 +93,7 @@ public class Put extends Mutation implem
public Put(Put putToCopy) {
this(putToCopy.getRow(), putToCopy.ts);
this.familyMap = new TreeMap<byte [], List<? extends Cell>>(Bytes.BYTES_COMPARATOR);
- for(Map.Entry<byte [], List<? extends Cell>> entry: putToCopy.getFamilyMap().entrySet()) {
+ for(Map.Entry<byte [], List<? extends Cell>> entry: putToCopy.getFamilyCellMap().entrySet()) {
this.familyMap.put(entry.getKey(), entry.getValue());
}
this.durability = putToCopy.durability;
Modified: hbase/branches/0.95/hbase-client/src/main/java/org/apache/hadoop/hbase/protobuf/ProtobufUtil.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.95/hbase-client/src/main/java/org/apache/hadoop/hbase/protobuf/ProtobufUtil.java?rev=1512102&r1=1512101&r2=1512102&view=diff
==============================================================================
--- hbase/branches/0.95/hbase-client/src/main/java/org/apache/hadoop/hbase/protobuf/ProtobufUtil.java (original)
+++ hbase/branches/0.95/hbase-client/src/main/java/org/apache/hadoop/hbase/protobuf/ProtobufUtil.java Thu Aug 8 23:50:25 2013
@@ -927,7 +927,7 @@ public final class ProtobufUtil {
}
ColumnValue.Builder columnBuilder = ColumnValue.newBuilder();
QualifierValue.Builder valueBuilder = QualifierValue.newBuilder();
- for (Map.Entry<byte[], List<? extends Cell>> family: increment.getFamilyMap().entrySet()) {
+ for (Map.Entry<byte[], List<? extends Cell>> family: increment.getFamilyCellMap().entrySet()) {
columnBuilder.setFamily(ByteString.copyFrom(family.getKey()));
columnBuilder.clearQualifierValue();
List<? extends Cell> values = family.getValue();
@@ -957,7 +957,7 @@ public final class ProtobufUtil {
MutationProto.Builder builder = getMutationBuilderAndSetCommonFields(type, mutation);
ColumnValue.Builder columnBuilder = ColumnValue.newBuilder();
QualifierValue.Builder valueBuilder = QualifierValue.newBuilder();
- for (Map.Entry<byte[],List<? extends Cell>> family: mutation.getFamilyMap().entrySet()) {
+ for (Map.Entry<byte[],List<? extends Cell>> family: mutation.getFamilyCellMap().entrySet()) {
columnBuilder.setFamily(ByteString.copyFrom(family.getKey()));
columnBuilder.clearQualifierValue();
for (Cell cell: family.getValue()) {
Modified: hbase/branches/0.95/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/PutCombiner.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.95/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/PutCombiner.java?rev=1512102&r1=1512101&r2=1512102&view=diff
==============================================================================
--- hbase/branches/0.95/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/PutCombiner.java (original)
+++ hbase/branches/0.95/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/PutCombiner.java Thu Aug 8 23:50:25 2013
@@ -61,9 +61,9 @@ public class PutCombiner<K> extends Redu
cnt++;
if (put == null) {
put = p;
- familyMap = put.getFamilyMap();
+ familyMap = put.getFamilyCellMap();
} else {
- for (Entry<byte[], List<? extends Cell>> entry : p.getFamilyMap()
+ for (Entry<byte[], List<? extends Cell>> entry : p.getFamilyCellMap()
.entrySet()) {
List<? extends Cell> cells = familyMap.get(entry.getKey());
List<KeyValue> kvs = (cells != null) ? (List<KeyValue>) cells : null;
Modified: hbase/branches/0.95/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/PutSortReducer.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.95/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/PutSortReducer.java?rev=1512102&r1=1512101&r2=1512102&view=diff
==============================================================================
--- hbase/branches/0.95/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/PutSortReducer.java (original)
+++ hbase/branches/0.95/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/PutSortReducer.java Thu Aug 8 23:50:25 2013
@@ -63,7 +63,7 @@ public class PutSortReducer extends
// stop at the end or the RAM threshold
while (iter.hasNext() && curSize < threshold) {
Put p = iter.next();
- for (List<? extends Cell> cells: p.getFamilyMap().values()) {
+ for (List<? extends Cell> cells: p.getFamilyCellMap().values()) {
for (Cell cell: cells) {
KeyValue kv = KeyValueUtil.ensureKeyValue(cell);
map.add(kv);
Modified: hbase/branches/0.95/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.95/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java?rev=1512102&r1=1512101&r2=1512102&view=diff
==============================================================================
--- hbase/branches/0.95/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java (original)
+++ hbase/branches/0.95/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java Thu Aug 8 23:50:25 2013
@@ -1751,13 +1751,13 @@ public class HRegion implements HeapSize
*/
void prepareDelete(Delete delete) throws IOException {
// Check to see if this is a deleteRow insert
- if(delete.getFamilyMap().isEmpty()){
+ if(delete.getFamilyCellMap().isEmpty()){
for(byte [] family : this.htableDescriptor.getFamiliesKeys()){
// Don't eat the timestamp
delete.deleteFamily(family, delete.getTimeStamp());
}
} else {
- for(byte [] family : delete.getFamilyMap().keySet()) {
+ for(byte [] family : delete.getFamilyCellMap().keySet()) {
if(family == null) {
throw new NoSuchColumnFamilyException("Empty family is invalid");
}
@@ -2043,7 +2043,7 @@ public class HRegion implements HeapSize
Mutation mutation = batchOp.operations[lastIndexExclusive];
boolean isPutMutation = mutation instanceof Put;
- Map<byte[], List<? extends Cell>> familyMap = mutation.getFamilyMap();
+ Map<byte[], List<? extends Cell>> familyMap = mutation.getFamilyCellMap();
// store the family map reference to allow for mutations
familyMaps[lastIndexExclusive] = familyMap;
@@ -2062,7 +2062,7 @@ public class HRegion implements HeapSize
} else {
checkFamilies(familyMap.keySet());
}
- checkTimestamps(mutation.getFamilyMap(), now);
+ checkTimestamps(mutation.getFamilyCellMap(), now);
} else {
prepareDelete((Delete) mutation);
}
@@ -2106,17 +2106,17 @@ public class HRegion implements HeapSize
// individual puts then metrics can be reported as a mutliput across
// column families in the first put.
if (putsCfSet == null) {
- putsCfSet = mutation.getFamilyMap().keySet();
+ putsCfSet = mutation.getFamilyCellMap().keySet();
} else {
putsCfSetConsistent = putsCfSetConsistent
- && mutation.getFamilyMap().keySet().equals(putsCfSet);
+ && mutation.getFamilyCellMap().keySet().equals(putsCfSet);
}
} else {
if (deletesCfSet == null) {
- deletesCfSet = mutation.getFamilyMap().keySet();
+ deletesCfSet = mutation.getFamilyCellMap().keySet();
} else {
deletesCfSetConsistent = deletesCfSetConsistent
- && mutation.getFamilyMap().keySet().equals(deletesCfSet);
+ && mutation.getFamilyCellMap().keySet().equals(deletesCfSet);
}
}
}
@@ -2202,7 +2202,7 @@ public class HRegion implements HeapSize
durability = tmpDur;
}
if (tmpDur == Durability.SKIP_WAL) {
- recordMutationWithoutWal(m.getFamilyMap());
+ recordMutationWithoutWal(m.getFamilyCellMap());
continue;
}
@@ -4693,8 +4693,8 @@ public class HRegion implements HeapSize
try {
long now = EnvironmentEdgeManager.currentTimeMillis();
// Process each family
- for (Map.Entry<byte[], List<? extends Cell>> family : append.getFamilyMap().entrySet()) {
-
+ for (Map.Entry<byte[], List<? extends Cell>> family : append.getFamilyCellMap().entrySet()) {
+
Store store = stores.get(family.getKey());
List<KeyValue> kvs = new ArrayList<KeyValue>(family.getValue().size());
@@ -4779,7 +4779,7 @@ public class HRegion implements HeapSize
walEdits, HConstants.DEFAULT_CLUSTER_ID, EnvironmentEdgeManager.currentTimeMillis(),
this.htableDescriptor);
} else {
- recordMutationWithoutWal(append.getFamilyMap());
+ recordMutationWithoutWal(append.getFamilyCellMap());
}
//Actually write to Memstore now
@@ -4868,8 +4868,8 @@ public class HRegion implements HeapSize
long now = EnvironmentEdgeManager.currentTimeMillis();
// Process each family
for (Map.Entry<byte [], List<? extends Cell>> family:
- increment.getFamilyMap().entrySet()) {
-
+ increment.getFamilyCellMap().entrySet()) {
+
Store store = stores.get(family.getKey());
List<KeyValue> kvs = new ArrayList<KeyValue>(family.getValue().size());
@@ -4929,7 +4929,7 @@ public class HRegion implements HeapSize
walEdits, HConstants.DEFAULT_CLUSTER_ID, EnvironmentEdgeManager.currentTimeMillis(),
this.htableDescriptor);
} else {
- recordMutationWithoutWal(increment.getFamilyMap());
+ recordMutationWithoutWal(increment.getFamilyCellMap());
}
//Actually write to Memstore now
for (Map.Entry<Store, List<KeyValue>> entry : tempMemstore.entrySet()) {
Modified: hbase/branches/0.95/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/MultiRowMutationProcessor.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.95/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/MultiRowMutationProcessor.java?rev=1512102&r1=1512101&r2=1512102&view=diff
==============================================================================
--- hbase/branches/0.95/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/MultiRowMutationProcessor.java (original)
+++ hbase/branches/0.95/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/MultiRowMutationProcessor.java Thu Aug 8 23:50:25 2013
@@ -73,20 +73,20 @@ MultiRowMutationProcessorResponse> {
// Check mutations and apply edits to a single WALEdit
for (Mutation m : mutations) {
if (m instanceof Put) {
- Map<byte[], List<? extends Cell>> familyMap = m.getFamilyMap();
+ Map<byte[], List<? extends Cell>> familyMap = m.getFamilyCellMap();
region.checkFamilies(familyMap.keySet());
region.checkTimestamps(familyMap, now);
region.updateKVTimestamps(familyMap.values(), byteNow);
} else if (m instanceof Delete) {
Delete d = (Delete) m;
region.prepareDelete(d);
- region.prepareDeleteTimestamps(d.getFamilyMap(), byteNow);
+ region.prepareDeleteTimestamps(d.getFamilyCellMap(), byteNow);
} else {
throw new DoNotRetryIOException(
"Action must be Put or Delete. But was: "
+ m.getClass().getName());
}
- for (List<? extends Cell> cells: m.getFamilyMap().values()) {
+ for (List<? extends Cell> cells: m.getFamilyCellMap().values()) {
boolean writeToWAL = m.getDurability() != Durability.SKIP_WAL;
for (Cell cell : cells) {
KeyValue kv = KeyValueUtil.ensureKeyValue(cell);
Modified: hbase/branches/0.95/hbase-server/src/main/java/org/apache/hadoop/hbase/rest/client/RemoteHTable.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.95/hbase-server/src/main/java/org/apache/hadoop/hbase/rest/client/RemoteHTable.java?rev=1512102&r1=1512101&r2=1512102&view=diff
==============================================================================
--- hbase/branches/0.95/hbase-server/src/main/java/org/apache/hadoop/hbase/rest/client/RemoteHTable.java (original)
+++ hbase/branches/0.95/hbase-server/src/main/java/org/apache/hadoop/hbase/rest/client/RemoteHTable.java Thu Aug 8 23:50:25 2013
@@ -184,7 +184,7 @@ public class RemoteHTable implements HTa
protected CellSetModel buildModelFromPut(Put put) {
RowModel row = new RowModel(put.getRow());
long ts = put.getTimeStamp();
- for (List<? extends Cell> cells: put.getFamilyMap().values()) {
+ for (List<? extends Cell> cells: put.getFamilyCellMap().values()) {
for (Cell cell: cells) {
KeyValue kv = KeyValueUtil.ensureKeyValue(cell);
row.addCell(new CellModel(kv.getFamily(), kv.getQualifier(),
@@ -404,7 +404,7 @@ public class RemoteHTable implements HTa
cells = new ArrayList<Cell>();
map.put(row, cells);
}
- for (List<? extends Cell> l: put.getFamilyMap().values()) {
+ for (List<? extends Cell> l: put.getFamilyCellMap().values()) {
cells.addAll(l);
}
}
@@ -445,7 +445,7 @@ public class RemoteHTable implements HTa
}
public void delete(Delete delete) throws IOException {
- String spec = buildRowSpec(delete.getRow(), delete.getFamilyMap(),
+ String spec = buildRowSpec(delete.getRow(), delete.getFamilyCellMap(),
delete.getTimeStamp(), delete.getTimeStamp(), 1);
for (int i = 0; i < maxRetries; i++) {
Response response = client.delete(spec);
Modified: hbase/branches/0.95/hbase-server/src/main/java/org/apache/hadoop/hbase/security/access/AccessController.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.95/hbase-server/src/main/java/org/apache/hadoop/hbase/security/access/AccessController.java?rev=1512102&r1=1512101&r2=1512102&view=diff
==============================================================================
--- hbase/branches/0.95/hbase-server/src/main/java/org/apache/hadoop/hbase/security/access/AccessController.java (original)
+++ hbase/branches/0.95/hbase-server/src/main/java/org/apache/hadoop/hbase/security/access/AccessController.java Thu Aug 8 23:50:25 2013
@@ -938,14 +938,14 @@ public class AccessController extends Ba
final Put put, final WALEdit edit, final Durability durability)
throws IOException {
requirePermission("put", Permission.Action.WRITE, c.getEnvironment(),
- put.getFamilyMap());
+ put.getFamilyCellMap());
}
@Override
public void postPut(final ObserverContext<RegionCoprocessorEnvironment> c,
final Put put, final WALEdit edit, final Durability durability) {
if (aclRegion) {
- updateACL(c.getEnvironment(), put.getFamilyMap());
+ updateACL(c.getEnvironment(), put.getFamilyCellMap());
}
}
@@ -954,7 +954,7 @@ public class AccessController extends Ba
final Delete delete, final WALEdit edit, final Durability durability)
throws IOException {
requirePermission("delete", Permission.Action.WRITE, c.getEnvironment(),
- delete.getFamilyMap());
+ delete.getFamilyCellMap());
}
@Override
@@ -962,7 +962,7 @@ public class AccessController extends Ba
final Delete delete, final WALEdit edit, final Durability durability)
throws IOException {
if (aclRegion) {
- updateACL(c.getEnvironment(), delete.getFamilyMap());
+ updateACL(c.getEnvironment(), delete.getFamilyCellMap());
}
}
@@ -1003,7 +1003,7 @@ public class AccessController extends Ba
@Override
public Result preAppend(ObserverContext<RegionCoprocessorEnvironment> c, Append append)
throws IOException {
- requirePermission("append", Permission.Action.WRITE, c.getEnvironment(), append.getFamilyMap());
+ requirePermission("append", Permission.Action.WRITE, c.getEnvironment(), append.getFamilyCellMap());
return null;
}
@@ -1013,7 +1013,7 @@ public class AccessController extends Ba
throws IOException {
// Create a map of family to qualifiers.
Map<byte[], Set<byte[]>> familyMap = Maps.newTreeMap(Bytes.BYTES_COMPARATOR);
- for (Map.Entry<byte [], List<? extends Cell>> entry: increment.getFamilyMap().entrySet()) {
+ for (Map.Entry<byte [], List<? extends Cell>> entry: increment.getFamilyCellMap().entrySet()) {
Set<byte[]> qualifiers = Sets.newTreeSet(Bytes.BYTES_COMPARATOR);
for (Cell cell: entry.getValue()) {
KeyValue kv = KeyValueUtil.ensureKeyValue(cell);
Modified: hbase/branches/0.95/hbase-server/src/main/java/org/apache/hadoop/hbase/thrift2/ThriftUtilities.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.95/hbase-server/src/main/java/org/apache/hadoop/hbase/thrift2/ThriftUtilities.java?rev=1512102&r1=1512101&r2=1512102&view=diff
==============================================================================
--- hbase/branches/0.95/hbase-server/src/main/java/org/apache/hadoop/hbase/thrift2/ThriftUtilities.java (original)
+++ hbase/branches/0.95/hbase-server/src/main/java/org/apache/hadoop/hbase/thrift2/ThriftUtilities.java Thu Aug 8 23:50:25 2013
@@ -288,7 +288,7 @@ public class ThriftUtilities {
// Map<family, List<KeyValue>>
for (Map.Entry<byte[], List<? extends org.apache.hadoop.hbase.Cell>> familyEntry:
- in.getFamilyMap().entrySet()) {
+ in.getFamilyCellMap().entrySet()) {
TColumn column = new TColumn(ByteBuffer.wrap(familyEntry.getKey()));
for (org.apache.hadoop.hbase.Cell cell: familyEntry.getValue()) {
KeyValue kv = KeyValueUtil.ensureKeyValue(cell);
Modified: hbase/branches/0.95/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestFromClientSide.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.95/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestFromClientSide.java?rev=1512102&r1=1512101&r2=1512102&view=diff
==============================================================================
--- hbase/branches/0.95/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestFromClientSide.java (original)
+++ hbase/branches/0.95/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestFromClientSide.java Thu Aug 8 23:50:25 2013
@@ -3796,10 +3796,10 @@ public class TestFromClientSide {
put.add(CONTENTS_FAMILY, null, value);
assertEquals(put.size(), 1);
- assertEquals(put.getFamilyMap().get(CONTENTS_FAMILY).size(), 1);
+ assertEquals(put.getFamilyCellMap().get(CONTENTS_FAMILY).size(), 1);
// KeyValue v1 expectation. Cast for now until we go all Cell all the time. TODO
- KeyValue kv = (KeyValue)put.getFamilyMap().get(CONTENTS_FAMILY).get(0);
+ KeyValue kv = (KeyValue)put.getFamilyCellMap().get(CONTENTS_FAMILY).get(0);
assertTrue(Bytes.equals(kv.getFamily(), CONTENTS_FAMILY));
// will it return null or an empty byte array?
Modified: hbase/branches/0.95/hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/SimpleRegionObserver.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.95/hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/SimpleRegionObserver.java?rev=1512102&r1=1512101&r2=1512102&view=diff
==============================================================================
--- hbase/branches/0.95/hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/SimpleRegionObserver.java (original)
+++ hbase/branches/0.95/hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/SimpleRegionObserver.java Thu Aug 8 23:50:25 2013
@@ -315,7 +315,7 @@ public class SimpleRegionObserver extend
public void prePut(final ObserverContext<RegionCoprocessorEnvironment> c,
final Put put, final WALEdit edit,
final Durability durability) throws IOException {
- Map<byte[], List<? extends Cell>> familyMap = put.getFamilyMap();
+ Map<byte[], List<? extends Cell>> familyMap = put.getFamilyCellMap();
RegionCoprocessorEnvironment e = c.getEnvironment();
assertNotNull(e);
assertNotNull(e.getRegion());
@@ -348,7 +348,7 @@ public class SimpleRegionObserver extend
public void postPut(final ObserverContext<RegionCoprocessorEnvironment> c,
final Put put, final WALEdit edit,
final Durability durability) throws IOException {
- Map<byte[], List<? extends Cell>> familyMap = put.getFamilyMap();
+ Map<byte[], List<? extends Cell>> familyMap = put.getFamilyCellMap();
RegionCoprocessorEnvironment e = c.getEnvironment();
assertNotNull(e);
assertNotNull(e.getRegion());
@@ -381,7 +381,7 @@ public class SimpleRegionObserver extend
public void preDelete(final ObserverContext<RegionCoprocessorEnvironment> c,
final Delete delete, final WALEdit edit,
final Durability durability) throws IOException {
- Map<byte[], List<? extends Cell>> familyMap = delete.getFamilyMap();
+ Map<byte[], List<? extends Cell>> familyMap = delete.getFamilyCellMap();
RegionCoprocessorEnvironment e = c.getEnvironment();
assertNotNull(e);
assertNotNull(e.getRegion());
@@ -395,7 +395,7 @@ public class SimpleRegionObserver extend
public void postDelete(final ObserverContext<RegionCoprocessorEnvironment> c,
final Delete delete, final WALEdit edit,
final Durability durability) throws IOException {
- Map<byte[], List<? extends Cell>> familyMap = delete.getFamilyMap();
+ Map<byte[], List<? extends Cell>> familyMap = delete.getFamilyCellMap();
RegionCoprocessorEnvironment e = c.getEnvironment();
assertNotNull(e);
assertNotNull(e.getRegion());
Modified: hbase/branches/0.95/hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/TestRegionObserverBypass.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.95/hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/TestRegionObserverBypass.java?rev=1512102&r1=1512101&r2=1512102&view=diff
==============================================================================
--- hbase/branches/0.95/hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/TestRegionObserverBypass.java (original)
+++ hbase/branches/0.95/hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/TestRegionObserverBypass.java Thu Aug 8 23:50:25 2013
@@ -208,7 +208,7 @@ public class TestRegionObserverBypass {
public void prePut(final ObserverContext<RegionCoprocessorEnvironment> e,
final Put put, final WALEdit edit, final Durability durability)
throws IOException {
- Map<byte[], List<? extends Cell>> familyMap = put.getFamilyMap();
+ Map<byte[], List<? extends Cell>> familyMap = put.getFamilyCellMap();
if (familyMap.containsKey(test)) {
e.bypass();
}
Modified: hbase/branches/0.95/hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/TestWALObserver.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.95/hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/TestWALObserver.java?rev=1512102&r1=1512101&r2=1512102&view=diff
==============================================================================
--- hbase/branches/0.95/hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/TestWALObserver.java (original)
+++ hbase/branches/0.95/hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/TestWALObserver.java Thu Aug 8 23:50:25 2013
@@ -157,7 +157,7 @@ public class TestWALObserver {
// Use a Put to create familyMap.
Put p = creatPutWith2Families(TEST_ROW);
- Map<byte[], List<? extends Cell>> familyMap = p.getFamilyMap();
+ Map<byte[], List<? extends Cell>> familyMap = p.getFamilyCellMap();
WALEdit edit = new WALEdit();
addFamilyMapToWALEdit(familyMap, edit);
Modified: hbase/branches/0.95/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/wal/HLogPerformanceEvaluation.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.95/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/wal/HLogPerformanceEvaluation.java?rev=1512102&r1=1512101&r2=1512102&view=diff
==============================================================================
--- hbase/branches/0.95/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/wal/HLogPerformanceEvaluation.java (original)
+++ hbase/branches/0.95/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/wal/HLogPerformanceEvaluation.java Thu Aug 8 23:50:25 2013
@@ -99,7 +99,7 @@ public final class HLogPerformanceEvalua
Put put = setupPut(rand, key, value, numFamilies);
long now = System.currentTimeMillis();
WALEdit walEdit = new WALEdit();
- addFamilyMapToWALEdit(put.getFamilyMap(), walEdit);
+ addFamilyMapToWALEdit(put.getFamilyCellMap(), walEdit);
HRegionInfo hri = region.getRegionInfo();
if (this.noSync) {
hlog.appendNoSync(hri, hri.getTableName(), walEdit,
Modified: hbase/branches/0.95/hbase-server/src/test/java/org/apache/hadoop/hbase/util/TestCoprocessorScanPolicy.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.95/hbase-server/src/test/java/org/apache/hadoop/hbase/util/TestCoprocessorScanPolicy.java?rev=1512102&r1=1512101&r2=1512102&view=diff
==============================================================================
--- hbase/branches/0.95/hbase-server/src/test/java/org/apache/hadoop/hbase/util/TestCoprocessorScanPolicy.java (original)
+++ hbase/branches/0.95/hbase-server/src/test/java/org/apache/hadoop/hbase/util/TestCoprocessorScanPolicy.java Thu Aug 8 23:50:25 2013
@@ -222,12 +222,12 @@ public class TestCoprocessorScanPolicy {
public void prePut(final ObserverContext<RegionCoprocessorEnvironment> c, final Put put,
final WALEdit edit, final Durability durability) throws IOException {
if (put.getAttribute("ttl") != null) {
- Cell cell = put.getFamilyMap().values().iterator().next().get(0);
+ Cell cell = put.getFamilyCellMap().values().iterator().next().get(0);
KeyValue kv = KeyValueUtil.ensureKeyValue(cell);
ttls.put(TableName.valueOf(kv.getQualifier()), Bytes.toLong(kv.getValue()));
c.bypass();
} else if (put.getAttribute("versions") != null) {
- Cell cell = put.getFamilyMap().values().iterator().next().get(0);
+ Cell cell = put.getFamilyCellMap().values().iterator().next().get(0);
KeyValue kv = KeyValueUtil.ensureKeyValue(cell);
versions.put(TableName.valueOf(kv.getQualifier()), Bytes.toInt(kv.getValue()));
c.bypass();