How to see contents of Hive orc files in linux

2019-03-18 16:23发布

Is there a way to see the contents of an orc file that hive 0.11 and above use. I usually cat gz files and decompress them to see the contents eg: cat part-0000.gz | pigz -d | more Note: pigz is a parallel gz program.

I would like to know if there is something similar to this for orc files.

2条回答
时光不老,我们不散
2楼-- · 2019-03-18 17:03

There is now also a native executable for Linux and MacOS that prints the contents of the orc file in JSON. See the ORC project (http://orc.apache.org/) and build the C++ tools.

% orc-contents examples/TestOrcFile.test1.orc

There is also a native metadata tool:

% orc-metadata ../examples/TestOrcFile.test1.orc

The ORC project also has a standalone uber jar that can do the same from Java.

% java -jar orc-tools-1.2.3-uber.jar data myfile.orc
查看更多
该账号已被封号
3楼-- · 2019-03-18 17:08

The ORC file dump utility comes with hive (0.11 or higher):

hive --orcfiledump <hdfs-location-of-orc-file>

Source link

查看更多
登录 后发表回答