FileOutputFormat extends OutputFormat<K, V> { public static void setOutputPath(Job job, Path outputDir) { try { outputDir = outputDir.getFileSystem(job.getConfiguration()).makeQualified( outputDir); } catch (IOException e) { throw new RuntimeException(e); } job.getConfiguration().set(FileOutputFormat.OUTDIR, outputDir.toString()); }  static void setCompressOutput(Job job, boolean compress); static boolean getCompressOutput(JobContext job); static void setOutputCompressorClass(Job job, 
                           Class<? extends CompressionCodec> codecClass); static Class<? extends CompressionCodec> getOutputCompressorClass(JobContext job, 
                       Class<? extends CompressionCodec> defaultValue); abstract RecordWriter<K, V> getRecordWriter(TaskAttemptContext job
                     ); void checkOutputSpecs(JobContext job
                               ); static void setOutputPath(Job job, Path outputDir); static Path getOutputPath(JobContext job); static Path getWorkOutputPath(TaskInputOutputContext<?,?,?,?> context
                                       ); static Path getPathForWorkFile(TaskInputOutputContext<?,?,?,?> context, 
                                 String name,
                                 String extension
                                ); synchronized static String getUniqueFile(TaskAttemptContext context,
                                                  String name,
                                                  String extension); Path getDefaultWorkFile(TaskAttemptContext context,
                                 String extension); synchronized OutputCommitter getOutputCommitter(TaskAttemptContext context); static final String COMPRESS; static final String COMPRESS_CODEC; static final String COMPRESS_TYPE; static final String OUTDIR; }
@Test public void testSetOutputPathException() throws Exception { Job job = Job.getInstance(); try { FileOutputFormat.setOutputPath(job, new Path("foo: fail("Should have thrown a RuntimeException with an IOException inside"); } catch (RuntimeException re) { assertTrue(re.getCause() instanceof IOException); } }