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-16155 Compacting Memstore : Few log improvements.
Date Fri, 01 Jul 2016 04:44:51 GMT
Repository: hbase
Updated Branches:
  refs/heads/master d1d8cc71c -> 139f0ed53


HBASE-16155 Compacting Memstore : Few log improvements.


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

Branch: refs/heads/master
Commit: 139f0ed53cdf5e5310b034d5ccdb69c610c53c60
Parents: d1d8cc7
Author: anoopsjohn <anoopsamjohn@gmail.com>
Authored: Fri Jul 1 10:14:07 2016 +0530
Committer: anoopsjohn <anoopsamjohn@gmail.com>
Committed: Fri Jul 1 10:14:07 2016 +0530

----------------------------------------------------------------------
 .../hbase/regionserver/CompactingMemStore.java  | 24 ++++++++------------
 .../hbase/regionserver/CompactionPipeline.java  | 16 ++++++++-----
 .../hbase/regionserver/MemStoreCompactor.java   |  6 +++--
 .../hadoop/hbase/regionserver/Segment.java      |  2 --
 4 files changed, 24 insertions(+), 24 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/139f0ed5/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/CompactingMemStore.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/CompactingMemStore.java
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/CompactingMemStore.java
index a996edf..0ca8af0 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/CompactingMemStore.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/CompactingMemStore.java
@@ -92,7 +92,7 @@ public class CompactingMemStore extends AbstractMemStore {
     double factor =  conf.getDouble(IN_MEMORY_FLUSH_THRESHOLD_FACTOR_KEY,
         IN_MEMORY_FLUSH_THRESHOLD_FACTOR_DEFAULT);
     inmemoryFlushSize *= factor;
-    LOG.debug("Setting in-memory flush size threshold to " + inmemoryFlushSize);
+    LOG.info("Setting in-memory flush size threshold to " + inmemoryFlushSize);
   }
 
   public static long getSegmentSize(Segment segment) {
@@ -150,8 +150,11 @@ public class CompactingMemStore extends AbstractMemStore {
       LOG.warn("Snapshot called again without clearing previous. " +
           "Doing nothing. Another ongoing flush or did we fail last attempt?");
     } else {
-      LOG.info("FLUSHING TO DISK: region "+ getRegionServices().getRegionInfo()
-          .getRegionNameAsString() + "store: "+ getFamilyName());
+      if (LOG.isDebugEnabled()) {
+        LOG.debug("FLUSHING TO DISK: region "
+            + getRegionServices().getRegionInfo().getRegionNameAsString() + "store: "
+            + getFamilyName());
+      }
       stopCompaction();
       pushActiveToPipeline(active);
       snapshotId = EnvironmentEdgeManager.currentTime();
@@ -275,8 +278,10 @@ public class CompactingMemStore extends AbstractMemStore {
     getRegionServices().blockUpdates();
     try {
       MutableSegment active = getActive();
-      LOG.info("IN-MEMORY FLUSH: Pushing active segment into compaction pipeline, " +
-          "and initiating compaction.");
+      if (LOG.isDebugEnabled()) {
+        LOG.debug("IN-MEMORY FLUSH: Pushing active segment into compaction pipeline, "
+            + "and initiating compaction.");
+      }
       pushActiveToPipeline(active);
     } finally {
       getRegionServices().unblockUpdates();
@@ -398,13 +403,4 @@ public class CompactingMemStore extends AbstractMemStore {
     }
     return lowest;
   }
-
-  // debug method
-  private void debug() {
-    String msg = "active size="+getActive().getSize();
-    msg += " threshold="+IN_MEMORY_FLUSH_THRESHOLD_FACTOR_DEFAULT* inmemoryFlushSize;
-    msg += " allow compaction is "+ (allowCompaction.get() ? "true" : "false");
-    msg += " inMemoryFlushInProgress is "+ (inMemoryFlushInProgress.get() ? "true" : "false");
-    LOG.debug(msg);
-  }
 }

http://git-wip-us.apache.org/repos/asf/hbase/blob/139f0ed5/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/CompactionPipeline.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/CompactionPipeline.java
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/CompactionPipeline.java
index e33ceae..3ecd11c1 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/CompactionPipeline.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/CompactionPipeline.java
@@ -95,10 +95,12 @@ public class CompactionPipeline {
         return false;
       }
       suffix = versionedList.getStoreSegments();
-      LOG.info("Swapping pipeline suffix with compacted item. "
-          +"Just before the swap the number of segments in pipeline is:"
-          +versionedList.getStoreSegments().size()
-          +", and the number of cells in new segment is:"+segment.getCellsCount());
+      if (LOG.isDebugEnabled()) {
+        LOG.debug("Swapping pipeline suffix with compacted item. "
+            + "Just before the swap the number of segments in pipeline is:"
+            + versionedList.getStoreSegments().size()
+            + ", and the number of cells in new segment is:" + segment.getCellsCount());
+      }
       swapSuffix(suffix,segment);
     }
     if(region != null) {
@@ -107,8 +109,10 @@ public class CompactionPipeline {
       long newSize = CompactingMemStore.getSegmentSize(segment);
       long delta = suffixSize - newSize;
       long globalMemstoreSize = region.addAndGetGlobalMemstoreSize(-delta);
-      LOG.info("Suffix size: "+ suffixSize+" compacted item size: "+newSize+
-          " globalMemstoreSize: "+globalMemstoreSize);
+      if (LOG.isDebugEnabled()) {
+        LOG.debug("Suffix size: " + suffixSize + " compacted item size: " + newSize
+            + " globalMemstoreSize: " + globalMemstoreSize);
+      }
     }
     return true;
   }

http://git-wip-us.apache.org/repos/asf/hbase/blob/139f0ed5/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/MemStoreCompactor.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/MemStoreCompactor.java
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/MemStoreCompactor.java
index 691ebb9..a363e95 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/MemStoreCompactor.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/MemStoreCompactor.java
@@ -84,8 +84,10 @@ class MemStoreCompactor {
     smallestReadPoint = compactingMemStore.getSmallestReadPoint();
     compactingScanner = createScanner(compactingMemStore.getStore());
 
-    LOG.info("Starting the MemStore in-memory compaction for store " +
-        compactingMemStore.getStore().getColumnFamilyName());
+    if (LOG.isDebugEnabled()) {
+      LOG.debug("Starting the MemStore in-memory compaction for store "
+          + compactingMemStore.getStore().getColumnFamilyName());
+    }
 
     doCompaction();
     return true;

http://git-wip-us.apache.org/repos/asf/hbase/blob/139f0ed5/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/Segment.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/Segment.java
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/Segment.java
index 6435232..dd824c1 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/Segment.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/Segment.java
@@ -23,7 +23,6 @@ import java.util.SortedSet;
 import java.util.concurrent.atomic.AtomicLong;
 
 import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 import org.apache.hadoop.hbase.Cell;
 import org.apache.hadoop.hbase.CellComparator;
 import org.apache.hadoop.hbase.KeyValue;
@@ -42,7 +41,6 @@ import org.apache.hadoop.hbase.util.ByteRange;
 @InterfaceAudience.Private
 public abstract class Segment {
 
-  private static final Log LOG = LogFactory.getLog(Segment.class);
   private volatile CellSet cellSet;
   private final CellComparator comparator;
   private long minSequenceId;


Mime
View raw message