hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cdoug...@apache.org
Subject svn commit: r686038 - in /hadoop/core/trunk: ./ src/contrib/streaming/src/test/org/apache/hadoop/streaming/ src/core/org/apache/hadoop/conf/ src/core/org/apache/hadoop/fs/ src/core/org/apache/hadoop/fs/ftp/ src/core/org/apache/hadoop/fs/s3native/ src/c...
Date Thu, 14 Aug 2008 20:52:43 GMT
Author: cdouglas
Date: Thu Aug 14 13:52:41 2008
New Revision: 686038

URL: http://svn.apache.org/viewvc?rev=686038&view=rev
Log:
HADOOP-3951. Fix package name for FSNamesystem logs and modify other
hard-coded Logs to use the class name.

Modified:
    hadoop/core/trunk/CHANGES.txt
    hadoop/core/trunk/src/contrib/streaming/src/test/org/apache/hadoop/streaming/TestStreamingBadRecords.java
    hadoop/core/trunk/src/core/org/apache/hadoop/conf/Configuration.java
    hadoop/core/trunk/src/core/org/apache/hadoop/fs/ChecksumFileSystem.java
    hadoop/core/trunk/src/core/org/apache/hadoop/fs/FSInputChecker.java
    hadoop/core/trunk/src/core/org/apache/hadoop/fs/FileSystem.java
    hadoop/core/trunk/src/core/org/apache/hadoop/fs/LocalDirAllocator.java
    hadoop/core/trunk/src/core/org/apache/hadoop/fs/Trash.java
    hadoop/core/trunk/src/core/org/apache/hadoop/fs/ftp/FTPFileSystem.java
    hadoop/core/trunk/src/core/org/apache/hadoop/fs/s3native/NativeS3FileSystem.java
    hadoop/core/trunk/src/core/org/apache/hadoop/io/Text.java
    hadoop/core/trunk/src/core/org/apache/hadoop/io/UTF8.java
    hadoop/core/trunk/src/core/org/apache/hadoop/io/compress/zlib/ZlibFactory.java
    hadoop/core/trunk/src/core/org/apache/hadoop/io/retry/RetryInvocationHandler.java
    hadoop/core/trunk/src/core/org/apache/hadoop/ipc/Client.java
    hadoop/core/trunk/src/core/org/apache/hadoop/ipc/RPC.java
    hadoop/core/trunk/src/core/org/apache/hadoop/ipc/Server.java
    hadoop/core/trunk/src/core/org/apache/hadoop/metrics/MetricsUtil.java
    hadoop/core/trunk/src/core/org/apache/hadoop/net/NetworkTopology.java
    hadoop/core/trunk/src/core/org/apache/hadoop/net/ScriptBasedMapping.java
    hadoop/core/trunk/src/core/org/apache/hadoop/util/NativeCodeLoader.java
    hadoop/core/trunk/src/hdfs/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java
    hadoop/core/trunk/src/mapred/org/apache/hadoop/mapred/FileInputFormat.java
    hadoop/core/trunk/src/mapred/org/apache/hadoop/mapred/JobClient.java
    hadoop/core/trunk/src/mapred/org/apache/hadoop/mapred/JobHistory.java
    hadoop/core/trunk/src/mapred/org/apache/hadoop/mapred/JobInProgress.java
    hadoop/core/trunk/src/mapred/org/apache/hadoop/mapred/JobTracker.java
    hadoop/core/trunk/src/mapred/org/apache/hadoop/mapred/LocalJobRunner.java
    hadoop/core/trunk/src/mapred/org/apache/hadoop/mapred/SortedRanges.java
    hadoop/core/trunk/src/mapred/org/apache/hadoop/mapred/TaskInProgress.java
    hadoop/core/trunk/src/mapred/org/apache/hadoop/mapred/TaskRunner.java
    hadoop/core/trunk/src/mapred/org/apache/hadoop/mapred/TaskTracker.java
    hadoop/core/trunk/src/test/org/apache/hadoop/hdfs/NNThroughputBenchmark.java
    hadoop/core/trunk/src/test/org/apache/hadoop/io/TestTextNonUTF8.java
    hadoop/core/trunk/src/test/org/apache/hadoop/io/compress/TestCodec.java
    hadoop/core/trunk/src/test/org/apache/hadoop/ipc/TestIPC.java
    hadoop/core/trunk/src/test/org/apache/hadoop/ipc/TestIPCServerResponder.java
    hadoop/core/trunk/src/test/org/apache/hadoop/ipc/TestRPC.java
    hadoop/core/trunk/src/test/org/apache/hadoop/mapred/TestBadRecords.java
    hadoop/core/trunk/src/test/org/apache/hadoop/mapred/TestSortedRanges.java
    hadoop/core/trunk/src/tools/org/apache/hadoop/tools/Logalyzer.java

Modified: hadoop/core/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/CHANGES.txt?rev=686038&r1=686037&r2=686038&view=diff
==============================================================================
--- hadoop/core/trunk/CHANGES.txt (original)
+++ hadoop/core/trunk/CHANGES.txt Thu Aug 14 13:52:41 2008
@@ -311,6 +311,9 @@
     HADOOP-3952. Fix compilation error in TestDataJoin referencing dfs package.
     (omalley)
 
