You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@nifi.apache.org by Mark Payne <ma...@hotmail.com> on 2015/12/31 18:34:45 UTC

State Management

All,

I have spent a good amount of time in the past few weeks working on the State Management Feature Proposal, described at [1].
The main JIRA for this is found at [2].

I have updated the Feature Proposal with more implementation details describing the path that I have taken.
If anyone has any interest in reviewing the ideas and providing feedback, please do so, as this is something that
we want to ensure that we get right!

Also of note, for those interested and located in the MD/DC/VA area, I will be talking a bit about this feature at the next
Maryland Apache NiFi meetup on Jan. 7.

Thanks
-Mark


[1] https://cwiki.apache.org/confluence/display/NIFI/State+Management <https://cwiki.apache.org/confluence/display/NIFI/State+Management>
[2] https://issues.apache.org/jira/browse/NIFI-259 <https://issues.apache.org/jira/browse/NIFI-259>


Re: State Management

Posted by xm...@gmail.com.
Some open source projects are using Hazelcast's distributed map for state management. 
It provides standard Java map API.
http://docs.hazelcast.org/docs/3.5/manual/html/map.html

Sumo
Sent from my iPad

> On Jan 11, 2016, at 5:37 AM, Mark Payne <ma...@hotmail.com> wrote:
> 
> In case any of you are following along here...
> 
> In updating Processors to use the new state management API, I found that there were a few use cases that
> were a bit hard to accommodate with the proposed API so I have updated the API a bit, making it simpler, so that
> state is just retrieved/set by using a Map. This lends itself well to modifying multiple key/value pairs in the state
> atomically. I have updated the Feature Proposal to reflect this.
> 
> Thanks
> -Mark
> 
>> On Dec 31, 2015, at 4:08 PM, Mark Payne <ma...@hotmail.com> wrote:
>> 
>> Yeah, absolutely agree! I intend for that to work but don't have a unit test developed for that yet. I will be sure that I do get a unit test in to verify that we can nest it.
>> 
>>> On Dec 31, 2015, at 4:02 PM, Ricky Saltzer <ri...@cloudera.com> wrote:
>>> 
>>> +1 for making the znode a configurable option. Especially if we can nest
>>> it, such as "/nifi/<team>/production" and "/nifi/<team>/development".
>>>> On Dec 31, 2015 3:49 PM, "Mark Payne" <ma...@hotmail.com> wrote:
>>>> 
>>>> At this point I'm thinking that it would just be a configurable value,
>>>> defaulting to /nifi
>>>> This way, admins can easily configure it and that way they could view
>>>> whats in there, etc.
>>>> out-of-band of NiFi. Though I'm all ears if there's a better way of doing
>>>> this.
>>>> 
>>>> 
>>>>> On Dec 31, 2015, at 3:44 PM, Ricky Saltzer <ri...@cloudera.com> wrote:
>>>>> 
>>>>> Overall this looks great, and will prove very useful as we try to scale
>>>>> nifi out.
>>>>> 
>>>>> When in clustered mode, will we have control over which znode the nifi
>>>>> cluster persists to? Or - do we want this unique to the cluster (e.g uuid
>>>>> of the flow)?
>>>>>> On Dec 31, 2015 12:35 PM, "Mark Payne" <ma...@hotmail.com> wrote:
>>>>>> 
>>>>>> All,
>>>>>> 
>>>>>> I have spent a good amount of time in the past few weeks working on the
>>>>>> State Management Feature Proposal, described at [1].
>>>>>> The main JIRA for this is found at [2].
>>>>>> 
>>>>>> I have updated the Feature Proposal with more implementation details
>>>>>> describing the path that I have taken.
>>>>>> If anyone has any interest in reviewing the ideas and providing
>>>> feedback,
>>>>>> please do so, as this is something that
>>>>>> we want to ensure that we get right!
>>>>>> 
>>>>>> Also of note, for those interested and located in the MD/DC/VA area, I
>>>>>> will be talking a bit about this feature at the next
>>>>>> Maryland Apache NiFi meetup on Jan. 7.
>>>>>> 
>>>>>> Thanks
>>>>>> -Mark
>>>>>> 
>>>>>> 
>>>>>> [1] https://cwiki.apache.org/confluence/display/NIFI/State+Management <
>>>>>> https://cwiki.apache.org/confluence/display/NIFI/State+Management>
>>>>>> [2] https://issues.apache.org/jira/browse/NIFI-259 <
>>>>>> https://issues.apache.org/jira/browse/NIFI-259>
> 

Re: State Management

Posted by Mark Payne <ma...@hotmail.com>.
In case any of you are following along here...

In updating Processors to use the new state management API, I found that there were a few use cases that
were a bit hard to accommodate with the proposed API so I have updated the API a bit, making it simpler, so that
state is just retrieved/set by using a Map. This lends itself well to modifying multiple key/value pairs in the state
atomically. I have updated the Feature Proposal to reflect this.

Thanks
-Mark

