Java 类org.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos.TruncateRequestProto 实例源码

项目:hadoop    文件:ClientNamenodeProtocolServerSideTranslatorPB.java   
@Override
public TruncateResponseProto truncate(RpcController controller,
    TruncateRequestProto req) throws ServiceException {
  try {
    boolean result = server.truncate(req.getSrc(), req.getNewLength(),
        req.getClientName());
    return TruncateResponseProto.newBuilder().setResult(result).build();
  } catch (IOException e) {
    throw new ServiceException(e);
  }
}
项目:hadoop    文件:ClientNamenodeProtocolTranslatorPB.java   
@Override
public boolean truncate(String src, long newLength, String clientName)
    throws IOException, UnresolvedLinkException {
  TruncateRequestProto req = TruncateRequestProto.newBuilder()
      .setSrc(src)
      .setNewLength(newLength)
      .setClientName(clientName)
      .build();
  try {
    return rpcProxy.truncate(null, req).getResult();
  } catch (ServiceException e) {
    throw ProtobufHelper.getRemoteException(e);
  }
}
项目:aliyun-oss-hadoop-fs    文件:ClientNamenodeProtocolTranslatorPB.java   
@Override
public boolean truncate(String src, long newLength, String clientName)
    throws IOException {
  TruncateRequestProto req = TruncateRequestProto.newBuilder()
      .setSrc(src)
      .setNewLength(newLength)
      .setClientName(clientName)
      .build();
  try {
    return rpcProxy.truncate(null, req).getResult();
  } catch (ServiceException e) {
    throw ProtobufHelper.getRemoteException(e);
  }
}
项目:aliyun-oss-hadoop-fs    文件:ClientNamenodeProtocolServerSideTranslatorPB.java   
@Override
public TruncateResponseProto truncate(RpcController controller,
    TruncateRequestProto req) throws ServiceException {
  try {
    boolean result = server.truncate(req.getSrc(), req.getNewLength(),
        req.getClientName());
    return TruncateResponseProto.newBuilder().setResult(result).build();
  } catch (IOException e) {
    throw new ServiceException(e);
  }
}
项目:big-c    文件:ClientNamenodeProtocolServerSideTranslatorPB.java   
@Override
public TruncateResponseProto truncate(RpcController controller,
    TruncateRequestProto req) throws ServiceException {
  try {
    boolean result = server.truncate(req.getSrc(), req.getNewLength(),
        req.getClientName());
    return TruncateResponseProto.newBuilder().setResult(result).build();
  } catch (IOException e) {
    throw new ServiceException(e);
  }
}
项目:big-c    文件:ClientNamenodeProtocolTranslatorPB.java   
@Override
public boolean truncate(String src, long newLength, String clientName)
    throws IOException, UnresolvedLinkException {
  TruncateRequestProto req = TruncateRequestProto.newBuilder()
      .setSrc(src)
      .setNewLength(newLength)
      .setClientName(clientName)
      .build();
  try {
    return rpcProxy.truncate(null, req).getResult();
  } catch (ServiceException e) {
    throw ProtobufHelper.getRemoteException(e);
  }
}