From 8962581ec2d756dcb4d64db5cecc421488e3da9f Mon Sep 17 00:00:00 2001 From: dongeforever Date: Wed, 24 Nov 2021 15:44:32 +0800 Subject: [PATCH] Fix serialize problem --- .../TopicConfigAndQueueMapping.java | 4 +++ .../statictopic/TopicQueueMappingInfo.java | 2 ++ .../statictopic/TopicQueueMappingOne.java | 1 - .../TopicRemappingDetailWrapper.java | 34 +++++++++++++++++-- 4 files changed, 37 insertions(+), 4 deletions(-) diff --git a/common/src/main/java/org/apache/rocketmq/common/statictopic/TopicConfigAndQueueMapping.java b/common/src/main/java/org/apache/rocketmq/common/statictopic/TopicConfigAndQueueMapping.java index dea1bc34..af891d03 100644 --- a/common/src/main/java/org/apache/rocketmq/common/statictopic/TopicConfigAndQueueMapping.java +++ b/common/src/main/java/org/apache/rocketmq/common/statictopic/TopicConfigAndQueueMapping.java @@ -32,4 +32,8 @@ public class TopicConfigAndQueueMapping extends TopicConfig { public TopicQueueMappingDetail getMappingDetail() { return mappingDetail; } + + public void setMappingDetail(TopicQueueMappingDetail mappingDetail) { + this.mappingDetail = mappingDetail; + } } diff --git a/common/src/main/java/org/apache/rocketmq/common/statictopic/TopicQueueMappingInfo.java b/common/src/main/java/org/apache/rocketmq/common/statictopic/TopicQueueMappingInfo.java index ba5af9b8..7636fd5d 100644 --- a/common/src/main/java/org/apache/rocketmq/common/statictopic/TopicQueueMappingInfo.java +++ b/common/src/main/java/org/apache/rocketmq/common/statictopic/TopicQueueMappingInfo.java @@ -92,4 +92,6 @@ public class TopicQueueMappingInfo extends RemotingSerializable { public void setCurrIdMap(ConcurrentMap currIdMap) { this.currIdMap = currIdMap; } + + } diff --git a/common/src/main/java/org/apache/rocketmq/common/statictopic/TopicQueueMappingOne.java b/common/src/main/java/org/apache/rocketmq/common/statictopic/TopicQueueMappingOne.java index d802575a..801cd67e 100644 --- a/common/src/main/java/org/apache/rocketmq/common/statictopic/TopicQueueMappingOne.java +++ b/common/src/main/java/org/apache/rocketmq/common/statictopic/TopicQueueMappingOne.java @@ -16,7 +16,6 @@ */ package org.apache.rocketmq.common.statictopic; -import com.google.common.collect.ImmutableList; import org.apache.rocketmq.remoting.protocol.RemotingSerializable; import java.util.List; diff --git a/common/src/main/java/org/apache/rocketmq/common/statictopic/TopicRemappingDetailWrapper.java b/common/src/main/java/org/apache/rocketmq/common/statictopic/TopicRemappingDetailWrapper.java index 80742dc0..e865b6b3 100644 --- a/common/src/main/java/org/apache/rocketmq/common/statictopic/TopicRemappingDetailWrapper.java +++ b/common/src/main/java/org/apache/rocketmq/common/statictopic/TopicRemappingDetailWrapper.java @@ -15,9 +15,9 @@ public class TopicRemappingDetailWrapper extends RemotingSerializable { public static final String SUFFIX_AFTER = ".after"; - private final String topic; - private final String type; - private final long epoch; + private String topic; + private String type; + private long epoch; private Map brokerConfigMap = new HashMap(); @@ -25,6 +25,10 @@ public class TopicRemappingDetailWrapper extends RemotingSerializable { private Set brokerToMapOut = new HashSet(); + public TopicRemappingDetailWrapper() { + + } + public TopicRemappingDetailWrapper(String topic, String type, long epoch, Map brokerConfigMap, Set brokerToMapIn, Set brokerToMapOut) { this.topic = topic; this.type = type; @@ -57,4 +61,28 @@ public class TopicRemappingDetailWrapper extends RemotingSerializable { public Set getBrokerToMapOut() { return brokerToMapOut; } + + public void setBrokerConfigMap(Map brokerConfigMap) { + this.brokerConfigMap = brokerConfigMap; + } + + public void setBrokerToMapIn(Set brokerToMapIn) { + this.brokerToMapIn = brokerToMapIn; + } + + public void setBrokerToMapOut(Set brokerToMapOut) { + this.brokerToMapOut = brokerToMapOut; + } + + public void setTopic(String topic) { + this.topic = topic; + } + + public void setType(String type) { + this.type = type; + } + + public void setEpoch(long epoch) { + this.epoch = epoch; + } } -- GitLab