[ 
https://issues.apache.org/jira/browse/NIFI-1307?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15375898#comment-15375898
 ] 

Joseph Witt commented on NIFI-1307:
-----------------------------------

[~markap14] in implementing NIFI-1157 i started removing the FlowFile.getId() 
method which had an amazing amount of ripple effects but that was to be 
expected.  Along the way what became clear is that having a unique identifier 
to a given 'instance of a flowfile' is important for the serialization and 
deserialization of WALI updates at least.  

While it is true that we no longer need to use that identifier for the 
prioritizer comparisons as we had in the past it is still important to have a 
unique identifier for, at the very least, properly aligning edits and updates 
for flow files in WALI and possibly also as a last ditch resort for comparing 
flow files in a default prioritizer.  There is an alternative to using the 
sequence counter identifier which you pointed out earlier which is first 
compare the lineageDate and if that matches then compare the lineageIndex.  So 
we could still avoid flowfile.getId for that case leaving just the concern of 
serde in WALI and alignment to a flow file record/instance.

We could also switch to just using a UUID instead of the long especially since 
we already have a UUID in the attribute map of a flow file.  This approach 
means a net reduction in stuff we have to serialize because today we serialize 
both the flowfile identifier AND the uuid.  The UUID storage in best case is 
128bits/16 bytes whereas the long is 8 bytes.  I'll explore this one a bit 
longer but what do you think?

> Un-deprecate FlowFile.getId()
> -----------------------------
>
>                 Key: NIFI-1307
>                 URL: https://issues.apache.org/jira/browse/NIFI-1307
>             Project: Apache NiFi
>          Issue Type: Task
>          Components: Core Framework
>            Reporter: Mark Payne
>            Assignee: Joseph Witt
>
> In 0.4.0, we deprecated the getId() method of FlowFile because it was no 
> longer being used in any substantive way. However, we have found a bug in 
> same of the Prioritizers (address in NIFI-1279) that is being addressed by 
> using this method.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to