[jira] [Created] (HADOOP-17306) RawLocalFileSystem's lastModifiedTime() looses milli seconds in JDK < 10 b09

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[jira] [Created] (HADOOP-17306) RawLocalFileSystem's lastModifiedTime() looses milli seconds in JDK < 10 b09

Nicholas DiPiazza (Jira)
Vinayakumar B created HADOOP-17306:
--------------------------------------

             Summary: RawLocalFileSystem's lastModifiedTime() looses milli seconds in JDK < 10 b09
                 Key: HADOOP-17306
                 URL: https://issues.apache.org/jira/browse/HADOOP-17306
             Project: Hadoop Common
          Issue Type: Bug
          Components: fs
            Reporter: Vinayakumar B


RawLocalFileSystem's FileStatus uses {{File.lastModified()}} api from JDK.

This api looses milliseconds due to JDK bug.

[https://bugs.java.com/bugdatabase/view_bug.do?bug_id=8177809]

This bug fixed in JDK 10 b09 onwards and still exists in JDK 8 which is still being used in many productions.

Apparently, {{Files.getLastModifiedTime()}} from java's nio package returns correct time.

Use {{Files.getLastModifiedTime()}} instead of {{File.lastModified}} as workaround. 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]