Esta página ainda não está disponível no idioma selecionado. Estamos trabalhando para adicionar mais opções de idiomas. Agradecemos sua compreensão.

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
Situation Awareness
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

Show all

Synchronizing Hudi Table Data to Hive

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

You can run run_hive_sync_tool.sh to synchronize data in the Hudi table to Hive.

For example, run the following command to synchronize the Hudi table in the hdfs://hacluster/tmp/huditest/hudimor1_deltastreamer_partition directory on HDFS to the Hive table table hive_sync_test3 with unite, country, and state as partition keys:

run_hive_sync_tool.sh --partitioned-by unite,country,state --base-path hdfs://hacluster/tmp/huditest/hudimor1_deltastreamer_partition --table hive_sync_test3 --partition-value-extractor org.apache.hudi.hive.MultiPartKeysValueExtractor --support-timestamp

Table 1 Parameter description

Command

Description

Mandatory or Not (Yes or No)

Default Value

--database

Specifies the Hive database name.

No

default

--table

Specifies the Hive table name.

Yes

-

--base-file-format

Specifies the file format (PARQUET or HFILE).

No

PARQUET

--user

Specifies the Hive username.

No

-

--pass

Specifies the Hive password.

No

-

--jdbc-url

Specifies the Hive JDBC connection URL.

No

-

--base-path

Specifies the storage path of the Hudi table to be synchronized.

Yes

-

--partitioned-by

Specifies the partition key.

No

-

--partition-value-extractor

Specifies the partition class. PartitionValueExtractor needs to be implemented. The partition value can be extracted from the HDFS path.

No

SlashEncodedDayPartitionValueExtractor

--assume-date-partitioning

Creates partitions in yyyy/mm/dd format to support backward compatibility.

No

false

--use-pre-apache-input-format

Use InputFormat in the com.uber.hoodie package to replace the one in the org.apache.hudi package. Do not use this command except for migrating projects from com.uber.hoodie to org.apache.hudi.

No

false

--use-jdbc

Uses Hive JDBC connection.

No

true

--auto-create-database

Specifies whether to automatically create a Hive database.

No

true

--skip-ro-suffix

Specifies whether to skip the read-optimized view with the _ro suffix during registration.

No

false

--use-file-listing-from-metadata

Specifies whether to obtain the file list from the Hudi metadata.

No

false

--verify-metadata-file-listing

Specifies whether to verify the file list in the Hudi metadata based on the file system.

No

false

--help/-h

Specifies whether to display help information.

No

false

--support-timestamp

Specifies whether to convert TIMESTAMP_MICROS of INT64 to Hive timestamp.

No

false

--decode-partition

Specifies whether to decode the partition value if the partition is encoded during the write process.

No

false

--batch-sync-num

Specifies the number of Hive partitions to be synchronized in each batch.

No

1000

NOTE:

During Hive synchronization, if the table does not exist, an external table is created and partitions are added. If the table exists, check whether table schemas are different. If they are different, replace the table. Check whether new partitions exist. If new partitions exist, partitions are added accordingly.

Therefore, there are the following restrictions when Hive synchronization is used:

  • Fields can only be added to the schema and cannot be modified or deleted.
  • Partition directories can only be added but cannot be deleted.
  • Overwrite can only overwrite the Hudi table. The Hive table cannot be overwritten synchronously.
  • Do not use the timestamp type as the partition column when synchronizing a Hudi table to Hive.

Usamos cookies para aprimorar nosso site e sua experiência. Ao continuar a navegar em nosso site, você aceita nossa política de cookies. Saiba mais

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback