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 Summary
FieldsModifier and TypeFieldDescriptionstatic final AllowableValuestatic final AllowableValuestatic final Stringstatic final PropertyDescriptorstatic final PropertyDescriptorstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringprotected static final Stringstatic final Stringstatic final Stringstatic final Set<Relationship> static final PropertyDescriptorstatic final PropertyDescriptorstatic final PropertyDescriptorstatic final PropertyDescriptorstatic final PropertyDescriptorstatic final PropertyDescriptorstatic final PropertyDescriptorstatic final Relationshipstatic final PropertyDescriptorFields inherited from class org.apache.nifi.processors.aws.v2.AbstractAwsProcessor
AWS_CREDENTIALS_PROVIDER_SERVICE, DEFAULT_USER_AGENT, ENDPOINT_OVERRIDE, PROXY_CONFIGURATION_SERVICE, REGION, REL_FAILURE, REL_SUCCESS, SSL_CONTEXT_SERVICE, TIMEOUT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected software.amazon.awssdk.services.dynamodb.DynamoDbClientBuildercreateClientBuilder(ProcessContext context) Construct the AWS SDK client builder and perform any service-specific configuration of the builder.protected software.amazon.awssdk.services.dynamodb.model.AttributeValuegetAttributeValue(ProcessContext context, PropertyDescriptor type, PropertyDescriptor value, Map<String, String> attributes) protected static booleanisBlank(software.amazon.awssdk.services.dynamodb.model.AttributeValue attributeValue) protected booleanisHashKeyValueConsistent(String hashKeyName, software.amazon.awssdk.services.dynamodb.model.AttributeValue hashKeyValue, ProcessSession session, FlowFile flowFile) protected booleanisRangeKeyValueConsistent(String rangeKeyName, software.amazon.awssdk.services.dynamodb.model.AttributeValue rangeKeyValue, ProcessSession session, FlowFile flowFile) processException(ProcessSession session, List<FlowFile> flowFiles, Exception exception) processSdkException(ProcessSession session, List<FlowFile> flowFiles, software.amazon.awssdk.core.exception.SdkException exception) processServiceException(ProcessSession session, List<FlowFile> flowFiles, software.amazon.awssdk.awscore.exception.AwsServiceException exception) protected voidsendUnprocessedToUnprocessedRelationship(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 mapprotected voidvalidateHashKeyValue(software.amazon.awssdk.services.dynamodb.model.AttributeValue hashKeyValue) protected voidvalidateRangeKeyValue(String rangeKeyName, software.amazon.awssdk.services.dynamodb.model.AttributeValue rangeKeyValue) Methods inherited from class org.apache.nifi.processors.aws.v2.AbstractAwsSyncProcessor
configureHttpClient, createClient, createClientMethods inherited from class org.apache.nifi.processors.aws.v2.AbstractAwsProcessor
configureClientBuilder, configureClientBuilder, configureEndpoint, configureSdkHttpClient, getClient, getClient, getCredentialsProvider, getRegion, migrateProperties, onScheduled, onStopped, onTrigger, onTrigger, verifyMethods 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, getSupportedPropertyDescriptors, 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, migrateRelationships
-
Field Details
-
REL_UNPROCESSED
-
ALLOWABLE_VALUE_STRING
-
ALLOWABLE_VALUE_NUMBER
-
DYNAMODB_KEY_ERROR_UNPROCESSED
- See Also:
-
DYNAMODB_RANGE_KEY_VALUE_ERROR
- See Also:
-
DYNAMODB_HASH_KEY_VALUE_ERROR
- See Also:
-
DYNAMODB_KEY_ERROR_NOT_FOUND
- See Also:
-
DYNAMODB_ERROR_EXCEPTION_MESSAGE
- See Also:
-
DYNAMODB_ERROR_CODE
- See Also:
-
DYNAMODB_ERROR_MESSAGE
- See Also:
-
DYNAMODB_ERROR_SERVICE
- See Also:
-
DYNAMODB_ERROR_RETRYABLE
- See Also:
-
DYNAMODB_ERROR_REQUEST_ID
- See Also:
-
DYNAMODB_ERROR_STATUS_CODE
- See Also:
-
DYNAMODB_ITEM_HASH_KEY_VALUE
- See Also:
-
DYNAMODB_ITEM_RANGE_KEY_VALUE
- See Also:
-
DYNAMODB_ITEM_IO_ERROR
- See Also:
-
AWS_DYNAMO_DB_ITEM_SIZE_ERROR
- See Also:
-
DYNAMODB_KEY_ERROR_NOT_FOUND_MESSAGE
- See Also:
-
TABLE
-
HASH_KEY_VALUE
-
RANGE_KEY_VALUE
-
HASH_KEY_VALUE_TYPE
-
RANGE_KEY_VALUE_TYPE
-
HASH_KEY_NAME
-
RANGE_KEY_NAME
-
JSON_DOCUMENT
-
BATCH_SIZE
-
DOCUMENT_CHARSET
-
dynamoDBrelationships
-
-
Constructor Details
-
AbstractDynamoDBProcessor
public AbstractDynamoDBProcessor()
-
-
Method Details
-
getRelationships
- Specified by:
getRelationshipsin interfaceProcessor- Overrides:
getRelationshipsin classAbstractAwsProcessor<software.amazon.awssdk.services.dynamodb.DynamoDbClient>
-
createClientBuilder
protected software.amazon.awssdk.services.dynamodb.DynamoDbClientBuilder createClientBuilder(ProcessContext context) Description copied from class:AbstractAwsSyncProcessorConstruct the AWS SDK client builder and perform any service-specific configuration of the builder.- Specified by:
createClientBuilderin classAbstractAwsSyncProcessor<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
-
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 filekeysToFlowFileMap- - ItemKeys to flow file maphashKeyValue- the items hash key valuerangeKeyValue- 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
-