You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by aa...@apache.org on 2017/08/01 06:05:43 UTC
hadoop git commit: MAPREDUCE-6921.
TestUmbilicalProtocolWithJobToken#testJobTokenRpc fails. Contributed by Sonia
Garudi.
Repository: hadoop
Updated Branches:
refs/heads/branch-2 f09d20cff -> 338d84ab7
MAPREDUCE-6921. TestUmbilicalProtocolWithJobToken#testJobTokenRpc fails. Contributed by Sonia Garudi.
(cherry picked from commit ceacadc51e58bb94ad3f3669488515a61e886d88)
Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/338d84ab
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/338d84ab
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/338d84ab
Branch: refs/heads/branch-2
Commit: 338d84ab71e1be1822322598cc6d90ffa7ad4a77
Parents: f09d20c
Author: Akira Ajisaka <aa...@apache.org>
Authored: Tue Aug 1 14:56:42 2017 +0900
Committer: Akira Ajisaka <aa...@apache.org>
Committed: Tue Aug 1 15:02:20 2017 +0900
----------------------------------------------------------------------
.../TestUmbilicalProtocolWithJobToken.java | 22 +++++++++-----------
1 file changed, 10 insertions(+), 12 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hadoop/blob/338d84ab/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapreduce/security/TestUmbilicalProtocolWithJobToken.java
----------------------------------------------------------------------
diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapreduce/security/TestUmbilicalProtocolWithJobToken.java b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapreduce/security/TestUmbilicalProtocolWithJobToken.java
index 8b3ba3a..4a04e4e 100644
--- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapreduce/security/TestUmbilicalProtocolWithJobToken.java
+++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapreduce/security/TestUmbilicalProtocolWithJobToken.java
@@ -29,12 +29,10 @@ import static org.mockito.Mockito.doReturn;
import java.net.InetSocketAddress;
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.io.Text;
+import org.apache.hadoop.test.GenericTestUtils;
import org.apache.hadoop.ipc.Client;
import org.apache.hadoop.ipc.RPC;
import org.apache.hadoop.ipc.Server;
@@ -49,9 +47,10 @@ import org.apache.hadoop.security.SaslRpcClient;
import org.apache.hadoop.security.SaslRpcServer;
import org.apache.hadoop.security.SecurityUtil;
import org.apache.hadoop.security.UserGroupInformation;
-
-import org.apache.log4j.Level;
+import org.slf4j.Logger;
+import org.slf4j.event.Level;
import org.junit.Test;
+import static org.slf4j.LoggerFactory.getLogger;
/** Unit tests for using Job Token over RPC.
*
@@ -62,8 +61,7 @@ import org.junit.Test;
public class TestUmbilicalProtocolWithJobToken {
private static final String ADDRESS = "0.0.0.0";
- public static final Log LOG = LogFactory
- .getLog(TestUmbilicalProtocolWithJobToken.class);
+ public static final Logger LOG = getLogger(TestUmbilicalProtocolWithJobToken.class);
private static Configuration conf;
static {
@@ -73,11 +71,11 @@ public class TestUmbilicalProtocolWithJobToken {
}
static {
- ((Log4JLogger) Client.LOG).getLogger().setLevel(Level.ALL);
- ((Log4JLogger) Server.LOG).getLogger().setLevel(Level.ALL);
- ((Log4JLogger) SaslRpcClient.LOG).getLogger().setLevel(Level.ALL);
- ((Log4JLogger) SaslRpcServer.LOG).getLogger().setLevel(Level.ALL);
- ((Log4JLogger) SaslInputStream.LOG).getLogger().setLevel(Level.ALL);
+ GenericTestUtils.setLogLevel(Client.LOG, Level.TRACE);
+ GenericTestUtils.setLogLevel(Server.LOG, Level.TRACE);
+ GenericTestUtils.setLogLevel(SaslRpcClient.LOG, Level.TRACE);
+ GenericTestUtils.setLogLevel(SaslRpcServer.LOG, Level.TRACE);
+ GenericTestUtils.setLogLevel(SaslInputStream.LOG, Level.TRACE);
}
@Test
---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org