Note
This parameter is available starting from V4.3.5 BP1.
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 HDFS 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 HDFS 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 point to the directory where the Connector JAR packages are stored. If the delivered package directory contains entries such as
current,hadoop, and a version directory (for example,vX.X.X; the actual version number depends on the OceanBase version), it is recommended to setob_java_connector_pathto the path of thecurrentdirectory. - 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 path of the Java Connector to /home/admin/jni_packages/current.
obclient> ALTER SYSTEM SET ob_java_connector_path = '/home/admin/jni_packages/current';
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.
