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

stack commented on HADOOP-12910:
--------------------------------

bq. Why making the entire async feature unavailable in branch 2? 

I'd think a new API on HDFS with a new semantic showing up late in the life of 
H2 would come as a surprise to most and seems like a natural H3 differentiator. 
But no matter. Sounds like you are targeting H2.

bq. I suggest returning Future (or a sub-interface to support callbacks) in 
branch 2 and CompletableFuture (or our own implementation of CompletableFuture) 
in trunk. In this way, trunk is backward compatible to branch 2 since 
CompletableFuture implements Future.

Suggest it should be same in branch 2 and branch 3 given how much work the spec 
and implementation will be. You can't consume the API in a 
non-blocking/asynchronous way if you can't register a callback. So a Future 
alone is not sufficient, or to put it another way, if H2 returns a Future, 
only, and H3 allows registering callbacks, then the implementation and consumer 
will have to change going from H2 to H3.



> Add new FileSystem API to support asynchronous method calls
> -----------------------------------------------------------
>
>                 Key: HADOOP-12910
>                 URL: https://issues.apache.org/jira/browse/HADOOP-12910
>             Project: Hadoop Common
>          Issue Type: New Feature
>          Components: fs
>            Reporter: Tsz Wo Nicholas Sze
>            Assignee: Xiaobing Zhou
>         Attachments: HADOOP-12910-HDFS-9924.000.patch, 
> HADOOP-12910-HDFS-9924.001.patch, HADOOP-12910-HDFS-9924.002.patch
>
>
> Add a new API, namely FutureFileSystem (or AsynchronousFileSystem, if it is a 
> better name).  All the APIs in FutureFileSystem are the same as FileSystem 
> except that the return type is wrapped by Future, e.g.
> {code}
>   //FileSystem
>   public boolean rename(Path src, Path dst) throws IOException;
>   //FutureFileSystem
>   public Future<Boolean> rename(Path src, Path dst) throws IOException;
> {code}
> Note that FutureFileSystem does not extend FileSystem.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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

Reply via email to