System.out.println("\tJobManager memory = "+jmMemory);
System.out.println("\tTaskManager memory = "+tmMemory);
System.out.println("\tTaskManager cores = "+tmCores);
// Create application via yarnClient
YarnClientApplication app = yarnClient.createApplication();
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);