[
https://issues.apache.org/jira/browse/HADOOP-12910?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15321033#comment-15321033
]
Benoit Sigoure commented on HADOOP-12910:
-----------------------------------------
bq. Features such as chaining are attractive, cool, fashionable and I-like-it,
however, nonessential. Today we don't have any async API so that users cannot
possibly do anything to work around it – when a blocking call is invoked, the
caller is blocked. Once we have an async API as simple as returning Future. The
caller can possibly use other mean or library to do chaining. Please correct me
if you disagree.
I disagree. It's not "fashionable". It's key to have good, composable
asynchronous APIs. I don't know what sort of experience you've had with
asynchronous programming, but mine is that non-composable asynchronous APIs
suck and are harder to work with. Writing async code is already harder than
writing sync code, so not adding extra burden with APIs that don't compose well
makes a significant difference on developer productivity and code quality.
> 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]