com.groupbyinc.flux.bootstrap.JNANatives.class Maven / Gradle / Ivy
???? 4? (com/groupbyinc/flux/bootstrap/JNANatives java/lang/Object JNANatives.java 0com/groupbyinc/flux/bootstrap/JNACLibrary$Rlimit )com/groupbyinc/flux/bootstrap/JNACLibrary Rlimit Gcom/groupbyinc/flux/bootstrap/JNAKernel32Library$MemoryBasicInformation 0com/groupbyinc/flux/bootstrap/JNAKernel32Library
MemoryBasicInformation 6com/groupbyinc/flux/bootstrap/JNAKernel32Library$SizeT SizeT +com/groupbyinc/flux/monitor/jvm/JvmInfo$Mem 'com/groupbyinc/flux/monitor/jvm/JvmInfo Mem logger !Lorg/apache/logging/log4j/Logger; LOCAL_MLOCKALL Z LOCAL_SYSTEM_CALL_FILTER LOCAL_SYSTEM_CALL_FILTER_ALL MAX_NUMBER_OF_THREADS J MAX_SIZE_VIRTUAL_MEMORY
MAX_FILE_SIZE $assertionsDisabled ()V # $
% this *Lcom/groupbyinc/flux/bootstrap/JNANatives; tryMlockall java/lang/UnsatisfiedLinkError *? mlockall (I)I - .
/ 1 java/lang/String 3 )com/groupbyinc/flux/common/sun/jna/Native 5 getLastError ()I 7 8
6 9 strerror (I)Ljava/lang/String; ; <
= 7com/groupbyinc/flux/common/apache/lucene/util/Constants ? LINUX A @ B MAC_OS_X D @ E
% RLIMIT_MEMLOCK I H I J getrlimit 6(ILcom/groupbyinc/flux/bootstrap/JNACLibrary$Rlimit;)I L M
N rlim_cur /Lcom/groupbyinc/flux/common/sun/jna/NativeLong; P Q R -com/groupbyinc/flux/common/sun/jna/NativeLong T longValue ()J V W
U X rlim_max Z Q [ ] &Unable to retrieve resource limits: {} _ org/apache/logging/log4j/Logger a warn '(Ljava/lang/String;Ljava/lang/Object;)V c d b e .Unable to lock JVM Memory: error={}, reason={} g java/lang/Integer i valueOf (I)Ljava/lang/Integer; k l
j m 9(Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)V c o b p 5This can result in part of the JVM being swapped out. r (Ljava/lang/String;)V c t b u 7Increase RLIMIT_MEMLOCK, soft limit: {}, hard limit: {} w rlimitToString (J)Ljava/lang/String; y z
{ user.name } java/lang/System getProperty &(Ljava/lang/String;)Ljava/lang/String; ? ?
? ? ?These can be adjusted by modifying /etc/security/limits.conf, for example:
# allow user '{}' mlockall
{} soft memlock unlimited
{} hard memlock unlimited ? K(Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)V c ? b ? `If you are logged in interactively, you will have to re-login for the new limits to take effect. ? !Increase RLIMIT_MEMLOCK (ulimit). ? rlimit 2Lcom/groupbyinc/flux/bootstrap/JNACLibrary$Rlimit; result e Ljava/lang/UnsatisfiedLinkError; user Ljava/lang/String; errno errMsg
rlimitSuccess softLimit hardLimit trySetMaxNumberOfThreads ? java/lang/StringBuilder ?
? % *unable to retrieve max number of threads [ ? append -(Ljava/lang/String;)Ljava/lang/StringBuilder; ? ?
? ? ] ? toString ()Ljava/lang/String; ? ?
? ? rlimit_nproc trySetMaxSizeVirtualMemory RLIMIT_AS ? I ? ? ,unable to retrieve max size virtual memory [ ? trySetMaxFileSize RLIMIT_FSIZE ? I ? ! ? "unable to retrieve max file size [ ? " ? java/lang/AssertionError ?
? %
RLIM_INFINITY ? ? unlimited ? java/lang/Long ? toUnsignedString ? z
? ? value definitelyRunningAsRoot ()Z WINDOWS ? @ ? geteuid ? 8
? tryVirtualLock getInstance 4()Lcom/groupbyinc/flux/bootstrap/JNAKernel32Library; ? ?
? GetCurrentProcess .()Lcom/groupbyinc/flux/common/sun/jna/Pointer; ? ?
? jvmInfo +()Lcom/groupbyinc/flux/monitor/jvm/JvmInfo; ? ?
? getMem /()Lcom/groupbyinc/flux/monitor/jvm/JvmInfo$Mem; ? ?
? getHeapInit 1()Lcom/groupbyinc/flux/common/unit/ByteSizeValue; ? ?
? -com/groupbyinc/flux/common/unit/ByteSizeValue ? getBytes ? W
? ? (J)V # ?
? SetProcessWorkingSetSize ?(Lcom/groupbyinc/flux/common/sun/jna/Pointer;Lcom/groupbyinc/flux/bootstrap/JNAKernel32Library$SizeT;Lcom/groupbyinc/flux/bootstrap/JNAKernel32Library$SizeT;)Z ? ?
? HUnable to lock JVM memory. Failed to set working set size. Error code {} ? *com/groupbyinc/flux/common/sun/jna/Pointer ?
%
? ? size ? 8
? VirtualQueryEx ?(Lcom/groupbyinc/flux/common/sun/jna/Pointer;Lcom/groupbyinc/flux/common/sun/jna/Pointer;Lcom/groupbyinc/flux/bootstrap/JNAKernel32Library$MemoryBasicInformation;I)I
State Q Protect
Q BaseAddress ,Lcom/groupbyinc/flux/common/sun/jna/Pointer;
RegionSize 8Lcom/groupbyinc/flux/bootstrap/JNAKernel32Library$SizeT;
X VirtualLock g(Lcom/groupbyinc/flux/common/sun/jna/Pointer;Lcom/groupbyinc/flux/bootstrap/JNAKernel32Library$SizeT;)Z
CloseHandle /(Lcom/groupbyinc/flux/common/sun/jna/Pointer;)Z
java/lang/Throwable lockable memInfo ILcom/groupbyinc/flux/bootstrap/JNAKernel32Library$MemoryBasicInformation; address kernel 2Lcom/groupbyinc/flux/bootstrap/JNAKernel32Library; process getShortPathName *com/groupbyinc/flux/common/sun/jna/WString* \\?\, # t
+. GetShortPathNameW 2(Lcom/groupbyinc/flux/common/sun/jna/WString;[CI)I01
2 !failed to get short path name: {}4 ([C)Ljava/lang/String; ?6
67 [C9 longPath ,Lcom/groupbyinc/flux/common/sun/jna/WString; length shortPath path addConsoleCtrlHandler 5(Lcom/groupbyinc/flux/bootstrap/ConsoleCtrlHandler;)V 5(Lcom/groupbyinc/flux/bootstrap/ConsoleCtrlHandler;)Z@B
C "console ctrl handler correctly setE debugG t bH 1unknown error {} when adding console ctrl handlerJ handler 2Lcom/groupbyinc/flux/bootstrap/ConsoleCtrlHandler; tryInstallSystemCallFilter (Ljava/nio/file/Path;)V java/lang/ExceptionP .com/groupbyinc/flux/bootstrap/SystemCallFilterR init (Ljava/nio/file/Path;)ITU
SV X Z isDebugEnabled\ ? b] unable to install syscall filter_ *(Ljava/lang/String;Ljava/lang/Throwable;)VGa bb "unable to install syscall filter: d ca bf ret Ljava/lang/Exception; tmpFile Ljava/nio/file/Path; java/lang/Classm desiredAssertionStatuso ?
np *com/groupbyinc/flux/common/logging/Loggersr getLogger 4(Ljava/lang/Class;)Lorg/apache/logging/log4j/Logger;tu
sv????????? Code LocalVariableTable LineNumberTable
StackMapTable
SourceFile InnerClasses ! " # $ | / *? &? } ' ( ~ ) ) $ | ?,;L= B 7? 06? ? 2?? :;? >L? C? ? F? ?? Y? G:? K? O? =? S? YB? \? Y7? ? ^`? :? >? f ? :?? ^h? n+? q ? ^s? v ? N? @? ^x!? |? |? q ? C? 1~? ?:? ^?? ? ? ^?? v ?
? ^?? v ? p + m p + } \ : 3 ? ? [ ? I r ? ? ? ? ? ? ? I ? ? ? ? ? ? ? ? ? ~ ? ! = > ? @ A D E F G J K % L 1 N : O E P G Q P R ] T m Z p W r Y s ] ? ^ ? _ ? ` ? a ? b ? d ? e ? k ? l ? n ? q $ ? 4 ? + ? B +? _ ? $ | ? M? C? I;? Y? GL+? O? +? S? Y? ?? (? ^? ?Y? ??? ?? :? >? ??? ?? ?? v ? } C ? I ; ? ? ~ t y { | } ' L ? ? ' ? $ ? $ | ? Q? C? ? F? G? Y? GK? ?*? O? *? S? Y? ?? (? ^? ?Y? ??? ?? :? >? ??? ?? ?? v ? } <