[ https://issues.apache.org/jira/browse/HADOOP-17306?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17228610#comment-17228610 ]
Steve Loughran commented on HADOOP-17306: ----------------------------------------- How does production code set the timestamp? That is what the tests should do. In which case the granularity does prevent problems. FWIW, I've had problems with localisation related to * timestamps being brittle * the NM localizer assuming that world exec/read permissions is enough to promote any unencrypted reference into the cache, which is D/L'd using the credentials of the NM. HADOOP-16233 shows the problem there: if your store fakes directories then the permission probes are worthless. including the checksum in the local resource would address the timestamp issue for stores which support it, but we'd need to be happy that the marshalling worked for all subclasses, which is probably a bit dubious unless there's some code which does a lot of marshalling of them already. Does Distcp? > 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 > Assignee: Vinayakumar B > Priority: Major > Labels: pull-request-available > Time Spent: 1h 40m > Remaining Estimate: 0h > > 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: common-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: common-issues-h...@hadoop.apache.org