From 50010fb34064d9cf622e265ed57c9ab0be39318e Mon Sep 17 00:00:00 2001 From: James Wing Date: Thu, 3 Nov 2016 20:24:19 -0700 Subject: [PATCH] NIFI-2948 Fix DynamoDB Cached Credentials This closes #1182 --- .../processors/aws/dynamodb/AbstractDynamoDBProcessor.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/nifi-nar-bundles/nifi-aws-bundle/nifi-aws-processors/src/main/java/org/apache/nifi/processors/aws/dynamodb/AbstractDynamoDBProcessor.java b/nifi-nar-bundles/nifi-aws-bundle/nifi-aws-processors/src/main/java/org/apache/nifi/processors/aws/dynamodb/AbstractDynamoDBProcessor.java index de56e69007..e1a31a90e7 100644 --- a/nifi-nar-bundles/nifi-aws-bundle/nifi-aws-processors/src/main/java/org/apache/nifi/processors/aws/dynamodb/AbstractDynamoDBProcessor.java +++ b/nifi-nar-bundles/nifi-aws-bundle/nifi-aws-processors/src/main/java/org/apache/nifi/processors/aws/dynamodb/AbstractDynamoDBProcessor.java @@ -28,6 +28,7 @@ import java.util.Map; import java.util.Set; import org.apache.commons.lang3.StringUtils; +import org.apache.nifi.annotation.lifecycle.OnStopped; import org.apache.nifi.components.AllowableValue; import org.apache.nifi.components.PropertyDescriptor; import org.apache.nifi.flowfile.FlowFile; @@ -335,4 +336,9 @@ public abstract class AbstractDynamoDBProcessor extends AbstractAWSCredentialsPr return isConsistent; } + + @OnStopped + public void onStopped() { + this.dynamoDB = null; + } }