shonzilla commented on issue #158: MINIFI-478 Fix broken OrderedProperties and 
OrderedPropertiesTest
URL: https://github.com/apache/nifi-minifi/pull/158#issuecomment-522976709
 
 
   Hi @apiri, sorry for not getting back in timely fashion. After some frantic 
time at work and subsequent vacation (mostly offline, no-laptop), I got back 
into the pickle with no time for open-source. :wink: 
   
   Thanks for your patience and for removing the superfluous comment for me 
with your amended merge commit.
   
   I've re-checked the JDK source code changes between versions 8 and 11 and 
indeed - `Properties.store` (i.e. the underelying private `store0` method) has 
migrated from iterating over its `keys` to iterating over its `entrySet`. This 
storing of key-value pairs with incl. comments to an output stream is part of 
the _current_ unit test before it loads already ordered properties from the 
said output stream. If I remember correctly, this test coverage is sufficient 
for the little use of `OrderedProperties` in the MiNiFi project.
   
   That's why one needs both to keep both the original overridden `keys` and 
the newly overridden `entrySet` method, contrary to what I originally thought. 
However, one should keep in mind that in both cases the requirement is that 
either keys (in JDK 8) or entries (key-value pairs, used in JDK 11) must be 
returned in ordered manner, i.e. in the same order that the individual 
properties/entries were put into an `OrderedProperties` instance. Without 
additional testing (on JDK 8) I cannot verify and hence cannot guarantee that 
the `keys` method returns keys in order that they were put into 
`OrderedProperties`.
   
   I'm temporarily down to Rasberry Pi 3+ with just 1GB (incl. OpenJDK 11 
though) so it may be problematic to verify this by building NiFi... and it 
would certainly hurt without closing the web browser first. :laughing:
   
   Speaking of Rasberry Pi - it might be an interesting experiment though to 
get MiNiFi or NiFi (to build and) run on it. One could build for example a 
self-hosted and highly flexible service comparable to IFTTT but isolated from 
the public internet, used to make one's home automation smarter etc.
   Are you aware of anyone doing this with MiNiFi or NiFi?
   
   A quick web search revealed that (obviously) I'm not the first man to think 
about running NiFi on a RasPi and it's great to already know that it's possible 
and maybe even feasible. :nerd_face:

----------------------------------------------------------------
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