Class FlinkSecurityManager


  • public class FlinkSecurityManager
    extends SecurityManager
    FlinkSecurityManager to control certain behaviors that can be captured by Java system security manager. It can be used to control unexpected user behaviors that potentially impact cluster availability, for example, it can warn or prevent user code from terminating JVM by System.exit or halt by logging or throwing an exception. This does not necessarily prevent malicious users who try to tweak security manager on their own, but more for being dependable against user mistakes by gracefully handling them informing users rather than causing silent unavailability.
    • Method Detail

      • setFromConfiguration

        public static void setFromConfiguration​(Configuration configuration)
      • monitorUserSystemExitForCurrentThread

        public static void monitorUserSystemExitForCurrentThread()
      • unmonitorUserSystemExitForCurrentThread

        public static void unmonitorUserSystemExitForCurrentThread()
      • forceProcessExit

        public static void forceProcessExit​(int exitCode)
        Use this method to circumvent the configured FlinkSecurityManager behavior, ensuring that the current JVM process will always stop via System.exit() or Runtime.getRuntime().halt().