<commit_before>package com.sequenceiq.cloudbreak.cmtemplate;

import java.util.Objects;
import java.util.Optional;

import com.sequenceiq.cloudbreak.auth.altus.model.Entitlement;
import com.sequenceiq.cloudbreak.common.type.Versioned;

public enum BlackListedUpScaleRole implements EntitledForServiceScale {
    KAFKA_BROKER(Entitlement.DATAHUB_STREAMING_SCALING),
    NIFI_NODE(Entitlement.DATAHUB_FLOW_SCALING, "7.2.8"),
    ZEPPELIN_SERVER(Entitlement.DATAHUB_DEFAULT_SCALING),
    NAMENODE(Entitlement.DATAHUB_DEFAULT_SCALING);

    private final Entitlement entitledFor;

    private final Optional<String> blockedUntilCDPVersion;

    BlackListedUpScaleRole(Entitlement entitledFor) {
        this(entitledFor, null);
    }

    BlackListedUpScaleRole(Entitlement entitledFor, String blockedUntilCDPVersion) {
        this.entitledFor = Objects.requireNonNull(entitledFor);
        this.blockedUntilCDPVersion = Optional.ofNullable(blockedUntilCDPVersion);
    }

    @Override
    public Entitlement getEntitledFor() {
        return entitledFor;
    }

    @Override
    public Optional<String> getBlockedUntilCDPVersion() {
        return blockedUntilCDPVersion;
    }

    public Versioned getBlockedUntilCDPVersionAsVersion() {
        return () -> blockedUntilCDPVersion.orElse(null);
    }
}
<commit_msg>CB-10915 Enable scaling for Kafka broker type nodes<commit_after>package com.sequenceiq.cloudbreak.cmtemplate;

import java.util.Objects;
import java.util.Optional;

import com.sequenceiq.cloudbreak.auth.altus.model.Entitlement;
import com.sequenceiq.cloudbreak.common.type.Versioned;

public enum BlackListedUpScaleRole implements EntitledForServiceScale {
    KAFKA_BROKER(Entitlement.DATAHUB_STREAMING_SCALING, "7.2.12"),
    NIFI_NODE(Entitlement.DATAHUB_FLOW_SCALING, "7.2.8"),
    ZEPPELIN_SERVER(Entitlement.DATAHUB_DEFAULT_SCALING),
    NAMENODE(Entitlement.DATAHUB_DEFAULT_SCALING);

    private final Entitlement entitledFor;

    private final Optional<String> blockedUntilCDPVersion;

    BlackListedUpScaleRole(Entitlement entitledFor) {
        this(entitledFor, null);
    }

    BlackListedUpScaleRole(Entitlement entitledFor, String blockedUntilCDPVersion) {
        this.entitledFor = Objects.requireNonNull(entitledFor);
        this.blockedUntilCDPVersion = Optional.ofNullable(blockedUntilCDPVersion);
    }

    @Override
    public Entitlement getEntitledFor() {
        return entitledFor;
    }

    @Override
    public Optional<String> getBlockedUntilCDPVersion() {
        return blockedUntilCDPVersion;
    }

    public Versioned getBlockedUntilCDPVersionAsVersion() {
        return () -> blockedUntilCDPVersion.orElse(null);
    }
}

{'fraction_non_alphanumeric': 0.07979120059656973, 'fraction_numerical': 0.005592841163310962, 'mean_word_length': 4.612970711297071, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5533484', 'n_tokens_mistral': 857, 'n_tokens_neox': 830, 'n_words': 122}