> On Dec 31, 2015, at 4:08 PM, Mark Payne <ma...@hotmail.com> wrote:
> 
> Yeah, absolutely agree! I intend for that to work but don't have a unit test developed for that yet. I will be sure that I do get a unit test in to verify that we can nest it.
> 
>> On Dec 31, 2015, at 4:02 PM, Ricky Saltzer <ri...@cloudera.com> wrote:
>> 
>> +1 for making the znode a configurable option. Especially if we can nest
>> it, such as "/nifi/<team>/production" and "/nifi/<team>/development".
>> On Dec 31, 2015 3:49 PM, "Mark Payne" <ma...@hotmail.com> wrote:
>> 
>>> At this point I'm thinking that it would just be a configurable value,
>>> defaulting to /nifi
>>> This way, admins can easily configure it and that way they could view
>>> whats in there, etc.
>>> out-of-band of NiFi. Though I'm all ears if there's a better way of doing
>>> this.
>>> 
>>> 
>>>> On Dec 31, 2015, at 3:44 PM, Ricky Saltzer <ri...@cloudera.com> wrote:
>>>> 
>>>> Overall this looks great, and will prove very useful as we try to scale
>>>> nifi out.
>>>> 
>>>> When in clustered mode, will we have control over which znode the nifi
>>>> cluster persists to? Or - do we want this unique to the cluster (e.g uuid
>>>> of the flow)?
>>>> On Dec 31, 2015 12:35 PM, "Mark Payne" <ma...@hotmail.com> wrote:
>>>> 
>>>>> All,
>>>>> 
>>>>> I have spent a good amount of time in the past few weeks working on the
>>>>> State Management Feature Proposal, described at [1].
>>>>> The main JIRA for this is found at [2].
>>>>> 
>>>>> I have updated the Feature Proposal with more implementation details
>>>>> describing the path that I have taken.
>>>>> If anyone has any interest in reviewing the ideas and providing
>>> feedback,
>>>>> please do so, as this is something that
>>>>> we want to ensure that we get right!
>>>>> 
>>>>> Also of note, for those interested and located in the MD/DC/VA area, I
>>>>> will be talking a bit about this feature at the next
>>>>> Maryland Apache NiFi meetup on Jan. 7.
>>>>> 
>>>>> Thanks
>>>>> -Mark
>>>>> 
>>>>> 
>>>>> [1] https://cwiki.apache.org/confluence/display/NIFI/State+Management <
>>>>> https://cwiki.apache.org/confluence/display/NIFI/State+Management>
>>>>> [2] https://issues.apache.org/jira/browse/NIFI-259 <
>>>>> https://issues.apache.org/jira/browse/NIFI-259>
>>>>> 
>>>>> 
>>> 
>>> 
> 


Re: State Management

Posted by Mark Payne <ma...@hotmail.com>.
Yeah, absolutely agree! I intend for that to work but don't have a unit test developed for that yet. I will be sure that I do get a unit test in to verify that we can nest it.

> On Dec 31, 2015, at 4:02 PM, Ricky Saltzer <ri...@cloudera.com> wrote:
> 
> +1 for making the znode a configurable option. Especially if we can nest
> it, such as "/nifi/<team>/production" and "/nifi/<team>/development".
> On Dec 31, 2015 3:49 PM, "Mark Payne" <ma...@hotmail.com> wrote:
> 
>> At this point I'm thinking that it would just be a configurable value,
>> defaulting to /nifi
>> This way, admins can easily configure it and that way they could view
>> whats in there, etc.
>> out-of-band of NiFi. Though I'm all ears if there's a better way of doing
>> this.
>> 
>> 
>>> On Dec 31, 2015, at 3:44 PM, Ricky Saltzer <ri...@cloudera.com> wrote:
>>> 
>>> Overall this looks great, and will prove very useful as we try to scale
>>> nifi out.
>>> 
>>> When in clustered mode, will we have control over which znode the nifi
>>> cluster persists to? Or - do we want this unique to the cluster (e.g uuid
>>> of the flow)?
>>> On Dec 31, 2015 12:35 PM, "Mark Payne" <ma...@hotmail.com> wrote:
>>> 
>>>> All,
>>>> 
>>>> I have spent a good amount of time in the past few weeks working on the
>>>> State Management Feature Proposal, described at [1].
>>>> The main JIRA for this is found at [2].
>>>> 
>>>> I have updated the Feature Proposal with more implementation details
>>>> describing the path that I have taken.
>>>> If anyone has any interest in reviewing the ideas and providing
>> feedback,
>>>> please do so, as this is something that
>>>> we want to ensure that we get right!
>>>> 
>>>> Also of note, for those interested and located in the MD/DC/VA area, I
>>>> will be talking a bit about this feature at the next
>>>> Maryland Apache NiFi meetup on Jan. 7.
>>>> 
>>>> Thanks
>>>> -Mark
>>>> 
>>>> 
>>>> [1] https://cwiki.apache.org/confluence/display/NIFI/State+Management <
>>>> https://cwiki.apache.org/confluence/display/NIFI/State+Management>
>>>> [2] https://issues.apache.org/jira/browse/NIFI-259 <
>>>> https://issues.apache.org/jira/browse/NIFI-259>
>>>> 
>>>> 
>> 
>> 


Re: State Management

