Repository: hbase Updated Branches: refs/heads/master 70377babd -> 914de1141
HBASE-20439 Clean up incorrect use of commons-logging in hbase-server Signed-off-by: Umesh Agashe <uaga...@cloudera.com> Signed-off-by: Yu Li <l...@apache.org> Project: http://git-wip-us.apache.org/repos/asf/hbase/repo Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/b1fc00e1 Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/b1fc00e1 Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/b1fc00e1 Branch: refs/heads/master Commit: b1fc00e16f4bb559d039d9dc162cae8042414661 Parents: 70377ba Author: Sean Busbey <bus...@apache.org> Authored: Tue Apr 17 14:40:25 2018 -0500 Committer: Sean Busbey <bus...@apache.org> Committed: Fri Apr 20 07:27:18 2018 -0500 ---------------------------------------------------------------------- .../apache/hadoop/hbase/master/zksyncer/ClientZKSyncer.java | 7 ++++--- .../hadoop/hbase/quotas/FileArchiverNotifierImpl.java | 7 ++++--- .../hadoop/hbase/quotas/RegionSizeReportingChore.java | 7 ++++--- .../org/apache/hadoop/hbase/quotas/RegionSizeStoreImpl.java | 7 ++++--- .../hbase/regionserver/throttle/StoreHotnessProtector.java | 9 ++++++--- .../org/apache/hadoop/hbase/TestClusterPortAssignment.java | 7 ++++--- .../org/apache/hadoop/hbase/client/TestFlushFromClient.java | 7 ++++--- .../hadoop/hbase/client/TestSeparateClientZKCluster.java | 7 ++++--- .../hadoop/hbase/procedure/TestFailedProcCleanup.java | 7 ++++--- .../java/org/apache/hadoop/hbase/wal/TestDisabledWAL.java | 7 ++++--- 10 files changed, 42 insertions(+), 30 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hbase/blob/b1fc00e1/hbase-server/src/main/java/org/apache/hadoop/hbase/master/zksyncer/ClientZKSyncer.java ---------------------------------------------------------------------- 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 8f735bd..550aea7 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 http://git-wip-us.apache.org/repos/asf/hbase/blob/b1fc00e1/hbase-server/src/main/java/org/apache/hadoop/hbase/quotas/FileArchiverNotifierImpl.java ---------------------------------------------------------------------- diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/quotas/FileArchiverNotifierImpl.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/quotas/FileArchiverNotifierImpl.java index 8cde9c1..58434f7 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/quotas/FileArchiverNotifierImpl.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/quotas/FileArchiverNotifierImpl.java @@ -35,8 +35,6 @@ import java.util.function.Predicate; import java.util.stream.Collectors; import org.apache.commons.lang.builder.HashCodeBuilder; -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; @@ -54,6 +52,9 @@ import org.apache.hadoop.hbase.util.HFileArchiveUtil; import org.apache.hadoop.util.StringUtils; import org.apache.yetus.audience.InterfaceAudience; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + import org.apache.hbase.thirdparty.com.google.common.collect.HashMultimap; import org.apache.hbase.thirdparty.com.google.common.collect.Multimap; import org.apache.hbase.thirdparty.com.google.protobuf.InvalidProtocolBufferException; @@ -69,7 +70,7 @@ import org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.Snapshot */ @InterfaceAudience.Private public class FileArchiverNotifierImpl implements FileArchiverNotifier { - private static final Log LOG = LogFactory.getLog(FileArchiverNotifierImpl.class); + private static final Logger LOG = LoggerFactory.getLogger(FileArchiverNotifierImpl.class); private final Connection conn; private final Configuration conf; private final FileSystem fs; http://git-wip-us.apache.org/repos/asf/hbase/blob/b1fc00e1/hbase-server/src/main/java/org/apache/hadoop/hbase/quotas/RegionSizeReportingChore.java ---------------------------------------------------------------------- diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/quotas/RegionSizeReportingChore.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/quotas/RegionSizeReportingChore.java index bf525e5..56798fd 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/quotas/RegionSizeReportingChore.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/quotas/RegionSizeReportingChore.java @@ -23,8 +23,6 @@ import java.util.Map.Entry; import java.util.Set; import java.util.concurrent.TimeUnit; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.hbase.ScheduledChore; import org.apache.hadoop.hbase.client.RegionInfo; @@ -33,12 +31,15 @@ import org.apache.hadoop.hbase.regionserver.Region; import org.apache.hadoop.hbase.regionserver.RegionServerServices; import org.apache.yetus.audience.InterfaceAudience; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + /** * A Chore which sends the region size reports on this RegionServer to the Master. */ @InterfaceAudience.Private public class RegionSizeReportingChore extends ScheduledChore { - private static final Log LOG = LogFactory.getLog(RegionSizeReportingChore.class); + private static final Logger LOG = LoggerFactory.getLogger(RegionSizeReportingChore.class); static final String REGION_SIZE_REPORTING_CHORE_PERIOD_KEY = "hbase.regionserver.quotas.region.size.reporting.chore.period"; http://git-wip-us.apache.org/repos/asf/hbase/blob/b1fc00e1/hbase-server/src/main/java/org/apache/hadoop/hbase/quotas/RegionSizeStoreImpl.java ---------------------------------------------------------------------- diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/quotas/RegionSizeStoreImpl.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/quotas/RegionSizeStoreImpl.java index 4b48869..b7f59a3 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/quotas/RegionSizeStoreImpl.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/quotas/RegionSizeStoreImpl.java @@ -20,13 +20,14 @@ import java.util.Iterator; import java.util.Map.Entry; import java.util.concurrent.ConcurrentHashMap; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; import org.apache.hadoop.hbase.client.RegionInfo; 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; + /** * A {@link RegionSizeStore} implementation backed by a ConcurrentHashMap. We expected similar * amounts of reads and writes to the "store", so using a RWLock is not going to provide any @@ -34,7 +35,7 @@ import org.apache.yetus.audience.InterfaceAudience; */ @InterfaceAudience.Private public class RegionSizeStoreImpl implements RegionSizeStore { - private static final Log LOG = LogFactory.getLog(RegionSizeStoreImpl.class); + private static final Logger LOG = LoggerFactory.getLogger(RegionSizeStoreImpl.class); private static final long sizeOfEntry = ClassSize.align( ClassSize.CONCURRENT_HASHMAP_ENTRY + ClassSize.OBJECT + Bytes.SIZEOF_LONG http://git-wip-us.apache.org/repos/asf/hbase/blob/b1fc00e1/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/throttle/StoreHotnessProtector.java ---------------------------------------------------------------------- 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 a237a52..71fd89b 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; http://git-wip-us.apache.org/repos/asf/hbase/blob/b1fc00e1/hbase-server/src/test/java/org/apache/hadoop/hbase/TestClusterPortAssignment.java ---------------------------------------------------------------------- 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 0c8247f..6954101 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 http://git-wip-us.apache.org/repos/asf/hbase/blob/b1fc00e1/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestFlushFromClient.java ---------------------------------------------------------------------- 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 207e1fc..7afd36b 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")}; http://git-wip-us.apache.org/repos/asf/hbase/blob/b1fc00e1/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestSeparateClientZKCluster.java ---------------------------------------------------------------------- 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 769ac64..533af93 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; http://git-wip-us.apache.org/repos/asf/hbase/blob/b1fc00e1/hbase-server/src/test/java/org/apache/hadoop/hbase/procedure/TestFailedProcCleanup.java ---------------------------------------------------------------------- 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 bf72d33..3e21951 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; http://git-wip-us.apache.org/repos/asf/hbase/blob/b1fc00e1/hbase-server/src/test/java/org/apache/hadoop/hbase/wal/TestDisabledWAL.java ---------------------------------------------------------------------- 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 bd59ce9..bee76c6 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;