use of com.sequenceiq.cloudbreak.cm.model.ParcelResource in project cloudbreak by hortonworks.
the class ClouderaManagerParcelManagementService method downloadParcels.
public void downloadParcels(Set<ClouderaManagerProduct> products, ParcelResourceApi parcelResourceApi, Stack stack, ApiClient apiClient) throws ApiException, CloudbreakException {
for (ClouderaManagerProduct product : products) {
LOGGER.info("Downloading {} parcel.", product.getName());
ApiCommand apiCommand = parcelResourceApi.startDownloadCommand(stack.getName(), product.getName(), product.getVersion());
ExtendedPollingResult pollingResult = clouderaManagerPollingServiceProvider.startPollingCdpRuntimeParcelDownload(stack, apiClient, apiCommand.getId(), new ParcelResource(stack.getName(), product.getName(), product.getVersion()));
handlePollingResult(pollingResult.getPollingResult(), "Cluster was terminated while waiting for CDP Runtime Parcel to be downloaded", "Timeout during the updated CDP Runtime Parcel download.");
}
}
use of com.sequenceiq.cloudbreak.cm.model.ParcelResource in project cloudbreak by hortonworks.
the class ClouderaManagerParcelManagementService method distributeParcels.
public void distributeParcels(Set<ClouderaManagerProduct> products, ParcelResourceApi parcelResourceApi, Stack stack, ApiClient apiClient) throws ApiException, CloudbreakException {
for (ClouderaManagerProduct product : products) {
LOGGER.info("Distributing downloaded {} parcel", product.getName());
ApiCommand apiCommand = parcelResourceApi.startDistributionCommand(stack.getName(), product.getName(), product.getVersion());
ExtendedPollingResult pollingResult = clouderaManagerPollingServiceProvider.startPollingCdpRuntimeParcelDistribute(stack, apiClient, apiCommand.getId(), new ParcelResource(stack.getName(), product.getName(), product.getVersion()));
handlePollingResult(pollingResult.getPollingResult(), "Cluster was terminated while waiting for CDP Runtime Parcel to be distributed", "Timeout during the updated CDP Runtime Parcel distribution.");
}
}
Aggregations