我想在python上阅读mapreduce中的orc文件。我试着运行它:
hadoop jar /usr/lib/hadoop/lib/hadoop-streaming-2.6.0.2.2.6.0-2800.jar
-file /hdfs/price/mymapper.py
-mapper '/usr/local/anaconda/bin/python mymapper.py'
-file /hdfs/price/myreducer.py
-reducer '/usr/local/anaconda/bin/python myreducer.py'
-input /user/hive/orcfiles/*
-libjars /usr/hdp/2.2.6.0-2800/hive/lib/hive-exec.jar
-inputformat org.apache.hadoop.hive.ql.io.orc.OrcInputFormat
-numReduceTasks 1
-output /user/hive/output
但我有个错误:
-inputformat : class not found : org.apache.hadoop.hive.ql.io.orc.OrcInputFormat
我发现了一个类似的问题或者newinputformat作为hadoop流的inputformat,但答案并不清楚
请给我举个例子,如何在hadoop流媒体中正确读取orc文件。
1条答案
按热度按时间xmd2e60i1#
下面是我使用orc分区配置单元表作为输入的示例之一:
在这里
/apps/hive/warehouse/asv.db/rtd_430304_fnl2
是配置单元表后台orc数据存储位置的路径。其余我需要提供适当的罐流以及Hive。