From da07870995fa45a5faa87c495c7057777cbc681f Mon Sep 17 00:00:00 2001 From: zhangduo Date: Thu, 21 Dec 2017 21:59:46 +0800 Subject: [PATCH] HBASE-19580 Use slf4j instead of commons-logging in new, just-added Peer Procedure classes --- .../hadoop/hbase/master/replication/AddPeerProcedure.java | 6 +++--- .../hbase/master/replication/DisablePeerProcedure.java | 6 +++--- .../hbase/master/replication/EnablePeerProcedure.java | 6 +++--- .../hbase/master/replication/ModifyPeerProcedure.java | 6 +++--- .../hbase/master/replication/RefreshPeerProcedure.java | 6 +++--- .../hbase/master/replication/RemovePeerProcedure.java | 6 +++--- .../hbase/master/replication/UpdatePeerConfigProcedure.java | 6 +++--- 7 files changed, 21 insertions(+), 21 deletions(-) diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/replication/AddPeerProcedure.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/replication/AddPeerProcedure.java index c3862d8c06f..066c3e7f212 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/replication/AddPeerProcedure.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/replication/AddPeerProcedure.java @@ -19,8 +19,6 @@ package org.apache.hadoop.hbase.master.replication; import java.io.IOException; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; import org.apache.hadoop.hbase.client.replication.ReplicationPeerConfigUtil; import org.apache.hadoop.hbase.master.MasterCoprocessorHost; import org.apache.hadoop.hbase.master.procedure.MasterProcedureEnv; @@ -28,6 +26,8 @@ import org.apache.hadoop.hbase.procedure2.ProcedureStateSerializer; import org.apache.hadoop.hbase.replication.ReplicationException; import org.apache.hadoop.hbase.replication.ReplicationPeerConfig; import org.apache.yetus.audience.InterfaceAudience; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProcedureProtos.AddPeerStateData; @@ -37,7 +37,7 @@ import org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProcedureProtos.A @InterfaceAudience.Private public class AddPeerProcedure extends ModifyPeerProcedure { - private static final Log LOG = LogFactory.getLog(AddPeerProcedure.class); + private static final Logger LOG = LoggerFactory.getLogger(AddPeerProcedure.class); private ReplicationPeerConfig peerConfig; diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/replication/DisablePeerProcedure.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/replication/DisablePeerProcedure.java index 0b32db9cb1a..9a28de6edbc 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/replication/DisablePeerProcedure.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/replication/DisablePeerProcedure.java @@ -19,11 +19,11 @@ package org.apache.hadoop.hbase.master.replication; import java.io.IOException; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; import org.apache.hadoop.hbase.master.MasterCoprocessorHost; import org.apache.hadoop.hbase.master.procedure.MasterProcedureEnv; import org.apache.yetus.audience.InterfaceAudience; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * The procedure for disabling a replication peer. @@ -31,7 +31,7 @@ import org.apache.yetus.audience.InterfaceAudience; @InterfaceAudience.Private public class DisablePeerProcedure extends ModifyPeerProcedure { - private static final Log LOG = LogFactory.getLog(DisablePeerProcedure.class); + private static final Logger LOG = LoggerFactory.getLogger(DisablePeerProcedure.class); public DisablePeerProcedure() { } diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/replication/EnablePeerProcedure.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/replication/EnablePeerProcedure.java index 92ba000944e..485590152b6 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/replication/EnablePeerProcedure.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/replication/EnablePeerProcedure.java @@ -19,11 +19,11 @@ package org.apache.hadoop.hbase.master.replication; import java.io.IOException; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; import org.apache.hadoop.hbase.master.MasterCoprocessorHost; import org.apache.hadoop.hbase.master.procedure.MasterProcedureEnv; import org.apache.yetus.audience.InterfaceAudience; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * The procedure for enabling a replication peer. @@ -31,7 +31,7 @@ import org.apache.yetus.audience.InterfaceAudience; @InterfaceAudience.Private public class EnablePeerProcedure extends ModifyPeerProcedure { - private static final Log LOG = LogFactory.getLog(EnablePeerProcedure.class); + private static final Logger LOG = LoggerFactory.getLogger(EnablePeerProcedure.class); public EnablePeerProcedure() { } diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/replication/ModifyPeerProcedure.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/replication/ModifyPeerProcedure.java index 23f6f874e44..c4552edf8a2 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/replication/ModifyPeerProcedure.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/replication/ModifyPeerProcedure.java @@ -19,8 +19,6 @@ package org.apache.hadoop.hbase.master.replication; import java.io.IOException; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; import org.apache.hadoop.hbase.DoNotRetryIOException; import org.apache.hadoop.hbase.master.procedure.MasterProcedureEnv; import org.apache.hadoop.hbase.master.procedure.PeerProcedureInterface; @@ -30,6 +28,8 @@ import org.apache.hadoop.hbase.procedure2.ProcedureSuspendedException; import org.apache.hadoop.hbase.procedure2.ProcedureYieldException; import org.apache.hadoop.hbase.procedure2.StateMachineProcedure; import org.apache.yetus.audience.InterfaceAudience; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProcedureProtos.ModifyPeerStateData; import org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProcedureProtos.PeerModificationState; @@ -42,7 +42,7 @@ public abstract class ModifyPeerProcedure extends StateMachineProcedure implements PeerProcedureInterface { - private static final Log LOG = LogFactory.getLog(ModifyPeerProcedure.class); + private static final Logger LOG = LoggerFactory.getLogger(ModifyPeerProcedure.class); protected String peerId; diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/replication/RefreshPeerProcedure.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/replication/RefreshPeerProcedure.java index ddc2401eb42..ba4285fd736 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/replication/RefreshPeerProcedure.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/replication/RefreshPeerProcedure.java @@ -19,8 +19,6 @@ package org.apache.hadoop.hbase.master.replication; import java.io.IOException; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; import org.apache.hadoop.hbase.ServerName; import org.apache.hadoop.hbase.master.procedure.MasterProcedureEnv; import org.apache.hadoop.hbase.master.procedure.PeerProcedureInterface; @@ -35,6 +33,8 @@ import org.apache.hadoop.hbase.procedure2.RemoteProcedureDispatcher.RemoteProced import org.apache.hadoop.hbase.procedure2.RemoteProcedureException; import org.apache.hadoop.hbase.replication.regionserver.RefreshPeerCallable; import org.apache.yetus.audience.InterfaceAudience; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.apache.hadoop.hbase.shaded.protobuf.ProtobufUtil; import org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProcedureProtos.PeerModificationType; @@ -45,7 +45,7 @@ import org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProcedureProtos.R public class RefreshPeerProcedure extends Procedure implements PeerProcedureInterface, RemoteProcedure { - private static final Log LOG = LogFactory.getLog(RefreshPeerProcedure.class); + private static final Logger LOG = LoggerFactory.getLogger(RefreshPeerProcedure.class); private String peerId; diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/replication/RemovePeerProcedure.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/replication/RemovePeerProcedure.java index 3daad6d5ab2..d40df02b3af 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/replication/RemovePeerProcedure.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/replication/RemovePeerProcedure.java @@ -19,11 +19,11 @@ package org.apache.hadoop.hbase.master.replication; import java.io.IOException; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; import org.apache.hadoop.hbase.master.MasterCoprocessorHost; import org.apache.hadoop.hbase.master.procedure.MasterProcedureEnv; import org.apache.yetus.audience.InterfaceAudience; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * The procedure for removing a replication peer. @@ -31,7 +31,7 @@ import org.apache.yetus.audience.InterfaceAudience; @InterfaceAudience.Private public class RemovePeerProcedure extends ModifyPeerProcedure { - private static final Log LOG = LogFactory.getLog(RemovePeerProcedure.class); + private static final Logger LOG = LoggerFactory.getLogger(RemovePeerProcedure.class); public RemovePeerProcedure() { } diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/replication/UpdatePeerConfigProcedure.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/replication/UpdatePeerConfigProcedure.java index 435eefc4c14..d8154dc930d 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/replication/UpdatePeerConfigProcedure.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/replication/UpdatePeerConfigProcedure.java @@ -19,14 +19,14 @@ package org.apache.hadoop.hbase.master.replication; import java.io.IOException; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; import org.apache.hadoop.hbase.client.replication.ReplicationPeerConfigUtil; import org.apache.hadoop.hbase.master.MasterCoprocessorHost; import org.apache.hadoop.hbase.master.procedure.MasterProcedureEnv; import org.apache.hadoop.hbase.procedure2.ProcedureStateSerializer; import org.apache.hadoop.hbase.replication.ReplicationPeerConfig; import org.apache.yetus.audience.InterfaceAudience; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProcedureProtos.UpdatePeerConfigStateData; @@ -36,7 +36,7 @@ import org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProcedureProtos.U @InterfaceAudience.Private public class UpdatePeerConfigProcedure extends ModifyPeerProcedure { - private static final Log LOG = LogFactory.getLog(UpdatePeerConfigProcedure.class); + private static final Logger LOG = LoggerFactory.getLogger(UpdatePeerConfigProcedure.class); private ReplicationPeerConfig peerConfig;