[ 
https://issues.apache.org/jira/browse/HDFS-9643?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

James Clampffer updated HDFS-9643:
----------------------------------
    Attachment: HDFS-9643.HDFS-8707.000.patch

Initial patch, I've manually tested it but need to sort out the failures hidden 
by HDFS-9610 before I can write decent unit tests.

Open questions:
-Right now the cancel logic is added directly to each continuation in the 
remote block reader.  On one hand this is simple and works, on the other it's 
boilerplate code.  Is this worth pushing into the continuation pipeline code at 
the moment?  I think it's worth keeping it simple until NN operations become 
cancelable.

-In this implementation FileHandle::CancelOperations is irreversible and 
prevents it from being used again.  Can anyone think of a reason not to have it 
also close the file or at least clear vector<LocatedBlockProto>?

-Should the FileHandle have a callback when it knows that there are no pending 
operations?  Should be possible to just check the reference count on the 
CancelHandle to verify.

> libhdfs++: Support async cancellation of read operations
> --------------------------------------------------------
>
>                 Key: HDFS-9643
>                 URL: https://issues.apache.org/jira/browse/HDFS-9643
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: hdfs-client
>            Reporter: James Clampffer
>            Assignee: James Clampffer
>         Attachments: HDFS-9643.HDFS-8707.000.patch
>
>
> It should be possible for any thread to cancel operations in progress on a 
> FileHandle.  Any ephemeral objects created by the FileHandle should free 
> resources as quickly as possible.



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

Reply via email to