Details
-
Improvement
-
Status: Open
-
Major
-
Resolution: Unresolved
-
None
-
None
-
None
-
None
Description
JDK6 does not have a complete support for local file system file operations. Specifically:
- There is no symlink/hardlink APIs what forced Hadoop to defer to shell based tooling
- No error information returned when File#mkdir/mkdirs or File#renameTo fails, making it unnecessary hard to troubleshoot some issues
- File#canRead/canWrite/canExecute do not perform any access checks on Windows making APIs inconsistent with the Unix behavior
- File#setReadable/setWritable/setExecutable do not change access rights on Windows making APIs inconsistent with the Unix behavior
- File#length does not work as expected on symlinks on Windows
- File#renameTo does not work as expected on symlinks on Windows
All above resulted in Hadoop community having to fill in the gaps by providing equivalent native implementations or applying workarounds.
JDK7 addressed (as far as I know) all (or most) of the above problems, either thru the newly introduced Files class or thru bug fixes.
This is a tracking Jira to revisit above mediations once JDK7 becomes the supported platform by the Hadoop community. This work would allow significant portion of the native platform-dependent code to be replaced with Java equivalents what is goodness w.r.t. Hadoop cross-platform support.
Attachments
Issue Links
- is related to
-
HDFS-6531 Create a native api to delete file, like the renameTo method in NativeIO, for better error reporting
- Open
-
HADOOP-9061 Java6+Windows does not work well with symlinks
- Resolved
-
HADOOP-9413 Introduce common utils for File#setReadable/Writable/Executable and File#canRead/Write/Execute that work cross-platform
- Closed
-
HDFS-4428 FsDatasetImpl should disclose what the error is when a rename fails
- Closed
-
HDFS-6695 Investigate using Java 7's nonblocking file I/O in BlockReaderLocal to implement read timeouts
- Open
-
HDFS-4839 add NativeIO#mkdirs, that provides an error message on failure
- Open
-
HADOOP-3518 Want NIO.2 (JSR 203) file system provider for Hadoop FileSystem
- Open
- relates to
-
HDFS-7118 Improve diagnostics on storage directory rename operations by using NativeIO#renameTo in Storage#rename.
- Closed
-
HDFS-7119 Split error checks in AtomicFileOutputStream#close into separate conditions to improve diagnostics.
- Closed