PIG LOAD command error



0
While running the pig commands. I am getting this error

GROUP_BY,COMBINER Message: org.apache.pig.backend.executionengine.ExecException: ERROR 2118: Input path does not exist: hdfs://localhost.localdomain:8020/user/cloudera/NASDAQ_daily_prices_A_sample.csv

It might have been a error that the input file is not a part of the HDFS file system. i try to move the file from local folder to HDFS and get this error now.

[cloudera@localhost Module6]$ hadoop fs -copyFromLocal NASDAQ_daily_prices_A_sample.csv /dezyre
copyFromLocal: Permission denied: user=cloudera, access=WRITE, inode="/":hdfs:supergroup:drwxr-xr-x

How do we solve this? Please help.

2 Answer(s)


0

hi Ajay,

Looking at the error , PIg was not able to find the CSV file in the specified path, please check the path and retry.

Also check the hdfs path where you are trying to copy the file as it errors out "PErmission denied"

In your command below, the complete path for CSV has to be provided and also the exact path of hdfs .

hadoop fs -copyFromLocal NASDAQ_daily_prices_A_sample.csv /dezyre

Thanks

0

Hi Ajay,

Please give the path as below for copyFromLocal command

hadoop fs -copyFromLocal NASDAQ_daily_prices_A_sample.csv dezyre

Note: /dezyre is a root folder to which the access is denied. So, you should pass as dezyre instead of /dezyre.

I would suggest to create a folder specific to your assignment. So, create a folder as

hadoop fs -mkdir dezyre/Assignment1/inputs

Now copy the file from local to this path as below

hadoop fs -copyFromLocal NASDAQ_daily_prices_A_sample.csv dezyre/Assignment1/inputs

Hope this helps.

Thanks,
Sravan