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

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

bq. For branch-2, There are two possible ways to use Deferred (or 
ListenableFuture) :

IMO, it is user-abuse if there is one way to consume the HDFS API 
asynchronously in hadoop2 and another manner when hadoop3. Users and 
downstreamers have better things to do w/ their time than build a lattice of 
probing, brittle reflection and alternate code paths to match a wandering HDFS 
API.

bq. Any comments?

IMO, there is nothing undesirable about your choices #1 or #2 above. If you 
don't want a dependency, do #2. Regards #2, it doesn't matter that the Hadoop 
Deferred no longer matches 'other projects'. It doesn't have to. It is the 
proven API with a provenance and the clean documentation on how to use and what 
the contract is that we are after.

As to your FutureWithCallback, where does this come from? Have you built any 
event-driven apps with it? At first blush, it is lacking in vocabulary at least 
when put against Deferred or CompletableFuture. Thanks.

> 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