Class ListAzureDataLakeStorage
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<ADLSFileInfo>
org.apache.nifi.processors.azure.storage.AbstractListAzureProcessor<ADLSFileInfo>
org.apache.nifi.processors.azure.storage.ListAzureDataLakeStorage
- All Implemented Interfaces:
org.apache.nifi.components.ConfigurableComponent,org.apache.nifi.processor.Processor,org.apache.nifi.processor.VerifiableProcessor
@PrimaryNodeOnly
@TriggerSerially
@Tags({"azure","microsoft","cloud","storage","adlsgen2","datalake"})
@SeeAlso({PutAzureDataLakeStorage.class,DeleteAzureDataLakeStorage.class,FetchAzureDataLakeStorage.class})
@CapabilityDescription("Lists directory in an Azure Data Lake Storage Gen 2 filesystem")
@WritesAttribute(attribute="azure.filesystem",description="The name of the Azure File System") @WritesAttribute(attribute="azure.filePath",description="The full path of the Azure File") @WritesAttribute(attribute="azure.directory",description="The name of the Azure Directory") @WritesAttribute(attribute="azure.filename",description="The name of the Azure File") @WritesAttribute(attribute="azure.length",description="The length of the Azure File") @WritesAttribute(attribute="azure.lastModified",description="The last modification time of the Azure File") @WritesAttribute(attribute="azure.etag",description="The ETag of the Azure File")
@InputRequirement(INPUT_FORBIDDEN)
@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 can pick up where the previous node left off, without duplicating the data.")
@DefaultSchedule(strategy=TIMER_DRIVEN,
period="1 min")
public class ListAzureDataLakeStorage
extends AbstractListAzureProcessor<ADLSFileInfo>
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.nifi.processor.util.list.AbstractListProcessor
AbstractListProcessor.ListingMode -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate DataLakeServiceClientFactorystatic final org.apache.nifi.components.PropertyDescriptorprivate Patternstatic final org.apache.nifi.components.PropertyDescriptorprivate static final Set<org.apache.nifi.components.PropertyDescriptor> static final org.apache.nifi.components.PropertyDescriptorprivate Patternprivate static final List<org.apache.nifi.components.PropertyDescriptor> static final org.apache.nifi.components.PropertyDescriptorFields inherited from class org.apache.nifi.processors.azure.storage.AbstractListAzureProcessor
MAX_AGE, MAX_SIZE, MIN_AGE, MIN_SIZEFields 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 IntegercountUnfilteredListing(org.apache.nifi.processor.ProcessContext context) createAttributes(ADLSFileInfo fileInfo, org.apache.nifi.processor.ProcessContext context) protected voidcustomValidate(org.apache.nifi.components.ValidationContext context, Collection<org.apache.nifi.components.ValidationResult> results) protected Stringprotected StringgetListingContainerName(org.apache.nifi.processor.ProcessContext context) protected StringgetPath(org.apache.nifi.processor.ProcessContext context) private PatterngetPattern(org.apache.nifi.processor.ProcessContext context, org.apache.nifi.components.PropertyDescriptor filterDescriptor) protected RecordSchemaprotected org.apache.nifi.components.state.ScopegetStateScope(org.apache.nifi.context.PropertyContext context) protected List<org.apache.nifi.components.PropertyDescriptor> protected booleanisListingResetNecessary(org.apache.nifi.components.PropertyDescriptor property) voidonScheduled(org.apache.nifi.processor.ProcessContext context) voidprotected List<ADLSFileInfo> performListing(org.apache.nifi.processor.ProcessContext context, Long minTimestamp, AbstractListProcessor.ListingMode listingMode) private List<ADLSFileInfo> performListing(org.apache.nifi.processor.ProcessContext context, Long minTimestamp, AbstractListProcessor.ListingMode listingMode, boolean applyFilters) Methods inherited from class org.apache.nifi.processors.azure.storage.AbstractListAzureProcessor
isFileInfoMatchesWithAgeAndSizeMethods inherited from class org.apache.nifi.processor.util.list.AbstractListProcessor
createListedEntityTracker, customValidate, getCurrentNanoTime, getCurrentTime, getKey, getRelationships, initListedEntityTracker, listByNoTracking, listByTimeWindow, listByTrackingTimestamps, migrateProperties, 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
-
RECURSE_SUBDIRECTORIES
public static final org.apache.nifi.components.PropertyDescriptor RECURSE_SUBDIRECTORIES -
FILE_FILTER
public static final org.apache.nifi.components.PropertyDescriptor FILE_FILTER -
PATH_FILTER
public static final org.apache.nifi.components.PropertyDescriptor PATH_FILTER -
INCLUDE_TEMPORARY_FILES
public static final org.apache.nifi.components.PropertyDescriptor INCLUDE_TEMPORARY_FILES -
PROPERTIES
-
LISTING_RESET_PROPERTIES
-
filePattern
-
pathPattern
-
clientFactory
-
-
Constructor Details
-
ListAzureDataLakeStorage
public ListAzureDataLakeStorage()
-
-
Method Details
-
getSupportedPropertyDescriptors
- Overrides:
getSupportedPropertyDescriptorsin classorg.apache.nifi.components.AbstractConfigurableComponent
-
onScheduled
@OnScheduled public void onScheduled(org.apache.nifi.processor.ProcessContext context) -
onStopped
@OnStopped public void onStopped() -
customValidate
protected void customValidate(org.apache.nifi.components.ValidationContext context, Collection<org.apache.nifi.components.ValidationResult> results) - Overrides:
customValidatein classAbstractListProcessor<ADLSFileInfo>
-
getRecordSchema
- Specified by:
getRecordSchemain classAbstractListProcessor<ADLSFileInfo>
-
getStateScope
protected org.apache.nifi.components.state.Scope getStateScope(org.apache.nifi.context.PropertyContext context) - Specified by:
getStateScopein classAbstractListProcessor<ADLSFileInfo>
-
getDefaultTimePrecision
- Overrides:
getDefaultTimePrecisionin classAbstractListProcessor<ADLSFileInfo>
-
isListingResetNecessary
protected boolean isListingResetNecessary(org.apache.nifi.components.PropertyDescriptor property) - Specified by:
isListingResetNecessaryin classAbstractListProcessor<ADLSFileInfo>
-
getPath
- Specified by:
getPathin classAbstractListProcessor<ADLSFileInfo>
-
performListing
protected List<ADLSFileInfo> performListing(org.apache.nifi.processor.ProcessContext context, Long minTimestamp, AbstractListProcessor.ListingMode listingMode) throws IOException - Specified by:
performListingin classAbstractListProcessor<ADLSFileInfo>- Throws:
IOException
-
countUnfilteredListing
protected Integer countUnfilteredListing(org.apache.nifi.processor.ProcessContext context) throws IOException - Specified by:
countUnfilteredListingin classAbstractListProcessor<ADLSFileInfo>- Throws:
IOException
-
getListingContainerName
- Specified by:
getListingContainerNamein classAbstractListProcessor<ADLSFileInfo>
-
createAttributes
protected Map<String,String> createAttributes(ADLSFileInfo fileInfo, org.apache.nifi.processor.ProcessContext context) - Specified by:
createAttributesin classAbstractListProcessor<ADLSFileInfo>
-
performListing
private List<ADLSFileInfo> performListing(org.apache.nifi.processor.ProcessContext context, Long minTimestamp, AbstractListProcessor.ListingMode listingMode, boolean applyFilters) throws IOException - Throws:
IOException
-
getPattern
private Pattern getPattern(org.apache.nifi.processor.ProcessContext context, org.apache.nifi.components.PropertyDescriptor filterDescriptor)
-