Note
This parameter is available starting from V4.3.5.
Description
ob_java_connector_path specifies the root path of the Connector JAR packages required for JNI (Java Native Interface) to access and execute external tables (such as ODPS external tables). This path is concatenated with the path specified by the ob_java_home parameter to form the JVM class loading path.
Applicability
This parameter is applicable only to OceanBase Database in MySQL-compatible mode.
Privilege requirements
Query the parameter
systenant and all user tenants can query this parameter by using theSHOW PARAMETERSstatement or theGV$OB_PARAMETERSview.Modify the parameter
Only the
systenant can modify this parameter. User tenants cannot modify this parameter.
Attributes
Attribute |
Description |
|---|---|
| Type | String |
| Default value | "" (empty string) |
| Modifiable | Yes. You can use the ALTER SYSTEM SET statement to modify the parameter. |
| Effective upon OBServer node restart | No. The setting takes effect immediately. |
Usage notes
- This parameter is part of enabling the OceanBase Database Java environment to support JNI features such as ODPS external tables. It typically needs to be used together with the
ob_enable_java_env,ob_java_home, andob_java_optsparameters. - Initialization time: The first initialization of the Java environment may take a long time, which may cause the first query on related external tables to time out. It is recommended to adjust the query timeout appropriately. Subsequent queries will not trigger re-initialization.
- Deployment consistency: In a multi-node deployment environment, ensure that the paths configured on all OBServer nodes point to the same existing directory to ensure normal functionality.
- Path requirements: The configured path should be the root directory where the Connector JAR packages are stored. For example, the
jni_packagedirectory obtained by extractingjni_packages_new.tarcan be used as the value ofob_java_connector_path. - Environment dependencies: Before using this feature, you need to properly install the Java environment (such as OpenJDK 8) on the server and configure the necessary environment variables (such as
LD_LIBRARY_PATHpointing to the directory wherelibhdfs.sois located).
Examples
Set the root path of the Java Connector to /home/admin/jni_packages/.
obclient> ALTER SYSTEM SET ob_java_connector_path = '/home/admin/jni_packages/';
References
- Enable Java environment parameter: ob_enable_java_env
- Set Java installation path parameter: ob_java_home
- Set JVM startup parameter: ob_java_opts
- For more information about ODPS external table features, see ODPS external table.
- For more information about external tables, see External table overview.
