[
https://issues.apache.org/jira/browse/HDFS-705?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12765785#action_12765785
]
Konstantin Boudnik commented on HDFS-705:
-----------------------------------------
It is totally internal to HDFS. However, I'm working on a test which has to be
in {{server.namenode}} package but is needed an access to a block's replica
info (which is accessible through a {{server.datanode}} call).
Also, this new getter is kept withing tests' source code and isn't a part of
application source code. I'm opposing any public API's put into the production
code merely for the testing purposes: it's bad. In fact, this was one of the
reasons to have injection framework in Hadoop (HADOOP-6204, HDFS-435)
JSR 294 might help address the issue. However, the last time I checked it was
in 'Inactive' state, so...
> Create an adapter to access some of package-private methods of DataNode from
> tests
> ----------------------------------------------------------------------------------
>
> Key: HDFS-705
> URL: https://issues.apache.org/jira/browse/HDFS-705
> Project: Hadoop HDFS
> Issue Type: Test
> Components: test
> Affects Versions: 0.22.0
> Reporter: Konstantin Boudnik
> Assignee: Konstantin Boudnik
> Fix For: 0.22.0
>
> Attachments: HDFS-705.patch
>
>
> Some of tests from packages other than
> {{org.apache.hadoop.hdfs.server.datanode}} need an access to package-private
> methods of that package. Proposed patch will add new adapter class which will
> have public getter methods to provide such access to outside of the package.
> This is TEST ONLY class: it never has to be used for ANY development purposes.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.