2014-02-12 147 views
0

我試圖用PIG腳本讀取蜂巢表,但是當我運行豬代碼來讀取蜂巢表讀出蜂巢表它給我以下錯誤:使用豬腳本

2014-02-12 15:48:36,143 [main] WARN org.apache.hadoop.hive.conf.HiveConf 
    -hive-site.xml not found on CLASSPATH 2014-02-12 15:49:10,781 [main] ERROR 
    org.apache.pig.tools.grunt.Grunt - ERROR 2997: Unable to recreate 
    exception from backed error: Error: Found class 
    org.apache.hadoop.mapreduce.TaskAttemptContext, but interface was expected 

(忽略換行和空白增加了可讀性)

的Hadoop版本1.1.1

蜂巢版本 0.9.0

豬版 0.10.0

Pig code 
    a = LOAD '/user/hive/warehouse/test' USING 
    org.apache.pig.piggybank.storage.HiveColumnarLoader('name string'); 

它是由於一些版本不匹配?

+0

請您分享完整的跟蹤?另請參閱HCatalog。 – Tariq

+0

看看這個http://stackoverflow.com/questions/5741120/running-pig-query-over-data-stored-in-hive –

回答

0

爲什麼不能使用hcatalog訪問豬中的配置單元元數據?
檢查this舉例