@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 |
---|---|
(package private) static PropertyDescriptor |
CACHE_SIZE |
private com.github.benmanes.caffeine.cache.LoadingCache<String,org.apache.avro.Schema> |
compiledAvroSchemaCache |
private AllowableValue |
EMBEDDED_AVRO_SCHEMA |
schemaAccessStrategy
Constructor and Description |
---|
AvroReader() |
Modifier and Type | Method and Description |
---|---|
RecordReader |
createRecordReader(Map<String,String> variables,
InputStream in,
long inputLength,
ComponentLog logger) |
protected AllowableValue |
getDefaultSchemaAccessStrategy() |
protected SchemaAccessStrategy |
getSchemaAccessStrategy(String strategy,
SchemaRegistry schemaRegistry,
PropertyContext context) |
protected List<AllowableValue> |
getSchemaAccessStrategyValues() |
protected List<PropertyDescriptor> |
getSupportedPropertyDescriptors() |
void |
onEnabled(ConfigurationContext context) |
buildStrategyProperty, customValidate, getConfigurationContext, getSchema, getSchema, getSchemaAccessStrategy, getSchemaAcessStrategyDescriptor, getSuppliedSchemaFields, storeSchemaAccessStrategy
abstractClearConfigContext, abstractStoreConfigContext, disabled, enabled, getControllerServiceLookup, getIdentifier, getLogger, getNodeTypeProvider, getProperty, getStateManager, init, initialize, isEnabled
equals, getPropertyDescriptor, getPropertyDescriptors, getSupportedDynamicPropertyDescriptor, hashCode, onPropertyModified, toString, validate
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
createRecordReader
initialize, isStateful
getIdentifier, getPropertyDescriptor, getPropertyDescriptors, onPropertyModified, validate
private final AllowableValue EMBEDDED_AVRO_SCHEMA
static final PropertyDescriptor CACHE_SIZE
private com.github.benmanes.caffeine.cache.LoadingCache<String,org.apache.avro.Schema> compiledAvroSchemaCache
protected List<PropertyDescriptor> getSupportedPropertyDescriptors()
getSupportedPropertyDescriptors
in class SchemaRegistryService
@OnEnabled public void onEnabled(ConfigurationContext context)
protected List<AllowableValue> getSchemaAccessStrategyValues()
getSchemaAccessStrategyValues
in class SchemaRegistryService
protected SchemaAccessStrategy getSchemaAccessStrategy(String strategy, SchemaRegistry schemaRegistry, PropertyContext context)
getSchemaAccessStrategy
in class SchemaRegistryService
public RecordReader createRecordReader(Map<String,String> variables, InputStream in, long inputLength, ComponentLog logger) throws IOException, SchemaNotFoundException
createRecordReader
in interface RecordReaderFactory
IOException
SchemaNotFoundException
protected AllowableValue getDefaultSchemaAccessStrategy()
getDefaultSchemaAccessStrategy
in class SchemaRegistryService
Copyright © 2023 Apache NiFi Project. All rights reserved.