Class CopyAzureBlobStorage_v12
java.lang.Object
org.apache.nifi.components.AbstractConfigurableComponent
org.apache.nifi.processor.AbstractSessionFactoryProcessor
org.apache.nifi.processor.AbstractProcessor
org.apache.nifi.processors.azure.AbstractAzureBlobProcessor_v12
org.apache.nifi.processors.azure.storage.CopyAzureBlobStorage_v12
- All Implemented Interfaces:
org.apache.nifi.components.ConfigurableComponent,org.apache.nifi.processor.Processor
@Tags({"azure","microsoft","cloud","storage","blob"})
@SeeAlso({ListAzureBlobStorage_v12.class,FetchAzureBlobStorage_v12.class,DeleteAzureBlobStorage_v12.class,PutAzureBlobStorage_v12.class})
@CapabilityDescription("Copies a blob in Azure Blob Storage from one account/container to another. The processor uses Azure Blob Storage client library v12.")
@InputRequirement(INPUT_REQUIRED)
@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") @WritesAttribute(attribute="azure.error.code",description="Error code reported during blob operation") @WritesAttribute(attribute="azure.ignored",description="When Conflict Resolution Strategy is \'ignore\', this property will be true/false depending on whether the blob was ignored.")
public class CopyAzureBlobStorage_v12
extends AbstractAzureBlobProcessor_v12
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final org.apache.nifi.components.PropertyDescriptorstatic final org.apache.nifi.components.PropertyDescriptorstatic final org.apache.nifi.components.PropertyDescriptorprivate static final intprivate static final List<org.apache.nifi.components.PropertyDescriptor> static final org.apache.nifi.components.PropertyDescriptorstatic final org.apache.nifi.components.PropertyDescriptorstatic final org.apache.nifi.components.PropertyDescriptorFields inherited from class org.apache.nifi.processors.azure.AbstractAzureBlobProcessor_v12
BLOB_NAME, REL_FAILURE, REL_SUCCESS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voidcopy(com.azure.storage.blob.BlobClient destinationBlobClient, com.azure.core.http.HttpAuthorization httpAuthorization, String sourceUrl, long blobSize, com.azure.storage.blob.models.BlobRequestConditions sourceRequestConditions, com.azure.storage.blob.models.BlobRequestConditions destinationRequestConditions) private static StringgenerateSas(com.azure.storage.blob.BlobContainerClient sourceContainerClient) private static AzureStorageCredentialsService_v12getCopyFromCredentialsService(org.apache.nifi.processor.ProcessContext context) private static com.azure.core.http.HttpAuthorizationgetHttpAuthorization(AzureStorageCredentialsDetails_v12 credentialsDetails) private static com.azure.core.http.HttpAuthorizationgetHttpAuthorizationFromTokenCredential(com.azure.core.credential.TokenCredential credential) protected List<org.apache.nifi.components.PropertyDescriptor> voidonTrigger(org.apache.nifi.processor.ProcessContext context, org.apache.nifi.processor.ProcessSession session) Methods inherited from class org.apache.nifi.processors.azure.AbstractAzureBlobProcessor_v12
applyBlobMetadata, applyStandardBlobAttributes, createBlobAttributesMap, getRelationships, getStorageClient, getStorageClient, onScheduled, onStoppedMethods 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
customValidate, equals, getPropertyDescriptor, getPropertyDescriptors, getSupportedDynamicPropertyDescriptor, hashCode, onPropertyModified, 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, onPropertyModified, validateMethods inherited from interface org.apache.nifi.processor.Processor
isStateful, migrateProperties, migrateRelationships
-
Field Details
-
GENERATE_SAS_EXPIRY_HOURS
private static final int GENERATE_SAS_EXPIRY_HOURS- See Also:
-
SOURCE_STORAGE_CREDENTIALS_SERVICE
public static final org.apache.nifi.components.PropertyDescriptor SOURCE_STORAGE_CREDENTIALS_SERVICE -
SOURCE_CONTAINER_NAME
public static final org.apache.nifi.components.PropertyDescriptor SOURCE_CONTAINER_NAME -
SOURCE_BLOB_NAME
public static final org.apache.nifi.components.PropertyDescriptor SOURCE_BLOB_NAME -
DESTINATION_STORAGE_CREDENTIALS_SERVICE
public static final org.apache.nifi.components.PropertyDescriptor DESTINATION_STORAGE_CREDENTIALS_SERVICE -
DESTINATION_CONTAINER_NAME
public static final org.apache.nifi.components.PropertyDescriptor DESTINATION_CONTAINER_NAME -
DESTINATION_BLOB_NAME
public static final org.apache.nifi.components.PropertyDescriptor DESTINATION_BLOB_NAME -
PROPERTIES
-
-
Constructor Details
-
CopyAzureBlobStorage_v12
public CopyAzureBlobStorage_v12()
-
-
Method Details
-
getSupportedPropertyDescriptors
- Overrides:
getSupportedPropertyDescriptorsin classorg.apache.nifi.components.AbstractConfigurableComponent
-
onTrigger
public void onTrigger(org.apache.nifi.processor.ProcessContext context, org.apache.nifi.processor.ProcessSession session) throws org.apache.nifi.processor.exception.ProcessException - Specified by:
onTriggerin classorg.apache.nifi.processor.AbstractProcessor- Throws:
org.apache.nifi.processor.exception.ProcessException
-
copy
private void copy(com.azure.storage.blob.BlobClient destinationBlobClient, com.azure.core.http.HttpAuthorization httpAuthorization, String sourceUrl, long blobSize, com.azure.storage.blob.models.BlobRequestConditions sourceRequestConditions, com.azure.storage.blob.models.BlobRequestConditions destinationRequestConditions) -
generateSas
-
getCopyFromCredentialsService
private static AzureStorageCredentialsService_v12 getCopyFromCredentialsService(org.apache.nifi.processor.ProcessContext context) -
getHttpAuthorization
private static com.azure.core.http.HttpAuthorization getHttpAuthorization(AzureStorageCredentialsDetails_v12 credentialsDetails) -
getHttpAuthorizationFromTokenCredential
private static com.azure.core.http.HttpAuthorization getHttpAuthorizationFromTokenCredential(com.azure.core.credential.TokenCredential credential)
-