I have a problem in working with Pig environment. Could you please help me?



0

I'm using Ambari Pig View for excuting my pig script .I have placed emp.csv in HDFS at '/tmp/mydemo/emp.csv'.

Bellow is my simple query and when I try to execute it throwing an error. Could you please help as soon as possible.

a = LOAD '/tmp/mydemo/emp.csv' USING PigStorage(',') AS (eno:int, ena:chararray, salary:int);
DUMP a;

Error message

File does not exist: /user/admin/pig/jobs/0511a_06-11-2016-19-22-42/stdout at org.apache.hadoop.hdfs.server.namenode.INodeFile.valueOf(INodeFile.java:71) at org.apache.hadoop.hdfs.server.namenode.INodeFile.valueOf(INodeFile.java:61) at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.getBlockLocationsInt(FSNamesystem.java:1828) at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.getBlockLocations(FSNamesystem.java:1799) at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.getBlockLocations(FSNamesystem.java:1712) at org.apache.hadoop.hdfs.server.namenode.NameNodeRpcServer.getBlockLocations(NameNodeRpcServer.java:680) at org.apache.hadoop.hdfs.protocolPB.ClientNamenodeProtocolServerSideTranslatorPB.getBlockLocations(ClientNamenodeProtocolServerSideTranslatorPB.java:373) at org.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos$ClientNamenodeProtocol$2.callBlockingMethod(ClientNamenodeProtocolProtos.java) at org.apache.hadoop.ipc.ProtobufRpcEngine$Server$ProtoBufRpcInvoker.call(ProtobufRpcEngine.java:616) at org.apache.hadoop.ipc.RPC$Server.call(RPC.java:982) at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:2211) at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:2207) at java.security.AccessController.doPrivileged(Native Method) at javax.security.auth.Subject.doAs(Subject.java:422) at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1724) at org.apache.hadoop.ipc.Server$Handler.run(Server.java:2205)

 

Hi Abhijit,

I have cheked the path of the file.  It is there.

But still it is throwing the same error. 

Note : I ran the my script from CLI there it is working but not from Ambari's PigView.

Could you please help to resove the problem? thanks


1 Answer(s)


0

Hi Satya,

The pig was not able to find the location of the file at : /tmp/mydemo/emp.csv

Error: File does not exist: /user/admin/pig/jobs/0511a_06-11-2016-19-22-42/stdout

Note: /user/admin/pig/jobs...... is temporary path used by pig while running job.

You can use the the following lines to verify the path /tmp/mydemo/emp.csv

$ hadoop fs -ls /tmp/mydemo/emp.csv

Please enter the correct path and file name and try again. Your command is correct.

Hope this helps.

Thanks.

Note: Please vote-up if you like my answer.