public class WriteAvroResultWithExternalSchema extends AbstractRecordSetWriter
Modifier and Type | Field and Description |
---|---|
private org.apache.avro.Schema |
avroSchema |
private OutputStream |
buffered |
private org.apache.avro.io.DatumWriter<org.apache.avro.generic.GenericRecord> |
datumWriter |
private org.apache.avro.io.BinaryEncoder |
encoder |
private RecordSchema |
recordSchema |
private SchemaAccessWriter |
schemaAccessWriter |
Constructor and Description |
---|
WriteAvroResultWithExternalSchema(org.apache.avro.Schema avroSchema,
RecordSchema recordSchema,
SchemaAccessWriter schemaAccessWriter,
OutputStream out) |
Modifier and Type | Method and Description |
---|---|
void |
flush() |
String |
getMimeType() |
protected void |
onBeginRecordSet() |
protected Map<String,String> |
onFinishRecordSet() |
Map<String,String> |
writeRecord(Record record) |
beginRecordSet, close, finishRecordSet, getOutputStream, getRecordCount, incrementRecordCount, isActiveRecordSet, write, write
private final SchemaAccessWriter schemaAccessWriter
private final RecordSchema recordSchema
private final org.apache.avro.Schema avroSchema
private final org.apache.avro.io.BinaryEncoder encoder
private final OutputStream buffered
private final org.apache.avro.io.DatumWriter<org.apache.avro.generic.GenericRecord> datumWriter
public WriteAvroResultWithExternalSchema(org.apache.avro.Schema avroSchema, RecordSchema recordSchema, SchemaAccessWriter schemaAccessWriter, OutputStream out) throws IOException
IOException
protected void onBeginRecordSet() throws IOException
onBeginRecordSet
in class AbstractRecordSetWriter
IOException
protected Map<String,String> onFinishRecordSet() throws IOException
onFinishRecordSet
in class AbstractRecordSetWriter
IOException
public Map<String,String> writeRecord(Record record) throws IOException
writeRecord
in class AbstractRecordSetWriter
IOException
public void flush() throws IOException
flush
in interface RecordWriter
flush
in class AbstractRecordSetWriter
IOException
public String getMimeType()
Copyright © 2018 Apache NiFi Project. All rights reserved.