HBASE-10339 Mutation::getFamilyMap method was lost in 98
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1558267 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
279e890edd
commit
d6f2301f2a
|
@ -239,6 +239,25 @@ public abstract class Mutation extends OperationWithAttributes implements Row, C
|
||||||
this.familyMap = map;
|
this.familyMap = map;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Method for retrieving the put's familyMap that is deprecated and inefficient.
|
||||||
|
* @return the map
|
||||||
|
* @deprecated use {@link #getFamilyCellMap()} instead.
|
||||||
|
*/
|
||||||
|
@Deprecated
|
||||||
|
public NavigableMap<byte [], List<KeyValue>> getFamilyMap() {
|
||||||
|
TreeMap<byte[], List<KeyValue>> fm =
|
||||||
|
new TreeMap<byte[], List<KeyValue>>(Bytes.BYTES_COMPARATOR);
|
||||||
|
for (Map.Entry<byte[], List<Cell>> e : familyMap.entrySet()) {
|
||||||
|
List<KeyValue> kvl = new ArrayList<KeyValue>(e.getValue().size());
|
||||||
|
for (Cell c : e.getValue()) {
|
||||||
|
kvl.add(KeyValueUtil.ensureKeyValue(c));
|
||||||
|
}
|
||||||
|
fm.put(e.getKey(), kvl);
|
||||||
|
}
|
||||||
|
return fm;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Method for setting the put's familyMap that is deprecated and inefficient.
|
* Method for setting the put's familyMap that is deprecated and inefficient.
|
||||||
* @deprecated use {@link #setFamilyCellMap(NavigableMap)} instead.
|
* @deprecated use {@link #setFamilyCellMap(NavigableMap)} instead.
|
||||||
|
|
Loading…
Reference in New Issue