hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hudson (Commented) (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HDFS-2560) Refactor BPOfferService to be a static inner class
Date Fri, 18 Nov 2011 01:02:52 GMT

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

Hudson commented on HDFS-2560:
------------------------------

Integrated in Hadoop-Hdfs-trunk-Commit #1356 (See [https://builds.apache.org/job/Hadoop-Hdfs-trunk-Commit/1356/])
    HDFS-2560. Refactor BPOfferService to be a static inner class. Contributed by Todd Lipcon.

todd : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1203444
Files : 
* /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
* /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/security/token/block/BlockPoolTokenSecretManager.java
* /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DataNode.java
* /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/DataNodeTestUtils.java

                
> Refactor BPOfferService to be a static inner class
> --------------------------------------------------
>
>                 Key: HDFS-2560
>                 URL: https://issues.apache.org/jira/browse/HDFS-2560
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>          Components: data-node
>    Affects Versions: 0.23.0
>            Reporter: Todd Lipcon
>            Assignee: Todd Lipcon
>             Fix For: 0.24.0, 0.23.1
>
>         Attachments: hdfs-2560-final.txt, hdfs-2560.txt, hdfs-2560.txt
>
>
> Currently BPOfferService is a non-static inner class of DataNode. For HA we are adding
another inner class inside of this, which makes the scope very hard to understand when reading
the code (and has resulted in subtle bugs like HDFS-2529 where a variable is referenced from
the wrong scope. Making it a static inner class with a reference to the DN has two advantages:
a) scope is now explicit, and b) enables unit testing of the BPOS against a mocked-out DN.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message