@Override public DeleteResponseProto delete(RpcController controller, DeleteRequestProto req) throws ServiceException { try { boolean result = server.delete(req.getSrc(), req.getRecursive()); return DeleteResponseProto.newBuilder().setResult(result).build(); } catch (IOException e) { throw new ServiceException(e); } }
@Override public boolean delete(String src, boolean recursive) throws AccessControlException, FileNotFoundException, SafeModeException, UnresolvedLinkException, IOException { DeleteRequestProto req = DeleteRequestProto.newBuilder().setSrc(src).setRecursive(recursive).build(); try { return rpcProxy.delete(null, req).getResult(); } catch (ServiceException e) { throw ProtobufHelper.getRemoteException(e); } }
@Override public boolean delete(String src, boolean recursive) throws IOException { DeleteRequestProto req = DeleteRequestProto.newBuilder().setSrc(src) .setRecursive(recursive).build(); try { return rpcProxy.delete(null, req).getResult(); } catch (ServiceException e) { throw ProtobufHelper.getRemoteException(e); } }
@Override public boolean delete(String src, boolean recursive) throws AccessControlException, FileNotFoundException, SafeModeException, UnresolvedLinkException, IOException { DeleteRequestProto req = DeleteRequestProto.newBuilder().setSrc(src).setRecursive(recursive) .build(); try { return rpcProxy.delete(null, req).getResult(); } catch (ServiceException e) { throw ProtobufHelper.getRemoteException(e); } }