Search in sources :

Example 1 with FakeSchedulable

use of org.apache.hadoop.yarn.server.resourcemanager.scheduler.fair.FakeSchedulable in project hadoop by apache.

the class TestDominantResourceFairnessPolicy method createSchedulable.

private Schedulable createSchedulable(int memUsage, int cpuUsage, ResourceWeights weights, int minMemShare, int minCpuShare) {
    Resource usage = BuilderUtils.newResource(memUsage, cpuUsage);
    Resource minShare = BuilderUtils.newResource(minMemShare, minCpuShare);
    return new FakeSchedulable(minShare, Resources.createResource(Integer.MAX_VALUE, Integer.MAX_VALUE), weights, Resources.none(), usage, 0l);
}
Also used : Resource(org.apache.hadoop.yarn.api.records.Resource) FakeSchedulable(org.apache.hadoop.yarn.server.resourcemanager.scheduler.fair.FakeSchedulable)

Aggregations

Resource (org.apache.hadoop.yarn.api.records.Resource)1 FakeSchedulable (org.apache.hadoop.yarn.server.resourcemanager.scheduler.fair.FakeSchedulable)1