private String getApplicationId(final ExecutableFlow exFlow, final String jobId, final int attempt) { String applicationId; boolean finished = false; int offset = 0; try { while (!finished) { final LogData data = getExecutionJobLog(exFlow, jobId, offset, 50000, attempt); if (data != null) { applicationId = findApplicationIdFromLog(data.getData()); if (applicationId != null) { return applicationId; } offset = data.getOffset() + data.getLength(); this.logger.info("Get application ID for execution " + exFlow.getExecutionId() + ", job" + " " + jobId + ", attempt " + attempt + ", data offset " + offset); } else { finished = true; } } } catch (final ExecutorManagerException e) { this.logger.error("Failed to get application ID for execution " + exFlow.getExecutionId() + ", job " + jobId + ", attempt " + attempt + ", data offset " + offset, e); } return null; }
private String getApplicationId(final ExecutableFlow exFlow, final String jobId, final int attempt) { String applicationId; boolean finished = false; int offset = 0; try { while (!finished) { final LogData data = getExecutionJobLog(exFlow, jobId, offset, 50000, attempt); if (data != null) { applicationId = findApplicationIdFromLog(data.getData()); if (applicationId != null) { return applicationId; } offset = data.getOffset() + data.getLength(); this.logger.info("Get application ID for execution " + exFlow.getExecutionId() + ", job" + " " + jobId + ", attempt " + attempt + ", data offset " + offset); } else { finished = true; } } } catch (final ExecutorManagerException e) { this.logger.error("Failed to get application ID for execution " + exFlow.getExecutionId() + ", job " + jobId + ", attempt " + attempt + ", data offset " + offset, e); } return null; }