我使用PIG將表數據存儲到使用HCatalog的配置單元數據庫中。我能夠加載和轉儲數據在PIG咕嚕外殼,但是當我試圖將存儲加載的數據到我創建爲myweather.weathertable1(myweather-database名稱,weathertable1 -table name1)使用以下命令嘗試使用HCatStorer將數據存儲到Hive數據庫時遇到問題()
STORE A INTO 'myweather.weathertable1' USING org.apache.hcatalog.pig.HCatStorer();
我遇到了以下錯誤:
2015-07-11 20:20:09,056 [main] ERROR org.apache.pig.tools.grunt.Grunt - ERROR 1070: Could not resolve org.apache.hcatalog.pig.HCatStorer using imports: [, java.lang., org.apache.pig.builtin., org.apache.pig.impl.builtin.]
Details at logfile: /X/Y/pig_1436660283762.log
和日誌文件說:
ERROR 1070: Could not resolve org.apache.hcatalog.pig.HCatStorer using imports: [, java.lang., org.apache.pig.builtin., org.apache.pig.impl.builtin.]
Failed to parse: Pig script failed to parse:
<line 4, column 45> pig script failed to validate: org.apache.pig.backend.executionengine.ExecException: ERROR 1070: Could not resolve org.apache.hcatalog.pig.HCatStorer using imports: [, java.lang., org.apache.pig.builtin., org.apache.pig.impl.builtin.]
at org.apache.pig.parser.QueryParserDriver.parse(QueryParserDriver.java:196)
at org.apache.pig.PigServer$Graph.validateQuery(PigServer.java:1660)
at org.apache.pig.PigServer$Graph.registerQuery(PigServer.java:1633)
at org.apache.pig.PigServer.registerQuery(PigServer.java:587)
at org.apache.pig.tools.grunt.GruntParser.processPig(GruntParser.java:1093)
at org.apache.pig.tools.pigscript.parser.PigScriptParser.parse(PigScriptParser.java:501)
at org.apache.pig.tools.grunt.GruntParser.parseStopOnError(GruntParser.java:198)
at org.apache.pig.tools.grunt.GruntParser.parseStopOnError(GruntParser.java:173)
at org.apache.pig.tools.grunt.Grunt.run(Grunt.java:69)
at org.apache.pig.Main.run(Main.java:541)
at org.apache.pig.Main.main(Main.java:156)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.apache.hadoop.util.RunJar.run(RunJar.java:221)
at org.apache.hadoop.util.RunJar.main(RunJar.java:136)
固定上述問題的任何幫助,可能是非常可觀的。 在此先感謝。
可能出現[在運行HCatalog時發生錯誤]的副本(http://stackoverflow.com/questions/31295980/getting-an-error-on-running-hcatalog) –