Support Questions

Find answers, ask questions, and share your expertise

Getting –useHCatalog file doesnot exist when running a pig view. This is part of Horton works tutorial..

avatar
Expert Contributor
2016-02-19 02:29:21,118 [main] INFO  org.apache.pig.Main - Logging error messages to: /hadoop/yarn/local/usercache/admin/appcache/application_1455824286177_0003/container_e03_1455824286177_0003_01_000002/pig_1455848961114.log 
 2016-02-19 02:29:22,717 [main] ERROR org.apache.pig.Main - ERROR 2997: Encountered IOException. File –useHCatalog does not exist 
1 ACCEPTED SOLUTION
21 REPLIES 21

avatar
Expert Contributor

I tried running the command:

pig -x tez -useHCatalog Pigscript but there result is the same. It's saying :

2016-02-24 23:04:54,675 [main] ERROR org.apache.pig.Main - ERROR 2997: Encountered IOException. File –useHCatalog does not exist
Details at logfile: /hadoop/yarn/local/usercache/ppunj/appcache/application_1456334730705_0001/container_e05_1456334730705_0001_01_000002/pig_1456355093669.log
2016-02-24 23:04:54,722 [main] INFO  org.apache.pig.Main - Pig script completed in 1 second and 467 milliseconds (1467 ms)


avatar
Master Mentor

@Prakash Punj try the following

pig -x tez filename -useHCatalog

avatar
Master Mentor

avatar
Master Mentor

2380-screen-shot-2016-02-25-at-72543-am.pngSee this ..it worked in my env

avatar
Master Mentor

@Prakash Punj

pig -useHCatalog -x tez -f p.pig --> this works

avatar
Master Mentor

@Prakash Punj make sure you have the adapter in the node

[root@phdns01 ~]# find / -name hive-hcatalog-pig-adapter*.jar

/usr/hdp/2.3.4.0-3485/hive-hcatalog/share/hcatalog/hive-hcatalog-pig-adapter.jar

/usr/hdp/2.3.4.0-3485/hive-hcatalog/share/hcatalog/hive-hcatalog-pig-adapter-1.2.1.2.3.4.0-3485.jar

/usr/hdp/2.3.4.0-3485/oozie/share/lib/pig/hive-hcatalog-pig-adapter-1.2.1.2.3.4.0-3485.jar

[root@phdns01 ~]#

avatar
Expert Contributor
@Neeraj Sabharwal

@Artem Ervits

Same error after using the command below.

pig -x tez Pigscript.pig -useHCatalog;


2016-02-25 02:17:33,158 [main] INFO  org.apache.pig.Main - Logging error messages to: /hadoop/yarn/local/usercache/ppunj/appcache/application_1456334730705_0004/container_e05_1456334730705_0004_01_000002/pig_1456366653155.log 
 2016-02-25 02:17:34,257 [main] ERROR org.apache.pig.Main - ERROR 2997: Encountered IOException. File –useHCatalog does not exist 
 Details at logfile: /hadoop/yarn/local/usercache/ppunj/appcache/application_1456334730705_0004/container_e05_1456334730705_0004_01_000002/pig_1456366653155.log 

avatar
Master Mentor

@Prakash Punj Read my reply ..

avatar
Expert Contributor
@Neeraj Sabharwal

looks like adapter is there.

[root@hdp-m ~]# find / -name hive-hcatalog-pig-adapter*.jar
/usr/hdp/2.3.4.0-3485/hive-hcatalog/share/hcatalog/hive-hcatalog-pig-adapter-1.2.1.2.3.4.0-3485.jar
/usr/hdp/2.3.4.0-3485/hive-hcatalog/share/hcatalog/hive-hcatalog-pig-adapter.jar
/usr/hdp/2.3.4.0-3485/oozie/share/lib/pig/hive-hcatalog-pig-adapter-1.2.1.2.3.4.0-3485.jar
[root@hdp-m ~]#


avatar
Master Mentor

@Prakash Punj See my latest reply...You are giving HDFS location for your pig script...it needs to be local file system