[Solved] PIG Error: Input path does not exist: file:/etc/password

Apache PIG is an open-source high – level language for expressing data analysis platform for creating programs on top of the Hadoop cluster in the Big Data environment.




In this article, we will explain how to resolve the PIG script error in the Hadoop eco-system. Here is the full error log file in the below context for Hadoop developers on the large data scale.

Apache PIG Error:

file:/tmp/hadoop/mapred/staging/sreekanth_hadoop255399127/.staging/job_local255399127_0001
2020-04-29 02:34:41,748 [JobControl] INFO org.apache.hadoop.mapreduce.lib.jobcontrol.ControlledJob - PigLatin:DefaultJobName got an error while submitting
org.apache.pig.backend.executionengine.ExecException: ERROR 2118: Input path does not exist: file:/etc/password
at org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigInputFormat.getSplits(PigInputFormat.java:279)
at org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.MapReduceLauncher$1.run(MapReduceLauncher.java:276)
Caused by: org.apache.hadoop.mapreduce.lib.input.InvalidInputException: Input path does not exist: file:/etc/password
at org.apache.hadoop.mapreduce.lib.input.FileInputFormat.singleThreadedListStatus(FileInputFormat.java:321)
at org.apache.hadoop.mapreduce.lib.input.FileInputFormat.listStatus(FileInputFormat.java:264)
at org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigTextInputFormat.listStatus(PigTextInputFormat.java:36)
at org.apache.hadoop.mapreduce.lib.input.FileInputFormat.getSplits(FileInputFormat.java:385)
at org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigInputFormat.getSplits(PigInputFormat.java:265)
... 18 more
2020-04-29 02:34:41,955 [main] INFO org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.MapReduceLauncher - HadoopJobId: job_local255399127_0001
Failed!
job_local255399127_0001 A,B MAP_ONLY Message: org.apache.pig.backend.executionengine.ExecException: ERROR 2118: Input path does not exist: file:/etc/password
at org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigInputFormat.getSplits(PigInputFormat.java:279)
at org.apache.hadoop.mapreduce.JobSubmitter.writeNewSplits(JobSubmitter.java:597)
at org.apache.hadoop.mapreduce.JobSubmitter.writeSplits(JobSubmitter.java:614)
at org.apache.hadoop.mapreduce.JobSubmitter.submitJobInternal(JobSubmitter.java:492)
Caused by: org.apache.hadoop.mapreduce.lib.input.InvalidInputException: Input path does not exist: file:/etc/password
at org.apache.hadoop.mapreduce.lib.input.FileInputFormat.singleThreadedListStatus(FileInputFormat.java:321)
at org.apache.hadoop.mapreduce.lib.input.FileInputFormat.listStatus(FileInputFormat.java:264)
at org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigTextInputFormat.listStatus(PigTextInputFormat.java:36)
at org.apache.hadoop.mapreduce.lib.input.FileInputFormat.getSplits(FileInputFormat.java:385)
at org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigInputFormat.getSplits(PigInputFormat.java:265)
... 18 more
file:/tmp/temp-1245579249/tmp329105015,

Solution:





The above error belongs to the input path that does not exist file in the given path like /etc/password. Here we trying to load the file from /etc/password but in this path, there is no such file instead of that try below input path:

/etc/passwd

After that in case getting the same error trying to check the input path, which exactly instead defaults path.




Conclusion: In this error/issue is common for PIG developers in the Big Data environment. In Hadoop, cluster PIG is one of the open-source components for large data processing. Basically this error belongs to the input file/path. Here we provided a simple solution for this type of error. Once issue resolve then tries to open Grunt shell in the Pig prompt. This type of error getting only while developing PIG scripts for Hadoop developers in the large data sets in the Big Data environment.