@Tags(value={"avro","parse","record","row","reader","delimited","comma","separated","values"}) @CapabilityDescription(value="Parses Avro data and returns each Avro record as an separate Record object. The Avro data may contain the schema itself, or the schema can be externalized and accessed by one of the methods offered by the \'Schema Access Strategy\' property.") public class AvroReader extends SchemaRegistryService implements RecordReaderFactory
Modifier and Type | Field and Description |
---|---|
private Map<String,org.apache.avro.Schema> |
compiledAvroSchemaCache |
private AllowableValue |
EMBEDDED_AVRO_SCHEMA |
private static int |
MAX_AVRO_SCHEMA_CACHE_SIZE |
Constructor and Description |
---|
AvroReader() |
Modifier and Type | Method and Description |
---|---|
private org.apache.avro.Schema |
compileAvroSchema(String text) |
RecordReader |
createRecordReader(FlowFile flowFile,
InputStream in,
ComponentLog logger) |
protected AllowableValue |
getDefaultSchemaAccessStrategy() |
protected SchemaAccessStrategy |
getSchemaAccessStrategy(String allowableValue,
SchemaRegistry schemaRegistry,
ConfigurationContext context) |
protected SchemaAccessStrategy |
getSchemaAccessStrategy(String allowableValue,
SchemaRegistry schemaRegistry,
ValidationContext context) |
protected List<AllowableValue> |
getSchemaAccessStrategyValues() |
customValidate, getConfigurationContext, getSchema, getSchemaAccessStrategy, getSchemaAcessStrategyDescriptor, getSuppliedSchemaFields, getSupportedPropertyDescriptors, storeSchemaAccessStrategy
abstractClearConfigContext, abstractStoreConfigContext, getControllerServiceLookup, getIdentifier, getLogger, getProperty, getStateManager, init, initialize
equals, getPropertyDescriptor, getPropertyDescriptors, getSupportedDynamicPropertyDescriptor, hashCode, onPropertyModified, toString, validate
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
initialize
getIdentifier, getPropertyDescriptor, getPropertyDescriptors, onPropertyModified, validate
private final AllowableValue EMBEDDED_AVRO_SCHEMA
private static final int MAX_AVRO_SCHEMA_CACHE_SIZE
protected List<AllowableValue> getSchemaAccessStrategyValues()
getSchemaAccessStrategyValues
in class SchemaRegistryService
protected SchemaAccessStrategy getSchemaAccessStrategy(String allowableValue, SchemaRegistry schemaRegistry, ConfigurationContext context)
getSchemaAccessStrategy
in class SchemaRegistryService
protected SchemaAccessStrategy getSchemaAccessStrategy(String allowableValue, SchemaRegistry schemaRegistry, ValidationContext context)
getSchemaAccessStrategy
in class SchemaRegistryService
public RecordReader createRecordReader(FlowFile flowFile, InputStream in, ComponentLog logger) throws MalformedRecordException, IOException, SchemaNotFoundException
createRecordReader
in interface RecordReaderFactory
MalformedRecordException
IOException
SchemaNotFoundException
private org.apache.avro.Schema compileAvroSchema(String text)
protected AllowableValue getDefaultSchemaAccessStrategy()
getDefaultSchemaAccessStrategy
in class SchemaRegistryService
Copyright © 2017 Apache NiFi Project. All rights reserved.