HBASE-15171 Addendum removes extra loop (Yu Li)
This commit is contained in:
parent
421fe24e9b
commit
dfa9484137
|
@ -66,12 +66,11 @@ public class PutSortReducer extends
|
||||||
for (List<Cell> cells: p.getFamilyCellMap().values()) {
|
for (List<Cell> cells: p.getFamilyCellMap().values()) {
|
||||||
for (Cell cell: cells) {
|
for (Cell cell: cells) {
|
||||||
KeyValue kv = KeyValueUtil.ensureKeyValueTypeForMR(cell);
|
KeyValue kv = KeyValueUtil.ensureKeyValueTypeForMR(cell);
|
||||||
map.add(kv);
|
if (map.add(kv)) {// don't count duplicated kv into size
|
||||||
|
curSize += kv.heapSize();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for(KeyValue kv: map){
|
|
||||||
curSize +=kv.heapSize();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
context.setStatus("Read " + map.size() + " entries of " + map.getClass()
|
context.setStatus("Read " + map.size() + " entries of " + map.getClass()
|
||||||
+ "(" + StringUtils.humanReadableInt(curSize) + ")");
|
+ "(" + StringUtils.humanReadableInt(curSize) + ")");
|
||||||
|
|
Loading…
Reference in New Issue