markap14 commented on issue #3518: NIFI-6322: Introduced EvaluationContext to 
store state while making evaluator tree reusable
URL: https://github.com/apache/nifi/pull/3518#issuecomment-501716359
 
 
   @FrederikP thanks for the follow-up! And now that I think about it, you are 
very correct - the thread safety will be an issue here. Evaluators never needed 
to be thread-safe, so I didn't think about it, but once we start reusing the 
Evaluators like this, thread safety will be a concern... and of course I'd have 
figured that out the first time that I tried to actually use it in a fairly 
complex flow :) Great catch there!
   
   OK, so given that, I am happy to go with this PR after I do some testing, 
etc. So I will likely have it merged today. The only thing that I would like to 
change is the name of `EvaluationContext`, if you are ok with it. I'd rather 
call it something like `EvaluatorState` for two reasons: a) The object is 
intended to store/retrieve state rather than provide a wholistic context around 
which the function is being applied, and b) I have been working on adding 
Parameters to NiFi, and in that branch I do actually introduce a new interface 
called `EvaluationContext` that replaces the current `Map<String, String> 
attributes` in the evaluator, and provides additional context. So when that is 
merged in, I want to have the `EvaluationContext` that you introduced renamed 
to something like `EvaluatorState` and then have the `EvaluationContext` wrap 
that, as well as the `Map<String, String> attributes` and other things. So if 
all goes well and I'm able to merge this in, if I've heard no objection from 
you, then I'll assume your'e ok with it and make that change before merging. 
Otherwise, please do object if that bothers you :)

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to