hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject svn commit: r1485902 - in /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase: io/hfile/ master/ regionserver/ regionserver/wal/ util/
Date Fri, 24 May 2013 00:11:01 GMT
Author: stack
Date: Fri May 24 00:11:00 2013
New Revision: 1485902

URL: http://svn.apache.org/r1485902
Log:
HBASE-8608 Do an edit of logs.. we log too much.

Modified:
    hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileWriterV2.java
    hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/master/TableLockManager.java
    hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/DefaultStoreFlusher.java
    hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
    hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/StoreFile.java
    hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/FSHLog.java
    hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/ProtobufLogWriter.java
    hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/util/CompoundBloomFilterWriter.java
    hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/util/FSUtils.java

Modified: hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileWriterV2.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileWriterV2.java?rev=1485902&r1=1485901&r2=1485902&view=diff
==============================================================================
--- hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileWriterV2.java
(original)
+++ hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileWriterV2.java
Fri May 24 00:11:00 2013
@@ -34,7 +34,6 @@ import org.apache.hadoop.fs.FileSystem;
 import org.apache.hadoop.fs.Path;
 import org.apache.hadoop.hbase.KeyValue;
 import org.apache.hadoop.hbase.KeyValue.KeyComparator;
-import org.apache.hadoop.hbase.io.encoding.DataBlockEncoding;
 import org.apache.hadoop.hbase.io.compress.Compression;
 import org.apache.hadoop.hbase.io.hfile.HFile.Writer;
 import org.apache.hadoop.hbase.io.hfile.HFileBlock.BlockWritable;
@@ -143,7 +142,7 @@ public class HFileWriterV2 extends Abstr
 
     // Meta data block index writer
     metaBlockIndexWriter = new HFileBlockIndex.BlockIndexWriter();
