• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java ActiveUsersManager类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.apache.hadoop.yarn.server.resourcemanager.scheduler.ActiveUsersManager的典型用法代码示例。如果您正苦于以下问题:Java ActiveUsersManager类的具体用法?Java ActiveUsersManager怎么用?Java ActiveUsersManager使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



ActiveUsersManager类属于org.apache.hadoop.yarn.server.resourcemanager.scheduler包,在下文中一共展示了ActiveUsersManager类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: initScheduler

import org.apache.hadoop.yarn.server.resourcemanager.scheduler.ActiveUsersManager; //导入依赖的package包/类
private synchronized void initScheduler(Configuration conf) {
  validateConf(conf);
  //Use ConcurrentSkipListMap because applications need to be ordered
  this.applications =
      new ConcurrentSkipListMap<ApplicationId, SchedulerApplication<FiCaSchedulerApp>>();
  this.minimumAllocation =
      Resources.createResource(conf.getInt(
          YarnConfiguration.RM_SCHEDULER_MINIMUM_ALLOCATION_MB,
          YarnConfiguration.DEFAULT_RM_SCHEDULER_MINIMUM_ALLOCATION_MB));
  initMaximumResourceCapability(
      Resources.createResource(conf.getInt(
          YarnConfiguration.RM_SCHEDULER_MAXIMUM_ALLOCATION_MB,
          YarnConfiguration.DEFAULT_RM_SCHEDULER_MAXIMUM_ALLOCATION_MB),
        conf.getInt(
          YarnConfiguration.RM_SCHEDULER_MAXIMUM_ALLOCATION_VCORES,
          YarnConfiguration.DEFAULT_RM_SCHEDULER_MAXIMUM_ALLOCATION_VCORES),
        conf.getInt(
          YarnConfiguration.RM_SCHEDULER_MAXIMUM_ALLOCATION_GCORES,
          YarnConfiguration.DEFAULT_RM_SCHEDULER_MAXIMUM_ALLOCATION_GCORES)));
  this.usePortForNodeName = conf.getBoolean(
      YarnConfiguration.RM_SCHEDULER_INCLUDE_PORT_IN_NODE_NAME,
      YarnConfiguration.DEFAULT_RM_SCHEDULER_USE_PORT_FOR_NODE_NAME);
  this.metrics = QueueMetrics.forQueue(DEFAULT_QUEUE_NAME, null, false,
      conf);
  this.activeUsersManager = new ActiveUsersManager(metrics);
}
 
开发者ID:naver,项目名称:hadoop,代码行数:27,代码来源:FifoScheduler.java


示例2: LeafQueue

import org.apache.hadoop.yarn.server.resourcemanager.scheduler.ActiveUsersManager; //导入依赖的package包/类
public LeafQueue(CapacitySchedulerContext cs, 
    String queueName, CSQueue parent, CSQueue old) throws IOException {
  super(cs, queueName, parent, old);
  this.scheduler = cs;

  this.activeUsersManager = new ActiveUsersManager(metrics); 

  if(LOG.isDebugEnabled()) {
    LOG.debug("LeafQueue:" + " name=" + queueName
      + ", fullname=" + getQueuePath());
  }

  Comparator<FiCaSchedulerApp> applicationComparator =
      cs.getApplicationComparator();
  this.pendingApplications = 
      new TreeSet<FiCaSchedulerApp>(applicationComparator);
  this.activeApplications = new TreeSet<FiCaSchedulerApp>(applicationComparator);
  
  setupQueueConfigs(cs.getClusterResource());
}
 
开发者ID:naver,项目名称:hadoop,代码行数:21,代码来源:LeafQueue.java


示例3: initScheduler

