Path outPath,
Class<? extends Writable> valueClass,
boolean isCompressed,
Properties tableProperties,
Progressable progress) throws IOException {
final FSRecordWriter result =
super.getHiveRecordWriter(jc,outPath,valueClass,isCompressed,
tableProperties,progress);
final Reporter reporter = (Reporter) progress;
reporter.setStatus("got here");
System.out.println("Got a reporter " + reporter);
return new FSRecordWriter() {
@Override
public void write(Writable w) throws IOException {
if (w instanceof Text) {
Text value = (Text) w;
Rot13InputFormat.rot13(value.getBytes(), 0, value.getLength());
result.write(w);
} else if (w instanceof BytesWritable) {
BytesWritable value = (BytesWritable) w;
Rot13InputFormat.rot13(value.getBytes(), 0, value.getLength());
result.write(w);
} else {
throw new IllegalArgumentException("need text or bytes writable " +
" instead of " + w.getClass().getName());
}
}
@Override
public void close(boolean abort) throws IOException {
result.close(abort);
}
};
}