You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-user@hadoop.apache.org by Jander <44...@163.com> on 2010/06/10 10:20:41 UTC
Help:how to read a xml file in hadoop framework
Dear all,
I need to read a xml file in my application. When i run it as an application in eclipse, it runs correct, but when I run it on Hadoop, it gives the error message:
10/06/10 15:52:52 INFO input.FileInputFormat: Total input paths to process : 22
10/06/10 15:52:53 INFO mapred.JobClient: Running job: job_201006101455_0010
10/06/10 15:52:54 INFO mapred.JobClient: map 0% reduce 0%
10/06/10 15:53:07 INFO mapred.JobClient: Task Id : attempt_201006101455_0010_m_000000_0, Status : FAILED
java.lang.NullPointerException
at WordCountMapper.map(WordCountMapper.java:61)
at WordCountMapper.map(WordCountMapper.java:1)
at org.apache.hadoop.mapreduce.Mapper.run(Mapper.java:144)
at org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:621)
at org.apache.hadoop.mapred.MapTask.run(MapTask.java:305)
at org.apache.hadoop.mapred.Child.main(Child.java:170)
attempt_201006101455_0010_m_000000_0: java.io.FileNotFoundException: /tmp/hadoop-hadoop/mapred/local/taskTracker/jobcache/job_201006101455_0010/attempt_201006101455_0010_m_000000_0/work/readme.xml (No such file or directory)
attempt_201006101455_0010_m_000000_0: at java.io.FileInputStream.open(Native Method)
attempt_201006101455_0010_m_000000_0: at java.io.FileInputStream.<init>(FileInputStream.java:106)
.................
From the error message, We can see the xml file can't be found.
Hope you can help me, thanks.
Best regards
Jander
Re: Help:how to read a xml file in hadoop framework
Posted by Amogh Vasekar <am...@yahoo-inc.com>.
Hi,
Pasting what your command line options / distributed cache usage looks like should fetch you some answers :)
Amogh
On 6/10/10 1:50 PM, "Jander" <44...@163.com> wrote:
Dear all,
I need to read a xml file in my application. When i run it as an application in eclipse, it runs correct, but when I run it on Hadoop, it gives the error message:
10/06/10 15:52:52 INFO input.FileInputFormat: Total input paths to process : 22
10/06/10 15:52:53 INFO mapred.JobClient: Running job: job_201006101455_0010
10/06/10 15:52:54 INFO mapred.JobClient: map 0% reduce 0%
10/06/10 15:53:07 INFO mapred.JobClient: Task Id : attempt_201006101455_0010_m_000000_0, Status : FAILED
java.lang.NullPointerException
at WordCountMapper.map(WordCountMapper.java:61)
at WordCountMapper.map(WordCountMapper.java:1)
at org.apache.hadoop.mapreduce.Mapper.run(Mapper.java:144)
at org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:621)
at org.apache.hadoop.mapred.MapTask.run(MapTask.java:305)
at org.apache.hadoop.mapred.Child.main(Child.java:170)
attempt_201006101455_0010_m_000000_0: java.io.FileNotFoundException: /tmp/hadoop-hadoop/mapred/local/taskTracker/jobcache/job_201006101455_0010/attempt_201006101455_0010_m_000000_0/work/readme.xml (No such file or directory)
attempt_201006101455_0010_m_000000_0: at java.io.FileInputStream.open(Native Method)
attempt_201006101455_0010_m_000000_0: at java.io.FileInputStream.<init>(FileInputStream.java:106)
.................
>From the error message, We can see the xml file can't be found.
Hope you can help me, thanks.
Best regards
Jander