This is an automated email from the ASF dual-hosted git repository. stevel pushed a commit to branch branch-3.3 in repository https://gitbox.apache.org/repos/asf/hadoop.git
commit de08baded6bf1552b20455b3b7ed37bb5adce39d Author: huhaiyang <huhaiyang...@126.com> AuthorDate: Thu Feb 9 21:28:34 2023 +0800 HADOOP-18625. Fix method name of RPC.Builder#setnumReaders (#5301) Changes method name of RPC.Builder#setnumReaders to setNumReaders() The original method is still there, just marked deprecated. It is the one which should be used when working with older branches. Contributed by Haiyang Hu --- .../src/main/java/org/apache/hadoop/ipc/RPC.java | 16 +++++++++++++++- .../src/test/java/org/apache/hadoop/ipc/TestRPC.java | 2 +- .../hdfs/server/federation/router/RouterRpcServer.java | 2 +- 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/RPC.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/RPC.java index fc562b525ad..c7ca09c60ba 100644 --- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/RPC.java +++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/RPC.java @@ -896,15 +896,29 @@ public class RPC { this.numHandlers = numHandlers; return this; } - + /** * @return Default: -1. * @param numReaders input numReaders. + * @deprecated call {@link #setNumReaders(int value)} instead. */ + @Deprecated public Builder setnumReaders(int numReaders) { this.numReaders = numReaders; return this; } + + /** + * Set the number of reader threads. + * + * @return this builder. + * @param value input numReaders. + * @since HADOOP-18625. + */ + public Builder setNumReaders(int value) { + this.numReaders = value; + return this; + } /** * @return Default: -1. diff --git a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/ipc/TestRPC.java b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/ipc/TestRPC.java index 362b8e3105e..7e1c6a12ccd 100644 --- a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/ipc/TestRPC.java +++ b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/ipc/TestRPC.java @@ -380,7 +380,7 @@ public class TestRPC extends TestRpcBase { assertEquals(confReaders, server.getNumReaders()); server = newServerBuilder(conf) - .setNumHandlers(1).setnumReaders(3).setQueueSizePerHandler(200) + .setNumHandlers(1).setNumReaders(3).setQueueSizePerHandler(200) .setVerbose(false).build(); assertEquals(3, server.getNumReaders()); diff --git a/hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/router/RouterRpcServer.java b/hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/router/RouterRpcServer.java index 13189964d19..289848df309 100644 --- a/hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/router/RouterRpcServer.java +++ b/hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/router/RouterRpcServer.java @@ -298,7 +298,7 @@ public class RouterRpcServer extends AbstractService implements ClientProtocol, .setBindAddress(confRpcAddress.getHostName()) .setPort(confRpcAddress.getPort()) .setNumHandlers(handlerCount) - .setnumReaders(readerCount) + .setNumReaders(readerCount) .setQueueSizePerHandler(handlerQueueSize) .setVerbose(false) .setSecretManager(this.securityManager.getSecretManager()) --------------------------------------------------------------------- To unsubscribe, e-mail: common-commits-unsubscr...@hadoop.apache.org For additional commands, e-mail: common-commits-h...@hadoop.apache.org