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

项目:hadoop    文件:ClientNamenodeProtocolServerSideTranslatorPB.java   
@Override
public GetAdditionalDatanodeResponseProto getAdditionalDatanode(
    RpcController controller, GetAdditionalDatanodeRequestProto req)
    throws ServiceException {
  try {
    List<DatanodeInfoProto> existingList = req.getExistingsList();
    List<String> existingStorageIDsList = req.getExistingStorageUuidsList();
    List<DatanodeInfoProto> excludesList = req.getExcludesList();
    LocatedBlock result = server.getAdditionalDatanode(req.getSrc(),
        req.getFileId(), PBHelper.convert(req.getBlk()),
        PBHelper.convert(existingList.toArray(
            new DatanodeInfoProto[existingList.size()])),
        existingStorageIDsList.toArray(
            new String[existingStorageIDsList.size()]),
        PBHelper.convert(excludesList.toArray(
            new DatanodeInfoProto[excludesList.size()])), 
        req.getNumAdditionalNodes(), req.getClientName());
    return GetAdditionalDatanodeResponseProto.newBuilder().setBlock(
        PBHelper.convert(result))
        .build();
  } catch (IOException e) {
    throw new ServiceException(e);
  }
}
项目:hadoop    文件:ClientNamenodeProtocolTranslatorPB.java   
@Override
public LocatedBlock getAdditionalDatanode(String src, long fileId,
    ExtendedBlock blk, DatanodeInfo[] existings, String[] existingStorageIDs,
    DatanodeInfo[] excludes,
    int numAdditionalNodes, String clientName) throws AccessControlException,
    FileNotFoundException, SafeModeException, UnresolvedLinkException,
    IOException {
  GetAdditionalDatanodeRequestProto req = GetAdditionalDatanodeRequestProto
      .newBuilder()
      .setSrc(src)
      .setFileId(fileId)
      .setBlk(PBHelper.convert(blk))
      .addAllExistings(PBHelper.convert(existings))
      .addAllExistingStorageUuids(Arrays.asList(existingStorageIDs))
      .addAllExcludes(PBHelper.convert(excludes))
      .setNumAdditionalNodes(numAdditionalNodes)
      .setClientName(clientName)
      .build();
  try {
    return PBHelper.convert(rpcProxy.getAdditionalDatanode(null, req)
        .getBlock());
  } catch (ServiceException e) {
    throw ProtobufHelper.getRemoteException(e);
  }
}
项目:aliyun-oss-hadoop-fs    文件:ClientNamenodeProtocolTranslatorPB.java   
@Override
public LocatedBlock getAdditionalDatanode(String src, long fileId,
    ExtendedBlock blk, DatanodeInfo[] existings, String[] existingStorageIDs,
    DatanodeInfo[] excludes, int numAdditionalNodes, String clientName)
    throws IOException {
  GetAdditionalDatanodeRequestProto req = GetAdditionalDatanodeRequestProto
      .newBuilder()
      .setSrc(src)
      .setFileId(fileId)
      .setBlk(PBHelperClient.convert(blk))
      .addAllExistings(PBHelperClient.convert(existings))
      .addAllExistingStorageUuids(Arrays.asList(existingStorageIDs))
      .addAllExcludes(PBHelperClient.convert(excludes))
      .setNumAdditionalNodes(numAdditionalNodes)
      .setClientName(clientName)
      .build();
  try {
    return PBHelperClient.convertLocatedBlockProto(
        rpcProxy.getAdditionalDatanode(null, req).getBlock());
  } catch (ServiceException e) {
    throw ProtobufHelper.getRemoteException(e);
  }
}
项目:aliyun-oss-hadoop-fs    文件:ClientNamenodeProtocolServerSideTranslatorPB.java   
@Override
public GetAdditionalDatanodeResponseProto getAdditionalDatanode(
    RpcController controller, GetAdditionalDatanodeRequestProto req)
    throws ServiceException {
  try {
    List<DatanodeInfoProto> existingList = req.getExistingsList();
    List<String> existingStorageIDsList = req.getExistingStorageUuidsList();
    List<DatanodeInfoProto> excludesList = req.getExcludesList();
    LocatedBlock result = server.getAdditionalDatanode(req.getSrc(),
        req.getFileId(), PBHelperClient.convert(req.getBlk()),
        PBHelperClient.convert(existingList.toArray(
            new DatanodeInfoProto[existingList.size()])),
        existingStorageIDsList.toArray(
            new String[existingStorageIDsList.size()]),
        PBHelperClient.convert(excludesList.toArray(
            new DatanodeInfoProto[excludesList.size()])),
        req.getNumAdditionalNodes(), req.getClientName());
    return GetAdditionalDatanodeResponseProto.newBuilder().setBlock(
    PBHelperClient.convertLocatedBlock(result))
        .build();
  } catch (IOException e) {
    throw new ServiceException(e);
  }
}
项目:big-c    文件:ClientNamenodeProtocolServerSideTranslatorPB.java   
@Override
public GetAdditionalDatanodeResponseProto getAdditionalDatanode(
    RpcController controller, GetAdditionalDatanodeRequestProto req)
    throws ServiceException {
  try {
    List<DatanodeInfoProto> existingList = req.getExistingsList();
    List<String> existingStorageIDsList = req.getExistingStorageUuidsList();
    List<DatanodeInfoProto> excludesList = req.getExcludesList();
    LocatedBlock result = server.getAdditionalDatanode(req.getSrc(),
        req.getFileId(), PBHelper.convert(req.getBlk()),
        PBHelper.convert(existingList.toArray(
            new DatanodeInfoProto[existingList.size()])),
        existingStorageIDsList.toArray(
            new String[existingStorageIDsList.size()]),
        PBHelper.convert(excludesList.toArray(
            new DatanodeInfoProto[excludesList.size()])), 
        req.getNumAdditionalNodes(), req.getClientName());
    return GetAdditionalDatanodeResponseProto.newBuilder().setBlock(
        PBHelper.convert(result))
        .build();
  } catch (IOException e) {
    throw new ServiceException(e);
  }
}
项目:big-c    文件:ClientNamenodeProtocolTranslatorPB.java   
@Override
public LocatedBlock getAdditionalDatanode(String src, long fileId,
    ExtendedBlock blk, DatanodeInfo[] existings, String[] existingStorageIDs,
    DatanodeInfo[] excludes,
    int numAdditionalNodes, String clientName) throws AccessControlException,
    FileNotFoundException, SafeModeException, UnresolvedLinkException,
    IOException {
  GetAdditionalDatanodeRequestProto req = GetAdditionalDatanodeRequestProto
      .newBuilder()
      .setSrc(src)
      .setFileId(fileId)
      .setBlk(PBHelper.convert(blk))
      .addAllExistings(PBHelper.convert(existings))
      .addAllExistingStorageUuids(Arrays.asList(existingStorageIDs))
      .addAllExcludes(PBHelper.convert(excludes))
      .setNumAdditionalNodes(numAdditionalNodes)
      .setClientName(clientName)
      .build();
  try {
    return PBHelper.convert(rpcProxy.getAdditionalDatanode(null, req)
        .getBlock());
  } catch (ServiceException e) {
    throw ProtobufHelper.getRemoteException(e);
  }
}
项目:hadoop-2.6.0-cdh5.4.3    文件:ClientNamenodeProtocolServerSideTranslatorPB.java   
@Override
public GetAdditionalDatanodeResponseProto getAdditionalDatanode(
    RpcController controller, GetAdditionalDatanodeRequestProto req)
    throws ServiceException {
  try {
    List<DatanodeInfoProto> existingList = req.getExistingsList();
    List<String> existingStorageIDsList = req.getExistingStorageUuidsList();
    List<DatanodeInfoProto> excludesList = req.getExcludesList();
    LocatedBlock result = server.getAdditionalDatanode(req.getSrc(),
        req.getFileId(), PBHelper.convert(req.getBlk()),
        PBHelper.convert(existingList.toArray(
            new DatanodeInfoProto[existingList.size()])),
        existingStorageIDsList.toArray(
            new String[existingStorageIDsList.size()]),
        PBHelper.convert(excludesList.toArray(
            new DatanodeInfoProto[excludesList.size()])), 
        req.getNumAdditionalNodes(), req.getClientName());
    return GetAdditionalDatanodeResponseProto.newBuilder().setBlock(
        PBHelper.convert(result))
        .build();
  } catch (IOException e) {
    throw new ServiceException(e);
  }
}
项目:hadoop-2.6.0-cdh5.4.3    文件:ClientNamenodeProtocolTranslatorPB.java   
@Override
public LocatedBlock getAdditionalDatanode(String src, long fileId,
    ExtendedBlock blk, DatanodeInfo[] existings, String[] existingStorageIDs,
    DatanodeInfo[] excludes,
    int numAdditionalNodes, String clientName) throws AccessControlException,
    FileNotFoundException, SafeModeException, UnresolvedLinkException,
    IOException {
  GetAdditionalDatanodeRequestProto req = GetAdditionalDatanodeRequestProto
      .newBuilder()
      .setSrc(src)
      .setFileId(fileId)
      .setBlk(PBHelper.convert(blk))
      .addAllExistings(PBHelper.convert(existings))
      .addAllExistingStorageUuids(Arrays.asList(existingStorageIDs))
      .addAllExcludes(PBHelper.convert(excludes))
      .setNumAdditionalNodes(numAdditionalNodes)
      .setClientName(clientName)
      .build();
  try {
    return PBHelper.convert(rpcProxy.getAdditionalDatanode(null, req)
        .getBlock());
  } catch (ServiceException e) {
    throw ProtobufHelper.getRemoteException(e);
  }
}
项目:hadoop-plus    文件:ClientNamenodeProtocolServerSideTranslatorPB.java   
@Override
public GetAdditionalDatanodeResponseProto getAdditionalDatanode(
    RpcController controller, GetAdditionalDatanodeRequestProto req)
    throws ServiceException {
  try {
    List<DatanodeInfoProto> existingList = req.getExistingsList();
    List<DatanodeInfoProto> excludesList = req.getExcludesList();
    LocatedBlock result = server.getAdditionalDatanode(
        req.getSrc(), PBHelper.convert(req.getBlk()),
        PBHelper.convert(existingList.toArray(
            new DatanodeInfoProto[existingList.size()])),
        PBHelper.convert(excludesList.toArray(
            new DatanodeInfoProto[excludesList.size()])), 
            req.getNumAdditionalNodes(), req.getClientName());
    return GetAdditionalDatanodeResponseProto.newBuilder().setBlock(
        PBHelper.convert(result))
        .build();
  } catch (IOException e) {
    throw new ServiceException(e);
  }
}
项目:hadoop-plus    文件:ClientNamenodeProtocolTranslatorPB.java   
@Override
public LocatedBlock getAdditionalDatanode(String src, ExtendedBlock blk,
    DatanodeInfo[] existings, DatanodeInfo[] excludes,
    int numAdditionalNodes, String clientName) throws AccessControlException,
    FileNotFoundException, SafeModeException, UnresolvedLinkException,
    IOException {
  GetAdditionalDatanodeRequestProto req = GetAdditionalDatanodeRequestProto
      .newBuilder()
      .setSrc(src)
      .setBlk(PBHelper.convert(blk))
      .addAllExistings(PBHelper.convert(existings))
      .addAllExcludes(PBHelper.convert(excludes))
      .setNumAdditionalNodes(numAdditionalNodes)
      .setClientName(clientName)
      .build();
  try {
    return PBHelper.convert(rpcProxy.getAdditionalDatanode(null, req)
        .getBlock());
  } catch (ServiceException e) {
    throw ProtobufHelper.getRemoteException(e);
  }
}
项目:FlexMap    文件:ClientNamenodeProtocolServerSideTranslatorPB.java   
@Override
public GetAdditionalDatanodeResponseProto getAdditionalDatanode(
    RpcController controller, GetAdditionalDatanodeRequestProto req)
    throws ServiceException {
  try {
    List<DatanodeInfoProto> existingList = req.getExistingsList();
    List<String> existingStorageIDsList = req.getExistingStorageUuidsList();
    List<DatanodeInfoProto> excludesList = req.getExcludesList();
    LocatedBlock result = server.getAdditionalDatanode(req.getSrc(),
        req.getFileId(), PBHelper.convert(req.getBlk()),
        PBHelper.convert(existingList.toArray(
            new DatanodeInfoProto[existingList.size()])),
        existingStorageIDsList.toArray(
            new String[existingStorageIDsList.size()]),
        PBHelper.convert(excludesList.toArray(
            new DatanodeInfoProto[excludesList.size()])), 
        req.getNumAdditionalNodes(), req.getClientName());
    return GetAdditionalDatanodeResponseProto.newBuilder().setBlock(
        PBHelper.convert(result))
        .build();
  } catch (IOException e) {
    throw new ServiceException(e);
  }
}
项目:FlexMap    文件:ClientNamenodeProtocolTranslatorPB.java   
@Override
public LocatedBlock getAdditionalDatanode(String src, long fileId,
    ExtendedBlock blk, DatanodeInfo[] existings, String[] existingStorageIDs,
    DatanodeInfo[] excludes,
    int numAdditionalNodes, String clientName) throws AccessControlException,
    FileNotFoundException, SafeModeException, UnresolvedLinkException,
    IOException {
  GetAdditionalDatanodeRequestProto req = GetAdditionalDatanodeRequestProto
      .newBuilder()
      .setSrc(src)
      .setFileId(fileId)
      .setBlk(PBHelper.convert(blk))
      .addAllExistings(PBHelper.convert(existings))
      .addAllExistingStorageUuids(Arrays.asList(existingStorageIDs))
      .addAllExcludes(PBHelper.convert(excludes))
      .setNumAdditionalNodes(numAdditionalNodes)
      .setClientName(clientName)
      .build();
  try {
    return PBHelper.convert(rpcProxy.getAdditionalDatanode(null, req)
        .getBlock());
  } catch (ServiceException e) {
    throw ProtobufHelper.getRemoteException(e);
  }
}
项目:hops    文件:ClientNamenodeProtocolServerSideTranslatorPB.java   
@Override
public GetAdditionalDatanodeResponseProto getAdditionalDatanode(
    RpcController controller, GetAdditionalDatanodeRequestProto req)
    throws ServiceException {
  try {
    List<DatanodeInfoProto> existingList = req.getExistingsList();
    List<DatanodeInfoProto> excludesList = req.getExcludesList();
    LocatedBlock result = server
        .getAdditionalDatanode(req.getSrc(), PBHelper.convert(req.getBlk()),
            PBHelper.convert(existingList
                .toArray(new DatanodeInfoProto[existingList.size()])),
            PBHelper.convert(excludesList
                .toArray(new DatanodeInfoProto[excludesList.size()])),
            req.getNumAdditionalNodes(), req.getClientName());
    return GetAdditionalDatanodeResponseProto.newBuilder()
        .setBlock(PBHelper.convert(result)).build();
  } catch (IOException e) {
    throw new ServiceException(e);
  }
}
项目:hops    文件:ClientNamenodeProtocolTranslatorPB.java   
@Override
public LocatedBlock getAdditionalDatanode(String src, ExtendedBlock blk,
    DatanodeInfo[] existings, DatanodeInfo[] excludes, int numAdditionalNodes,
    String clientName)
    throws AccessControlException, FileNotFoundException, SafeModeException,
    UnresolvedLinkException, IOException {
  GetAdditionalDatanodeRequestProto req =
      GetAdditionalDatanodeRequestProto.newBuilder().setSrc(src)
          .setBlk(PBHelper.convert(blk))
          .addAllExistings(PBHelper.convert(existings))
          .addAllExcludes(PBHelper.convert(excludes))
          .setNumAdditionalNodes(numAdditionalNodes).setClientName(clientName)
          .build();
  try {
    return PBHelper
        .convert(rpcProxy.getAdditionalDatanode(null, req).getBlock());
  } catch (ServiceException e) {
    throw ProtobufHelper.getRemoteException(e);
  }
}
项目:hadoop-TCP    文件:ClientNamenodeProtocolServerSideTranslatorPB.java   
@Override
public GetAdditionalDatanodeResponseProto getAdditionalDatanode(
    RpcController controller, GetAdditionalDatanodeRequestProto req)
    throws ServiceException {
  try {
    List<DatanodeInfoProto> existingList = req.getExistingsList();
    List<DatanodeInfoProto> excludesList = req.getExcludesList();
    LocatedBlock result = server.getAdditionalDatanode(
        req.getSrc(), PBHelper.convert(req.getBlk()),
        PBHelper.convert(existingList.toArray(
            new DatanodeInfoProto[existingList.size()])),
        PBHelper.convert(excludesList.toArray(
            new DatanodeInfoProto[excludesList.size()])), 
            req.getNumAdditionalNodes(), req.getClientName());
    return GetAdditionalDatanodeResponseProto.newBuilder().setBlock(
        PBHelper.convert(result))
        .build();
  } catch (IOException e) {
    throw new ServiceException(e);
  }
}
项目:hadoop-TCP    文件:ClientNamenodeProtocolTranslatorPB.java   
@Override
public LocatedBlock getAdditionalDatanode(String src, ExtendedBlock blk,
    DatanodeInfo[] existings, DatanodeInfo[] excludes,
    int numAdditionalNodes, String clientName) throws AccessControlException,
    FileNotFoundException, SafeModeException, UnresolvedLinkException,
    IOException {
  GetAdditionalDatanodeRequestProto req = GetAdditionalDatanodeRequestProto
      .newBuilder()
      .setSrc(src)
      .setBlk(PBHelper.convert(blk))
      .addAllExistings(PBHelper.convert(existings))
      .addAllExcludes(PBHelper.convert(excludes))
      .setNumAdditionalNodes(numAdditionalNodes)
      .setClientName(clientName)
      .build();
  try {
    return PBHelper.convert(rpcProxy.getAdditionalDatanode(null, req)
        .getBlock());
  } catch (ServiceException e) {
    throw ProtobufHelper.getRemoteException(e);
  }
}
项目:hardfs    文件:ClientNamenodeProtocolServerSideTranslatorPB.java   
@Override
public GetAdditionalDatanodeResponseProto getAdditionalDatanode(
    RpcController controller, GetAdditionalDatanodeRequestProto req)
    throws ServiceException {
  try {
    List<DatanodeInfoProto> existingList = req.getExistingsList();
    List<DatanodeInfoProto> excludesList = req.getExcludesList();
    LocatedBlock result = server.getAdditionalDatanode(
        req.getSrc(), PBHelper.convert(req.getBlk()),
        PBHelper.convert(existingList.toArray(
            new DatanodeInfoProto[existingList.size()])),
        PBHelper.convert(excludesList.toArray(
            new DatanodeInfoProto[excludesList.size()])), 
            req.getNumAdditionalNodes(), req.getClientName());
    return GetAdditionalDatanodeResponseProto.newBuilder().setBlock(
        PBHelper.convert(result))
        .build();
  } catch (IOException e) {
    throw new ServiceException(e);
  }
}
项目:hardfs    文件:ClientNamenodeProtocolTranslatorPB.java   
@Override
public LocatedBlock getAdditionalDatanode(String src, ExtendedBlock blk,
    DatanodeInfo[] existings, DatanodeInfo[] excludes,
    int numAdditionalNodes, String clientName) throws AccessControlException,
    FileNotFoundException, SafeModeException, UnresolvedLinkException,
    IOException {
  GetAdditionalDatanodeRequestProto req = GetAdditionalDatanodeRequestProto
      .newBuilder()
      .setSrc(src)
      .setBlk(PBHelper.convert(blk))
      .addAllExistings(PBHelper.convert(existings))
      .addAllExcludes(PBHelper.convert(excludes))
      .setNumAdditionalNodes(numAdditionalNodes)
      .setClientName(clientName)
      .build();
  try {
    return PBHelper.convert(rpcProxy.getAdditionalDatanode(null, req)
        .getBlock());
  } catch (ServiceException e) {
    throw ProtobufHelper.getRemoteException(e);
  }
}
项目:hadoop-on-lustre2    文件:ClientNamenodeProtocolServerSideTranslatorPB.java   
@Override
public GetAdditionalDatanodeResponseProto getAdditionalDatanode(
    RpcController controller, GetAdditionalDatanodeRequestProto req)
    throws ServiceException {
  try {
    List<DatanodeInfoProto> existingList = req.getExistingsList();
    List<String> existingStorageIDsList = req.getExistingStorageUuidsList();
    List<DatanodeInfoProto> excludesList = req.getExcludesList();
    LocatedBlock result = server.getAdditionalDatanode(req.getSrc(),
        PBHelper.convert(req.getBlk()),
        PBHelper.convert(existingList.toArray(
            new DatanodeInfoProto[existingList.size()])),
        existingStorageIDsList.toArray(
            new String[existingStorageIDsList.size()]),
        PBHelper.convert(excludesList.toArray(
            new DatanodeInfoProto[excludesList.size()])), 
        req.getNumAdditionalNodes(), req.getClientName());
    return GetAdditionalDatanodeResponseProto.newBuilder().setBlock(
        PBHelper.convert(result))
        .build();
  } catch (IOException e) {
    throw new ServiceException(e);
  }
}
项目:hadoop-on-lustre2    文件:ClientNamenodeProtocolTranslatorPB.java   
@Override
public LocatedBlock getAdditionalDatanode(String src, ExtendedBlock blk,
    DatanodeInfo[] existings, String[] existingStorageIDs,
    DatanodeInfo[] excludes,
    int numAdditionalNodes, String clientName) throws AccessControlException,
    FileNotFoundException, SafeModeException, UnresolvedLinkException,
    IOException {
  GetAdditionalDatanodeRequestProto req = GetAdditionalDatanodeRequestProto
      .newBuilder()
      .setSrc(src)
      .setBlk(PBHelper.convert(blk))
      .addAllExistings(PBHelper.convert(existings))
      .addAllExistingStorageUuids(Arrays.asList(existingStorageIDs))
      .addAllExcludes(PBHelper.convert(excludes))
      .setNumAdditionalNodes(numAdditionalNodes)
      .setClientName(clientName)
      .build();
  try {
    return PBHelper.convert(rpcProxy.getAdditionalDatanode(null, req)
        .getBlock());
  } catch (ServiceException e) {
    throw ProtobufHelper.getRemoteException(e);
  }
}