hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From la...@apache.org
Subject git commit: HBASE-12023 HRegion.applyFamilyMapToMemstore creates too many iterator objects. (Vladimir Rodionov)
Date Fri, 19 Sep 2014 18:58:07 GMT
Repository: hbase
Updated Branches:
  refs/heads/master b4c07e9a8 -> 94082791a


HBASE-12023 HRegion.applyFamilyMapToMemstore creates too many iterator objects. (Vladimir
Rodionov)


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/94082791
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/94082791
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/94082791

Branch: refs/heads/master
Commit: 94082791af6c612f5b6e4ea0021ee725dd7bca7a
Parents: b4c07e9
Author: Lars Hofhansl <larsh@apache.org>
Authored: Fri Sep 19 11:42:12 2014 -0700
Committer: Lars Hofhansl <larsh@apache.org>
Committed: Fri Sep 19 11:55:24 2014 -0700

----------------------------------------------------------------------
 .../java/org/apache/hadoop/hbase/regionserver/HRegion.java    | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/94082791/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
index 399f13d..d0c3c1e 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
@@ -35,6 +35,7 @@ import java.util.List;
 import java.util.Map;
 import java.util.NavigableMap;
 import java.util.NavigableSet;
+import java.util.RandomAccess;
 import java.util.Set;
 import java.util.TreeMap;
 import java.util.concurrent.Callable;
@@ -3090,9 +3091,11 @@ public class HRegion implements HeapSize { // , Writable{
     for (Map.Entry<byte[], List<Cell>> e : familyMap.entrySet()) {
       byte[] family = e.getKey();
       List<Cell> cells = e.getValue();
-
+      assert cells instanceof RandomAccess;
       Store store = getStore(family);
-      for (Cell cell: cells) {
+      int listSize = cells.size();
+      for (int i=0; i < listSize; i++) {
+        Cell cell = cells.get(i);  
         CellUtil.setSequenceId(cell, mvccNum);
         Pair<Long, Cell> ret = store.add(cell);
         size += ret.getFirst();


Mime
View raw message