From 9758742bd08d3af02c3398eebb866fe03b362290 Mon Sep 17 00:00:00 2001 From: Russole <850905junior@gmail.com> Date: Tue, 31 Mar 2026 01:36:05 +0800 Subject: [PATCH 1/4] HDDS-14922. Define invokeRatisServer or invokeRatisClient methods --- .../DeletedBlockLogStateManagerImpl.java | 2 +- .../hdds/scm/ha/SCMHAInvocationHandler.java | 9 ++++++++- .../apache/hadoop/hdds/scm/ha/ScmInvoker.java | 2 ++ .../DeletedBlockLogStateManagerInvoker.java | 20 ++++++++++++++++++- 4 files changed, 30 insertions(+), 3 deletions(-) diff --git a/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/block/DeletedBlockLogStateManagerImpl.java b/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/block/DeletedBlockLogStateManagerImpl.java index 88a596a14577..7f45f5cb2d19 100644 --- a/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/block/DeletedBlockLogStateManagerImpl.java +++ b/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/block/DeletedBlockLogStateManagerImpl.java @@ -240,7 +240,7 @@ public DeletedBlockLogStateManager build() throws IOException { final DeletedBlockLogStateManager impl = new DeletedBlockLogStateManagerImpl( deletedBlocksTransactionTable, statefulServiceConfigTable, containerManager, transactionBuffer); - return scmRatisServer.getProxyHandler(new DeletedBlockLogStateManagerInvoker(impl)); + return scmRatisServer.getProxyHandler(new DeletedBlockLogStateManagerInvoker(impl, scmRatisServer)); } } } diff --git a/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/ha/SCMHAInvocationHandler.java b/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/ha/SCMHAInvocationHandler.java index 382f18819205..f19dc0b0243d 100644 --- a/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/ha/SCMHAInvocationHandler.java +++ b/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/ha/SCMHAInvocationHandler.java @@ -104,13 +104,20 @@ private Object invokeRatis(Method method, Object[] args) if (LOG.isTraceEnabled()) { LOG.trace("Invoking method {} on target {}", method, ratisHandler); } + + final Object[] safeArgs = args != null ? args : new Object[0]; + try { switch (method.getAnnotation(Replicate.class).invocationType()) { case CLIENT: return invokeRatisClient(method, args); case DIRECT: default: - return invokeRatisServer(method, args); + if (invoker != null) { + return invoker.invokeRatisServer( + method.getName(), method.getParameterTypes(), safeArgs); + } + return invokeRatisServer(method, safeArgs); } } catch (Exception e) { throw translateException(e); diff --git a/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/ha/ScmInvoker.java b/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/ha/ScmInvoker.java index 2bc1202fcd9f..feccb9777875 100644 --- a/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/ha/ScmInvoker.java +++ b/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/ha/ScmInvoker.java @@ -30,4 +30,6 @@ public interface ScmInvoker { T getImpl(); Object invokeLocal(String methodName, Object[] args) throws Exception; + + Object invokeRatisServer(String methodName, Class[] paramTypes, Object[] args) throws Exception; } diff --git a/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/ha/invoker/DeletedBlockLogStateManagerInvoker.java b/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/ha/invoker/DeletedBlockLogStateManagerInvoker.java index 9574ac1c0d38..f221fd14f23c 100644 --- a/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/ha/invoker/DeletedBlockLogStateManagerInvoker.java +++ b/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/ha/invoker/DeletedBlockLogStateManagerInvoker.java @@ -21,6 +21,9 @@ import org.apache.hadoop.hdds.protocol.proto.HddsProtos.DeletedBlocksTransactionSummary; import org.apache.hadoop.hdds.protocol.proto.SCMRatisProtocol.RequestType; import org.apache.hadoop.hdds.scm.block.DeletedBlockLogStateManager; +import org.apache.hadoop.hdds.scm.ha.SCMRatisRequest; +import org.apache.hadoop.hdds.scm.ha.SCMRatisResponse; +import org.apache.hadoop.hdds.scm.ha.SCMRatisServer; import org.apache.hadoop.hdds.scm.ha.ScmInvoker; import org.apache.hadoop.hdds.utils.db.Table; @@ -29,9 +32,11 @@ */ public class DeletedBlockLogStateManagerInvoker implements ScmInvoker { private final DeletedBlockLogStateManager impl; + private final SCMRatisServer ratisHandler; - public DeletedBlockLogStateManagerInvoker(DeletedBlockLogStateManager impl) { + public DeletedBlockLogStateManagerInvoker(DeletedBlockLogStateManager impl, SCMRatisServer ratisHandler) { this.impl = impl; + this.ratisHandler = ratisHandler; } @Override @@ -88,4 +93,17 @@ public Object invokeLocal(String methodName, Object[] params) throws Exception { } } + @Override + public Object invokeRatisServer(String methodName, Class[] paramTypes, + Object[] args) throws Exception { + final SCMRatisRequest scmRatisRequest = SCMRatisRequest.of( + getType(), methodName, paramTypes, args); + final SCMRatisResponse response = ratisHandler.submitRequest( + scmRatisRequest); + if (response.isSuccess()) { + return response.getResult(); + } + throw response.getException(); + } + } From 4a7538a82ebdb79d2f69eb37f0c4403d2a958455 Mon Sep 17 00:00:00 2001 From: Russole <850905junior@gmail.com> Date: Tue, 31 Mar 2026 20:34:40 +0800 Subject: [PATCH 2/4] Remove unnecessary safeArgs handling --- .../apache/hadoop/hdds/scm/ha/SCMHAInvocationHandler.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/ha/SCMHAInvocationHandler.java b/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/ha/SCMHAInvocationHandler.java index f19dc0b0243d..6976b9c6ea98 100644 --- a/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/ha/SCMHAInvocationHandler.java +++ b/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/ha/SCMHAInvocationHandler.java @@ -105,8 +105,6 @@ private Object invokeRatis(Method method, Object[] args) LOG.trace("Invoking method {} on target {}", method, ratisHandler); } - final Object[] safeArgs = args != null ? args : new Object[0]; - try { switch (method.getAnnotation(Replicate.class).invocationType()) { case CLIENT: @@ -115,9 +113,9 @@ private Object invokeRatis(Method method, Object[] args) default: if (invoker != null) { return invoker.invokeRatisServer( - method.getName(), method.getParameterTypes(), safeArgs); + method.getName(), method.getParameterTypes(), args); } - return invokeRatisServer(method, safeArgs); + return invokeRatisServer(method, args); } } catch (Exception e) { throw translateException(e); From daeb6638896f5c5882ee1dae4b7e33430251325f Mon Sep 17 00:00:00 2001 From: Russole <850905junior@gmail.com> Date: Wed, 1 Apr 2026 22:59:11 +0800 Subject: [PATCH 3/4] Update the implementation based on review comments --- .../hdds/scm/ha/SCMHAInvocationHandler.java | 12 +-- .../hadoop/hdds/scm/ha/SCMRatisServer.java | 4 + .../apache/hadoop/hdds/scm/ha/ScmInvoker.java | 35 --------- .../DeletedBlockLogStateManagerInvoker.java | 78 ++++++++++++++----- .../hdds/scm/ha/invoker/ScmInvoker.java | 65 ++++++++++++++++ 5 files changed, 131 insertions(+), 63 deletions(-) delete mode 100644 hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/ha/ScmInvoker.java create mode 100644 hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/ha/invoker/ScmInvoker.java diff --git a/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/ha/SCMHAInvocationHandler.java b/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/ha/SCMHAInvocationHandler.java index 6976b9c6ea98..5fe2cd733b01 100644 --- a/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/ha/SCMHAInvocationHandler.java +++ b/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/ha/SCMHAInvocationHandler.java @@ -26,9 +26,11 @@ import org.apache.hadoop.hdds.protocol.proto.SCMRatisProtocol.RequestType; import org.apache.hadoop.hdds.scm.exceptions.SCMException; import org.apache.hadoop.hdds.scm.exceptions.SCMException.ResultCodes; +import org.apache.hadoop.hdds.scm.ha.invoker.ScmInvoker; import org.apache.hadoop.hdds.scm.metadata.Replicate; import org.apache.hadoop.util.Time; import org.apache.ratis.protocol.exceptions.NotLeaderException; +import org.apache.ratis.util.Preconditions; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -86,10 +88,8 @@ private Object invokeLocal(Method method, Object[] args) LOG.trace("Invoking method {} on target {} with arguments {}", method, localHandler, args); } + Preconditions.assertNull(invoker, "invoker"); try { - if (invoker != null) { - return invoker.invokeLocal(method.getName(), args); - } return method.invoke(localHandler, args); } catch (Exception e) { throw translateException(e); @@ -111,10 +111,6 @@ private Object invokeRatis(Method method, Object[] args) return invokeRatisClient(method, args); case DIRECT: default: - if (invoker != null) { - return invoker.invokeRatisServer( - method.getName(), method.getParameterTypes(), args); - } return invokeRatisServer(method, args); } } catch (Exception e) { @@ -148,7 +144,7 @@ private Object invokeRatisClient(Method method, Object[] args) throw response.getException(); } - private static SCMException translateException(Throwable t) { + public static SCMException translateException(Throwable t) { if (t instanceof SCMException) { return (SCMException) t; } diff --git a/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/ha/SCMRatisServer.java b/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/ha/SCMRatisServer.java index 689c3aff8ef9..596fe37c4d88 100644 --- a/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/ha/SCMRatisServer.java +++ b/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/ha/SCMRatisServer.java @@ -25,6 +25,7 @@ import org.apache.hadoop.hdds.protocol.proto.SCMRatisProtocol.RequestType; import org.apache.hadoop.hdds.scm.AddSCMRequest; import org.apache.hadoop.hdds.scm.RemoveSCMRequest; +import org.apache.hadoop.hdds.scm.ha.invoker.ScmInvoker; import org.apache.ratis.grpc.GrpcTlsConfig; import org.apache.ratis.protocol.RaftPeerId; import org.apache.ratis.protocol.exceptions.NotLeaderException; @@ -82,6 +83,9 @@ default T getProxyHandler(ScmInvoker invoker) { default T getProxyHandler(RequestType type, Class intf, T impl, ScmInvoker invoker) { final SCMHAInvocationHandler invocationHandler = new SCMHAInvocationHandler(type, impl, invoker, this); + if (invoker != null) { + return invoker.getProxy(); + } return intf.cast(Proxy.newProxyInstance(getClass().getClassLoader(), new Class[] {intf}, invocationHandler)); } diff --git a/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/ha/ScmInvoker.java b/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/ha/ScmInvoker.java deleted file mode 100644 index feccb9777875..000000000000 --- a/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/ha/ScmInvoker.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.apache.hadoop.hdds.scm.ha; - -import org.apache.hadoop.hdds.protocol.proto.SCMRatisProtocol.RequestType; - -/** - * Invokes methods without using reflection. - */ -public interface ScmInvoker { - RequestType getType(); - - Class getApi(); - - T getImpl(); - - Object invokeLocal(String methodName, Object[] args) throws Exception; - - Object invokeRatisServer(String methodName, Class[] paramTypes, Object[] args) throws Exception; -} diff --git a/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/ha/invoker/DeletedBlockLogStateManagerInvoker.java b/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/ha/invoker/DeletedBlockLogStateManagerInvoker.java index f221fd14f23c..03a02f98d3de 100644 --- a/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/ha/invoker/DeletedBlockLogStateManagerInvoker.java +++ b/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/ha/invoker/DeletedBlockLogStateManagerInvoker.java @@ -17,26 +17,25 @@ package org.apache.hadoop.hdds.scm.ha.invoker; +import com.google.protobuf.ByteString; +import java.io.IOException; import java.util.ArrayList; import org.apache.hadoop.hdds.protocol.proto.HddsProtos.DeletedBlocksTransactionSummary; import org.apache.hadoop.hdds.protocol.proto.SCMRatisProtocol.RequestType; +import org.apache.hadoop.hdds.protocol.proto.StorageContainerDatanodeProtocolProtos.DeletedBlocksTransaction; import org.apache.hadoop.hdds.scm.block.DeletedBlockLogStateManager; -import org.apache.hadoop.hdds.scm.ha.SCMRatisRequest; -import org.apache.hadoop.hdds.scm.ha.SCMRatisResponse; import org.apache.hadoop.hdds.scm.ha.SCMRatisServer; -import org.apache.hadoop.hdds.scm.ha.ScmInvoker; import org.apache.hadoop.hdds.utils.db.Table; /** * Invoker for DeletedBlockLogStateManager local (non-@Replicate) methods. */ -public class DeletedBlockLogStateManagerInvoker implements ScmInvoker { +public class DeletedBlockLogStateManagerInvoker extends ScmInvoker { private final DeletedBlockLogStateManager impl; - private final SCMRatisServer ratisHandler; - public DeletedBlockLogStateManagerInvoker(DeletedBlockLogStateManager impl, SCMRatisServer ratisHandler) { + public DeletedBlockLogStateManagerInvoker(DeletedBlockLogStateManager impl, SCMRatisServer scmRatisServer) { + super(scmRatisServer); this.impl = impl; - this.ratisHandler = ratisHandler; } @Override @@ -54,6 +53,58 @@ public DeletedBlockLogStateManager getImpl() { return impl; } + @Override + protected Class[] getParameterTypes(String methodName) { + switch (methodName) { + case "addTransactionsToDB": + return new Class[] {ArrayList.class, DeletedBlocksTransactionSummary.class}; + + case "removeTransactionsFromDB": + return new Class[] {ArrayList.class, DeletedBlocksTransactionSummary.class}; + + default: + throw new IllegalArgumentException("Unknown method: " + methodName); + } + } + + @Override + public DeletedBlockLogStateManager getProxy() { + return new DeletedBlockLogStateManager() { + @Override + public void addTransactionsToDB(ArrayList txs, + DeletedBlocksTransactionSummary summary) throws IOException { + // @Replicate + final Object[] args = {txs, summary}; + invokeRatisServer("addTransactionsToDB", args); + } + + @Override + public void removeTransactionsFromDB(ArrayList txIDs, + DeletedBlocksTransactionSummary summary) throws IOException { + final Object[] args = {txIDs, summary}; + invokeRatisServer("removeTransactionsFromDB", args); + } + + @Override + public Table.KeyValueIterator getReadOnlyIterator() throws IOException { + return impl.getReadOnlyIterator(); + } + + @Override + public void onFlush() { + // local + impl.onFlush(); + } + + @Override + public void reinitialize( + Table deletedBlocksTXTable, + Table statefulConfigTable) { + impl.reinitialize(deletedBlocksTXTable, statefulConfigTable); + } + }; + } + // Code generated for DeletedBlockLogStateManager. Do not modify. @SuppressWarnings("unchecked") @Override @@ -93,17 +144,4 @@ public Object invokeLocal(String methodName, Object[] params) throws Exception { } } - @Override - public Object invokeRatisServer(String methodName, Class[] paramTypes, - Object[] args) throws Exception { - final SCMRatisRequest scmRatisRequest = SCMRatisRequest.of( - getType(), methodName, paramTypes, args); - final SCMRatisResponse response = ratisHandler.submitRequest( - scmRatisRequest); - if (response.isSuccess()) { - return response.getResult(); - } - throw response.getException(); - } - } diff --git a/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/ha/invoker/ScmInvoker.java b/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/ha/invoker/ScmInvoker.java new file mode 100644 index 000000000000..fe7e18222355 --- /dev/null +++ b/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/ha/invoker/ScmInvoker.java @@ -0,0 +1,65 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.hadoop.hdds.scm.ha.invoker; + +import static org.apache.hadoop.hdds.scm.ha.SCMHAInvocationHandler.translateException; + +import org.apache.hadoop.hdds.protocol.proto.SCMRatisProtocol.RequestType; +import org.apache.hadoop.hdds.scm.exceptions.SCMException; +import org.apache.hadoop.hdds.scm.ha.SCMRatisRequest; +import org.apache.hadoop.hdds.scm.ha.SCMRatisResponse; +import org.apache.hadoop.hdds.scm.ha.SCMRatisServer; + +/** + * Invokes methods without using reflection. + */ +public abstract class ScmInvoker { + static final Object[] NO_ARGS = {}; + + private final SCMRatisServer ratisHandler; + + ScmInvoker(SCMRatisServer ratisHandler) { + this.ratisHandler = ratisHandler; + } + + public abstract RequestType getType(); + + public abstract Class getApi(); + + public abstract T getImpl(); + + public abstract T getProxy(); + + abstract Class[] getParameterTypes(String methodName); + + abstract Object invokeLocal(String methodName, Object[] args) throws Exception; + + Object invokeRatisServer(String methodName, Object[] args) throws SCMException { + try { + final SCMRatisRequest request = SCMRatisRequest.of( + getType(), methodName, getParameterTypes(methodName), args); + final SCMRatisResponse response = ratisHandler.submitRequest(request); + if (response.isSuccess()) { + return response.getResult(); + } + throw response.getException(); + } catch (Exception e) { + throw translateException(e); + } + } +} From 64351c2963ecef5d9dab05bc5705c650c3c8fecb Mon Sep 17 00:00:00 2001 From: Russole <850905junior@gmail.com> Date: Thu, 2 Apr 2026 01:32:09 +0800 Subject: [PATCH 4/4] Fix test Error --- .../DeletedBlockLogStateManagerInvoker.java | 26 ++++++++++++++++--- .../hdds/scm/ha/invoker/ScmInvoker.java | 5 ++-- 2 files changed, 25 insertions(+), 6 deletions(-) diff --git a/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/ha/invoker/DeletedBlockLogStateManagerInvoker.java b/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/ha/invoker/DeletedBlockLogStateManagerInvoker.java index 03a02f98d3de..11a1768f3a9c 100644 --- a/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/ha/invoker/DeletedBlockLogStateManagerInvoker.java +++ b/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/ha/invoker/DeletedBlockLogStateManagerInvoker.java @@ -70,19 +70,38 @@ protected Class[] getParameterTypes(String methodName) { @Override public DeletedBlockLogStateManager getProxy() { return new DeletedBlockLogStateManager() { + @Override + public void addTransactionsToDB(ArrayList txs) + throws IOException { + final Object[] args = {txs}; + invokeRatisServer("addTransactionsToDB", + new Class[] {ArrayList.class}, args); + } + @Override public void addTransactionsToDB(ArrayList txs, DeletedBlocksTransactionSummary summary) throws IOException { - // @Replicate final Object[] args = {txs, summary}; - invokeRatisServer("addTransactionsToDB", args); + invokeRatisServer("addTransactionsToDB", + new Class[] {ArrayList.class, + DeletedBlocksTransactionSummary.class}, args); + } + + @Override + public void removeTransactionsFromDB(ArrayList txIDs) + throws IOException { + final Object[] args = {txIDs}; + invokeRatisServer("removeTransactionsFromDB", + new Class[] {ArrayList.class}, args); } @Override public void removeTransactionsFromDB(ArrayList txIDs, DeletedBlocksTransactionSummary summary) throws IOException { final Object[] args = {txIDs, summary}; - invokeRatisServer("removeTransactionsFromDB", args); + invokeRatisServer("removeTransactionsFromDB", + new Class[] {ArrayList.class, + DeletedBlocksTransactionSummary.class}, args); } @Override @@ -92,7 +111,6 @@ public Table.KeyValueIterator getReadOnlyIterato @Override public void onFlush() { - // local impl.onFlush(); } diff --git a/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/ha/invoker/ScmInvoker.java b/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/ha/invoker/ScmInvoker.java index fe7e18222355..dcff65b09629 100644 --- a/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/ha/invoker/ScmInvoker.java +++ b/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/ha/invoker/ScmInvoker.java @@ -49,10 +49,11 @@ public abstract class ScmInvoker { abstract Object invokeLocal(String methodName, Object[] args) throws Exception; - Object invokeRatisServer(String methodName, Object[] args) throws SCMException { + Object invokeRatisServer(String methodName, Class[] paramTypes, + Object[] args) throws SCMException { try { final SCMRatisRequest request = SCMRatisRequest.of( - getType(), methodName, getParameterTypes(methodName), args); + getType(), methodName, paramTypes, args); final SCMRatisResponse response = ratisHandler.submitRequest(request); if (response.isSuccess()) { return response.getResult();