import org.apache.hadoop.yarn.server.resourcemanager.scheduler.ActiveUsersManager; //导入依赖的package包/类
private synchronized void initScheduler(Configuration conf) {
  validateConf(conf);
  //Use ConcurrentSkipListMap because applications need to be ordered
  this.applications =
      new ConcurrentSkipListMap<ApplicationId, SchedulerApplication<FiCaSchedulerApp>>();
  this.minimumAllocation =
      Resources.createResource(conf.getInt(
          YarnConfiguration.RM_SCHEDULER_MINIMUM_ALLOCATION_MB,
          YarnConfiguration.DEFAULT_RM_SCHEDULER_MINIMUM_ALLOCATION_MB));
  initMaximumResourceCapability(
      Resources.createResource(conf.getInt(
          YarnConfiguration.RM_SCHEDULER_MAXIMUM_ALLOCATION_MB,
          YarnConfiguration.DEFAULT_RM_SCHEDULER_MAXIMUM_ALLOCATION_MB),
        conf.getInt(
          YarnConfiguration.RM_SCHEDULER_MAXIMUM_ALLOCATION_VCORES,
          YarnConfiguration.DEFAULT_RM_SCHEDULER_MAXIMUM_ALLOCATION_VCORES)));
  this.usePortForNodeName = conf.getBoolean(
      YarnConfiguration.RM_SCHEDULER_INCLUDE_PORT_IN_NODE_NAME,
      YarnConfiguration.DEFAULT_RM_SCHEDULER_USE_PORT_FOR_NODE_NAME);
  this.metrics = QueueMetrics.forQueue(DEFAULT_QUEUE_NAME, null, false,
      conf);
  this.activeUsersManager = new ActiveUsersManager(metrics);
}
 
开发者ID:aliyun-beta,项目名称:aliyun-oss-hadoop-fs,代码行数:24,代码来源:FifoScheduler.java


示例4: FiCaSchedulerApp

import org.apache.hadoop.yarn.server.resourcemanager.scheduler.ActiveUsersManager; //导入依赖的package包/类
public FiCaSchedulerApp(ApplicationAttemptId applicationAttemptId, 
    String user, Queue queue, ActiveUsersManager activeUsersManager,
    RMContext rmContext) {
  super(applicationAttemptId, user, queue, activeUsersManager, rmContext);
  
  RMApp rmApp = rmContext.getRMApps().get(getApplicationId());
  
  Resource amResource;
  if (rmApp == null || rmApp.getAMResourceRequest() == null) {
    //the rmApp may be undefined (the resource manager checks for this too)
    //and unmanaged applications do not provide an amResource request
    //in these cases, provide a default using the scheduler
    amResource = rmContext.getScheduler().getMinimumResourceCapability();
  } else {
    amResource = rmApp.getAMResourceRequest().getCapability();
  }
  
  setAMResource(amResource);
  
  isTestDone=false;
}
 
开发者ID:yncxcw,项目名称:big-c,代码行数:22,代码来源:FiCaSchedulerApp.java


示例5: LeafQueue

import org.apache.hadoop.yarn.server.resourcemanager.scheduler.ActiveUsersManager; //导入依赖的package包/类
public LeafQueue(CapacitySchedulerContext cs, 
    String queueName, CSQueue parent, CSQueue old) throws IOException {
  super(cs, queueName, parent, old);
  this.scheduler = cs;
 
  this.activeUsersManager = new ActiveUsersManager(metrics); 

  if(LOG.isDebugEnabled()) {
    LOG.debug("LeafQueue:" + " name=" + queueName
      + ", fullname=" + getQueuePath());
  }

  Comparator<FiCaSchedulerApp> applicationComparator =
      cs.getApplicationComparator();
  this.pendingApplications = 
      new TreeSet<FiCaSchedulerApp>(applicationComparator);
  this.activeApplications = new TreeSet<FiCaSchedulerApp>(applicationComparator);
  
  setupQueueConfigs(cs.getClusterResource());
}
 
开发者ID:yncxcw,项目名称:big-c,代码行数:21,代码来源:LeafQueue.java


示例6: LeafQueue

import org.apache.hadoop.yarn.server.resourcemanager.scheduler.ActiveUsersManager; //导入依赖的package包/类
@SuppressWarnings({ "unchecked", "rawtypes" })
public LeafQueue(CapacitySchedulerContext cs,
    String queueName, CSQueue parent, CSQueue old) throws IOException {
  super(cs, queueName, parent, old);
  this.scheduler = cs;

  this.activeUsersManager = new ActiveUsersManager(metrics); 

  // One time initialization is enough since it is static ordering policy
  this.pendingOrderingPolicy = new FifoOrderingPolicyForPendingApps();

  qUsageRatios = new UsageRatios();

  if(LOG.isDebugEnabled()) {
    LOG.debug("LeafQueue:" + " name=" + queueName
      + ", fullname=" + getQueuePath());
  }
  
  setupQueueConfigs(cs.getClusterResource());
}
 
开发者ID:hopshadoop,项目名称:hops,代码行数:21,代码来源:LeafQueue.java


示例7: reinitialize

