Skip to content

Commit cb4d99a

Browse files
committed
use getRPCClient() instead of rpcClient in async methods,.
1 parent 5123f66 commit cb4d99a

File tree

1 file changed

+6
-6
lines changed
  • hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/router

1 file changed

+6
-6
lines changed

hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/router/RouterRpcServer.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -823,7 +823,7 @@ <T> T invokeAtAvailableNsAsync(RemoteMethod method, Class<T> clazz)
823823
asyncComplete(null);
824824
if (!nsId.isEmpty()) {
825825
asyncTry(() -> {
826-
rpcClient.invokeSingle(nsId, method, clazz);
826+
getRPCClient().invokeSingle(nsId, method, clazz);
827827
});
828828

829829
asyncCatch((AsyncCatchFunction<T, IOException>)(res, ioe) -> {
@@ -898,7 +898,7 @@ <T> T invokeOnNsAsync(RemoteMethod method, Class<T> clazz, IOException ioe,
898898
String nsId = fnInfo.getNameserviceId();
899899
LOG.debug("Invoking {} on namespace {}", method, nsId);
900900
asyncTry(() -> {
901-
rpcClient.invokeSingle(nsId, method, clazz);
901+
getRPCClient().invokeSingle(nsId, method, clazz);
902902
asyncApply(result -> {
903903
if (result != null && isExpectedClass(clazz, result)) {
904904
foreach.breakNow();
@@ -1092,7 +1092,7 @@ private RemoteLocation getExistingLocationAsync(String src,
10921092
List<RemoteLocation> locations) throws IOException {
10931093
RemoteMethod method = new RemoteMethod("getFileInfo",
10941094
new Class<?>[] {String.class}, new RemoteParam());
1095-
rpcClient.invokeConcurrent(
1095+
getRPCClient().invokeConcurrent(
10961096
locations, method, true, false, HdfsFileStatus.class);
10971097
asyncApply((ApplyFunction<Map<RemoteLocation, HdfsFileStatus>, Object>) results -> {
10981098
for (RemoteLocation loc : locations) {
@@ -1378,7 +1378,7 @@ public DatanodeInfo[] getDatanodeReportAsync(
13781378
new Class<?>[] {DatanodeReportType.class}, type);
13791379

13801380
Set<FederationNamespaceInfo> nss = namenodeResolver.getNamespaces();
1381-
rpcClient.invokeConcurrent(nss, method, requireResponse, false,
1381+
getRPCClient().invokeConcurrent(nss, method, requireResponse, false,
13821382
timeOutMs, DatanodeInfo[].class);
13831383

13841384
asyncApply((ApplyFunction<Map<FederationNamespaceInfo, DatanodeInfo[]>,
@@ -1460,7 +1460,7 @@ public Map<String, DatanodeStorageReport[]> getDatanodeStorageReportMapAsync(
14601460
RemoteMethod method = new RemoteMethod("getDatanodeStorageReport",
14611461
new Class<?>[] {DatanodeReportType.class}, type);
14621462
Set<FederationNamespaceInfo> nss = namenodeResolver.getNamespaces();
1463-
rpcClient.invokeConcurrent(
1463+
getRPCClient().invokeConcurrent(
14641464
nss, method, requireResponse, false, timeOutMs, DatanodeStorageReport[].class);
14651465

14661466
asyncApply((ApplyFunction<Map<FederationNamespaceInfo, DatanodeStorageReport[]>,
@@ -2309,7 +2309,7 @@ public DatanodeInfo[] getSlowDatanodeReportAsync(boolean requireResponse, long t
23092309
RemoteMethod method = new RemoteMethod("getSlowDatanodeReport");
23102310

23112311
Set<FederationNamespaceInfo> nss = namenodeResolver.getNamespaces();
2312-
rpcClient.invokeConcurrent(nss, method, requireResponse, false,
2312+
getRPCClient().invokeConcurrent(nss, method, requireResponse, false,
23132313
timeOutMs, DatanodeInfo[].class);
23142314

23152315
asyncApply((ApplyFunction<Map<FederationNamespaceInfo, DatanodeInfo[]>,

0 commit comments

Comments
 (0)