[
https://issues.apache.org/jira/browse/HDFS-705?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12765842#action_12765842
]
Konstantin Shvachko commented on HDFS-705:
------------------------------------------
I think it is a good idea to combine all test tools in test directories. This
was started with NameNodeAdapter. This is another adapter for exposing
data-node internals for testing. I think it is better when classes like
DataNode or NameNode contain the essential logic +only+ not polluted with
public methods for testing whether they are marked as such with annotations or
naming conventions.
We should move all testing methods from DataNode and NameNode to the respective
adapters,
*and stop accessing {{volumeMap}}, {{blockManager}}, and alike directly from
data-node and name-node tests.*
# TestNNLeaseRecovery is not yet in the code base, and probably does not need
to be imported.
# Instead of using {{getClassName()}} and then looking for a substring you can
call {{getClass().getSimpleName()}}, which will return the class name without
the package.
The rest look good to me +1.
> 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, 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.