import org.apache.hadoop.yarn.server.resourcemanager.scheduler.ActiveUsersManager; //导入依赖的package包/类
@Override
public synchronized void
    reinitialize(Configuration conf, RMContext rmContext) throws IOException
{
  setConf(conf);
  if (!this.initialized) {
    validateConf(conf);
    this.rmContext = rmContext;
    this.minimumAllocation = 
      Resources.createResource(conf.getInt(
          YarnConfiguration.RM_SCHEDULER_MINIMUM_ALLOCATION_MB,
          YarnConfiguration.DEFAULT_RM_SCHEDULER_MINIMUM_ALLOCATION_MB));
    this.maximumAllocation = 
      Resources.createResource(conf.getInt(
          YarnConfiguration.RM_SCHEDULER_MAXIMUM_ALLOCATION_MB,
          YarnConfiguration.DEFAULT_RM_SCHEDULER_MAXIMUM_ALLOCATION_MB));
    this.usePortForNodeName = conf.getBoolean(
        YarnConfiguration.RM_SCHEDULER_INCLUDE_PORT_IN_NODE_NAME, 
        YarnConfiguration.DEFAULT_RM_SCHEDULER_USE_PORT_FOR_NODE_NAME);
    this.metrics = QueueMetrics.forQueue(DEFAULT_QUEUE_NAME, null, false,
        conf);
    this.activeUsersManager = new ActiveUsersManager(metrics);
    this.initialized = true;
  }
}
 
开发者ID:chendave,项目名称:hadoop-TCP,代码行数:26,代码来源:FifoScheduler.java


示例8: FSLeafQueue

import org.apache.hadoop.yarn.server.resourcemanager.scheduler.ActiveUsersManager; //导入依赖的package包/类
public FSLeafQueue(String name, FairScheduler scheduler,
    FSParentQueue parent) {
  super(name, scheduler, parent);
  this.lastTimeAtMinShare = scheduler.getClock().getTime();
  this.lastTimeAtFairShareThreshold = scheduler.getClock().getTime();
  activeUsersManager = new ActiveUsersManager(getMetrics());
  amResourceUsage = Resource.newInstance(0, 0, 0);
}
 
开发者ID:naver,项目名称:hadoop,代码行数:9,代码来源:FSLeafQueue.java


示例9: FSAppAttempt

import org.apache.hadoop.yarn.server.resourcemanager.scheduler.ActiveUsersManager; //导入依赖的package包/类
public FSAppAttempt(FairScheduler scheduler,
    ApplicationAttemptId applicationAttemptId, String user, FSLeafQueue queue,
    ActiveUsersManager activeUsersManager, RMContext rmContext) {
  super(applicationAttemptId, user, queue, activeUsersManager, rmContext);

  this.scheduler = scheduler;
  this.startTime = scheduler.getClock().getTime();
  this.priority = Priority.newInstance(1);
  this.resourceWeights = new ResourceWeights();
}
 
开发者ID:naver,项目名称:hadoop,代码行数:11,代码来源:FSAppAttempt.java


示例10: FiCaSchedulerApp

import org.apache.hadoop.yarn.server.resourcemanager.scheduler.ActiveUsersManager; //导入依赖的package包/类
public FiCaSchedulerApp(ApplicationAttemptId applicationAttemptId, 
    String user, Queue queue, ActiveUsersManager activeUsersManager,
    RMContext rmContext) {
  super(applicationAttemptId, user, queue, activeUsersManager, rmContext);
  
  RMApp rmApp = rmContext.getRMApps().get(getApplicationId());
  
  Resource amResource;
  String partition;

  if (rmApp == null || rmApp.getAMResourceRequest() == null) {
    // the rmApp may be undefined (the resource manager checks for this too)
    // and unmanaged applications do not provide an amResource request
    // in these cases, provide a default using the scheduler
    amResource = rmContext.getScheduler().getMinimumResourceCapability();
    partition = CommonNodeLabelsManager.NO_LABEL;
  } else {
    amResource = rmApp.getAMResourceRequest().getCapability();
    partition =
        (rmApp.getAMResourceRequest().getNodeLabelExpression() == null)
        ? CommonNodeLabelsManager.NO_LABEL
        : rmApp.getAMResourceRequest().getNodeLabelExpression();
  }
  
  setAppAMNodePartitionName(partition);
  setAMResource(partition, amResource);
}
 
开发者ID:naver,项目名称:hadoop,代码行数:28,代码来源:FiCaSchedulerApp.java


示例11: createListOfApps

