@Override
    public void write(long writeId, byte[] record) throws StreamingException {
      delegate.write(writeId, record);
      produceFault();
    }
This is test-only wrapper around the real RecordWriter.
It can simulate faults from lower levels to test error handling logic.
streaming/src/test/org/apache/hive/streaming/TestStreaming.java