Class LegacyBlobStorageEventPositionProvider
java.lang.Object
org.apache.nifi.processors.azure.eventhub.position.LegacyBlobStorageEventPositionProvider
- All Implemented Interfaces:
EventPositionProvider
Event Position Provider using Azure Blob Storage implemented in Azure Event Hubs SDK Version 3
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionLegacyBlobStorageEventPositionProvider(com.azure.storage.blob.BlobContainerAsyncClient blobContainerAsyncClient, String consumerGroup) -
Method Summary
Modifier and TypeMethodDescriptionprivate booleanprivate com.azure.messaging.eventhubs.models.EventPositiongetEventPosition(com.azure.storage.blob.models.BlobItem blobItem) Get Initial Partition Event Position using Azure Blob Storage as persisted in com.microsoft.azure.eventprocessorhost.AzureStorageCheckpointLeaseManagergetPartitionEventPosition(Iterable<com.azure.storage.blob.models.BlobItem> blobItems) private StringgetPartitionId(com.azure.storage.blob.models.BlobItem blobItem) private booleanitemExists(com.azure.storage.blob.BlobAsyncClient blobAsyncClient)
-
Field Details
-
LEASE_SEQUENCE_NUMBER_FIELD
- See Also:
-
logger
private static final org.slf4j.Logger logger -
objectMapper
private static final com.fasterxml.jackson.databind.ObjectMapper objectMapper -
blobContainerAsyncClient
private final com.azure.storage.blob.BlobContainerAsyncClient blobContainerAsyncClient -
consumerGroup
-
-
Constructor Details
-
LegacyBlobStorageEventPositionProvider
public LegacyBlobStorageEventPositionProvider(com.azure.storage.blob.BlobContainerAsyncClient blobContainerAsyncClient, String consumerGroup)
-
-
Method Details
-
getInitialPartitionEventPosition
public Map<String,com.azure.messaging.eventhubs.models.EventPosition> getInitialPartitionEventPosition()Get Initial Partition Event Position using Azure Blob Storage as persisted in com.microsoft.azure.eventprocessorhost.AzureStorageCheckpointLeaseManager- Specified by:
getInitialPartitionEventPositionin interfaceEventPositionProvider- Returns:
- Map of Partition and Event Position or empty when no checkpoints found
-
getPartitionEventPosition
-
getPartitionId
-
getEventPosition
private com.azure.messaging.eventhubs.models.EventPosition getEventPosition(com.azure.storage.blob.models.BlobItem blobItem) -
containerExists
private boolean containerExists() -
itemExists
private boolean itemExists(com.azure.storage.blob.BlobAsyncClient blobAsyncClient)
-