import org.apache.hadoop.yarn.server.resourcemanager.scheduler.ActiveUsersManager; //导入依赖的package包/类
private List<FiCaSchedulerApp> createListOfApps(int noOfApps, String user,
    LeafQueue defaultQueue) {
  List<FiCaSchedulerApp> appsLists = new ArrayList<FiCaSchedulerApp>();
  for (int i = 0; i < noOfApps; i++) {
    ApplicationAttemptId appAttemptId_0 =
        TestUtils.getMockApplicationAttemptId(i, 0);
    FiCaSchedulerApp app_0 =
        new FiCaSchedulerApp(appAttemptId_0, user, defaultQueue,
            mock(ActiveUsersManager.class), spyRMContext);
    appsLists.add(app_0);
  }
  return appsLists;
}
 
开发者ID:naver,项目名称:hadoop,代码行数:14,代码来源:TestLeafQueue.java


示例12: FSLeafQueue

import org.apache.hadoop.yarn.server.resourcemanager.scheduler.ActiveUsersManager; //导入依赖的package包/类
public FSLeafQueue(String name, FairScheduler scheduler,
    FSParentQueue parent) {
  super(name, scheduler, parent);
  this.lastTimeAtMinShare = scheduler.getClock().getTime();
  this.lastTimeAtFairShareThreshold = scheduler.getClock().getTime();
  activeUsersManager = new ActiveUsersManager(getMetrics());
  amResourceUsage = Resource.newInstance(0, 0);
}
 
开发者ID:aliyun-beta,项目名称:aliyun-oss-hadoop-fs,代码行数:9,代码来源:FSLeafQueue.java


示例13: FiCaSchedulerApp

import org.apache.hadoop.yarn.server.resourcemanager.scheduler.ActiveUsersManager; //导入依赖的package包/类
public FiCaSchedulerApp(ApplicationAttemptId applicationAttemptId,
    String user, Queue queue, ActiveUsersManager activeUsersManager,
    RMContext rmContext, Priority appPriority) {
  super(applicationAttemptId, user, queue, activeUsersManager, rmContext);
  
  RMApp rmApp = rmContext.getRMApps().get(getApplicationId());

  Resource amResource;
  String partition;

  if (rmApp == null || rmApp.getAMResourceRequest() == null) {
    // the rmApp may be undefined (the resource manager checks for this too)
    // and unmanaged applications do not provide an amResource request
    // in these cases, provide a default using the scheduler
    amResource = rmContext.getScheduler().getMinimumResourceCapability();
    partition = CommonNodeLabelsManager.NO_LABEL;
  } else {
    amResource = rmApp.getAMResourceRequest().getCapability();
    partition =
        (rmApp.getAMResourceRequest().getNodeLabelExpression() == null)
        ? CommonNodeLabelsManager.NO_LABEL
        : rmApp.getAMResourceRequest().getNodeLabelExpression();
  }

  setAppAMNodePartitionName(partition);
  setAMResource(partition, amResource);
  setPriority(appPriority);

  scheduler = rmContext.getScheduler();

  if (scheduler.getResourceCalculator() != null) {
    rc = scheduler.getResourceCalculator();
  }
  
  containerAllocator = new ContainerAllocator(this, rc, rmContext);
}
 
开发者ID:aliyun-beta,项目名称:aliyun-oss-hadoop-fs,代码行数:37,代码来源:FiCaSchedulerApp.java


示例14: LeafQueue

import org.apache.hadoop.yarn.server.resourcemanager.scheduler.ActiveUsersManager; //导入依赖的package包/类
public LeafQueue(CapacitySchedulerContext cs,
    String queueName, CSQueue parent, CSQueue old) throws IOException {
  super(cs, queueName, parent, old);
  this.scheduler = cs;

  this.activeUsersManager = new ActiveUsersManager(metrics); 

  if(LOG.isDebugEnabled()) {
    LOG.debug("LeafQueue:" + " name=" + queueName
      + ", fullname=" + getQueuePath());
  }
  
  setupQueueConfigs(cs.getClusterResource());
}
 
开发者ID:aliyun-beta,项目名称:aliyun-oss-hadoop-fs,代码行数:15,代码来源:LeafQueue.java


示例15: reinitialize

