Author: stack
Date: Thu Dec 17 18:58:22 2009
New Revision: 891840

URL: http://svn.apache.org/viewvc?rev=891840&view=rev
Log:
HBASE-2049 Cleanup HLog binary log output

Modified:
    hadoop/hbase/branches/0.20/CHANGES.txt
    
hadoop/hbase/branches/0.20/src/java/org/apache/hadoop/hbase/regionserver/HLog.java

Modified: hadoop/hbase/branches/0.20/CHANGES.txt
URL: 
http://svn.apache.org/viewvc/hadoop/hbase/branches/0.20/CHANGES.txt?rev=891840&r1=891839&r2=891840&view=diff
==============================================================================
--- hadoop/hbase/branches/0.20/CHANGES.txt (original)
+++ hadoop/hbase/branches/0.20/CHANGES.txt Thu Dec 17 18:58:22 2009
@@ -43,6 +43,7 @@
    HBASE-2046  Remove CompactionLimitThread
    HBASE-2052  Make hbase more 'live' when comes to noticing table creation, 
                splits, etc., for 0.20.3
+   HBASE-2049  Cleanup HLog binary log output (Dave Latham via Stack)
 
 Release 0.20.2 - November 18th, 2009
   INCOMPATIBLE CHANGES

Modified: 
hadoop/hbase/branches/0.20/src/java/org/apache/hadoop/hbase/regionserver/HLog.java
URL: 
http://svn.apache.org/viewvc/hadoop/hbase/branches/0.20/src/java/org/apache/hadoop/hbase/regionserver/HLog.java?rev=891840&r1=891839&r2=891840&view=diff
==============================================================================
--- 
hadoop/hbase/branches/0.20/src/java/org/apache/hadoop/hbase/regionserver/HLog.java
 (original)
+++ 
hadoop/hbase/branches/0.20/src/java/org/apache/hadoop/hbase/regionserver/HLog.java
 Thu Dec 17 18:58:22 2009
@@ -379,7 +379,7 @@
       LOG.debug("Found " + sequenceNumbers.size() + " hlogs to remove " +
         " out of total " + this.outputfiles.size() + "; " +
         "oldest outstanding seqnum is " + oldestOutstandingSeqNum +
-        " from region " + Bytes.toString(oldestRegion));
+        " from region " + Bytes.toStringBinary(oldestRegion));
     }
     if (sequenceNumbers.size() > 0) {
       for (Long seq : sequenceNumbers) {
@@ -392,7 +392,7 @@
         oldestRegion: getOldestRegion(oldestOutstandingSeqNum);
       LOG.info("Too many hlogs: logs=" + countOfLogs + ", maxlogs=" +
         this.maxLogs + "; forcing flush of region with oldest edits: " +
-        Bytes.toString(regionToFlush));
+        Bytes.toStringBinary(regionToFlush));
     }
     return regionToFlush;
   }
@@ -898,7 +898,7 @@
                 LinkedList<HLogEntry> queue = logEntries.get(regionName);
                 if (queue == null) {
                   queue = new LinkedList<HLogEntry>();
-                  LOG.debug("Adding queue for " + Bytes.toString(regionName));
+                  LOG.debug("Adding queue for " + 
Bytes.toStringBinary(regionName));
                   logEntries.put(regionName, queue);
                 }
                 HLogEntry hle = new HLogEntry(val, key);
@@ -945,7 +945,7 @@
         ExecutorService threadPool =
           Executors.newFixedThreadPool(logWriterThreads);
         for (final byte[] key : logEntries.keySet()) {
-          Thread thread = new Thread(Bytes.toString(key)) {
+          Thread thread = new Thread(Bytes.toStringBinary(key)) {
             @Override
             public void run() {
               LinkedList<HLogEntry> entries = logEntries.get(key);
@@ -988,7 +988,7 @@
                     logWriters.put(key, wap);
                     if (LOG.isDebugEnabled()) {
                       LOG.debug("Creating new hlog file writer for path "
-                          + logfile + " and region " + Bytes.toString(key));
+                          + logfile + " and region " + 
Bytes.toStringBinary(key));
                     }
 
                     if (old != null) {
@@ -1011,12 +1011,12 @@
                 }
                 if (LOG.isDebugEnabled()) {
                   LOG.debug("Applied " + count + " total edits to "
-                      + Bytes.toString(key) + " in "
+                      + Bytes.toStringBinary(key) + " in "
                       + (System.currentTimeMillis() - threadTime) + "ms");
                 }
               } catch (IOException e) {
                 e = RemoteExceptionHandler.checkIOException(e);
-                LOG.warn("Got while writing region " + Bytes.toString(key)
+                LOG.warn("Got while writing region " + 
Bytes.toStringBinary(key)
                     + " log " + e);
                 e.printStackTrace();
               }


Reply via email to