@Override public GetFileInfoResponseProto getFileInfo(RpcController controller, GetFileInfoRequestProto req) throws ServiceException { try { HdfsFileStatus result = server.getFileInfo(req.getSrc()); if (result != null) { return GetFileInfoResponseProto.newBuilder().setFs( PBHelper.convert(result)).build(); } return VOID_GETFILEINFO_RESPONSE; } catch (IOException e) { throw new ServiceException(e); } }
@Override public HdfsFileStatus getFileInfo(String src) throws AccessControlException, FileNotFoundException, UnresolvedLinkException, IOException { GetFileInfoRequestProto req = GetFileInfoRequestProto.newBuilder() .setSrc(src).build(); try { GetFileInfoResponseProto res = rpcProxy.getFileInfo(null, req); return res.hasFs() ? PBHelper.convert(res.getFs()) : null; } catch (ServiceException e) { throw ProtobufHelper.getRemoteException(e); } }
@Override public HdfsFileStatus getFileInfo(String src) throws IOException { GetFileInfoRequestProto req = GetFileInfoRequestProto.newBuilder() .setSrc(src).build(); try { GetFileInfoResponseProto res = rpcProxy.getFileInfo(null, req); return res.hasFs() ? PBHelperClient.convert(res.getFs()) : null; } catch (ServiceException e) { throw ProtobufHelper.getRemoteException(e); } }
@Override public GetFileInfoResponseProto getFileInfo(RpcController controller, GetFileInfoRequestProto req) throws ServiceException { try { HdfsFileStatus result = server.getFileInfo(req.getSrc()); if (result != null) { return GetFileInfoResponseProto.newBuilder().setFs( PBHelperClient.convert(result)).build(); } return VOID_GETFILEINFO_RESPONSE; } catch (IOException e) { throw new ServiceException(e); } }
@Override public GetFileInfoResponseProto getFileInfo(RpcController controller, GetFileInfoRequestProto req) throws ServiceException { try { HdfsFileStatus result = server.getFileInfo(req.getSrc()); if (result != null) { return GetFileInfoResponseProto.newBuilder() .setFs(PBHelper.convert(result)).build(); } return VOID_GETFILEINFO_RESPONSE; } catch (IOException e) { throw new ServiceException(e); } }
@Override public HdfsFileStatus getFileInfo(String src) throws AccessControlException, FileNotFoundException, UnresolvedLinkException, IOException { GetFileInfoRequestProto req = GetFileInfoRequestProto.newBuilder().setSrc(src).build(); try { GetFileInfoResponseProto res = rpcProxy.getFileInfo(null, req); return res.hasFs() ? PBHelper.convert(res.getFs()) : null; } catch (ServiceException e) { throw ProtobufHelper.getRemoteException(e); } }