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 a22cd12921..ff71d00445 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 @@ * 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; 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 cb88703c8b..3f3aba9def 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.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 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 void testAddingNewPoolWorks() 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