HBASE-20518 Need to serialize the enabled field for UpdatePeerConfigProcedure

Signed-off-by: zhangduo <zhangduo@apache.org>
This commit is contained in:
meiyi 2018-05-25 09:30:01 +08:00 committed by zhangduo
parent 1fbce10ff4
commit 36f3d9432a
2 changed files with 3 additions and 0 deletions

View File

@ -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 {

View File

@ -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();
}
}