Details
Description
Currently the FIleSystem interface serves two purposes:
- an application writer's interface for using the Hadoop file system
- a file system implementer's interface (e.g. hdfs, local file system, kfs, etc)
This Jira proposes that we provide a simpler interfaces for the application writer and leave the FilsSystem interface for the implementer of a filesystem.
- Filesystem interface has a confusing set of methods for the application writer
- We could make it easier to take advantage of the URI file naming
- Current approach is to get FileSystem instance by supplying the URI and then access that name space. It is consistent for the FileSystem instance to not accept URIs for other schemes, but we can do better.
- The special copyFromLocalFIle can be generalized as a copyFile where the src or target can be generalized to any URI, including the local one.
- The proposed scheme (below) simplifies this.
- The client side config can be simplified.
- New config() by default uses the default config. Since this is the common usage pattern, one should not need to always pass the config as a parameter when accessing the file system.
-
- It does not handle multiple file systems too well. Today a site.xml is derived from a single Hadoop cluster. This does not make sense for multiple Hadoop clusters which may have different defaults.
- Further one should need very little to configure the client side:
- Default files system.
- Block size
- Replication factor
- Scheme to class mapping
- It should be possible to take Blocksize and replication factors defaults from the target file system, rather then the client size config. I am not suggesting we don't allow setting client side defaults, but most clients do not care and would find it simpler to take the defaults for their systems from the target file system.
Attachments
Attachments
Issue Links
- blocks
-
HDFS-610 Add support for FileContext
- Closed
-
HADOOP-6261 Junit tests for FileContextURI
- Closed
-
HADOOP-6260 Unit tests for FileSystemContextUtil.
- Closed
- incorporates
-
HDFS-578 Support for using server default values for blockSize and replication when creating a file
- Closed
- is depended upon by
-
HADOOP-6356 Add a Cache for AbstractFileSystem in the new FileContext/AbstractFileSystem framework.
- Open
- is related to
-
HDFS-617 Support for non-recursive create() in HDFS
- Closed
-
HDFS-618 Support for non-recursive mkdir in HDFS
- Closed
- relates to
-
HADOOP-6223 New improved FileSystem interface for those implementing new files systems.
- Closed
-
HADOOP-6265 Remove deprecated protected methods added to FileSystem to support FileContext.
- Open
-
HADOOP-6271 Fix FileContext to allow both recursive and non recursive create and mkdir
- Closed