hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anoopsamj...@apache.org
Subject hbase git commit: HBASE-16809 Save one cell length calculation in HeapMemStoreLAB#copyCellInto. (binlijin)
Date Wed, 12 Oct 2016 04:27:45 GMT
Repository: hbase
Updated Branches:
  refs/heads/master 0af10f894 -> f77ff9f96


HBASE-16809 Save one cell length calculation in HeapMemStoreLAB#copyCellInto. (binlijin)


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

Branch: refs/heads/master
Commit: f77ff9f96f62222962baa3c3091ac5226fad7adb
Parents: 0af10f8
Author: anoopsamjohn <anoopsamjohn@gmail.com>
Authored: Wed Oct 12 09:57:23 2016 +0530
Committer: anoopsamjohn <anoopsamjohn@gmail.com>
Committed: Wed Oct 12 09:57:23 2016 +0530

----------------------------------------------------------------------
 .../src/main/java/org/apache/hadoop/hbase/KeyValueUtil.java      | 4 +---
 .../org/apache/hadoop/hbase/regionserver/HeapMemStoreLAB.java    | 4 ++--
 2 files changed, 3 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/f77ff9f9/hbase-common/src/main/java/org/apache/hadoop/hbase/KeyValueUtil.java
----------------------------------------------------------------------
diff --git a/hbase-common/src/main/java/org/apache/hadoop/hbase/KeyValueUtil.java b/hbase-common/src/main/java/org/apache/hadoop/hbase/KeyValueUtil.java
index 39b3653..6d07d07 100644
--- a/hbase-common/src/main/java/org/apache/hadoop/hbase/KeyValueUtil.java
+++ b/hbase-common/src/main/java/org/apache/hadoop/hbase/KeyValueUtil.java
@@ -661,10 +661,8 @@ public class KeyValueUtil {
    * Write the given cell in KeyValue serialization format into the given buf and return
a new
    * KeyValue object around that.
    */
-  public static KeyValue copyCellTo(Cell cell, byte[] buf, int offset) {
+  public static KeyValue copyCellTo(Cell cell, byte[] buf, int offset, int len) {
     int tagsLen = cell.getTagsLength();
-    int len = length(cell.getRowLength(), cell.getFamilyLength(), cell.getQualifierLength(),
-        cell.getValueLength(), tagsLen, true);
     if (cell instanceof ExtendedCell) {
       ((ExtendedCell) cell).write(buf, offset);
     } else {

http://git-wip-us.apache.org/repos/asf/hbase/blob/f77ff9f9/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HeapMemStoreLAB.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HeapMemStoreLAB.java
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HeapMemStoreLAB.java
index aa49c57..378601d 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HeapMemStoreLAB.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HeapMemStoreLAB.java
@@ -26,11 +26,11 @@ import java.util.concurrent.atomic.AtomicReference;
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
+import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.hbase.Cell;
 import org.apache.hadoop.hbase.KeyValueUtil;
 import org.apache.hadoop.hbase.classification.InterfaceAudience;
 import org.apache.hadoop.hbase.regionserver.MemStoreChunkPool.PooledChunk;
-import org.apache.hadoop.conf.Configuration;
 
 import com.google.common.annotations.VisibleForTesting;
 import com.google.common.base.Preconditions;
@@ -130,7 +130,7 @@ public class HeapMemStoreLAB implements MemStoreLAB {
       // try to retire this chunk
       tryRetireChunk(c);
     }
-    return KeyValueUtil.copyCellTo(cell, c.getData(), allocOffset);
+    return KeyValueUtil.copyCellTo(cell, c.getData(), allocOffset, size);
   }
 
   /**


Mime
View raw message