Github user markap14 commented on a diff in the pull request:

    https://github.com/apache/nifi/pull/2056#discussion_r143371633
  
    --- Diff: 
nifi-nar-bundles/nifi-extension-utils/nifi-processor-utils/src/main/java/org/apache/nifi/processor/util/bin/Bin.java
 ---
    @@ -173,4 +174,19 @@ public long getBinAge() {
             final long ageInNanos = System.nanoTime() - creationMomentEpochNs;
             return TimeUnit.MILLISECONDS.convert(ageInNanos, 
TimeUnit.NANOSECONDS);
         }
    +
    +    /**
    +     * @return the UUID of the flow file generated by the merge of this 
bin's content
    +     */
    +    public String getUuid() {
    +        return uuid;
    +    }
    +
    +    /**
    +     * Set the UUID of the flow file generated by the merge of this bin's 
content
    +     * @param uuid UUID to set
    +     */
    +    public void setUuid(String uuid) {
    --- End diff --
    
    I'm a bit concerned about this approach as well... As is, in this PR, the 
abstract class is assuming that this UUID has been set by the concrete 
implementation. If it is not, then it will throw a NPE, I do believe, from 
looking at the code. We definitely need to address that. I do believe that a 
cleaner way may be possible, but off the top of my head i don't have one. I'd 
have to look at the code more. I'll be out of town for the next week, without 
my computer. But I'd be happy to look into this a bit more when I can, if you 
guys haven't resolved this by that time.


---

Reply via email to