From f40c10a211508c6286ee6962c6c75f8062964fa3 Mon Sep 17 00:00:00 2001 From: meiyi Date: Fri, 25 May 2018 09:30:01 +0800 Subject: [PATCH] HBASE-20518 Need to serialize the enabled field for UpdatePeerConfigProcedure Signed-off-by: zhangduo --- hbase-protocol-shaded/src/main/protobuf/MasterProcedure.proto | 1 + .../hbase/master/replication/UpdatePeerConfigProcedure.java | 2 ++ 2 files changed, 3 insertions(+) diff --git a/hbase-protocol-shaded/src/main/protobuf/MasterProcedure.proto b/hbase-protocol-shaded/src/main/protobuf/MasterProcedure.proto index eef32dfe5e6..17a81cdbfa8 100644 --- a/hbase-protocol-shaded/src/main/protobuf/MasterProcedure.proto +++ b/hbase-protocol-shaded/src/main/protobuf/MasterProcedure.proto @@ -425,6 +425,7 @@ message AddPeerStateData { message UpdatePeerConfigStateData { required ReplicationPeer peer_config = 1; optional ReplicationPeer old_peer_config = 2; + required bool enabled = 3; } message RemovePeerStateData { 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 39c8fa9ca06..41e740ffa63 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 @@ -209,6 +209,7 @@ public class UpdatePeerConfigProcedure extends ModifyPeerProcedure { if (oldPeerConfig != null) { builder.setOldPeerConfig(ReplicationPeerConfigUtil.convert(oldPeerConfig)); } + builder.setEnabled(enabled); serializer.serialize(builder.build()); } @@ -222,5 +223,6 @@ public class UpdatePeerConfigProcedure extends ModifyPeerProcedure { } else { oldPeerConfig = null; } + enabled = data.getEnabled(); } }