import org.apache.hadoop.yarn.server.resourcemanager.scheduler.ActiveUsersManager; //导入依赖的package包/类
@Override
public synchronized void
    reinitialize(Configuration conf, RMContext rmContext) throws IOException
{
  setConf(conf);
  if (!this.initialized) {
    validateConf(conf);
    this.rmContext = rmContext;
    this.minimumAllocation = 
      Resources.createResource(conf.getInt(
          YarnConfiguration.RM_SCHEDULER_MINIMUM_ALLOCATION_MB,
          YarnConfiguration.DEFAULT_RM_SCHEDULER_MINIMUM_ALLOCATION_MB),
          conf.getInt(
          		YarnConfiguration.RM_SCHEDULER_MINIMUM_ALLOCATION_VCORES,
          		YarnConfiguration.DEFAULT_RM_SCHEDULER_MINIMUM_ALLOCATION_VCORES),
          conf.getInt(
          		YarnConfiguration.RM_SCHEDULER_MINIMUM_ALLOCATION_GPU_CORES,
          		YarnConfiguration.DEFAULT_RM_SCHEDULER_MINIMUM_ALLOCATION_GPU_CORES));
    this.maximumAllocation = 
      Resources.createResource(conf.getInt(
          YarnConfiguration.RM_SCHEDULER_MAXIMUM_ALLOCATION_MB,
          YarnConfiguration.DEFAULT_RM_SCHEDULER_MAXIMUM_ALLOCATION_MB),
          conf.getInt(
          		YarnConfiguration.RM_SCHEDULER_MAXIMUM_ALLOCATION_VCORES,
          		YarnConfiguration.DEFAULT_RM_SCHEDULER_MAXIMUM_ALLOCATION_VCORES),
          conf.getInt(
          		YarnConfiguration.RM_SCHEDULER_MAXIMUM_ALLOCATION_GPU_CORES,
          		YarnConfiguration.DEFAULT_RM_SCHEDULER_MAXIMUM_ALLOCATION_GPU_CORES));
    this.metrics = QueueMetrics.forQueue(DEFAULT_QUEUE_NAME, null, false,
        conf);
    this.activeUsersManager = new ActiveUsersManager(metrics);
    this.initialized = true;
  }
}
 
开发者ID:ict-carch,项目名称:hadoop-plus,代码行数:35,代码来源:FifoScheduler.java


示例16: addApplication

import org.apache.hadoop.yarn.server.resourcemanager.scheduler.ActiveUsersManager; //导入依赖的package包/类
/**
 * Add a new application to the scheduler, with a given id, queue name, and
 * user. This will accept a new app even if the user or queue is above
 * configured limits, but the app will not be marked as runnable.
 */
protected synchronized void addApplication(
    ApplicationAttemptId applicationAttemptId, String queueName, String user) {
  RMApp rmApp = rmContext.getRMApps().get(applicationAttemptId);
  FSLeafQueue queue = assignToQueue(rmApp, queueName, user);

  FSSchedulerApp schedulerApp =
      new FSSchedulerApp(applicationAttemptId, user,
          queue, new ActiveUsersManager(getRootQueueMetrics()),
          rmContext);

  // Enforce ACLs
  UserGroupInformation userUgi = UserGroupInformation.createRemoteUser(user);
  if (!queue.hasAccess(QueueACL.SUBMIT_APPLICATIONS, userUgi)) {
    String msg = "User " + userUgi.getUserName() +
  	        " cannot submit applications to queue " + queue.getName();
    LOG.info(msg);
    rmContext.getDispatcher().getEventHandler().handle(
  	        new RMAppAttemptRejectedEvent(applicationAttemptId, msg));
    return;
  }
  
  queue.addApp(schedulerApp);
  queue.getMetrics().submitApp(user, applicationAttemptId.getAttemptId());

  applications.put(applicationAttemptId, schedulerApp);

  LOG.info("Application Submission: " + applicationAttemptId +
      ", user: "+ user +
      ", currently active: " + applications.size());

  rmContext.getDispatcher().getEventHandler().handle(
      new RMAppAttemptEvent(applicationAttemptId,
          RMAppAttemptEventType.APP_ACCEPTED));
}
 
开发者ID:ict-carch,项目名称:hadoop-plus,代码行数:40,代码来源:FairScheduler.java


示例17: FSSchedulerApp

import org.apache.hadoop.yarn.server.resourcemanager.scheduler.ActiveUsersManager; //导入依赖的package包/类
public FSSchedulerApp(ApplicationAttemptId applicationAttemptId, 
    String user, Queue queue, ActiveUsersManager activeUsersManager,
    RMContext rmContext) {
  this.rmContext = rmContext;
  this.appSchedulingInfo = 
      new AppSchedulingInfo(applicationAttemptId, user, queue,  
          activeUsersManager);
  this.queue = queue;
}
 
