Note
This parameter is available starting with V4.6.3.
Overview
ob_enable_java_udf_sandbox controls the execution mode of Java UDFs:
- When set to
TRUE, the Java UDF runs in a separate sandbox process. The JVM runs in isolation from the observer main process, reducing the impact of Java UDF execution on the database main process. - When set to
FALSE, the Java UDF is embedded in the observer process for execution via JNI.
Privilege requirements
Query parameters
Both the
systenant and all user tenants can query this parameter using theSHOW PARAMETERSstatement or theGV$OB_PARAMETERSview.Modify parameters
Only the
systenant can modify this parameter. User tenants cannot modify it.
Attributes
Attribute |
Description |
|---|---|
| Parameter type | Bool |
| Default Value | FALSE |
| Value range | TRUE/FALSE |
| Modifiable | Yes, you can use theALTER SYSTEM SETStatement modification. |
| Whether to restart the OBServer node for the change to take effect | No, the setting takes effect immediately. |
Usage instructions
This parameter must be used together with ob_enable_java_udf and ob_enable_java_env. After enabling
ob_enable_java_udfandob_enable_java_env, you can decide whether to enableob_enable_java_udf_sandboxas needed to enable sandbox isolation.We recommend that you enable this parameter for public cloud deployment scenarios to enhance the security and stability of Java UDF execution and prevent JVM exceptions from affecting the observer main process.
Configuration example
Enable Java UDF sandbox mode
obclient> ALTER SYSTEM SET ob_enable_java_udf_sandbox = TRUE;Disable Java UDF sandbox mode.
obclient> ALTER SYSTEM SET ob_enable_java_udf_sandbox = FALSE;