JNI の設定
Java Native Interface (JNI) is a standard programming interface for writing Java native methods and embedding the Java virtual machine into native applications.
The 本製品 leverages the JNI for improved performance on Mac and Linux.
Configure the Config INI File
The Linux and Mac editions of the Tableau CRM python connector are configured with an ini file. This file is used to set several parameters, including JNI behavior. This file is to be located in:
{path_to_distribution_site-packages}/cdata/config.ini
Ensure that any configuration properties you set in the ini file fall under the following section name (adjust the 311 number if you are using an different python version from 3.11):
- For Linux:
[tableaucrm.cpython-311-x86_64-linux-gnu.so]
- For Mac:
[tableaucrm.cpython-311-darwin.so]
Configure the JNI connector's behavior by editing the properties in the connector's config.ini file. The connector can be configured as follows:
- LOGFILE: Set this the same way as the CDATA_LOGFILE envrionment variable below.
- JAVA_HOME: Configure the path to the JVM library location used to launch the JVM.
- CLASS_PATH: Use a colon-separated list to configure the paths to the third-party jar libraries.
Configure Environment Variables
Additionally, set the following environment variables:
- CDATA_JAVA_HOME: Configure the path to the JVM library location used to launch the JVM.
- CDATA_JVM_OPTIONS: Place JVM options here.
- CDATA_LOGFILE: Set this in the following scheme: <SCHEME>://<TAG>[|<LEVEL>]
- SCHEME: The options are STDOUT, FILE.
- STDOUT: Both the native wrapper and odbc core log into stdout. The Logfile and Verbosity properties can override the behavior of ODBC core.
- FILE: The native wrapper logs into <FILENAME> while the odbc core logs into <FILENAME>.driver.log. The Logfile and Verbosity properties can override the behavior of ODBC core.
- TAG
- For STDOUT, set this to 1. For FILE, set this to the filename.
- LEVEL
- Set to one of: FATAL | ERROR | WARNING | INFO | DEBUG
- SCHEME: The options are STDOUT, FILE.
The following are some examples of this syntax:
- STDOUT://1|DEBUG
- FILE:///tmp/my_py.log|DEBUG