MAPREDUCE-7034. Moving logging APIs over to slf4j the rest of all in hadoop-mapreduce
Signed-off-by: Akira Ajisaka <aajisaka@apache.org>
This commit is contained in:
parent
7016dd44e0
commit
1a9c5d479e
|
@ -22,8 +22,6 @@ import java.io.IOException;
|
||||||
import java.net.URI;
|
import java.net.URI;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import org.apache.commons.logging.Log;
|
|
||||||
import org.apache.commons.logging.LogFactory;
|
|
||||||
import org.apache.hadoop.classification.InterfaceAudience.Private;
|
import org.apache.hadoop.classification.InterfaceAudience.Private;
|
||||||
import org.apache.hadoop.classification.InterfaceStability.Unstable;
|
import org.apache.hadoop.classification.InterfaceStability.Unstable;
|
||||||
import org.apache.hadoop.conf.Configuration;
|
import org.apache.hadoop.conf.Configuration;
|
||||||
|
@ -36,6 +34,8 @@ import org.apache.hadoop.yarn.api.records.LocalResource;
|
||||||
import org.apache.hadoop.yarn.api.records.LocalResourceType;
|
import org.apache.hadoop.yarn.api.records.LocalResourceType;
|
||||||
import org.apache.hadoop.yarn.api.records.LocalResourceVisibility;
|
import org.apache.hadoop.yarn.api.records.LocalResourceVisibility;
|
||||||
import org.apache.hadoop.yarn.api.records.URL;
|
import org.apache.hadoop.yarn.api.records.URL;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Helper class for MR applications that parses distributed cache artifacts and
|
* Helper class for MR applications that parses distributed cache artifacts and
|
||||||
|
@ -45,7 +45,8 @@ import org.apache.hadoop.yarn.api.records.URL;
|
||||||
@Private
|
@Private
|
||||||
@Unstable
|
@Unstable
|
||||||
class LocalResourceBuilder {
|
class LocalResourceBuilder {
|
||||||
public static final Log LOG = LogFactory.getLog(LocalResourceBuilder.class);
|
public static final Logger LOG =
|
||||||
|
LoggerFactory.getLogger(LocalResourceBuilder.class);
|
||||||
|
|
||||||
private Configuration conf;
|
private Configuration conf;
|
||||||
private LocalResourceType type;
|
private LocalResourceType type;
|
||||||
|
|
|
@ -19,13 +19,13 @@ package org.apache.hadoop.mapreduce;
|
||||||
|
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
|
|
||||||
import org.apache.commons.logging.Log;
|
|
||||||
import org.apache.commons.logging.LogFactory;
|
|
||||||
import org.apache.hadoop.classification.InterfaceAudience.Private;
|
import org.apache.hadoop.classification.InterfaceAudience.Private;
|
||||||
import org.apache.hadoop.classification.InterfaceStability.Unstable;
|
import org.apache.hadoop.classification.InterfaceStability.Unstable;
|
||||||
import org.apache.hadoop.conf.Configuration;
|
import org.apache.hadoop.conf.Configuration;
|
||||||
import org.apache.hadoop.util.StringUtils;
|
import org.apache.hadoop.util.StringUtils;
|
||||||
import org.apache.hadoop.yarn.conf.YarnConfiguration;
|
import org.apache.hadoop.yarn.conf.YarnConfiguration;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A class for parsing configuration parameters associated with the shared
|
* A class for parsing configuration parameters associated with the shared
|
||||||
|
@ -34,7 +34,8 @@ import org.apache.hadoop.yarn.conf.YarnConfiguration;
|
||||||
@Private
|
@Private
|
||||||
@Unstable
|
@Unstable
|
||||||
public class SharedCacheConfig {
|
public class SharedCacheConfig {
|
||||||
protected static final Log LOG = LogFactory.getLog(SharedCacheConfig.class);
|
protected static final Logger LOG =
|
||||||
|
LoggerFactory.getLogger(SharedCacheConfig.class);
|
||||||
|
|
||||||
private boolean sharedCacheFilesEnabled = false;
|
private boolean sharedCacheFilesEnabled = false;
|
||||||
private boolean sharedCacheLibjarsEnabled = false;
|
private boolean sharedCacheLibjarsEnabled = false;
|
||||||
|
|
|
@ -37,8 +37,6 @@ import java.util.jar.JarOutputStream;
|
||||||
import java.util.zip.ZipEntry;
|
import java.util.zip.ZipEntry;
|
||||||
import java.util.zip.ZipOutputStream;
|
import java.util.zip.ZipOutputStream;
|
||||||
|
|
||||||
import org.apache.commons.logging.Log;
|
|
||||||
import org.apache.commons.logging.LogFactory;
|
|
||||||
import org.apache.hadoop.conf.Configuration;
|
import org.apache.hadoop.conf.Configuration;
|
||||||
import org.apache.hadoop.fs.CommonConfigurationKeys;
|
import org.apache.hadoop.fs.CommonConfigurationKeys;
|
||||||
import org.apache.hadoop.fs.FSDataOutputStream;
|
import org.apache.hadoop.fs.FSDataOutputStream;
|
||||||
|
@ -58,13 +56,15 @@ import org.junit.BeforeClass;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
import org.mockito.invocation.InvocationOnMock;
|
import org.mockito.invocation.InvocationOnMock;
|
||||||
import org.mockito.stubbing.Answer;
|
import org.mockito.stubbing.Answer;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Tests the JobResourceUploader class with the shared cache.
|
* Tests the JobResourceUploader class with the shared cache.
|
||||||
*/
|
*/
|
||||||
public class TestJobResourceUploaderWithSharedCache {
|
public class TestJobResourceUploaderWithSharedCache {
|
||||||
protected static final Log LOG = LogFactory
|
protected static final Logger LOG = LoggerFactory
|
||||||
.getLog(TestJobResourceUploaderWithSharedCache.class);
|
.getLogger(TestJobResourceUploaderWithSharedCache.class);
|
||||||
private static MiniDFSCluster dfs;
|
private static MiniDFSCluster dfs;
|
||||||
private static FileSystem localFs;
|
private static FileSystem localFs;
|
||||||
private static FileSystem remoteFs;
|
private static FileSystem remoteFs;
|
||||||
|
|
|
@ -34,7 +34,6 @@ import java.util.HashMap;
|
||||||
import java.net.InetSocketAddress;
|
import java.net.InetSocketAddress;
|
||||||
import java.net.URI;
|
import java.net.URI;
|
||||||
|
|
||||||
import org.apache.commons.logging.Log;
|
|
||||||
import org.apache.hadoop.conf.Configuration;
|
import org.apache.hadoop.conf.Configuration;
|
||||||
import org.apache.hadoop.conf.Configured;
|
import org.apache.hadoop.conf.Configured;
|
||||||
import org.apache.hadoop.hdfs.MiniDFSCluster;
|
import org.apache.hadoop.hdfs.MiniDFSCluster;
|
||||||
|
@ -49,6 +48,8 @@ import org.apache.hadoop.mapred.lib.LongSumReducer;
|
||||||
import org.apache.hadoop.security.UserGroupInformation;
|
import org.apache.hadoop.security.UserGroupInformation;
|
||||||
import org.apache.hadoop.util.StringUtils;
|
import org.apache.hadoop.util.StringUtils;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
import static org.junit.Assert.assertTrue;
|
import static org.junit.Assert.assertTrue;
|
||||||
import static org.junit.Assert.assertEquals;
|
import static org.junit.Assert.assertEquals;
|
||||||
import static org.junit.Assert.assertNotSame;
|
import static org.junit.Assert.assertNotSame;
|
||||||
|
@ -57,7 +58,8 @@ import static org.junit.Assert.fail;
|
||||||
|
|
||||||
|
|
||||||
public class TestFileSystem {
|
public class TestFileSystem {
|
||||||
private static final Log LOG = FileSystem.LOG;
|
private static final Logger LOG =
|
||||||
|
LoggerFactory.getLogger(TestFileSystem.class);
|
||||||
|
|
||||||
private static Configuration conf = new Configuration();
|
private static Configuration conf = new Configuration();
|
||||||
private static int BUFFER_SIZE = conf.getInt("io.file.buffer.size", 4096);
|
private static int BUFFER_SIZE = conf.getInt("io.file.buffer.size", 4096);
|
||||||
|
|
Loading…
Reference in New Issue