hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From x...@apache.org
Subject hadoop git commit: HDFS-12181. Ozone: Fix TestContainerReplicationManager by setting proper log level for LogCapturer. Contributed by Mukul Kumar Singh.
Date Fri, 21 Jul 2017 21:20:46 GMT
Repository: hadoop
Updated Branches:
  refs/heads/HDFS-7240 f801454ad -> 4ddae60c8


HDFS-12181. Ozone: Fix TestContainerReplicationManager by setting proper log level for LogCapturer.
Contributed by Mukul Kumar Singh.


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/4ddae60c
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/4ddae60c
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/4ddae60c

Branch: refs/heads/HDFS-7240
Commit: 4ddae60c89090138306def0079f33ed3b71fcf16
Parents: f801454
Author: Xiaoyu Yao <xyao@apache.org>
Authored: Fri Jul 21 14:19:26 2017 -0700
Committer: Xiaoyu Yao <xyao@apache.org>
Committed: Fri Jul 21 14:20:20 2017 -0700

----------------------------------------------------------------------
 .../scm/container/replication/ContainerReplicationManager.java | 2 +-
 .../container/replication/TestContainerReplicationManager.java | 6 ++++--
 2 files changed, 5 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/4ddae60c/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/ozone/scm/container/replication/ContainerReplicationManager.java
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/ozone/scm/container/replication/ContainerReplicationManager.java
b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/ozone/scm/container/replication/ContainerReplicationManager.java
index a22cd12..ff71d00 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/ozone/scm/container/replication/ContainerReplicationManager.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/ozone/scm/container/replication/ContainerReplicationManager.java
@@ -64,7 +64,7 @@ import static org.apache.hadoop.scm.ScmConfigKeys
  * computes the replication levels for each container.
  */
 public class ContainerReplicationManager implements Closeable {
-  static final Logger LOG =
+  public static final Logger LOG =
       LoggerFactory.getLogger(ContainerReplicationManager.class);
 
   private final NodePoolManager poolManager;

http://git-wip-us.apache.org/repos/asf/hadoop/blob/4ddae60c/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/ozone/container/replication/TestContainerReplicationManager.java
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/ozone/container/replication/TestContainerReplicationManager.java
b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/ozone/container/replication/TestContainerReplicationManager.java
index cb88703..3f3aba9 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/ozone/container/replication/TestContainerReplicationManager.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/ozone/container/replication/TestContainerReplicationManager.java
@@ -35,7 +35,7 @@ import org.apache.hadoop.ozone.scm.node.NodeManager;
 import org.apache.hadoop.ozone.scm.node.NodePoolManager;
 import org.apache.hadoop.test.GenericTestUtils;
 import org.apache.hadoop.test.GenericTestUtils.LogCapturer;
-import org.apache.log4j.Level;
+import org.slf4j.event.Level;
 import org.junit.After;
 import org.junit.Assert;
 import org.junit.Before;
@@ -74,10 +74,12 @@ public class TestContainerReplicationManager {
   @After
   public void tearDown() throws Exception {
     logCapturer.stopCapturing();
+    GenericTestUtils.setLogLevel(ContainerReplicationManager.LOG, Level.INFO);
   }
 
   @Before
   public void setUp() throws Exception {
+    GenericTestUtils.setLogLevel(ContainerReplicationManager.LOG, Level.DEBUG);
     Map<DatanodeID, NodeManager.NODESTATE> nodeStateMap = new HashMap<>();
     // We are setting up 3 pools with 24 nodes each in this cluster.
     // First we create 72 Datanodes.
@@ -234,7 +236,7 @@ public class TestContainerReplicationManager {
       throws TimeoutException, InterruptedException, IOException {
     LogCapturer inProgressLog = LogCapturer.captureLogs(
         LogFactory.getLog(InProgressPool.class));
-    GenericTestUtils.setLogLevel(InProgressPool.LOG, Level.ALL);
+    GenericTestUtils.setLogLevel(InProgressPool.LOG, Level.DEBUG);
     try {
       DatanodeID id = SCMTestUtils.getDatanodeID();
       ((ReplicationNodeManagerMock) (nodeManager)).addNode(id, NodeManager


---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org


Mime
View raw message