diff --git a/eventmesh-common/src/main/java/org/apache/eventmesh/common/config/ConfigurationWrapper.java b/eventmesh-common/src/main/java/org/apache/eventmesh/common/config/ConfigurationWrapper.java index 38617879bb..466fa952d5 100644 --- a/eventmesh-common/src/main/java/org/apache/eventmesh/common/config/ConfigurationWrapper.java +++ b/eventmesh-common/src/main/java/org/apache/eventmesh/common/config/ConfigurationWrapper.java @@ -40,7 +40,7 @@ public class ConfigurationWrapper { private boolean reload = true; - private ScheduledExecutorService configLoader = ThreadPoolFactory.createSingleScheduledExecutor("eventMesh-configloader-"); + private ScheduledExecutorService configLoader = ThreadPoolFactory.createSingleScheduledExecutor("eventMesh-configLoader-"); public ConfigurationWrapper(String file, boolean reload) { this.file = file; diff --git a/eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/boot/AbrstractHTTPServer.java b/eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/boot/AbstractHTTPServer.java similarity index 99% rename from eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/boot/AbrstractHTTPServer.java rename to eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/boot/AbstractHTTPServer.java index 4e902a6d9d..ac30667822 100644 --- a/eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/boot/AbrstractHTTPServer.java +++ b/eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/boot/AbstractHTTPServer.java @@ -82,7 +82,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public abstract class AbrstractHTTPServer extends AbstractRemotingServer { +public abstract class AbstractHTTPServer extends AbstractRemotingServer { public Logger httpServerLogger = LoggerFactory.getLogger(this.getClass()); @@ -106,7 +106,7 @@ public abstract class AbrstractHTTPServer extends AbstractRemotingServer { protected HashMap> processorTable = new HashMap>(64); - public AbrstractHTTPServer(int port, boolean useTLS) { + public AbstractHTTPServer(int port, boolean useTLS) { this.port = port; this.useTLS = useTLS; } diff --git a/eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/boot/AbstractRemotingServer.java b/eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/boot/AbstractRemotingServer.java index e3f643629d..02f537dacf 100644 --- a/eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/boot/AbstractRemotingServer.java +++ b/eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/boot/AbstractRemotingServer.java @@ -67,7 +67,7 @@ public Thread newThread(Runnable r) { return ioGroup; } - private EventLoopGroup initWokerGroup(String threadPrefix) { + private EventLoopGroup initWorkerGroup(String threadPrefix) { workerGroup = new NioEventLoopGroup(Runtime.getRuntime().availableProcessors(), new ThreadFactory() { AtomicInteger count = new AtomicInteger(0); @@ -83,7 +83,7 @@ public Thread newThread(Runnable r) { public void init(String threadPrefix) throws Exception { initBossGroup(threadPrefix); initIOGroup(threadPrefix); - initWokerGroup(threadPrefix); + initWorkerGroup(threadPrefix); } public void shutdown() throws Exception { diff --git a/eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/boot/EventMeshHTTPServer.java b/eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/boot/EventMeshHTTPServer.java index 84a2ab79b0..ba1c170485 100644 --- a/eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/boot/EventMeshHTTPServer.java +++ b/eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/boot/EventMeshHTTPServer.java @@ -46,7 +46,7 @@ import org.apache.eventmesh.runtime.core.protocol.http.retry.HttpRetryer; import org.apache.eventmesh.runtime.metrics.http.HTTPMetricsServer; -public class EventMeshHTTPServer extends AbrstractHTTPServer { +public class EventMeshHTTPServer extends AbstractHTTPServer { private EventMeshServer eventMeshServer; @@ -102,19 +102,19 @@ public void initThreadPool() throws Exception { BlockingQueue batchMsgThreadPoolQueue = new LinkedBlockingQueue(eventMeshHttpConfiguration.eventMeshServerBatchBlockQSize); batchMsgExecutor = ThreadPoolFactory.createThreadPoolExecutor(eventMeshHttpConfiguration.eventMeshServerBatchMsgThreadNum, - eventMeshHttpConfiguration.eventMeshServerBatchMsgThreadNum, batchMsgThreadPoolQueue, "eventMesh-batchmsg-", true); + eventMeshHttpConfiguration.eventMeshServerBatchMsgThreadNum, batchMsgThreadPoolQueue, "eventMesh-batchMsg-", true); BlockingQueue sendMsgThreadPoolQueue = new LinkedBlockingQueue(eventMeshHttpConfiguration.eventMeshServerSendMsgBlockQSize); sendMsgExecutor = ThreadPoolFactory.createThreadPoolExecutor(eventMeshHttpConfiguration.eventMeshServerSendMsgThreadNum, - eventMeshHttpConfiguration.eventMeshServerSendMsgThreadNum, sendMsgThreadPoolQueue, "eventMesh-sendmsg-", true); + eventMeshHttpConfiguration.eventMeshServerSendMsgThreadNum, sendMsgThreadPoolQueue, "eventMesh-sendMsg-", true); BlockingQueue pushMsgThreadPoolQueue = new LinkedBlockingQueue(eventMeshHttpConfiguration.eventMeshServerPushMsgBlockQSize); pushMsgExecutor = ThreadPoolFactory.createThreadPoolExecutor(eventMeshHttpConfiguration.eventMeshServerPushMsgThreadNum, - eventMeshHttpConfiguration.eventMeshServerPushMsgThreadNum, pushMsgThreadPoolQueue, "eventMesh-pushmsg-", true); + eventMeshHttpConfiguration.eventMeshServerPushMsgThreadNum, pushMsgThreadPoolQueue, "eventMesh-pushMsg-", true); BlockingQueue clientManageThreadPoolQueue = new LinkedBlockingQueue(eventMeshHttpConfiguration.eventMeshServerClientManageBlockQSize); clientManageExecutor = ThreadPoolFactory.createThreadPoolExecutor(eventMeshHttpConfiguration.eventMeshServerClientManageThreadNum, - eventMeshHttpConfiguration.eventMeshServerClientManageThreadNum, clientManageThreadPoolQueue, "eventMesh-clientmanage-", true); + eventMeshHttpConfiguration.eventMeshServerClientManageThreadNum, clientManageThreadPoolQueue, "eventMesh-clientManage-", true); BlockingQueue adminThreadPoolQueue = new LinkedBlockingQueue(50); adminExecutor = ThreadPoolFactory.createThreadPoolExecutor(eventMeshHttpConfiguration.eventMeshServerAdminThreadNum, @@ -122,7 +122,7 @@ public void initThreadPool() throws Exception { BlockingQueue replyMessageThreadPoolQueue = new LinkedBlockingQueue(100); replyMsgExecutor = ThreadPoolFactory.createThreadPoolExecutor(eventMeshHttpConfiguration.eventMeshServerReplyMsgThreadNum, - eventMeshHttpConfiguration.eventMeshServerReplyMsgThreadNum, replyMessageThreadPoolQueue, "eventMesh-replymsg-", true); + eventMeshHttpConfiguration.eventMeshServerReplyMsgThreadNum, replyMessageThreadPoolQueue, "eventMesh-replyMsg-", true); } public ThreadPoolExecutor getBatchMsgExecutor() { 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 19d69533ef..92684d0f2d 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 @@ -52,8 +52,8 @@ public void init() throws Exception { eventMeshTCPServer.init(); } - String eventstore = System.getProperty(EventMeshConstants.EVENT_STORE_PROPERTIES, System.getenv(EventMeshConstants.EVENT_STORE_ENV)); - logger.info("eventstore : {}", eventstore); + String eventStore = System.getProperty(EventMeshConstants.EVENT_STORE_PROPERTIES, System.getenv(EventMeshConstants.EVENT_STORE_ENV)); + logger.info("eventStore : {}", eventStore); serviceState = ServiceState.INITED; logger.info("server state:{}", serviceState); diff --git a/eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/core/protocol/http/retry/HttpRetryer.java b/eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/core/protocol/http/retry/HttpRetryer.java index 6147f7b3d6..9faaece997 100644 --- a/eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/core/protocol/http/retry/HttpRetryer.java +++ b/eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/core/protocol/http/retry/HttpRetryer.java @@ -60,11 +60,11 @@ public void init() { 60000, TimeUnit.MILLISECONDS, new ArrayBlockingQueue(eventMeshHTTPServer.getEventMeshHttpConfiguration().eventMeshServerRetryBlockQSize), new ThreadFactory() { - private AtomicInteger ai = new AtomicInteger(); + private AtomicInteger count = new AtomicInteger(); @Override public Thread newThread(Runnable r) { - Thread thread = new Thread(r, "http-retry-" + ai.incrementAndGet()); + Thread thread = new Thread(r, "http-retry-" + count.incrementAndGet()); thread.setPriority(Thread.NORM_PRIORITY); thread.setDaemon(true); return thread;