Java 类org.apache.hadoop.hdfs.protocol.proto.DatanodeProtocolProtos.CacheReportResponseProto 实例源码

项目:hadoop    文件:DatanodeProtocolClientSideTranslatorPB.java   
@Override
public DatanodeCommand cacheReport(DatanodeRegistration registration,
    String poolId, List<Long> blockIds) throws IOException {
  CacheReportRequestProto.Builder builder =
      CacheReportRequestProto.newBuilder()
      .setRegistration(PBHelper.convert(registration))
      .setBlockPoolId(poolId);
  for (Long blockId : blockIds) {
    builder.addBlocks(blockId);
  }

  CacheReportResponseProto resp;
  try {
    resp = rpcProxy.cacheReport(NULL_CONTROLLER, builder.build());
  } catch (ServiceException se) {
    throw ProtobufHelper.getRemoteException(se);
  }
  if (resp.hasCmd()) {
    return PBHelper.convert(resp.getCmd());
  }
  return null;
}
项目:hadoop    文件:DatanodeProtocolServerSideTranslatorPB.java   
@Override
public CacheReportResponseProto cacheReport(RpcController controller,
    CacheReportRequestProto request) throws ServiceException {
  DatanodeCommand cmd = null;
  try {
    cmd = impl.cacheReport(
        PBHelper.convert(request.getRegistration()),
        request.getBlockPoolId(),
        request.getBlocksList());
  } catch (IOException e) {
    throw new ServiceException(e);
  }
  CacheReportResponseProto.Builder builder =
      CacheReportResponseProto.newBuilder();
  if (cmd != null) {
    builder.setCmd(PBHelper.convert(cmd));
  }
  return builder.build();
}
项目:aliyun-oss-hadoop-fs    文件:DatanodeProtocolClientSideTranslatorPB.java   
@Override
public DatanodeCommand cacheReport(DatanodeRegistration registration,
    String poolId, List<Long> blockIds) throws IOException {
  CacheReportRequestProto.Builder builder =
      CacheReportRequestProto.newBuilder()
      .setRegistration(PBHelper.convert(registration))
      .setBlockPoolId(poolId);
  for (Long blockId : blockIds) {
    builder.addBlocks(blockId);
  }

  CacheReportResponseProto resp;
  try {
    resp = rpcProxy.cacheReport(NULL_CONTROLLER, builder.build());
  } catch (ServiceException se) {
    throw ProtobufHelper.getRemoteException(se);
  }
  if (resp.hasCmd()) {
    return PBHelper.convert(resp.getCmd());
  }
  return null;
}
项目:aliyun-oss-hadoop-fs    文件:DatanodeProtocolServerSideTranslatorPB.java   
@Override
public CacheReportResponseProto cacheReport(RpcController controller,
    CacheReportRequestProto request) throws ServiceException {
  DatanodeCommand cmd = null;
  try {
    cmd = impl.cacheReport(
        PBHelper.convert(request.getRegistration()),
        request.getBlockPoolId(),
        request.getBlocksList());
  } catch (IOException e) {
    throw new ServiceException(e);
  }
  CacheReportResponseProto.Builder builder =
      CacheReportResponseProto.newBuilder();
  if (cmd != null) {
    builder.setCmd(PBHelper.convert(cmd));
  }
  return builder.build();
}
项目:big-c    文件:DatanodeProtocolClientSideTranslatorPB.java   
@Override
public DatanodeCommand cacheReport(DatanodeRegistration registration,
    String poolId, List<Long> blockIds) throws IOException {
  CacheReportRequestProto.Builder builder =
      CacheReportRequestProto.newBuilder()
      .setRegistration(PBHelper.convert(registration))
      .setBlockPoolId(poolId);
  for (Long blockId : blockIds) {
    builder.addBlocks(blockId);
  }

  CacheReportResponseProto resp;
  try {
    resp = rpcProxy.cacheReport(NULL_CONTROLLER, builder.build());
  } catch (ServiceException se) {
    throw ProtobufHelper.getRemoteException(se);
  }
  if (resp.hasCmd()) {
    return PBHelper.convert(resp.getCmd());
  }
  return null;
}
项目:big-c    文件:DatanodeProtocolServerSideTranslatorPB.java   
@Override
public CacheReportResponseProto cacheReport(RpcController controller,
    CacheReportRequestProto request) throws ServiceException {
  DatanodeCommand cmd = null;
  try {
    cmd = impl.cacheReport(
        PBHelper.convert(request.getRegistration()),
        request.getBlockPoolId(),
        request.getBlocksList());
  } catch (IOException e) {
    throw new ServiceException(e);
  }
  CacheReportResponseProto.Builder builder =
      CacheReportResponseProto.newBuilder();
  if (cmd != null) {
    builder.setCmd(PBHelper.convert(cmd));
  }
  return builder.build();
}
项目:hadoop-2.6.0-cdh5.4.3    文件:DatanodeProtocolClientSideTranslatorPB.java   
@Override
public DatanodeCommand cacheReport(DatanodeRegistration registration,
    String poolId, List<Long> blockIds) throws IOException {
  CacheReportRequestProto.Builder builder =
      CacheReportRequestProto.newBuilder()
      .setRegistration(PBHelper.convert(registration))
      .setBlockPoolId(poolId);
  for (Long blockId : blockIds) {
    builder.addBlocks(blockId);
  }

  CacheReportResponseProto resp;
  try {
    resp = rpcProxy.cacheReport(NULL_CONTROLLER, builder.build());
  } catch (ServiceException se) {
    throw ProtobufHelper.getRemoteException(se);
  }
  if (resp.hasCmd()) {
    return PBHelper.convert(resp.getCmd());
  }
  return null;
}
项目:hadoop-2.6.0-cdh5.4.3    文件:DatanodeProtocolServerSideTranslatorPB.java   
@Override
public CacheReportResponseProto cacheReport(RpcController controller,
    CacheReportRequestProto request) throws ServiceException {
  DatanodeCommand cmd = null;
  try {
    cmd = impl.cacheReport(
        PBHelper.convert(request.getRegistration()),
        request.getBlockPoolId(),
        request.getBlocksList());
  } catch (IOException e) {
    throw new ServiceException(e);
  }
  CacheReportResponseProto.Builder builder =
      CacheReportResponseProto.newBuilder();
  if (cmd != null) {
    builder.setCmd(PBHelper.convert(cmd));
  }
  return builder.build();
}
项目:FlexMap    文件:DatanodeProtocolClientSideTranslatorPB.java   
@Override
public DatanodeCommand cacheReport(DatanodeRegistration registration,
    String poolId, List<Long> blockIds) throws IOException {
  CacheReportRequestProto.Builder builder =
      CacheReportRequestProto.newBuilder()
      .setRegistration(PBHelper.convert(registration))
      .setBlockPoolId(poolId);
  for (Long blockId : blockIds) {
    builder.addBlocks(blockId);
  }

  CacheReportResponseProto resp;
  try {
    resp = rpcProxy.cacheReport(NULL_CONTROLLER, builder.build());
  } catch (ServiceException se) {
    throw ProtobufHelper.getRemoteException(se);
  }
  if (resp.hasCmd()) {
    return PBHelper.convert(resp.getCmd());
  }
  return null;
}
项目:FlexMap    文件:DatanodeProtocolServerSideTranslatorPB.java   
@Override
public CacheReportResponseProto cacheReport(RpcController controller,
    CacheReportRequestProto request) throws ServiceException {
  DatanodeCommand cmd = null;
  try {
    cmd = impl.cacheReport(
        PBHelper.convert(request.getRegistration()),
        request.getBlockPoolId(),
        request.getBlocksList());
  } catch (IOException e) {
    throw new ServiceException(e);
  }
  CacheReportResponseProto.Builder builder =
      CacheReportResponseProto.newBuilder();
  if (cmd != null) {
    builder.setCmd(PBHelper.convert(cmd));
  }
  return builder.build();
}
项目:hadoop-on-lustre2    文件:DatanodeProtocolClientSideTranslatorPB.java   
@Override
public DatanodeCommand cacheReport(DatanodeRegistration registration,
    String poolId, List<Long> blockIds) throws IOException {
  CacheReportRequestProto.Builder builder =
      CacheReportRequestProto.newBuilder()
      .setRegistration(PBHelper.convert(registration))
      .setBlockPoolId(poolId);
  for (Long blockId : blockIds) {
    builder.addBlocks(blockId);
  }

  CacheReportResponseProto resp;
  try {
    resp = rpcProxy.cacheReport(NULL_CONTROLLER, builder.build());
  } catch (ServiceException se) {
    throw ProtobufHelper.getRemoteException(se);
  }
  if (resp.hasCmd()) {
    return PBHelper.convert(resp.getCmd());
  }
  return null;
}
项目:hadoop-on-lustre2    文件:DatanodeProtocolServerSideTranslatorPB.java   
@Override
public CacheReportResponseProto cacheReport(RpcController controller,
    CacheReportRequestProto request) throws ServiceException {
  DatanodeCommand cmd = null;
  try {
    cmd = impl.cacheReport(
        PBHelper.convert(request.getRegistration()),
        request.getBlockPoolId(),
        request.getBlocksList());
  } catch (IOException e) {
    throw new ServiceException(e);
  }
  CacheReportResponseProto.Builder builder =
      CacheReportResponseProto.newBuilder();
  if (cmd != null) {
    builder.setCmd(PBHelper.convert(cmd));
  }
  return builder.build();
}