title: How to read Hadoop Map intermediate file file.out
body: <p>I have set property  <code>keep.task.files.pattern</code> to <code>".*"</code> in mapred-site.xml</p>
  
  <p>restarted cluster and executed my test mapreduce program.</p>
  
  <p>I see two file file.out and file.out.index in the folder
  <code>/opt/hadoopws/tmp/mapred/local/taskTracker/hduser/jobcache/job_201403260903_0001/attempt_201403260903_0001_m_000000_0/output/</code></p>
  
  <p>When i attempt to read file.out using below code i get <code>"not a SequenceFile error"</code> message.
  I know for sure its a binary file when i try to open file.out with less, it prompts that its a binary file.
  I'm running Hadoop 1.2.1. What is the default map output format?</p>
  
  <pre><code>FileSystem fs = FileSystem.get(conf);
  Path path = new Path("/opt/hadoopws/tmp/mapred/local/taskTracker/hduser/jobcache
               /job_201403260903_0001/attempt_201403260903_0001_m_000000_0/output
               /file.out");
  SequenceFile.Reader reader = new SequenceFile.Reader(fs, path, conf);
  IntWritable key = new IntWritable();
  IntWritable value = new IntWritable();
  while (reader.next(key, value)) {
          System.out.println(key.get() + " | " + value.get());
      }
  reader.close();
  </code></pre>
  
  <hr>
  
  <p>Error Message:</p>
  
  <pre><code>Exception in thread "main" java.io.IOException: /opt/hadoopws/tmp/mapred/local/taskTracker/hduser/jobcache/job_201403260903_0001/attempt_201403260903_0001_m_000000_0/output/file.out not a SequenceFile
  at org.apache.hadoop.io.SequenceFile$Reader.init(SequenceFile.java:1517)
  at org.apache.hadoop.io.SequenceFile$Reader.&lt;init&gt;(SequenceFile.java:1490)
  at org.apache.hadoop.io.SequenceFile$Reader.&lt;init&gt;(SequenceFile.java:1479)
  at org.apache.hadoop.io.SequenceFile$Reader.&lt;init&gt;(SequenceFile.java:1474)
  at HDPConfigRun.run(HDPConfigRun.java:31)
  at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:65)
  at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:79)
  at HDPConfigRun.main(HDPConfigRun.java:45)
  </code></pre>