This is an automated email from the ASF dual-hosted git repository.

jinsongzhou pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/amoro.git


The following commit(s) were added to refs/heads/master by this push:
     new 8207efcd4 [AMORO-3153]Modify the implementation class of the thrift 
server (#3154)
8207efcd4 is described below

commit 8207efcd4c39c1af471812bd00dfe1291d1286b8
Author: feng xiaohang <[email protected]>
AuthorDate: Mon Sep 2 18:00:39 2024 +0800

    [AMORO-3153]Modify the implementation class of the thrift server (#3154)
    
    Modify the implementation class of the thrift server
    
    Co-authored-by: xiaosefeng <[email protected]>
    Co-authored-by: Xavier Bai <[email protected]>
---
 .../java/org/apache/amoro/server/AmoroServiceContainer.java  | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git 
a/amoro-ams/amoro-ams-server/src/main/java/org/apache/amoro/server/AmoroServiceContainer.java
 
b/amoro-ams/amoro-ams-server/src/main/java/org/apache/amoro/server/AmoroServiceContainer.java
index 92f0dff2b..1dd763f32 100644
--- 
a/amoro-ams/amoro-ams-server/src/main/java/org/apache/amoro/server/AmoroServiceContainer.java
+++ 
b/amoro-ams/amoro-ams-server/src/main/java/org/apache/amoro/server/AmoroServiceContainer.java
@@ -52,8 +52,8 @@ import 
org.apache.amoro.shade.thrift.org.apache.thrift.TMultiplexedProcessor;
 import org.apache.amoro.shade.thrift.org.apache.thrift.TProcessor;
 import 
org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TBinaryProtocol;
 import 
org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TProtocolFactory;
+import org.apache.amoro.shade.thrift.org.apache.thrift.server.THsHaServer;
 import org.apache.amoro.shade.thrift.org.apache.thrift.server.TServer;
-import 
org.apache.amoro.shade.thrift.org.apache.thrift.server.TThreadedSelectorServer;
 import 
org.apache.amoro.shade.thrift.org.apache.thrift.transport.TNonblockingServerSocket;
 import 
org.apache.amoro.shade.thrift.org.apache.thrift.transport.TTransportException;
 import 
org.apache.amoro.shade.thrift.org.apache.thrift.transport.TTransportFactory;
@@ -374,15 +374,13 @@ public class AmoroServiceContainer {
     TTransportFactory transportFactory = new TFramedTransport.Factory();
     TMultiplexedProcessor multiplexedProcessor = new TMultiplexedProcessor();
     multiplexedProcessor.registerProcessor(processorName, processor);
-    TThreadedSelectorServer.Args args =
-        new TThreadedSelectorServer.Args(serverTransport)
+    THsHaServer.Args args =
+        new THsHaServer.Args(serverTransport)
             .processor(multiplexedProcessor)
             .transportFactory(transportFactory)
             .protocolFactory(protocolFactory)
             .inputProtocolFactory(inputProtoFactory)
-            .executorService(executorService)
-            .selectorThreads(selectorThreads)
-            .acceptQueueSizePerThread(queueSizePerSelector);
+            .executorService(executorService);
     LOG.info(
         "The number of selector threads for the {} thrift server is: {}",
         processorName,
@@ -391,7 +389,7 @@ public class AmoroServiceContainer {
         "The size of per-selector queue for the {} thrift server is: {}",
         processorName,
         queueSizePerSelector);
-    return new TThreadedSelectorServer(args);
+    return new THsHaServer(args);
   }
 
   private ThreadFactory getThriftThreadFactory(String processorName) {

Reply via email to