Package org.apache.hadoop.yarn.server.resourcemanager.resource

Examples of org.apache.hadoop.yarn.server.resourcemanager.resource.ResourceWeights


      return info.queueMaxAppsDefault;
    }
  }
 
  public ResourceWeights getQueueWeight(String queue) {
    ResourceWeights weight = info.queueWeights.get(queue);
    if (weight != null) {
      return weight;
    } else {
      return ResourceWeights.NEUTRAL;
    }
View Full Code Here


      weight *= app.getPriority().getPriority();
      if (weightAdjuster != null) {
        // Run weight through the user-supplied weightAdjuster
        weight = weightAdjuster.adjustWeight(app, weight);
      }
      return new ResourceWeights((float)weight);
    }
  }
View Full Code Here

        int val = Integer.parseInt(text);
        queueMaxApps.put(queueName, val);
      } else if ("weight".equals(field.getTagName())) {
        String text = ((Text)field.getFirstChild()).getData().trim();
        double val = Double.parseDouble(text);
        queueWeights.put(queueName, new ResourceWeights((float)val));
      } else if ("minSharePreemptionTimeout".equals(field.getTagName())) {
        String text = ((Text)field.getFirstChild()).getData().trim();
        long val = Long.parseLong(text) * 1000L;
        minSharePreemptionTimeouts.put(queueName, val);
      } else if ("schedulingPolicy".equals(field.getTagName())
View Full Code Here

      return info.queueMaxAppsDefault;
    }
  }
 
  public ResourceWeights getQueueWeight(String queue) {
    ResourceWeights weight = info.queueWeights.get(queue);
    if (weight != null) {
      return weight;
    } else {
      return ResourceWeights.NEUTRAL;
    }
View Full Code Here

    weight *= app.getPriority().getPriority();
    if (weightAdjuster != null) {
      // Run weight through the user-supplied weightAdjuster
      weight = weightAdjuster.adjustWeight(app, weight);
    }
    return new ResourceWeights((float)weight);
  }
View Full Code Here

  public long getFairSharePreemptionTimeout() {
    return fairSharePreemptionTimeout;
  }
 
  public ResourceWeights getQueueWeight(String queue) {
    ResourceWeights weight = queueWeights.get(queue);
    return (weight == null) ? ResourceWeights.NEUTRAL : weight;
  }
View Full Code Here

  public long getFairSharePreemptionTimeout() {
    return fairSharePreemptionTimeout;
  }
 
  public ResourceWeights getQueueWeight(String queue) {
    ResourceWeights weight = queueWeights.get(queue);
    return (weight == null) ? ResourceWeights.NEUTRAL : weight;
  }
View Full Code Here

    weight *= app.getPriority().getPriority();
    if (weightAdjuster != null) {
      // Run weight through the user-supplied weightAdjuster
      weight = weightAdjuster.adjustWeight(app, weight);
    }
    return new ResourceWeights((float)weight);
  }
View Full Code Here

  }
 
  public FakeSchedulable(int minShare, int maxShare, double weight, int fairShare, int usage,
      long startTime) {
    this(Resources.createResource(minShare, 0), Resources.createResource(maxShare, 0),
        new ResourceWeights((float)weight), Resources.createResource(fairShare, 0),
        Resources.createResource(usage, 0), startTime);
  }
View Full Code Here

  }
 
  @Test
  public void testEvenWeightsSameDominantResource() {
    assertTrue(createComparator(8000, 8).compare(
        createSchedulable(3000, 1, new ResourceWeights(2.0f)),
        createSchedulable(2000, 1)) < 0);
    assertTrue(createComparator(8000, 8).compare(
        createSchedulable(1000, 3, new ResourceWeights(2.0f)),
        createSchedulable(1000, 2)) < 0);
  }
View Full Code Here

TOP

Related Classes of org.apache.hadoop.yarn.server.resourcemanager.resource.ResourceWeights

Copyright © 2018 www.massapicom. 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.