private void sendLogAggregationReportInternal( LogAggregationStatus logAggregationStatus, String diagnosticMessage) { LogAggregationReport report = Records.newRecord(LogAggregationReport.class); report.setApplicationId(appId); report.setDiagnosticMessage(diagnosticMessage); report.setLogAggregationStatus(logAggregationStatus); this.context.getLogAggregationStatusForApps().add(report); }
@Override public Map<NodeId, LogAggregationReport> getLogAggregationReportsForApp() { try { this.readLock.lock(); if (!isLogAggregationFinished() && isAppInFinalState(this) && systemClock.getTime() > this.logAggregationStartTime + this.logAggregationStatusTimeout) { for (Entry<NodeId, LogAggregationReport> output : logAggregationStatus.entrySet()) { if (!output.getValue().getLogAggregationStatus() .equals(LogAggregationStatus.TIME_OUT) && !output.getValue().getLogAggregationStatus() .equals(LogAggregationStatus.SUCCEEDED) && !output.getValue().getLogAggregationStatus() .equals(LogAggregationStatus.FAILED)) { output.getValue().setLogAggregationStatus( LogAggregationStatus.TIME_OUT); } } } return Collections.unmodifiableMap(logAggregationStatus); } finally { this.readLock.unlock(); } }
private void sendLogAggregationReportInternal( LogAggregationStatus logAggregationStatus, String diagnosticMessage, boolean finalized) { LogAggregationReport report = Records.newRecord(LogAggregationReport.class); report.setApplicationId(appId); report.setDiagnosticMessage(diagnosticMessage); report.setLogAggregationStatus(logAggregationStatus); this.context.getLogAggregationStatusForApps().add(report); this.context.getNMLogAggregationStatusTracker().updateLogAggregationStatus( appId, logAggregationStatus, System.currentTimeMillis(), diagnosticMessage, finalized); }
@Public @Unstable public static LogAggregationReport newInstance(ApplicationId appId, LogAggregationStatus status, String diagnosticMessage) { LogAggregationReport report = Records.newRecord(LogAggregationReport.class); report.setApplicationId(appId); report.setLogAggregationStatus(status); report.setDiagnosticMessage(diagnosticMessage); return report; }
report.setLogAggregationStatus( LogAggregationStatus.RUNNING_WITH_FAILURE); curReport.setLogAggregationStatus(report .getLogAggregationStatus());