hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Haohui Mai (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HDFS-9144) Refactor libhdfs into stateful/ephemeral objects
Date Thu, 12 Nov 2015 22:09:11 GMT

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

Haohui Mai commented on HDFS-9144:
----------------------------------

A pretty large patch. Can you explain what you're trying to achieve here? Some more questions:

* What is the purpose of having multiple inheritances on {{FileHanlde}}, {{FileHandleImpl}},
{{CancelHandle}}, {{CancelHandleImpl}}?
* Why having multi-inheritance?
* What is the principle of life cycle management here? Why changing pointers to shared_ptr
in {{RemoteBlockReader}}? It's deliberately left as normal pointer as continuations do not
own the stream, but the {{State}} object own it. What is the purpose of  copying the callback
handlers?
* What is cancelable? Is a request cancelable or a stream cancelable? Why {{AsyncStream}}
inherits {{Cancelable}}.

The patch contains many unnecessary changes and can be separated into several patches. There
are refactors in NN, DN, various changes from here and there. It needs to be separated, reviewed
and applied independently.



> Refactor libhdfs into stateful/ephemeral objects
> ------------------------------------------------
>
>                 Key: HDFS-9144
>                 URL: https://issues.apache.org/jira/browse/HDFS-9144
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: hdfs-client
>    Affects Versions: HDFS-8707
>            Reporter: Bob Hansen
>            Assignee: Bob Hansen
>         Attachments: HDFS-9144.HDFS-8707.001.patch, HDFS-9144.HDFS-8707.002.patch
>
>
> In discussion for other efforts, we decided that we should separate several concerns:
> * A posix-like FileSystem/FileHandle object (stream-based, positional reads)
> * An ephemeral ReadOperation object that holds the state for reads-in-progress, which
consumes
> * An immutable FileInfo object which holds the block map and file size (and other metadata
about the file that we assume will not change over the life of the file)



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

Mime
View raw message