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
This commit is contained in:
parent
d5c046518e
commit
113a9e40cb
|
@ -900,12 +900,26 @@ public class RPC {
|
||||||
/**
|
/**
|
||||||
* @return Default: -1.
|
* @return Default: -1.
|
||||||
* @param numReaders input numReaders.
|
* @param numReaders input numReaders.
|
||||||
|
* @deprecated call {@link #setNumReaders(int value)} instead.
|
||||||
*/
|
*/
|
||||||
|
@Deprecated
|
||||||
public Builder setnumReaders(int numReaders) {
|
public Builder setnumReaders(int numReaders) {
|
||||||
this.numReaders = numReaders;
|
this.numReaders = numReaders;
|
||||||
return this;
|
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.
|
* @return Default: -1.
|
||||||
* @param queueSizePerHandler
|
* @param queueSizePerHandler
|
||||||
|
|
|
@ -378,7 +378,7 @@ public class TestRPC extends TestRpcBase {
|
||||||
assertEquals(confReaders, server.getNumReaders());
|
assertEquals(confReaders, server.getNumReaders());
|
||||||
|
|
||||||
server = newServerBuilder(conf)
|
server = newServerBuilder(conf)
|
||||||
.setNumHandlers(1).setnumReaders(3).setQueueSizePerHandler(200)
|
.setNumHandlers(1).setNumReaders(3).setQueueSizePerHandler(200)
|
||||||
.setVerbose(false).build();
|
.setVerbose(false).build();
|
||||||
|
|
||||||
assertEquals(3, server.getNumReaders());
|
assertEquals(3, server.getNumReaders());
|
||||||
|
|
|
@ -333,7 +333,7 @@ public class RouterRpcServer extends AbstractService implements ClientProtocol,
|
||||||
.setBindAddress(confRpcAddress.getHostName())
|
.setBindAddress(confRpcAddress.getHostName())
|
||||||
.setPort(confRpcAddress.getPort())
|
.setPort(confRpcAddress.getPort())
|
||||||
.setNumHandlers(handlerCount)
|
.setNumHandlers(handlerCount)
|
||||||
.setnumReaders(readerCount)
|
.setNumReaders(readerCount)
|
||||||
.setQueueSizePerHandler(handlerQueueSize)
|
.setQueueSizePerHandler(handlerQueueSize)
|
||||||
.setVerbose(false)
|
.setVerbose(false)
|
||||||
.setAlignmentContext(routerStateIdContext)
|
.setAlignmentContext(routerStateIdContext)
|
||||||
|
|
Loading…
Reference in New Issue