Class PageSizeUtil
- java.lang.Object
-
- org.apache.flink.runtime.io.network.partition.PageSizeUtil
-
public final class PageSizeUtil extends Object
Utility for accessing the system page size.
-
-
Field Summary
Fields Modifier and Type Field Description static intCONSERVATIVE_PAGE_SIZE_MULTIPLEA conservative fallback value (64 KiBytes) that should be a multiple of the page size even in some uncommon cases of servers installations with larger-than-usual page sizes.static intDEFAULT_PAGE_SIZEThe default page size on most systems.static intPAGE_SIZE_UNKNOWNValue indicating an unknown page size.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static intgetSystemPageSize()Tries to get the system page size.static intgetSystemPageSizeOrConservativeMultiple()Tries to get the system page size.static intgetSystemPageSizeOrDefault()Tries to get the system page size.
-
-
-
Field Detail
-
PAGE_SIZE_UNKNOWN
public static final int PAGE_SIZE_UNKNOWN
Value indicating an unknown page size.- See Also:
- Constant Field Values
-
DEFAULT_PAGE_SIZE
public static final int DEFAULT_PAGE_SIZE
The default page size on most systems.- See Also:
- Constant Field Values
-
CONSERVATIVE_PAGE_SIZE_MULTIPLE
public static final int CONSERVATIVE_PAGE_SIZE_MULTIPLE
A conservative fallback value (64 KiBytes) that should be a multiple of the page size even in some uncommon cases of servers installations with larger-than-usual page sizes.- See Also:
- Constant Field Values
-
-
Method Detail
-
getSystemPageSize
public static int getSystemPageSize()
Tries to get the system page size. If the page size cannot be determined, this returns -1.This internally relies on the presence of "unsafe" and the resolution via some Netty utilities.
-
getSystemPageSizeOrDefault
public static int getSystemPageSizeOrDefault()
Tries to get the system page size. If the page size cannot be determined, this returns theDEFAULT_PAGE_SIZE.
-
getSystemPageSizeOrConservativeMultiple
public static int getSystemPageSizeOrConservativeMultiple()
Tries to get the system page size. If the page size cannot be determined, this returns theCONSERVATIVE_PAGE_SIZE_MULTIPLE.
-
-