Class ListFTP
java.lang.Object
org.apache.nifi.components.AbstractConfigurableComponent
org.apache.nifi.processor.AbstractSessionFactoryProcessor
org.apache.nifi.processor.AbstractProcessor
org.apache.nifi.processor.util.list.AbstractListProcessor<FileInfo>
org.apache.nifi.processor.util.file.transfer.ListFileTransfer
org.apache.nifi.processors.standard.ListFTP
- All Implemented Interfaces:
org.apache.nifi.components.ConfigurableComponent,org.apache.nifi.processor.Processor,org.apache.nifi.processor.VerifiableProcessor
@PrimaryNodeOnly
@TriggerSerially
@InputRequirement(INPUT_FORBIDDEN)
@Tags({"list","ftp","remote","ingest","source","input","files"})
@CapabilityDescription("Performs a listing of the files residing on an FTP server. For each file that is found on the remote server, a new FlowFile will be created with the filename attribute set to the name of the file on the remote server. This can then be used in conjunction with FetchFTP in order to fetch those files.")
@SeeAlso({FetchFTP.class,GetFTP.class,PutFTP.class})
@WritesAttribute(attribute="ftp.remote.host",description="The hostname of the FTP Server") @WritesAttribute(attribute="ftp.remote.port",description="The port that was connected to on the FTP Server") @WritesAttribute(attribute="ftp.listing.user",description="The username of the user that performed the FTP Listing") @WritesAttribute(attribute="file.owner",description="The numeric owner id of the source file") @WritesAttribute(attribute="file.group",description="The numeric group id of the source file") @WritesAttribute(attribute="file.permissions",description="The read/write/execute permissions of the source file") @WritesAttribute(attribute="file.size",description="The number of bytes in the source file") @WritesAttribute(attribute="file.lastModifiedTime",description="The timestamp of when the file in the filesystem waslast modified as \'yyyy-MM-dd\'T\'HH:mm:ssZ\'") @WritesAttribute(attribute="filename",description="The name of the file on the FTP Server") @WritesAttribute(attribute="path",description="The fully qualified name of the directory on the FTP Server from which the file was pulled")
@Stateful(scopes=CLUSTER,
description="After performing a listing of files, the timestamp of the newest file is stored. This allows the Processor to list only files that have been added or modified after this date the next time that the Processor is run. State is stored across the cluster so that this Processor can be run on Primary Node only and if a new Primary Node is selected, the new node will not duplicate the data that was listed by the previous Primary Node.")
@DefaultSchedule(strategy=TIMER_DRIVEN,
period="1 min")
public class ListFTP
extends ListFileTransfer
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.nifi.processor.util.list.AbstractListProcessor
AbstractListProcessor.ListingMode -
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.ListFileTransfer
FILE_TRANSFER_LISTING_STRATEGY, HOSTNAME, REMOTE_PATH, UNDEFAULTED_PORT, USERNAMEFields inherited from class org.apache.nifi.processor.util.list.AbstractListProcessor
BY_ENTITIES, BY_TIME_WINDOW, BY_TIMESTAMPS, LISTING_LAG_MILLIS, LISTING_STRATEGY, NO_TRACKING, PRECISION_AUTO_DETECT, PRECISION_MILLIS, PRECISION_MINUTES, PRECISION_SECONDS, RECORD_WRITER, REL_SUCCESS, TARGET_SYSTEM_TIMESTAMP_PRECISION -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidcustomValidate(org.apache.nifi.components.ValidationContext validationContext, Collection<org.apache.nifi.components.ValidationResult> results) protected FileTransfergetFileTransfer(org.apache.nifi.processor.ProcessContext context) protected Stringprotected org.apache.nifi.components.state.ScopegetStateScope(org.apache.nifi.context.PropertyContext context) protected List<org.apache.nifi.components.PropertyDescriptor> voidMethods inherited from class org.apache.nifi.processor.util.file.transfer.ListFileTransfer
countUnfilteredListing, createAttributes, getListingContainerName, getPath, getRecordSchema, isListingResetNecessary, performListing, performListingMethods inherited from class org.apache.nifi.processor.util.list.AbstractListProcessor
createListedEntityTracker, customValidate, getCurrentNanoTime, getCurrentTime, getDefaultTimePrecision, getKey, getRelationships, initListedEntityTracker, listByNoTracking, listByTimeWindow, listByTrackingTimestamps, onPrimaryNodeChange, onPropertyModified, onTrigger, updateState, verifyMethods 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, 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, 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
-
ListFTP
public ListFTP()
-
-
Method Details
-
getSupportedPropertyDescriptors
- Overrides:
getSupportedPropertyDescriptorsin classorg.apache.nifi.components.AbstractConfigurableComponent
-
migrateProperties
- Specified by:
migratePropertiesin interfaceorg.apache.nifi.processor.Processor- Overrides:
migratePropertiesin classAbstractListProcessor<FileInfo>
-
getFileTransfer
- Specified by:
getFileTransferin classListFileTransfer
-
getProtocolName
- Specified by:
getProtocolNamein classListFileTransfer
-
getStateScope
protected org.apache.nifi.components.state.Scope getStateScope(org.apache.nifi.context.PropertyContext context) - Specified by:
getStateScopein classAbstractListProcessor<FileInfo>
-
customValidate
protected void customValidate(org.apache.nifi.components.ValidationContext validationContext, Collection<org.apache.nifi.components.ValidationResult> results) - Overrides:
customValidatein classAbstractListProcessor<FileInfo>
-