Search in sources :

Example 11 with DefaultCDHInfo

use of com.sequenceiq.cloudbreak.cloud.model.component.DefaultCDHInfo in project cloudbreak by hortonworks.

the class StackMatrixService method getImageBasedStackMatrix.

private StackMatrixV4Response getImageBasedStackMatrix(Long workspaceId, String platform, String imageCatalogName) throws CloudbreakImageCatalogException {
    Map<String, ImageBasedDefaultCDHInfo> cdhEntries = imageBasedDefaultCDHEntries.getEntries(workspaceId, platform, imageCatalogName);
    StackMatrixV4Response stackMatrixV4Response = new StackMatrixV4Response();
    Map<String, ClouderaManagerStackDescriptorV4Response> cdhStackDescriptors = new HashMap<>();
    for (Entry<String, ImageBasedDefaultCDHInfo> defaultCDHInfoEntry : cdhEntries.entrySet()) {
        DefaultCDHInfo defaultCDHInfo = defaultCDHInfoEntry.getValue().getDefaultCDHInfo();
        Image image = defaultCDHInfoEntry.getValue().getImage();
        ClouderaManagerStackDescriptorV4Response stackDescriptorV4 = getImageBasedCMStackDescriptor(defaultCDHInfo, image);
        cdhStackDescriptors.put(defaultCDHInfoEntry.getKey(), stackDescriptorV4);
    }
    stackMatrixV4Response.setCdh(cdhStackDescriptors);
    return stackMatrixV4Response;
}
Also used : ImageBasedDefaultCDHInfo(com.sequenceiq.cloudbreak.cloud.model.component.ImageBasedDefaultCDHInfo) DefaultCDHInfo(com.sequenceiq.cloudbreak.cloud.model.component.DefaultCDHInfo) HashMap(java.util.HashMap) ImageBasedDefaultCDHInfo(com.sequenceiq.cloudbreak.cloud.model.component.ImageBasedDefaultCDHInfo) ClouderaManagerStackDescriptorV4Response(com.sequenceiq.cloudbreak.api.endpoint.v4.util.responses.ClouderaManagerStackDescriptorV4Response) Image(com.sequenceiq.cloudbreak.cloud.model.catalog.Image) StackMatrixV4Response(com.sequenceiq.cloudbreak.api.endpoint.v4.util.responses.StackMatrixV4Response)

Aggregations

DefaultCDHInfo (com.sequenceiq.cloudbreak.cloud.model.component.DefaultCDHInfo)11 ImageBasedDefaultCDHInfo (com.sequenceiq.cloudbreak.cloud.model.component.ImageBasedDefaultCDHInfo)8 StackMatrixV4Response (com.sequenceiq.cloudbreak.api.endpoint.v4.util.responses.StackMatrixV4Response)6 ClouderaManagerStackDescriptorV4Response (com.sequenceiq.cloudbreak.api.endpoint.v4.util.responses.ClouderaManagerStackDescriptorV4Response)5 ClusterV4Request (com.sequenceiq.cloudbreak.api.endpoint.v4.stacks.request.cluster.ClusterV4Request)4 ClouderaManagerProduct (com.sequenceiq.cloudbreak.cloud.model.ClouderaManagerProduct)4 Image (com.sequenceiq.cloudbreak.cloud.model.Image)4 Json (com.sequenceiq.cloudbreak.common.json.Json)4 Component (com.sequenceiq.cloudbreak.domain.stack.Component)4 Cluster (com.sequenceiq.cloudbreak.domain.stack.cluster.Cluster)4 HashMap (java.util.HashMap)4 List (java.util.List)4 Collectors (java.util.stream.Collectors)4 Inject (javax.inject.Inject)4 Logger (org.slf4j.Logger)4 LoggerFactory (org.slf4j.LoggerFactory)4 ClouderaManagerV4Request (com.sequenceiq.cloudbreak.api.endpoint.v4.stacks.request.cluster.cm.ClouderaManagerV4Request)3 ClouderaManagerProductV4Request (com.sequenceiq.cloudbreak.api.endpoint.v4.stacks.request.cluster.cm.product.ClouderaManagerProductV4Request)3 ClouderaManagerRepositoryV4Request (com.sequenceiq.cloudbreak.api.endpoint.v4.stacks.request.cluster.cm.repository.ClouderaManagerRepositoryV4Request)3 ClouderaManagerRepo (com.sequenceiq.cloudbreak.cloud.model.ClouderaManagerRepo)3