Reputation: 11
Hi I just setup the Hortonworks Sandbox on VirtualBox on Windows 7. I got everything up and running and started the pig tutorial. I want to run this simple table load pig script:
-- Get all IBM stocks
a = LOAD 'default.nyse_stocks' USING org.apache.hive.hcatalog.pig.HCatLoader();
b = filter a by stock_symbol == 'IBM';
dump b;
I get this error:
Failed to parse: Pig script failed to parse:
<file script.pig, line 2, column 37> pig script failed to validate: org.apache.pig.backend.executionengine.ExecException: ERROR 1070: Could not resolve org.apache.hive.hcatalog.pig.HCatLoader using imports: [, java.lang., org.apache.pig.builtin., org.apache.pig.impl.builtin.]
Not sure want to do. Fairly new to Hadoop. Thanks
Upvotes: 1
Views: 1807
Reputation: 222
If anyone runs into this problem, like me, after working through the Hortonworks HDP 2.4 tutorials, the answer is:
1. Open the script in the Pig view in Ambari
2. Below the query editor, there are 'Arguments'
3. Choose +Add, then type in -useHCatalog
Upvotes: 2
Reputation: 1
The use of 'Arguments' (answer by beeks) works, by need to be careful with the case: -useHCatalog, not -useHcatalog.
Upvotes: 0
Reputation: 1132
copy the jar file name hcatalog*.jar to the path “<%HADOOP_HOME>\bin\share\hcatalog"
Upvotes: 0