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
FieldsModifier and TypeFieldDescriptionstatic final org.apache.nifi.components.PropertyDescriptorprivate BlobServiceClientFactorystatic final org.apache.nifi.components.PropertyDescriptorprivate org.apache.nifi.controller.ConfigurationContextprivate static final List<org.apache.nifi.components.PropertyDescriptor> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate FileResourceFetching blob from the provided container.getFileResource(Map<String, String> attributes) protected com.azure.storage.blob.BlobServiceClientgetStorageClient(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
-
CONTAINER
public static final org.apache.nifi.components.PropertyDescriptor CONTAINER -
BLOB_NAME
public static final org.apache.nifi.components.PropertyDescriptor BLOB_NAME -
PROPERTIES
-
clientFactory
-
context
private volatile org.apache.nifi.controller.ConfigurationContext context
-
-
Constructor Details
-
AzureBlobStorageFileResourceService
public AzureBlobStorageFileResourceService()
-
-
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
-
fetchBlob
private FileResource fetchBlob(com.azure.storage.blob.BlobServiceClient storageClient, Map<String, String> attributes) throws IOExceptionFetching blob from the provided container.- Parameters:
storageClient- azure blob storage clientattributes- configuration attributes- Returns:
- fetched blob as FileResource
- Throws:
IOException- exception caused by missing parameters or blob not found
-