1

I'm running a MapReduce task against Wikipedia dump with history using XmlInputFormat for parsing the XML. "xxx_m_000053_0" always stop at 70% before it's kill due to time out.

in the console:

xxx_m_000053_0 failed to report status for 300 seconds. Killing!

I increase the timeout to 2 hours. It didn't work.


In xxx_m_000053_0 log file:

Processing split: hdfs://localhost:8020/user/martin/history/history.xml:3556769792+67108864

I was expecting something wrong in history.xml in offset [3556769792,3623878656]. I split the file from this offset and run it in hadoop. It worked... (???)

In xxx_m_000053_0 log file:

java.io.IOException: Filesystem closed
    at org.apache.hadoop.hdfs.DFSClient.checkOpen(DFSClient.java:323)
    at org.apache.hadoop.hdfs.DFSClient.access$1200(DFSClient.java:78)
    at org.apache.hadoop.hdfs.DFSClient$DFSInputStream.close(DFSClient.java:2326)
    at java.io.FilterInputStream.close(FilterInputStream.java:155)
    **at com.doduck.wikilink.history.XmlInputFormat$XmlRecordReader.close(XmlInputFormat.java:109)**
    at org.apache.hadoop.mapred.MapTask$NewTrackingRecordReader.close(MapTask.java:496)
    at org.apache.hadoop.mapred.MapTask.closeQuietly(MapTask.java:1776)
    at org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:778)
    at org.apache.hadoop.mapred.MapTask.run(MapTask.java:364)
    at org.apache.hadoop.mapred.Child$4.run(Child.java:255)
    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:1190)
    at org.apache.hadoop.mapred.Child.main(Child.java:249)
2013-09-17 13:13:32,248 INFO org.apache.hadoop.mapred.MapTask: Starting flush of map output
2013-09-17 13:13:32,248 INFO org.apache.hadoop.mapred.MapTask: Ignoring exception during close for org.apache.hadoop.mapred.MapTask$NewOutputCollector@54e9a7c2
org.apache.hadoop.util.DiskChecker$DiskErrorException: Could not find any valid local directory for output/file.out
    at org.apache.hadoop.fs.LocalDirAllocator$AllocatorPerContext.getLocalPathForWrite(LocalDirAllocator.java:381)
    at org.apache.hadoop.fs.LocalDirAllocator.getLocalPathForWrite(LocalDirAllocator.java:146)
    at org.apache.hadoop.fs.LocalDirAllocator.getLocalPathForWrite(LocalDirAllocator.java:127)
    at org.apache.hadoop.mapred.MapOutputFile.getOutputFileForWrite(MapOutputFile.java:69)
    at org.apache.hadoop.mapred.MapTask$MapOutputBuffer.mergeParts(MapTask.java:1645)
    at org.apache.hadoop.mapred.MapTask$MapOutputBuffer.flush(MapTask.java:1328)
    at org.apache.hadoop.mapred.MapTask$NewOutputCollector.close(MapTask.java:698)
    at org.apache.hadoop.mapred.MapTask.closeQuietly(MapTask.java:1793)
    at org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:779)
    at org.apache.hadoop.mapred.MapTask.run(MapTask.java:364)
    at org.apache.hadoop.mapred.Child$4.run(Child.java:255)
    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:1190)
    at org.apache.hadoop.mapred.Child.main(Child.java:249)


So I'm thinking it might be a configuration problem? Why is my file system stop? Something wrong with XmlInputFormat ?




My empty mapper:

@Override
public void map(LongWritable key, Text value, Context context) throws IOException, InterruptedException
{
 //nothing to do...
}


My Main:

    public static void main(String[] args) throws IOException, ClassNotFoundException, InterruptedException {
    Configuration conf = new Configuration();
    conf.set("xmlinput.start", "<page>");
    conf.set("xmlinput.end", "</page>");

    Job job = new Job(conf, "wikipedia link history");
    job.setJarByClass(Main.class);
    job.setMapperClass(Map.class);
    job.setReducerClass(Reduce.class);
    job.setInputFormatClass(XmlInputFormat.class);

    job.setMapOutputKeyClass(Text.class);
    job.setMapOutputValueClass(IntWritable.class);
    job.setOutputKeyClass(Text.class);
    job.setOutputValueClass(Text.class);
    job.setOutputFormatClass(TextOutputFormat.class);

    FileInputFormat.addInputPath(job, new Path(args[0]));
    FileOutputFormat.setOutputPath(job, new Path(args[1]));
    boolean result = job.waitForCompletion(true);
    System.exit(result ? 0 : 1);
}


hdfs-site.xml:

<property>
  <name>dfs.replication</name>
  <value>1</value>
</property>


mapred-site.xml:

<property>
  <name>mapred.job.tracker</name>
  <value>localhost:9001</value>
</property>

<property>
    <name>mapred.tasktracker.map.tasks.maximum</name>
    <value>2</value>
</property>

<property>
    <name>mapred.tasktracker.reduce.tasks.maximum</name>
    <value>2</value>
</property>

<property>
    <name>mapred.child.java.opts</name>
    <value>-Xmx9216m</value>
</property>

<property>
    <name>mapred.task.timeout</name>
    <value>300000</value>
</property>


My core-site.xml

<configuration>
<property>
    <name>hadoop.tmp.dir</name>
    <value>/Volumes/WD/hadoop/tmp</value>
    <description>A base for other temporary directories.</description>
</property>
<property>
    <name>fs.default.name</name>
    <value>hdfs://localhost:8020</value>
</property>

Community
  • 1
  • 1
Martin Magakian
  • 3,746
  • 5
  • 37
  • 53
  • What is your core-site.xml? My guess is that you are having disk space/permissions troubles when trying to merge map outputs/spills. – Alfonso Nishikawa Sep 17 '13 at 08:15
  • @AlfonsoNishikawa I updated my question with the core-site.xml configuration. It's mainly the default configuration. check http://hadoop.apache.org/docs/stable/core-default.html – Martin Magakian Sep 17 '13 at 08:21
  • Every node has r/w permissions in /Volumes/WD/hadoop/tmp? – Alfonso Nishikawa Sep 17 '13 at 12:04
  • @AlfonsoNishikawa yes r/w allow. It's running on a pseudo-distributed Hadoop. Only one node who is able to write for all the the other jobs. – Martin Magakian Sep 17 '13 at 13:28
  • Are you sure the user which launched hadoop cluster (pseudo-distributed) has r/w permissions on "/Volumes/WD/hadoop/tmp/mapred/local"? (configuration mapred.local.dir) :P If so, then I can't think of anything more (sorry :( ) – Alfonso Nishikawa Sep 18 '13 at 08:20

0 Answers0