Class FetchFTP
java.lang.Object
org.apache.nifi.components.AbstractConfigurableComponent
org.apache.nifi.processor.AbstractSessionFactoryProcessor
org.apache.nifi.processor.AbstractProcessor
org.apache.nifi.processor.util.file.transfer.FetchFileTransfer
org.apache.nifi.processors.standard.FetchFTP
- All Implemented Interfaces:
org.apache.nifi.components.ConfigurableComponent,org.apache.nifi.processor.Processor
@InputRequirement(INPUT_REQUIRED)
@Tags({"ftp","get","retrieve","files","fetch","remote","ingest","source","input"})
@CapabilityDescription("Fetches the content of a file from a remote FTP server and overwrites the contents of an incoming FlowFile with the content of the remote file.")
@SeeAlso({GetSFTP.class,PutSFTP.class,GetFTP.class,PutFTP.class})
@WritesAttribute(attribute="ftp.remote.host",description="The hostname or IP address from which the file was pulled") @WritesAttribute(attribute="ftp.remote.port",description="The port that was used to communicate with the remote FTP server") @WritesAttribute(attribute="ftp.remote.filename",description="The name of the remote file that was pulled") @WritesAttribute(attribute="filename",description="The filename is updated to point to the filename fo the remote file") @WritesAttribute(attribute="path",description="If the Remote File contains a directory name, that directory name will be added to the FlowFile using the \'path\' attribute") @WritesAttribute(attribute="fetch.failure.reason",description="The name of the failure relationship applied when routing to any failure relationship")
@MultiProcessorUseCase(description="Retrieve all files in a directory of an FTP Server",keywords={"ftp","file","transform","state","retrieve","fetch","all","stream"},configurations={@ProcessorConfiguration(processorClass=ListFTP.class,configuration="The \"Hostname\" property should be set to the fully qualified hostname of the FTP Server. It\'s a good idea to parameterize this property by setting it to something like `#{FTP_SERVER}`.\nThe \"Remote Path\" property must be set to the directory on the FTP Server where the files reside. If the flow being built is to be reused elsewhere, it\'s a good idea to parameterize this property by setting it to something like `#{FTP_REMOTE_PATH}`.\nConfigure the \"Username\" property to the appropriate username for logging into the FTP Server. It\'s usually a good idea to parameterize this property by setting it to something like `#{FTP_USERNAME}`.\nConfigure the \"Password\" property to the appropriate password for the provided username. It\'s usually a good idea to parameterize this property by setting it to something like `#{FTP_PASSWORD}`.\n\nThe \'success\' Relationship of this Processor is then connected to FetchFTP.\n"),@ProcessorConfiguration(processorClass=FetchFTP.class,configuration="\"Hostname\" = \"${ftp.remote.host}\"\n\"Remote File\" = \"${path}/${filename}\"\n\"Username\" = \"${ftp.listing.user}\"\n\"Password\" = \"#{FTP_PASSWORD}\"\n")})
public class FetchFTP
extends FetchFileTransfer
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final org.apache.nifi.components.PropertyDescriptorprivate static final List<org.apache.nifi.components.PropertyDescriptor> Fields inherited from class org.apache.nifi.processor.util.file.transfer.FetchFileTransfer
COMPLETION_DELETE, COMPLETION_MOVE, COMPLETION_NONE, COMPLETION_STRATEGY, FAILURE_REASON_ATTRIBUTE, FILE_NOT_FOUND_LOG_LEVEL, HOSTNAME, MOVE_CREATE_DIRECTORY, MOVE_DESTINATION_DIR, REL_COMMS_FAILURE, REL_NOT_FOUND, REL_PERMISSION_DENIED, REL_SUCCESS, REMOTE_FILENAME, UNDEFAULTED_PORT, USERNAME -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected FileTransfercreateFileTransfer(org.apache.nifi.processor.ProcessContext context) protected Collection<org.apache.nifi.components.ValidationResult> customValidate(org.apache.nifi.components.ValidationContext validationContext) protected List<org.apache.nifi.components.PropertyDescriptor> voidMethods inherited from class org.apache.nifi.processor.util.file.transfer.FetchFileTransfer
cleanup, getRelationships, onScheduled, onTriggerMethods 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
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, migrateRelationships
-
Field Details
-
PORT
private static final org.apache.nifi.components.PropertyDescriptor PORT -
PROPERTY_DESCRIPTORS
-
-
Constructor Details
-
FetchFTP
public FetchFTP()
-
-
Method Details
-
getSupportedPropertyDescriptors
- Overrides:
getSupportedPropertyDescriptorsin classFetchFileTransfer
-
migrateProperties
-
createFileTransfer
- Specified by:
createFileTransferin classFetchFileTransfer
-
customValidate
protected Collection<org.apache.nifi.components.ValidationResult> customValidate(org.apache.nifi.components.ValidationContext validationContext) - Overrides:
customValidatein classorg.apache.nifi.components.AbstractConfigurableComponent
-