Examples of Priority


Examples of org.apache.hadoop.yarn.api.records.Priority

        appId, 1);
    ContainerId containerId = BuilderUtils.newContainerId(appAttemptId, 1);
    ContainerAllocationExpirer expirer = mock(ContainerAllocationExpirer.class);

    Resource resource = BuilderUtils.newResource(512, 1);
    Priority priority = BuilderUtils.newPriority(5);

    Container container = BuilderUtils.newContainer(containerId, nodeId,
        "host:3465", resource, priority, null);

    RMApplicationHistoryWriter writer = mock(RMApplicationHistoryWriter.class);
View Full Code Here

Examples of org.apache.hadoop.yarn.api.records.Priority

        appId, 1);
    ContainerId containerId = BuilderUtils.newContainerId(appAttemptId, 1);
    ContainerAllocationExpirer expirer = mock(ContainerAllocationExpirer.class);

    Resource resource = BuilderUtils.newResource(512, 1);
    Priority priority = BuilderUtils.newPriority(5);

    Container container = BuilderUtils.newContainer(containerId, nodeId,
        "host:3465", resource, priority, null);

    RMApplicationHistoryWriter writer = mock(RMApplicationHistoryWriter.class);
View Full Code Here

Examples of org.apache.hadoop.yarn.api.records.Priority

   
    RecordFactory recordFactory =
        RecordFactoryProvider.getRecordFactory(null);
    RMContext rmContext = TestUtils.getMockRMContext();

    Priority priority_1 = TestUtils.createMockPriority(1);

    // Submit first application with some resource-requests from user_0,
    // and check headroom
    final ApplicationAttemptId appAttemptId_0_0 =
        TestUtils.getMockApplicationAttemptId(0, 0);
View Full Code Here

Examples of org.apache.hadoop.yarn.api.records.Priority

    } else {
      hosts = null;
      relaxLocality = true;
      locationSpecified = false;
    }
    Priority pri = ContainerPriority.createPriority(roleId,
                                                    locationSpecified);
    AMRMClient.ContainerRequest request =
      new AMRMClient.ContainerRequest(resource,
                                      hosts,
                                      null,
View Full Code Here

Examples of org.apache.hadoop.yarn.api.records.Priority

  }


  public static Priority createPriority(int role,
                                        boolean locationSpecified) {
    Priority pri = Records.newRecord(Priority.class);
    pri.setPriority(ContainerPriority.buildPriority(role,
                                                    locationSpecified));
    return pri;
  }
View Full Code Here

Examples of org.apache.hadoop.yarn.api.records.Priority

   * Map from a container to a role key by way of its priority
   * @param container container
   * @return role key
   */
  public static int extractRole(Container container) {
    Priority priority = container.getPriority();
    assert priority != null;
    return extractRole(priority.getPriority());
  }
View Full Code Here

Examples of org.apache.hadoop.yarn.api.records.Priority

  @Override
  public Priority getPriority() {
    // Right now per-app priorities are not passed to scheduler,
    // so everyone has the same priority.
    Priority p = recordFactory.newRecordInstance(Priority.class);
    p.setPriority(1);
    return p;
  }
View Full Code Here

Examples of org.apache.hadoop.yarn.api.records.Priority

  private Resource assignContainer(FSSchedulerNode node, boolean reserved) {
    LOG.info("Node offered to app: " + getName() + " reserved: " + reserved);

    if (reserved) {
      RMContainer rmContainer = node.getReservedContainer();
      Priority priority = rmContainer.getReservedPriority();

      // Make sure the application still needs requests at this priority
      if (app.getTotalRequiredResources(priority) == 0) {
        unreserve(priority, node);
        return Resources.none();
View Full Code Here

Examples of org.apache.hadoop.yarn.api.records.Priority

      List<String> blacklistAdditions, List<String> blacklistRemovals) {
    QueueMetrics metrics = queue.getMetrics();
   
    // Update resource requests
    for (ResourceRequest request : requests) {
      Priority priority = request.getPriority();
      String resourceName = request.getResourceName();
      boolean updatePendingResources = false;
      ResourceRequest lastRequest = null;

      if (resourceName.equals(ResourceRequest.ANY)) {
View Full Code Here

Examples of org.apache.hadoop.yarn.api.records.Priority

  private synchronized CSAssignment
  assignReservedContainer(FiCaSchedulerApp application,
      FiCaSchedulerNode node, RMContainer rmContainer, Resource clusterResource) {
    // Do we still need this reservation?
    Priority priority = rmContainer.getReservedPriority();
    if (application.getTotalRequiredResources(priority) == 0) {
      // Release
      return new CSAssignment(application, rmContainer);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.