Class PageSizeUtil
java.lang.Object
org.apache.flink.runtime.io.network.partition.PageSizeUtil
Utility for accessing the system page size.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intA 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 final intThe default page size on most systems.static final intValue indicating an unknown page size. -
Method Summary
Modifier and TypeMethodDescriptionstatic intTries to get the system page size.static intTries to get the system page size.static intTries to get the system page size.
-
Field Details
-
PAGE_SIZE_UNKNOWN
public static final int PAGE_SIZE_UNKNOWNValue indicating an unknown page size.- See Also:
-
DEFAULT_PAGE_SIZE
public static final int DEFAULT_PAGE_SIZEThe default page size on most systems.- See Also:
-
CONSERVATIVE_PAGE_SIZE_MULTIPLE
public static final int CONSERVATIVE_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.- See Also:
-
-
Method Details
-
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.
-