Class AzureBlobStorageFileResourceService

java.lang.Object
org.apache.nifi.components.AbstractConfigurableComponent
org.apache.nifi.controller.AbstractControllerService
org.apache.nifi.services.azure.storage.AzureBlobStorageFileResourceService
All Implemented Interfaces:
org.apache.nifi.components.ConfigurableComponent, org.apache.nifi.controller.ControllerService, FileResourceService

@Tags({"azure","microsoft","cloud","storage","file","resource","blob"}) @SeeAlso(FetchAzureBlobStorage_v12.class) @CapabilityDescription("Provides an Azure Blob Storage file resource for other components.") @UseCase(description="Fetch a specific file from Azure Blob Storage. The service provides higher performance compared to fetch processors when the data should be moved between different storages without any transformation.", configuration="\"Container Name\" = \"${azure.container}\"\n\"Blob Name\" = \"${azure.blobname}\"\n\nThe \"Storage Credentials\" property should specify an instance of the AzureStorageCredentialsService_v12 in order to provide credentials for accessing the storage container.\n") public class AzureBlobStorageFileResourceService extends org.apache.nifi.controller.AbstractControllerService implements FileResourceService
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final org.apache.nifi.components.PropertyDescriptor
     
     
    static final org.apache.nifi.components.PropertyDescriptor
     
    private org.apache.nifi.controller.ConfigurationContext
     
    private static final List<org.apache.nifi.components.PropertyDescriptor>
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    private FileResource
    fetchBlob(com.azure.storage.blob.BlobServiceClient storageClient, Map<String,String> attributes)
    Fetching blob from the provided container.
     
    protected com.azure.storage.blob.BlobServiceClient
     
    protected List<org.apache.nifi.components.PropertyDescriptor>
     
    void
     
    void
    onEnabled(org.apache.nifi.controller.ConfigurationContext context)
     

    Methods inherited from class org.apache.nifi.controller.AbstractControllerService

    abstractClearConfigContext, abstractStoreConfigContext, disabled, enabled, getConfigurationContext, getControllerServiceLookup, getIdentifier, getLogger, getNodeTypeProvider, getProperty, getStateManager, init, initialize, isEnabled

    Methods inherited from class org.apache.nifi.components.AbstractConfigurableComponent

    customValidate, equals, getPropertyDescriptor, getPropertyDescriptors, getSupportedDynamicPropertyDescriptor, hashCode, onPropertyModified, toString, validate

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface org.apache.nifi.components.ConfigurableComponent

    getIdentifier, getPropertyDescriptor, getPropertyDescriptors, onPropertyModified, validate

    Methods inherited from interface org.apache.nifi.controller.ControllerService

    initialize, isStateful, migrateProperties
  • Field Details

    • CONTAINER

      public static final org.apache.nifi.components.PropertyDescriptor CONTAINER
    • BLOB_NAME

      public static final org.apache.nifi.components.PropertyDescriptor BLOB_NAME
    • PROPERTIES

      private static final List<org.apache.nifi.components.PropertyDescriptor> PROPERTIES
    • clientFactory

      private volatile BlobServiceClientFactory clientFactory
    • context

      private volatile org.apache.nifi.controller.ConfigurationContext context
  • Constructor Details

    • AzureBlobStorageFileResourceService

      public AzureBlobStorageFileResourceService()
  • Method Details

    • getSupportedPropertyDescriptors

      protected List<org.apache.nifi.components.PropertyDescriptor> getSupportedPropertyDescriptors()
      Overrides:
      getSupportedPropertyDescriptors in class org.apache.nifi.components.AbstractConfigurableComponent
    • onEnabled

      @OnEnabled public void onEnabled(org.apache.nifi.controller.ConfigurationContext context)
    • onDisabled

      @OnDisabled public void onDisabled()
    • getFileResource

      public FileResource getFileResource(Map<String,String> attributes)
      Specified by:
      getFileResource in interface FileResourceService
    • getStorageClient

      protected com.azure.storage.blob.BlobServiceClient getStorageClient(Map<String,String> attributes)
    • fetchBlob

      private FileResource fetchBlob(com.azure.storage.blob.BlobServiceClient storageClient, Map<String,String> attributes) throws IOException
      Fetching blob from the provided container.
      Parameters:
      storageClient - azure blob storage client
      attributes - configuration attributes
      Returns:
      fetched blob as FileResource
      Throws:
      IOException - exception caused by missing parameters or blob not found