[
https://issues.apache.org/jira/browse/HDFS-11110?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16083236#comment-16083236
]
Bharat Viswanadham commented on HDFS-11110:
-------------------------------------------
Hi Allen,
Below is the code for getting PageSize. It uses java sun.misc.Unsafe. So, if it
is not able to get the value we return default as 4096.
static long getOperatingSystemPageSize() {
try {
Field f = Unsafe.class.getDeclaredField("theUnsafe");
f.setAccessible(true);
Unsafe unsafe = (Unsafe)f.get(null);
return unsafe.pageSize();
} catch (Throwable e) {
LOG.warn("Unable to get operating system page size. Guessing 4096.", e);
return 4096;
}
}
So, could you please let me know your inputs on this and what do you mean by
completely falls apart if native library isn't available.
> Hardcoded BLOCK SIZE value of 4096 is not appropriate for PowerPC
> -----------------------------------------------------------------
>
> Key: HDFS-11110
> URL: https://issues.apache.org/jira/browse/HDFS-11110
> Project: Hadoop HDFS
> Issue Type: Bug
> Reporter: ramtin
> Assignee: ramtin
> Attachments: HDFS-11110.001.patch, HDFS-11110.02.patch
>
>
> Using NativeIO.POSIX.getCacheManipulator().getOperatingSystemPageSize()
> function rather than hard coded block size
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]