Looks like we are adding/removing LOGAGGREGATION_STATUS_PREFIX between java obj and proto obj. I think this is not necessary? Am I missing something here?
We need that. Because the status, such as FINISHED, FAILED, RUNNING has been used by other enum which defines in the proto file. If we do not add the prefix, it will pop up the compile exception.
Looks like we only set LogAggregationStatus to FINISHED or RUNNING here even it is failed to move temp log to HDFS. It doesn't seems correct to me. We should add a FAILED state for LogAggregationStatus to address this case?
Added. I though about this problem. Right now, it is very hard to define the Log aggregation status: FAILED very clearly. Think about for long running apps, it will upload logs several times. In which condition, we should say the log aggregation is failed ?
Right now, the approach I am using is that we will say the log aggregation is failed when at least one of the logs does not aggregate successfully (Rename the tmp file failed).
Also, I added a description table in logaggregationstatus page to explain what the log aggregation status means.