MAPREDUCE-6921. TestUmbilicalProtocolWithJobToken#testJobTokenRpc fails.

This commit is contained in:
Akira Ajisaka 2017-08-01 14:56:42 +09:00
parent a4aa1cb405
commit ceacadc51e
No known key found for this signature in database
GPG Key ID: C1EDBB9CA400FD50

View File

@ -29,12 +29,10 @@
import java.net.InetSocketAddress; import java.net.InetSocketAddress;
import java.security.PrivilegedExceptionAction; import java.security.PrivilegedExceptionAction;
import org.apache.commons.logging.*;
import org.apache.commons.logging.impl.Log4JLogger;
import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.io.Text; import org.apache.hadoop.io.Text;
import org.apache.hadoop.test.GenericTestUtils;
import org.apache.hadoop.ipc.Client; import org.apache.hadoop.ipc.Client;
import org.apache.hadoop.ipc.RPC; import org.apache.hadoop.ipc.RPC;
import org.apache.hadoop.ipc.Server; import org.apache.hadoop.ipc.Server;
@ -49,9 +47,10 @@
import org.apache.hadoop.security.SaslRpcServer; import org.apache.hadoop.security.SaslRpcServer;
import org.apache.hadoop.security.SecurityUtil; import org.apache.hadoop.security.SecurityUtil;
import org.apache.hadoop.security.UserGroupInformation; import org.apache.hadoop.security.UserGroupInformation;
import org.slf4j.Logger;
import org.apache.log4j.Level; import org.slf4j.event.Level;
import org.junit.Test; import org.junit.Test;
import static org.slf4j.LoggerFactory.getLogger;
/** Unit tests for using Job Token over RPC. /** Unit tests for using Job Token over RPC.
* *
@ -62,8 +61,7 @@
public class TestUmbilicalProtocolWithJobToken { public class TestUmbilicalProtocolWithJobToken {
private static final String ADDRESS = "0.0.0.0"; private static final String ADDRESS = "0.0.0.0";
public static final Log LOG = LogFactory public static final Logger LOG = getLogger(TestUmbilicalProtocolWithJobToken.class);
.getLog(TestUmbilicalProtocolWithJobToken.class);
private static Configuration conf; private static Configuration conf;
static { static {
@ -73,11 +71,11 @@ public class TestUmbilicalProtocolWithJobToken {
} }
static { static {
((Log4JLogger) Client.LOG).getLogger().setLevel(Level.ALL); GenericTestUtils.setLogLevel(Client.LOG, Level.TRACE);
((Log4JLogger) Server.LOG).getLogger().setLevel(Level.ALL); GenericTestUtils.setLogLevel(Server.LOG, Level.TRACE);
((Log4JLogger) SaslRpcClient.LOG).getLogger().setLevel(Level.ALL); GenericTestUtils.setLogLevel(SaslRpcClient.LOG, Level.TRACE);
((Log4JLogger) SaslRpcServer.LOG).getLogger().setLevel(Level.ALL); GenericTestUtils.setLogLevel(SaslRpcServer.LOG, Level.TRACE);
((Log4JLogger) SaslInputStream.LOG).getLogger().setLevel(Level.ALL); GenericTestUtils.setLogLevel(SaslInputStream.LOG, Level.TRACE);
} }
@Test @Test