我的输入文件如下。我试图转储相关的加载数据。我正在使用猪0.12。
a,t1,1000,100
a,t1,2000,200
b,t2,1000,200
b,t2,5000,100
我输入pig
进入HDFS模式myinput = LOAD 'file' AS(a1:chararray,a2:chararray,amt:int,rate:int);
如果我转储myinput,则会显示以下错误。
描述,说明工作正常..
所以
dump myinput ;
一旦我输入dump命令,我就会收到以下错误信息。
ERROR org.apache.hadoop.ipc.RPC - FailoverProxy: Failing this Call: submitJob for error (RemoteException): org.apache.hadoop.ipc.RemoteException: org.apache.hadoop.security.AccessControlException: User 'myid' cannot perform operation SUBMIT_JOB on queue default.
Please run "hadoop queue -showacls" command to find the queues you have access to .
at org.apache.hadoop.mapred.ACLsManager.checkAccess(ACLsManager.java:179)
at org.apache.hadoop.mapred.ACLsManager.checkAccess(ACLsManager.java:136)
at org.apache.hadoop.mapred.ACLsManager.checkAccess(ACLsManager.java:113)
at org.apache.hadoop.mapred.JobTracker.submitJob(JobTracker.java:4541)
at sun.reflect.GeneratedMethodAccessor20.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.hadoop.ipc.RPC$Server.call(RPC.java:993)
at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:1326)
at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:1322)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:396)
at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1127)
at org.apache.hadoop.ipc.Server$Handler.run(Server.java:1320)
ERROR org.apache.pig.tools.grunt.Grunt - ERROR 1066: Unable to open iterator for alias myinput
这是访问问题吗?特权问题? 有人可以帮助我
答案 0 :(得分:1)
如果您没有提及任何load functions like PigStorage('\t')
,则默认情况下它会将列分隔符作为标签(\ t)读取数据。
在您的数据中,列分隔符为逗号(,)
所以试试这个,
myinput = LOAD 'file' using PigStorage(',') AS(a1:chararray,a2:chararray,amt:int,rate:int);
希望它能够发挥作用..
答案 1 :(得分:0)
你可以用逗号来描述输入数据(分隔符): 试试这个代码:
myinput = LOAD 'file' USING PigStorage(',') AS (a1:chararray,a2:chararray,amt:int,rate:int);