Uploaded image for project: 'Hadoop YARN'
  1. Hadoop YARN
  2. YARN-4904 YARN Log tooling enhancements
  3. YARN-5251

Yarn CLI to obtain App logs for last 'n' bytes fails with 'java.io.IOException' and for 'n' bytes fails with NumberFormatException

    XMLWordPrintableJSON

    Details

    • Type: Sub-task
    • Status: Resolved
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.9.0, 3.0.0-alpha1
    • Component/s: None
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      yarn logs -applicationId application_1465421211793_0017 -size 1024 >> appLog1 on finished application
      2016-06-13 18:44:25,989 INFO [AsyncDispatcher event handler] org.apache.hadoop.mapreduce.v2.app.job.impl.TaskAttemptImpl: Adding #2 tokens and #1 secret keys for NM use for launching container
      2016-06-13 18:44:25,989 INFO [AsyncDispatcher event handler] org.apache.hadoop.mapreduce.v2.app.job.impl.TaskAttemptImpl: Size of containertok"
        at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
        at java.lang.Long.parseLong(Long.java:589)
        at java.lang.Long.parseLong(Long.java:631)
        at org.apache.hadoop.yarn.logaggregation.AggregatedLogFormat$LogReader.readContainerLogs(AggregatedLogFormat.java:691)
        at org.apache.hadoop.yarn.logaggregation.AggregatedLogFormat$LogReader.readAContainerLogsForALogType(AggregatedLogFormat.java:767)
        at org.apache.hadoop.yarn.logaggregation.LogCLIHelpers.dumpAllContainersLogs(LogCLIHelpers.java:354)
        at org.apache.hadoop.yarn.client.cli.LogsCLI.fetchApplicationLogs(LogsCLI.java:830)
        at org.apache.hadoop.yarn.client.cli.LogsCLI.run(LogsCLI.java:231)
        at org.apache.hadoop.yarn.client.cli.LogsCLI.main(LogsCLI.java:264)
      
      yarn logs -applicationId application_1465421211793_0004 -containerId container_e07_1465421211793_0004_01_000001 -logFiles syslog -size -1000
      Exception in thread "main" java.io.IOException: The bytes were skipped are different from the caller requested
      	at org.apache.hadoop.yarn.logaggregation.AggregatedLogFormat$LogReader.readContainerLogsForALogType(AggregatedLogFormat.java:838)
      	at org.apache.hadoop.yarn.logaggregation.LogCLIHelpers.dumpAContainerLogsForALogType(LogCLIHelpers.java:300)
      	at org.apache.hadoop.yarn.logaggregation.LogCLIHelpers.dumpAContainersLogsForALogTypeWithoutNodeId(LogCLIHelpers.java:224)
      	at org.apache.hadoop.yarn.client.cli.LogsCLI.printContainerLogsForFinishedApplicationWithoutNodeId(LogsCLI.java:447)
      	at org.apache.hadoop.yarn.client.cli.LogsCLI.fetchContainerLogs(LogsCLI.java:782)
      	at org.apache.hadoop.yarn.client.cli.LogsCLI.run(LogsCLI.java:228)
      	at org.apache.hadoop.yarn.client.cli.LogsCLI.main(LogsCLI.java:264)
      

        Attachments

        1. YARN-5251.1.patch
          12 kB
          Xuan Gong

          Issue Links

            Activity

              People

              • Assignee:
                xgong Xuan Gong
                Reporter:
                ssathish@hortonworks.com Sumana Sathish
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: