use of com.sequenceiq.cloudbreak.cmtemplate.CMRepositoryVersionUtil.CLOUDERA_STACK_VERSION_7_2_11 in project cloudbreak by hortonworks.
the class LoadBalancerConfigService method getOozieHAInstanceGroup.
private Optional<InstanceGroup> getOozieHAInstanceGroup(Stack stack) {
Cluster cluster = stack.getCluster();
if (cluster != null) {
CmTemplateProcessor cmTemplateProcessor = new CmTemplateProcessor(cluster.getBlueprint().getBlueprintText());
String cdhVersion = cmTemplateProcessor.getStackVersion();
if (cdhVersion != null && isVersionNewerOrEqualThanLimited(cdhVersion, CLOUDERA_STACK_VERSION_7_2_11)) {
Set<String> oozieGroupNames = getOozieGroups(cmTemplateProcessor);
return stack.getInstanceGroups().stream().filter(ig -> oozieGroupNames.contains(ig.getGroupName())).filter(ig -> ig.getNodeCount() > 1).findFirst();
}
}
return Optional.empty();
}
Aggregations