Package org.springframework.yarn.am.allocate

Examples of org.springframework.yarn.am.allocate.DefaultContainerAllocator$ContainerAllocationValues


        launcher.setEnvironment(environment);
        launcher.setResourceLocalizer(resourceLocalizer);
        abstractServicesAppmaster.setLauncher(postProcess(launcher));

        if (containerAllocator == null) {
          containerAllocator = new DefaultContainerAllocator();
        }
        if (containerAllocator instanceof AbstractAllocator) {
          ((AbstractAllocator)containerAllocator).setConfiguration(configuration);
          ((AbstractAllocator)containerAllocator).setEnvironment(environment);
        }
View Full Code Here


  private final List<DefaultMasterContainerAllocatorCollectionConfigurer> collectionConfigurers =
      new ArrayList<DefaultMasterContainerAllocatorCollectionConfigurer>();

  @Override
  public void configure(YarnAppmasterBuilder builder) throws Exception {
    DefaultContainerAllocator allocator = new DefaultContainerAllocator();
    if (priority != null) {
      allocator.setPriority(priority);
    }
    if (virtualCores != null) {
      allocator.setVirtualcores(virtualCores);
    }
    if (memory != null) {
      allocator.setMemory(ParsingUtils.parseBytesAsMegs(memory));
    }
    allocator.setLocality(locality);

    for (DefaultMasterContainerAllocatorCollectionConfigurer configurer : collectionConfigurers) {
      allocator.setAllocationValues(configurer.id, configurer.priority, configurer.virtualCores,
          StringUtils.hasText(configurer.memory) ? ParsingUtils.parseBytesAsMegs(configurer.memory) : null,
          configurer.locality);
    }

    builder.setContainerAllocator(allocator);
View Full Code Here

TOP

Related Classes of org.springframework.yarn.am.allocate.DefaultContainerAllocator$ContainerAllocationValues

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.