@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); } }
@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); } }
@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); } }
@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); } }
@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); } }