Should not use XXXService.Interface.class.getSimpleName as stub key prefix in AsyncConnectionImpl (#2443)

Signed-off-by: Duo Zhang <zhangduo@apache.org>
This commit is contained in:
王伟 2020-09-23 14:36:00 +08:00 committed by GitHub
parent e7797208d6
commit 98225ff1a3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -254,7 +254,7 @@ class AsyncConnectionImpl implements AsyncConnection {
ClientService.Interface getRegionServerStub(ServerName serverName) throws IOException {
return ConcurrentMapUtils.computeIfAbsentEx(rsStubs,
getStubKey(ClientService.Interface.class.getSimpleName(), serverName, hostnameCanChange),
getStubKey(ClientService.getDescriptor().getName(), serverName, hostnameCanChange),
() -> createRegionServerStub(serverName));
}
@ -268,7 +268,7 @@ class AsyncConnectionImpl implements AsyncConnection {
AdminService.Interface getAdminStub(ServerName serverName) throws IOException {
return ConcurrentMapUtils.computeIfAbsentEx(adminSubs,
getStubKey(AdminService.Interface.class.getSimpleName(), serverName, hostnameCanChange),
getStubKey(AdminService.getDescriptor().getName(), serverName, hostnameCanChange),
() -> createAdminServerStub(serverName));
}