Ziroom's One-Click Data Lake Ingestion with StreamPark + Paimon
Ziroom replaced its complex MySQL-to-Hive pipeline (Canal, Kafka, Flink, Airflow) with StreamPark and Paimon, enabling one-click data lake ingestion for 4,000+ tables, cutting network pressure, operational costs, and supporting schema evolution.
Reading font
Business Background
Ziroom's data integration scenario involves syncing over 4,400 MySQL business tables to Hive daily, with 8,000+ Hive ETL jobs generating 50 TB of new data per day. Requirements split into low freshness (T+1 day) and high freshness (T+10 minutes). Low freshness uses daily full pulls via Hive JDBC handler at 00:00; high freshness reuses snapshot pulls and uses Canal to parse binlogs to Kafka, Flink to write to HDFS, and Airflow to merge increments into Hive.
Challenges in the Original Architecture
Network bandwidth overload: 4,000+ concurrent pull tasks saturated database network bandwidth.
Low resource utilization: Downstream processing could only start after upstream sync, leaving Hadoop cluster CPU/memory idle from 00:00–01:00.
High maintenance cost: Schema changes required manual Airflow script updates, else field mismatches caused data anomalies.
Difficult troubleshooting: Long data chain (Canal → Kafka → Flink → Airflow) made root-cause analysis slow.
Flink job management difficulty: Lack of unified deployment/management led to rising operational overhead as job count grew.
Why Paimon and StreamPark?
Paimon Core Features
After evaluating Hudi, Iceberg, and Paimon, Ziroom chose Apache Paimon (streaming data lake storage) for:
Unified batch and stream processing (batch write/read, streaming ops).
Data lake capabilities: low cost, high reliability, scalable metadata.
Rich merge engines (latest record, partial update, aggregation).
Automatic changelog generation with multiple producers.
Rich table types: primary key tables, append-only, partitioned, temporary.
Schema evolution sync: auto-detects and propagates source schema changes.
Paimon works with Flink (and Spark) to build real-time Lakehouse.
StreamPark Core Features
Apache StreamPark is a stream processing development and management framework providing:
Development framework: easy Flink/Spark app building.
Full lifecycle management platform: dev, debug, deploy, operate.
Multi-version Flink support, all deployment modes (YARN, K8s), automated build/test/deploy.
Rich management APIs: job copy, create, build, deploy, start/stop via checkpoint/savepoint.
Architecture Before and After Migration
Before: Six-Step Manual Process
User submits table access request via data platform.
OA workflow approval.
Platform calls Canal API to deploy Canal task, shipping MySQL binlog to Kafka.
Manual Flink Session Submit UI deployment of template job to parse Kafka and write to HDFS as Hive external incremental table.
Airflow schedules initialization: creates Hive mapping tables and runs first full load.
Scheduled Hive Merge merges incremental data into Hive full table.
Additional screenshots show each step UI.
After: Streamlined API-Driven Flow
First two steps (request, approval) unchanged. After approval, the platform calls StreamPark APIs to deploy Flink Paimon jobs directly, eliminating Canal, Kafka, and Airflow.
Paimon One-Click Hive Ingestion
Since Paimon 0.5, CDC integration via paimon-flink-action jar enables real-time ingestion from MySQL, Kafka, Mongo into Paimon. Ziroom uses mysql-sync-database (whole database sync) with including_tables parameter to select tables. This avoids per-table Flink jobs, saving resources. Paimon auto-creates tables and supports schema evolution (e.g., MySQL column changes propagate automatically).
Example command:
<FLINK_HOME>/bin/flink run \
/path/to/paimon-flink-action-0.8-SNAPSHOT.jar \
mysql_sync_table \
--warehouse <warehouse-path> \
--database <database-name> \
--table <table-name> \
[--partition_keys <partition_keys>] \
[--primary_keys <primary-keys>] \
[--type_mapping <option1,option2...>] \
[--computed_column <'column-name=expr-name(args[,...])'> [--computed_column ...]] \
[--metadata_column <metadata-column>] \
[--mysql_conf <mysql-cdc-source-conf> [--mysql_conf ...]] \
[--catalog_conf <paimon-catalog-conf> [--catalog_conf ...]] \
[--table_conf <paimon-table-sink-conf> [--table_conf ...]]Benefits: shortened ingestion chain, removed Canal/Kafka/Airflow dependencies, minute-level MySQL-to-Hive sync, full Hive read compatibility, low migration cost, Paimon Tag feature acts as lightweight snapshots reducing storage cost.
StreamPark + Paimon Deployment Practice
StreamPark 2.1.2+ improved JAR job support for Paimon integration. However, manual job creation via UI didn't meet Ziroom's need for flexible, API-driven job creation. StreamPark's open APIs (copy, build, deploy, start, stop) enabled automated scheduling.
Automated Deployment Steps
Copy job via API: Call StreamPark copy API with parameters (job name, Flink version, deployment mode, etc.). Screenshot shows parameter JSON.
Build job image via API: Trigger build.
Start job via API: Launch the job.
After start, StreamPark dashboard shows job status and resource overview. Clicking Application Name links to Flink Web UI for detailed monitoring.
Finally, data is queryable in Hive via Hue, reading Paimon tables processed by Flink with low latency.
Benefits Achieved
Network and database pressure optimized: Direct Paimon snapshot reads eliminated midnight full pulls, reducing network saturation and database load, while lowering storage costs.
Job management efficiency: StreamPark APIs removed manual Flink deployment, eliminating human delays and communication overhead.
Lower development and maintenance costs: Shortened pipeline reduced maintenance burden and troubleshooting time; schema evolution solved field inconsistency; unified batch/stream processing.
Reduced scheduling and compute resource costs: No external scheduler for incremental merges; no Hive compute for merge operations.
Conclusion and Outlook
Ziroom thanks Apache StreamPark and Apache Paimon communities for support. Both projects show strong potential and community collaboration, expected to become Apache top-level projects and benchmarks for new open-source projects.
For questions about attribution, corrections or content rights, please contactand we will review it promptly.