HDFS-16073. Remove redundant RPC requests for getFileLinkInfo in ClientNamenodeProtocolTranslatorPB. Contributed by lei w.

This commit is contained in:
Ayush Saxena 2021-06-16 15:53:12 +05:30
parent 9a6a11c452
commit 2b304ad645

View File

@ -996,9 +996,7 @@ public HdfsFileStatus getFileLinkInfo(String src) throws IOException {
.setSrc(src).build(); .setSrc(src).build();
try { try {
GetFileLinkInfoResponseProto result = rpcProxy.getFileLinkInfo(null, req); GetFileLinkInfoResponseProto result = rpcProxy.getFileLinkInfo(null, req);
return result.hasFs() ? return result.hasFs() ? PBHelperClient.convert(result.getFs()) : null;
PBHelperClient.convert(rpcProxy.getFileLinkInfo(null, req).getFs()) :
null;
} catch (ServiceException e) { } catch (ServiceException e) {
throw ProtobufHelper.getRemoteException(e); throw ProtobufHelper.getRemoteException(e);
} }