public abstract class AbstractRouteRecord<T> extends AbstractProcessor
Modifier and Type | Field and Description |
---|---|
(package private) static PropertyDescriptor |
RECORD_READER |
(package private) static PropertyDescriptor |
RECORD_WRITER |
(package private) static Relationship |
REL_FAILURE |
(package private) static Relationship |
REL_ORIGINAL |
Constructor and Description |
---|
AbstractRouteRecord() |
Modifier and Type | Method and Description |
---|---|
protected abstract T |
getFlowFileContext(FlowFile flowFile,
ProcessContext context) |
Set<Relationship> |
getRelationships() |
protected List<PropertyDescriptor> |
getSupportedPropertyDescriptors() |
protected abstract boolean |
isRouteOriginal() |
void |
onTrigger(ProcessContext context,
ProcessSession session) |
protected abstract Set<Relationship> |
route(Record record,
RecordSchema writeSchema,
FlowFile flowFile,
ProcessContext context,
T flowFileContext) |
private void |
writeRecord(Record record,
Relationship relationship,
Map<Relationship,Tuple<FlowFile,RecordSetWriter>> writers,
ProcessSession session,
FlowFile original,
Map<String,String> originalAttributes,
RecordSetWriterFactory writerFactory) |
onTrigger
getControllerServiceLookup, getIdentifier, getLogger, getNodeTypeProvider, init, initialize, isConfigurationRestored, isScheduled, toString, updateConfiguredRestoredTrue, updateScheduledFalse, updateScheduledTrue
customValidate, equals, getPropertyDescriptor, getPropertyDescriptors, getSupportedDynamicPropertyDescriptor, hashCode, onPropertyModified, validate
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getPropertyDescriptor, getPropertyDescriptors, onPropertyModified, validate
static final PropertyDescriptor RECORD_READER
static final PropertyDescriptor RECORD_WRITER
static final Relationship REL_FAILURE
static final Relationship REL_ORIGINAL
protected List<PropertyDescriptor> getSupportedPropertyDescriptors()
getSupportedPropertyDescriptors
in class AbstractConfigurableComponent
public Set<Relationship> getRelationships()
getRelationships
in interface Processor
getRelationships
in class AbstractSessionFactoryProcessor
public void onTrigger(ProcessContext context, ProcessSession session) throws ProcessException
onTrigger
in class AbstractProcessor
ProcessException
private void writeRecord(Record record, Relationship relationship, Map<Relationship,Tuple<FlowFile,RecordSetWriter>> writers, ProcessSession session, FlowFile original, Map<String,String> originalAttributes, RecordSetWriterFactory writerFactory) throws IOException, SchemaNotFoundException
IOException
SchemaNotFoundException
protected abstract Set<Relationship> route(Record record, RecordSchema writeSchema, FlowFile flowFile, ProcessContext context, T flowFileContext)
protected abstract boolean isRouteOriginal()
protected abstract T getFlowFileContext(FlowFile flowFile, ProcessContext context)
Copyright © 2020 Apache NiFi Project. All rights reserved.