ERROR 2997 Encountered IOException Directory does not exist

0 votes

Hi. I am not able the run the following pig command:

input1 = LOAD '/mnt/home/edureka_526237/mydirectory/file1.txt' AS(line:Chararray);
Words = FOREACH input1 GENERATE FLATTEN(TOKENIZE(line,' ')) AS word; 
Grouped = GROUP Words BY word; 
wordcount = FOREACH Grouped GENERATE group, COUNT(Words); 

The error is as follows:

Pig Stack Trace
---------------
ERROR 2997: Encountered IOException. Directory /mnt/home/edureka_526237/mydirectory does not exist.
java.io.IOException: Directory /mnt/home/edureka_526237/mydirectory does not exist.
at org.apache.pig.tools.grunt.GruntParser.processCD(GruntParser.java:731)
at org.apache.pig.tools.pigscript.parser.PigScriptParser.parse(PigScriptParser.java:318)
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:547)
at org.apache.pig.Main.main(Main.java:158)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.hadoop.util.RunJar.run(RunJar.java:221)
at org.apache.hadoop.util.RunJar.main(RunJar.java:136)
May 23, 2019 in Big Data Hadoop by Paul
2,365 views

1 answer to this question.

0 votes

Hi. I think the reason for this is that you are specifying a local path in pig console but you have not started pig in local mode. Run pig in  local mode and then run your commands, it should work.

$ pig -x local
answered May 23, 2019 by Britney

Related Questions In Big Data Hadoop

0 votes
2 answers

Hadoop error: Input path does not exist

I was able to fix the issue. ...READ MORE

answered Jan 13, 2019 in Big Data Hadoop by Ponezhil Ramu
14,297 views
0 votes
1 answer

Error: input path does not exist

Hey, This error looks like your job History ...READ MORE

answered Apr 30, 2019 in Big Data Hadoop by Gitika
• 65,770 points
3,302 views
0 votes
1 answer

Hadoop Spark: __spark_lib.zip does not exist

To find this file, your HADOOP_CONF_DIR env ...READ MORE

answered Nov 15, 2018 in Big Data Hadoop by Omkar
• 69,220 points
2,734 views
+1 vote
1 answer

Hadoop Mapreduce word count Program

Firstly you need to understand the concept ...READ MORE

answered Mar 16, 2018 in Data Analytics by nitinrawat895
• 11,380 points
11,011 views
0 votes
1 answer

hadoop.mapred vs hadoop.mapreduce?

org.apache.hadoop.mapred is the Old API  org.apache.hadoop.mapreduce is the ...READ MORE

answered Mar 16, 2018 in Data Analytics by nitinrawat895
• 11,380 points
2,524 views
+2 votes
11 answers

hadoop fs -put command?

Hi, You can create one directory in HDFS ...READ MORE

answered Mar 16, 2018 in Big Data Hadoop by nitinrawat895
• 11,380 points
108,714 views
–1 vote
1 answer

Hadoop dfs -ls command?

In your case there is no difference ...READ MORE

answered Mar 16, 2018 in Big Data Hadoop by kurt_cobain
• 9,350 points
4,604 views
0 votes
1 answer

Hadoop Java: org.apache.hadoop.conf.Configuration does not exist error

To solve this error, add hadoop-common to ...READ MORE

answered Nov 21, 2018 in Big Data Hadoop by Omkar
• 69,220 points
7,532 views
0 votes
1 answer

Error: Hive show tables does not display table "sqooptest" , which was imported by SQOOP

Hi, You can follow the below-given solution. Just enter ...READ MORE

answered Aug 7, 2019 in Big Data Hadoop by Gitika
• 65,770 points

edited Aug 7, 2019 by Gitika 1,415 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP