hadoop AutoCreatedQueueManagementPolicy 源码

  • 2022-10-20
  • 浏览 (223)

haddop AutoCreatedQueueManagementPolicy 代码

文件路径:/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/AutoCreatedQueueManagementPolicy.java

/**
 * 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
 * <p>
 * http://www.apache.org/licenses/LICENSE-2.0
 * <p>
 * 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.hadoop.yarn.server.resourcemanager.scheduler.capacity;

import org.apache.hadoop.yarn.server.resourcemanager.scheduler.SchedulerDynamicEditException;


import java.io.IOException;
import java.util.List;

public interface AutoCreatedQueueManagementPolicy {

  /**
   * Initialize policy
   * @param parentQueue parent queue
   */
  void init(ParentQueue parentQueue) throws IOException;

  /**
   * Reinitialize policy state ( if required )
   * @param parentQueue parent queue
   */
  void reinitialize(ParentQueue parentQueue) throws IOException;

  /**
   * Get initial template for the specified leaf queue
   * @param leafQueue the leaf queue
   * @return initial leaf queue template configurations and capacities for
   * auto created queue
   */
  AutoCreatedLeafQueueConfig getInitialLeafQueueConfiguration(
      AbstractAutoCreatedLeafQueue leafQueue)
      throws SchedulerDynamicEditException;

  /**
   * Compute/Adjust child queue capacities
   * for auto created leaf queues
   * This computes queue entitlements but does not update LeafQueueState or
   * queue capacities. Scheduler calls commitQueueManagemetChanges after
   * validation after applying queue changes and commits to LeafQueueState
   * are done in commitQueueManagementChanges.
   *
   * @return returns a list of suggested QueueEntitlementChange(s) which may
   * or may not be be enforced by the scheduler
   */
  List<QueueManagementChange> computeQueueManagementChanges()
      throws SchedulerDynamicEditException;

  /**
   * Commit/Update state for the specified queue management changes.
   */
  void commitQueueManagementChanges(
      List<QueueManagementChange> queueManagementChanges)
      throws SchedulerDynamicEditException;
}

相关信息

hadoop 源码目录

相关文章

hadoop AbstractAutoCreatedLeafQueue 源码

hadoop AbstractCSQueue 源码

hadoop AbstractLeafQueue 源码

hadoop AbstractManagedParentQueue 源码

hadoop AppPriorityACLConfigurationParser 源码

hadoop AppPriorityACLGroup 源码

hadoop AutoCreatedLeafQueue 源码

hadoop AutoCreatedLeafQueueConfig 源码

hadoop AutoCreatedQueueDeletionPolicy 源码

hadoop AutoCreatedQueueTemplate 源码

0  赞