@TriggerWhenEmpty @SideEffectFree @Tags(value={"fork","join","enrichment","record","sql","wrap","recordpath","merge","combine","streams"}) @CapabilityDescription(value="Joins together Records from two different FlowFiles where one FlowFile, the \'original\' contains arbitrary records and the second FlowFile, the \'enrichment\' contains additional data that should be used to enrich the first. See Additional Details for more information on how to configure this processor and the different use cases that it aims to accomplish.") @SeeAlso(value=ForkEnrichment.class) @WritesAttribute(attribute="mime.type",description="Sets the mime.type attribute to the MIME Type specified by the Record Writer") @WritesAttribute(attribute="record.count",description="The number of records in the FlowFile") @InputRequirement(value=INPUT_REQUIRED) @SystemResourceConsideration(resource=MEMORY, description="This Processor will load into heap all FlowFiles that are on its incoming queues. While it loads the FlowFiles themselves, and not their content, the FlowFile attributes can be very memory intensive. Additionally, if the Join Strategy is set to SQL, the SQL engine may require buffering the entire contents of the enrichment FlowFile for each concurrent task. See Processor\'s Additional Details for more details and for steps on how to mitigate these concerns.") public class JoinEnrichment extends BinFiles
MAX_BIN_AGE, MAX_ENTRIES, MAX_SIZE, MIN_ENTRIES, MIN_SIZE| Constructor and Description |
|---|
JoinEnrichment() |
additionalCustomValidation, customValidate, getReadyBins, onScheduled, onTrigger, resetStategetControllerServiceLookup, getIdentifier, getLogger, getNodeTypeProvider, init, initialize, isConfigurationRestored, isScheduled, toString, updateConfiguredRestoredTrue, updateScheduledFalse, updateScheduledTrueequals, getPropertyDescriptor, getPropertyDescriptors, getSupportedDynamicPropertyDescriptor, hashCode, onPropertyModified, validateclone, finalize, getClass, notify, notifyAll, wait, wait, waitisStatefulgetPropertyDescriptor, getPropertyDescriptors, onPropertyModified, validatestatic final String GROUP_ID_ATTRIBUTE
static final String ENRICHMENT_ROLE_ATTRIBUTE
static final String RECORD_COUNT_ATTRIBUTE
static final AllowableValue JOIN_WRAPPER
static final AllowableValue JOIN_SQL
static final AllowableValue JOIN_INSERT_ENRICHMENT_FIELDS
static final PropertyDescriptor ORIGINAL_RECORD_READER
static final PropertyDescriptor ENRICHMENT_RECORD_READER
static final PropertyDescriptor RECORD_WRITER
static final PropertyDescriptor JOIN_STRATEGY
static final PropertyDescriptor SQL
static final PropertyDescriptor DEFAULT_PRECISION
static final PropertyDescriptor DEFAULT_SCALE
static final PropertyDescriptor INSERTION_RECORD_PATH
static final PropertyDescriptor TIMEOUT
static final PropertyDescriptor MAX_BIN_COUNT
private static final List<PropertyDescriptor> properties
static final Relationship REL_JOINED
static final Relationship REL_ORIGINAL
static final Relationship REL_TIMEOUT
static final Relationship REL_FAILURE
private static final Set<Relationship> relationships
private final SqlJoinCache sqlJoinCache
protected List<PropertyDescriptor> getSupportedPropertyDescriptors()
getSupportedPropertyDescriptors in class AbstractConfigurableComponentpublic Set<Relationship> getRelationships()
getRelationships in interface ProcessorgetRelationships in class AbstractSessionFactoryProcessor@OnScheduled public void registerCalciteDriver()
@OnStopped public void cleanup() throws Exception
Exceptionprotected FlowFile preprocessFlowFile(ProcessContext context, ProcessSession session, FlowFile flowFile)
preprocessFlowFile in class BinFilesprotected String getGroupId(ProcessContext context, FlowFile flowFile, ProcessSession session)
getGroupId in class BinFilesprotected void setUpBinManager(BinManager binManager, ProcessContext context)
setUpBinManager in class BinFilesprotected int getMinEntries(PropertyContext context)
getMinEntries in class BinFilesprotected int getMaxEntries(PropertyContext context)
getMaxEntries in class BinFilesprotected long getMinBytes(PropertyContext context)
getMinBytes in class BinFilesprotected long getMaxBytes(PropertyContext context)
getMaxBytes in class BinFilesprotected int getMaxBinAgeSeconds(PropertyContext context)
getMaxBinAgeSeconds in class BinFilesprotected BinProcessingResult processBin(Bin unmodifiableBin, ProcessContext context) throws ProcessException
processBin in class BinFilesProcessExceptionprivate RecordSchema getReaderSchema(RecordReaderFactory recordReaderFactory, FlowFile flowFile, ProcessSession session) throws IOException, MalformedRecordException, SchemaNotFoundException
private BinProcessingResult transferFailure(List<FlowFile> flowFiles, ProcessSession session)
private RecordJoinStrategy getJoinStrategy(ProcessContext context, Map<String,String> attributes)
private FlowFile getFlowFileWithRole(Collection<FlowFile> flowFiles, EnrichmentRole desiredRole)
private EnrichmentRole getEnrichmentRole(FlowFile flowFile)
private EnrichmentRole getOtherEnrichmentRole(EnrichmentRole role)
protected int processBins(ProcessContext context, ProcessSessionFactory sessionFactory)
processBins in class BinFilesCopyright © 2023 Apache NiFi Project. All rights reserved.