hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cdoug...@apache.org
Subject svn commit: r909802 - in /hadoop/common/trunk: CHANGES.txt src/java/org/apache/hadoop/fs/FileUtil.java src/java/org/apache/hadoop/io/compress/zlib/BuiltInZlibDeflater.java src/java/org/apache/hadoop/io/compress/zlib/ZlibCompressor.java
Date Sat, 13 Feb 2010 12:21:27 GMT
Author: cdouglas
Date: Sat Feb 13 12:21:26 2010
New Revision: 909802

URL: http://svn.apache.org/viewvc?rev=909802&view=rev
Log:
HADOOP-6548. Replace mortbay imports with commons logging.

Modified:
    hadoop/common/trunk/CHANGES.txt
    hadoop/common/trunk/src/java/org/apache/hadoop/fs/FileUtil.java
    hadoop/common/trunk/src/java/org/apache/hadoop/io/compress/zlib/BuiltInZlibDeflater.java
    hadoop/common/trunk/src/java/org/apache/hadoop/io/compress/zlib/ZlibCompressor.java

Modified: hadoop/common/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/CHANGES.txt?rev=909802&r1=909801&r2=909802&view=diff
==============================================================================
--- hadoop/common/trunk/CHANGES.txt (original)
+++ hadoop/common/trunk/CHANGES.txt Sat Feb 13 12:21:26 2010
@@ -189,6 +189,8 @@
     HADOOP-6505. Use tr rather than sed to effect literal substitution in the
     build script. (Allen Wittenauer via cdouglas)
 
+    HADOOP-6548. Replace mortbay imports with commons logging. (cdouglas)
+
 Release 0.21.0 - Unreleased
 
   INCOMPATIBLE CHANGES

Modified: hadoop/common/trunk/src/java/org/apache/hadoop/fs/FileUtil.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/src/java/org/apache/hadoop/fs/FileUtil.java?rev=909802&r1=909801&r2=909802&view=diff
==============================================================================
--- hadoop/common/trunk/src/java/org/apache/hadoop/fs/FileUtil.java (original)
+++ hadoop/common/trunk/src/java/org/apache/hadoop/fs/FileUtil.java Sat Feb 13 12:21:26 2010
@@ -27,12 +27,17 @@
 import org.apache.hadoop.util.StringUtils;
 import org.apache.hadoop.util.Shell;
 import org.apache.hadoop.util.Shell.ShellCommandExecutor;
-import org.mortbay.log.Log;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 
 /**
  * A collection of file-processing util methods
  */
 public class FileUtil {
+
+  private static final Log LOG = LogFactory.getLog(FileUtil.class);
+
   /**
    * convert an array of FileStatus to an array of Path
    * 
@@ -752,8 +757,8 @@
     try {
       shExec.execute();
     }catch(Exception e) {
-      if(Log.isDebugEnabled()) {
-        Log.debug("Error while changing permission : " + filename 
+      if(LOG.isDebugEnabled()) {
+        LOG.debug("Error while changing permission : " + filename 
             +" Exception: " + StringUtils.stringifyException(e));
       }
     }

Modified: hadoop/common/trunk/src/java/org/apache/hadoop/io/compress/zlib/BuiltInZlibDeflater.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/src/java/org/apache/hadoop/io/compress/zlib/BuiltInZlibDeflater.java?rev=909802&r1=909801&r2=909802&view=diff
==============================================================================
--- hadoop/common/trunk/src/java/org/apache/hadoop/io/compress/zlib/BuiltInZlibDeflater.java
(original)
+++ hadoop/common/trunk/src/java/org/apache/hadoop/io/compress/zlib/BuiltInZlibDeflater.java
Sat Feb 13 12:21:26 2010
@@ -23,7 +23,9 @@
 
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.io.compress.Compressor;
-import org.mortbay.log.Log;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 
 /**
  * A wrapper around java.util.zip.Deflater to make it conform 
@@ -32,6 +34,8 @@
  */
 public class BuiltInZlibDeflater extends Deflater implements Compressor {
 
+  private static final Log LOG = LogFactory.getLog(BuiltInZlibDeflater.class);
+
   public BuiltInZlibDeflater(int level, boolean nowrap) {
     super(level, nowrap);
   }
@@ -69,9 +73,9 @@
     try {
       setStrategy(strategy.compressionStrategy());
     } catch (IllegalArgumentException ill) {
-      Log.warn(strategy + " not supported by BuiltInZlibDeflater.");
+      LOG.warn(strategy + " not supported by BuiltInZlibDeflater.");
       setStrategy(DEFAULT_STRATEGY);
     }
-    Log.debug("Reinit compressor with new compression configuration");
+    LOG.debug("Reinit compressor with new compression configuration");
   }
 }

Modified: hadoop/common/trunk/src/java/org/apache/hadoop/io/compress/zlib/ZlibCompressor.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/src/java/org/apache/hadoop/io/compress/zlib/ZlibCompressor.java?rev=909802&r1=909801&r2=909802&view=diff
==============================================================================
--- hadoop/common/trunk/src/java/org/apache/hadoop/io/compress/zlib/ZlibCompressor.java (original)
+++ hadoop/common/trunk/src/java/org/apache/hadoop/io/compress/zlib/ZlibCompressor.java Sat
Feb 13 12:21:26 2010
@@ -25,7 +25,9 @@
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.io.compress.Compressor;
 import org.apache.hadoop.util.NativeCodeLoader;
-import org.mortbay.log.Log;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 
 /**
  * A {@link Compressor} based on the popular 
@@ -34,6 +36,9 @@
  * 
  */
 public class ZlibCompressor implements Compressor {
+
+  private static final Log LOG = LogFactory.getLog(ZlibCompressor.class);
+
   private static final int DEFAULT_DIRECT_BUFFER_SIZE = 64*1024;
 
   // HACK - Use this as a global lock in the JNI layer
@@ -248,7 +253,7 @@
     stream = init(level.compressionLevel(), 
                   strategy.compressionStrategy(), 
                   windowBits.windowBits());
-    Log.debug("Reinit compressor with new compression configuration");
+    LOG.debug("Reinit compressor with new compression configuration");
   }
 
   public synchronized void setInput(byte[] b, int off, int len) {



Mime
View raw message