Class DeleteFile
java.lang.Object
org.apache.nifi.components.AbstractConfigurableComponent
org.apache.nifi.processor.AbstractSessionFactoryProcessor
org.apache.nifi.processor.AbstractProcessor
org.apache.nifi.processors.standard.DeleteFile
- All Implemented Interfaces:
org.apache.nifi.components.ConfigurableComponent,org.apache.nifi.processor.Processor
@SupportsBatching(defaultDuration=TWENTY_FIVE_MILLIS)
@InputRequirement(INPUT_REQUIRED)
@Tags({"file","remove","delete","local","files","filesystem"})
@CapabilityDescription("Deletes a file from the filesystem.")
@UseCase(description="Delete source file only after its processing completed",
configuration="Retrieve a file from the filesystem, e.g. using \'ListFile\' and \'FetchFile\'.\nProcess the file using any combination of processors.\nStore the resulting file to a destination, e.g. using \'PutSFTP\'.\nUsing \'DeleteFile\', delete the file from the filesystem only after the result has been stored.\n")
@Restriction(requiredPermission=READ_FILESYSTEM,explanation="Provides operator the ability to read from any file that NiFi has access to.") @Restriction(requiredPermission=WRITE_FILESYSTEM,explanation="Provides operator the ability to delete any file that NiFi has access to.")
public class DeleteFile
extends org.apache.nifi.processor.AbstractProcessor
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final org.apache.nifi.components.PropertyDescriptorstatic final org.apache.nifi.components.PropertyDescriptorprivate static final List<org.apache.nifi.components.PropertyDescriptor> static final org.apache.nifi.processor.Relationshipstatic final org.apache.nifi.processor.Relationshipstatic final org.apache.nifi.processor.Relationshipprivate static final Set<org.apache.nifi.processor.Relationship> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionSet<org.apache.nifi.processor.Relationship> protected List<org.apache.nifi.components.PropertyDescriptor> private voidhandleFailure(org.apache.nifi.processor.ProcessSession session, org.apache.nifi.flowfile.FlowFile flowFile, String errorMessage, Throwable throwable) voidonTrigger(org.apache.nifi.processor.ProcessContext context, org.apache.nifi.processor.ProcessSession session) Methods inherited from class org.apache.nifi.processor.AbstractProcessor
onTriggerMethods inherited from class org.apache.nifi.processor.AbstractSessionFactoryProcessor
getControllerServiceLookup, getIdentifier, getLogger, getNodeTypeProvider, init, initialize, isConfigurationRestored, isScheduled, toString, updateConfiguredRestoredTrue, updateScheduledFalse, updateScheduledTrueMethods inherited from class org.apache.nifi.components.AbstractConfigurableComponent
customValidate, equals, getPropertyDescriptor, getPropertyDescriptors, getSupportedDynamicPropertyDescriptor, hashCode, onPropertyModified, validateMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.nifi.components.ConfigurableComponent
getPropertyDescriptor, getPropertyDescriptors, onPropertyModified, validateMethods inherited from interface org.apache.nifi.processor.Processor
isStateful, migrateProperties, migrateRelationships
-
Field Details
-
REL_SUCCESS
public static final org.apache.nifi.processor.Relationship REL_SUCCESS -
REL_NOT_FOUND
public static final org.apache.nifi.processor.Relationship REL_NOT_FOUND -
REL_FAILURE
public static final org.apache.nifi.processor.Relationship REL_FAILURE -
RELATIONSHIPS
-
DIRECTORY_PATH
public static final org.apache.nifi.components.PropertyDescriptor DIRECTORY_PATH -
FILENAME
public static final org.apache.nifi.components.PropertyDescriptor FILENAME -
PROPERTY_DESCRIPTORS
-
-
Constructor Details
-
DeleteFile
public DeleteFile()
-
-
Method Details
-
getRelationships
- Specified by:
getRelationshipsin interfaceorg.apache.nifi.processor.Processor- Overrides:
getRelationshipsin classorg.apache.nifi.processor.AbstractSessionFactoryProcessor
-
getSupportedPropertyDescriptors
- Overrides:
getSupportedPropertyDescriptorsin classorg.apache.nifi.components.AbstractConfigurableComponent
-
onTrigger
public void onTrigger(org.apache.nifi.processor.ProcessContext context, org.apache.nifi.processor.ProcessSession session) throws org.apache.nifi.processor.exception.ProcessException - Specified by:
onTriggerin classorg.apache.nifi.processor.AbstractProcessor- Throws:
org.apache.nifi.processor.exception.ProcessException
-
handleFailure
-