Search in sources :

Example 6 with CmTemplateProcessor

use of com.sequenceiq.cloudbreak.cmtemplate.CmTemplateProcessor in project cloudbreak by hortonworks.

the class HiveRdsConfigProvider method isRdsConfigNeedForHiveMetastore.

private boolean isRdsConfigNeedForHiveMetastore(Blueprint blueprint) {
    String blueprintText = blueprint.getBlueprintText();
    CmTemplateProcessor blueprintProcessor = cmTemplateProcessorFactory.get(blueprintText);
    return blueprintProcessor.isCMComponentExistsInBlueprint("HIVEMETASTORE");
}
Also used : CmTemplateProcessor(com.sequenceiq.cloudbreak.cmtemplate.CmTemplateProcessor)

Example 7 with CmTemplateProcessor

use of com.sequenceiq.cloudbreak.cmtemplate.CmTemplateProcessor in project cloudbreak by hortonworks.

the class NifiRegistryRdsConfigProvider method isRdsConfigNeedForNifiRegistry.

private boolean isRdsConfigNeedForNifiRegistry(Blueprint blueprint) {
    String blueprintText = blueprint.getBlueprintText();
    CmTemplateProcessor cmTemplateProcessor = cmTemplateProcessorFactory.get(blueprintText);
    return cmTemplateProcessor.isCMComponentExistsInBlueprint("NIFI_REGISTRY_SERVER");
}
Also used : CmTemplateProcessor(com.sequenceiq.cloudbreak.cmtemplate.CmTemplateProcessor)

Example 8 with CmTemplateProcessor

use of com.sequenceiq.cloudbreak.cmtemplate.CmTemplateProcessor in project cloudbreak by hortonworks.

the class OozieRdsConfigProvider method isRdsConfigNeedForOozieServer.

private boolean isRdsConfigNeedForOozieServer(Blueprint blueprint) {
    String blueprintText = blueprint.getBlueprintText();
    CmTemplateProcessor blueprintProcessor = cmTemplateProcessorFactory.get(blueprintText);
    return blueprintProcessor.isCMComponentExistsInBlueprint("OOZIE_SERVER");
}
Also used : CmTemplateProcessor(com.sequenceiq.cloudbreak.cmtemplate.CmTemplateProcessor)

Example 9 with CmTemplateProcessor

use of com.sequenceiq.cloudbreak.cmtemplate.CmTemplateProcessor in project cloudbreak by hortonworks.

the class UpdateNodeCountValidator method getComputeHostGroup.

private Set<String> getComputeHostGroup(Stack stack) {
    String blueprintText = stack.getCluster().getBlueprint().getBlueprintText();
    CmTemplateProcessor templateProcessor = cmTemplateProcessorFactory.get(blueprintText);
    Versioned version = () -> templateProcessor.getVersion().get();
    return templateProcessor.getComputeHostGroups(version);
}
Also used : Versioned(com.sequenceiq.cloudbreak.common.type.Versioned) CmTemplateProcessor(com.sequenceiq.cloudbreak.cmtemplate.CmTemplateProcessor)

Example 10 with CmTemplateProcessor

use of com.sequenceiq.cloudbreak.cmtemplate.CmTemplateProcessor in project cloudbreak by hortonworks.

the class CusterServicesRestartHandlerTest method mockTemplateComponents.

private void mockTemplateComponents() {
    CmTemplateProcessor cmTemplateProcessor = mock(CmTemplateProcessor.class);
    when(cmTemplateProcessorFactory.get(any())).thenReturn(cmTemplateProcessor);
    lenient().when(cmTemplateProcessor.getAllComponents()).thenReturn(new HashSet<>(Arrays.asList(ServiceComponent.of("HBASE", "MASTER"), ServiceComponent.of("HBASE", "REGIONSERVER"), ServiceComponent.of("HBASE", "HBASERESTSERVER"), ServiceComponent.of("PHOENIX", "PHOENIX_QUERY_SERVER"), ServiceComponent.of("CLOUDERA_MANAGER", "CM-API"), ServiceComponent.of("CLOUDERA_MANAGER_UI", "CM-UI"))));
}
Also used : CmTemplateProcessor(com.sequenceiq.cloudbreak.cmtemplate.CmTemplateProcessor)

Aggregations

CmTemplateProcessor (com.sequenceiq.cloudbreak.cmtemplate.CmTemplateProcessor)149 TemplatePreparationObject (com.sequenceiq.cloudbreak.template.TemplatePreparationObject)115 Test (org.junit.Test)84 ApiClusterTemplateConfig (com.cloudera.api.swagger.model.ApiClusterTemplateConfig)75 List (java.util.List)46 ArrayList (java.util.ArrayList)33 Test (org.junit.jupiter.api.Test)19 HostgroupView (com.sequenceiq.cloudbreak.template.views.HostgroupView)18 ArgumentMatchers.anyString (org.mockito.ArgumentMatchers.anyString)15 BlueprintView (com.sequenceiq.cloudbreak.template.views.BlueprintView)13 HashSet (java.util.HashSet)12 ClouderaManagerRepo (com.sequenceiq.cloudbreak.cloud.model.ClouderaManagerRepo)10 Builder (com.sequenceiq.cloudbreak.template.TemplatePreparationObject.Builder)10 Set (java.util.Set)10 ApiClusterTemplateService (com.cloudera.api.swagger.model.ApiClusterTemplateService)9 RDSConfig (com.sequenceiq.cloudbreak.domain.RDSConfig)8 Cluster (com.sequenceiq.cloudbreak.domain.stack.cluster.Cluster)8 Map (java.util.Map)8 BaseFileSystemConfigurationsView (com.sequenceiq.cloudbreak.template.filesystem.BaseFileSystemConfigurationsView)7 Collectors (java.util.stream.Collectors)7