Help Center/
MapReduce Service/
Developer Guide (Normal_3.x)/
Hive Development Guide (Normal Mode)/
Debugging the Application/
Debugging the Python3 Sample Program
Updated on 2023-08-31 GMT+08:00
Debugging the Python3 Sample Program
Running Python in CLI Mode
- Grant the execution permission for the script of python3-examples folder. Run the following command in the CLI:
chmod +x python3-examples -R.
- In python3-examples/pyCLI_nosec.py, change the value of host to the service plane IP address of the node where HiveServer is installed, and change the value of port to the port used by Hive to provide the Thrift service.
- To view the HiveServer service plane IP address, log in to FusionInsight Manager and choose Cluster > Services > Hive > Instances.
- You can log in to FusionInsight Manager, choose Cluster > Services > Hive > Configurations, and search for hive.server2.thrift.port in the search box. The default value is 10000.
- Run the following commands to start the Python3 client:
cd python3-examples
python pyCLI_nosec.py
- In the CLI, view the HQL query results in the example codes. For example:
('table_name1',) ('table_name2',) ('table_name3',) ('table_name4',) ('table_name5',)
In the preceding command, table_nameX indicates the actual table name.
Parent topic: Debugging the Application
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
The system is busy. Please try again later.
For any further questions, feel free to contact us through the chatbot.
Chatbot