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

项目:hadoop-plus    文件:DatanodeProtocolServerSideTranslatorPB.java   
@Override
public BlockReceivedAndDeletedResponseProto blockReceivedAndDeleted(
    RpcController controller, BlockReceivedAndDeletedRequestProto request)
    throws ServiceException {
  List<StorageReceivedDeletedBlocksProto> sBlocks = request.getBlocksList();
  StorageReceivedDeletedBlocks[] info = 
      new StorageReceivedDeletedBlocks[sBlocks.size()];
  for (int i = 0; i < sBlocks.size(); i++) {
    StorageReceivedDeletedBlocksProto sBlock = sBlocks.get(i);
    List<ReceivedDeletedBlockInfoProto> list = sBlock.getBlocksList();
    ReceivedDeletedBlockInfo[] rdBlocks = 
        new ReceivedDeletedBlockInfo[list.size()];
    for (int j = 0; j < list.size(); j++) {
      rdBlocks[j] = PBHelper.convert(list.get(j));
    }
    info[i] = new StorageReceivedDeletedBlocks(sBlock.getStorageID(), rdBlocks);
  }
  try {
    impl.blockReceivedAndDeleted(PBHelper.convert(request.getRegistration()),
        request.getBlockPoolId(), info);
  } catch (IOException e) {
    throw new ServiceException(e);
  }
  return VOID_BLOCK_RECEIVED_AND_DELETE_RESPONSE;
}
项目:hops    文件:DatanodeProtocolServerSideTranslatorPB.java   
@Override
public BlockReceivedAndDeletedResponseProto blockReceivedAndDeleted(
    RpcController controller, BlockReceivedAndDeletedRequestProto request)
    throws ServiceException {
  List<StorageReceivedDeletedBlocksProto> sBlocks = request.getBlocksList();
  StorageReceivedDeletedBlocks[] info =
      new StorageReceivedDeletedBlocks[sBlocks.size()];
  for (int i = 0; i < sBlocks.size(); i++) {
    StorageReceivedDeletedBlocksProto sBlock = sBlocks.get(i);
    List<ReceivedDeletedBlockInfoProto> list = sBlock.getBlocksList();
    ReceivedDeletedBlockInfo[] rdBlocks =
        new ReceivedDeletedBlockInfo[list.size()];
    for (int j = 0; j < list.size(); j++) {
      rdBlocks[j] = PBHelper.convert(list.get(j));
    }
    info[i] =
        new StorageReceivedDeletedBlocks(sBlock.getStorageID(), rdBlocks);
  }
  try {
    impl.blockReceivedAndDeleted(PBHelper.convert(request.getRegistration()),
        request.getBlockPoolId(), info);
  } catch (IOException e) {
    throw new ServiceException(e);
  }
  return VOID_BLOCK_RECEIVED_AND_DELETE_RESPONSE;
}
项目:hadoop-TCP    文件:DatanodeProtocolServerSideTranslatorPB.java   
@Override
public BlockReceivedAndDeletedResponseProto blockReceivedAndDeleted(
    RpcController controller, BlockReceivedAndDeletedRequestProto request)
    throws ServiceException {
  List<StorageReceivedDeletedBlocksProto> sBlocks = request.getBlocksList();
  StorageReceivedDeletedBlocks[] info = 
      new StorageReceivedDeletedBlocks[sBlocks.size()];
  for (int i = 0; i < sBlocks.size(); i++) {
    StorageReceivedDeletedBlocksProto sBlock = sBlocks.get(i);
    List<ReceivedDeletedBlockInfoProto> list = sBlock.getBlocksList();
    ReceivedDeletedBlockInfo[] rdBlocks = 
        new ReceivedDeletedBlockInfo[list.size()];
    for (int j = 0; j < list.size(); j++) {
      rdBlocks[j] = PBHelper.convert(list.get(j));
    }
    info[i] = new StorageReceivedDeletedBlocks(sBlock.getStorageID(), rdBlocks);
  }
  try {
    impl.blockReceivedAndDeleted(PBHelper.convert(request.getRegistration()),
        request.getBlockPoolId(), info);
  } catch (IOException e) {
    throw new ServiceException(e);
  }
  return VOID_BLOCK_RECEIVED_AND_DELETE_RESPONSE;
}
项目:hardfs    文件:DatanodeProtocolServerSideTranslatorPB.java   
@Override
public BlockReceivedAndDeletedResponseProto blockReceivedAndDeleted(
    RpcController controller, BlockReceivedAndDeletedRequestProto request)
    throws ServiceException {
  List<StorageReceivedDeletedBlocksProto> sBlocks = request.getBlocksList();
  StorageReceivedDeletedBlocks[] info = 
      new StorageReceivedDeletedBlocks[sBlocks.size()];
  for (int i = 0; i < sBlocks.size(); i++) {
    StorageReceivedDeletedBlocksProto sBlock = sBlocks.get(i);
    List<ReceivedDeletedBlockInfoProto> list = sBlock.getBlocksList();
    ReceivedDeletedBlockInfo[] rdBlocks = 
        new ReceivedDeletedBlockInfo[list.size()];
    for (int j = 0; j < list.size(); j++) {
      rdBlocks[j] = PBHelper.convert(list.get(j));
    }
    info[i] = new StorageReceivedDeletedBlocks(sBlock.getStorageID(), rdBlocks);
  }
  try {
    impl.blockReceivedAndDeleted(PBHelper.convert(request.getRegistration()),
        request.getBlockPoolId(), info);
  } catch (IOException e) {
    throw new ServiceException(e);
  }
  return VOID_BLOCK_RECEIVED_AND_DELETE_RESPONSE;
}
项目:hadoop    文件:DatanodeProtocolServerSideTranslatorPB.java   
@Override
public BlockReceivedAndDeletedResponseProto blockReceivedAndDeleted(
    RpcController controller, BlockReceivedAndDeletedRequestProto request)
    throws ServiceException {
  List<StorageReceivedDeletedBlocksProto> sBlocks = request.getBlocksList();
  StorageReceivedDeletedBlocks[] info = 
      new StorageReceivedDeletedBlocks[sBlocks.size()];
  for (int i = 0; i < sBlocks.size(); i++) {
    StorageReceivedDeletedBlocksProto sBlock = sBlocks.get(i);
    List<ReceivedDeletedBlockInfoProto> list = sBlock.getBlocksList();
    ReceivedDeletedBlockInfo[] rdBlocks = 
        new ReceivedDeletedBlockInfo[list.size()];
    for (int j = 0; j < list.size(); j++) {
      rdBlocks[j] = PBHelper.convert(list.get(j));
    }
    if (sBlock.hasStorage()) {
      info[i] = new StorageReceivedDeletedBlocks(
          PBHelper.convert(sBlock.getStorage()), rdBlocks);
    } else {
      info[i] = new StorageReceivedDeletedBlocks(sBlock.getStorageUuid(), rdBlocks);
    }
  }
  try {
    impl.blockReceivedAndDeleted(PBHelper.convert(request.getRegistration()),
        request.getBlockPoolId(), info);
  } catch (IOException e) {
    throw new ServiceException(e);
  }
  return VOID_BLOCK_RECEIVED_AND_DELETE_RESPONSE;
}
项目:aliyun-oss-hadoop-fs    文件:DatanodeProtocolServerSideTranslatorPB.java   
@Override
public BlockReceivedAndDeletedResponseProto blockReceivedAndDeleted(
    RpcController controller, BlockReceivedAndDeletedRequestProto request)
    throws ServiceException {
  List<StorageReceivedDeletedBlocksProto> sBlocks = request.getBlocksList();
  StorageReceivedDeletedBlocks[] info = 
      new StorageReceivedDeletedBlocks[sBlocks.size()];
  for (int i = 0; i < sBlocks.size(); i++) {
    StorageReceivedDeletedBlocksProto sBlock = sBlocks.get(i);
    List<ReceivedDeletedBlockInfoProto> list = sBlock.getBlocksList();
    ReceivedDeletedBlockInfo[] rdBlocks = 
        new ReceivedDeletedBlockInfo[list.size()];
    for (int j = 0; j < list.size(); j++) {
      rdBlocks[j] = PBHelper.convert(list.get(j));
    }
    if (sBlock.hasStorage()) {
      info[i] = new StorageReceivedDeletedBlocks(
          PBHelperClient.convert(sBlock.getStorage()), rdBlocks);
    } else {
      info[i] = new StorageReceivedDeletedBlocks(sBlock.getStorageUuid(), rdBlocks);
    }
  }
  try {
    impl.blockReceivedAndDeleted(PBHelper.convert(request.getRegistration()),
        request.getBlockPoolId(), info);
  } catch (IOException e) {
    throw new ServiceException(e);
  }
  return VOID_BLOCK_RECEIVED_AND_DELETE_RESPONSE;
}
项目:big-c    文件:DatanodeProtocolServerSideTranslatorPB.java   
@Override
public BlockReceivedAndDeletedResponseProto blockReceivedAndDeleted(
    RpcController controller, BlockReceivedAndDeletedRequestProto request)
    throws ServiceException {
  List<StorageReceivedDeletedBlocksProto> sBlocks = request.getBlocksList();
  StorageReceivedDeletedBlocks[] info = 
      new StorageReceivedDeletedBlocks[sBlocks.size()];
  for (int i = 0; i < sBlocks.size(); i++) {
    StorageReceivedDeletedBlocksProto sBlock = sBlocks.get(i);
    List<ReceivedDeletedBlockInfoProto> list = sBlock.getBlocksList();
    ReceivedDeletedBlockInfo[] rdBlocks = 
        new ReceivedDeletedBlockInfo[list.size()];
    for (int j = 0; j < list.size(); j++) {
      rdBlocks[j] = PBHelper.convert(list.get(j));
    }
    if (sBlock.hasStorage()) {
      info[i] = new StorageReceivedDeletedBlocks(
          PBHelper.convert(sBlock.getStorage()), rdBlocks);
    } else {
      info[i] = new StorageReceivedDeletedBlocks(sBlock.getStorageUuid(), rdBlocks);
    }
  }
  try {
    impl.blockReceivedAndDeleted(PBHelper.convert(request.getRegistration()),
        request.getBlockPoolId(), info);
  } catch (IOException e) {
    throw new ServiceException(e);
  }
  return VOID_BLOCK_RECEIVED_AND_DELETE_RESPONSE;
}
项目:hadoop-2.6.0-cdh5.4.3    文件:DatanodeProtocolServerSideTranslatorPB.java   
@Override
public BlockReceivedAndDeletedResponseProto blockReceivedAndDeleted(
    RpcController controller, BlockReceivedAndDeletedRequestProto request)
    throws ServiceException {
  List<StorageReceivedDeletedBlocksProto> sBlocks = request.getBlocksList();
  StorageReceivedDeletedBlocks[] info = 
      new StorageReceivedDeletedBlocks[sBlocks.size()];
  for (int i = 0; i < sBlocks.size(); i++) {
    StorageReceivedDeletedBlocksProto sBlock = sBlocks.get(i);
    List<ReceivedDeletedBlockInfoProto> list = sBlock.getBlocksList();
    ReceivedDeletedBlockInfo[] rdBlocks = 
        new ReceivedDeletedBlockInfo[list.size()];
    for (int j = 0; j < list.size(); j++) {
      rdBlocks[j] = PBHelper.convert(list.get(j));
    }
    if (sBlock.hasStorage()) {
      info[i] = new StorageReceivedDeletedBlocks(
          PBHelper.convert(sBlock.getStorage()), rdBlocks);
    } else {
      info[i] = new StorageReceivedDeletedBlocks(sBlock.getStorageUuid(), rdBlocks);
    }
  }
  try {
    impl.blockReceivedAndDeleted(PBHelper.convert(request.getRegistration()),
        request.getBlockPoolId(), info);
  } catch (IOException e) {
    throw new ServiceException(e);
  }
  return VOID_BLOCK_RECEIVED_AND_DELETE_RESPONSE;
}
项目:FlexMap    文件:DatanodeProtocolServerSideTranslatorPB.java   
@Override
public BlockReceivedAndDeletedResponseProto blockReceivedAndDeleted(
    RpcController controller, BlockReceivedAndDeletedRequestProto request)
    throws ServiceException {
  List<StorageReceivedDeletedBlocksProto> sBlocks = request.getBlocksList();
  StorageReceivedDeletedBlocks[] info = 
      new StorageReceivedDeletedBlocks[sBlocks.size()];
  for (int i = 0; i < sBlocks.size(); i++) {
    StorageReceivedDeletedBlocksProto sBlock = sBlocks.get(i);
    List<ReceivedDeletedBlockInfoProto> list = sBlock.getBlocksList();
    ReceivedDeletedBlockInfo[] rdBlocks = 
        new ReceivedDeletedBlockInfo[list.size()];
    for (int j = 0; j < list.size(); j++) {
      rdBlocks[j] = PBHelper.convert(list.get(j));
    }
    if (sBlock.hasStorage()) {
      info[i] = new StorageReceivedDeletedBlocks(
          PBHelper.convert(sBlock.getStorage()), rdBlocks);
    } else {
      info[i] = new StorageReceivedDeletedBlocks(sBlock.getStorageUuid(), rdBlocks);
    }
  }
  try {
    impl.blockReceivedAndDeleted(PBHelper.convert(request.getRegistration()),
        request.getBlockPoolId(), info);
  } catch (IOException e) {
    throw new ServiceException(e);
  }
  return VOID_BLOCK_RECEIVED_AND_DELETE_RESPONSE;
}
项目:hadoop-on-lustre2    文件:DatanodeProtocolServerSideTranslatorPB.java   
@Override
public BlockReceivedAndDeletedResponseProto blockReceivedAndDeleted(
    RpcController controller, BlockReceivedAndDeletedRequestProto request)
    throws ServiceException {
  List<StorageReceivedDeletedBlocksProto> sBlocks = request.getBlocksList();
  StorageReceivedDeletedBlocks[] info = 
      new StorageReceivedDeletedBlocks[sBlocks.size()];
  for (int i = 0; i < sBlocks.size(); i++) {
    StorageReceivedDeletedBlocksProto sBlock = sBlocks.get(i);
    List<ReceivedDeletedBlockInfoProto> list = sBlock.getBlocksList();
    ReceivedDeletedBlockInfo[] rdBlocks = 
        new ReceivedDeletedBlockInfo[list.size()];
    for (int j = 0; j < list.size(); j++) {
      rdBlocks[j] = PBHelper.convert(list.get(j));
    }
    if (sBlock.hasStorage()) {
      info[i] = new StorageReceivedDeletedBlocks(
          PBHelper.convert(sBlock.getStorage()), rdBlocks);
    } else {
      info[i] = new StorageReceivedDeletedBlocks(sBlock.getStorageUuid(), rdBlocks);
    }
  }
  try {
    impl.blockReceivedAndDeleted(PBHelper.convert(request.getRegistration()),
        request.getBlockPoolId(), info);
  } catch (IOException e) {
    throw new ServiceException(e);
  }
  return VOID_BLOCK_RECEIVED_AND_DELETE_RESPONSE;
}