|
@@ -654,7 +654,8 @@ public class RPC {
|
|
|
final boolean verbose, Configuration conf)
|
|
|
throws IOException {
|
|
|
return getServer(instance.getClass(), // use impl class for protocol
|
|
|
- instance, bindAddress, port, numHandlers, false, conf, null);
|
|
|
+ instance, bindAddress, port, numHandlers, false, conf, null,
|
|
|
+ null);
|
|
|
}
|
|
|
|
|
|
/** Construct a server for a protocol implementation instance. */
|
|
@@ -662,7 +663,8 @@ public class RPC {
|
|
|
Object instance, String bindAddress,
|
|
|
int port, Configuration conf)
|
|
|
throws IOException {
|
|
|
- return getServer(protocol, instance, bindAddress, port, 1, false, conf, null);
|
|
|
+ return getServer(protocol, instance, bindAddress, port, 1, false, conf, null,
|
|
|
+ null);
|
|
|
}
|
|
|
|
|
|
/** Construct a server for a protocol implementation instance.
|
|
@@ -676,7 +678,7 @@ public class RPC {
|
|
|
throws IOException {
|
|
|
|
|
|
return getServer(protocol, instance, bindAddress, port, numHandlers, verbose,
|
|
|
- conf, null);
|
|
|
+ conf, null, null);
|
|
|
}
|
|
|
|
|
|
/** Construct a server for a protocol implementation instance. */
|
|
@@ -686,10 +688,20 @@ public class RPC {
|
|
|
boolean verbose, Configuration conf,
|
|
|
SecretManager<? extends TokenIdentifier> secretManager)
|
|
|
throws IOException {
|
|
|
-
|
|
|
+ return getServer(protocol, instance, bindAddress, port, numHandlers, verbose,
|
|
|
+ conf, secretManager, null);
|
|
|
+ }
|
|
|
+
|
|
|
+ public static Server getServer(Class<?> protocol,
|
|
|
+ Object instance, String bindAddress, int port,
|
|
|
+ int numHandlers,
|
|
|
+ boolean verbose, Configuration conf,
|
|
|
+ SecretManager<? extends TokenIdentifier> secretManager,
|
|
|
+ String portRangeConfig)
|
|
|
+ throws IOException {
|
|
|
return getProtocolEngine(protocol, conf)
|
|
|
.getServer(protocol, instance, bindAddress, port, numHandlers, -1, -1,
|
|
|
- verbose, conf, secretManager);
|
|
|
+ verbose, conf, secretManager, portRangeConfig);
|
|
|
}
|
|
|
|
|
|
/** Construct a server for a protocol implementation instance. */
|
|
@@ -704,7 +716,8 @@ public class RPC {
|
|
|
|
|
|
return getProtocolEngine(protocol, conf)
|
|
|
.getServer(protocol, instance, bindAddress, port, numHandlers,
|
|
|
- numReaders, queueSizePerHandler, verbose, conf, secretManager);
|
|
|
+ numReaders, queueSizePerHandler, verbose, conf, secretManager,
|
|
|
+ null);
|
|
|
}
|
|
|
|
|
|
/** An RPC Server. */
|
|
@@ -855,9 +868,10 @@ public class RPC {
|
|
|
Class<? extends Writable> paramClass, int handlerCount,
|
|
|
int numReaders, int queueSizePerHandler,
|
|
|
Configuration conf, String serverName,
|
|
|
- SecretManager<? extends TokenIdentifier> secretManager) throws IOException {
|
|
|
+ SecretManager<? extends TokenIdentifier> secretManager,
|
|
|
+ String portRangeConfig) throws IOException {
|
|
|
super(bindAddress, port, paramClass, handlerCount, numReaders, queueSizePerHandler,
|
|
|
- conf, serverName, secretManager);
|
|
|
+ conf, serverName, secretManager, portRangeConfig);
|
|
|
initProtocolMetaInfo(conf);
|
|
|
}
|
|
|
|