Log aggregation service could have unnecessary NN operations in the following scenarios:
- No new local log has been created since the last upload for the long running service scenario.
- NM uses ContainerLogAggregationPolicy that skips log aggregation for certain containers.
In the following code snippet, even though pendingContainerInThisCycle is empty, it still creates the writer and then removes the file later. Thus it introduces unnecessary create/getfileinfo/delete NN calls when NM doesn't aggregate logs for an app.