krisztina-zsihovszki commented on code in PR #7051:
URL: https://github.com/apache/nifi/pull/7051#discussion_r1143701000
##########
nifi-nar-bundles/nifi-aws-bundle/nifi-aws-abstract-processors/src/main/java/org/apache/nifi/processors/aws/AbstractAWSProcessor.java:
##########
@@ -312,21 +312,9 @@ public void onTrigger(final ProcessContext context, final
ProcessSessionFactory
*/
public abstract void onTrigger(final ProcessContext context, final
ProcessSession session) throws ProcessException;
- protected Region getRegionAndInitializeEndpoint(final ProcessContext
context, final AmazonWebServiceClient client) {
- final Region region;
- // if the processor supports REGION, get the configured region.
- if (getSupportedPropertyDescriptors().contains(REGION)) {
- final String regionValue = context.getProperty(REGION).getValue();
- if (regionValue != null) {
- region = Region.getRegion(Regions.fromName(regionValue));
- if (client != null) {
- client.setRegion(region);
- }
- } else {
- region = null;
- }
- } else {
- region = null;
+ protected void initializeEndpoint(final Region region, final
ProcessContext context, final AmazonWebServiceClient client) {
Review Comment:
Usually the region is taken from the context but in case it is is defined in
the incoming flow file's 's3.region' attribute, it can not be fetched from the
context.
This method is invoked by AbstractS3Processor specially, where the region
can be taken from the flow file attribute.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]