use of org.apache.hadoop.hbase.shaded.com.google.protobuf.Descriptors.ServiceDescriptor in project hbase by apache.
the class RpcServerFactory method createRpcServer.
public static RpcServer createRpcServer(final Server server, final String name, final List<BlockingServiceAndInterface> services, final InetSocketAddress bindAddress, Configuration conf, RpcScheduler scheduler) throws IOException {
String rpcServerClass = conf.get(CUSTOM_RPC_SERVER_IMPL_CONF_KEY, SimpleRpcServer.class.getName());
StringBuffer servicesList = new StringBuffer();
for (BlockingServiceAndInterface s : services) {
ServiceDescriptor sd = s.getBlockingService().getDescriptorForType();
// Can be null for certain tests like TestTokenAuthentication
if (sd == null)
continue;
if (servicesList.length() > 0)
servicesList.append(", ");
servicesList.append(sd.getFullName());
}
LOG.info("Creating " + rpcServerClass + " hosting " + servicesList);
return ReflectionUtils.instantiateWithCustomCtor(rpcServerClass, new Class[] { Server.class, String.class, List.class, InetSocketAddress.class, Configuration.class, RpcScheduler.class }, new Object[] { server, name, services, bindAddress, conf, scheduler });
}
Aggregations