title: Do away with default output directory completely - MapReduce
body: <p>I have a code for writing multiple outputs using <code>org.apache.hadoop.mapreduce.lib.output.MultipleOutputs</code>.</p>
  
  <p>The Reducer writes the results to a pre-created location so I don't require the default o/p directory (which contains the <code>_history</code> and <code>_SUCCESS</code>  directories).</p>
  
  <p>I have to delete them everytime before running my job again.</p>
  
  <p>So I removed the <code>TextOutputFormat.setOutputPath(job1,new Path(outputPath));</code> line. But, this gives me the 
  (expected) error <code>org.apache.hadoop.mapred.InvalidJobConfException: Output directory not set</code></p>
  
  <p>Driver Class:</p>
  
  <pre><code>MultipleOutputs.addNamedOutput(job1, "path1", TextOutputFormat.class, Text.class,LongWritable.class);
  MultipleOutputs.addNamedOutput(job1, "path2", TextOutputFormat.class, Text.class,LongWritable.class);
  LazyOutputFormat.setOutputFormatClass(job1,TextOutputFormat.class);
  </code></pre>
  
  <p>Reducer Class:</p>
  
  <pre><code>if(condition1)
      mos.write("path1", key, new LongWritable(value), path_list[0]);
  else
      mos.write("path2", key, new LongWritable(value), path_list[1]);
  </code></pre>
  
  <p>Is, there a workaround to avoid specifying a default output directory?</p>