in src/main/java/com/epam/grid/engine/provider/utils/slurm/host/ScontrolShowNodeParser.java [58:76]
public static SlurmHost mapHostDataToSlurmHost(final String hostData) {
try {
final Map<String, String> results = convertHostDataIntoMap(hostData);
return SlurmHost.builder()
.nodeName(results.get(NODE_NAME))
.arch(results.get(ARCHITECTURE))
.cpuTotal(Integer.valueOf(results.get(CPU_TOTAL)))
.sockets(Integer.valueOf(results.get(SOCKETS)))
.coresPerSocket(Integer.valueOf(results.get(CORES_PER_SOCKET)))
.threadsPerCore(Integer.valueOf(results.get(THREADS_PER_CORE)))
.realMemory(Long.valueOf(results.get(REAL_MEMORY)))
.allocatedMemory(Long.valueOf(results.get(ALLOCATED_MEMORY)))
.build();
} catch (final NumberFormatException e) {
throw new GridEngineException(HttpStatus.INTERNAL_SERVER_ERROR,
CANT_PARSE_STDOUT_TO_SLURM_HOST, e);
}
}