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

项目:hadoop    文件:DatanodeProtocolClientSideTranslatorPB.java   
@Override
public void commitBlockSynchronization(ExtendedBlock block,
    long newgenerationstamp, long newlength, boolean closeFile,
    boolean deleteblock, DatanodeID[] newtargets, String[] newtargetstorages
    ) throws IOException {
  CommitBlockSynchronizationRequestProto.Builder builder = 
      CommitBlockSynchronizationRequestProto.newBuilder()
      .setBlock(PBHelper.convert(block)).setNewGenStamp(newgenerationstamp)
      .setNewLength(newlength).setCloseFile(closeFile)
      .setDeleteBlock(deleteblock);
  for (int i = 0; i < newtargets.length; i++) {
    builder.addNewTaragets(PBHelper.convert(newtargets[i]));
    builder.addNewTargetStorages(newtargetstorages[i]);
  }
  CommitBlockSynchronizationRequestProto req = builder.build();
  try {
    rpcProxy.commitBlockSynchronization(NULL_CONTROLLER, req);
  } catch (ServiceException se) {
    throw ProtobufHelper.getRemoteException(se);
  }
}
项目: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    文件:DatanodeProtocolClientSideTranslatorPB.java   
@Override
public void commitBlockSynchronization(ExtendedBlock block,
    long newgenerationstamp, long newlength, boolean closeFile,
    boolean deleteblock, DatanodeID[] newtargets, String[] newtargetstorages
    ) throws IOException {
  CommitBlockSynchronizationRequestProto.Builder builder = 
      CommitBlockSynchronizationRequestProto.newBuilder()
      .setBlock(PBHelperClient.convert(block)).setNewGenStamp(newgenerationstamp)
      .setNewLength(newlength).setCloseFile(closeFile)
      .setDeleteBlock(deleteblock);
  for (int i = 0; i < newtargets.length; i++) {
    builder.addNewTaragets(PBHelperClient.convert(newtargets[i]));
    builder.addNewTargetStorages(newtargetstorages[i]);
  }
  CommitBlockSynchronizationRequestProto req = builder.build();
  try {
    rpcProxy.commitBlockSynchronization(NULL_CONTROLLER, req);
  } catch (ServiceException se) {
    throw ProtobufHelper.getRemoteException(se);
  }
}
项目: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    文件:DatanodeProtocolClientSideTranslatorPB.java   
@Override
public void commitBlockSynchronization(ExtendedBlock block,
    long newgenerationstamp, long newlength, boolean closeFile,
    boolean deleteblock, DatanodeID[] newtargets, String[] newtargetstorages
    ) throws IOException {
  CommitBlockSynchronizationRequestProto.Builder builder = 
      CommitBlockSynchronizationRequestProto.newBuilder()
      .setBlock(PBHelper.convert(block)).setNewGenStamp(newgenerationstamp)
      .setNewLength(newlength).setCloseFile(closeFile)
      .setDeleteBlock(deleteblock);
  for (int i = 0; i < newtargets.length; i++) {
    builder.addNewTaragets(PBHelper.convert(newtargets[i]));
    builder.addNewTargetStorages(newtargetstorages[i]);
  }
  CommitBlockSynchronizationRequestProto req = builder.build();
  try {
    rpcProxy.commitBlockSynchronization(NULL_CONTROLLER, req);
  } catch (ServiceException se) {
    throw ProtobufHelper.getRemoteException(se);
  }
}
项目: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    文件:DatanodeProtocolClientSideTranslatorPB.java   
@Override
public void commitBlockSynchronization(ExtendedBlock block,
    long newgenerationstamp, long newlength, boolean closeFile,
    boolean deleteblock, DatanodeID[] newtargets, String[] newtargetstorages
    ) throws IOException {
  CommitBlockSynchronizationRequestProto.Builder builder = 
      CommitBlockSynchronizationRequestProto.newBuilder()
      .setBlock(PBHelper.convert(block)).setNewGenStamp(newgenerationstamp)
      .setNewLength(newlength).setCloseFile(closeFile)
      .setDeleteBlock(deleteblock);
  for (int i = 0; i < newtargets.length; i++) {
    builder.addNewTaragets(PBHelper.convert(newtargets[i]));
    builder.addNewTargetStorages(newtargetstorages[i]);
  }
  CommitBlockSynchronizationRequestProto req = builder.build();
  try {
    rpcProxy.commitBlockSynchronization(NULL_CONTROLLER, req);
  } catch (ServiceException se) {
    throw ProtobufHelper.getRemoteException(se);
  }
}
项目: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    文件:DatanodeProtocolClientSideTranslatorPB.java   
@Override
public void commitBlockSynchronization(ExtendedBlock block,
    long newgenerationstamp, long newlength, boolean closeFile,
    boolean deleteblock, DatanodeID[] newtargets, String[] newtargetstorages
    ) throws IOException {
  CommitBlockSynchronizationRequestProto.Builder builder = 
      CommitBlockSynchronizationRequestProto.newBuilder()
      .setBlock(PBHelper.convert(block)).setNewGenStamp(newgenerationstamp)
      .setNewLength(newlength).setCloseFile(closeFile)
      .setDeleteBlock(deleteblock);
  for (int i = 0; i < newtargets.length; i++) {
    builder.addNewTaragets(PBHelper.convert(newtargets[i]));
    builder.addNewTargetStorages(newtargetstorages[i]);
  }
  CommitBlockSynchronizationRequestProto req = builder.build();
  try {
    rpcProxy.commitBlockSynchronization(NULL_CONTROLLER, req);
  } catch (ServiceException se) {
    throw ProtobufHelper.getRemoteException(se);
  }
}
项目: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    文件:DatanodeProtocolClientSideTranslatorPB.java   
@Override
public void commitBlockSynchronization(ExtendedBlock block,
    long newgenerationstamp, long newlength, boolean closeFile,
    boolean deleteblock, DatanodeID[] newtargets, String[] newtargetstorages
    ) throws IOException {
  CommitBlockSynchronizationRequestProto.Builder builder = 
      CommitBlockSynchronizationRequestProto.newBuilder()
      .setBlock(PBHelper.convert(block)).setNewGenStamp(newgenerationstamp)
      .setNewLength(newlength).setCloseFile(closeFile)
      .setDeleteBlock(deleteblock);
  for (int i = 0; i < newtargets.length; i++) {
    builder.addNewTaragets(PBHelper.convert(newtargets[i]));
    builder.addNewTargetStorages(newtargetstorages[i]);
  }
  CommitBlockSynchronizationRequestProto req = builder.build();
  try {
    rpcProxy.commitBlockSynchronization(NULL_CONTROLLER, req);
  } catch (ServiceException se) {
    throw ProtobufHelper.getRemoteException(se);
  }
}
项目: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    文件:DatanodeProtocolClientSideTranslatorPB.java   
@Override
public void commitBlockSynchronization(ExtendedBlock block,
    long newgenerationstamp, long newlength, boolean closeFile,
    boolean deleteblock, DatanodeID[] newtargets, String[] newtargetstorages)
    throws IOException {
  CommitBlockSynchronizationRequestProto.Builder builder =
      CommitBlockSynchronizationRequestProto.newBuilder()
          .setBlock(PBHelper.convert(block))
          .setNewGenStamp(newgenerationstamp).setNewLength(newlength)
          .setCloseFile(closeFile).setDeleteBlock(deleteblock);
  for (int i = 0; i < newtargets.length; i++) {
    builder.addNewTaragets(PBHelper.convert(newtargets[i]));
    builder.addNewTargetStorages(newtargetstorages[i]);
  }
  CommitBlockSynchronizationRequestProto req = builder.build();
  try {
    rpcProxy.commitBlockSynchronization(NULL_CONTROLLER, req);
  } catch (ServiceException se) {
    throw ProtobufHelper.getRemoteException(se);
  }
}
项目: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    文件:DatanodeProtocolClientSideTranslatorPB.java   
@Override
public void commitBlockSynchronization(ExtendedBlock block,
    long newgenerationstamp, long newlength, boolean closeFile,
    boolean deleteblock, DatanodeID[] newtargets, String[] newtargetstorages
    ) throws IOException {
  CommitBlockSynchronizationRequestProto.Builder builder = 
      CommitBlockSynchronizationRequestProto.newBuilder()
      .setBlock(PBHelper.convert(block)).setNewGenStamp(newgenerationstamp)
      .setNewLength(newlength).setCloseFile(closeFile)
      .setDeleteBlock(deleteblock);
  for (int i = 0; i < newtargets.length; i++) {
    builder.addNewTaragets(PBHelper.convert(newtargets[i]));
    builder.addNewTargetStorages(newtargetstorages[i]);
  }
  CommitBlockSynchronizationRequestProto req = builder.build();
  try {
    rpcProxy.commitBlockSynchronization(NULL_CONTROLLER, req);
  } catch (ServiceException se) {
    throw ProtobufHelper.getRemoteException(se);
  }
}
项目: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    文件:DatanodeProtocolClientSideTranslatorPB.java   
@Override
public void commitBlockSynchronization(ExtendedBlock block,
    long newgenerationstamp, long newlength, boolean closeFile,
    boolean deleteblock, DatanodeID[] newtargets, String[] newtargetstorages
    ) throws IOException {
  CommitBlockSynchronizationRequestProto.Builder builder = 
      CommitBlockSynchronizationRequestProto.newBuilder()
      .setBlock(PBHelper.convert(block)).setNewGenStamp(newgenerationstamp)
      .setNewLength(newlength).setCloseFile(closeFile)
      .setDeleteBlock(deleteblock);
  for (int i = 0; i < newtargets.length; i++) {
    builder.addNewTaragets(PBHelper.convert(newtargets[i]));
    builder.addNewTargetStorages(newtargetstorages[i]);
  }
  CommitBlockSynchronizationRequestProto req = builder.build();
  try {
    rpcProxy.commitBlockSynchronization(NULL_CONTROLLER, req);
  } catch (ServiceException se) {
    throw ProtobufHelper.getRemoteException(se);
  }
}
项目: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    文件:DatanodeProtocolClientSideTranslatorPB.java   
@Override
public void commitBlockSynchronization(ExtendedBlock block,
    long newgenerationstamp, long newlength, boolean closeFile,
    boolean deleteblock, DatanodeID[] newtargets, String[] newtargetstorages
    ) throws IOException {
  CommitBlockSynchronizationRequestProto.Builder builder = 
      CommitBlockSynchronizationRequestProto.newBuilder()
      .setBlock(PBHelper.convert(block)).setNewGenStamp(newgenerationstamp)
      .setNewLength(newlength).setCloseFile(closeFile)
      .setDeleteBlock(deleteblock);
  for (int i = 0; i < newtargets.length; i++) {
    builder.addNewTaragets(PBHelper.convert(newtargets[i]));
    builder.addNewTargetStorages(newtargetstorages[i]);
  }
  CommitBlockSynchronizationRequestProto req = builder.build();
  try {
    rpcProxy.commitBlockSynchronization(NULL_CONTROLLER, req);
  } catch (ServiceException se) {
    throw ProtobufHelper.getRemoteException(se);
  }
}
项目: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;
}