SunilS
SunilS

Reputation: 2288

Nifi - nipyapi - Updating processor's sensitive variables

I keep on getting the following error while running nipyapi.canvas.update_variable_registry(versionedPG, variable) API from nipyapi.

Do I need to refresh the flow before making this call. Is there any nipyapi call to do the same ?
I referred the following link https://community.cloudera.com/t5/Support-Questions/NIFI-processor-not-the-most-up-to-date/m-p/158171 which states that if you are modifying the component from 2 different places, then I could see this errors. But in my case, I am running python code to modify and update the processor & components.

Also, what does 5 in the error below means.

ERROR:main:[5, null, 0d389912-2f27-31da-d5d2-f399556fb35e] is not the most up-to-date revision. This component appears to have been modified

How to get the most up-to-date revision of the processor ?

Upvotes: 1

Views: 929

Answers (2)

Chaffelson
Chaffelson

Reputation: 1269

This is resolved in version 0.13.3 of NiPyAPI Github

Upvotes: 0

Riduidel
Riduidel

Reputation: 22308

Well, it seems like update_variable_registry is not the good way to update those variables.

enter image description here

According to Nifi http logs examination, you have to

  1. Create an update request through a POST. This is done using submit_update_variable_registry_request(...)
  2. Wait for completin using through a GET of this update request. This is done using get_update_request(...)
  3. Finally DELETE the update request. This is done using delete_update_request(...)

After having tried that, it seems like only the first part is really needed. Part 2 and 3 may be elements of UI refresh ...

Upvotes: 0

Related Questions