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 in Big Data Hadoop by Paul
139 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 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 12 in Big Data Hadoop by Ponezhil Ramu
1,537 views
0 votes
1 answer

Error: input path does not exist

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

answered Apr 30 in Big Data Hadoop by Gitika
• 25,420 points
140 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
• 68,480 points
369 views
0 votes
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
• 10,800 points
3,573 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
• 10,800 points
453 views
+1 vote
11 answers

hadoop fs -put command?

put syntax: put <localSrc> <dest> copy syntax: copyFr ...READ MORE

answered Dec 7, 2018 in Big Data Hadoop by Aditya
18,415 views
0 votes
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,280 points
1,332 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 20, 2018 in Big Data Hadoop by Omkar
• 68,480 points
983 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 in Big Data Hadoop by Gitika
• 25,420 points

edited Aug 7 by Gitika 56 views