public RecordWriter getRecordWriter(NutchFileSystem fs, JobConf job,
String name) throws IOException {
File file = new File(job.getOutputDir(), name);
final NFSDataOutputStream out =
new NFSDataOutputStream(fs.create(file, true));
return new RecordWriter() {
public void write(WritableComparable key, Writable value)
throws IOException {
out.writeBytes(key.toString()); // BUG: assume 8-bit chars
out.writeByte('\t');
out.writeBytes(value.toString()); // BUG: assume 8-bit chars
out.writeByte('\n');
}
public void close() throws IOException {
out.close();
}
};
}