class ClouderaManagerModificationService implements ClusterModificationService {

    @Override
    public void removeUnusedParcels(Set<ClusterComponent> usedParcelComponents) throws CloudbreakException {
        ParcelsResourceApi parcelsResourceApi = clouderaManagerApiFactory.getParcelsResourceApi(apiClient);
        ParcelResourceApi parcelResourceApi = clouderaManagerApiFactory.getParcelResourceApi(apiClient);
        Map<String, ClouderaManagerProduct> cmProducts = new HashMap<>();
        for (ClusterComponent clusterComponent : usedParcelComponents) {
            ClouderaManagerProduct product = clusterComponent.getAttributes().getSilent(ClouderaManagerProduct.class);
            cmProducts.put(product.getName(), product);
        }
        clouderaManagerParcelService.deactivateUnusedParcels(parcelsResourceApi, parcelResourceApi, stack.getName(), cmProducts);
        clouderaManagerParcelService.undistributeUnusedParcels(apiClient, parcelsResourceApi, parcelResourceApi, stack, cmProducts);
        clouderaManagerParcelService.removeUnusedParcels(apiClient, parcelsResourceApi, parcelResourceApi, stack, cmProducts);
    }

    public  ClouderaManagerModificationService(Stack stack, HttpClientConfig clientConfig);

}