YARN-2747. Fixed the test failure of TestAggregatedLogFormat when native I/O is enabled. Contributed by Xuan Gong.

(cherry picked from commit ec63a3ffbd9413e7434594682fdbbd36eef7413c)