Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

pig under hue

Highlighted

pig under hue

Hi All,

 

A simple pig script runs fine from command line with

pig -x mapreduce myscript.pig

but fails in Hue:

=============

medicare = LOAD 'my.medicare' USING org.apache.hive.hcatalog.pig.HCatLoader();

dump medicare;

=============

The complain in the Hue logs seems to suggest that pig in Hue does not know about hcatalog:

=============

Run pig script using PigRunner.run() for Pig version 0.8+
2017-03-17 12:59:15,427 [main] INFO  org.apache.pig.Main  - Apache Pig version 0.12.0-cdh5.10.0 (rUnversioned directory) compiled Jan 20 2017, 12:03:06
2017-03-17 12:59:15,427 [main] INFO  org.apache.pig.Main  - Logging error messages to: job_1489507188575_0122.log" target="_blank">/data/11/yarn/nm/usercache/ivy2/appcache/application_14895\
07188575_0122/container_e02_1489507188575_0122_01_000002/pig-job_1489507188575_0122.log
2017-03-17 12:59:15,467 [main] INFO  org.apache.pig.impl.util.Utils  - Default bootup file /var/lib/hadoop-yarn/.pigbootup not found
2017-03-17 12:59:15,552 [main] INFO  org.apache.hadoop.conf.Configuration.deprecation  - mapred.job.tracker is deprecated. Instead, use mapreduce.jobtracker.address
2017-03-17 12:59:15,552 [main] INFO  org.apache.hadoop.conf.Configuration.deprecation  - fs.default.name is deprecated. Instead, use fs.defaultFS
2017-03-17 12:59:15,553 [main] INFO  org.apache.pig.backend.hadoop.executionengine.HExecutionEngine  - Connecting to hadoop file system at: hdfs://nameservice1
2017-03-17 12:59:15,556 [main] INFO  org.apache.pig.backend.hadoop.executionengine.HExecutionEngine  - Connecting to map-reduce job tracker at: yarnRM
2017-03-17 12:59:15,557 [main] WARN  org.apache.pig.PigServer  - Empty string specified for jar path
2017-03-17 12:59:15,995 [main] ERROR org.apache.pig.PigServer  - exception during parsing: Error during parsing. Pig script failed to parse:
<file script.pig, line 1, column 11> pig script failed to validate: java.lang.RuntimeException: could not instantiate 'org.apache.hive.hcatalog.pig.HCatLoader' with arguments 'null'
Failed to parse: Pig script failed to parse:
...

=============

I opened the case with Cloudera and their suggestion was 

=============

hdfs dfs -put /opt/cloudera/parcels/CDH/lib/hive/conf/hive-site.xml /user/oozie/share/lib/lib_20170210151916/hcatalog/

 

oozie admin -sharelibupdate -oozie http://localhost:11000/oozie

 

stop hue, restart oozie, start hue

 

=============

I did all that as oozie user (had to change /bin/false to /bin/bash in /etc/passwd), checked that hive-site.xml  really got copied into hdfs but it did not help.

 

Any ideas?

 

Thank you,

Igor

 

 

Don't have an account?
Coming from Hortonworks? Activate your account here