protected void initialize() throws IOException
{
tap.sinkConfInit( flowProcess, conf );
OutputFormat outputFormat = asJobConfInstance( conf ).getOutputFormat();
// todo: use OutputCommitter class
isFileOutputFormat = outputFormat instanceof FileOutputFormat;
if( isFileOutputFormat )
{
Hadoop18TapUtil.setupJob( conf );
Hadoop18TapUtil.setupTask( conf );
if( prefix != null )
filename = String.format( filenamePattern, prefix, "/", conf.getInt( "mapred.task.partition", 0 ), sequence );
else
filename = String.format( filenamePattern, "", "", conf.getInt( "mapred.task.partition", 0 ), sequence );
}
LOG.info( "creating path: {}", filename );
writer = outputFormat.getRecordWriter( null, asJobConfInstance( conf ), filename, Reporter.NULL );
}