|
@@ -483,12 +483,10 @@ public class RouterClientProtocol implements ClientProtocol {
|
|
|
new RemoteParam(), clientName, previous, excludedNodes, fileId,
|
|
|
favoredNodes, addBlockFlags);
|
|
|
|
|
|
+ final List<RemoteLocation> locations = rpcServer.getLocationsForPath(src, true);
|
|
|
if (previous != null) {
|
|
|
- return rpcClient.invokeSingle(previous, method, LocatedBlock.class);
|
|
|
+ return rpcClient.invokeSingle(previous, method, locations, LocatedBlock.class);
|
|
|
}
|
|
|
-
|
|
|
- final List<RemoteLocation> locations =
|
|
|
- rpcServer.getLocationsForPath(src, true);
|
|
|
// TODO verify the excludedNodes and favoredNodes are acceptable to this NN
|
|
|
return rpcClient.invokeSequential(
|
|
|
locations, method, LocatedBlock.class, null);
|
|
@@ -513,12 +511,11 @@ public class RouterClientProtocol implements ClientProtocol {
|
|
|
new RemoteParam(), fileId, blk, existings, existingStorageIDs, excludes,
|
|
|
numAdditionalNodes, clientName);
|
|
|
|
|
|
+ final List<RemoteLocation> locations = rpcServer.getLocationsForPath(src, false);
|
|
|
if (blk != null) {
|
|
|
- return rpcClient.invokeSingle(blk, method, LocatedBlock.class);
|
|
|
+ return rpcClient.invokeSingle(blk, method, locations, LocatedBlock.class);
|
|
|
}
|
|
|
|
|
|
- final List<RemoteLocation> locations =
|
|
|
- rpcServer.getLocationsForPath(src, false);
|
|
|
return rpcClient.invokeSequential(
|
|
|
locations, method, LocatedBlock.class, null);
|
|
|
}
|
|
@@ -532,7 +529,9 @@ public class RouterClientProtocol implements ClientProtocol {
|
|
|
new Class<?>[] {ExtendedBlock.class, long.class, String.class,
|
|
|
String.class},
|
|
|
b, fileId, new RemoteParam(), holder);
|
|
|
- rpcClient.invokeSingle(b, method);
|
|
|
+
|
|
|
+ final List<RemoteLocation> locations = rpcServer.getLocationsForPath(src, false);
|
|
|
+ rpcClient.invokeSingle(b, method, locations, Void.class);
|
|
|
}
|
|
|
|
|
|
@Override
|
|
@@ -545,12 +544,11 @@ public class RouterClientProtocol implements ClientProtocol {
|
|
|
long.class},
|
|
|
new RemoteParam(), clientName, last, fileId);
|
|
|
|
|
|
+ final List<RemoteLocation> locations = rpcServer.getLocationsForPath(src, true);
|
|
|
if (last != null) {
|
|
|
- return rpcClient.invokeSingle(last, method, Boolean.class);
|
|
|
+ return rpcClient.invokeSingle(last, method, locations, Boolean.class);
|
|
|
}
|
|
|
|
|
|
- final List<RemoteLocation> locations =
|
|
|
- rpcServer.getLocationsForPath(src, true);
|
|
|
// Complete can return true/false, so don't expect a result
|
|
|
return rpcClient.invokeSequential(locations, method, Boolean.class, null);
|
|
|
}
|
|
@@ -580,7 +578,7 @@ public class RouterClientProtocol implements ClientProtocol {
|
|
|
new Class<?>[] {String.class, ExtendedBlock.class, ExtendedBlock.class,
|
|
|
DatanodeID[].class, String[].class},
|
|
|
clientName, oldBlock, newBlock, newNodes, newStorageIDs);
|
|
|
- rpcClient.invokeSingle(oldBlock, method);
|
|
|
+ rpcClient.invokeSingleBlockPool(oldBlock.getBlockPoolId(), method);
|
|
|
}
|
|
|
|
|
|
@Override
|