开发者ID:ict-carch,项目名称:hadoop-plus,代码行数:10,代码来源:FSSchedulerApp.java


示例18: FiCaSchedulerApp

import org.apache.hadoop.yarn.server.resourcemanager.scheduler.ActiveUsersManager; //导入依赖的package包/类
public FiCaSchedulerApp(ApplicationAttemptId applicationAttemptId, 
    String user, Queue queue, ActiveUsersManager activeUsersManager,
    RMContext rmContext) {
  this.rmContext = rmContext;
  this.appSchedulingInfo = 
      new AppSchedulingInfo(applicationAttemptId, user, queue,  
          activeUsersManager);
  this.queue = queue;
}
 
开发者ID:ict-carch,项目名称:hadoop-plus,代码行数:10,代码来源:FiCaSchedulerApp.java


示例19: createQueue

import org.apache.hadoop.yarn.server.resourcemanager.scheduler.ActiveUsersManager; //导入依赖的package包/类
private AbstractCSQueue createQueue(String name, Queue parent, float capacity,
    float absCap) {
  CSQueueMetrics metrics = CSQueueMetrics.forQueue(name, parent, false, cs.getConf());
  QueueInfo queueInfo = QueueInfo.newInstance(name, capacity, 1.0f, 0, null,
      null, QueueState.RUNNING, null, "", null, false);
  ActiveUsersManager activeUsersManager = new ActiveUsersManager(metrics);
  AbstractCSQueue queue = mock(AbstractCSQueue.class);
  when(queue.getMetrics()).thenReturn(metrics);
  when(queue.getActiveUsersManager()).thenReturn(activeUsersManager);
  when(queue.getQueueInfo(false, false)).thenReturn(queueInfo);
  QueueCapacities qCaps = mock(QueueCapacities.class);
  when(qCaps.getAbsoluteCapacity((String)any())).thenReturn(absCap);
  when(queue.getQueueCapacities()).thenReturn(qCaps);
  return queue;
}
 
开发者ID:hopshadoop,项目名称:hops,代码行数:16,代码来源:TestLeafQueue.java


示例20: addApplication

import org.apache.hadoop.yarn.server.resourcemanager.scheduler.ActiveUsersManager; //导入依赖的package包/类
/**
 * Add a new application to the scheduler, with a given id, queue name, and
 * user. This will accept a new app even if the user or queue is above
 * configured limits, but the app will not be marked as runnable.
 */
protected synchronized void addApplication(
    ApplicationAttemptId applicationAttemptId, String queueName, String user) {
  RMApp rmApp = rmContext.getRMApps().get(
      applicationAttemptId.getApplicationId());
  FSLeafQueue queue = assignToQueue(rmApp, queueName, user);

  FSSchedulerApp schedulerApp =
      new FSSchedulerApp(applicationAttemptId, user,
          queue, new ActiveUsersManager(getRootQueueMetrics()),
          rmContext);

  // Enforce ACLs
  UserGroupInformation userUgi = UserGroupInformation.createRemoteUser(user);

  if (!queue.hasAccess(QueueACL.SUBMIT_APPLICATIONS, userUgi)
      && !queue.hasAccess(QueueACL.ADMINISTER_QUEUE, userUgi)) {
    String msg = "User " + userUgi.getUserName() +
  	        " cannot submit applications to queue " + queue.getName();
    LOG.info(msg);
    rmContext.getDispatcher().getEventHandler().handle(
  	        new RMAppAttemptRejectedEvent(applicationAttemptId, msg));
    return;
  }

  queue.addApp(schedulerApp);
  queue.getMetrics().submitApp(user, applicationAttemptId.getAttemptId());

  applications.put(applicationAttemptId, schedulerApp);

  LOG.info("Application Submission: " + applicationAttemptId +
      ", user: "+ user +
      ", currently active: " + applications.size());

  rmContext.getDispatcher().getEventHandler().handle(
      new RMAppAttemptEvent(applicationAttemptId,
          RMAppAttemptEventType.APP_ACCEPTED));
}
 
开发者ID:chendave,项目名称:hadoop-TCP,代码行数:43,代码来源:FairScheduler.java



注:本文中的org.apache.hadoop.yarn.server.resourcemanager.scheduler.ActiveUsersManager类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java RegisterNodeManagerResponseProtoOrBuilder类代码示例发布时间:2022-05-22
下一篇:
Java LogAggregationService类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap