public abstract class BinFiles extends AbstractSessionFactoryProcessor
| Modifier and Type | Field and Description |
|---|---|
private BinManager |
binManager |
static PropertyDescriptor |
MAX_BIN_AGE |
static PropertyDescriptor |
MAX_BIN_COUNT |
static PropertyDescriptor |
MAX_ENTRIES |
static PropertyDescriptor |
MAX_SIZE |
static PropertyDescriptor |
MIN_ENTRIES |
static PropertyDescriptor |
MIN_SIZE |
private Queue<Bin> |
readyBins |
static Relationship |
REL_FAILURE |
static Relationship |
REL_ORIGINAL |
| Constructor and Description |
|---|
BinFiles() |
| Modifier and Type | Method and Description |
|---|---|
protected Collection<ValidationResult> |
additionalCustomValidation(ValidationContext context)
Allows additional custom validation to be done.
|
private int |
binFlowFiles(ProcessContext context,
ProcessSessionFactory sessionFactory) |
protected Collection<ValidationResult> |
customValidate(ValidationContext context) |
protected abstract String |
getGroupId(ProcessContext context,
FlowFile flowFile,
ProcessSession session)
Returns a group ID representing a bin.
|
private int |
migrateBins(ProcessContext context) |
void |
onScheduled(ProcessContext context) |
void |
onTrigger(ProcessContext context,
ProcessSessionFactory sessionFactory) |
protected abstract FlowFile |
preprocessFlowFile(ProcessContext context,
ProcessSession session,
FlowFile flowFile)
Allows general pre-processing of a flow file before it is offered to a bin.
|
protected abstract BinProcessingResult |
processBin(Bin unmodifiableBin,
ProcessContext context)
Processes a single bin.
|
private int |
processBins(ProcessContext context) |
void |
resetState() |
protected abstract void |
setUpBinManager(BinManager binManager,
ProcessContext context)
Performs any additional setup of the bin manager.
|
getControllerServiceLookup, getIdentifier, getLogger, getNodeTypeProvider, getRelationships, init, initialize, isConfigurationRestored, isScheduled, toString, updateConfiguredRestoredTrue, updateScheduledFalse, updateScheduledTrueequals, getPropertyDescriptor, getPropertyDescriptors, getSupportedDynamicPropertyDescriptor, getSupportedPropertyDescriptors, hashCode, onPropertyModified, validateclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetPropertyDescriptor, getPropertyDescriptors, onPropertyModified, validatepublic static final PropertyDescriptor MIN_SIZE
public static final PropertyDescriptor MAX_SIZE
public static final PropertyDescriptor MIN_ENTRIES
public static final PropertyDescriptor MAX_ENTRIES
public static final PropertyDescriptor MAX_BIN_COUNT
public static final PropertyDescriptor MAX_BIN_AGE
public static final Relationship REL_ORIGINAL
public static final Relationship REL_FAILURE
private final BinManager binManager
@OnStopped public final void resetState()
protected abstract FlowFile preprocessFlowFile(ProcessContext context, ProcessSession session, FlowFile flowFile)
context - contextsession - sessionflowFile - flowFileprotected abstract String getGroupId(ProcessContext context, FlowFile flowFile, ProcessSession session)
context - contextflowFile - flowFilesession - the session for accessing the FlowFileprotected abstract void setUpBinManager(BinManager binManager, ProcessContext context)
binManager - The bin managercontext - contextprotected abstract BinProcessingResult processBin(Bin unmodifiableBin, ProcessContext context) throws ProcessException
unmodifiableBin - A reference to a single bin of flow filescontext - The contexttrue if the input bin was already committed. E.g., in case of a failure, the implementation
may choose to transfer all binned files to Failure and commit their sessions. If
false, the processBins() method will transfer the files to Original and commit the sessionsProcessException - if any problem arises while processing a bin of FlowFiles. All flow files in the bin
will be transferred to failure and the ProcessSession provided by the 'session'
argument rolled backprotected Collection<ValidationResult> additionalCustomValidation(ValidationContext context)
context - The contextpublic final void onTrigger(ProcessContext context, ProcessSessionFactory sessionFactory) throws ProcessException
ProcessExceptionprivate int migrateBins(ProcessContext context)
private int processBins(ProcessContext context)
private int binFlowFiles(ProcessContext context, ProcessSessionFactory sessionFactory)
@OnScheduled public final void onScheduled(ProcessContext context) throws IOException
IOExceptionprotected final Collection<ValidationResult> customValidate(ValidationContext context)
customValidate in class AbstractConfigurableComponentCopyright © 2019 Apache NiFi Project. All rights reserved.