I ‘m using NIFI to replicate tables from one relational Database(Mainframe) to other Database, with incremental updates, based on a timestamp and primary key. The process is made with tree custom processors: GenerateListOfTablesToSyncronize -> CreteTableIfNotExists -> IncrementalLoadData. If by mistake, in GenerateListOfTablesToSyncronize i generate the same table twice, I must guarantee the two flows run sequential not in parallel. For that, I need some kind of lock, and the MapCache processors seems to be the solution. The solution I see is:
GenerateListOfTablesToSyncronize -> DetectDuplicte (tableName, with no age Off) ->CreteTableIfNotExists -> IncrementalLoadData –> RemoveDistributedMapCache (tableName)
Unfortunately there isn’t the processor RemoveDistributedMapCache, I could handle this, thanks to Matt Burgess (https://community.hortonworks.com/articles/71837/working-with-a-nifi-distributedmapcache.html) which make possible manipulate directly the Cache using groovy. No one have this kind of requirement to justify the creation of RemoveDistributedMapCache ?