我从map reduce程序获得了输出文件(存储在HDFS上)。现在我正在尝试使用PIG 0.7.0加载该文件。
我收到了以下错误。我试过将这个文件复制到本地机器并在本地模式下运行猪,这很好。但我想跳过这一步,让它从map reduce模式开始工作。
我试过的选项:
LOAD 'file://log/part-00000',
LOAD '/log/part-00000',
LOAD 'hdfs:/log/part-00000',
LOAD 'hdfs://localhost:50070/log/part-00000',
hadoop dfs -ls /log/
Warning: $HADOOP_HOME is deprecated.
Found 3 items
-rw-r--r-- 3 supergroup 0 2014-02-07 07:56 /log/_SUCCESS
drwxr-xr-x - supergroup 0 2014-02-07 07:55 /log/_logs
-rw-r--r-- 3 supergroup 10021 2014-02-07 07:56 /log/part-00000
pig(以mapreduce模式运行)
grunt> REC = LOAD 'file://log/part-00000' as (CREATE_TMSTP:chararray, MESSAGE_TYPE:chararray, MESSAGE_FROM:chararray, MESSAGE_TEXT:chararray);
grunt> DUMP REC;
Backend error message during job submission
-------------------------------------------
org.apache.pig.backend.executionengine.ExecException: ERROR 2118: Unable to create input splits for: file:///log/part-00000
at org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigInputFormat.getSplits(PigInputFormat.java:269)
at org.apache.hadoop.mapred.JobClient.writeNewSplits(JobClient.java:885)
at org.apache.hadoop.mapred.JobClient.submitJobInternal(JobClient.java:779)
at org.apache.hadoop.mapred.JobClient.submitJob(JobClient.java:730)
at org.apache.hadoop.mapred.jobcontrol.Job.submit(Job.java:378)
at org.apache.hadoop.mapred.jobcontrol.JobControl.startReadyJobs(JobControl.java:247)
at org.apache.hadoop.mapred.jobcontrol.JobControl.run(JobControl.java:279)
at java.lang.Thread.run(Thread.java:695)
Caused by: org.apache.hadoop.mapreduce.lib.input.InvalidInputException: Input path does not exist: file:/log/part-00000
at org.apache.hadoop.mapreduce.lib.input.FileInputFormat.listStatus(FileInputFormat.java:224)
at org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigTextInputFormat.listStatus(PigTextInputFormat.java:36)
at org.apache.hadoop.mapreduce.lib.input.FileInputFormat.getSplits(FileInputFormat.java:241)
at org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigInputFormat.getSplits(PigInputFormat.java:258)
... 7 more
ERROR 2997: Unable to recreate exception from backend error:org.apache.pig.backend.executionengine.ExecException: ERROR 2118: Unable to create input splits for: file:///log/part-00000
org.apache.pig.impl.logicalLayer.FrontendException: ERROR 1066: Unable to open iterator for alias REC
at org.apache.pig.PigServer.openIterator(PigServer.java:521)
at org.apache.pig.tools.grunt.GruntParser.processDump(GruntParser.java:544)
at org.apache.pig.tools.pigscript.parser.PigScriptParser.parse(PigScriptParser.java:241)
at org.apache.pig.tools.grunt.GruntParser.parseStopOnError(GruntParser.java:162)
at org.apache.pig.tools.grunt.GruntParser.parseStopOnError(GruntParser.java:138)
at org.apache.pig.tools.grunt.Grunt.run(Grunt.java:75)
at org.apache.pig.Main.main(Main.java:357)
Caused by: org.apache.pig.backend.executionengine.ExecException: ERROR 2997: Unable to recreate exception from backend error: org.apache.pig.backend.executionengine.ExecException: ERROR 2118: Unable to create input splits for: file:///log/part-00000
at org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.Launcher.getStats(Launcher.java:169)
at org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.MapReduceLauncher.launchPig(MapReduceLauncher.java:268)
at org.apache.pig.backend.hadoop.executionengine.HExecutionEngine.execute(HExecutionEngine.java:308)
at org.apache.pig.PigServer.executeCompiledLogicalPlan(PigServer.java:835)
at org.apache.pig.PigServer.store(PigServer.java:569)
at org.apache.pig.PigServer.openIterator(PigServer.java:504)
答案 0 :(得分:1)
您应该尝试升级到更新版本的Pig。 0.7.0已经有几年了。 0.12.0是当前的稳定版本。