GetNewApplicationResponse appResponse = app.getNewApplicationResponse();
Resource maxRes = appResponse.getMaximumResourceCapability();
if(tmMemory > maxRes.getMemory() || tmCores > maxRes.getVirtualCores()) {
LOG.fatal("The cluster does not have the requested resources for the TaskManagers available!\n"
+ "Maximum Memory: "+maxRes.getMemory() +", Maximum Cores: "+tmCores);
yarnClient.stop();
System.exit(1);
}
if(jmMemory > maxRes.getMemory() ) {
LOG.fatal("The cluster does not have the requested resources for the JobManager available!\n"
+ "Maximum Memory: "+maxRes.getMemory());