HDFS-15603. RBF: Fix getLocationsForPath twice in create operation. Contributed by wangzhaohui.

This commit is contained in:
Ayush Saxena 2020-09-29 00:03:11 +05:30
parent fc8a6dd8a9
commit d686a655bc

View File

@ -288,7 +288,7 @@ public HdfsFileStatus create(String src, FsPermission masked,
rpcServer.getLocationsForPath(src, true); rpcServer.getLocationsForPath(src, true);
RemoteLocation createLocation = null; RemoteLocation createLocation = null;
try { try {
createLocation = rpcServer.getCreateLocation(src); createLocation = rpcServer.getCreateLocation(src, locations);
return rpcClient.invokeSingle(createLocation, method, return rpcClient.invokeSingle(createLocation, method,
HdfsFileStatus.class); HdfsFileStatus.class);
} catch (IOException ioe) { } catch (IOException ioe) {