Tabnine Logo
CapacityReservationSystem
Code IndexAdd Tabnine to your IDE (free)

How to use
CapacityReservationSystem
in
org.apache.hadoop.yarn.server.resourcemanager.reservation

Best Java code snippets using org.apache.hadoop.yarn.server.resourcemanager.reservation.CapacityReservationSystem (Showing top 6 results out of 315)

origin: com.github.jiayuhan-it/hadoop-yarn-server-resourcemanager

@Override
protected Resource getPlanQueueCapacity(String planQueueName) {
 Resource minAllocation = getMinAllocation();
 ResourceCalculator rescCalc = getResourceCalculator();
 CSQueue planQueue = capScheduler.getQueue(planQueueName);
 return rescCalc.multiplyAndNormalizeDown(capScheduler.getClusterResource(),
   planQueue.getAbsoluteCapacity(), minAllocation);
}
origin: ch.cern.hadoop/hadoop-yarn-server-resourcemanager

  new CapacityReservationSystem();
CapacitySchedulerConfiguration conf = capScheduler.getConfiguration();
RMContext mockContext = capScheduler.getRMContext();
reservationSystem.setRMContext(mockContext);
try {
 reservationSystem.reinitialize(capScheduler.getConfiguration(),
   mockContext);
} catch (YarnException e) {
Assert.assertNull(reservationSystem.getPlan(newQ));
testUtil.updateQueueConfiguration(conf, newQ);
try {
 reservationSystem.reinitialize(conf, mockContext);
} catch (YarnException e) {
 Assert.fail(e.getMessage());
origin: ch.cern.hadoop/hadoop-yarn-server-resourcemanager

@Test
public void testInitialize() {
 ReservationSystemTestUtil testUtil = new ReservationSystemTestUtil();
 CapacityScheduler capScheduler = null;
 try {
  capScheduler = testUtil.mockCapacityScheduler(10);
 } catch (IOException e) {
  Assert.fail(e.getMessage());
 }
 CapacityReservationSystem reservationSystem =
   new CapacityReservationSystem();
 reservationSystem.setRMContext(capScheduler.getRMContext());
 try {
  reservationSystem.reinitialize(capScheduler.getConf(),
    capScheduler.getRMContext());
 } catch (YarnException e) {
  Assert.fail(e.getMessage());
 }
 String planQName = testUtil.getreservationQueueName();
 ReservationSystemTestUtil.validateReservationQueue(reservationSystem,
   planQName);
}
origin: org.apache.hadoop/hadoop-yarn-server-resourcemanager

public AbstractReservationSystem configureReservationSystem() {
 switch (getSchedulerType()) {
 case CAPACITY:
  return new CapacityReservationSystem();
 case FAIR:
  return new FairReservationSystem();
 }
 return null;
}
origin: org.apache.hadoop/hadoop-yarn-server-resourcemanager

@Override
protected Resource getPlanQueueCapacity(String planQueueName) {
 Resource minAllocation = getMinAllocation();
 ResourceCalculator rescCalc = getResourceCalculator();
 CSQueue planQueue = capScheduler.getQueue(planQueueName);
 return rescCalc.multiplyAndNormalizeDown(capScheduler.getClusterResource(),
   planQueue.getAbsoluteCapacity(), minAllocation);
}
origin: ch.cern.hadoop/hadoop-yarn-server-resourcemanager

@Override
protected Resource getPlanQueueCapacity(String planQueueName) {
 Resource minAllocation = getMinAllocation();
 ResourceCalculator rescCalc = getResourceCalculator();
 CSQueue planQueue = capScheduler.getQueue(planQueueName);
 return rescCalc.multiplyAndNormalizeDown(capScheduler.getClusterResource(),
   planQueue.getAbsoluteCapacity(), minAllocation);
}
org.apache.hadoop.yarn.server.resourcemanager.reservationCapacityReservationSystem

Javadoc

This is the implementation of ReservationSystem based on the CapacityScheduler

Most used methods

  • getMinAllocation
  • getResourceCalculator
  • <init>
  • getPlan
  • reinitialize
  • setRMContext

Popular in Java

  • Parsing JSON documents to java classes using gson
  • compareTo (BigDecimal)
  • requestLocationUpdates (LocationManager)
  • setScale (BigDecimal)
  • ConnectException (java.net)
    A ConnectException is thrown if a connection cannot be established to a remote host on a specific po
  • SocketException (java.net)
    This SocketException may be thrown during socket creation or setting options, and is the superclass
  • URL (java.net)
    A Uniform Resource Locator that identifies the location of an Internet resource as specified by RFC
  • Stack (java.util)
    Stack is a Last-In/First-Out(LIFO) data structure which represents a stack of objects. It enables u
  • Response (javax.ws.rs.core)
    Defines the contract between a returned instance and the runtime when an application needs to provid
  • LogFactory (org.apache.commons.logging)
    Factory for creating Log instances, with discovery and configuration features similar to that employ
  • Best IntelliJ plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now