Class ListAzureBlobStorage_v12
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<BlobInfo>
org.apache.nifi.processors.azure.storage.AbstractListAzureProcessor<BlobInfo>
org.apache.nifi.processors.azure.storage.ListAzureBlobStorage_v12
- 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","blob"})
@SeeAlso({FetchAzureBlobStorage_v12.class,PutAzureBlobStorage_v12.class,DeleteAzureBlobStorage_v12.class,CopyAzureBlobStorage_v12.class})
@CapabilityDescription("Lists blobs in an Azure Blob Storage container. Listing details are attached to an empty FlowFile for use with FetchAzureBlobStorage. This Processor is designed to run on Primary Node only in a cluster. If the primary node changes, the new Primary Node will pick up where the previous node left off without duplicating all of the data. The processor uses Azure Blob Storage client library v12.")
@InputRequirement(INPUT_FORBIDDEN)
@WritesAttribute(attribute="azure.container",description="The name of the Azure Blob Storage container") @WritesAttribute(attribute="azure.blobname",description="The name of the blob on Azure Blob Storage") @WritesAttribute(attribute="azure.primaryUri",description="Primary location of the blob") @WritesAttribute(attribute="azure.etag",description="ETag of the blob") @WritesAttribute(attribute="azure.blobtype",description="Type of the blob (either BlockBlob, PageBlob or AppendBlob)") @WritesAttribute(attribute="mime.type",description="MIME Type of the content") @WritesAttribute(attribute="lang",description="Language code for the content") @WritesAttribute(attribute="azure.timestamp",description="Timestamp of the blob") @WritesAttribute(attribute="azure.length",description="Length of the blob")
@Stateful(scopes=CLUSTER,
description="After performing a listing of blobs, the timestamp of the newest blob is stored if \'Tracking Timestamps\' Listing Strategy is in use (by default). This allows the Processor to list only blobs 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 ListAzureBlobStorage_v12
extends AbstractListAzureProcessor<BlobInfo>
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.nifi.processor.util.list.AbstractListProcessor
AbstractListProcessor.ListingMode -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final org.apache.nifi.components.PropertyDescriptorprivate BlobServiceClientFactorystatic 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.components.PropertyDescriptorstatic 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(BlobInfo entity, org.apache.nifi.processor.ProcessContext context) protected Stringprotected StringgetListingContainerName(org.apache.nifi.processor.ProcessContext context) protected StringgetPath(org.apache.nifi.processor.ProcessContext context) 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) voidperformListing(org.apache.nifi.processor.ProcessContext context, Long minTimestamp, AbstractListProcessor.ListingMode listingMode) Methods inherited from class org.apache.nifi.processors.azure.storage.AbstractListAzureProcessor
isFileInfoMatchesWithAgeAndSizeMethods inherited from class org.apache.nifi.processor.util.list.AbstractListProcessor
createListedEntityTracker, customValidate, 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
-
CONTAINER
public static final org.apache.nifi.components.PropertyDescriptor CONTAINER -
BLOB_NAME_PREFIX
public static final org.apache.nifi.components.PropertyDescriptor BLOB_NAME_PREFIX -
TRACKING_STATE_CACHE
public static final org.apache.nifi.components.PropertyDescriptor TRACKING_STATE_CACHE -
TRACKING_TIME_WINDOW
public static final org.apache.nifi.components.PropertyDescriptor TRACKING_TIME_WINDOW -
INITIAL_LISTING_TARGET
public static final org.apache.nifi.components.PropertyDescriptor INITIAL_LISTING_TARGET -
PROPERTIES
-
clientFactory
-
-
Constructor Details
-
ListAzureBlobStorage_v12
public ListAzureBlobStorage_v12()
-
-
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() -
getPath
- Specified by:
getPathin classAbstractListProcessor<BlobInfo>
-
getStateScope
protected org.apache.nifi.components.state.Scope getStateScope(org.apache.nifi.context.PropertyContext context) - Specified by:
getStateScopein classAbstractListProcessor<BlobInfo>
-
getRecordSchema
- Specified by:
getRecordSchemain classAbstractListProcessor<BlobInfo>
-
countUnfilteredListing
protected Integer countUnfilteredListing(org.apache.nifi.processor.ProcessContext context) throws IOException - Specified by:
countUnfilteredListingin classAbstractListProcessor<BlobInfo>- Throws:
IOException
-
getListingContainerName
- Specified by:
getListingContainerNamein classAbstractListProcessor<BlobInfo>
-
getDefaultTimePrecision
- Overrides:
getDefaultTimePrecisionin classAbstractListProcessor<BlobInfo>
-
isListingResetNecessary
protected boolean isListingResetNecessary(org.apache.nifi.components.PropertyDescriptor property) - Specified by:
isListingResetNecessaryin classAbstractListProcessor<BlobInfo>
-
performListing
protected List<BlobInfo> performListing(org.apache.nifi.processor.ProcessContext context, Long minTimestamp, AbstractListProcessor.ListingMode listingMode) throws IOException - Specified by:
performListingin classAbstractListProcessor<BlobInfo>- Throws:
IOException
-
createAttributes
protected Map<String,String> createAttributes(BlobInfo entity, org.apache.nifi.processor.ProcessContext context) - Specified by:
createAttributesin classAbstractListProcessor<BlobInfo>
-