|
@@ -614,6 +614,11 @@ public class RouterClientProtocol implements ClientProtocol {
|
|
new Class<?>[] {String.class, String.class},
|
|
new Class<?>[] {String.class, String.class},
|
|
new RemoteParam(), dstParam);
|
|
new RemoteParam(), dstParam);
|
|
if (isMultiDestDirectory(src)) {
|
|
if (isMultiDestDirectory(src)) {
|
|
|
|
+ if (locs.size() != srcLocations.size()) {
|
|
|
|
+ throw new IOException("Rename of " + src + " to " + dst + " is not"
|
|
|
|
+ + " allowed. The number of remote locations for both source and"
|
|
|
|
+ + " target should be same.");
|
|
|
|
+ }
|
|
return rpcClient.invokeAll(locs, method);
|
|
return rpcClient.invokeAll(locs, method);
|
|
} else {
|
|
} else {
|
|
return rpcClient.invokeSequential(locs, method, Boolean.class,
|
|
return rpcClient.invokeSequential(locs, method, Boolean.class,
|
|
@@ -641,6 +646,11 @@ public class RouterClientProtocol implements ClientProtocol {
|
|
new Class<?>[] {String.class, String.class, options.getClass()},
|
|
new Class<?>[] {String.class, String.class, options.getClass()},
|
|
new RemoteParam(), dstParam, options);
|
|
new RemoteParam(), dstParam, options);
|
|
if (isMultiDestDirectory(src)) {
|
|
if (isMultiDestDirectory(src)) {
|
|
|
|
+ if (locs.size() != srcLocations.size()) {
|
|
|
|
+ throw new IOException("Rename of " + src + " to " + dst + " is not"
|
|
|
|
+ + " allowed. The number of remote locations for both source and"
|
|
|
|
+ + " target should be same.");
|
|
|
|
+ }
|
|
rpcClient.invokeConcurrent(locs, method);
|
|
rpcClient.invokeConcurrent(locs, method);
|
|
} else {
|
|
} else {
|
|
rpcClient.invokeSequential(locs, method, null, null);
|
|
rpcClient.invokeSequential(locs, method, null, null);
|