Class AzureDataLakeStorageFileResourceService

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

@Tags({"azure","microsoft","cloud","storage","adlsgen2","file","resource","datalake"}) @SeeAlso(FetchAzureDataLakeStorage.class) @CapabilityDescription("Provides an Azure Data Lake Storage (ADLS) file resource for other components.") @UseCase(description="Fetch the specified file from Azure Data Lake Storage. The service provides higher performance compared to fetch processors when the data should be moved between different storages without any transformation.", configuration="\"Filesystem Name\" = \"${azure.filesystem}\"\n\"Directory Name\" = \"${azure.directory}\"\n\"File Name\" = \"${azure.filename}\"\n\nThe \"ADLS Credentials\" property should specify an instance of the ADLSCredentialsService in order to provide credentials for accessing the filesystem.\n") public class AzureDataLakeStorageFileResourceService extends org.apache.nifi.controller.AbstractControllerService implements FileResourceService
  • Field Summary

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

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    private FileResource
    fetchFile(com.azure.storage.file.datalake.DataLakeServiceClient storageClient, Map<String,String> attributes)
    Fetching file from the provided filesystem and directory in ADLS.
     
    protected com.azure.storage.file.datalake.DataLakeServiceClient
     
    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

    • FILESYSTEM

      public static final org.apache.nifi.components.PropertyDescriptor FILESYSTEM
    • DIRECTORY

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

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

      private volatile DataLakeServiceClientFactory clientFactory
    • context

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

    • AzureDataLakeStorageFileResourceService

      public AzureDataLakeStorageFileResourceService()
  • 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.file.datalake.DataLakeServiceClient getStorageClient(Map<String,String> attributes)
    • fetchFile

      private FileResource fetchFile(com.azure.storage.file.datalake.DataLakeServiceClient storageClient, Map<String,String> attributes) throws IOException
      Fetching file from the provided filesystem and directory in ADLS.
      Parameters:
      storageClient - azure data lake service client
      attributes - configuration attributes
      Returns:
      fetched file as FileResource
      Throws:
      IOException - exception caused by missing parameters or blob not found