在FileSystem.liststatus中过滤日志文件(_success和_log) [英] Filter log files(_success and _log) in FileSystem.liststatus
本文介绍了在FileSystem.liststatus中过滤日志文件(_success和_log)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
解决方案
如果您在 FileInputFormat )他们有一个私人的静态PathFilter忽略以下划线或句点开头的文件。作为私有的,你必须复制代码,或者如果你的输入文件总是以part开始(即你没有使用MultipleOutputs),那么你的答案已经足够了。
Hi while using FileSystem.listStatus method, I want to filter log files and list only the files which are not log files. How can I do it? Thanks
解决方案
If you look in the source for FileInputFormat(line 62) they have a private static PathFilter that ignores files that start with an underscore or period. As its private, you'll have to make a copy of the code, or you're answer is sufficient if your input files always start with part (i.e. you've not used MultipleOutputs)
这篇关于在FileSystem.liststatus中过滤日志文件(_success和_log)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文