// The workpath is set to a unique-per-store subdirectory of
// the current working directory.
String workPath = outputConf.get("mapred.work.output.dir");
outputConf.set("mapred.work.output.dir",
new Path(workPath, tmpPath).toString());
OutputFormat outputFormat = outputConf.getOutputFormat();
// Generate a unique part name (part-<task_partition_number>).
String fileName = getPartName(outputConf);
// create a new record writer
writer = outputFormat.getRecordWriter(FileSystem.get(outputConf),
outputConf, fileName, reporter);
// return an output collector using the writer we just created.
return new StoreFuncAdaptor(new OutputCollector()
{