hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From li...@apache.org
Subject svn commit: r1462833 - /hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
Date Sat, 30 Mar 2013 18:19:30 GMT
Author: liyin
Date: Sat Mar 30 18:19:29 2013
New Revision: 1462833

URL: http://svn.apache.org/r1462833
Log:
[0.89-fb] [HBASE-8228] Enable finer profiling for how long it takes to create a memstore snapshot.
-- TEMPORARY DIFF

Author: aaiyer

Summary:

We do not intend to have this diff around for a while. Will be reverted after getting the
info we need to track the outliers.

Test Plan: push to titan025 and get the data to understand this.

Reviewers: liyintang, rshroff

Reviewed By: rshroff

CC: hbase-eng@

Differential Revision: https://phabricator.fb.com/D756977

Task ID: 2237950

Modified:
    hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java

Modified: hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java?rev=1462833&r1=1462832&r2=1462833&view=diff
==============================================================================
--- hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
(original)
+++ hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
Sat Mar 30 18:19:29 2013
@@ -1382,6 +1382,7 @@ public class HRegion implements HeapSize
     // rows then)
     status.setStatus("Obtaining lock to block concurrent updates");
     long t0, t1;
+    long t01 = 0, t02 = 0, t03 = 0, t04 = 0, t05 = 0;
     this.updatesLock.writeLock().lock();
     t0 = EnvironmentEdgeManager.currentTimeMillis();
     status.setStatus("Preparing to flush by snapshotting stores");
@@ -1389,23 +1390,36 @@ public class HRegion implements HeapSize
     //copy the array of per column family memstore values
     List<StoreFlusher> storeFlushers = new ArrayList<StoreFlusher>(
         stores.size());
+    t01 = EnvironmentEdgeManager.currentTimeMillis();
     try {
       sequenceId = (wal == null)? myseqid :
         wal.startCacheFlush(this.regionInfo.getRegionName());
+      t02 = EnvironmentEdgeManager.currentTimeMillis();
       completeSequenceId = this.getCompleteCacheFlushSequenceId(sequenceId);
+      t03 = EnvironmentEdgeManager.currentTimeMillis();
       for (Store s : stores.values()) {
         storeFlushers.add(s.getStoreFlusher(completeSequenceId));
       }
+      t04 = EnvironmentEdgeManager.currentTimeMillis();
 
       // prepare flush (take a snapshot)
       for (StoreFlusher flusher : storeFlushers) {
         flusher.prepare();
       }
+      t05 = EnvironmentEdgeManager.currentTimeMillis();
     } finally {
       this.updatesLock.writeLock().unlock();
       t1 = EnvironmentEdgeManager.currentTimeMillis();
       LOG.debug("Finished snapshotting. Held region-wide updates lock for "
-        + (t1-t0) + " ms.");
+        + (t1-t0) + " ms."
+        + " parts: "
+        + (t01-t0) +  " ms. "
+        + (t02-t01) +  " ms. "
+        + (t03-t02) +  " ms. "
+        + (t04-t03) +  " ms. "
+        + (t05-t04) +  " ms. "
+        + (t1-t05) +  " ms. "
+        );
     }
 
     status.setStatus("Flushing stores");



Mime
View raw message