Posted by Ricky Saltzer <ri...@cloudera.com>.
+1 for making the znode a configurable option. Especially if we can nest
it, such as "/nifi/<team>/production" and "/nifi/<team>/development".
On Dec 31, 2015 3:49 PM, "Mark Payne" <ma...@hotmail.com> wrote:

> At this point I'm thinking that it would just be a configurable value,
> defaulting to /nifi
> This way, admins can easily configure it and that way they could view
> whats in there, etc.
> out-of-band of NiFi. Though I'm all ears if there's a better way of doing
> this.
>
>
> > On Dec 31, 2015, at 3:44 PM, Ricky Saltzer <ri...@cloudera.com> wrote:
> >
> > Overall this looks great, and will prove very useful as we try to scale
> > nifi out.
> >
> > When in clustered mode, will we have control over which znode the nifi
> > cluster persists to? Or - do we want this unique to the cluster (e.g uuid
> > of the flow)?
> > On Dec 31, 2015 12:35 PM, "Mark Payne" <ma...@hotmail.com> wrote:
> >
> >> All,
> >>
> >> I have spent a good amount of time in the past few weeks working on the
> >> State Management Feature Proposal, described at [1].
> >> The main JIRA for this is found at [2].
> >>
> >> I have updated the Feature Proposal with more implementation details
> >> describing the path that I have taken.
> >> If anyone has any interest in reviewing the ideas and providing
> feedback,
> >> please do so, as this is something that
> >> we want to ensure that we get right!
> >>
> >> Also of note, for those interested and located in the MD/DC/VA area, I
> >> will be talking a bit about this feature at the next
> >> Maryland Apache NiFi meetup on Jan. 7.
> >>
> >> Thanks
> >> -Mark
> >>
> >>
> >> [1] https://cwiki.apache.org/confluence/display/NIFI/State+Management <
> >> https://cwiki.apache.org/confluence/display/NIFI/State+Management>
> >> [2] https://issues.apache.org/jira/browse/NIFI-259 <
> >> https://issues.apache.org/jira/browse/NIFI-259>
> >>
> >>
>
>

Re: State Management

Posted by Mark Payne <ma...@hotmail.com>.
At this point I'm thinking that it would just be a configurable value, defaulting to /nifi
This way, admins can easily configure it and that way they could view whats in there, etc.
out-of-band of NiFi. Though I'm all ears if there's a better way of doing this.


> On Dec 31, 2015, at 3:44 PM, Ricky Saltzer <ri...@cloudera.com> wrote:
> 
> Overall this looks great, and will prove very useful as we try to scale
> nifi out.
> 
> When in clustered mode, will we have control over which znode the nifi
> cluster persists to? Or - do we want this unique to the cluster (e.g uuid
> of the flow)?
> On Dec 31, 2015 12:35 PM, "Mark Payne" <ma...@hotmail.com> wrote:
> 
>> All,
>> 
>> I have spent a good amount of time in the past few weeks working on the
>> State Management Feature Proposal, described at [1].
>> The main JIRA for this is found at [2].
>> 
>> I have updated the Feature Proposal with more implementation details
>> describing the path that I have taken.
>> If anyone has any interest in reviewing the ideas and providing feedback,
>> please do so, as this is something that
>> we want to ensure that we get right!
>> 
>> Also of note, for those interested and located in the MD/DC/VA area, I
>> will be talking a bit about this feature at the next
>> Maryland Apache NiFi meetup on Jan. 7.
>> 
>> Thanks
>> -Mark
>> 
>> 
>> [1] https://cwiki.apache.org/confluence/display/NIFI/State+Management <
>> https://cwiki.apache.org/confluence/display/NIFI/State+Management>
>> [2] https://issues.apache.org/jira/browse/NIFI-259 <
>> https://issues.apache.org/jira/browse/NIFI-259>
>> 
>> 


Re: State Management

Posted by Ricky Saltzer <ri...@cloudera.com>.
Overall this looks great, and will prove very useful as we try to scale
nifi out.

When in clustered mode, will we have control over which znode the nifi
cluster persists to? Or - do we want this unique to the cluster (e.g uuid
of the flow)?
On Dec 31, 2015 12:35 PM, "Mark Payne" <ma...@hotmail.com> wrote:

> All,
>
> I have spent a good amount of time in the past few weeks working on the
> State Management Feature Proposal, described at [1].
> The main JIRA for this is found at [2].
>
> I have updated the Feature Proposal with more implementation details
> describing the path that I have taken.
> If anyone has any interest in reviewing the ideas and providing feedback,
> please do so, as this is something that
> we want to ensure that we get right!
>
> Also of note, for those interested and located in the MD/DC/VA area, I
> will be talking a bit about this feature at the next
> Maryland Apache NiFi meetup on Jan. 7.
>
> Thanks
> -Mark
>
>
> [1] https://cwiki.apache.org/confluence/display/NIFI/State+Management <
> https://cwiki.apache.org/confluence/display/NIFI/State+Management>
> [2] https://issues.apache.org/jira/browse/NIFI-259 <
> https://issues.apache.org/jira/browse/NIFI-259>
>
>