Balázs Gerner created NIFI-15457:
------------------------------------

             Summary: Fix output attribute name of awsTaskId in 
AbstractAwsMachineLearningJobStarter
                 Key: NIFI-15457
                 URL: https://issues.apache.org/jira/browse/NIFI-15457
             Project: Apache NiFi
          Issue Type: Bug
    Affects Versions: 2.7.2, 2.7.1, 2.7.0, 2.6.0
            Reporter: Balázs Gerner
            Assignee: Balázs Gerner


org.apache.nifi.processors.aws.ml.AbstractAwsMachineLearningJobStatusProcessor#TASK_ID
 property was renamed in scope of 
[https://github.infra.cloudera.com/DIM/nifi/commit/a5f143da5e236e788eeb099ce389641ebd2740da]
 

There is a mismatch however with the new output flowfile attribute name and 
what property name the {color:#000000}GetAwsPollyJobStatus{color} processor 
expects by default:
1. StartAwsPollyJob writes a new attribute called '{*}AWS Task ID{*}'
[https://github.infra.cloudera.com/DIM/nifi/blob/a5f143da5e236e788eeb099ce389641ebd2740da/nifi-extension-bundles/nifi-aws-bundle/nifi-aws-abstract-processors/src/main/java/org/apache/nifi/processors/aws/ml/AbstractAwsMachineLearningJobStarter.java#L140]

2. {color:#000000}GetAwsPollyJobStatus reads and evaluates the property value 
of TASK_ID, by default it is *${awsTaskId}*
[https://github.infra.cloudera.com/DIM/nifi/blob/a5f143da5e236e788eeb099ce389641ebd2740da/nifi-extension-bundles/nifi-aws-bundle/nifi-aws-abstract-processors/src/main/java/org/apache/nifi/processors/aws/ml/AbstractAwsMachineLearningJobStatusProcessor.java#L52]
 

*Proposed solution:*
Let the output attribute name in the jobstarter remain 'awsTaskId' so that the 
two processors can be compatible:
{color}
{color:#000000}FlowFile processedFlowFile {color}= 
{color:#000000}session{color}.putAttribute({color:#000000}flowFile{color}, 
{color:#871094}"awsTaskId"{color}, {color:#000000}awsTaskId{color});
{*}{color:#000000}Important:
{color}{*}{color:#000000}This issue is affecting all other AWS ML processors as 
well: Textract, Transcribe, Translate, Polly{color}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to