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

项目:hadoop    文件:DatanodeProtocolServerSideTranslatorPB.java   
@Override
public CommitBlockSynchronizationResponseProto commitBlockSynchronization(
    RpcController controller, CommitBlockSynchronizationRequestProto request)
    throws ServiceException {
  List<DatanodeIDProto> dnprotos = request.getNewTaragetsList();
  DatanodeID[] dns = new DatanodeID[dnprotos.size()];
  for (int i = 0; i < dnprotos.size(); i++) {
    dns[i] = PBHelper.convert(dnprotos.get(i));
  }
  final List<String> sidprotos = request.getNewTargetStoragesList();
  final String[] storageIDs = sidprotos.toArray(new String[sidprotos.size()]);
  try {
    impl.commitBlockSynchronization(PBHelper.convert(request.getBlock()),
        request.getNewGenStamp(), request.getNewLength(),
        request.getCloseFile(), request.getDeleteBlock(), dns, storageIDs);
  } catch (IOException e) {
    throw new ServiceException(e);
  }
  return VOID_COMMIT_BLOCK_SYNCHRONIZATION_RESPONSE_PROTO;
}
项目:aliyun-oss-hadoop-fs    文件:DatanodeProtocolServerSideTranslatorPB.java   
@Override
public CommitBlockSynchronizationResponseProto commitBlockSynchronization(
    RpcController controller, CommitBlockSynchronizationRequestProto request)
    throws ServiceException {
  List<DatanodeIDProto> dnprotos = request.getNewTaragetsList();
  DatanodeID[] dns = new DatanodeID[dnprotos.size()];
  for (int i = 0; i < dnprotos.size(); i++) {
    dns[i] = PBHelperClient.convert(dnprotos.get(i));
  }
  final List<String> sidprotos = request.getNewTargetStoragesList();
  final String[] storageIDs = sidprotos.toArray(new String[sidprotos.size()]);
  try {
    impl.commitBlockSynchronization(PBHelperClient.convert(request.getBlock()),
        request.getNewGenStamp(), request.getNewLength(),
        request.getCloseFile(), request.getDeleteBlock(), dns, storageIDs);
  } catch (IOException e) {
    throw new ServiceException(e);
  }
  return VOID_COMMIT_BLOCK_SYNCHRONIZATION_RESPONSE_PROTO;
}
项目:big-c    文件:DatanodeProtocolServerSideTranslatorPB.java   
@Override
public CommitBlockSynchronizationResponseProto commitBlockSynchronization(
    RpcController controller, CommitBlockSynchronizationRequestProto request)
    throws ServiceException {
  List<DatanodeIDProto> dnprotos = request.getNewTaragetsList();
  DatanodeID[] dns = new DatanodeID[dnprotos.size()];
  for (int i = 0; i < dnprotos.size(); i++) {
    dns[i] = PBHelper.convert(dnprotos.get(i));
  }
  final List<String> sidprotos = request.getNewTargetStoragesList();
  final String[] storageIDs = sidprotos.toArray(new String[sidprotos.size()]);
  try {
    impl.commitBlockSynchronization(PBHelper.convert(request.getBlock()),
        request.getNewGenStamp(), request.getNewLength(),
        request.getCloseFile(), request.getDeleteBlock(), dns, storageIDs);
  } catch (IOException e) {
    throw new ServiceException(e);
  }
  return VOID_COMMIT_BLOCK_SYNCHRONIZATION_RESPONSE_PROTO;
}
项目:hadoop-2.6.0-cdh5.4.3    文件:DatanodeProtocolServerSideTranslatorPB.java   
@Override
public CommitBlockSynchronizationResponseProto commitBlockSynchronization(
    RpcController controller, CommitBlockSynchronizationRequestProto request)
    throws ServiceException {
  List<DatanodeIDProto> dnprotos = request.getNewTaragetsList();
  DatanodeID[] dns = new DatanodeID[dnprotos.size()];
  for (int i = 0; i < dnprotos.size(); i++) {
    dns[i] = PBHelper.convert(dnprotos.get(i));
  }
  final List<String> sidprotos = request.getNewTargetStoragesList();
  final String[] storageIDs = sidprotos.toArray(new String[sidprotos.size()]);
  try {
    impl.commitBlockSynchronization(PBHelper.convert(request.getBlock()),
        request.getNewGenStamp(), request.getNewLength(),
        request.getCloseFile(), request.getDeleteBlock(), dns, storageIDs);
  } catch (IOException e) {
    throw new ServiceException(e);
  }
  return VOID_COMMIT_BLOCK_SYNCHRONIZATION_RESPONSE_PROTO;
}
项目:hadoop-plus    文件:DatanodeProtocolServerSideTranslatorPB.java   
@Override
public CommitBlockSynchronizationResponseProto commitBlockSynchronization(
    RpcController controller, CommitBlockSynchronizationRequestProto request)
    throws ServiceException {
  List<DatanodeIDProto> dnprotos = request.getNewTaragetsList();
  DatanodeID[] dns = new DatanodeID[dnprotos.size()];
  for (int i = 0; i < dnprotos.size(); i++) {
    dns[i] = PBHelper.convert(dnprotos.get(i));
  }
  final List<String> sidprotos = request.getNewTargetStoragesList();
  final String[] storageIDs = sidprotos.toArray(new String[sidprotos.size()]);
  try {
    impl.commitBlockSynchronization(PBHelper.convert(request.getBlock()),
        request.getNewGenStamp(), request.getNewLength(),
        request.getCloseFile(), request.getDeleteBlock(), dns, storageIDs);
  } catch (IOException e) {
    throw new ServiceException(e);
  }
  return VOID_COMMIT_BLOCK_SYNCHRONIZATION_RESPONSE_PROTO;
}
项目:FlexMap    文件:DatanodeProtocolServerSideTranslatorPB.java   
@Override
public CommitBlockSynchronizationResponseProto commitBlockSynchronization(
    RpcController controller, CommitBlockSynchronizationRequestProto request)
    throws ServiceException {
  List<DatanodeIDProto> dnprotos = request.getNewTaragetsList();
  DatanodeID[] dns = new DatanodeID[dnprotos.size()];
  for (int i = 0; i < dnprotos.size(); i++) {
    dns[i] = PBHelper.convert(dnprotos.get(i));
  }
  final List<String> sidprotos = request.getNewTargetStoragesList();
  final String[] storageIDs = sidprotos.toArray(new String[sidprotos.size()]);
  try {
    impl.commitBlockSynchronization(PBHelper.convert(request.getBlock()),
        request.getNewGenStamp(), request.getNewLength(),
        request.getCloseFile(), request.getDeleteBlock(), dns, storageIDs);
  } catch (IOException e) {
    throw new ServiceException(e);
  }
  return VOID_COMMIT_BLOCK_SYNCHRONIZATION_RESPONSE_PROTO;
}
项目:hops    文件:DatanodeProtocolServerSideTranslatorPB.java   
@Override
public CommitBlockSynchronizationResponseProto commitBlockSynchronization(
    RpcController controller, CommitBlockSynchronizationRequestProto request)
    throws ServiceException {
  List<DatanodeIDProto> dnprotos = request.getNewTaragetsList();
  DatanodeID[] dns = new DatanodeID[dnprotos.size()];
  for (int i = 0; i < dnprotos.size(); i++) {
    dns[i] = PBHelper.convert(dnprotos.get(i));
  }
  final List<String> sidprotos = request.getNewTargetStoragesList();
  final String[] storageIDs = sidprotos.toArray(new String[sidprotos.size()]);
  try {
    impl.commitBlockSynchronization(PBHelper.convert(request.getBlock()),
        request.getNewGenStamp(), request.getNewLength(),
        request.getCloseFile(), request.getDeleteBlock(), dns, storageIDs);
  } catch (IOException e) {
    throw new ServiceException(e);
  }
  return VOID_COMMIT_BLOCK_SYNCHRONIZATION_RESPONSE_PROTO;
}
项目:hadoop-TCP    文件:DatanodeProtocolServerSideTranslatorPB.java   
@Override
public CommitBlockSynchronizationResponseProto commitBlockSynchronization(
    RpcController controller, CommitBlockSynchronizationRequestProto request)
    throws ServiceException {
  List<DatanodeIDProto> dnprotos = request.getNewTaragetsList();
  DatanodeID[] dns = new DatanodeID[dnprotos.size()];
  for (int i = 0; i < dnprotos.size(); i++) {
    dns[i] = PBHelper.convert(dnprotos.get(i));
  }
  final List<String> sidprotos = request.getNewTargetStoragesList();
  final String[] storageIDs = sidprotos.toArray(new String[sidprotos.size()]);
  try {
    impl.commitBlockSynchronization(PBHelper.convert(request.getBlock()),
        request.getNewGenStamp(), request.getNewLength(),
        request.getCloseFile(), request.getDeleteBlock(), dns, storageIDs);
  } catch (IOException e) {
    throw new ServiceException(e);
  }
  return VOID_COMMIT_BLOCK_SYNCHRONIZATION_RESPONSE_PROTO;
}
项目:hardfs    文件:DatanodeProtocolServerSideTranslatorPB.java   
@Override
public CommitBlockSynchronizationResponseProto commitBlockSynchronization(
    RpcController controller, CommitBlockSynchronizationRequestProto request)
    throws ServiceException {
  List<DatanodeIDProto> dnprotos = request.getNewTaragetsList();
  DatanodeID[] dns = new DatanodeID[dnprotos.size()];
  for (int i = 0; i < dnprotos.size(); i++) {
    dns[i] = PBHelper.convert(dnprotos.get(i));
  }
  final List<String> sidprotos = request.getNewTargetStoragesList();
  final String[] storageIDs = sidprotos.toArray(new String[sidprotos.size()]);
  try {
    impl.commitBlockSynchronization(PBHelper.convert(request.getBlock()),
        request.getNewGenStamp(), request.getNewLength(),
        request.getCloseFile(), request.getDeleteBlock(), dns, storageIDs);
  } catch (IOException e) {
    throw new ServiceException(e);
  }
  return VOID_COMMIT_BLOCK_SYNCHRONIZATION_RESPONSE_PROTO;
}
项目:hadoop-on-lustre2    文件:DatanodeProtocolServerSideTranslatorPB.java   
@Override
public CommitBlockSynchronizationResponseProto commitBlockSynchronization(
    RpcController controller, CommitBlockSynchronizationRequestProto request)
    throws ServiceException {
  List<DatanodeIDProto> dnprotos = request.getNewTaragetsList();
  DatanodeID[] dns = new DatanodeID[dnprotos.size()];
  for (int i = 0; i < dnprotos.size(); i++) {
    dns[i] = PBHelper.convert(dnprotos.get(i));
  }
  final List<String> sidprotos = request.getNewTargetStoragesList();
  final String[] storageIDs = sidprotos.toArray(new String[sidprotos.size()]);
  try {
    impl.commitBlockSynchronization(PBHelper.convert(request.getBlock()),
        request.getNewGenStamp(), request.getNewLength(),
        request.getCloseFile(), request.getDeleteBlock(), dns, storageIDs);
  } catch (IOException e) {
    throw new ServiceException(e);
  }
  return VOID_COMMIT_BLOCK_SYNCHRONIZATION_RESPONSE_PROTO;
}