-    LOG.debug("Initialized with " + cacheConf);
+    if (LOG.isTraceEnabled()) LOG.trace("Initialized with " + cacheConf);
   }
 
   /**

Modified: hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/master/TableLockManager.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/master/TableLockManager.java?rev=1485902&r1=1485901&r2=1485902&view=diff
==============================================================================
--- hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/master/TableLockManager.java
(original)
+++ hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/master/TableLockManager.java
Fri May 24 00:11:00 2013
@@ -239,7 +239,7 @@ public abstract class TableLockManager {
         if (data == null) {
           return;
         }
-        LOG.debug("Table is locked by: " +
+        LOG.debug("Table is locked by " +
             String.format("[tableName=%s, lockOwner=%s, threadId=%s, " +
                 "purpose=%s, isShared=%s, createTime=%s]", Bytes.toString(data.getTableName().toByteArray()),
                 ProtobufUtil.toServerName(data.getLockOwner()), data.getThreadId(),
@@ -270,9 +270,9 @@ public abstract class TableLockManager {
 
       @Override
       public void acquire() throws IOException {
-        if (LOG.isDebugEnabled()) {
-          LOG.debug("Attempt to acquire table " + (isShared ? "read" : "write")
-              + " lock on :" + tableNameStr + " for:" + purpose);
+        if (LOG.isTraceEnabled()) {
+          LOG.trace("Attempt to acquire table " + (isShared ? "read" : "write") +
+            " lock on: " + tableNameStr + " for:" + purpose);
         }
 
         lock = createTableLock();
@@ -292,15 +292,15 @@ public abstract class TableLockManager {
           Thread.currentThread().interrupt();
           throw new InterruptedIOException("Interrupted acquiring a lock");
         }
-        LOG.debug("Acquired table " + (isShared ? "read" : "write")
-            + " lock on :" + tableNameStr + " for:" + purpose);
+        if (LOG.isTraceEnabled()) LOG.trace("Acquired table " + (isShared ? "read" : "write")
+            + " lock on " + tableNameStr + " for " + purpose);
       }
 
       @Override
       public void release() throws IOException {
-        if (LOG.isDebugEnabled()) {
-          LOG.debug("Attempt to release table " + (isShared ? "read" : "write")
-              + " lock on :" + tableNameStr);
+        if (LOG.isTraceEnabled()) {
+          LOG.trace("Attempt to release table " + (isShared ? "read" : "write")
+              + " lock on " + tableNameStr);
         }
         if (lock == null) {
           throw new IllegalStateException("Table " + tableNameStr +
@@ -314,8 +314,8 @@ public abstract class TableLockManager {
           Thread.currentThread().interrupt();
           throw new InterruptedIOException();
         }
-        if (LOG.isDebugEnabled()) {
-          LOG.debug("Released table lock on :" + tableNameStr);
+        if (LOG.isTraceEnabled()) {
+          LOG.trace("Released table lock on " + tableNameStr);
         }
       }
 

Modified: hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/DefaultStoreFlusher.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/DefaultStoreFlusher.java?rev=1485902&r1=1485901&r2=1485902&view=diff
==============================================================================
--- hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/DefaultStoreFlusher.java
(original)
+++ hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/DefaultStoreFlusher.java
Fri May 24 00:11:00 2013
@@ -86,7 +86,9 @@ public class DefaultStoreFlusher extends
       scanner.close();
     }
     LOG.info("Flushed, sequenceid=" + cacheFlushId +", memsize="
-        + StringUtils.humanReadableInt(flushed) +", into tmp file " + writer.getPath());
+        + StringUtils.humanReadableInt(flushed) +
+        ", hasBloomFilter=" + writer.hasGeneralBloom() +
+        ", into tmp file " + writer.getPath());
     result.add(writer.getPath());
     return result;
   }

Modified: hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java?rev=1485902&r1=1485901&r2=1485902&view=diff
==============================================================================
--- hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
(original)
+++ hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
Fri May 24 00:11:00 2013
@@ -1507,10 +1507,10 @@ public class HRegion implements HeapSize
     } finally {
       this.updatesLock.writeLock().unlock();
     }
-    String s = "Finished snapshotting " + this +
-      ", commencing wait for mvcc, flushsize=" + flushsize;
+    String s = "Finished memstore snapshotting " + this +
+      ", syncing WAL and waiting on mvcc, flushsize=" + flushsize;
     status.setStatus(s);
-    LOG.debug(s);
+    if (LOG.isTraceEnabled()) LOG.trace(s);
 
     // sync unflushed WAL changes when deferred log sync is enabled
     // see HBASE-8208 for details
@@ -1525,8 +1525,9 @@ public class HRegion implements HeapSize
     // were removed via a rollbackMemstore could be written to Hfiles.
     mvcc.waitForRead(w);
 
-    status.setStatus("Flushing stores");
-    LOG.debug("Finished snapshotting, commencing flushing stores");
+    s = "Flushing stores of " + this;
+    status.setStatus(s);
+    if (LOG.isTraceEnabled()) LOG.trace(s);
 
     // Any failure from here on out will be catastrophic requiring server
     // restart so hlog content can be replayed and put back into the memstore.

Modified: hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/StoreFile.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/StoreFile.java?rev=1485902&r1=1485901&r2=1485902&view=diff
==============================================================================
--- hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/StoreFile.java
(original)
+++ hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/StoreFile.java
Fri May 24 00:11:00 2013
@@ -19,7 +19,6 @@
 package org.apache.hadoop.hbase.regionserver;
 
 import java.io.DataInput;
-import java.io.FileNotFoundException;
 import java.io.IOException;
 import java.net.InetSocketAddress;
 import java.nio.ByteBuffer;
@@ -36,14 +35,12 @@ import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.hadoop.classification.InterfaceAudience;
 import org.apache.hadoop.conf.Configuration;
-import org.apache.hadoop.fs.FSDataInputStream;
 import org.apache.hadoop.fs.FileSystem;
 import org.apache.hadoop.fs.Path;
 import org.apache.hadoop.hbase.HConstants;
 import org.apache.hadoop.hbase.HDFSBlocksDistribution;
 import org.apache.hadoop.hbase.KeyValue;
 import org.apache.hadoop.hbase.KeyValue.KVComparator;
-import org.apache.hadoop.hbase.KeyValue.MetaKeyComparator;
 import org.apache.hadoop.hbase.client.Scan;
 import org.apache.hadoop.hbase.io.FSDataInputStreamWrapper;
 import org.apache.hadoop.hbase.io.compress.Compression;
@@ -808,8 +805,8 @@ public class StoreFile {
 
       if (generalBloomFilterWriter != null) {
         this.bloomType = bloomType;
-        LOG.info("Bloom filter type for " + path + ": " + this.bloomType + ", "
-            + generalBloomFilterWriter.getClass().getSimpleName());
+        if (LOG.isTraceEnabled()) LOG.trace("Bloom filter type for " + path + ": " +
+          this.bloomType + ", " + generalBloomFilterWriter.getClass().getSimpleName());
       } else {
         // Not using Bloom filters.
         this.bloomType = BloomType.NONE;
@@ -825,7 +822,7 @@ public class StoreFile {
         deleteFamilyBloomFilterWriter = null;
       }
       if (deleteFamilyBloomFilterWriter != null) {
-        LOG.info("Delete Family Bloom filter type for " + path + ": "
+        if (LOG.isTraceEnabled()) LOG.trace("Delete Family Bloom filter type for " + path
+ ": "
             + deleteFamilyBloomFilterWriter.getClass().getSimpleName());
       }
       this.checksumType = checksumType;
@@ -1045,9 +1042,11 @@ public class StoreFile {
 
       // Log final Bloom filter statistics. This needs to be done after close()
       // because compound Bloom filters might be finalized as part of closing.
-      StoreFile.LOG.info((hasGeneralBloom ? "" : "NO ") + "General Bloom and "
-          + (hasDeleteFamilyBloom ? "" : "NO ") + "DeleteFamily"
-          + " was added to HFile (" + getPath() + ") ");
+      if (StoreFile.LOG.isTraceEnabled()) {
+        StoreFile.LOG.trace((hasGeneralBloom ? "" : "NO ") + "General Bloom and " +
+          (hasDeleteFamilyBloom ? "" : "NO ") + "DeleteFamily" + " was added to HFile " +
+          getPath());
+      }
 
     }
 
@@ -1424,9 +1423,11 @@ public class StoreFile {
             } else {
               generalBloomFilter = BloomFilterFactory.createFromMeta(bloomMeta,
                   reader);
-              LOG.info("Loaded " + bloomFilterType.toString() + " ("
+              if (LOG.isTraceEnabled()) {
+                LOG.trace("Loaded " + bloomFilterType.toString() + " "
                   + generalBloomFilter.getClass().getSimpleName()
-                  + ") metadata for " + reader.getName());
+                  + " metadata for " + reader.getName());
+              }
             }
           }
         } else if (blockType == BlockType.DELETE_FAMILY_BLOOM_META) {

Modified: hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/FSHLog.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/FSHLog.java?rev=1485902&r1=1485901&r2=1485902&view=diff
==============================================================================
--- hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/FSHLog.java
(original)
+++ hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/FSHLog.java
Fri May 24 00:11:00 2013
@@ -347,7 +347,7 @@ class FSHLog implements HLog, Syncable {
 
     this.logSyncer = new LogSyncer(this.optionalFlushInterval);
 
-    LOG.info("HLog configuration: blocksize=" +
+    LOG.info("WAL/HLog configuration: blocksize=" +
       StringUtils.byteDesc(this.blocksize) +
       ", rollsize=" + StringUtils.byteDesc(this.logrollsize) +
       ", enabled=" + this.enabled +
@@ -519,9 +519,10 @@ class FSHLog implements HLog, Syncable {
           this.hdfs_out = nextHdfsOut;
           this.numEntries.set(0);
         }
-        LOG.info("Rolled log" + (oldFile != null ? " for file=" + FSUtils.getPath(oldFile)
-          + ", entries=" + oldNumEntries + ", filesize=" + this.fs.getFileStatus(oldFile).getLen()
-          : "" ) + "; new path=" + FSUtils.getPath(newPath));
+        LOG.info("Rolled WAL " + (oldFile != null ?
+          FSUtils.getPath(oldFile) + ", entries=" + oldNumEntries + ", filesize=" +
+            StringUtils.humanReadableInt(this.fs.getFileStatus(oldFile).getLen()):
+          "" ) + "; new WAL=" + FSUtils.getPath(newPath));
 
         // Tell our listeners that a new log was created
         if (!this.listeners.isEmpty()) {

Modified: hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/ProtobufLogWriter.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/ProtobufLogWriter.java?rev=1485902&r1=1485901&r2=1485902&view=diff
==============================================================================
--- hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/ProtobufLogWriter.java
(original)
+++ hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/ProtobufLogWriter.java
Fri May 24 00:11:00 2013
@@ -87,7 +87,9 @@ public class ProtobufLogWriter implement
     }
     // instantiate trailer to default value.
     trailer = WALTrailer.newBuilder().build();
-    LOG.debug("Writing protobuf WAL; path=" + path + ", compression=" + doCompress);
+    if (LOG.isTraceEnabled()) {
+      LOG.trace("Initialized protobuf WAL=" + path + ", compression=" + doCompress);
+    }
   }
 
   @Override

Modified: hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/util/CompoundBloomFilterWriter.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/util/CompoundBloomFilterWriter.java?rev=1485902&r1=1485901&r2=1485902&view=diff
==============================================================================
--- hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/util/CompoundBloomFilterWriter.java
(original)
+++ hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/util/CompoundBloomFilterWriter.java
Fri May 24 00:11:00 2013
@@ -135,8 +135,8 @@ public class CompoundBloomFilterWriter e
 
     chunk.compactBloom();
 
-    if (LOG.isDebugEnabled() && prevByteSize != chunk.getByteSize()) {
-      LOG.debug("Compacted Bloom chunk #" + readyChunk.chunkId + " from ["
+    if (LOG.isTraceEnabled() && prevByteSize != chunk.getByteSize()) {
+      LOG.trace("Compacted Bloom chunk #" + readyChunk.chunkId + " from ["
           + prevMaxKeys + " max keys, " + prevByteSize + " bytes] to ["
           + chunk.getMaxKeys() + " max keys, " + chunk.getByteSize()
           + " bytes]");

Modified: hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/util/FSUtils.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/util/FSUtils.java?rev=1485902&r1=1485901&r2=1485902&view=diff
==============================================================================
--- hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/util/FSUtils.java (original)
+++ hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/util/FSUtils.java Fri May
24 00:11:00 2013
@@ -322,11 +322,11 @@ public abstract class FSUtils {
    * @return output stream to the created file
    * @throws IOException if the file cannot be created
    */
-  @SuppressWarnings("deprecation")
   public static FSDataOutputStream create(FileSystem fs, Path path,
       FsPermission perm, boolean overwrite) throws IOException {
-    LOG.debug("Creating file=" + path + " with permission=" + perm);
-
+    if (LOG.isTraceEnabled()) {
+      LOG.trace("Creating file=" + path + " with permission=" + perm + ", overwrite=" + overwrite);
+    }
     return fs.create(path, perm, overwrite, getDefaultBufferSize(fs),
         getDefaultReplication(fs, path), getDefaultBlockSize(fs, path), null);
   }



Mime
View raw message