YARN-7795. Fix jenkins issues of YARN-6592 branch. (Sunil G via asuresh)

This commit is contained in:
Arun Suresh 2018-01-24 14:18:32 -08:00
parent 644afe5fd8
commit c23980c4f2
18 changed files with 35 additions and 35 deletions

View File

@ -229,8 +229,8 @@ public abstract class AllocateRequest {
/**
* Set the list of Scheduling requests to inform the
* <code>ResourceManager</code> about the application's resource requirements
* (potentially including allocation tags & placement constraints).
* @param schedulingRequests list of <code>SchedulingRequest</code> to update
* (potentially including allocation tags and placement constraints).
* @param schedulingRequests list of {@link SchedulingRequest} to update
* the <code>ResourceManager</code> about the application's resource
* requirements.
*/

View File

@ -341,6 +341,9 @@ public class PlacementConstraint {
* {@link TargetOperator} used.
*/
public static class TargetConstraint extends AbstractConstraint {
/**
* TargetOperator enum helps to specify type.
*/
enum TargetOperator {
IN, NOT_IN
}

View File

@ -20,12 +20,9 @@ package org.apache.hadoop.yarn.api.resource;
import java.util.concurrent.TimeUnit;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.hadoop.classification.InterfaceAudience;
import org.apache.hadoop.classification.InterfaceAudience.Public;
import org.apache.hadoop.classification.InterfaceStability.Unstable;
import org.apache.hadoop.yarn.api.records.ApplicationId;
import org.apache.hadoop.yarn.api.resource.PlacementConstraint.AbstractConstraint;
import org.apache.hadoop.yarn.api.resource.PlacementConstraint.And;
import org.apache.hadoop.yarn.api.resource.PlacementConstraint.DelayedOr;

View File

@ -26,6 +26,9 @@ import org.apache.hadoop.yarn.proto.YarnProtos.ResourceProto;
import org.apache.hadoop.yarn.proto.YarnProtos.ResourceSizingProto;
import org.apache.hadoop.yarn.proto.YarnProtos.ResourceSizingProtoOrBuilder;
/**
* Proto Implementation for {@link ResourceSizing} interface.
*/
@Private
@Unstable
public class ResourceSizingPBImpl extends ResourceSizing {

View File

@ -37,6 +37,9 @@ import org.apache.hadoop.yarn.proto.YarnProtos.ResourceSizingProto;
import org.apache.hadoop.yarn.proto.YarnProtos.SchedulingRequestProto;
import org.apache.hadoop.yarn.proto.YarnProtos.SchedulingRequestProtoOrBuilder;
/**
* Proto implementation for {@link SchedulingRequest} interface.
*/
@Private
@Unstable
public class SchedulingRequestPBImpl extends SchedulingRequest {

View File

@ -53,7 +53,6 @@ import org.apache.hadoop.yarn.api.records.Priority;
import org.apache.hadoop.yarn.api.records.Resource;
import org.apache.hadoop.yarn.api.records.ResourceOption;
import org.apache.hadoop.yarn.api.records.ResourceRequest;
import org.apache.hadoop.yarn.api.records.ResourceSizing;
import org.apache.hadoop.yarn.api.records.SchedulingRequest;
import org.apache.hadoop.yarn.api.records.UpdateContainerError;
import org.apache.hadoop.yarn.api.records.UpdateContainerRequest;

View File

@ -51,7 +51,6 @@ import org.apache.hadoop.yarn.server.resourcemanager.scheduler.common.Applicatio
import org.apache.hadoop.yarn.server.resourcemanager.scheduler.common.ContainerRequest;
import org.apache.hadoop.yarn.server.resourcemanager.scheduler.common.PendingAsk;
import org.apache.hadoop.yarn.server.resourcemanager.scheduler.placement.AppPlacementAllocator;
import org.apache.hadoop.yarn.server.resourcemanager.scheduler.placement.LocalityAppPlacementAllocator;
import org.apache.hadoop.yarn.server.resourcemanager.scheduler.placement.PendingAskUpdateResult;
import org.apache.hadoop.yarn.server.resourcemanager.scheduler.placement.SingleConstraintAppPlacementAllocator;
import org.apache.hadoop.yarn.server.scheduler.SchedulerRequestKey;
@ -739,7 +738,7 @@ public class AppSchedulingInfo {
/**
* Pre-check node to see if it satisfy the given schedulerKey and
* scheduler mode
* scheduler mode.
*
* @param schedulerKey schedulerKey
* @param schedulerNode schedulerNode

View File

@ -471,8 +471,12 @@ public abstract class SchedulerNode {
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (!(o instanceof SchedulerNode)) return false;
if (this == o) {
return true;
}
if (!(o instanceof SchedulerNode)) {
return false;
}
SchedulerNode that = (SchedulerNode) o;

View File

@ -63,7 +63,6 @@ import org.apache.hadoop.yarn.api.records.ResourceRequest;
import org.apache.hadoop.yarn.api.records.ResourceSizing;
import org.apache.hadoop.yarn.api.records.SchedulingRequest;
import org.apache.hadoop.yarn.conf.YarnConfiguration;
import org.apache.hadoop.yarn.exceptions.InvalidResourceRequestException;
import org.apache.hadoop.yarn.exceptions.SchedulerInvalidResoureRequestException;
import org.apache.hadoop.yarn.exceptions.YarnException;
import org.apache.hadoop.yarn.exceptions.YarnRuntimeException;
@ -1062,7 +1061,7 @@ public class CapacityScheduler extends
}
/**
* Normalize a list of SchedulingRequest
* Normalize a list of SchedulingRequest.
*
* @param asks scheduling request
*/

View File

@ -66,7 +66,7 @@ public class AllocationTagsManager {
private TypeToCountedTags<String> globalRackMapping = new TypeToCountedTags();
/**
* Generic store mapping type <T> to counted tags.
* Generic store mapping type T to counted tags.
* Currently used both for NodeId to Tag, Count and Rack to Tag, Count
*/
@VisibleForTesting
@ -467,7 +467,8 @@ public class AllocationTagsManager {
* specified, all tags (of the node/app) will be
* considered.
* @param op operator. Such as Long::max, Long::sum, etc. Required.
* This parameter only take effect when #values >= 2.
* This parameter only take effect when #values greater
* than 2.
* @return cardinality of specified query on the node.
* @throws InvalidAllocationTagsQueryException when illegal query
* parameter specified
@ -515,7 +516,8 @@ public class AllocationTagsManager {
* specified, all tags (of the rack/app) will be
* considered.
* @param op operator. Such as Long::max, Long::sum, etc. Required.
* This parameter only take effect when #values >= 2.
* This parameter only take effect when #values
* greater than 2.
* @return cardinality of specified query on the rack.
* @throws InvalidAllocationTagsQueryException when illegal query
* parameter specified

View File

@ -179,7 +179,7 @@ public final class PlacementConstraintsUtil {
* first validates the constraint specified in the request; if not specified,
* then it validates application level constraint if exists; otherwise, it
* validates the global constraint if exists.
* <p/>
*
* This method only checks whether a scheduling request can be placed
* on a node with respect to the certain placement constraint. It gives no
* guarantee that asked allocations can be eventually allocated because

View File

@ -57,7 +57,7 @@ public abstract class AppPlacementAllocator<N extends SchedulerNode> {
protected RMContext rmContext;
/**
* Get iterator of preferred node depends on requirement and/or availability
* Get iterator of preferred node depends on requirement and/or availability.
* @param candidateNodeSet input CandidateNodeSet
* @return iterator of preferred node
*/
@ -180,7 +180,7 @@ public abstract class AppPlacementAllocator<N extends SchedulerNode> {
public abstract void showRequests();
/**
* Initialize this allocator, this will be called by Factory automatically
* Initialize this allocator, this will be called by Factory automatically.
*
* @param appSchedulingInfo appSchedulingInfo
* @param schedulerRequestKey schedulerRequestKey

View File

@ -23,7 +23,6 @@ import org.apache.commons.collections.IteratorUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.hadoop.util.StringUtils;
import org.apache.hadoop.yarn.api.records.ApplicationId;
import org.apache.hadoop.yarn.api.records.ExecutionType;
import org.apache.hadoop.yarn.api.records.ResourceRequest;
import org.apache.hadoop.yarn.api.records.ResourceSizing;

View File

@ -37,7 +37,6 @@ import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.BrokenBarrierException;
import java.util.concurrent.CyclicBarrier;

View File

@ -26,7 +26,6 @@ import org.apache.hadoop.yarn.api.records.Priority;
import org.apache.hadoop.yarn.api.records.Resource;
import org.apache.hadoop.yarn.api.records.ResourceRequest;
import org.apache.hadoop.yarn.api.records.ResourceSizing;
import org.apache.hadoop.yarn.api.resource.PlacementConstraints;
import org.apache.hadoop.yarn.conf.YarnConfiguration;
import org.apache.hadoop.yarn.server.resourcemanager.MockAM;
import org.apache.hadoop.yarn.server.resourcemanager.MockNM;
@ -41,6 +40,9 @@ import org.junit.Test;
import java.util.Arrays;
/**
* Test class for verifying Scheduling requests in CS.
*/
public class TestCapacitySchedulerSchedulingRequestUpdate
extends CapacitySchedulerTestBase {
@Test

View File

@ -20,27 +20,19 @@ package org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity;
import com.google.common.collect.ImmutableSet;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.yarn.api.records.ApplicationAttemptId;
import org.apache.hadoop.yarn.api.records.Priority;
import org.apache.hadoop.yarn.api.records.Resource;
import org.apache.hadoop.yarn.api.records.ResourceSizing;
import org.apache.hadoop.yarn.api.resource.PlacementConstraints;
import org.apache.hadoop.yarn.conf.YarnConfiguration;
import org.apache.hadoop.yarn.server.resourcemanager.MockAM;
import org.apache.hadoop.yarn.server.resourcemanager.MockNM;
import org.apache.hadoop.yarn.server.resourcemanager.MockRM;
import org.apache.hadoop.yarn.server.resourcemanager.ResourceManager;
import org.apache.hadoop.yarn.server.resourcemanager.nodelabels.NullRMNodeLabelsManager;
import org.apache.hadoop.yarn.server.resourcemanager.nodelabels.RMNodeLabelsManager;
import org.apache.hadoop.yarn.server.resourcemanager.rmapp.RMApp;
import org.apache.hadoop.yarn.server.resourcemanager.rmapp.attempt.RMAppAttemptState;
import org.apache.hadoop.yarn.server.resourcemanager.rmcontainer.RMContainer;
import org.apache.hadoop.yarn.server.resourcemanager.rmnode.RMNode;
import org.apache.hadoop.yarn.server.resourcemanager.scheduler.ResourceScheduler;
import org.apache.hadoop.yarn.server.resourcemanager.scheduler.SchedulerAppReport;
import org.apache.hadoop.yarn.server.resourcemanager.scheduler.YarnScheduler;
import org.apache.hadoop.yarn.server.resourcemanager.scheduler.common.fica.FiCaSchedulerApp;
import org.apache.hadoop.yarn.server.resourcemanager.scheduler.event.AppAttemptRemovedSchedulerEvent;
import org.apache.hadoop.yarn.server.resourcemanager.scheduler.event.NodeUpdateSchedulerEvent;
import org.junit.Assert;
import org.junit.Before;

View File

@ -23,7 +23,6 @@ import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.yarn.api.records.Priority;
import org.apache.hadoop.yarn.api.records.Resource;
import org.apache.hadoop.yarn.api.records.ResourceSizing;
import org.apache.hadoop.yarn.api.resource.PlacementConstraints;
import org.apache.hadoop.yarn.conf.YarnConfiguration;
import org.apache.hadoop.yarn.server.resourcemanager.MockAM;
import org.apache.hadoop.yarn.server.resourcemanager.MockNM;