From 54fda9b51e4e9f6dd26ad50c914f5e536bf891a6 Mon Sep 17 00:00:00 2001 From: sunxiaojian Date: Tue, 7 Mar 2023 21:12:57 +0800 Subject: [PATCH] upgrade rocketmq client version to 5.1.0 --- .../rocketmq/connect/runtime/stats/ConnectStatsService.java | 2 -- .../connect/runtime/connectorwrapper/NameServerMocker.java | 4 ++-- .../runtime/service/ClusterManagementServiceImplTest.java | 4 ++-- .../runtime/service/ConfigManagementServiceImplTest.java | 4 +--- .../connect/runtime/service/DefaultConnectorContextTest.java | 1 - .../runtime/service/PositionManagementServiceImplTest.java | 5 +---- .../connect/runtime/store/PositionStorageReaderImplTest.java | 2 +- .../connect/runtime/utils/datasync/BrokerBasedLogTest.java | 2 +- 8 files changed, 8 insertions(+), 16 deletions(-) diff --git a/rocketmq-connect-runtime/src/main/java/org/apache/rocketmq/connect/runtime/stats/ConnectStatsService.java b/rocketmq-connect-runtime/src/main/java/org/apache/rocketmq/connect/runtime/stats/ConnectStatsService.java index 5e52d338d..a30259a8d 100644 --- a/rocketmq-connect-runtime/src/main/java/org/apache/rocketmq/connect/runtime/stats/ConnectStatsService.java +++ b/rocketmq-connect-runtime/src/main/java/org/apache/rocketmq/connect/runtime/stats/ConnectStatsService.java @@ -20,8 +20,6 @@ import org.apache.commons.lang3.StringUtils; import org.apache.rocketmq.common.ServiceThread; import org.apache.rocketmq.connect.runtime.common.LoggerName; -import org.apache.rocketmq.logging.InternalLogger; -import org.apache.rocketmq.logging.InternalLoggerFactory; import java.text.MessageFormat; import java.util.HashMap; diff --git a/rocketmq-connect-runtime/src/test/java/org/apache/rocketmq/connect/runtime/connectorwrapper/NameServerMocker.java b/rocketmq-connect-runtime/src/test/java/org/apache/rocketmq/connect/runtime/connectorwrapper/NameServerMocker.java index a437d5a9c..28339be90 100644 --- a/rocketmq-connect-runtime/src/test/java/org/apache/rocketmq/connect/runtime/connectorwrapper/NameServerMocker.java +++ b/rocketmq-connect-runtime/src/test/java/org/apache/rocketmq/connect/runtime/connectorwrapper/NameServerMocker.java @@ -17,12 +17,12 @@ package org.apache.rocketmq.connect.runtime.connectorwrapper; import org.apache.rocketmq.common.MixAll; -import org.apache.rocketmq.common.protocol.route.BrokerData; -import org.apache.rocketmq.common.protocol.route.TopicRouteData; import java.util.ArrayList; import java.util.HashMap; import java.util.List; +import org.apache.rocketmq.remoting.protocol.route.BrokerData; +import org.apache.rocketmq.remoting.protocol.route.TopicRouteData; /** * tools class diff --git a/rocketmq-connect-runtime/src/test/java/org/apache/rocketmq/connect/runtime/service/ClusterManagementServiceImplTest.java b/rocketmq-connect-runtime/src/test/java/org/apache/rocketmq/connect/runtime/service/ClusterManagementServiceImplTest.java index 269082083..c1cb0051f 100644 --- a/rocketmq-connect-runtime/src/test/java/org/apache/rocketmq/connect/runtime/service/ClusterManagementServiceImplTest.java +++ b/rocketmq-connect-runtime/src/test/java/org/apache/rocketmq/connect/runtime/service/ClusterManagementServiceImplTest.java @@ -21,13 +21,13 @@ import io.netty.channel.ChannelHandlerContext; import java.nio.charset.StandardCharsets; import java.util.List; -import org.apache.rocketmq.common.protocol.RequestCode; -import org.apache.rocketmq.common.protocol.header.NotifyConsumerIdsChangedRequestHeader; import org.apache.rocketmq.connect.runtime.config.WorkerConfig; import org.apache.rocketmq.connect.runtime.connectorwrapper.NameServerMocker; import org.apache.rocketmq.connect.runtime.connectorwrapper.ServerResponseMocker; import org.apache.rocketmq.remoting.RemotingClient; import org.apache.rocketmq.remoting.protocol.RemotingCommand; +import org.apache.rocketmq.remoting.protocol.RequestCode; +import org.apache.rocketmq.remoting.protocol.header.NotifyConsumerIdsChangedRequestHeader; import org.junit.After; import org.junit.Assert; import org.junit.Before; diff --git a/rocketmq-connect-runtime/src/test/java/org/apache/rocketmq/connect/runtime/service/ConfigManagementServiceImplTest.java b/rocketmq-connect-runtime/src/test/java/org/apache/rocketmq/connect/runtime/service/ConfigManagementServiceImplTest.java index faa60ef8e..9f003999d 100644 --- a/rocketmq-connect-runtime/src/test/java/org/apache/rocketmq/connect/runtime/service/ConfigManagementServiceImplTest.java +++ b/rocketmq-connect-runtime/src/test/java/org/apache/rocketmq/connect/runtime/service/ConfigManagementServiceImplTest.java @@ -29,12 +29,9 @@ import java.util.Set; import java.util.UUID; -import com.google.common.collect.Maps; import org.apache.rocketmq.client.consumer.DefaultLitePullConsumer; -import org.apache.rocketmq.client.consumer.DefaultMQPushConsumer; import org.apache.rocketmq.client.producer.DefaultMQProducer; import org.apache.rocketmq.client.producer.SendCallback; -import org.apache.rocketmq.common.admin.TopicOffset; import org.apache.rocketmq.common.message.Message; import org.apache.rocketmq.common.message.MessageQueue; import org.apache.rocketmq.connect.runtime.common.ConnAndTaskConfigs; @@ -53,6 +50,7 @@ import org.apache.rocketmq.connect.runtime.utils.datasync.BrokerBasedLog; import org.apache.rocketmq.connect.runtime.utils.datasync.DataSynchronizer; import org.apache.rocketmq.connect.runtime.utils.datasync.DataSynchronizerCallback; +import org.apache.rocketmq.remoting.protocol.admin.TopicOffset; import org.junit.After; import org.junit.Assert; import org.junit.Before; diff --git a/rocketmq-connect-runtime/src/test/java/org/apache/rocketmq/connect/runtime/service/DefaultConnectorContextTest.java b/rocketmq-connect-runtime/src/test/java/org/apache/rocketmq/connect/runtime/service/DefaultConnectorContextTest.java index beed39be8..27b443791 100644 --- a/rocketmq-connect-runtime/src/test/java/org/apache/rocketmq/connect/runtime/service/DefaultConnectorContextTest.java +++ b/rocketmq-connect-runtime/src/test/java/org/apache/rocketmq/connect/runtime/service/DefaultConnectorContextTest.java @@ -40,7 +40,6 @@ import org.apache.rocketmq.client.impl.consumer.RebalanceImpl; import org.apache.rocketmq.client.impl.factory.MQClientInstance; import org.apache.rocketmq.client.producer.DefaultMQProducer; -import org.apache.rocketmq.common.admin.TopicOffset; import org.apache.rocketmq.common.message.MessageQueue; import org.apache.rocketmq.connect.runtime.common.ConnectKeyValue; import org.apache.rocketmq.connect.runtime.config.WorkerConfig; diff --git a/rocketmq-connect-runtime/src/test/java/org/apache/rocketmq/connect/runtime/service/PositionManagementServiceImplTest.java b/rocketmq-connect-runtime/src/test/java/org/apache/rocketmq/connect/runtime/service/PositionManagementServiceImplTest.java index dc1535773..c78a80f98 100644 --- a/rocketmq-connect-runtime/src/test/java/org/apache/rocketmq/connect/runtime/service/PositionManagementServiceImplTest.java +++ b/rocketmq-connect-runtime/src/test/java/org/apache/rocketmq/connect/runtime/service/PositionManagementServiceImplTest.java @@ -19,16 +19,12 @@ import com.google.common.collect.Lists; import io.netty.util.internal.ConcurrentSet; -import io.openmessaging.Future; import io.openmessaging.connector.api.data.RecordOffset; -import io.openmessaging.producer.SendResult; import org.apache.rocketmq.client.consumer.DefaultLitePullConsumer; import org.apache.rocketmq.client.producer.DefaultMQProducer; import org.apache.rocketmq.client.producer.SendCallback; -import org.apache.rocketmq.common.admin.TopicOffset; import org.apache.rocketmq.common.message.Message; import org.apache.rocketmq.common.message.MessageQueue; -import org.apache.rocketmq.connect.runtime.common.ConnAndTaskConfigs; import org.apache.rocketmq.connect.runtime.config.WorkerConfig; import org.apache.rocketmq.connect.runtime.converter.record.json.JsonConverter; import org.apache.rocketmq.connect.runtime.connectorwrapper.NameServerMocker; @@ -40,6 +36,7 @@ import org.apache.rocketmq.connect.runtime.utils.TestUtils; import org.apache.rocketmq.connect.runtime.utils.datasync.BrokerBasedLog; import org.apache.rocketmq.connect.runtime.utils.datasync.DataSynchronizerCallback; +import org.apache.rocketmq.remoting.protocol.admin.TopicOffset; import org.assertj.core.util.Maps; import org.junit.After; import org.junit.Before; diff --git a/rocketmq-connect-runtime/src/test/java/org/apache/rocketmq/connect/runtime/store/PositionStorageReaderImplTest.java b/rocketmq-connect-runtime/src/test/java/org/apache/rocketmq/connect/runtime/store/PositionStorageReaderImplTest.java index 45f64cdd8..a9fdf9e72 100644 --- a/rocketmq-connect-runtime/src/test/java/org/apache/rocketmq/connect/runtime/store/PositionStorageReaderImplTest.java +++ b/rocketmq-connect-runtime/src/test/java/org/apache/rocketmq/connect/runtime/store/PositionStorageReaderImplTest.java @@ -24,7 +24,6 @@ import io.openmessaging.connector.api.data.RecordPartition; import org.apache.rocketmq.client.consumer.DefaultLitePullConsumer; import org.apache.rocketmq.client.producer.DefaultMQProducer; -import org.apache.rocketmq.common.admin.TopicOffset; import org.apache.rocketmq.common.message.MessageQueue; import org.apache.rocketmq.connect.runtime.config.WorkerConfig; import org.apache.rocketmq.connect.runtime.connectorwrapper.NameServerMocker; @@ -33,6 +32,7 @@ import org.apache.rocketmq.connect.runtime.service.PositionManagementService; import org.apache.rocketmq.connect.runtime.service.local.LocalPositionManagementServiceImpl; import org.apache.rocketmq.connect.runtime.utils.ConnectUtil; +import org.apache.rocketmq.remoting.protocol.admin.TopicOffset; import org.assertj.core.util.Maps; import org.junit.After; import org.junit.Assert; diff --git a/rocketmq-connect-runtime/src/test/java/org/apache/rocketmq/connect/runtime/utils/datasync/BrokerBasedLogTest.java b/rocketmq-connect-runtime/src/test/java/org/apache/rocketmq/connect/runtime/utils/datasync/BrokerBasedLogTest.java index b9470c374..a0531db9c 100644 --- a/rocketmq-connect-runtime/src/test/java/org/apache/rocketmq/connect/runtime/utils/datasync/BrokerBasedLogTest.java +++ b/rocketmq-connect-runtime/src/test/java/org/apache/rocketmq/connect/runtime/utils/datasync/BrokerBasedLogTest.java @@ -23,7 +23,6 @@ import org.apache.rocketmq.client.producer.DefaultMQProducer; import org.apache.rocketmq.client.producer.SendCallback; import org.apache.rocketmq.client.producer.selector.SelectMessageQueueByHash; -import org.apache.rocketmq.common.admin.TopicOffset; import org.apache.rocketmq.common.message.Message; import org.apache.rocketmq.common.message.MessageQueue; import org.apache.rocketmq.connect.runtime.config.WorkerConfig; @@ -31,6 +30,7 @@ import org.apache.rocketmq.connect.runtime.serialization.Serializer; import org.apache.rocketmq.connect.runtime.utils.ConnectUtil; import org.apache.rocketmq.remoting.exception.RemotingException; +import org.apache.rocketmq.remoting.protocol.admin.TopicOffset; import org.junit.After; import org.junit.Before; import org.junit.Test;