+    HADOOP-3951. Fix package name for FSNamesystem logs and modify other
+    hard-coded Logs to use the class name. (cdouglas)
+
 Release 0.18.0 - 2008-08-19
 
   INCOMPATIBLE CHANGES

Modified: hadoop/core/trunk/src/contrib/streaming/src/test/org/apache/hadoop/streaming/TestStreamingBadRecords.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/contrib/streaming/src/test/org/apache/hadoop/streaming/TestStreamingBadRecords.java?rev=686038&r1=686037&r2=686038&view=diff
==============================================================================
--- hadoop/core/trunk/src/contrib/streaming/src/test/org/apache/hadoop/streaming/TestStreamingBadRecords.java
(original)
+++ hadoop/core/trunk/src/contrib/streaming/src/test/org/apache/hadoop/streaming/TestStreamingBadRecords.java
Thu Aug 14 13:52:41 2008
@@ -45,7 +45,7 @@
 {
 
   private static final Log LOG = 
-    LogFactory.getLog("org.apache.hadoop.mapred.TestStreamingBadRecords");
+    LogFactory.getLog(TestStreamingBadRecords.class);
   
   private static final List<String> MAPPER_BAD_RECORDS = 
     Arrays.asList("hey022","hey023","hey099");

Modified: hadoop/core/trunk/src/core/org/apache/hadoop/conf/Configuration.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/core/org/apache/hadoop/conf/Configuration.java?rev=686038&r1=686037&r2=686038&view=diff
==============================================================================
--- hadoop/core/trunk/src/core/org/apache/hadoop/conf/Configuration.java (original)
+++ hadoop/core/trunk/src/core/org/apache/hadoop/conf/Configuration.java Thu Aug 14 13:52:41
2008
@@ -127,7 +127,7 @@
  */
 public class Configuration implements Iterable<Map.Entry<String,String>> {
   private static final Log LOG =
-    LogFactory.getLog("org.apache.hadoop.conf.Configuration");
+    LogFactory.getLog(Configuration.class);
 
   private boolean quietmode = true;
   

Modified: hadoop/core/trunk/src/core/org/apache/hadoop/fs/ChecksumFileSystem.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/core/org/apache/hadoop/fs/ChecksumFileSystem.java?rev=686038&r1=686037&r2=686038&view=diff
==============================================================================
--- hadoop/core/trunk/src/core/org/apache/hadoop/fs/ChecksumFileSystem.java (original)
+++ hadoop/core/trunk/src/core/org/apache/hadoop/fs/ChecksumFileSystem.java Thu Aug 14 13:52:41
2008
@@ -95,7 +95,7 @@
    *******************************************************/
   private static class ChecksumFSInputChecker extends FSInputChecker {
     public static final Log LOG 
-      = LogFactory.getLog("org.apache.hadoop.fs.FSInputChecker");
+      = LogFactory.getLog(FSInputChecker.class);
     
     private ChecksumFileSystem fs;
     private FSDataInputStream datas;

Modified: hadoop/core/trunk/src/core/org/apache/hadoop/fs/FSInputChecker.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/core/org/apache/hadoop/fs/FSInputChecker.java?rev=686038&r1=686037&r2=686038&view=diff
==============================================================================
--- hadoop/core/trunk/src/core/org/apache/hadoop/fs/FSInputChecker.java (original)
+++ hadoop/core/trunk/src/core/org/apache/hadoop/fs/FSInputChecker.java Thu Aug 14 13:52:41
2008
@@ -32,7 +32,7 @@
 
 abstract public class FSInputChecker extends FSInputStream {
   public static final Log LOG 
-  = LogFactory.getLog("org.apache.hadoop.fs.FSInputChecker");
+  = LogFactory.getLog(FSInputChecker.class);
   
   /** The file name from which data is read from */
   protected Path file;

Modified: hadoop/core/trunk/src/core/org/apache/hadoop/fs/FileSystem.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/core/org/apache/hadoop/fs/FileSystem.java?rev=686038&r1=686037&r2=686038&view=diff
==============================================================================
--- hadoop/core/trunk/src/core/org/apache/hadoop/fs/FileSystem.java (original)
+++ hadoop/core/trunk/src/core/org/apache/hadoop/fs/FileSystem.java Thu Aug 14 13:52:41 2008
@@ -56,7 +56,7 @@
 public abstract class FileSystem extends Configured implements Closeable {
   private static final String FS_DEFAULT_NAME_KEY = "fs.default.name";
 
-  public static final Log LOG = LogFactory.getLog("org.apache.hadoop.fs.FileSystem");
+  public static final Log LOG = LogFactory.getLog(FileSystem.class);
 
   /** FileSystem cache */
   private static final Cache CACHE = new Cache();

Modified: hadoop/core/trunk/src/core/org/apache/hadoop/fs/LocalDirAllocator.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/core/org/apache/hadoop/fs/LocalDirAllocator.java?rev=686038&r1=686037&r2=686038&view=diff
==============================================================================
--- hadoop/core/trunk/src/core/org/apache/hadoop/fs/LocalDirAllocator.java (original)
+++ hadoop/core/trunk/src/core/org/apache/hadoop/fs/LocalDirAllocator.java Thu Aug 14 13:52:41
2008
@@ -189,7 +189,7 @@
   private static class AllocatorPerContext {
 
     private final Log LOG =
-      LogFactory.getLog("org.apache.hadoop.fs.AllocatorPerContext");
+      LogFactory.getLog(AllocatorPerContext.class);
 
     private int dirNumLastAccessed;
     private Random dirIndexRandomizer = new Random();

Modified: hadoop/core/trunk/src/core/org/apache/hadoop/fs/Trash.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/core/org/apache/hadoop/fs/Trash.java?rev=686038&r1=686037&r2=686038&view=diff
==============================================================================
--- hadoop/core/trunk/src/core/org/apache/hadoop/fs/Trash.java (original)
+++ hadoop/core/trunk/src/core/org/apache/hadoop/fs/Trash.java Thu Aug 14 13:52:41 2008
@@ -38,7 +38,7 @@
  */
 public class Trash extends Configured {
   private static final Log LOG =
-    LogFactory.getLog("org.apache.hadoop.fs.Trash");
+    LogFactory.getLog(Trash.class);
 
   private static final Path CURRENT = new Path("Current");
   private static final Path TRASH = new Path(".Trash/");

Modified: hadoop/core/trunk/src/core/org/apache/hadoop/fs/ftp/FTPFileSystem.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/core/org/apache/hadoop/fs/ftp/FTPFileSystem.java?rev=686038&r1=686037&r2=686038&view=diff
==============================================================================
--- hadoop/core/trunk/src/core/org/apache/hadoop/fs/ftp/FTPFileSystem.java (original)
+++ hadoop/core/trunk/src/core/org/apache/hadoop/fs/ftp/FTPFileSystem.java Thu Aug 14 13:52:41
2008
@@ -46,7 +46,7 @@
 public class FTPFileSystem extends FileSystem {
 
   public static final Log LOG = LogFactory
-      .getLog("org.apache.hadoop.util.FTPFileSystem");
+      .getLog(FTPFileSystem.class);
 
   public static final int DEFAULT_BUFFER_SIZE = 1024 * 1024;
 

Modified: hadoop/core/trunk/src/core/org/apache/hadoop/fs/s3native/NativeS3FileSystem.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/core/org/apache/hadoop/fs/s3native/NativeS3FileSystem.java?rev=686038&r1=686037&r2=686038&view=diff
==============================================================================
--- hadoop/core/trunk/src/core/org/apache/hadoop/fs/s3native/NativeS3FileSystem.java (original)
+++ hadoop/core/trunk/src/core/org/apache/hadoop/fs/s3native/NativeS3FileSystem.java Thu Aug
14 13:52:41 2008
@@ -67,7 +67,7 @@
 public class NativeS3FileSystem extends FileSystem {
   
   public static final Log LOG = 
-    LogFactory.getLog("org.apache.hadoop.fs.s3native.NativeS3FileSystem");
+    LogFactory.getLog(NativeS3FileSystem.class);
   
   private static final String FOLDER_SUFFIX = "_$folder$";
   private static final long MAX_S3_FILE_SIZE = 5 * 1024 * 1024 * 1024L;

Modified: hadoop/core/trunk/src/core/org/apache/hadoop/io/Text.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/core/org/apache/hadoop/io/Text.java?rev=686038&r1=686037&r2=686038&view=diff
==============================================================================
--- hadoop/core/trunk/src/core/org/apache/hadoop/io/Text.java (original)
+++ hadoop/core/trunk/src/core/org/apache/hadoop/io/Text.java Thu Aug 14 13:52:41 2008
@@ -45,7 +45,7 @@
  * string.
  */
 public class Text implements WritableComparable {
-  private static final Log LOG= LogFactory.getLog("org.apache.hadoop.io.Text");
+  private static final Log LOG= LogFactory.getLog(Text.class);
   
   private static ThreadLocal<CharsetEncoder> ENCODER_FACTORY =
     new ThreadLocal<CharsetEncoder>() {

Modified: hadoop/core/trunk/src/core/org/apache/hadoop/io/UTF8.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/core/org/apache/hadoop/io/UTF8.java?rev=686038&r1=686037&r2=686038&view=diff
==============================================================================
--- hadoop/core/trunk/src/core/org/apache/hadoop/io/UTF8.java (original)
+++ hadoop/core/trunk/src/core/org/apache/hadoop/io/UTF8.java Thu Aug 14 13:52:41 2008
@@ -32,7 +32,7 @@
  * @deprecated replaced by Text
  */
 public class UTF8 implements WritableComparable {
-  private static final Log LOG= LogFactory.getLog("org.apache.hadoop.io.UTF8");
+  private static final Log LOG= LogFactory.getLog(UTF8.class);
   private static final DataOutputBuffer OBUF = new DataOutputBuffer();
   private static final DataInputBuffer IBUF = new DataInputBuffer();
 

Modified: hadoop/core/trunk/src/core/org/apache/hadoop/io/compress/zlib/ZlibFactory.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/core/org/apache/hadoop/io/compress/zlib/ZlibFactory.java?rev=686038&r1=686037&r2=686038&view=diff
==============================================================================
--- hadoop/core/trunk/src/core/org/apache/hadoop/io/compress/zlib/ZlibFactory.java (original)
+++ hadoop/core/trunk/src/core/org/apache/hadoop/io/compress/zlib/ZlibFactory.java Thu Aug
14 13:52:41 2008
@@ -32,7 +32,7 @@
  */
 public class ZlibFactory {
   private static final Log LOG =
-    LogFactory.getLog("org.apache.hadoop.io.compress.zlib.ZlibFactory");
+    LogFactory.getLog(ZlibFactory.class);
 
   private static boolean nativeZlibLoaded = false;
   

Modified: hadoop/core/trunk/src/core/org/apache/hadoop/io/retry/RetryInvocationHandler.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/core/org/apache/hadoop/io/retry/RetryInvocationHandler.java?rev=686038&r1=686037&r2=686038&view=diff
==============================================================================
--- hadoop/core/trunk/src/core/org/apache/hadoop/io/retry/RetryInvocationHandler.java (original)
+++ hadoop/core/trunk/src/core/org/apache/hadoop/io/retry/RetryInvocationHandler.java Thu
Aug 14 13:52:41 2008
@@ -28,7 +28,7 @@
 import org.apache.hadoop.util.StringUtils;
 
 class RetryInvocationHandler implements InvocationHandler {
-  public static final Log LOG = LogFactory.getLog("org.apache.hadoop.io.retry.RetryInvocationHandler");
 
+  public static final Log LOG = LogFactory.getLog(RetryInvocationHandler.class);
   private Object implementation;
   
   private RetryPolicy defaultPolicy;

Modified: hadoop/core/trunk/src/core/org/apache/hadoop/ipc/Client.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/core/org/apache/hadoop/ipc/Client.java?rev=686038&r1=686037&r2=686038&view=diff
==============================================================================
--- hadoop/core/trunk/src/core/org/apache/hadoop/ipc/Client.java (original)
+++ hadoop/core/trunk/src/core/org/apache/hadoop/ipc/Client.java Thu Aug 14 13:52:41 2008
@@ -61,7 +61,7 @@
 public class Client {
   
   public static final Log LOG =
-    LogFactory.getLog("org.apache.hadoop.ipc.Client");
+    LogFactory.getLog(Client.class);
   private Hashtable<ConnectionId, Connection> connections =
     new Hashtable<ConnectionId, Connection>();
 

Modified: hadoop/core/trunk/src/core/org/apache/hadoop/ipc/RPC.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/core/org/apache/hadoop/ipc/RPC.java?rev=686038&r1=686037&r2=686038&view=diff
==============================================================================
--- hadoop/core/trunk/src/core/org/apache/hadoop/ipc/RPC.java (original)
+++ hadoop/core/trunk/src/core/org/apache/hadoop/ipc/RPC.java Thu Aug 14 13:52:41 2008
@@ -62,7 +62,7 @@
  */
 public class RPC {
   private static final Log LOG =
-    LogFactory.getLog("org.apache.hadoop.ipc.RPC");
+    LogFactory.getLog(RPC.class);
 
   private RPC() {}                                  // no public ctor
 

Modified: hadoop/core/trunk/src/core/org/apache/hadoop/ipc/Server.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/core/org/apache/hadoop/ipc/Server.java?rev=686038&r1=686037&r2=686038&view=diff
==============================================================================
--- hadoop/core/trunk/src/core/org/apache/hadoop/ipc/Server.java (original)
+++ hadoop/core/trunk/src/core/org/apache/hadoop/ipc/Server.java Thu Aug 14 13:52:41 2008
@@ -81,7 +81,7 @@
   private static final int MAX_QUEUE_SIZE_PER_HANDLER = 100;
   
   public static final Log LOG =
-    LogFactory.getLog("org.apache.hadoop.ipc.Server");
+    LogFactory.getLog(Server.class);
 
   private static final ThreadLocal<Server> SERVER = new ThreadLocal<Server>();
 

Modified: hadoop/core/trunk/src/core/org/apache/hadoop/metrics/MetricsUtil.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/core/org/apache/hadoop/metrics/MetricsUtil.java?rev=686038&r1=686037&r2=686038&view=diff
==============================================================================
--- hadoop/core/trunk/src/core/org/apache/hadoop/metrics/MetricsUtil.java (original)
+++ hadoop/core/trunk/src/core/org/apache/hadoop/metrics/MetricsUtil.java Thu Aug 14 13:52:41
2008
@@ -34,7 +34,7 @@
 public class MetricsUtil {
     
   private static final Log LOG =
-    LogFactory.getLog("org.apache.hadoop.util.MetricsUtil");
+    LogFactory.getLog(MetricsUtil.class);
 
   /**
    * Don't allow creation of a new instance of Metrics

Modified: hadoop/core/trunk/src/core/org/apache/hadoop/net/NetworkTopology.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/core/org/apache/hadoop/net/NetworkTopology.java?rev=686038&r1=686037&r2=686038&view=diff
==============================================================================
--- hadoop/core/trunk/src/core/org/apache/hadoop/net/NetworkTopology.java (original)
+++ hadoop/core/trunk/src/core/org/apache/hadoop/net/NetworkTopology.java Thu Aug 14 13:52:41
2008
@@ -40,7 +40,7 @@
   public final static String DEFAULT_RACK = "/default-rack";
   public final static int DEFAULT_HOST_LEVEL = 2;
   public static final Log LOG = 
-    LogFactory.getLog("org.apache.hadoop.net.NetworkTopology");
+    LogFactory.getLog(NetworkTopology.class);
     
   /* Inner Node represent a switch/router of a data center or rack.
    * Different from a leave node, it has non-null children.

Modified: hadoop/core/trunk/src/core/org/apache/hadoop/net/ScriptBasedMapping.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/core/org/apache/hadoop/net/ScriptBasedMapping.java?rev=686038&r1=686037&r2=686038&view=diff
==============================================================================
--- hadoop/core/trunk/src/core/org/apache/hadoop/net/ScriptBasedMapping.java (original)
+++ hadoop/core/trunk/src/core/org/apache/hadoop/net/ScriptBasedMapping.java Thu Aug 14 13:52:41
2008
@@ -57,7 +57,7 @@
   private Configuration conf;
   private int maxArgs; //max hostnames per call of the script
   private static Log LOG = 
-    LogFactory.getLog("org.apache.hadoop.net.ScriptBasedMapping");
+    LogFactory.getLog(ScriptBasedMapping.class);
   public void setConf (Configuration conf) {
     this.scriptName = conf.get("topology.script.file.name");
     this.maxArgs = conf.getInt("topology.script.number.args", 100);

Modified: hadoop/core/trunk/src/core/org/apache/hadoop/util/NativeCodeLoader.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/core/org/apache/hadoop/util/NativeCodeLoader.java?rev=686038&r1=686037&r2=686038&view=diff
==============================================================================
--- hadoop/core/trunk/src/core/org/apache/hadoop/util/NativeCodeLoader.java (original)
+++ hadoop/core/trunk/src/core/org/apache/hadoop/util/NativeCodeLoader.java Thu Aug 14 13:52:41
2008
@@ -30,7 +30,7 @@
 public class NativeCodeLoader {
 
   private static final Log LOG =
-    LogFactory.getLog("org.apache.hadoop.util.NativeCodeLoader");
+    LogFactory.getLog(NativeCodeLoader.class);
   
   private static boolean nativeCodeLoaded = false;
   

Modified: hadoop/core/trunk/src/hdfs/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/hdfs/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java?rev=686038&r1=686037&r2=686038&view=diff
==============================================================================
--- hadoop/core/trunk/src/hdfs/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java (original)
+++ hadoop/core/trunk/src/hdfs/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java Thu
Aug 14 13:52:41 2008
@@ -82,7 +82,7 @@
  * 5)  LRU cache of updated-heartbeat machines
  ***************************************************/
 public class FSNamesystem implements FSConstants, FSNamesystemMBean {
-  public static final Log LOG = LogFactory.getLog("org.apache.hadoop.fs.FSNamesystem");
+  public static final Log LOG = LogFactory.getLog(FSNamesystem.class);
   public static final String AUDIT_FORMAT =
     "ugi=%s\t" +  // ugi
     "ip=%s\t" +   // remote IP
@@ -113,7 +113,7 @@
   }
 
   public static final Log auditLog = LogFactory.getLog(
-      "org.apache.hadoop.fs.FSNamesystem.audit");
+      FSNamesystem.class + ".audit");
 
   private boolean isPermissionEnabled;
   private UserGroupInformation fsOwner;

Modified: hadoop/core/trunk/src/mapred/org/apache/hadoop/mapred/FileInputFormat.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/mapred/org/apache/hadoop/mapred/FileInputFormat.java?rev=686038&r1=686037&r2=686038&view=diff
==============================================================================
--- hadoop/core/trunk/src/mapred/org/apache/hadoop/mapred/FileInputFormat.java (original)
+++ hadoop/core/trunk/src/mapred/org/apache/hadoop/mapred/FileInputFormat.java Thu Aug 14
13:52:41 2008
@@ -47,7 +47,7 @@
 public abstract class FileInputFormat<K, V> implements InputFormat<K, V> {
 
   public static final Log LOG =
-    LogFactory.getLog("org.apache.hadoop.mapred.FileInputFormat");
+    LogFactory.getLog(FileInputFormat.class);
 
   private static final double SPLIT_SLOP = 1.1;   // 10% slop
 

Modified: hadoop/core/trunk/src/mapred/org/apache/hadoop/mapred/JobClient.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/mapred/org/apache/hadoop/mapred/JobClient.java?rev=686038&r1=686037&r2=686038&view=diff
==============================================================================
--- hadoop/core/trunk/src/mapred/org/apache/hadoop/mapred/JobClient.java (original)
+++ hadoop/core/trunk/src/mapred/org/apache/hadoop/mapred/JobClient.java Thu Aug 14 13:52:41
2008
@@ -150,7 +150,7 @@
  * @see DistributedCache
  */
 public class JobClient extends Configured implements MRConstants, Tool  {
-  private static final Log LOG = LogFactory.getLog("org.apache.hadoop.mapred.JobClient");
+  private static final Log LOG = LogFactory.getLog(JobClient.class);
   public static enum TaskStatusFilter { NONE, KILLED, FAILED, SUCCEEDED, ALL }
   private TaskStatusFilter taskOutputFilter = TaskStatusFilter.FAILED; 
   private static Configuration commandLineConfig;

Modified: hadoop/core/trunk/src/mapred/org/apache/hadoop/mapred/JobHistory.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/mapred/org/apache/hadoop/mapred/JobHistory.java?rev=686038&r1=686037&r2=686038&view=diff
==============================================================================
--- hadoop/core/trunk/src/mapred/org/apache/hadoop/mapred/JobHistory.java (original)
+++ hadoop/core/trunk/src/mapred/org/apache/hadoop/mapred/JobHistory.java Thu Aug 14 13:52:41
2008
@@ -62,7 +62,7 @@
  */
 public class JobHistory {
   
-  public static final Log LOG = LogFactory.getLog("org.apache.hadoop.mapred.JobHistory");
+  public static final Log LOG = LogFactory.getLog(JobHistory.class);
   private static final String DELIMITER = " ";
   private static final String KEY = "(\\w+)";
   private static final String VALUE = "[[^\"]?]+"; // anything but a " in ""

Modified: hadoop/core/trunk/src/mapred/org/apache/hadoop/mapred/JobInProgress.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/mapred/org/apache/hadoop/mapred/JobInProgress.java?rev=686038&r1=686037&r2=686038&view=diff
==============================================================================
--- hadoop/core/trunk/src/mapred/org/apache/hadoop/mapred/JobInProgress.java (original)
+++ hadoop/core/trunk/src/mapred/org/apache/hadoop/mapred/JobInProgress.java Thu Aug 14 13:52:41
2008
@@ -52,7 +52,7 @@
  * ***********************************************************
  */
 class JobInProgress {
-  private static final Log LOG = LogFactory.getLog("org.apache.hadoop.mapred.JobInProgress");
+  private static final Log LOG = LogFactory.getLog(JobInProgress.class);
     
   JobProfile profile;
   JobStatus status;

Modified: hadoop/core/trunk/src/mapred/org/apache/hadoop/mapred/JobTracker.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/mapred/org/apache/hadoop/mapred/JobTracker.java?rev=686038&r1=686037&r2=686038&view=diff
==============================================================================
--- hadoop/core/trunk/src/mapred/org/apache/hadoop/mapred/JobTracker.java (original)
+++ hadoop/core/trunk/src/mapred/org/apache/hadoop/mapred/JobTracker.java Thu Aug 14 13:52:41
2008
@@ -114,7 +114,7 @@
 
   private int nextJobId = 1;
 
-  public static final Log LOG = LogFactory.getLog("org.apache.hadoop.mapred.JobTracker");
+  public static final Log LOG = LogFactory.getLog(JobTracker.class);
     
   /**
    * Start the JobTracker with given configuration.

Modified: hadoop/core/trunk/src/mapred/org/apache/hadoop/mapred/LocalJobRunner.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/mapred/org/apache/hadoop/mapred/LocalJobRunner.java?rev=686038&r1=686037&r2=686038&view=diff
==============================================================================
--- hadoop/core/trunk/src/mapred/org/apache/hadoop/mapred/LocalJobRunner.java (original)
+++ hadoop/core/trunk/src/mapred/org/apache/hadoop/mapred/LocalJobRunner.java Thu Aug 14 13:52:41
2008
@@ -33,7 +33,7 @@
 /** Implements MapReduce locally, in-process, for debugging. */ 
 class LocalJobRunner implements JobSubmissionProtocol {
   public static final Log LOG =
-    LogFactory.getLog("org.apache.hadoop.mapred.LocalJobRunner");
+    LogFactory.getLog(LocalJobRunner.class);
 
   private FileSystem fs;
   private HashMap<JobID, Job> jobs = new HashMap<JobID, Job>();

Modified: hadoop/core/trunk/src/mapred/org/apache/hadoop/mapred/SortedRanges.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/mapred/org/apache/hadoop/mapred/SortedRanges.java?rev=686038&r1=686037&r2=686038&view=diff
==============================================================================
--- hadoop/core/trunk/src/mapred/org/apache/hadoop/mapred/SortedRanges.java (original)
+++ hadoop/core/trunk/src/mapred/org/apache/hadoop/mapred/SortedRanges.java Thu Aug 14 13:52:41
2008
@@ -38,7 +38,7 @@
 public class SortedRanges implements Writable{
   
   private static final Log LOG = 
-    LogFactory.getLog("org.apache.hadoop.mapred.SortedRanges");
+    LogFactory.getLog(SortedRanges.class);
   
   private SortedSet<Range> ranges = new TreeSet<Range>();
   private int indicesCount;

Modified: hadoop/core/trunk/src/mapred/org/apache/hadoop/mapred/TaskInProgress.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/mapred/org/apache/hadoop/mapred/TaskInProgress.java?rev=686038&r1=686037&r2=686038&view=diff
==============================================================================
--- hadoop/core/trunk/src/mapred/org/apache/hadoop/mapred/TaskInProgress.java (original)
+++ hadoop/core/trunk/src/mapred/org/apache/hadoop/mapred/TaskInProgress.java Thu Aug 14 13:52:41
2008
@@ -54,7 +54,7 @@
   static final double SPECULATIVE_GAP = 0.2;
   static final long SPECULATIVE_LAG = 60 * 1000;
 
-  public static final Log LOG = LogFactory.getLog("org.apache.hadoop.mapred.TaskInProgress");
+  public static final Log LOG = LogFactory.getLog(TaskInProgress.class);
 
   // Defines the TIP
   private String jobFile = null;

Modified: hadoop/core/trunk/src/mapred/org/apache/hadoop/mapred/TaskRunner.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/mapred/org/apache/hadoop/mapred/TaskRunner.java?rev=686038&r1=686037&r2=686038&view=diff
==============================================================================
--- hadoop/core/trunk/src/mapred/org/apache/hadoop/mapred/TaskRunner.java (original)
+++ hadoop/core/trunk/src/mapred/org/apache/hadoop/mapred/TaskRunner.java Thu Aug 14 13:52:41
2008
@@ -40,7 +40,7 @@
  */
 abstract class TaskRunner extends Thread {
   public static final Log LOG =
-    LogFactory.getLog("org.apache.hadoop.mapred.TaskRunner");
+    LogFactory.getLog(TaskRunner.class);
 
   volatile boolean killed = false;
   private ShellCommandExecutor shexec; // shell terminal for running the task

Modified: hadoop/core/trunk/src/mapred/org/apache/hadoop/mapred/TaskTracker.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/mapred/org/apache/hadoop/mapred/TaskTracker.java?rev=686038&r1=686037&r2=686038&view=diff
==============================================================================
--- hadoop/core/trunk/src/mapred/org/apache/hadoop/mapred/TaskTracker.java (original)
+++ hadoop/core/trunk/src/mapred/org/apache/hadoop/mapred/TaskTracker.java Thu Aug 14 13:52:41
2008
@@ -97,7 +97,7 @@
   static enum State {NORMAL, STALE, INTERRUPTED, DENIED}
 
   public static final Log LOG =
-    LogFactory.getLog("org.apache.hadoop.mapred.TaskTracker");
+    LogFactory.getLog(TaskTracker.class);
 
   private boolean running = true;
 

Modified: hadoop/core/trunk/src/test/org/apache/hadoop/hdfs/NNThroughputBenchmark.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/test/org/apache/hadoop/hdfs/NNThroughputBenchmark.java?rev=686038&r1=686037&r2=686038&view=diff
==============================================================================
--- hadoop/core/trunk/src/test/org/apache/hadoop/hdfs/NNThroughputBenchmark.java (original)
+++ hadoop/core/trunk/src/test/org/apache/hadoop/hdfs/NNThroughputBenchmark.java Thu Aug 14
13:52:41 2008
@@ -78,7 +78,7 @@
  * the specified number of threads and outputs the resulting stats.
  */
 public class NNThroughputBenchmark implements FSConstants {
-  private static final Log LOG = LogFactory.getLog("org.apache.hadoop.hdfs.NNThroughputBenchmark");
+  private static final Log LOG = LogFactory.getLog(NNThroughputBenchmark.class);
   private static final int BLOCK_SIZE = 16;
 
   static Configuration config;

Modified: hadoop/core/trunk/src/test/org/apache/hadoop/io/TestTextNonUTF8.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/test/org/apache/hadoop/io/TestTextNonUTF8.java?rev=686038&r1=686037&r2=686038&view=diff
==============================================================================
--- hadoop/core/trunk/src/test/org/apache/hadoop/io/TestTextNonUTF8.java (original)
+++ hadoop/core/trunk/src/test/org/apache/hadoop/io/TestTextNonUTF8.java Thu Aug 14 13:52:41
2008
@@ -28,7 +28,7 @@
 
 /** Unit tests for NonUTF8. */
 public class TestTextNonUTF8 extends TestCase {
-  private static final Log LOG= LogFactory.getLog("org.apache.hadoop.io.TestTextNonUTF8");
+  private static final Log LOG= LogFactory.getLog(TestTextNonUTF8.class);
 
   public void testNonUTF8() throws Exception{
     // this is a non UTF8 byte array

Modified: hadoop/core/trunk/src/test/org/apache/hadoop/io/compress/TestCodec.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/test/org/apache/hadoop/io/compress/TestCodec.java?rev=686038&r1=686037&r2=686038&view=diff
==============================================================================
--- hadoop/core/trunk/src/test/org/apache/hadoop/io/compress/TestCodec.java (original)
+++ hadoop/core/trunk/src/test/org/apache/hadoop/io/compress/TestCodec.java Thu Aug 14 13:52:41
2008
@@ -38,7 +38,7 @@
 public class TestCodec extends TestCase {
 
   private static final Log LOG= 
-    LogFactory.getLog("org.apache.hadoop.io.compress.TestCodec");
+    LogFactory.getLog(TestCodec.class);
 
   private Configuration conf = new Configuration();
   private int count = 10000;

Modified: hadoop/core/trunk/src/test/org/apache/hadoop/ipc/TestIPC.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/test/org/apache/hadoop/ipc/TestIPC.java?rev=686038&r1=686037&r2=686038&view=diff
==============================================================================
--- hadoop/core/trunk/src/test/org/apache/hadoop/ipc/TestIPC.java (original)
+++ hadoop/core/trunk/src/test/org/apache/hadoop/ipc/TestIPC.java Thu Aug 14 13:52:41 2008
@@ -36,7 +36,7 @@
 /** Unit tests for IPC. */
 public class TestIPC extends TestCase {
   public static final Log LOG =
-    LogFactory.getLog("org.apache.hadoop.ipc.TestIPC");
+    LogFactory.getLog(TestIPC.class);
   
   final private static Configuration conf = new Configuration();
   final static private int PING_INTERVAL = 1000;

Modified: hadoop/core/trunk/src/test/org/apache/hadoop/ipc/TestIPCServerResponder.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/test/org/apache/hadoop/ipc/TestIPCServerResponder.java?rev=686038&r1=686037&r2=686038&view=diff
==============================================================================
--- hadoop/core/trunk/src/test/org/apache/hadoop/ipc/TestIPCServerResponder.java (original)
+++ hadoop/core/trunk/src/test/org/apache/hadoop/ipc/TestIPCServerResponder.java Thu Aug 14
13:52:41 2008
@@ -38,7 +38,7 @@
 public class TestIPCServerResponder extends TestCase {
 
   public static final Log LOG = 
-            LogFactory.getLog("org.apache.hadoop.ipc.TestIPCServerResponder");
+            LogFactory.getLog(TestIPCServerResponder.class);
 
   private static Configuration conf = new Configuration();
 

Modified: hadoop/core/trunk/src/test/org/apache/hadoop/ipc/TestRPC.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/test/org/apache/hadoop/ipc/TestRPC.java?rev=686038&r1=686037&r2=686038&view=diff
==============================================================================
--- hadoop/core/trunk/src/test/org/apache/hadoop/ipc/TestRPC.java (original)
+++ hadoop/core/trunk/src/test/org/apache/hadoop/ipc/TestRPC.java Thu Aug 14 13:52:41 2008
@@ -40,7 +40,7 @@
   private static final String ADDRESS = "0.0.0.0";
 
   public static final Log LOG =
-    LogFactory.getLog("org.apache.hadoop.ipc.TestRPC");
+    LogFactory.getLog(TestRPC.class);
   
   private static Configuration conf = new Configuration();
 

Modified: hadoop/core/trunk/src/test/org/apache/hadoop/mapred/TestBadRecords.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/test/org/apache/hadoop/mapred/TestBadRecords.java?rev=686038&r1=686037&r2=686038&view=diff
==============================================================================
--- hadoop/core/trunk/src/test/org/apache/hadoop/mapred/TestBadRecords.java (original)
+++ hadoop/core/trunk/src/test/org/apache/hadoop/mapred/TestBadRecords.java Thu Aug 14 13:52:41
2008
@@ -40,7 +40,7 @@
 public class TestBadRecords extends ClusterMapReduceTestCase {
   
   private static final Log LOG = 
-    LogFactory.getLog("org.apache.hadoop.mapred.TestBadRecords");
+    LogFactory.getLog(TestBadRecords.class);
   
   private static final List<String> MAPPER_BAD_RECORDS = 
     Arrays.asList("hello01","hello04","hello05");

Modified: hadoop/core/trunk/src/test/org/apache/hadoop/mapred/TestSortedRanges.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/test/org/apache/hadoop/mapred/TestSortedRanges.java?rev=686038&r1=686037&r2=686038&view=diff
==============================================================================
--- hadoop/core/trunk/src/test/org/apache/hadoop/mapred/TestSortedRanges.java (original)
+++ hadoop/core/trunk/src/test/org/apache/hadoop/mapred/TestSortedRanges.java Thu Aug 14 13:52:41
2008
@@ -27,7 +27,7 @@
 
 public class TestSortedRanges extends TestCase {
   private static final Log LOG = 
-    LogFactory.getLog("org.apache.hadoop.mapred.TestSortedRanges");
+    LogFactory.getLog(TestSortedRanges.class);
   
   public void testAdd() {
     SortedRanges sr = new SortedRanges();

Modified: hadoop/core/trunk/src/tools/org/apache/hadoop/tools/Logalyzer.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/tools/org/apache/hadoop/tools/Logalyzer.java?rev=686038&r1=686037&r2=686038&view=diff
==============================================================================
--- hadoop/core/trunk/src/tools/org/apache/hadoop/tools/Logalyzer.java (original)
+++ hadoop/core/trunk/src/tools/org/apache/hadoop/tools/Logalyzer.java Thu Aug 14 13:52:41
2008
@@ -92,7 +92,7 @@
   /** A WritableComparator optimized for UTF8 keys of the logs. */
   public static class LogComparator extends Text.Comparator implements Configurable {
     
-    private static Log LOG = LogFactory.getLog("org.apache.hadoop.tools.Logalyzer");
+    private static Log LOG = LogFactory.getLog(Logalyzer.class);
     private JobConf conf = null;
     private String[] sortSpec = null;
     private String columnSeparator = null;
@@ -237,7 +237,7 @@
   
   public static void main(String[] args) {
     
-    Log LOG = LogFactory.getLog("org.apache.hadoop.tools.Logalyzer");
+    Log LOG = LogFactory.getLog(Logalyzer.class);
     
     String version = "Logalyzer.0.0.1";
     String usage = "Usage: Logalyzer [-archive -logs <urlsFile>] " +



Mime
View raw message