El contenido no se encuentra disponible en el idioma seleccionado. Estamos trabajando continuamente para agregar más idiomas. Gracias por su apoyo.

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
Help Center/ MapReduce Service/ Component Operation Guide (LTS) (Paris Region)/ Using Loader/ Exporting Data/ Typical Scenario: Exporting Data from Hive to an SFTP Server

Typical Scenario: Exporting Data from Hive to an SFTP Server

Updated on 2022-12-14 GMT+08:00

Scenario

Use Loader to export data from Hive to an SFTP server.

Prerequisites

  • You have obtained the service username and password for creating a Loader job.
  • You have had the permission to access the Hive table specified in the job.
  • You have obtained the username and password of the SFTP server and the user has the write permission of the data export directory on the SFTP server.
  • No disk space alarm is reported, and the available disk space is sufficient for importing and exporting data.
  • If a configured task requires the Yarn queue function, the user must be authorized with related Yarn queue permission.
  • The user who configures a task must obtain execution permission on the task and obtain usage permission on the related connection of the task.

Procedure

Setting Basic Job Information

  1. Access the Loader web UI.

    1. Log in to FusionInsight Manager. For details, see Accessing FusionInsight Manager.
    2. Choose Cluster > Name of the desired cluster > Services > Loader.
    3. Click LoaderServer(Node name, Active). The Loader web UI is displayed.
      1. Click LoaderServer(Node name, Active). The Loader web UI is displayed.
        Figure 1 Loader web UI

  2. Click New Job to go to the Basic Information page and set basic job information.

    Figure 2 Basic Information
    1. Set Name to the name of the job.
    2. Set Type to Export.
    3. Set Group to the group to which the job belongs. No group is created by default. You need to click Add to create a group and click OK to save the created group.
    4. Set Queue to the Yarn queue that executes the job. The default value is root.default.
    5. Set Priority to the priority of the Yarn queue that executes the job. The default value is NORMAL. The options are VERY_LOW, LOW, NORMAL, HIGH, and VERY_HIGH.

  3. In the Connection area, click Add to create a connection, set Connector to sftp-connector, click Add, set connection parameters, and click Test to verify whether the connection is available. When "Test Success" is displayed, click OK. Loader allows multiple SFTP servers to be configured. Click Add to add the configuration information of multiple SFTP servers.

    Table 1 Connection parameters

    Parameter

    Description

    Example Value

    Name

    Specifies the name of the SFTP server connection.

    sftpName

    SFTP server IP

    Specifies the IP address of the SFTP server.

    10.16.0.1

    SFTP server port

    Specifies the port number of the SFTP server.

    22

    SFTP username

    Specifies the user name for accessing the SFTP server.

    root

    SFTP password

    Specifies the password for accessing the SFTP server.

    xxxx

    SFTP public key

    Specifies public key of the SFTP server.

    OdDt/yn...etM

    NOTE:

    When multiple SFTP servers are configured, the data of Hive tables will be divided into multiple parts and saved to the SFTP servers randomly.

    Setting Data Source Information

  4. Click Next. On the displayed From page, set Source type to HIVE.

    Table 2 Data source parameters

    Parameter

    Description

    Example Value

    Hive instance

    Specifies the Hive service instance that Loader selects from all available Hive service instances in the cluster. If the selected Hive service instance is not added to the cluster, the Hive job cannot run properly.

    hive

    Quantity

    Specifies the number of maps that are started at the same time in a MapReduce job of a data configuration operation. The value must be less than or equal to 3000. You are advised to set the parameter to the maximum number of connections on the SFTP server.

    20

    Setting Data Transformation

  5. Click Next. On the displayed Transform page, set the transformation operations in the data transformation process. For details about how to select operators and set parameters, see Operator Help and Table 3.

    Table 3 Setting the input and output parameters of the operator

    Input Type

    Export Type

    Hive input

    File output

    Figure 3 Operator operation procedure

    Setting Data Storage Information and Executing the Job

  6. Click Next. On the displayed To page, set the data storage mode.

    Table 4 Parameter description

    Parameter

    Description

    Example Value

    Output path

    Specifies the path or file name of the exported file on an SFTP server. If multiple SFTP server IP addresses are configured for the connector, you can set this parameter to multiple paths or file names separated with semicolons (;). Ensure that the number of paths or file names is the same as the number of SFTP servers configured for the connector.

    NOTE:

    You can use macros to define path parameters. For details, see Using Macro Definitions in Configuration Items.

    /opt/tempfile

    Operation

    Specifies the action during data import. When all data is to be imported from the input path to the destination path, the data is stored in a temporary directory and then copied from the temporary directory to the destination path. After the data is imported successfully, the data is deleted from the temporary directory. One of the following actions can be taken when duplicate file names exist during data transfer:

    • OVERRIDE: overrides the old file.
    • RENAME: renames as new file. For a file without an extension, a string is added to the file name as the extension; for a file with an extension, a string is added to the extension. The string is unique.
    • APPEND: adds the content of the new file to the end of the old file. This action only adds content regardless of whether the file can be used. For example, a text file can be used after this operation, while a compressed file cannot.
    • IGNORE: reserves the old file and does not copy the new file.
    • ERROR: stops the task and reports an error if duplicate file names exist. Transferred files are imported successfully, while files that have duplicate names and files that are not transferred fail to be imported.

    OVERRIDE

    Encode type

    Specifies the exported file encoding format, for example, UTF-8. This parameter can be set only in text file export.

    UTF-8

    Compression

    Indicates whether to enable the compressed transmission function when SFTP is used to export data.

    • The value true indicates that compression is enabled.
    • The value false indicates that compression is disabled.

    true

  7. Click Save and run to save and run the job.

    Checking the Job Execution Result

  8. Go to the Loader WebUI. When Status is Succeeded, the job is complete.

    Figure 4 Viewing a job

Utilizamos cookies para mejorar nuestro sitio y tu experiencia. Al continuar navegando en nuestro sitio, tú aceptas nuestra política de cookies. Descubre más

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback