markap14 commented on issue #3930: NIFI-6851: Added FlowFileAcquisitionMethod to fetch/receive methods i… URL: https://github.com/apache/nifi/pull/3930#issuecomment-571711861 Thanks @m-hogue. I think there's something that was still missed in regards to the serialization/deserialization of the enum though. As it is, it stores a mapping of FlowFileAcquisitionMethod to a number. This number is no longer the ordinal. And when the event file is read, it reads in this mapping. However, it never does anything with the mapping. Rather, it uses the mapping provided by FlowFileAcquisitionMethod. If the enumeration changes between version 1.11.0 and 1.12.0, for example, then when 1.12.0 reads the data, it will lookup value 1 according to definition in 1.12.0, which is similar to how it would work with the ordinal. Instead, if the FlowFileAcquisitionMethod is stored as a value of `1`, it must lookup what the value of `1` meant in the mapping that was serialized, NOT the mapping that is available in FlowFileAcquisitionMethod. Otherwise, the mapping doesn't help, and version 1.12.0 would still parse the record incorrectly, as a result of the enumeration changing. Does this make sense? If not, please let me know.
---------------------------------------------------------------- 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
