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
FieldsModifier and TypeFieldDescriptionprivate DataLakeServiceClientFactoryprivate org.apache.nifi.controller.ConfigurationContextstatic final org.apache.nifi.components.PropertyDescriptorstatic final org.apache.nifi.components.PropertyDescriptorprivate static final List<org.apache.nifi.components.PropertyDescriptor> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate FileResourcefetchFile(com.azure.storage.file.datalake.DataLakeServiceClient storageClient, Map<String, String> attributes) Fetching file from the provided filesystem and directory in ADLS.getFileResource(Map<String, String> attributes) protected com.azure.storage.file.datalake.DataLakeServiceClientgetStorageClient(Map<String, String> attributes) protected List<org.apache.nifi.components.PropertyDescriptor> voidvoidonEnabled(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, isEnabledMethods inherited from class org.apache.nifi.components.AbstractConfigurableComponent
customValidate, equals, getPropertyDescriptor, getPropertyDescriptors, getSupportedDynamicPropertyDescriptor, hashCode, onPropertyModified, toString, validateMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.nifi.components.ConfigurableComponent
getIdentifier, getPropertyDescriptor, getPropertyDescriptors, onPropertyModified, validateMethods 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
-
clientFactory
-
context
private volatile org.apache.nifi.controller.ConfigurationContext context
-
-
Constructor Details
-
AzureDataLakeStorageFileResourceService
public AzureDataLakeStorageFileResourceService()
-
-
Method Details
-
getSupportedPropertyDescriptors
- Overrides:
getSupportedPropertyDescriptorsin classorg.apache.nifi.components.AbstractConfigurableComponent
-
onEnabled
@OnEnabled public void onEnabled(org.apache.nifi.controller.ConfigurationContext context) -
onDisabled
@OnDisabled public void onDisabled() -
getFileResource
- Specified by:
getFileResourcein interfaceFileResourceService
-
getStorageClient
-
fetchFile
private FileResource fetchFile(com.azure.storage.file.datalake.DataLakeServiceClient storageClient, Map<String, String> attributes) throws IOExceptionFetching file from the provided filesystem and directory in ADLS.- Parameters:
storageClient- azure data lake service clientattributes- configuration attributes- Returns:
- fetched file as FileResource
- Throws:
IOException- exception caused by missing parameters or blob not found
-