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)