use of io.hops.hopsworks.dela.old_dto.HopsTorrentAdvanceDownload in project hopsworks by logicalclocks.
the class TransferDelaController method advanceDownload.
public void advanceDownload(String publicDSId, HDFSEndpoint hdfsEndpoint, KafkaEndpoint kafkaEndpoint, ExtendedDetails details) throws DelaException {
if (!delaStateController.transferDelaAvailable()) {
throw new DelaException(RESTCodes.DelaErrorCode.DELA_TRANSFER_NOT_AVAILABLE, Level.SEVERE, DelaException.Source.LOCAL);
}
HopsTorrentAdvanceDownload reqContent = new HopsTorrentAdvanceDownload(new TorrentId(publicDSId), kafkaEndpoint, hdfsEndpoint, details);
try {
ClientWrapper<SuccessJSON> rc = ClientWrapper.httpInstance(SuccessJSON.class).setTarget(settings.getDELA_TRANSFER_HTTP_ENDPOINT()).setPath("torrent/hops/download/advance/xml").setPayload(reqContent);
SuccessJSON result = rc.doPost();
} catch (IllegalStateException ise) {
logger.log(Level.WARNING, "dela communication fail:{0}", ise.getMessage());
throw new DelaException(RESTCodes.DelaErrorCode.COMMUNICATION_FAILURE, Level.SEVERE, DelaException.Source.DELA, null, ise.getMessage(), ise);
}
}
Aggregations