本文转自我的原创blog: http://www.javali.org/document/mapreduce_read_orcfile_solution.html
The Optimized Row Columnar (ORC) file format provides a highly efficient way to store Hive data. It was designed to overcome limitations of the other Hive file formats. Using ORC files improves performance when Hive is reading, writing, and processing data.Compared with RCFile format, for example, ORC file format has many advantages
如官方文档所述, 在Hive里读、写操作文件能克服其他文件格式的弊端,但是到目前为止OrcFile还不对外提供读写的API,如果需要在MR读取就无能为力了。https://issues.ap

本文介绍了如何在MapReduce中读取OrcFile格式的数据,讨论了OrcFile相对于其他Hive文件格式的优势,并提供了通过Hive源码实现读取的方案,包括解析OrcFile结构、使用OrcInputFormat和OrcNewInputFormat。
最低0.47元/天 解锁文章
979

被折叠的 条评论
为什么被折叠?



