@Override public SetPermissionResponseProto setPermission(RpcController controller, SetPermissionRequestProto req) throws ServiceException { try { server.setPermission(req.getSrc(), PBHelper.convert(req.getPermission())); } catch (IOException e) { throw new ServiceException(e); } return VOID_SET_PERM_RESPONSE; }
@Override public void setPermission(String src, FsPermission permission) throws AccessControlException, FileNotFoundException, SafeModeException, UnresolvedLinkException, IOException { SetPermissionRequestProto req = SetPermissionRequestProto.newBuilder() .setSrc(src) .setPermission(PBHelper.convert(permission)) .build(); try { rpcProxy.setPermission(null, req); } catch (ServiceException e) { throw ProtobufHelper.getRemoteException(e); } }
@Override public void setPermission(String src, FsPermission permission) throws IOException { SetPermissionRequestProto req = SetPermissionRequestProto.newBuilder() .setSrc(src) .setPermission(PBHelperClient.convert(permission)) .build(); try { rpcProxy.setPermission(null, req); } catch (ServiceException e) { throw ProtobufHelper.getRemoteException(e); } }
@Override public SetPermissionResponseProto setPermission(RpcController controller, SetPermissionRequestProto req) throws ServiceException { try { server.setPermission(req.getSrc(), PBHelperClient.convert(req.getPermission())); } catch (IOException e) { throw new ServiceException(e); } return VOID_SET_PERM_RESPONSE; }
@Override public void setPermission(String src, FsPermission permission) throws AccessControlException, FileNotFoundException, SafeModeException, UnresolvedLinkException, IOException { SetPermissionRequestProto req = SetPermissionRequestProto.newBuilder().setSrc(src) .setPermission(PBHelper.convert(permission)).build(); try { rpcProxy.setPermission(null, req); } catch (ServiceException e) { throw ProtobufHelper.getRemoteException(e); } }