@SuppressWarnings({ "unchecked", "rawtypes" }) @Override public final void prepareToWrite(final RecordWriter w) throws IOException { if (this.udfContextSignature == null) throw new IOException(this.getClass().toString() + ".prepareToWrite called without setting udf context signature"); writer = (RecordWriter<NullWritable, Object>) w; ((AvroRecordWriter) writer).prepareToWrite(getOutputAvroSchema()); }