Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive
On this page

Configuring the Python3 Sample Project

Updated on 2024-08-10 GMT+08:00

This section applies to MRS 3.3.0 or later.

Scenario

The following content describes the operations you need to do to run the pyhon3 sample code of HetuEngine on FusionInsight MRS.

Procedure

  1. Install Python 3.6 or a later version (before 3.9) on the client node.

    The Python version can be viewed by running the python3 command on the CLI of the client. The following information indicates that the Python version is 3.8.2.
    Python 3.8.2 (default, Jun 23 2020, 10:26:03)
    [GCC 4.8.5 20150623 (Red Hat 4.8.5-36)] on linux
    Type "help", "copyright", "credits" or "license" for more information.     

  2. Setuptools must be installed on the client.

    Download the software from the official website https://pypi.org/project/setuptools/#files.

    Copy the downloaded setuptools package to the client, decompress the package, go to the setuptools project directory, and run the python3 setup.py install command in the CLI of the client.

    Take version 47.3.1 as an example, the following information indicates that setuptools 47.3.1 is installed successfully.

    Finished processing dependencies for setuptools==47.3.1     
    NOTE:

    If the system displays a message indicating that setuptools 47.3.1 fails to be installed, check whether the environment is faulty or Python is faulty.

  3. The JayDeBeApi module must be installed on the client. You can use the Java JDBC to connect to the database through this module.

    You can install it either of the following ways:
    • pip:

      Run the pip install JayDeBeApi command on the client node.

    • Script:
      1. Download the JayDeBeApi project file from the official website at https://pypi.org/project/JayDeBeApi/
      2. Go to the JayDeBeApi project directory and run the python3 setup.py install command. During the installation, if the system displays a message indicating that the python3 module or package is missing, you need to add the module or package.

        Take JayDeBeApi-1.2.3 as an example. If Successfully installed JayDeBeApi-1.2.3 is displayed, the installation is successful.

  4. Install Java on the client. For details about the supported Java versions, see "JDK Installation" in the Table 1.
  5. Obtain the Python3 sample code.

    1. Obtain the sample project folder python3-examples in the src\hetu-examples directory where the sample code is decompressed. For details, see Obtaining the MRS Application Development Sample Project.
    2. Go to the python3-examples folder.
      • normal folder: Python3 sample code for interconnecting with HetuEngine in common mode
      • security folder: Python3 sample code for interconnecting with HetuEngine in security mode

  6. Obtain the hetu-jdbc JAR package.

    • Download the client file to the local PC through Manager.
      1. Log in to FusionInsight Manager and choose Cluster > Services > HetuEngine > More > Download Client.
      2. Select Complete Client, select the correct platform type (x86_64 for x86 and aarch64 for ARM) for the node where the client is to be installed, deselect Save to Path, and click OK. Wait until the client file package is generated and download it.
      3. Decompress the downloaded software package to obtain the hetu-jdbc package and decompress it to obtain the JDBC package.

        For example, if the client file package is FusionInsight_Cluster_1_Services_Client.tar, decompress the package to obtain the FusionInsight_Cluster_1_Services_ClientConfig.tar file. Then decompress the package to obtain the FusionInsight_Cluster_1_Services_ClientConfig file. (The path cannot contain spaces.) Decompress \FusionInsight_Cluster_1_Services_ClientConfig\HetuEngine\x86\hetu-jdbc.tar.gz to obtain hetu-jdbc-XXX.jar and copy it to the user-defined path on the host where the sample code will run.

    • Obtain the cluster client node.

      Log in to the node where the HetuEngine client has been installed. For example, if the client installation path is /opt/hadoopclient, obtain hetu-jdbc-XXX.jar from /opt/hadoopclient/HetuEngine/hetuserver/jars/, and copy the file to the user-defined path on the node where the sample code will run.

We use cookies to improve our site and your experience. By continuing to browse our site you accept our cookie policy. Find out more

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback