[
https://issues.apache.org/jira/browse/HDFS-5511?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13826092#comment-13826092
]
Andrew Wang commented on HDFS-5511:
-----------------------------------
Looks good, patch size is mostly due to reworking tests to use the new
interface. Just two minor comments:
* For {{NativeIO#cacheManipulator}}, having a {{@VisibleForTesting}} setter and
a public getter would be more OOP-compliant.
* Javadoc on the public getter describing what a CacheManipulator is would be
good too.
+1 once addressed, thanks Colin.
> improve CacheManipulator interface to allow better unit testing
> ---------------------------------------------------------------
>
> Key: HDFS-5511
> URL: https://issues.apache.org/jira/browse/HDFS-5511
> Project: Hadoop HDFS
> Issue Type: Sub-task
> Components: datanode
> Affects Versions: 3.0.0
> Reporter: Colin Patrick McCabe
> Assignee: Colin Patrick McCabe
> Attachments: HDFS-5511.001.patch
>
>
> The CacheManipulator interface has been helpful in allowing us to stub out
> {{mlock}} in cases where we don't want to test it. We should move the
> {{getMemlockLimit}} and {{getOperatingSystemPageSize}} functions into this
> interface as well so that we don't have to skip these tests on machines where
> these methods would ordinarily not work for us.
--
This message was sent by Atlassian JIRA
(v6.1#6144)