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.

How to run pig script in tez mode from command line

Highlighted

How to run pig script in tez mode from command line

Contributor

I have a pig script stored in HDFS that i need to run from the local filesystem.

I'm trying this but it doesn't work: pig -exectype tez -file /path/to/script/script.pig

It returns an error saying the script does not exist.

Since I am executing in Tez mode, i would assume that it looks in HDFS for the script and not the local filesystem.

6 REPLIES 6
Highlighted

Re: How to run pig script in tez mode from command line

@Josh Persinger

Try pig –x tez script.pig

Highlighted

Re: How to run pig script in tez mode from command line

Contributor

Just tried that and it's still saying ERROR 2997: Encountered IOException. File script.pig does not exist

Highlighted

Re: How to run pig script in tez mode from command line

pig –x tez /path/to/script/script.pig

Highlighted

Re: How to run pig script in tez mode from command line

Contributor

So as I expected, it is searching the local filesystem and not HDFS. I recreated the HDFS path on the local filesystem and dropped the script in there, and it ran it.

How can I get pig to search HDFS for the script to execute?

Highlighted

Re: How to run pig script in tez mode from command line

Highlighted

Re: How to run pig script in tez mode from command line

No, it looks for your Pig script on your local file system. It looks on HDFS when your run Oozie Pig action.

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