public void configure(YarnAppmasterConfigurer master) throws Exception {
master
.appmasterClass(syap.getAppmasterClass() != null ? syap.getAppmasterClass() : appmasterClass)
.containerCommands(createContainerCommands(syalcp));
MasterContainerAllocatorConfigurer containerAllocatorConfigurer = master.withContainerAllocator();
containerAllocatorConfigurer
.locality(syalcp.isLocality())
.memory(syarp.getMemory())
.priority(syarp.getPriority())
.virtualCores(syarp.getVirtualCores());
if (syap.getContainercluster() != null && syap.getContainercluster().getClusters() != null) {
for (java.util.Map.Entry<String, ContainerClustersProperties> entry : syap.getContainercluster().getClusters().entrySet()) {
SpringYarnAppmasterResourceProperties resource = entry.getValue().getResource();
SpringYarnAppmasterLaunchContextProperties launchcontext = entry.getValue().getLaunchcontext();
master
.containerCommands(entry.getKey(), createContainerCommands(launchcontext));
containerAllocatorConfigurer
.withCollection(entry.getKey())
.priority(resource != null ? resource.getPriority() : null)
.memory(resource != null ? resource.getMemory() : null)
.virtualCores(resource != null ? resource.getVirtualCores() : null)
.locality(launchcontext != null ? launchcontext.isLocality() : false);