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:
Takanobu Asanuma 2018-01-15 15:38:03 +09:00 committed by Akira Ajisaka
parent 7016dd44e0
commit 1a9c5d479e
No known key found for this signature in database
GPG Key ID: C1EDBB9CA400FD50
4 changed files with 16 additions and 12 deletions

View File

@ -22,8 +22,6 @@
import java.net.URI;
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.InterfaceStability.Unstable;
import org.apache.hadoop.conf.Configuration;
@ -36,6 +34,8 @@
import org.apache.hadoop.yarn.api.records.LocalResourceType;
import org.apache.hadoop.yarn.api.records.LocalResourceVisibility;
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
@ -45,7 +45,8 @@
@Private
@Unstable
class LocalResourceBuilder {
public static final Log LOG = LogFactory.getLog(LocalResourceBuilder.class);
public static final Logger LOG =
LoggerFactory.getLogger(LocalResourceBuilder.class);
private Configuration conf;
private LocalResourceType type;

View File

@ -19,13 +19,13 @@
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.InterfaceStability.Unstable;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.util.StringUtils;
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
@ -34,7 +34,8 @@
@Private
@Unstable
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 sharedCacheLibjarsEnabled = false;

View File

@ -37,8 +37,6 @@
import java.util.zip.ZipEntry;
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.fs.CommonConfigurationKeys;
import org.apache.hadoop.fs.FSDataOutputStream;
@ -58,13 +56,15 @@
import org.junit.Test;
import org.mockito.invocation.InvocationOnMock;
import org.mockito.stubbing.Answer;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* Tests the JobResourceUploader class with the shared cache.
*/
public class TestJobResourceUploaderWithSharedCache {
protected static final Log LOG = LogFactory
.getLog(TestJobResourceUploaderWithSharedCache.class);
protected static final Logger LOG = LoggerFactory
.getLogger(TestJobResourceUploaderWithSharedCache.class);
private static MiniDFSCluster dfs;
private static FileSystem localFs;
private static FileSystem remoteFs;

View File

@ -34,7 +34,6 @@
import java.net.InetSocketAddress;
import java.net.URI;
import org.apache.commons.logging.Log;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.conf.Configured;
import org.apache.hadoop.hdfs.MiniDFSCluster;
@ -49,6 +48,8 @@
import org.apache.hadoop.security.UserGroupInformation;
import org.apache.hadoop.util.StringUtils;
import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotSame;
@ -57,7 +58,8 @@
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 int BUFFER_SIZE = conf.getInt("io.file.buffer.size", 4096);