diff --git a/hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/mapreduce/TestCellBasedHFileOutputFormat2.java b/hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/mapreduce/TestCellBasedHFileOutputFormat2.java index 42ef33786a1..9367b815aab 100644 --- a/hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/mapreduce/TestCellBasedHFileOutputFormat2.java +++ b/hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/mapreduce/TestCellBasedHFileOutputFormat2.java @@ -39,8 +39,6 @@ import java.util.Set; import java.util.concurrent.Callable; import java.util.stream.Collectors; import java.util.stream.Stream; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.FileStatus; import org.apache.hadoop.fs.FileSystem; @@ -108,6 +106,8 @@ import org.junit.Ignore; import org.junit.Test; import org.junit.experimental.categories.Category; import org.mockito.Mockito; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * Simple test for {@link HFileOutputFormat2}. @@ -132,7 +132,7 @@ public class TestCellBasedHFileOutputFormat2 { private HBaseTestingUtility util = new HBaseTestingUtility(); - private static final Log LOG = LogFactory.getLog(TestCellBasedHFileOutputFormat2.class); + private static final Logger LOG = LoggerFactory.getLogger(TestCellBasedHFileOutputFormat2.class); /** * Simple mapper that makes KeyValue output. diff --git a/hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/mapreduce/TestCellBasedImportExport2.java b/hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/mapreduce/TestCellBasedImportExport2.java index 4a22699b8b0..5392a74bd33 100644 --- a/hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/mapreduce/TestCellBasedImportExport2.java +++ b/hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/mapreduce/TestCellBasedImportExport2.java @@ -34,8 +34,6 @@ import java.net.URL; import java.util.ArrayList; import java.util.Arrays; 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.FileSystem; import org.apache.hadoop.fs.Path; @@ -89,6 +87,8 @@ import org.junit.experimental.categories.Category; import org.junit.rules.TestName; import org.mockito.invocation.InvocationOnMock; import org.mockito.stubbing.Answer; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * Tests the table import and table export MR job functionality @@ -100,7 +100,7 @@ public class TestCellBasedImportExport2 { public static final HBaseClassTestRule CLASS_RULE = HBaseClassTestRule.forClass(TestCellBasedImportExport2.class); - private static final Log LOG = LogFactory.getLog(TestCellBasedImportExport2.class); + private static final Logger LOG = LoggerFactory.getLogger(TestCellBasedImportExport2.class); protected static final HBaseTestingUtility UTIL = new HBaseTestingUtility(); private static final byte[] ROW1 = Bytes.toBytesBinary("\\x32row1"); private static final byte[] ROW2 = Bytes.toBytesBinary("\\x32row2"); diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/zksyncer/ClientZKSyncer.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/zksyncer/ClientZKSyncer.java index 8f735bde4dc..550aea7e06b 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/zksyncer/ClientZKSyncer.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/zksyncer/ClientZKSyncer.java @@ -25,8 +25,6 @@ import java.util.Map; import java.util.concurrent.ArrayBlockingQueue; import java.util.concurrent.BlockingQueue; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; import org.apache.hadoop.hbase.HConstants; import org.apache.hadoop.hbase.Server; import org.apache.hadoop.hbase.util.Threads; @@ -37,6 +35,9 @@ import org.apache.yetus.audience.InterfaceAudience; import org.apache.zookeeper.CreateMode; import org.apache.zookeeper.KeeperException; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + /** * Tracks the target znode(s) on server ZK cluster and synchronize them to client ZK cluster if * changed @@ -45,7 +46,7 @@ import org.apache.zookeeper.KeeperException; */ @InterfaceAudience.Private public abstract class ClientZKSyncer extends ZKListener { - private static final Log LOG = LogFactory.getLog(ClientZKSyncer.class); + private static final Logger LOG = LoggerFactory.getLogger(ClientZKSyncer.class); private final Server server; private final ZKWatcher clientZkWatcher; // We use queues and daemon threads to synchronize the data to client ZK cluster diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/throttle/StoreHotnessProtector.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/throttle/StoreHotnessProtector.java index a237a52dc6c..71fd89b5c95 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/throttle/StoreHotnessProtector.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/throttle/StoreHotnessProtector.java @@ -21,8 +21,6 @@ import java.util.List; import java.util.Map; import java.util.concurrent.ConcurrentSkipListMap; import java.util.concurrent.atomic.AtomicInteger; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.hbase.Cell; import org.apache.hadoop.hbase.RegionTooBusyException; @@ -31,7 +29,12 @@ import org.apache.hadoop.hbase.regionserver.Store; import org.apache.hadoop.hbase.util.Bytes; import org.apache.hadoop.hbase.util.ClassSize; import org.apache.yetus.audience.InterfaceAudience; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + import org.apache.hbase.thirdparty.com.google.common.annotations.VisibleForTesting; + /** * StoreHotnessProtector is designed to help limit the concurrency of puts with dense columns, it * does best-effort to avoid exhausting all RS's handlers. When a lot of clients write requests with @@ -60,7 +63,7 @@ import org.apache.hbase.thirdparty.com.google.common.annotations.VisibleForTesti */ @InterfaceAudience.Private public class StoreHotnessProtector { - private static final Log LOG = LogFactory.getLog(StoreHotnessProtector.class); + private static final Logger LOG = LoggerFactory.getLogger(StoreHotnessProtector.class); private volatile int parallelPutToStoreThreadLimit; private volatile int parallelPreparePutToStoreThreadLimit; diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/TestClusterPortAssignment.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/TestClusterPortAssignment.java index 0c8247f362a..69541010a4a 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/TestClusterPortAssignment.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/TestClusterPortAssignment.java @@ -22,8 +22,6 @@ import static org.junit.Assert.assertTrue; import java.net.BindException; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.hbase.testclassification.MediumTests; @@ -31,6 +29,9 @@ import org.junit.ClassRule; import org.junit.Test; import org.junit.experimental.categories.Category; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + @Category(MediumTests.class) public class TestClusterPortAssignment { @ClassRule @@ -38,7 +39,7 @@ public class TestClusterPortAssignment { HBaseClassTestRule.forClass(TestClusterPortAssignment.class); private static final HBaseTestingUtility TEST_UTIL = new HBaseTestingUtility(); - private static final Log LOG = LogFactory.getLog(TestClusterPortAssignment.class); + private static final Logger LOG = LoggerFactory.getLogger(TestClusterPortAssignment.class); /** * Check that we can start an HBase cluster specifying a custom set of diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestFlushFromClient.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestFlushFromClient.java index 207e1fc7810..7afd36b77be 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestFlushFromClient.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestFlushFromClient.java @@ -25,8 +25,6 @@ import java.util.Arrays; import java.util.List; import java.util.concurrent.TimeUnit; import java.util.stream.Collectors; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; import org.apache.hadoop.hbase.HBaseClassTestRule; import org.apache.hadoop.hbase.HBaseTestingUtility; import org.apache.hadoop.hbase.TableName; @@ -47,6 +45,9 @@ import org.junit.Test; import org.junit.experimental.categories.Category; import org.junit.rules.TestName; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + @Category({MediumTests.class, ClientTests.class}) public class TestFlushFromClient { @@ -54,7 +55,7 @@ public class TestFlushFromClient { public static final HBaseClassTestRule CLASS_RULE = HBaseClassTestRule.forClass(TestFlushFromClient.class); - private static final Log LOG = LogFactory.getLog(TestFlushFromClient.class); + private static final Logger LOG = LoggerFactory.getLogger(TestFlushFromClient.class); private final static HBaseTestingUtility TEST_UTIL = new HBaseTestingUtility(); private static AsyncConnection asyncConn; private static final byte[][] SPLITS = new byte[][]{Bytes.toBytes("3"), Bytes.toBytes("7")}; diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestSeparateClientZKCluster.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestSeparateClientZKCluster.java index 769ac64be85..533af935b5c 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestSeparateClientZKCluster.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestSeparateClientZKCluster.java @@ -20,8 +20,6 @@ package org.apache.hadoop.hbase.client; import java.io.File; import org.apache.commons.io.FileUtils; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; import org.apache.hadoop.hbase.HBaseClassTestRule; import org.apache.hadoop.hbase.HBaseTestingUtility; import org.apache.hadoop.hbase.HConstants; @@ -44,9 +42,12 @@ import org.junit.Test; import org.junit.experimental.categories.Category; import org.junit.rules.TestName; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + @Category(MediumTests.class) public class TestSeparateClientZKCluster { - private static final Log LOG = LogFactory.getLog(TestSeparateClientZKCluster.class); + private static final Logger LOG = LoggerFactory.getLogger(TestSeparateClientZKCluster.class); private static final HBaseTestingUtility TEST_UTIL = new HBaseTestingUtility(); private static final File clientZkDir = new File("/tmp/TestSeparateClientZKCluster"); private static final int ZK_SESSION_TIMEOUT = 5000; diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/procedure/TestFailedProcCleanup.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/procedure/TestFailedProcCleanup.java index bf72d331cb6..3e219517d60 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/procedure/TestFailedProcCleanup.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/procedure/TestFailedProcCleanup.java @@ -23,8 +23,6 @@ import static org.junit.Assert.fail; import java.io.IOException; import java.util.List; import java.util.Optional; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.hbase.HBaseClassTestRule; import org.apache.hadoop.hbase.HBaseTestingUtility; @@ -45,6 +43,9 @@ import org.junit.ClassRule; import org.junit.Test; import org.junit.experimental.categories.Category; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + import org.apache.hadoop.hbase.shaded.protobuf.generated.ProcedureProtos; /** @@ -57,7 +58,7 @@ public class TestFailedProcCleanup { public static final HBaseClassTestRule CLASS_RULE = HBaseClassTestRule.forClass(TestFailedProcCleanup.class); - private static final Log LOG = LogFactory.getLog(TestFailedProcCleanup.class); + private static final Logger LOG = LoggerFactory.getLogger(TestFailedProcCleanup.class); protected static HBaseTestingUtility TEST_UTIL = new HBaseTestingUtility(); private static Configuration conf; diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/wal/TestDisabledWAL.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/wal/TestDisabledWAL.java index bd59ce94102..bee76c6d8ad 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/wal/TestDisabledWAL.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/wal/TestDisabledWAL.java @@ -22,8 +22,6 @@ import static org.junit.Assert.fail; 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.hbase.HBaseClassTestRule; import org.apache.hadoop.hbase.HBaseTestingUtility; @@ -45,6 +43,9 @@ import org.junit.Test; import org.junit.experimental.categories.Category; import org.junit.rules.TestName; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + @Category({ RegionServerTests.class, MediumTests.class }) public class TestDisabledWAL { @@ -55,7 +56,7 @@ public class TestDisabledWAL { @Rule public TestName name = new TestName(); - private static final Log LOG = LogFactory.getLog(TestDisabledWAL.class); + private static final Logger LOG = LoggerFactory.getLogger(TestDisabledWAL.class); static final HBaseTestingUtility TEST_UTIL = new HBaseTestingUtility(); private Table table; private TableName tableName;