Search in sources :

Example 1 with ScalingType

use of com.sequenceiq.cloudbreak.common.type.ScalingType in project cloudbreak by hortonworks.

the class ReactorFlowManager method triggerClusterDownscale.

public void triggerClusterDownscale(Long stackId, HostGroupAdjustmentJson hostGroupAdjustment) {
    String selector = FlowChainTriggers.FULL_DOWNSCALE_TRIGGER_EVENT;
    ScalingType scalingType = hostGroupAdjustment.getWithStackUpdate() ? ScalingType.DOWNSCALE_TOGETHER : ScalingType.DOWNSCALE_ONLY_CLUSTER;
    Acceptable event = new ClusterAndStackDownscaleTriggerEvent(selector, stackId, hostGroupAdjustment.getHostGroup(), hostGroupAdjustment.getScalingAdjustment(), scalingType);
    notify(selector, event);
}
Also used : ScalingType(com.sequenceiq.cloudbreak.common.type.ScalingType) ClusterAndStackDownscaleTriggerEvent(com.sequenceiq.cloudbreak.core.flow2.event.ClusterAndStackDownscaleTriggerEvent) Acceptable(com.sequenceiq.cloudbreak.cloud.Acceptable)

Aggregations

Acceptable (com.sequenceiq.cloudbreak.cloud.Acceptable)1 ScalingType (com.sequenceiq.cloudbreak.common.type.ScalingType)1 ClusterAndStackDownscaleTriggerEvent (com.sequenceiq.cloudbreak.core.flow2.event.ClusterAndStackDownscaleTriggerEvent)1