Hadiiiiiiiii created NIFI-9792:
----------------------------------

             Summary: hadoop.ListHDFS.java Data may be lost(not listed)
                 Key: NIFI-9792
                 URL: https://issues.apache.org/jira/browse/NIFI-9792
             Project: Apache NiFi
          Issue Type: Bug
          Components: Extensions
    Affects Versions: 1.15.3
            Reporter: Hadiiiiiiiii
         Attachments: image-2022-03-14-15-27-14-585.png, 
image-2022-03-14-15-27-21-977.png

in this code, compute the fileAge, the CurrentTimeMillis() is not same. so 
maybe have this wrong:

!image-2022-03-14-15-27-21-977.png!

 

see this:

!image-2022-03-14-15-27-14-585.png!

normal case:
hdfsFileTime     whenListTheFileTime      Difference(theFileExistenceTime)     
isTakeTheFile
14:46:00         15:00:00                     4min                              
 false
14:47:00         15:00:00                     3min                              
 false
14:48:00         15:00:00                     2min                              
 false
all is ok

abnormal case:
hdfsFileTime     whenListTheFileTime      Difference(theFileExistenceTime)     
isTakeTheFile
14:46:00         15:00:00                     4min                              
 false
14:47:00         15:02:00(delayed for 2min) 5min                               
true
14:48:00         15:02:00                     4min                              
 false
lost first file and last file.

 

 

so, do not use the System.currentTime.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to