[ https://issues.apache.org/jira/browse/HDFS-8520?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14579617#comment-14579617 ]
Andrew Wang commented on HDFS-8520: ----------------------------------- Sorry if I wasn't clear before. I do not think the right fix is changing the tests to use NativeIO#getOperatingSystemsPageSize. Our precommit only runs on x86 Linux, so this function will never return anything other than 4096. This means we will not have precommit coverage for large page sizes. The NomlockManipulator hardcoded 4096 so it can potentially rely on it for testing. The issue is that the mocking was incomplete, and parts of the tests are incorrectly using NativeIO#getOperatingSystemPageSize. We identified PageRounder as one location. The correct fix IMO is as follows: # Fix the existing tests to also use 4096 as a hardcoded value # Add new tests that use 64KB as a hardcoded value This way the current tests will run correctly despite differences in page size. We then also will have large page coverage on our x86 Linux precommit runs. Re: branch-2.7, if the patch applies cleanly to both it doesn't matter, but we've always done backports rather than forward ports. I'll put it in both trunk and branch-2 at commit time. > Patch for PPC64 block size > -------------------------- > > Key: HDFS-8520 > URL: https://issues.apache.org/jira/browse/HDFS-8520 > Project: Hadoop HDFS > Issue Type: Bug > Affects Versions: 2.7.1 > Environment: RHEL 7.1 /PPC64 > Reporter: Tony Reix > Assignee: Tony Reix > Fix For: 2.7.1 > > Attachments: HDFS-8520-2.patch, HDFS-8520.patch > > > The attached patch enables Hadoop to work on PPC64. > That deals with SystemPageSize and BloclSize , which are not 4096 on PPC64. > There are changes in 3 files: > - > hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/nativeio/NativeIO.java > - > hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/TestFsDatasetCache.java > - > hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestCacheDirectives.java > where 4096 is replaced by getOperatingSystemPageSize() or by using PAGE_SIZE > The patch has been built on branch-2.7 . -- This message was sent by Atlassian JIRA (v6.3.4#6332)