hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Konstantin Shvachko (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HADOOP-6223) New improved FileSystem interface for those implementing new files systems.
Date Tue, 06 Oct 2009 00:45:32 GMT

    [ https://issues.apache.org/jira/browse/HADOOP-6223?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12762469#action_12762469
] 

Konstantin Shvachko commented on HADOOP-6223:
---------------------------------------------

I definitely prefer choice 2 over choice 3. Choice 3 is more convenient for implementation
in case of API evolution, but it does not qualify as an API strictly speaking, because it
does not tell you which parameters it needs to do a create or rename.
An exaggerated example of a choice 3 API would be replacing all abstract methods in AbstractFileSystem
by one
{code}
abstract void processOp(op, void ... options);
{code}
where you list all possible arguments in {{options}}.
This is very convenient for keeping different fs implementations independent of each other,
but it hides the definition of the API inside the implementation of {{processOp()}} while
we want it to be declared in the signature of of each method.
{{CreateOpts}} should combine some simple flags like OVERWRITE, APPEND, etc.

> New improved FileSystem interface for those implementing new files systems.
> ---------------------------------------------------------------------------
>
>                 Key: HADOOP-6223
>                 URL: https://issues.apache.org/jira/browse/HADOOP-6223
>             Project: Hadoop Common
>          Issue Type: Sub-task
>            Reporter: Sanjay Radia
>            Assignee: Sanjay Radia
>         Attachments: AbstractFileSystem.java, afs1.patch, Hdfs.java, Hdfs.java
>
>
> The FileContext API (HADOOP-4952) provides an improved interface for the application
writer.
> This lets us simplify the FileSystem API since it will no longer need to deal with notions
of default filesystem [ / ],  wd, and config
> defaults for blocksize, replication factor etc. Further it will not need the many overloaded
methods for create() and open() since
> the FileContext API provides that convenience.
> The FileSystem API can be simplified and can now be restricted to those implementing
new file systems.
> This jira proposes that we create new file system API,  and deprecate FileSystem API
after a few releases.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message