Help Center/ MapReduce Service/ Developer Guide (Normal_3.x)/ Hive Development Guide (Normal Mode)/ Debugging the Application/ Debugging the Python Sample Program
Updated on 2025-10-23 GMT+08:00
Debugging the Python Sample Program
Running Python in CLI Mode
- Grant the execution permission for the script of python-examplesfolder. Run the following command in the CLI:
chmod +x python-examples -R
- Enter the service plane IP address of the node where HiveServer is installed in the hosts array of python-examples/pyCLI_nosec.py. To view the HiveServer service plane IP address, log in to FusionInsight Manager and choose Cluster > Services > Hive > Instances.
- Run the following command:
cd python-examples
python pyCLI_nosec.py
- In the CLI, view the HQL query results in the example codes. For example:
[['default', '']] [{'comment': 'from deserializer', 'columnName': 'tab_name', 'type': 'STRING_TYPE'}] ['xx']
If the following exception occurs:
importError: libsasl2.so.2: cannot open shared object file: No such file or directory
You can handle the problem as follows:
- Run the following command to check the LibSASL version in the installed operating system.
ldconfig -p|grep sasl
If the following is displayed, the current operating system only has the 3.x version.
libsasl2.so.3 (libc6,x86-64) => /usr/lib64/libsasl2.so.3 libsasl2.so.3 (libc6) => /usr/lib/libsasl2.so.3
- If only the 3. x version exists, run the following command to create a soft link.
ln -s /usr/lib64/libsasl2.so.3.0.0 /usr/lib64/libsasl2.so.2
- Run the following command to check the LibSASL version in the installed operating system.
Parent topic: Debugging the Application
What is your overall rating for this page?
0
1
2
3
4
5
6
7
8
9
10
Very dissatisfiedVery satisfied
Thank you very much for your feedback. We will continue working to improve the documentation.
The system is busy. Please try again later.