ndimiduk commented on a change in pull request #954: HBASE-23305: Master based
registry implementation
URL: https://github.com/apache/hbase/pull/954#discussion_r363448043
##########
File path:
hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/AbstractRpcClient.java
##########
@@ -527,6 +528,21 @@ public RpcChannel createRpcChannel(ServerName sn, User
user, int rpcTimeout)
return new RpcChannelImplementation(this, createAddr(sn), user,
rpcTimeout);
}
+ @Override
+ public RpcChannel createHedgedRpcChannel(Set<ServerName> sns, User user, int
rpcTimeout)
+ throws UnknownHostException {
+ final int hedgedRpcFanOut =
conf.getInt(HConstants.HBASE_RPCS_HEDGED_REQS_FANOUT_KEY,
+ HConstants.HBASE_RPCS_HEDGED_REQS_FANOUT_DEFAULT);
+ Set<InetSocketAddress> addresses = new HashSet<>();
+ for (ServerName sn: sns) {
+ addresses.add(createAddr(sn));
+ }
+ Preconditions.checkState(this instanceof NettyRpcClient,
+ "Hedging only supported for non-blocking connection implementations.");
Review comment:
Might as well use the inheritance language feature as intended. The abstract
parent can provide no implementation at all, or just throw the exception. The
implementation of `NettyRpcClient` can override that implementation with its
own.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services