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

RUN_TABLE_SERVICE

Updated on 2024-12-13 GMT+08:00
NOTE:

This topic is available for MRS 3.3.1-LTS or later only.

Function

This command is used to perform one-click Compaction/Clean/Archive on Hudi MOR tables. Compaction can be executed only on existing schemas.

Executing a Table Service Command for a Single Table

  • Command format

    call run_table_service(table => 'table', clean_hours_retained => 'clean_hours_retained', archive_hours_retained => 'archive_hours_retained')

  • Description
    Table 1 Parameters

    Parameter

    Description

    Mandatory

    table

    Table name

    Yes

    clean_policy

    Execution policy used for cleaning.

    No. The time policy is used by default.

    clean_trigger_strategy

    Cleaning interval.

    No. By default, a clean operation is triggered once every clean_hours_retained hours.

    clean_hours_retained

    Time frame within which the data files will be retained

    No. The default value is 24 hours.

    clean_commits_retained

    Number of data files written by commits that are retained during cleaning.

    No. The default value is 10.

    archive_policy

    Execution policy used for archiving.

    No. The time policy is used by default.

    archive_hours_retained

    How many hours in which the timeline will be archived

    No. The default value is 24 hours.

    max_commit_to_keep

    Maximum number of commits metadata files that can be retained during archiving.

    No. The default value is 30.

    min_commit_to_keep

    Minimum number of commits metadata files that can be retained during archiving.

    No. The default value is 20.

    compact_inline

    Whether to enable compaction.

    No. The default value is true.

    schedule_compact_inline

    Whether to perform only the schedule operation after compaction is enabled.

    CAUTION:

    If you want the run_table_service command to generate a compaction plan and not to execute it, set schedule_compact_inline to true and run_compact_inline to false.

    No. The default value is false.

    run_compact_inline

    Whether to perform only the run operation after compaction is enabled.

    CAUTION:

    By default, the run_table_service command executes only the existing compaction plan in the Hudi table. If you want the run_table_service command to generate a new compaction plan and execute it, set schedule_compact_inline to false and run_compact_inline to false.

    No. The default value is true.

    compact_max_delta_commits

    Number of commits that triggers compaction.

    No. The default value is 5.

  • Example
    // Clean and archive based on the time policy.
    call run_table_service(table => 'hudi_table', clean_hours_retained => 1, archive_hours_retained => 1)
    
    // Clean and archive data based on the commits policy.
    call run_table_service(table => 'hudi_table', clean_policy => 'KEEP_LATEST_COMMITS', clean_trigger_strategy => 'NUM_COMMITS', clean_commits_retained => 2, archive_policy => 'KEEP_META_FILES_BY_COMMITS', min_commit_to_keep => 3, max_commit_to_keep => 4);
  • Response

    You can view the results on the client.

Concurrently Executing Table Service Commands for Multiple Tables

  • Command format

    call run_table_service(tables => 'table1;table2;table3', cleanNums => 'clean_commits_retained', archiveNums=> 'archive_commits_retained')

  • Description
    Table 2 Description

    Parameter

    Description

    Mandatory

    tables

    Names of tables where the table service commands will be executed for. Use semicolons (;) to separate multiple table names.

    Yes

    cleanNums

    Number of commits retained during cleaning.

    No

    archiveNums

    Number of commits retained during archiving.

    No. If this item is set, the value must be greater than the value of cleanNums.

  • Example
    // Clean and archive data based on the time policy.
    call run_table_service(tables => 'tb1;tb2;tb3', cleanNums  => 10, archiveNums => 12)
  • Response

    You can view the results on the client.

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