/*
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements.  See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership.  The ASF licenses this file
 * to you under the Apache License, Version 2.0 (the
 * "License"); you may not use this file except in compliance
 * with the License.  You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package org.apache.flink.yarn.configuration;

import org.apache.flink.annotation.Internal;
import org.apache.flink.configuration.ConfigOption;
import org.apache.flink.runtime.resourcemanager.slotmanager.SlotManager;
import org.apache.flink.runtime.resourcemanager.slotmanager.SlotManagerImpl;

import static org.apache.flink.configuration.ConfigOptions.key;

/** Yarn configuration options that are not meant to be set by the user. */
@Internal
public class YarnConfigOptionsInternal {

    public static final ConfigOption<String> APPLICATION_LOG_CONFIG_FILE =
            key("$internal.yarn.log-config-file")
                    .stringType()
                    .noDefaultValue()
                    .withDescription(
                            "**DO NOT USE** The location of the log config file, e.g. the path to your log4j.properties for log4j.");

    /**
     * **DO NOT USE** Whether {@link org.apache.flink.yarn.YarnResourceManagerDriver} should match
     * the vcores of allocated containers with those requested.
     *
     * <p>By default, Yarn ignores vcores in the container requests, and always allocate 1 vcore for
     * each container. Iff 'yarn.scheduler.capacity.resource-calculator' is set to
     * 'DominantResourceCalculator' for Yarn, will it allocate container vcores as requested.
     *
     * <p>For Hadoop 2.6+, we can learn whether Yarn matches vcores from {@link
     * org.apache.hadoop.yarn.api.protocolrecords.RegisterApplicationMasterResponse}. However, this
     * is not available to earlier Hadoop versions (pre 2.6). Therefore, for earlier Hadoop
     * versions, the user needs to make sure this configuration option is consistent with the Yarn
     * setup.
     *
     * <p>ATM, it should be fine to keep this option 'false', because with the current {@link
     * SlotManagerImpl} all the TM containers should have the same resources. If later we add
     * another {@link SlotManager} implementation that may have TMs with different resources, and if
     * we need it to work with pre 2.6 Hadoop versions, we can expose this configuration option to
     * users.
     */
    public static final ConfigOption<Boolean> MATCH_CONTAINER_VCORES =
            key("$internal.yarn.resourcemanager.enable-vcore-matching")
                    .booleanType()
                    .defaultValue(false)
                    .withDescription(
                            "**DO NOT USE** Whether YarnResourceManagerDriver should match the container vcores.");
}

@@ -946,158 +946,8 @@
 ion;
-%0Aimport org.apache.flink.runtime.resourcemanager.slotmanager.SlotManager;%0Aimport org.apache.flink.runtime.resourcemanager.slotmanager.SlotManagerImpl;
 %0A%0Aim
@@ -1509,1646 +1509,7 @@
 .%22);
-%0A%0A    /**%0A     * **DO NOT USE** Whether %7B@link org.apache.flink.yarn.YarnResourceManagerDriver%7D should match%0A     * the vcores of allocated containers with those requested.%0A     *%0A     * %3Cp%3EBy default, Yarn ignores vcores in the container requests, and always allocate 1 vcore for%0A     * each container. Iff 'yarn.scheduler.capacity.resource-calculator' is set to%0A     * 'DominantResourceCalculator' for Yarn, will it allocate container vcores as requested.%0A     *%0A     * %3Cp%3EFor Hadoop 2.6+, we can learn whether Yarn matches vcores from %7B@link%0A     * org.apache.hadoop.yarn.api.protocolrecords.RegisterApplicationMasterResponse%7D. However, this%0A     * is not available to earlier Hadoop versions (pre 2.6). Therefore, for earlier Hadoop%0A     * versions, the user needs to make sure this configuration option is consistent with the Yarn%0A     * setup.%0A     *%0A     * %3Cp%3EATM, it should be fine to keep this option 'false', because with the current %7B@link%0A     * SlotManagerImpl%7D all the TM containers should have the same resources. If later we add%0A     * another %7B@link SlotManager%7D implementation that may have TMs with different resources, and if%0A     * we need it to work with pre 2.6 Hadoop versions, we can expose this configuration option to%0A     * users.%0A     */%0A    public static final ConfigOption%3CBoolean%3E MATCH_CONTAINER_VCORES =%0A            key(%22$internal.yarn.resourcemanager.enable-vcore-matching%22)%0A                    .booleanType()%0A                    .defaultValue(false)%0A                    .withDescription(%0A                            %22**DO NOT USE** Whether YarnResourceManagerDriver should match the container vcores.%22);
 %0A%7D%0A

Remove unused internal options in YarnConfigOptionsInternal