From 0b1050aed35635b02e21bef676175d0c23228d47 Mon Sep 17 00:00:00 2001 From: Pil0tXia Date: Sun, 14 Apr 2024 20:40:29 +0800 Subject: [PATCH] Remove 'defibus' related un-used usages --- .../config/samples/eventmesh_v1_runtime.yaml | 2 -- eventmesh-runtime/conf/eventmesh.properties | 3 --- .../runtime/boot/EventMeshServer.java | 6 +----- .../runtime/constants/EventMeshConstants.java | 4 ---- .../runtime/core/plugin/MQProducerWrapper.java | 1 - .../runtime/core/plugin/MQWrapper.java | 18 ------------------ .../protocol/producer/EventMeshProducer.java | 1 - .../tcp/client/group/ClientGroupWrapper.java | 1 - .../runtime/client/common/UserAgentUtils.java | 6 +----- 9 files changed, 2 insertions(+), 40 deletions(-) diff --git a/eventmesh-operator/config/samples/eventmesh_v1_runtime.yaml b/eventmesh-operator/config/samples/eventmesh_v1_runtime.yaml index c2900777c1..fc640aa639 100644 --- a/eventmesh-operator/config/samples/eventmesh_v1_runtime.yaml +++ b/eventmesh-operator/config/samples/eventmesh_v1_runtime.yaml @@ -71,8 +71,6 @@ data: eventMesh.server.retry.async.pushRetryDelayInMills=500 eventMesh.server.retry.sync.pushRetryDelayInMills=500 eventMesh.server.retry.pushRetryQueueSize=10000 - #auto-ack - #eventMesh.server.defibus.client.comsumeTimeoutInMin=5 #sleep interval between closing client of different group in server graceful shutdown eventMesh.server.gracefulShutdown.sleepIntervalInMills=1000 diff --git a/eventmesh-runtime/conf/eventmesh.properties b/eventmesh-runtime/conf/eventmesh.properties index b19370a105..91a422fa4c 100644 --- a/eventmesh-runtime/conf/eventmesh.properties +++ b/eventmesh-runtime/conf/eventmesh.properties @@ -60,9 +60,6 @@ eventMesh.server.retry.sync.pushRetryDelayInMills=500 eventMesh.server.retry.pushRetryQueueSize=10000 eventMesh.server.retry.plugin.type=default -# auto-ack -#eventMesh.server.defibus.client.comsumeTimeoutInMin=5 - # sleep interval between closing client of different group in server graceful shutdown eventMesh.server.gracefulShutdown.sleepIntervalInMills=1000 eventMesh.server.rebalanceRedirect.sleepIntervalInMills=200 diff --git a/eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/boot/EventMeshServer.java b/eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/boot/EventMeshServer.java index 26e727406b..3b33a71b8f 100644 --- a/eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/boot/EventMeshServer.java +++ b/eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/boot/EventMeshServer.java @@ -27,7 +27,6 @@ import org.apache.eventmesh.common.utils.ConfigurationContextUtil; import org.apache.eventmesh.runtime.acl.Acl; import org.apache.eventmesh.runtime.common.ServiceState; -import org.apache.eventmesh.runtime.constants.EventMeshConstants; import org.apache.eventmesh.runtime.core.protocol.http.producer.ProducerTopicManager; import org.apache.eventmesh.runtime.meta.MetaStorage; import org.apache.eventmesh.runtime.storage.StorageResource; @@ -139,13 +138,10 @@ public void init() throws Exception { adminBootstrap.init(); } - final String eventStore = System.getProperty(EventMeshConstants.EVENT_STORE_PROPERTIES, System.getenv(EventMeshConstants.EVENT_STORE_ENV)); - - log.info("eventStore : {}", eventStore); producerTopicManager = new ProducerTopicManager(this); producerTopicManager.init(); - serviceState = ServiceState.INITED; + serviceState = ServiceState.INITED; log.info(SERVER_STATE_MSG, serviceState); } diff --git a/eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/constants/EventMeshConstants.java b/eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/constants/EventMeshConstants.java index 4196572ccb..2830ae9596 100644 --- a/eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/constants/EventMeshConstants.java +++ b/eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/constants/EventMeshConstants.java @@ -21,10 +21,6 @@ public class EventMeshConstants { - public static final String EVENT_STORE_PROPERTIES = "eventstore"; - - public static final String EVENT_STORE_ENV = "EVENT_STORE"; - public static final String PROTOCOL_HTTP = "http"; public static final String PROTOCOL_TCP = "tcp"; diff --git a/eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/core/plugin/MQProducerWrapper.java b/eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/core/plugin/MQProducerWrapper.java index f0a50dcc05..84b0079f4b 100644 --- a/eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/core/plugin/MQProducerWrapper.java +++ b/eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/core/plugin/MQProducerWrapper.java @@ -91,5 +91,4 @@ public boolean reply(final CloudEvent cloudEvent, final SendCallback sendCallbac public Producer getMeshMQProducer() { return meshMQProducer; } - } diff --git a/eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/core/plugin/MQWrapper.java b/eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/core/plugin/MQWrapper.java index 6edf93f530..e0828d460f 100644 --- a/eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/core/plugin/MQWrapper.java +++ b/eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/core/plugin/MQWrapper.java @@ -17,29 +17,11 @@ package org.apache.eventmesh.runtime.core.plugin; -import org.apache.eventmesh.runtime.constants.EventMeshConstants; - -import org.apache.commons.lang3.StringUtils; - import java.util.concurrent.atomic.AtomicBoolean; public abstract class MQWrapper { - public static final String EVENT_STORE_DEFIBUS = "defibus"; - - public static String CURRENT_EVENT_STORE = EVENT_STORE_DEFIBUS; - - public static final String EVENT_STORE_CONF = System.getProperty(EventMeshConstants.EVENT_STORE_PROPERTIES, - System.getenv(EventMeshConstants.EVENT_STORE_ENV)); - - static { - if (StringUtils.isNotBlank(EVENT_STORE_CONF)) { - CURRENT_EVENT_STORE = EVENT_STORE_CONF; - } - } - public AtomicBoolean started = new AtomicBoolean(Boolean.FALSE); public AtomicBoolean inited = new AtomicBoolean(Boolean.FALSE); - } diff --git a/eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/core/protocol/producer/EventMeshProducer.java b/eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/core/protocol/producer/EventMeshProducer.java index bd27d6933d..749695d4c7 100644 --- a/eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/core/protocol/producer/EventMeshProducer.java +++ b/eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/core/protocol/producer/EventMeshProducer.java @@ -65,7 +65,6 @@ public synchronized void init(CommonConfiguration configuration, keyValue.put(EventMeshConstants.INSTANCE_NAME, EventMeshUtil.buildMeshClientID( producerGroupConfig.getGroupName(), configuration.getEventMeshCluster())); - // TODO for defibus keyValue.put(EventMeshConstants.EVENT_MESH_IDC, configuration.getEventMeshIDC()); mqProducerWrapper = new MQProducerWrapper( configuration.getEventMeshStoragePluginType()); diff --git a/eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/core/protocol/tcp/client/group/ClientGroupWrapper.java b/eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/core/protocol/tcp/client/group/ClientGroupWrapper.java index f5a6f748e4..8b4ce0a4e1 100644 --- a/eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/core/protocol/tcp/client/group/ClientGroupWrapper.java +++ b/eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/core/protocol/tcp/client/group/ClientGroupWrapper.java @@ -289,7 +289,6 @@ public synchronized void startClientGroupProducer() throws Exception { .buildMeshTcpClientID(sysId, EventMeshConstants.PURPOSE_PUB_UPPER_CASE, eventMeshTCPConfiguration.getEventMeshCluster())); - // TODO for defibus keyValue.put(EventMeshConstants.EVENT_MESH_IDC, eventMeshTCPConfiguration.getEventMeshIDC()); mqProducerWrapper.init(keyValue); diff --git a/eventmesh-runtime/src/test/java/org/apache/eventmesh/runtime/client/common/UserAgentUtils.java b/eventmesh-runtime/src/test/java/org/apache/eventmesh/runtime/client/common/UserAgentUtils.java index 2602c85384..500008dd7e 100644 --- a/eventmesh-runtime/src/test/java/org/apache/eventmesh/runtime/client/common/UserAgentUtils.java +++ b/eventmesh-runtime/src/test/java/org/apache/eventmesh/runtime/client/common/UserAgentUtils.java @@ -43,8 +43,6 @@ public static UserAgent createPubUserAgent() { public static UserAgent createUserAgent() { UserAgent userAgent = new UserAgent(); userAgent.setSubsystem("5123"); - // userAgent.setPid(UtilAll.getPid()); - // userAgent.setHost(RemotingUtil.getLocalAddress()); userAgent.setVersion("2.0.8"); userAgent.setUsername("username"); userAgent.setPassword("1234"); @@ -54,13 +52,11 @@ public static UserAgent createUserAgent() { public static UserAgent createSubUserAgent() { UserAgent userAgent = new UserAgent(); userAgent.setSubsystem("5243"); - // userAgent.setPid(UtilAll.getPid()); - // userAgent.setHost(RemotingUtil.getLocalAddress()); userAgent.setPort(8888); userAgent.setVersion("2.0.8"); userAgent.setUsername("username"); userAgent.setPassword("1234"); - userAgent.setPath("/data/app/defibus-acl/"); + userAgent.setPath("/data/app/acl/"); userAgent.setPurpose(EventMeshConstants.PURPOSE_SUB); return userAgent; }