Mark Payne created NIFI-16493:
---------------------------------

             Summary: Partial Component State Updates
                 Key: NIFI-16493
                 URL: https://issues.apache.org/jira/browse/NIFI-16493
             Project: Apache NiFi
          Issue Type: Improvement
          Components: NiFi API
            Reporter: Mark Payne
            Assignee: Mark Payne


Add a {{patchState(Map<String, String> updatedState, Scope scope)}} method to 
{{StateManager}} and {{ProcessSession}} so that a component can change some of 
its state keys without replacing the whole state map.

A key with a non-null value is created or overwritten, a key with a {{null}} 
value is removed, and keys that are not in the map are left as they are. An 
empty map does nothing, and a {{null}} map is not allowed.

{{StateManager.patchState}} has a default implementation that retrieves the 
state, applies the changes, and calls {{replace}} until it succeeds. 
{{ProcessSession.patchState}} has no default, so that each session 
implementation must pass the patch through to the framework rather than turning 
it into a whole-map write. Any {{ProcessSession}} implementation outside of 
NiFi must add the method.

This implements NIP-50.




--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to