processReturnedStatus(heartBeat, componentStatus);
}
List<CommandReport> reports = heartBeat.getReports();
if (reports != null && !reports.isEmpty()) {
CommandReport report = reports.get(0);
Map<String, String> ports = report.getAllocatedPorts();
if (ports != null && !ports.isEmpty()) {
for (Map.Entry<String, String> port : ports.entrySet()) {
log.info("Recording allocated port for {} as {}", port.getKey(), port.getValue());
this.allocatedPorts.put(port.getKey(), port.getValue());
}
}
CommandResult result = CommandResult.getCommandResult(report.getStatus());
Command command = Command.getCommand(report.getRoleCommand());
componentStatus.applyCommandResult(result, command);
log.info("Component operation. Status: {}", result);
if (command == Command.INSTALL && report.getFolders() != null && report.getFolders().size() > 0) {
processFolderPaths(report.getFolders(), containerId, heartBeat.getFqdn());
}
}
int waitForCount = accessor.getInstanceDefinitionSnapshot().
getAppConfOperations().getComponentOptInt(roleName, AgentKeys.WAIT_HEARTBEAT, 0);