Apache9 commented on a change in pull request #2669:
URL: https://github.com/apache/hbase/pull/2669#discussion_r526510319
##########
File path:
hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncConnectionImpl.java
##########
@@ -186,6 +183,33 @@ private void spawnRenewalChore(final UserGroupInformation
user) {
authService.scheduleChore(AuthUtil.getAuthRenewalChore(user));
}
+ /**
+ * Get a unique key for the rpc stub to the given server.
+ */
+ private String getStubKey(String serviceName, ServerName serverName) throws
UnknownHostException {
+ // Sometimes, servers go down and they come back up with the same hostname
but a different
+ // IP address. Force a resolution of the hostname by trying to instantiate
an
+ // InetSocketAddress, and this way we will rightfully get a new stubKey.
+ // Also, include the hostname in the key so as to take care of those cases
where the
+ // DNS name is different but IP address remains the same.
+ String hostname = serverName.getHostname();
+ int port = serverName.getPort();
+ // We used to ignore when the address was unresolvable but that makes no
sense. It
Review comment:
I'm not sure whether we really need to identify different region servers
here. What is the problem if we just use host and port as the stub key here? It
will not be a problem if we will resolve it when we actually connecting the
remote side? Thoughts?
----------------------------------------------------------------
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]