@Override public SetReplicationResponseProto setReplication(RpcController controller, SetReplicationRequestProto req) throws ServiceException { try { boolean result = server.setReplication(req.getSrc(), (short) req.getReplication()); return SetReplicationResponseProto.newBuilder().setResult(result).build(); } catch (IOException e) { throw new ServiceException(e); } }
@Override public boolean setReplication(String src, short replication) throws AccessControlException, DSQuotaExceededException, FileNotFoundException, SafeModeException, UnresolvedLinkException, IOException { SetReplicationRequestProto req = SetReplicationRequestProto.newBuilder() .setSrc(src) .setReplication(replication) .build(); try { return rpcProxy.setReplication(null, req).getResult(); } catch (ServiceException e) { throw ProtobufHelper.getRemoteException(e); } }
@Override public boolean setReplication(String src, short replication) throws IOException { SetReplicationRequestProto req = SetReplicationRequestProto.newBuilder() .setSrc(src) .setReplication(replication) .build(); try { return rpcProxy.setReplication(null, req).getResult(); } catch (ServiceException e) { throw ProtobufHelper.getRemoteException(e); } }
@Override public boolean setReplication(String src, short replication) throws AccessControlException, DSQuotaExceededException, FileNotFoundException, SafeModeException, UnresolvedLinkException, IOException { SetReplicationRequestProto req = SetReplicationRequestProto.newBuilder().setSrc(src) .setReplication(replication).build(); try { return rpcProxy.setReplication(null, req).getResult(); } catch (ServiceException e) { throw ProtobufHelper.getRemoteException(e); } }