Class AbstractDynamoDBProcessor

java.lang.Object
org.apache.nifi.components.AbstractConfigurableComponent
org.apache.nifi.processor.AbstractSessionFactoryProcessor
org.apache.nifi.processors.aws.v2.AbstractAwsProcessor<software.amazon.awssdk.services.dynamodb.DynamoDbClient>
org.apache.nifi.processors.aws.v2.AbstractAwsSyncProcessor<software.amazon.awssdk.services.dynamodb.DynamoDbClient,software.amazon.awssdk.services.dynamodb.DynamoDbClientBuilder>
org.apache.nifi.processors.aws.dynamodb.AbstractDynamoDBProcessor
All Implemented Interfaces:
ConfigurableComponent, Processor, VerifiableProcessor

public abstract class AbstractDynamoDBProcessor extends AbstractAwsSyncProcessor<software.amazon.awssdk.services.dynamodb.DynamoDbClient,software.amazon.awssdk.services.dynamodb.DynamoDbClientBuilder>
Base class for NiFi dynamo db related processors
  • Field Details

  • Constructor Details

    • AbstractDynamoDBProcessor

      public AbstractDynamoDBProcessor()
  • Method Details

    • getRelationships

      public Set<Relationship> getRelationships()
      Specified by:
      getRelationships in interface Processor
      Overrides:
      getRelationships in class AbstractAwsProcessor<software.amazon.awssdk.services.dynamodb.DynamoDbClient>
    • createClientBuilder

      protected software.amazon.awssdk.services.dynamodb.DynamoDbClientBuilder createClientBuilder(ProcessContext context)
      Description copied from class: AbstractAwsSyncProcessor
      Construct the AWS SDK client builder and perform any service-specific configuration of the builder.
      Specified by:
      createClientBuilder in class AbstractAwsSyncProcessor<software.amazon.awssdk.services.dynamodb.DynamoDbClient,software.amazon.awssdk.services.dynamodb.DynamoDbClientBuilder>
      Parameters:
      context - The process context
      Returns:
      The SDK client builder
    • getAttributeValue

      protected software.amazon.awssdk.services.dynamodb.model.AttributeValue getAttributeValue(ProcessContext context, PropertyDescriptor type, PropertyDescriptor value, Map<String,String> attributes)
    • processException

      protected List<FlowFile> processException(ProcessSession session, List<FlowFile> flowFiles, Exception exception)
    • processSdkException

      protected List<FlowFile> processSdkException(ProcessSession session, List<FlowFile> flowFiles, software.amazon.awssdk.core.exception.SdkException exception)
    • processServiceException

      protected List<FlowFile> processServiceException(ProcessSession session, List<FlowFile> flowFiles, software.amazon.awssdk.awscore.exception.AwsServiceException exception)
    • sendUnprocessedToUnprocessedRelationship

      protected void sendUnprocessedToUnprocessedRelationship(ProcessSession session, Map<ItemKeys,FlowFile> keysToFlowFileMap, software.amazon.awssdk.services.dynamodb.model.AttributeValue hashKeyValue, software.amazon.awssdk.services.dynamodb.model.AttributeValue rangeKeyValue)
      Send unhandled items to failure and remove the flow files from key to flow file map
      Parameters:
      session - used for sending the flow file
      keysToFlowFileMap - - ItemKeys to flow file map
      hashKeyValue - the items hash key value
      rangeKeyValue - the items hash key value
    • isRangeKeyValueConsistent

      protected boolean isRangeKeyValueConsistent(String rangeKeyName, software.amazon.awssdk.services.dynamodb.model.AttributeValue rangeKeyValue, ProcessSession session, FlowFile flowFile)
    • validateRangeKeyValue

      protected void validateRangeKeyValue(String rangeKeyName, software.amazon.awssdk.services.dynamodb.model.AttributeValue rangeKeyValue)
    • isHashKeyValueConsistent

      protected boolean isHashKeyValueConsistent(String hashKeyName, software.amazon.awssdk.services.dynamodb.model.AttributeValue hashKeyValue, ProcessSession session, FlowFile flowFile)
    • validateHashKeyValue

      protected void validateHashKeyValue(software.amazon.awssdk.services.dynamodb.model.AttributeValue hashKeyValue)
    • isBlank

      protected static boolean isBlank(software.amazon.awssdk.services.dynamodb.model.AttributeValue attributeValue)
      Parameters:
      attributeValue - At attribute value
      Returns:
      True if the AttributeValue is null or both 's' and 'n' are null or blank