java.io.IOException: Not a valid BCFile

北城以北 提交于 2019-12-12 02:44:49

问题


when i run "yarn logs -applicationId application_1438080928000_6932", appear this exception:

Exception in thread "main" java.io.IOException: Not a valid BCFile.
    at org.apache.hadoop.io.file.tfile.BCFile$Magic.readAndVerify(BCFile.java:927)
    at org.apache.hadoop.io.file.tfile.BCFile$Reader.<init>(BCFile.java:628)
    at org.apache.hadoop.io.file.tfile.TFile$Reader.<init>(TFile.java:804)
    at org.apache.hadoop.yarn.logaggregation.AggregatedLogFormat$LogReader.<init>(AggregatedLogFormat.java:358)
    at org.apache.hadoop.yarn.logaggregation.LogCLIHelpers.dumpAllContainersLogs(LogCLIHelpers.java:122)
    at org.apache.hadoop.yarn.client.cli.LogsCLI.run(LogsCLI.java:137)
    at org.apache.hadoop.yarn.client.cli.LogsCLI.main(LogsCLI.java:199)

can anyone give some help?


回答1:


I get this error if I try to read the logs directly after killing the job. I would say give it a min at tops then attempt to read the logs again.




回答2:


In HDP environment if anybody gets this error this while parsing the container logs manually using some TFile reader, this answer might help...

In HDP, yarn.log-aggregation.file-formats's default value is IndexedFormat,TFile
So it will aggregate the logs in indexed file format only in /app-logs/<user>/logs-ifile

Remove the IndexedFile value for the yarn.log-aggregation.file-formats property. Only give TFile format. The logs will get aggregated in /app-logs/<user>/logs



来源:https://stackoverflow.com/questions/34247528/java-io-ioexception-not-a-valid-bcfile

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!