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

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

bq. Chaining/callbacks are nonessential in the sense that they can possibly be 
provided by other library but async is not. 

I think we have different understandings of what an async API is. IMO returning 
a Future is not enough to call an API async; callbacks are table stakes.

bq. I want to support chaining/callbacks but may not be necessarily in the 
first step. 

Nod. My understanding/experience is that downstreamers would have one way of 
consuming an API that returned futures only and then another one altogether of 
a different form to make use of callbacks. Would rather do the Async HDFS 
hookup one time only.

bq. ...but ListenableFuture using the same approach was developed recently.

It's license says 2007 (though commit seems to be 2009 
https://github.com/google/guava/commit/dc5915eb1072c61ff2c3c704af4ae36b25f97b6c#diff-79a52d8ade7341792c046e9c3a5715e0)
 so it has a bit of age on it it seems.

Nothing 'wrong' with registering a listener/observer; all 
promises/futures/deferred do some form of this. Common complaint is handling 
fast becomes unwieldy... but if registering a callable is all we have, we'd 
deal (hopefully w/o resort to extracurricular libraries)

bq. The "rocket launching" was a bad joke. Sorry.

No worries. I like jokes.

Netty Future is in the CLASSPATH already but would have the same issues as 
ListenableFuture I suppose. It ain't that pretty either.





> 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: common-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: common-issues-h...@hadoop.apache.org

Reply via email to