Uploaded image for project: 'Hadoop YARN'
  1. Hadoop YARN
  2. YARN-8279

AggregationLogDeletionService does not honor yarn.log-aggregation.IndexedFormat.remote-app-log-dir-suffix

VotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Workaround
    • 2.9.1
    • None
    • log-aggregation
    • None
    • Hide
      This issue affects only when IndexedFormat is used for log-aggregation by setting below properties:
      yarn.log-aggregation.file-formats=IndexedFormat
      yarn.log-aggregation.file-controller.IndexedFormat.class=org.apache.hadoop.yarn.logaggregation.filecontroller.ifile.LogAggregationIndexedFileController

      The fix is to set the below properties in yarn-site.xml and then restart Mapreduce HistoryServer and YARN services.
      yarn.log-aggregation.IndexedFormat.remote-app-log-dir-suffix and yarn.nodemanager.remote-app-log-dir-suffix to same value "logs-ifile" which serves AggregationLogDeletionService
      Show
      This issue affects only when IndexedFormat is used for log-aggregation by setting below properties: yarn.log-aggregation.file-formats=IndexedFormat yarn.log-aggregation.file-controller.IndexedFormat.class=org.apache.hadoop.yarn.logaggregation.filecontroller.ifile.LogAggregationIndexedFileController The fix is to set the below properties in yarn-site.xml and then restart Mapreduce HistoryServer and YARN services. yarn.log-aggregation.IndexedFormat.remote-app-log-dir-suffix and yarn.nodemanager.remote-app-log-dir-suffix to same value "logs-ifile" which serves AggregationLogDeletionService

    Description

      AggregationLogDeletionService does not honor yarn.log-aggregation.IndexedFormat.remote-app-log-dir-suffix. AggregationLogService writes the logs into /app-logs/<user-dir>/logs-ifile where as AggregationLogDeletion tries to delete from /app-logs/<user-dir>/logs.

      Workaround is to set yarn.log-aggregation.IndexedFormat.remote-app-log-dir-suffix and yarn.nodemanager.remote-app-log-dir-suffix to same value "logs-ifile" and Restart HistoryServer which serves AggregationLogDeletionService

      AggregationLogDeletionService has to check the format and based upon that choose the suffix. Currently it only checks the older suffix yarn.nodemanager.remote-app-log-dir-suffix.

      AggregatedLogDeletionService tries to delete older suffix directory.

      2018-05-11 08:48:19,989 ERROR logaggregation.AggregatedLogDeletionService (AggregatedLogDeletionService.java:logIOException(182)) - Could not read the contents of hdfs://prabhucluster:8020/app-logs/hive/logs
      java.io.FileNotFoundException: File hdfs://prabhucluster:8020/app-logs/hive/logs does not exist.
              at org.apache.hadoop.hdfs.DistributedFileSystem.listStatusInternal(DistributedFileSystem.java:923)
              at org.apache.hadoop.hdfs.DistributedFileSystem.access$600(DistributedFileSystem.java:114)
              at org.apache.hadoop.hdfs.DistributedFileSystem$22.doCall(DistributedFileSystem.java:985)
              at org.apache.hadoop.hdfs.DistributedFileSystem$22.doCall(DistributedFileSystem.java:981)
              at org.apache.hadoop.fs.FileSystemLinkResolver.resolve(FileSystemLinkResolver.java:81)
              at org.apache.hadoop.hdfs.DistributedFileSystem.listStatus(DistributedFileSystem.java:992)
              at org.apache.hadoop.yarn.logaggregation.AggregatedLogDeletionService$LogDeletionTask.deleteOldLogDirsFrom(AggregatedLogDeletionService.java:98)
              at org.apache.hadoop.yarn.logaggregation.AggregatedLogDeletionService$LogDeletionTask.run(AggregatedLogDeletionService.java:85)
              at java.util.TimerThread.mainLoop(Timer.java:555)
              at java.util.TimerThread.run(Timer.java:505)
      

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            tarunparimi Tarun Parimi
            prabhujoseph Prabhu Joseph
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment