Package org.apache.hadoop.io.nativeio
Class NativeIO.POSIX.NoMlockCacheManipulator
java.lang.Object
org.apache.hadoop.io.nativeio.NativeIO.POSIX.CacheManipulator
org.apache.hadoop.io.nativeio.NativeIO.POSIX.NoMlockCacheManipulator
- Enclosing class:
- NativeIO.POSIX
@VisibleForTesting
public static class NativeIO.POSIX.NoMlockCacheManipulator
extends NativeIO.POSIX.CacheManipulator
A CacheManipulator used for testing which does not actually call mlock.
This allows many tests to be run even when the operating system does not
allow mlock, or only allows limited mlocking.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlonglongvoidmlock(String identifier, ByteBuffer buffer, long len) booleanMethods inherited from class org.apache.hadoop.io.nativeio.NativeIO.POSIX.CacheManipulator
posixFadviseIfPossible
-
Constructor Details
-
NoMlockCacheManipulator
public NoMlockCacheManipulator()
-
-
Method Details
-
mlock
- Overrides:
mlockin classNativeIO.POSIX.CacheManipulator- Throws:
IOException
-
getMemlockLimit
public long getMemlockLimit()- Overrides:
getMemlockLimitin classNativeIO.POSIX.CacheManipulator
-
getOperatingSystemPageSize
public long getOperatingSystemPageSize()- Overrides:
getOperatingSystemPageSizein classNativeIO.POSIX.CacheManipulator
-
verifyCanMlock
public boolean verifyCanMlock()- Overrides:
verifyCanMlockin classNativeIO.POSIX.CacheManipulator
-