Commissioning the Python3 Sample Project
This section applies to MRS 3.3.0 or later.
Scenario
After the program code is written, you can commission the code in the Windows environment or upload the code to the Linux environment. If the local environment can communicate with the cluster service plane network, you can commission the program locally.
Procedure
- Refer to Configuring the Python3 Sample Project to obtain the sample code, obtain the hetu-jdbc-XXX.jar file, and copy it to the user-defined directory.
- Refer to KeyTab File Authentication Using HSFabric to obtain the user.keytab and krb5.conf files and save them to the customized directory.
- Edit the sample code, modify URLs, user information, and passwords based on the cluster requirements, and modify jdbc_location based on the actual path.
- Example path in Windows: D:\\hetu-examples-python3\\hetu-jdbc-XXX.jar
- Example path in Linux: /opt/hetu-examples-python3/hetu-jdbc-XXX.jar
- Run the python3 sample code.
- View the command output.
- In Windows, view the running result on the console.
Figure 1 Running result
- The following is an example of the running result in Linux:
Aug 12, 2023 5:19:53 PM io.xxx.jdbc.$internal.airlift.log.Logger info INFO: hsbroker finalUri is https://192.168.43.223:29860 Aug 12, 2023 5:19:53 PM io.xxx.jdbc.$internal.airlift.log.Logger info INFO: The final connection url is: //192.168.43.161:29888/hive/default Aug 12, 2023 5:19:53 PM io.xxx.jdbc.$internal.airlift.log.Logger info INFO: coordinator uri is //192.168.43.161:29888/hive/default [('default',), ('information_schema',)]
- In Windows, view the running result on the console.
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.
For any further questions, feel free to contact us through the chatbot.
Chatbot