YARN-6975. Moving logging APIs over to slf4j in hadoop-yarn-server-tests, hadoop-yarn-server-web-proxy and hadoop-yarn-server-router. Contributed by Yeliang Cang.
This commit is contained in:
parent
b34b3ff94b
commit
acf5b880d8
@ -33,8 +33,6 @@
|
||||
import javax.ws.rs.core.Response;
|
||||
import javax.ws.rs.core.Response.ResponseBuilder;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.apache.hadoop.security.UserGroupInformation;
|
||||
import org.apache.hadoop.yarn.api.records.YarnApplicationState;
|
||||
import org.apache.hadoop.yarn.server.resourcemanager.webapp.RMWebAppUtil;
|
||||
@ -54,6 +52,8 @@
|
||||
import com.sun.jersey.api.client.WebResource;
|
||||
import com.sun.jersey.api.client.WebResource.Builder;
|
||||
import com.sun.jersey.core.util.MultivaluedMapImpl;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
/**
|
||||
* The Router webservice util class.
|
||||
@ -62,8 +62,8 @@ public final class RouterWebServiceUtil {
|
||||
|
||||
private static String user = "YarnRouter";
|
||||
|
||||
private static final Log LOG =
|
||||
LogFactory.getLog(RouterWebServiceUtil.class.getName());
|
||||
private static final Logger LOG =
|
||||
LoggerFactory.getLogger(RouterWebServiceUtil.class.getName());
|
||||
|
||||
private final static String PARTIAL_REPORT = "Partial Report ";
|
||||
|
||||
|
@ -23,8 +23,6 @@
|
||||
import java.io.IOException;
|
||||
|
||||
import org.apache.commons.io.IOUtils;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.apache.hadoop.io.Text;
|
||||
import org.apache.hadoop.yarn.api.records.ContainerId;
|
||||
import org.apache.hadoop.yarn.api.records.LogAggregationContext;
|
||||
@ -40,10 +38,12 @@
|
||||
import org.apache.hadoop.yarn.proto.YarnSecurityTestTokenProtos.ContainerTokenIdentifierForTestProto;
|
||||
|
||||
import com.google.protobuf.TextFormat;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
public class ContainerTokenIdentifierForTest extends ContainerTokenIdentifier {
|
||||
|
||||
private static Log LOG = LogFactory.getLog(ContainerTokenIdentifier.class);
|
||||
private static Logger LOG = LoggerFactory.getLogger(ContainerTokenIdentifier.class);
|
||||
|
||||
public static final Text KIND = new Text("ContainerToken");
|
||||
|
||||
|
@ -28,8 +28,6 @@
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.concurrent.ConcurrentMap;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.apache.hadoop.classification.InterfaceAudience;
|
||||
import org.apache.hadoop.classification.InterfaceStability;
|
||||
import org.apache.hadoop.conf.Configuration;
|
||||
@ -100,6 +98,8 @@
|
||||
import org.apache.hadoop.yarn.webapp.util.WebAppUtils;
|
||||
|
||||
import com.google.common.annotations.VisibleForTesting;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import static org.apache.hadoop.yarn.server.resourcemanager.resource.TestResourceProfiles.TEST_CONF_RESET_RESOURCE_TYPES;
|
||||
|
||||
@ -126,7 +126,8 @@
|
||||
@InterfaceStability.Evolving
|
||||
public class MiniYARNCluster extends CompositeService {
|
||||
|
||||
private static final Log LOG = LogFactory.getLog(MiniYARNCluster.class);
|
||||
private static final Logger LOG =
|
||||
LoggerFactory.getLogger(MiniYARNCluster.class);
|
||||
|
||||
// temp fix until metrics system can auto-detect itself running in unit test:
|
||||
static {
|
||||
|
@ -23,8 +23,6 @@
|
||||
import java.io.IOException;
|
||||
|
||||
import org.apache.commons.io.IOUtils;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.apache.hadoop.io.Text;
|
||||
import org.apache.hadoop.security.UserGroupInformation;
|
||||
import org.apache.hadoop.security.token.TokenIdentifier;
|
||||
@ -36,10 +34,12 @@
|
||||
import org.apache.hadoop.yarn.security.NMTokenIdentifier;
|
||||
|
||||
import com.google.protobuf.TextFormat;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
public class NMTokenIdentifierNewForTest extends NMTokenIdentifier {
|
||||
|
||||
private static Log LOG = LogFactory.getLog(NMTokenIdentifierNewForTest.class);
|
||||
private static Logger LOG = LoggerFactory.getLogger(NMTokenIdentifierNewForTest.class);
|
||||
|
||||
public static final Text KIND = new Text("NMToken");
|
||||
|
||||
|
@ -29,8 +29,6 @@
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.apache.hadoop.conf.Configuration;
|
||||
import org.apache.hadoop.fs.CommonConfigurationKeysPublic;
|
||||
import org.apache.hadoop.io.DataInputBuffer;
|
||||
@ -83,12 +81,14 @@
|
||||
import org.junit.runner.RunWith;
|
||||
import org.junit.runners.Parameterized;
|
||||
import org.junit.runners.Parameterized.Parameters;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
|
||||
@RunWith(Parameterized.class)
|
||||
public class TestContainerManagerSecurity extends KerberosSecurityTestcase {
|
||||
|
||||
static Log LOG = LogFactory.getLog(TestContainerManagerSecurity.class);
|
||||
static Logger LOG = LoggerFactory.getLogger(TestContainerManagerSecurity.class);
|
||||
static final RecordFactory recordFactory = RecordFactoryProvider
|
||||
.getRecordFactory(null);
|
||||
private static MiniYARNCluster yarnCluster;
|
||||
|
@ -18,8 +18,6 @@
|
||||
|
||||
package org.apache.hadoop.yarn.server;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.apache.hadoop.conf.Configuration;
|
||||
import org.apache.hadoop.fs.FileContext;
|
||||
import org.apache.hadoop.fs.FileUtil;
|
||||
@ -45,6 +43,8 @@
|
||||
import org.junit.Test;
|
||||
|
||||
import org.junit.Assert;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
/**
|
||||
* Verify if NodeManager's in-memory good local dirs list and good log dirs list
|
||||
@ -54,7 +54,7 @@
|
||||
*/
|
||||
public class TestDiskFailures {
|
||||
|
||||
private static final Log LOG = LogFactory.getLog(TestDiskFailures.class);
|
||||
private static final Logger LOG = LoggerFactory.getLogger(TestDiskFailures.class);
|
||||
|
||||
private static final long DISK_HEALTH_CHECK_INTERVAL = 1000;//1 sec
|
||||
|
||||
|
@ -19,8 +19,6 @@
|
||||
package org.apache.hadoop.yarn.server.webproxy;
|
||||
|
||||
import java.io.IOException;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.apache.hadoop.conf.Configuration;
|
||||
import org.apache.hadoop.ipc.RPC;
|
||||
import org.apache.hadoop.yarn.api.ApplicationClientProtocol;
|
||||
@ -42,7 +40,6 @@
|
||||
*/
|
||||
public class AppReportFetcher {
|
||||
enum AppReportSource { RM, AHS }
|
||||
private static final Log LOG = LogFactory.getLog(AppReportFetcher.class);
|
||||
private final Configuration conf;
|
||||
private final ApplicationClientProtocol applicationsManager;
|
||||
private final ApplicationHistoryProtocol historyManager;
|
||||
|
Loading…
Reference in New Issue
Block a user