diff --git a/bin/build-sync.sh b/bin/build-sync.sh
new file mode 100755
index 0000000..054df55
--- /dev/null
+++ b/bin/build-sync.sh
@@ -0,0 +1,4 @@
+#!/bin/bash
+mvn -pl service-common clean deploy -D skipTests -P local -s ~/.m2/settings-development.xml
+mvn -pl utils/sync clean package -D skipTests -s ~/.m2/settings-development.xml
+ytp-transfer2 /Users/lanyuanxiaoyao/Project/IdeaProjects/hudi-service/utils/sync/target/sync-1.0.0-SNAPSHOT.jar
diff --git a/pom.xml b/pom.xml
index 7e8e5b3..3391879 100644
--- a/pom.xml
+++ b/pom.xml
@@ -9,6 +9,7 @@
1.0.0-SNAPSHOT
pom
+ service-common
service-configuration
service-gateway
service-queue
@@ -32,6 +33,8 @@
service-scheduler
service-launcher
service-command
+ utils/executor
+ utils/sync
@@ -39,7 +42,7 @@
8
UTF-8
- b1e11
+ b2b12
2.6.8
2021.0.3
diff --git a/service-common/pom.xml b/service-common/pom.xml
new file mode 100644
index 0000000..cbe5fd1
--- /dev/null
+++ b/service-common/pom.xml
@@ -0,0 +1,41 @@
+
+
+ 4.0.0
+
+ com.lanyuanxiaoyao
+ hudi-service
+ 1.0.0-SNAPSHOT
+
+
+ service-common
+
+
+
+
+
+ cn.hutool
+ hutool-all
+
+
+
+ io.github.dragons96
+ sql-builder
+ 0.0.5.3
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-source-plugin
+
+
+ org.apache.maven.plugins
+ maven-deploy-plugin
+
+
+
+
\ No newline at end of file
diff --git a/service-common/src/main/java/com/lanyuanxiaoyao/service/common/Constants.java b/service-common/src/main/java/com/lanyuanxiaoyao/service/common/Constants.java
new file mode 100644
index 0000000..ca17da3
--- /dev/null
+++ b/service-common/src/main/java/com/lanyuanxiaoyao/service/common/Constants.java
@@ -0,0 +1,211 @@
+package com.lanyuanxiaoyao.service.common;
+
+import com.lanyuanxiaoyao.service.common.entity.TableMeta;
+import java.time.format.DateTimeFormatter;
+import java.util.function.BiFunction;
+
+/**
+ * 常量
+ *
+ * @author ZhangJiacheng
+ * @version 0.0.1
+ * @date 2021-12-03
+ */
+public interface Constants {
+ // String DATABASE_NAME = "hudi_collect_build";
+ // String DATABASE_NAME = "hudi_collect_build_2";
+ String DATABASE_NAME = "hudi_collect_build_b12";
+
+ String API_HEADER_NAME = "Api-Version";
+ String API_VERSION = "1";
+
+ /**
+ * 联合主键
+ */
+ String UNION_KEY_NAME = "_key";
+ /**
+ * 源端最后操作时间
+ */
+ String LATEST_OPERATION_TIMESTAMP_KEY_NAME = "latest_op_ts";
+ /**
+ * 记录下游入库时间
+ */
+ String UPDATE_TIMESTAMP_KEY_NAME = "update_ts";
+ /**
+ * Hudi 删除标记字段
+ */
+ String HUDI_DELETE_KEY_NAME = "_hoodie_is_deleted";
+
+ String PULSAR_SUBSCRIPTION_NAME_PREFIX = "Hudi_Sync_Pulsar_Reader";
+
+ String VERSION_UPDATE_KEY = "versionUpdate";
+ String VERSION_KEY = "version";
+
+ String DELETE = "D";
+ String INSERT = "I";
+ String UPDATE = "U";
+ String DDL = "ddl";
+ String UNKNOWN = "unknown";
+
+ String CITY_ID = "CITY_ID";
+ String INCLUDE = "INCLUDE";
+ String EXCLUDE = "EXCLUDE";
+
+ String JOB_ID = "job-id";
+ String SERVICE_MODE = "service-mode";
+ String FLINK_JOB = "flink-job";
+ String TABLE_META = "table-meta";
+ String TABLE_META_LIST = "table-meta-list";
+ String MESSAGE_ID = "message-id";
+ String INSTANTS = "instants";
+ String BETA = "beta";
+ String CLUSTER = "cluster";
+
+ String COW = "COPY_ON_WRITE";
+ String MOR = "MERGE_ON_READ";
+
+ String FLINK_JOB_OPTION = "-" + FLINK_JOB;
+ String TABLE_META_OPTION = "-" + TABLE_META;
+ String TABLE_META_LIST_OPTION = "-" + TABLE_META_LIST;
+ String INSTANTS_OPTION = "-" + INSTANTS;
+ String BETA_OPTION = "-" + BETA;
+ String CLUSTER_OPTION = "-" + CLUSTER;
+
+ String SPRING_SECURITY_AUTHORITY = "Anonymous";
+ String SPRING_SECURITY_USERNAME = "AxhEbscwsJDbYMH2";
+ String SPRING_SECURITY_PASSWORD = "{noop}cYxg3b4PtWoVD5SjFayWxtnSVsjzRsg4";
+ String SPRING_SECURITY_PASSWORD_PLAIN = "cYxg3b4PtWoVD5SjFayWxtnSVsjzRsg4";
+
+ String VICTORIA_USERNAME = "EsCFVuNkiDWv7PKmcF";
+ String VICTORIA_PASSWORD = "Abf%x9ocS^iKr3tgrd";
+
+ String SCHEMA_NAME = "schema";
+ String TABLE_NAME = "table";
+ String DATA_TIME = "data-time";
+ String DATA_PARENT_PATH = "data-parent-path";
+
+ String METRICS_PREFIX = "metrics_hudi";
+ String METRICS_YARN_PREFIX = METRICS_PREFIX + "_yarn";
+ String METRICS_YARN_JOB = METRICS_YARN_PREFIX + "_job";
+ String METRICS_YARN_TABLE = METRICS_YARN_PREFIX + "_table";
+ String METRICS_SYNC_PREFIX = METRICS_PREFIX + "_sync";
+ String METRICS_SYNC_SOURCE_LATENCY = METRICS_SYNC_PREFIX + "_source_latency";
+ String METRICS_SYNC_LATENCY = METRICS_SYNC_PREFIX + "_latency";
+ String METRICS_SYNC_FLINK_JOB_ID = METRICS_SYNC_PREFIX + "_flink_job_id";
+
+ String METRICS_SYNC_SOURCE_MESSAGE_RECEIVE = METRICS_SYNC_PREFIX + "_source_message_receive";
+ String METRICS_SYNC_SOURCE_MESSAGE_SIZE_RECEIVE_BYTES = METRICS_SYNC_PREFIX + "_source_message_receive_bytes";
+ String METRICS_SYNC_SOURCE_OPERATION_TYPE_RECEIVE = METRICS_SYNC_PREFIX + "_source_operation_type_receive";
+ String METRICS_SYNC_SOURCE_CHANGE_FILTER = METRICS_SYNC_PREFIX + "_source_change_filter";
+ String METRICS_SYNC_SOURCE_CHANGE_PARTITION = METRICS_SYNC_PREFIX + "_source_change_partition";
+ String METRICS_SYNC_SOURCE_BACK_LOGS = METRICS_SYNC_PREFIX + "_source_back_logs";
+
+ String METRICS_LABEL_FLINK_JOB_ID = "flink_job_id";
+ String METRICS_LABEL_FLINK_JOB_NAME = "flink_job_name";
+ String METRICS_LABEL_FLINK_NATIVE_JOB_ID = "flink_native_job_id";
+ String METRICS_LABEL_FLINK_NATIVE_TASK_NAME = "flink_native_task_name";
+ String METRICS_LABEL_FLINK_PARALLEL_ID = "flink_parallel_id";
+ String METRICS_LABEL_RUN_TYPE = "run_type";
+ String METRICS_LABEL_EXECUTOR_VERSION = "executor_version";
+ String METRICS_LABEL_CLUSTER = "cluster";
+
+ String METRICS_RUN_TYPE_SYNC = "sync";
+ String METRICS_RUN_TYPE_COMPACTION = "compaction";
+
+ String METRICS_LABEL_SCHEMA = "schema";
+ String METRICS_LABEL_TABLE = "table";
+ String METRICS_LABEL_STATUS = "status";
+ String METRICS_LABEL_TOPIC = "topic";
+ String METRICS_LABEL_BATCH_ID = "batch_id";
+ String METRICS_LABEL_ALIAS = "alias";
+ String METRICS_LABEL_APPLICATION_ID = "application_id";
+
+ String METRICS_STATUS_RUNNING = "running";
+ String METRICS_STATUS_STOPPED = "stopped";
+
+ String METRICS_LABEL_TYPE = "type";
+
+ String LOKI_PUSH_URL = "loki_push_url";
+
+ DateTimeFormatter FORMATTER = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
+
+ String OPERATION_DONE = "操作完成";
+ String OPERATION_CANCEL = "操作取消";
+ String FETCHING_DATA = "Fetching Data";
+
+ String COMPACTION_STATUS_SCHEDULE = "SCHEDULE";
+ String COMPACTION_STATUS_START = "START";
+ String COMPACTION_STATUS_FINISH = "FINISH";
+ String COMPACTION_STATUS_FAILURE = "FAILURE";
+
+ long SECOND = 1000;
+ long HALF_MINUTE = 30 * SECOND;
+ long MINUTE = 60 * SECOND;
+ long HALF_HOUR = 30 * MINUTE;
+ long HOUR = 60 * MINUTE;
+
+ long KB = 1024;
+ long MB = 1024 * KB;
+ long GB = 1024 * MB;
+ long TB = 1024 * GB;
+
+ String TAG_SPLIT = ";";
+ String TAG_OPERATOR = "=";
+
+ String EVENT = "event";
+ String FROM_COMMAND_UTIL = "command util";
+ String FROM_COMPACTOR = "compactor";
+
+ int COMMAND_RENDER_WIDTH = 500;
+
+ String LOG_FLINK_JOB_ID_LABEL = "LOG_FLINK_JOB_ID_LABEL";
+ String LOG_FLINK_JOB_ID = "flink_job_id";
+ String LOG_ALIAS_LABEL = "LOG_ALIAS_LABEL";
+ String LOG_ALIAS = "alias";
+ String LOG_JOB_ID_LABEL = "LOG_JOB_ID_LABEL";
+ String LOG_JOB_ID = "job_id";
+
+ String LOG_POINT_PREFIX = "LOP-";
+ String LOG_POINT_MESSAGE_ID_EMPTY = LOG_POINT_PREFIX + "000001";
+ String LOG_POINT_CHECKPOINT_INITIAL = LOG_POINT_PREFIX + "000002";
+ String LOG_POINT_CHECKPOINT_INITIAL_MESSAGE_ID = LOG_POINT_PREFIX + "000003";
+ String LOG_POINT_PULSAR_SOURCE_BOOTSTRAP_MESSAGE_ID = LOG_POINT_PREFIX + "000004";
+ String LOG_POINT_PULSAR_SOURCE_GET_MESSAGE_ID_ERROR = LOG_POINT_PREFIX + "000005";
+ String LOG_POINT_FIELD_TYPE_NOT_FOUND = LOG_POINT_PREFIX + "000006";
+
+ String TAGS_NO_COMPACT = "NO_COMPACT";
+ String TAGS_PULSAR_BACKUP = "PULSAR_BACKUP";
+ String TAGS_NO_PRE_COMBINE = "NO_PRE_COMBINE";
+ String TAGS_PRE_COMBINE = "PRE_COMBINE";
+ String TAGS_NO_IGNORE_FAILED = "NO_IGNORE_FAILED";
+ String TAGS_DISABLE_CHAINING = "DISABLE_CHAINING";
+ String TAGS_TRACE_LATEST_OP_TS = "TRACE_LATEST_OP_TS";
+ String TAGS_SOURCE_READER = "SOURCE_READER";
+ String TAGS_USE_TEST_JAR = "USE_TEST_JAR";
+ String TAGS_ODS = "ODS";
+ String TAGS_ODS_FOCUS = "ODS_FOCUS";
+
+ String COMPACTION_QUEUE_PRE = "compaction-queue-pre";
+ String COMPACTION_QUEUE_B1 = "compaction-queue-b1";
+ String COMPACTION_QUEUE_B5 = "compaction-queue-b5";
+ String COMPACTION_QUEUE_A4 = "compaction-queue-a4";
+ String COMPACTION_QUEUE_B12 = "compaction-queue-b12";
+
+ String CLUSTER_B1 = "b1";
+ String CLUSTER_B5 = "b5";
+ String CLUSTER_A4 = "a4";
+ String CLUSTER_B12 = "b12";
+
+ String SCHEDULE_JOB_FAIL_COUNT = "SCHEDULE_JOB_FAIL_COUNT";
+
+ String SCHEDULE_RECOMMEND = "schedule_recommend";
+ String SCHEDULE_FORCE = "schedule_force";
+
+ BiFunction FIELD_COVERT = (tableMeta, field) -> {
+ if (TableMeta.SourceType.TELEPG.equals(tableMeta.getSourceType())) {
+ return field.toLowerCase();
+ } else {
+ return field;
+ }
+ };
+}
diff --git a/service-common/src/main/java/com/lanyuanxiaoyao/service/common/SQLConstants.java b/service-common/src/main/java/com/lanyuanxiaoyao/service/common/SQLConstants.java
new file mode 100644
index 0000000..35340bd
--- /dev/null
+++ b/service-common/src/main/java/com/lanyuanxiaoyao/service/common/SQLConstants.java
@@ -0,0 +1,1713 @@
+package com.lanyuanxiaoyao.service.common;
+
+import club.kingon.sql.builder.entry.Alias;
+
+/**
+ * SQL
+ */
+@SuppressWarnings({"unused", "SpellCheckingInspection"})
+public interface SQLConstants {
+ /**
+ * hudi_collect_build
+ */
+ interface HudiCollectBuild {
+ /**
+ * Schema 名称
+ */
+ String _name_ = Constants.DATABASE_NAME;
+
+ /**
+ * tb_app_collect_table_info
+ */
+ interface TbAppCollectTableInfo {
+ /**
+ * 表原名
+ */
+ String _origin_ = _name_ + ".tb_app_collect_table_info";
+ /**
+ * SqlBuilder 别名对象 {@link Alias}
+ */
+ Alias _alias_ = Alias.of(_name_ + ".tb_app_collect_table_info", "tacti");
+ /**
+ * 字段 id 原始值 id 唯一标识
+ */
+ String ID_O = "id";
+ /**
+ * 字段 id 别名值 tacti.id 唯一标识
+ */
+ String ID_A = _alias_.getAlias() + "." + ID_O;
+ /**
+ * 字段 alias 原始值 alias 表别名
+ */
+ String ALIAS_O = "alias";
+ /**
+ * 字段 alias 别名值 tacti.alias 表别名
+ */
+ String ALIAS_A = _alias_.getAlias() + "." + ALIAS_O;
+ /**
+ * 字段 flink_job_id 原始值 flink_job_id Flink Job Id
+ */
+ String FLINK_JOB_ID_O = "flink_job_id";
+ /**
+ * 字段 flink_job_id 别名值 tacti.flink_job_id Flink Job Id
+ */
+ String FLINK_JOB_ID_A = _alias_.getAlias() + "." + FLINK_JOB_ID_O;
+ /**
+ * 字段 hudi_job_id 原始值 hudi_job_id hudi 配置
+ */
+ String HUDI_JOB_ID_O = "hudi_job_id";
+ /**
+ * 字段 hudi_job_id 别名值 tacti.hudi_job_id hudi 配置
+ */
+ String HUDI_JOB_ID_A = _alias_.getAlias() + "." + HUDI_JOB_ID_O;
+ /**
+ * 字段 sync_yarn_job_id 原始值 sync_yarn_job_id 同步 yarn 配置
+ */
+ String SYNC_YARN_JOB_ID_O = "sync_yarn_job_id";
+ /**
+ * 字段 sync_yarn_job_id 别名值 tacti.sync_yarn_job_id 同步 yarn 配置
+ */
+ String SYNC_YARN_JOB_ID_A = _alias_.getAlias() + "." + SYNC_YARN_JOB_ID_O;
+ /**
+ * 字段 compaction_yarn_job_id 原始值 compaction_yarn_job_id 压缩 yarn 配置
+ */
+ String COMPACTION_YARN_JOB_ID_O = "compaction_yarn_job_id";
+ /**
+ * 字段 compaction_yarn_job_id 别名值 tacti.compaction_yarn_job_id 压缩 yarn 配置
+ */
+ String COMPACTION_YARN_JOB_ID_A = _alias_.getAlias() + "." + COMPACTION_YARN_JOB_ID_O;
+ /**
+ * 字段 config_id 原始值 config_id 全局配置
+ */
+ String CONFIG_ID_O = "config_id";
+ /**
+ * 字段 config_id 别名值 tacti.config_id 全局配置
+ */
+ String CONFIG_ID_A = _alias_.getAlias() + "." + CONFIG_ID_O;
+ /**
+ * 字段 src_db 原始值 src_db 源数据库
+ */
+ String SRC_DB_O = "src_db";
+ /**
+ * 字段 src_db 别名值 tacti.src_db 源数据库
+ */
+ String SRC_DB_A = _alias_.getAlias() + "." + SRC_DB_O;
+ /**
+ * 字段 src_type 原始值 src_type 数据源类型
+ */
+ String SRC_TYPE_O = "src_type";
+ /**
+ * 字段 src_type 别名值 tacti.src_type 数据源类型
+ */
+ String SRC_TYPE_A = _alias_.getAlias() + "." + SRC_TYPE_O;
+ /**
+ * 字段 src_schema 原始值 src_schema 源库
+ */
+ String SRC_SCHEMA_O = "src_schema";
+ /**
+ * 字段 src_schema 别名值 tacti.src_schema 源库
+ */
+ String SRC_SCHEMA_A = _alias_.getAlias() + "." + SRC_SCHEMA_O;
+ /**
+ * 字段 src_table 原始值 src_table 源表
+ */
+ String SRC_TABLE_O = "src_table";
+ /**
+ * 字段 src_table 别名值 tacti.src_table 源表
+ */
+ String SRC_TABLE_A = _alias_.getAlias() + "." + SRC_TABLE_O;
+ /**
+ * 字段 src_pulsar_addr 原始值 src_pulsar_addr pulsar 地址
+ */
+ String SRC_PULSAR_ADDR_O = "src_pulsar_addr";
+ /**
+ * 字段 src_pulsar_addr 别名值 tacti.src_pulsar_addr pulsar 地址
+ */
+ String SRC_PULSAR_ADDR_A = _alias_.getAlias() + "." + SRC_PULSAR_ADDR_O;
+ /**
+ * 字段 src_topic 原始值 src_topic pulsar topic
+ */
+ String SRC_TOPIC_O = "src_topic";
+ /**
+ * 字段 src_topic 别名值 tacti.src_topic pulsar topic
+ */
+ String SRC_TOPIC_A = _alias_.getAlias() + "." + SRC_TOPIC_O;
+ /**
+ * 字段 tgt_db 原始值 tgt_db 目标库
+ */
+ String TGT_DB_O = "tgt_db";
+ /**
+ * 字段 tgt_db 别名值 tacti.tgt_db 目标库
+ */
+ String TGT_DB_A = _alias_.getAlias() + "." + TGT_DB_O;
+ /**
+ * 字段 tgt_table 原始值 tgt_table 目标表
+ */
+ String TGT_TABLE_O = "tgt_table";
+ /**
+ * 字段 tgt_table 别名值 tacti.tgt_table 目标表
+ */
+ String TGT_TABLE_A = _alias_.getAlias() + "." + TGT_TABLE_O;
+ /**
+ * 字段 tgt_hdfs_path 原始值 tgt_hdfs_path 目标 HDFS 路径
+ */
+ String TGT_HDFS_PATH_O = "tgt_hdfs_path";
+ /**
+ * 字段 tgt_hdfs_path 别名值 tacti.tgt_hdfs_path 目标 HDFS 路径
+ */
+ String TGT_HDFS_PATH_A = _alias_.getAlias() + "." + TGT_HDFS_PATH_O;
+ /**
+ * 字段 tgt_table_type 原始值 tgt_table_type 表类型
+ */
+ String TGT_TABLE_TYPE_O = "tgt_table_type";
+ /**
+ * 字段 tgt_table_type 别名值 tacti.tgt_table_type 表类型
+ */
+ String TGT_TABLE_TYPE_A = _alias_.getAlias() + "." + TGT_TABLE_TYPE_O;
+ /**
+ * 字段 status 原始值 status 记录状态
+ */
+ String STATUS_O = "status";
+ /**
+ * 字段 status 别名值 tacti.status 记录状态
+ */
+ String STATUS_A = _alias_.getAlias() + "." + STATUS_O;
+ /**
+ * 字段 filter_field 原始值 filter_field 过滤字段
+ */
+ String FILTER_FIELD_O = "filter_field";
+ /**
+ * 字段 filter_field 别名值 tacti.filter_field 过滤字段
+ */
+ String FILTER_FIELD_A = _alias_.getAlias() + "." + FILTER_FIELD_O;
+ /**
+ * 字段 filter_values 原始值 filter_values 过滤值
+ */
+ String FILTER_VALUES_O = "filter_values";
+ /**
+ * 字段 filter_values 别名值 tacti.filter_values 过滤值
+ */
+ String FILTER_VALUES_A = _alias_.getAlias() + "." + FILTER_VALUES_O;
+ /**
+ * 字段 filter_type 原始值 filter_type 过滤类型
+ */
+ String FILTER_TYPE_O = "filter_type";
+ /**
+ * 字段 filter_type 别名值 tacti.filter_type 过滤类型
+ */
+ String FILTER_TYPE_A = _alias_.getAlias() + "." + FILTER_TYPE_O;
+ /**
+ * 字段 bucket_number 原始值 bucket_number hash 值
+ */
+ String BUCKET_NUMBER_O = "bucket_number";
+ /**
+ * 字段 bucket_number 别名值 tacti.bucket_number hash 值
+ */
+ String BUCKET_NUMBER_A = _alias_.getAlias() + "." + BUCKET_NUMBER_O;
+ /**
+ * 字段 partition_field 原始值 partition_field 分区字段
+ */
+ String PARTITION_FIELD_O = "partition_field";
+ /**
+ * 字段 partition_field 别名值 tacti.partition_field 分区字段
+ */
+ String PARTITION_FIELD_A = _alias_.getAlias() + "." + PARTITION_FIELD_O;
+ /**
+ * 字段 update_time 原始值 update_time
+ */
+ String UPDATE_TIME_O = "update_time";
+ /**
+ * 字段 update_time 别名值 tacti.update_time
+ */
+ String UPDATE_TIME_A = _alias_.getAlias() + "." + UPDATE_TIME_O;
+ /**
+ * 字段 priority 原始值 priority 优先级
+ */
+ String PRIORITY_O = "priority";
+ /**
+ * 字段 priority 别名值 tacti.priority 优先级
+ */
+ String PRIORITY_A = _alias_.getAlias() + "." + PRIORITY_O;
+ /**
+ * 字段 schedule_id 原始值 schedule_id 压缩调度计划
+ */
+ String SCHEDULE_ID_O = "schedule_id";
+ /**
+ * 字段 schedule_id 别名值 tacti.schedule_id 压缩调度计划
+ */
+ String SCHEDULE_ID_A = _alias_.getAlias() + "." + SCHEDULE_ID_O;
+ /**
+ * 字段 hive_db 原始值 hive_db
+ */
+ String HIVE_DB_O = "hive_db";
+ /**
+ * 字段 hive_db 别名值 tacti.hive_db
+ */
+ String HIVE_DB_A = _alias_.getAlias() + "." + HIVE_DB_O;
+ /**
+ * 字段 hive_table 原始值 hive_table
+ */
+ String HIVE_TABLE_O = "hive_table";
+ /**
+ * 字段 hive_table 别名值 tacti.hive_table
+ */
+ String HIVE_TABLE_A = _alias_.getAlias() + "." + HIVE_TABLE_O;
+ /**
+ * 字段 tags 原始值 tags 标签
+ */
+ String TAGS_O = "tags";
+ /**
+ * 字段 tags 别名值 tacti.tags 标签
+ */
+ String TAGS_A = _alias_.getAlias() + "." + TAGS_O;
+ /**
+ * 字段 version 原始值 version 表版本
+ */
+ String VERSION_O = "version";
+ /**
+ * 字段 version 别名值 tacti.version 表版本
+ */
+ String VERSION_A = _alias_.getAlias() + "." + VERSION_O;
+ }
+
+ /**
+ * tb_app_collect_table_version 跨天版本记录表
+ */
+ interface TbAppCollectTableVersion {
+ /**
+ * 表原名
+ */
+ String _origin_ = _name_ + ".tb_app_collect_table_version";
+ /**
+ * SqlBuilder 别名对象 {@link Alias}
+ */
+ Alias _alias_ = Alias.of(_name_ + ".tb_app_collect_table_version", "tactv");
+ /**
+ * 字段 flink_job_id 原始值 flink_job_id Flink Job ID
+ */
+ String FLINK_JOB_ID_O = "flink_job_id";
+ /**
+ * 字段 flink_job_id 别名值 tactv.flink_job_id Flink Job ID
+ */
+ String FLINK_JOB_ID_A = _alias_.getAlias() + "." + FLINK_JOB_ID_O;
+ /**
+ * 字段 alias 原始值 alias 表别名
+ */
+ String ALIAS_O = "alias";
+ /**
+ * 字段 alias 别名值 tactv.alias 表别名
+ */
+ String ALIAS_A = _alias_.getAlias() + "." + ALIAS_O;
+ /**
+ * 字段 version 原始值 version 版本
+ */
+ String VERSION_O = "version";
+ /**
+ * 字段 version 别名值 tactv.version 版本
+ */
+ String VERSION_A = _alias_.getAlias() + "." + VERSION_O;
+ /**
+ * 字段 op_ts 原始值 op_ts 操作时间
+ */
+ String OP_TS_O = "op_ts";
+ /**
+ * 字段 op_ts 别名值 tactv.op_ts 操作时间
+ */
+ String OP_TS_A = _alias_.getAlias() + "." + OP_TS_O;
+ /**
+ * 字段 create_time 原始值 create_time 记录创建时间
+ */
+ String CREATE_TIME_O = "create_time";
+ /**
+ * 字段 create_time 别名值 tactv.create_time 记录创建时间
+ */
+ String CREATE_TIME_A = _alias_.getAlias() + "." + CREATE_TIME_O;
+ /**
+ * 字段 update_time 原始值 update_time 记录创建时间
+ */
+ String UPDATE_TIME_O = "update_time";
+ /**
+ * 字段 update_time 别名值 tactv.update_time 记录创建时间
+ */
+ String UPDATE_TIME_A = _alias_.getAlias() + "." + UPDATE_TIME_O;
+ /**
+ * 字段 scheduled 原始值 scheduled
+ */
+ String SCHEDULED_O = "scheduled";
+ /**
+ * 字段 scheduled 别名值 tactv.scheduled
+ */
+ String SCHEDULED_A = _alias_.getAlias() + "." + SCHEDULED_O;
+ }
+
+ /**
+ * tb_app_flink_job_config
+ */
+ interface TbAppFlinkJobConfig {
+ /**
+ * 表原名
+ */
+ String _origin_ = _name_ + ".tb_app_flink_job_config";
+ /**
+ * SqlBuilder 别名对象 {@link Alias}
+ */
+ Alias _alias_ = Alias.of(_name_ + ".tb_app_flink_job_config", "tafjc");
+ /**
+ * 字段 id 原始值 id 唯一标识
+ */
+ String ID_O = "id";
+ /**
+ * 字段 id 别名值 tafjc.id 唯一标识
+ */
+ String ID_A = _alias_.getAlias() + "." + ID_O;
+ /**
+ * 字段 name 原始值 name 名称
+ */
+ String NAME_O = "name";
+ /**
+ * 字段 name 别名值 tafjc.name 名称
+ */
+ String NAME_A = _alias_.getAlias() + "." + NAME_O;
+ /**
+ * 字段 status 原始值 status 记录状态
+ */
+ String STATUS_O = "status";
+ /**
+ * 字段 status 别名值 tafjc.status 记录状态
+ */
+ String STATUS_A = _alias_.getAlias() + "." + STATUS_O;
+ /**
+ * 字段 comment 原始值 comment 注释
+ */
+ String COMMENT_O = "comment";
+ /**
+ * 字段 comment 别名值 tafjc.comment 注释
+ */
+ String COMMENT_A = _alias_.getAlias() + "." + COMMENT_O;
+ /**
+ * 字段 application_id 原始值 application_id 同步 yarn id
+ */
+ String APPLICATION_ID_O = "application_id";
+ /**
+ * 字段 application_id 别名值 tafjc.application_id 同步 yarn id
+ */
+ String APPLICATION_ID_A = _alias_.getAlias() + "." + APPLICATION_ID_O;
+ /**
+ * 字段 run_mode 原始值 run_mode 运行模式
+ */
+ String RUN_MODE_O = "run_mode";
+ /**
+ * 字段 run_mode 别名值 tafjc.run_mode 运行模式
+ */
+ String RUN_MODE_A = _alias_.getAlias() + "." + RUN_MODE_O;
+ /**
+ * 字段 one_in_one_yarn_job_id 原始值 one_in_one_yarn_job_id ONE_IN_ONE yarn 配置
+ */
+ String ONE_IN_ONE_YARN_JOB_ID_O = "one_in_one_yarn_job_id";
+ /**
+ * 字段 one_in_one_yarn_job_id 别名值 tafjc.one_in_one_yarn_job_id ONE_IN_ONE yarn 配置
+ */
+ String ONE_IN_ONE_YARN_JOB_ID_A = _alias_.getAlias() + "." + ONE_IN_ONE_YARN_JOB_ID_O;
+ }
+
+ /**
+ * tb_app_global_config 通用配置
+ */
+ interface TbAppGlobalConfig {
+ /**
+ * 表原名
+ */
+ String _origin_ = _name_ + ".tb_app_global_config";
+ /**
+ * SqlBuilder 别名对象 {@link Alias}
+ */
+ Alias _alias_ = Alias.of(_name_ + ".tb_app_global_config", "tagc");
+ /**
+ * 字段 id 原始值 id 唯一标识
+ */
+ String ID_O = "id";
+ /**
+ * 字段 id 别名值 tagc.id 唯一标识
+ */
+ String ID_A = _alias_.getAlias() + "." + ID_O;
+ /**
+ * 字段 metric_publish_url 原始值 metric_publish_url victoria 指标服务地址
+ */
+ String METRIC_PUBLISH_URL_O = "metric_publish_url";
+ /**
+ * 字段 metric_publish_url 别名值 tagc.metric_publish_url victoria 指标服务地址
+ */
+ String METRIC_PUBLISH_URL_A = _alias_.getAlias() + "." + METRIC_PUBLISH_URL_O;
+ /**
+ * 字段 metric_prometheus_url 原始值 metric_prometheus_url 指标推送 prometheus 服务地址
+ */
+ String METRIC_PROMETHEUS_URL_O = "metric_prometheus_url";
+ /**
+ * 字段 metric_prometheus_url 别名值 tagc.metric_prometheus_url 指标推送 prometheus 服务地址
+ */
+ String METRIC_PROMETHEUS_URL_A = _alias_.getAlias() + "." + METRIC_PROMETHEUS_URL_O;
+ /**
+ * 字段 metric_api_url 原始值 metric_api_url api 推送地址
+ */
+ String METRIC_API_URL_O = "metric_api_url";
+ /**
+ * 字段 metric_api_url 别名值 tagc.metric_api_url api 推送地址
+ */
+ String METRIC_API_URL_A = _alias_.getAlias() + "." + METRIC_API_URL_O;
+ /**
+ * 字段 metric_publish_delay 原始值 metric_publish_delay
+ */
+ String METRIC_PUBLISH_DELAY_O = "metric_publish_delay";
+ /**
+ * 字段 metric_publish_delay 别名值 tagc.metric_publish_delay
+ */
+ String METRIC_PUBLISH_DELAY_A = _alias_.getAlias() + "." + METRIC_PUBLISH_DELAY_O;
+ /**
+ * 字段 metric_publish_period 原始值 metric_publish_period
+ */
+ String METRIC_PUBLISH_PERIOD_O = "metric_publish_period";
+ /**
+ * 字段 metric_publish_period 别名值 tagc.metric_publish_period
+ */
+ String METRIC_PUBLISH_PERIOD_A = _alias_.getAlias() + "." + METRIC_PUBLISH_PERIOD_O;
+ /**
+ * 字段 metric_publish_timeout 原始值 metric_publish_timeout
+ */
+ String METRIC_PUBLISH_TIMEOUT_O = "metric_publish_timeout";
+ /**
+ * 字段 metric_publish_timeout 别名值 tagc.metric_publish_timeout
+ */
+ String METRIC_PUBLISH_TIMEOUT_A = _alias_.getAlias() + "." + METRIC_PUBLISH_TIMEOUT_O;
+ /**
+ * 字段 metric_publish_batch 原始值 metric_publish_batch
+ */
+ String METRIC_PUBLISH_BATCH_O = "metric_publish_batch";
+ /**
+ * 字段 metric_publish_batch 别名值 tagc.metric_publish_batch
+ */
+ String METRIC_PUBLISH_BATCH_A = _alias_.getAlias() + "." + METRIC_PUBLISH_BATCH_O;
+ /**
+ * 字段 checkpoint_root_path 原始值 checkpoint_root_path checkpoint 信息保存路径
+ */
+ String CHECKPOINT_ROOT_PATH_O = "checkpoint_root_path";
+ /**
+ * 字段 checkpoint_root_path 别名值 tagc.checkpoint_root_path checkpoint 信息保存路径
+ */
+ String CHECKPOINT_ROOT_PATH_A = _alias_.getAlias() + "." + CHECKPOINT_ROOT_PATH_O;
+ /**
+ * 字段 zk_url 原始值 zk_url
+ */
+ String ZK_URL_O = "zk_url";
+ /**
+ * 字段 zk_url 别名值 tagc.zk_url
+ */
+ String ZK_URL_A = _alias_.getAlias() + "." + ZK_URL_O;
+ }
+
+ /**
+ * tb_app_hudi_compaction_job 压缩调度任务队列
+ */
+ interface TbAppHudiCompactionJob {
+ /**
+ * 表原名
+ */
+ String _origin_ = _name_ + ".tb_app_hudi_compaction_job";
+ /**
+ * SqlBuilder 别名对象 {@link Alias}
+ */
+ Alias _alias_ = Alias.of(_name_ + ".tb_app_hudi_compaction_job", "tahcj");
+ /**
+ * 字段 flink_job_id 原始值 flink_job_id
+ */
+ String FLINK_JOB_ID_O = "flink_job_id";
+ /**
+ * 字段 flink_job_id 别名值 tahcj.flink_job_id
+ */
+ String FLINK_JOB_ID_A = _alias_.getAlias() + "." + FLINK_JOB_ID_O;
+ /**
+ * 字段 alias 原始值 alias 别名
+ */
+ String ALIAS_O = "alias";
+ /**
+ * 字段 alias 别名值 tahcj.alias 别名
+ */
+ String ALIAS_A = _alias_.getAlias() + "." + ALIAS_O;
+ /**
+ * 字段 comment 原始值 comment 备注
+ */
+ String COMMENT_O = "comment";
+ /**
+ * 字段 comment 别名值 tahcj.comment 备注
+ */
+ String COMMENT_A = _alias_.getAlias() + "." + COMMENT_O;
+ /**
+ * 字段 application_id 原始值 application_id
+ */
+ String APPLICATION_ID_O = "application_id";
+ /**
+ * 字段 application_id 别名值 tahcj.application_id
+ */
+ String APPLICATION_ID_A = _alias_.getAlias() + "." + APPLICATION_ID_O;
+ /**
+ * 字段 create_time 原始值 create_time 创建时间
+ */
+ String CREATE_TIME_O = "create_time";
+ /**
+ * 字段 create_time 别名值 tahcj.create_time 创建时间
+ */
+ String CREATE_TIME_A = _alias_.getAlias() + "." + CREATE_TIME_O;
+ /**
+ * 字段 update_time 原始值 update_time 更新时间
+ */
+ String UPDATE_TIME_O = "update_time";
+ /**
+ * 字段 update_time 别名值 tahcj.update_time 更新时间
+ */
+ String UPDATE_TIME_A = _alias_.getAlias() + "." + UPDATE_TIME_O;
+ }
+
+ /**
+ * tb_app_hudi_compaction_metrics 压缩计划执行具体指标
+ */
+ interface TbAppHudiCompactionMetrics {
+ /**
+ * 表原名
+ */
+ String _origin_ = _name_ + ".tb_app_hudi_compaction_metrics";
+ /**
+ * SqlBuilder 别名对象 {@link Alias}
+ */
+ Alias _alias_ = Alias.of(_name_ + ".tb_app_hudi_compaction_metrics", "tahcm");
+ /**
+ * 字段 flink_job_id 原始值 flink_job_id flink_job_id
+ */
+ String FLINK_JOB_ID_O = "flink_job_id";
+ /**
+ * 字段 flink_job_id 别名值 tahcm.flink_job_id flink_job_id
+ */
+ String FLINK_JOB_ID_A = _alias_.getAlias() + "." + FLINK_JOB_ID_O;
+ /**
+ * 字段 alias 原始值 alias 表别名
+ */
+ String ALIAS_O = "alias";
+ /**
+ * 字段 alias 别名值 tahcm.alias 表别名
+ */
+ String ALIAS_A = _alias_.getAlias() + "." + ALIAS_O;
+ /**
+ * 字段 cluster 原始值 cluster
+ */
+ String CLUSTER_O = "cluster";
+ /**
+ * 字段 cluster 别名值 tahcm.cluster
+ */
+ String CLUSTER_A = _alias_.getAlias() + "." + CLUSTER_O;
+ /**
+ * 字段 application_id 原始值 application_id
+ */
+ String APPLICATION_ID_O = "application_id";
+ /**
+ * 字段 application_id 别名值 tahcm.application_id
+ */
+ String APPLICATION_ID_A = _alias_.getAlias() + "." + APPLICATION_ID_O;
+ /**
+ * 字段 type 原始值 type 类型
+ */
+ String TYPE_O = "type";
+ /**
+ * 字段 type 别名值 tahcm.type 类型
+ */
+ String TYPE_A = _alias_.getAlias() + "." + TYPE_O;
+ /**
+ * 字段 source_schema 原始值 source_schema 库名
+ */
+ String SOURCE_SCHEMA_O = "source_schema";
+ /**
+ * 字段 source_schema 别名值 tahcm.source_schema 库名
+ */
+ String SOURCE_SCHEMA_A = _alias_.getAlias() + "." + SOURCE_SCHEMA_O;
+ /**
+ * 字段 source_table 原始值 source_table 表名
+ */
+ String SOURCE_TABLE_O = "source_table";
+ /**
+ * 字段 source_table 别名值 tahcm.source_table 表名
+ */
+ String SOURCE_TABLE_A = _alias_.getAlias() + "." + SOURCE_TABLE_O;
+ /**
+ * 字段 compaction_plan_instant 原始值 compaction_plan_instant 压缩计划时间点
+ */
+ String COMPACTION_PLAN_INSTANT_O = "compaction_plan_instant";
+ /**
+ * 字段 compaction_plan_instant 别名值 tahcm.compaction_plan_instant 压缩计划时间点
+ */
+ String COMPACTION_PLAN_INSTANT_A = _alias_.getAlias() + "." + COMPACTION_PLAN_INSTANT_O;
+ /**
+ * 字段 total_scan_time 原始值 total_scan_time 扫描日志文件时长
+ */
+ String TOTAL_SCAN_TIME_O = "total_scan_time";
+ /**
+ * 字段 total_scan_time 别名值 tahcm.total_scan_time 扫描日志文件时长
+ */
+ String TOTAL_SCAN_TIME_A = _alias_.getAlias() + "." + TOTAL_SCAN_TIME_O;
+ /**
+ * 字段 total_log_files_compacted 原始值 total_log_files_compacted 压缩文件个数
+ */
+ String TOTAL_LOG_FILES_COMPACTED_O = "total_log_files_compacted";
+ /**
+ * 字段 total_log_files_compacted 别名值 tahcm.total_log_files_compacted 压缩文件个数
+ */
+ String TOTAL_LOG_FILES_COMPACTED_A = _alias_.getAlias() + "." + TOTAL_LOG_FILES_COMPACTED_O;
+ /**
+ * 字段 total_log_files_size 原始值 total_log_files_size 压缩文件大小
+ */
+ String TOTAL_LOG_FILES_SIZE_O = "total_log_files_size";
+ /**
+ * 字段 total_log_files_size 别名值 tahcm.total_log_files_size 压缩文件大小
+ */
+ String TOTAL_LOG_FILES_SIZE_A = _alias_.getAlias() + "." + TOTAL_LOG_FILES_SIZE_O;
+ /**
+ * 字段 total_records_deleted 原始值 total_records_deleted 删除记录数
+ */
+ String TOTAL_RECORDS_DELETED_O = "total_records_deleted";
+ /**
+ * 字段 total_records_deleted 别名值 tahcm.total_records_deleted 删除记录数
+ */
+ String TOTAL_RECORDS_DELETED_A = _alias_.getAlias() + "." + TOTAL_RECORDS_DELETED_O;
+ /**
+ * 字段 total_records_updated 原始值 total_records_updated 更新记录数
+ */
+ String TOTAL_RECORDS_UPDATED_O = "total_records_updated";
+ /**
+ * 字段 total_records_updated 别名值 tahcm.total_records_updated 更新记录数
+ */
+ String TOTAL_RECORDS_UPDATED_A = _alias_.getAlias() + "." + TOTAL_RECORDS_UPDATED_O;
+ /**
+ * 字段 total_records_compacted 原始值 total_records_compacted 压缩记录数
+ */
+ String TOTAL_RECORDS_COMPACTED_O = "total_records_compacted";
+ /**
+ * 字段 total_records_compacted 别名值 tahcm.total_records_compacted 压缩记录数
+ */
+ String TOTAL_RECORDS_COMPACTED_A = _alias_.getAlias() + "." + TOTAL_RECORDS_COMPACTED_O;
+ /**
+ * 字段 update_time 原始值 update_time 记录更新时间
+ */
+ String UPDATE_TIME_O = "update_time";
+ /**
+ * 字段 update_time 别名值 tahcm.update_time 记录更新时间
+ */
+ String UPDATE_TIME_A = _alias_.getAlias() + "." + UPDATE_TIME_O;
+ }
+
+ /**
+ * tb_app_hudi_job_config
+ */
+ interface TbAppHudiJobConfig {
+ /**
+ * 表原名
+ */
+ String _origin_ = _name_ + ".tb_app_hudi_job_config";
+ /**
+ * SqlBuilder 别名对象 {@link Alias}
+ */
+ Alias _alias_ = Alias.of(_name_ + ".tb_app_hudi_job_config", "tahjc");
+ /**
+ * 字段 id 原始值 id 唯一标识
+ */
+ String ID_O = "id";
+ /**
+ * 字段 id 别名值 tahjc.id 唯一标识
+ */
+ String ID_A = _alias_.getAlias() + "." + ID_O;
+ /**
+ * 字段 source_tasks 原始值 source_tasks Pulsar 源端并行度
+ */
+ String SOURCE_TASKS_O = "source_tasks";
+ /**
+ * 字段 source_tasks 别名值 tahjc.source_tasks Pulsar 源端并行度
+ */
+ String SOURCE_TASKS_A = _alias_.getAlias() + "." + SOURCE_TASKS_O;
+ /**
+ * 字段 write_tasks 原始值 write_tasks 写并行度
+ */
+ String WRITE_TASKS_O = "write_tasks";
+ /**
+ * 字段 write_tasks 别名值 tahjc.write_tasks 写并行度
+ */
+ String WRITE_TASKS_A = _alias_.getAlias() + "." + WRITE_TASKS_O;
+ /**
+ * 字段 write_operation 原始值 write_operation 写操作类型(默认为 upsert)
+ */
+ String WRITE_OPERATION_O = "write_operation";
+ /**
+ * 字段 write_operation 别名值 tahjc.write_operation 写操作类型(默认为 upsert)
+ */
+ String WRITE_OPERATION_A = _alias_.getAlias() + "." + WRITE_OPERATION_O;
+ /**
+ * 字段 write_task_max_memory 原始值 write_task_max_memory 写任务最大缓存
+ */
+ String WRITE_TASK_MAX_MEMORY_O = "write_task_max_memory";
+ /**
+ * 字段 write_task_max_memory 别名值 tahjc.write_task_max_memory 写任务最大缓存
+ */
+ String WRITE_TASK_MAX_MEMORY_A = _alias_.getAlias() + "." + WRITE_TASK_MAX_MEMORY_O;
+ /**
+ * 字段 write_batch_size 原始值 write_batch_size 写任务单次操作大小
+ */
+ String WRITE_BATCH_SIZE_O = "write_batch_size";
+ /**
+ * 字段 write_batch_size 别名值 tahjc.write_batch_size 写任务单次操作大小
+ */
+ String WRITE_BATCH_SIZE_A = _alias_.getAlias() + "." + WRITE_BATCH_SIZE_O;
+ /**
+ * 字段 write_rate_limit 原始值 write_rate_limit 写任务速度限制(默认为10000TPS)
+ */
+ String WRITE_RATE_LIMIT_O = "write_rate_limit";
+ /**
+ * 字段 write_rate_limit 别名值 tahjc.write_rate_limit 写任务速度限制(默认为10000TPS)
+ */
+ String WRITE_RATE_LIMIT_A = _alias_.getAlias() + "." + WRITE_RATE_LIMIT_O;
+ /**
+ * 字段 compaction_strategy 原始值 compaction_strategy 压缩策略
+ */
+ String COMPACTION_STRATEGY_O = "compaction_strategy";
+ /**
+ * 字段 compaction_strategy 别名值 tahjc.compaction_strategy 压缩策略
+ */
+ String COMPACTION_STRATEGY_A = _alias_.getAlias() + "." + COMPACTION_STRATEGY_O;
+ /**
+ * 字段 compaction_tasks 原始值 compaction_tasks 压缩任务并行度
+ */
+ String COMPACTION_TASKS_O = "compaction_tasks";
+ /**
+ * 字段 compaction_tasks 别名值 tahjc.compaction_tasks 压缩任务并行度
+ */
+ String COMPACTION_TASKS_A = _alias_.getAlias() + "." + COMPACTION_TASKS_O;
+ /**
+ * 字段 compaction_delta_commits 原始值 compaction_delta_commits 压缩最小间隔 commit 数量
+ */
+ String COMPACTION_DELTA_COMMITS_O = "compaction_delta_commits";
+ /**
+ * 字段 compaction_delta_commits 别名值 tahjc.compaction_delta_commits 压缩最小间隔 commit 数量
+ */
+ String COMPACTION_DELTA_COMMITS_A = _alias_.getAlias() + "." + COMPACTION_DELTA_COMMITS_O;
+ /**
+ * 字段 compaction_delta_seconds 原始值 compaction_delta_seconds 压缩最小间隔时间(秒)
+ */
+ String COMPACTION_DELTA_SECONDS_O = "compaction_delta_seconds";
+ /**
+ * 字段 compaction_delta_seconds 别名值 tahjc.compaction_delta_seconds 压缩最小间隔时间(秒)
+ */
+ String COMPACTION_DELTA_SECONDS_A = _alias_.getAlias() + "." + COMPACTION_DELTA_SECONDS_O;
+ /**
+ * 字段 compaction_async_enabled 原始值 compaction_async_enabled 同步压缩是否开启(默认关闭,目前该参数无效)
+ */
+ String COMPACTION_ASYNC_ENABLED_O = "compaction_async_enabled";
+ /**
+ * 字段 compaction_async_enabled 别名值 tahjc.compaction_async_enabled 同步压缩是否开启(默认关闭,目前该参数无效)
+ */
+ String COMPACTION_ASYNC_ENABLED_A = _alias_.getAlias() + "." + COMPACTION_ASYNC_ENABLED_O;
+ /**
+ * 字段 compaction_max_memory 原始值 compaction_max_memory 压缩任务最大使用缓存大小
+ */
+ String COMPACTION_MAX_MEMORY_O = "compaction_max_memory";
+ /**
+ * 字段 compaction_max_memory 别名值 tahjc.compaction_max_memory 压缩任务最大使用缓存大小
+ */
+ String COMPACTION_MAX_MEMORY_A = _alias_.getAlias() + "." + COMPACTION_MAX_MEMORY_O;
+ /**
+ * 字段 keep_file_version 原始值 keep_file_version 保留数据文件版本
+ */
+ String KEEP_FILE_VERSION_O = "keep_file_version";
+ /**
+ * 字段 keep_file_version 别名值 tahjc.keep_file_version 保留数据文件版本
+ */
+ String KEEP_FILE_VERSION_A = _alias_.getAlias() + "." + KEEP_FILE_VERSION_O;
+ /**
+ * 字段 keep_commit_version 原始值 keep_commit_version 保留时间线版本
+ */
+ String KEEP_COMMIT_VERSION_O = "keep_commit_version";
+ /**
+ * 字段 keep_commit_version 别名值 tahjc.keep_commit_version 保留时间线版本
+ */
+ String KEEP_COMMIT_VERSION_A = _alias_.getAlias() + "." + KEEP_COMMIT_VERSION_O;
+ /**
+ * 字段 hive_sync_enable 原始值 hive_sync_enable hive 源数据同步启动(目前该参数不使用)
+ */
+ String HIVE_SYNC_ENABLE_O = "hive_sync_enable";
+ /**
+ * 字段 hive_sync_enable 别名值 tahjc.hive_sync_enable hive 源数据同步启动(目前该参数不使用)
+ */
+ String HIVE_SYNC_ENABLE_A = _alias_.getAlias() + "." + HIVE_SYNC_ENABLE_O;
+ /**
+ * 字段 hive_conn_id 原始值 hive_conn_id hive 连接信息标识(目前该参数不使用)
+ */
+ String HIVE_CONN_ID_O = "hive_conn_id";
+ /**
+ * 字段 hive_conn_id 别名值 tahjc.hive_conn_id hive 连接信息标识(目前该参数不使用)
+ */
+ String HIVE_CONN_ID_A = _alias_.getAlias() + "." + HIVE_CONN_ID_O;
+ /**
+ * 字段 configs 原始值 configs 自定义配置
+ */
+ String CONFIGS_O = "configs";
+ /**
+ * 字段 configs 别名值 tahjc.configs 自定义配置
+ */
+ String CONFIGS_A = _alias_.getAlias() + "." + CONFIGS_O;
+ /**
+ * 字段 status 原始值 status 逻辑删除标识
+ */
+ String STATUS_O = "status";
+ /**
+ * 字段 status 别名值 tahjc.status 逻辑删除标识
+ */
+ String STATUS_A = _alias_.getAlias() + "." + STATUS_O;
+ }
+
+ /**
+ * tb_app_hudi_sync_state
+ */
+ interface TbAppHudiSyncState {
+ /**
+ * 表原名
+ */
+ String _origin_ = _name_ + ".tb_app_hudi_sync_state";
+ /**
+ * SqlBuilder 别名对象 {@link Alias}
+ */
+ Alias _alias_ = Alias.of(_name_ + ".tb_app_hudi_sync_state", "tahss");
+ /**
+ * 字段 id 原始值 id 唯一标识
+ */
+ String ID_O = "id";
+ /**
+ * 字段 id 别名值 tahss.id 唯一标识
+ */
+ String ID_A = _alias_.getAlias() + "." + ID_O;
+ /**
+ * 字段 message_id 原始值 message_id pulsar 消息位移
+ */
+ String MESSAGE_ID_O = "message_id";
+ /**
+ * 字段 message_id 别名值 tahss.message_id pulsar 消息位移
+ */
+ String MESSAGE_ID_A = _alias_.getAlias() + "." + MESSAGE_ID_O;
+ /**
+ * 字段 source_database 原始值 source_database 源数据库
+ */
+ String SOURCE_DATABASE_O = "source_database";
+ /**
+ * 字段 source_database 别名值 tahss.source_database 源数据库
+ */
+ String SOURCE_DATABASE_A = _alias_.getAlias() + "." + SOURCE_DATABASE_O;
+ /**
+ * 字段 source_schema 原始值 source_schema 源库
+ */
+ String SOURCE_SCHEMA_O = "source_schema";
+ /**
+ * 字段 source_schema 别名值 tahss.source_schema 源库
+ */
+ String SOURCE_SCHEMA_A = _alias_.getAlias() + "." + SOURCE_SCHEMA_O;
+ /**
+ * 字段 source_table 原始值 source_table 源表
+ */
+ String SOURCE_TABLE_O = "source_table";
+ /**
+ * 字段 source_table 别名值 tahss.source_table 源表
+ */
+ String SOURCE_TABLE_A = _alias_.getAlias() + "." + SOURCE_TABLE_O;
+ /**
+ * 字段 source_start_time 原始值 source_start_time 同步启动时间
+ */
+ String SOURCE_START_TIME_O = "source_start_time";
+ /**
+ * 字段 source_start_time 别名值 tahss.source_start_time 同步启动时间
+ */
+ String SOURCE_START_TIME_A = _alias_.getAlias() + "." + SOURCE_START_TIME_O;
+ /**
+ * 字段 source_checkpoint_time 原始值 source_checkpoint_time 同步检查时间
+ */
+ String SOURCE_CHECKPOINT_TIME_O = "source_checkpoint_time";
+ /**
+ * 字段 source_checkpoint_time 别名值 tahss.source_checkpoint_time 同步检查时间
+ */
+ String SOURCE_CHECKPOINT_TIME_A = _alias_.getAlias() + "." + SOURCE_CHECKPOINT_TIME_O;
+ /**
+ * 字段 source_publish_time 原始值 source_publish_time 消息发布时间
+ */
+ String SOURCE_PUBLISH_TIME_O = "source_publish_time";
+ /**
+ * 字段 source_publish_time 别名值 tahss.source_publish_time 消息发布时间
+ */
+ String SOURCE_PUBLISH_TIME_A = _alias_.getAlias() + "." + SOURCE_PUBLISH_TIME_O;
+ /**
+ * 字段 source_op_time 原始值 source_op_time 消息业务时间
+ */
+ String SOURCE_OP_TIME_O = "source_op_time";
+ /**
+ * 字段 source_op_time 别名值 tahss.source_op_time 消息业务时间
+ */
+ String SOURCE_OP_TIME_A = _alias_.getAlias() + "." + SOURCE_OP_TIME_O;
+ /**
+ * 字段 source_application_id 原始值 source_application_id 同步程序 application id
+ */
+ String SOURCE_APPLICATION_ID_O = "source_application_id";
+ /**
+ * 字段 source_application_id 别名值 tahss.source_application_id 同步程序 application id
+ */
+ String SOURCE_APPLICATION_ID_A = _alias_.getAlias() + "." + SOURCE_APPLICATION_ID_O;
+ /**
+ * 字段 source_cluster 原始值 source_cluster 运行主机
+ */
+ String SOURCE_CLUSTER_O = "source_cluster";
+ /**
+ * 字段 source_cluster 别名值 tahss.source_cluster 运行主机
+ */
+ String SOURCE_CLUSTER_A = _alias_.getAlias() + "." + SOURCE_CLUSTER_O;
+ /**
+ * 字段 compaction_start_time 原始值 compaction_start_time 压缩启动时间
+ */
+ String COMPACTION_START_TIME_O = "compaction_start_time";
+ /**
+ * 字段 compaction_start_time 别名值 tahss.compaction_start_time 压缩启动时间
+ */
+ String COMPACTION_START_TIME_A = _alias_.getAlias() + "." + COMPACTION_START_TIME_O;
+ /**
+ * 字段 compaction_finish_time 原始值 compaction_finish_time 压缩完成时间
+ */
+ String COMPACTION_FINISH_TIME_O = "compaction_finish_time";
+ /**
+ * 字段 compaction_finish_time 别名值 tahss.compaction_finish_time 压缩完成时间
+ */
+ String COMPACTION_FINISH_TIME_A = _alias_.getAlias() + "." + COMPACTION_FINISH_TIME_O;
+ /**
+ * 字段 compaction_message 原始值 compaction_message 压缩异常信息
+ */
+ String COMPACTION_MESSAGE_O = "compaction_message";
+ /**
+ * 字段 compaction_message 别名值 tahss.compaction_message 压缩异常信息
+ */
+ String COMPACTION_MESSAGE_A = _alias_.getAlias() + "." + COMPACTION_MESSAGE_O;
+ /**
+ * 字段 compaction_application_id 原始值 compaction_application_id 压缩任务 yarn id
+ */
+ String COMPACTION_APPLICATION_ID_O = "compaction_application_id";
+ /**
+ * 字段 compaction_application_id 别名值 tahss.compaction_application_id 压缩任务 yarn id
+ */
+ String COMPACTION_APPLICATION_ID_A = _alias_.getAlias() + "." + COMPACTION_APPLICATION_ID_O;
+ /**
+ * 字段 compaction_status 原始值 compaction_status 压缩状态
+ */
+ String COMPACTION_STATUS_O = "compaction_status";
+ /**
+ * 字段 compaction_status 别名值 tahss.compaction_status 压缩状态
+ */
+ String COMPACTION_STATUS_A = _alias_.getAlias() + "." + COMPACTION_STATUS_O;
+ /**
+ * 字段 compaction_status_time 原始值 compaction_status_time 压缩事件时间
+ */
+ String COMPACTION_STATUS_TIME_O = "compaction_status_time";
+ /**
+ * 字段 compaction_status_time 别名值 tahss.compaction_status_time 压缩事件时间
+ */
+ String COMPACTION_STATUS_TIME_A = _alias_.getAlias() + "." + COMPACTION_STATUS_TIME_O;
+ /**
+ * 字段 compaction_cluster 原始值 compaction_cluster 运行主机
+ */
+ String COMPACTION_CLUSTER_O = "compaction_cluster";
+ /**
+ * 字段 compaction_cluster 别名值 tahss.compaction_cluster 运行主机
+ */
+ String COMPACTION_CLUSTER_A = _alias_.getAlias() + "." + COMPACTION_CLUSTER_O;
+ /**
+ * 字段 compaction_latest_op_ts 原始值 compaction_latest_op_ts 压缩提供的 latest_op_ts
+ */
+ String COMPACTION_LATEST_OP_TS_O = "compaction_latest_op_ts";
+ /**
+ * 字段 compaction_latest_op_ts 别名值 tahss.compaction_latest_op_ts 压缩提供的 latest_op_ts
+ */
+ String COMPACTION_LATEST_OP_TS_A = _alias_.getAlias() + "." + COMPACTION_LATEST_OP_TS_O;
+ /**
+ * 字段 update_batch_marker 原始值 update_batch_marker 更新批次号
+ */
+ String UPDATE_BATCH_MARKER_O = "update_batch_marker";
+ /**
+ * 字段 update_batch_marker 别名值 tahss.update_batch_marker 更新批次号
+ */
+ String UPDATE_BATCH_MARKER_A = _alias_.getAlias() + "." + UPDATE_BATCH_MARKER_O;
+ /**
+ * 字段 pulsar_back_log 原始值 pulsar_back_log pulsar 积压
+ */
+ String PULSAR_BACK_LOG_O = "pulsar_back_log";
+ /**
+ * 字段 pulsar_back_log 别名值 tahss.pulsar_back_log pulsar 积压
+ */
+ String PULSAR_BACK_LOG_A = _alias_.getAlias() + "." + PULSAR_BACK_LOG_O;
+ /**
+ * 字段 update_time 原始值 update_time 更新时间
+ */
+ String UPDATE_TIME_O = "update_time";
+ /**
+ * 字段 update_time 别名值 tahss.update_time 更新时间
+ */
+ String UPDATE_TIME_A = _alias_.getAlias() + "." + UPDATE_TIME_O;
+ /**
+ * 字段 check_source_total 原始值 check_source_total
+ */
+ String CHECK_SOURCE_TOTAL_O = "check_source_total";
+ /**
+ * 字段 check_source_total 别名值 tahss.check_source_total
+ */
+ String CHECK_SOURCE_TOTAL_A = _alias_.getAlias() + "." + CHECK_SOURCE_TOTAL_O;
+ /**
+ * 字段 check_source_total_time 原始值 check_source_total_time
+ */
+ String CHECK_SOURCE_TOTAL_TIME_O = "check_source_total_time";
+ /**
+ * 字段 check_source_total_time 别名值 tahss.check_source_total_time
+ */
+ String CHECK_SOURCE_TOTAL_TIME_A = _alias_.getAlias() + "." + CHECK_SOURCE_TOTAL_TIME_O;
+ /**
+ * 字段 check_target_total 原始值 check_target_total
+ */
+ String CHECK_TARGET_TOTAL_O = "check_target_total";
+ /**
+ * 字段 check_target_total 别名值 tahss.check_target_total
+ */
+ String CHECK_TARGET_TOTAL_A = _alias_.getAlias() + "." + CHECK_TARGET_TOTAL_O;
+ /**
+ * 字段 check_target_latest_op_ts 原始值 check_target_latest_op_ts
+ */
+ String CHECK_TARGET_LATEST_OP_TS_O = "check_target_latest_op_ts";
+ /**
+ * 字段 check_target_latest_op_ts 别名值 tahss.check_target_latest_op_ts
+ */
+ String CHECK_TARGET_LATEST_OP_TS_A = _alias_.getAlias() + "." + CHECK_TARGET_LATEST_OP_TS_O;
+ /**
+ * 字段 check_target_total_time 原始值 check_target_total_time
+ */
+ String CHECK_TARGET_TOTAL_TIME_O = "check_target_total_time";
+ /**
+ * 字段 check_target_total_time 别名值 tahss.check_target_total_time
+ */
+ String CHECK_TARGET_TOTAL_TIME_A = _alias_.getAlias() + "." + CHECK_TARGET_TOTAL_TIME_O;
+ }
+
+ /**
+ * tb_app_yarn_job_config_sync Yarn 任务配置
+ */
+ interface TbAppYarnJobConfigSync {
+ /**
+ * 表原名
+ */
+ String _origin_ = _name_ + ".tb_app_yarn_job_config";
+ /**
+ * SqlBuilder 别名对象 {@link Alias}
+ */
+ Alias _alias_ = Alias.of(_name_ + ".tb_app_yarn_job_config", "tayjc_sync");
+ /**
+ * 字段 id 原始值 id 唯一标识
+ */
+ String ID_O = "id";
+ /**
+ * 字段 id 别名值 tayjc_sync.id 唯一标识
+ */
+ String ID_A = _alias_.getAlias() + "." + ID_O;
+ /**
+ * 字段 job_manager_memory 原始值 job_manager_memory Job Manager 内存(MB)
+ */
+ String JOB_MANAGER_MEMORY_O = "job_manager_memory";
+ /**
+ * 字段 job_manager_memory 别名值 tayjc_sync.job_manager_memory Job Manager 内存(MB)
+ */
+ String JOB_MANAGER_MEMORY_A = _alias_.getAlias() + "." + JOB_MANAGER_MEMORY_O;
+ /**
+ * 字段 task_manager_memory 原始值 task_manager_memory Task Manager 内存(MB)
+ */
+ String TASK_MANAGER_MEMORY_O = "task_manager_memory";
+ /**
+ * 字段 task_manager_memory 别名值 tayjc_sync.task_manager_memory Task Manager 内存(MB)
+ */
+ String TASK_MANAGER_MEMORY_A = _alias_.getAlias() + "." + TASK_MANAGER_MEMORY_O;
+ /**
+ * 字段 status 原始值 status 逻辑删除标识
+ */
+ String STATUS_O = "status";
+ /**
+ * 字段 status 别名值 tayjc_sync.status 逻辑删除标识
+ */
+ String STATUS_A = _alias_.getAlias() + "." + STATUS_O;
+ }
+
+ /**
+ * tb_app_yarn_job_config_compaction Yarn 任务配置
+ */
+ interface TbAppYarnJobConfigCompaction {
+ /**
+ * 表原名
+ */
+ String _origin_ = _name_ + ".tb_app_yarn_job_config";
+ /**
+ * SqlBuilder 别名对象 {@link Alias}
+ */
+ Alias _alias_ = Alias.of(_name_ + ".tb_app_yarn_job_config", "tayjc_compaction");
+ /**
+ * 字段 id 原始值 id 唯一标识
+ */
+ String ID_O = "id";
+ /**
+ * 字段 id 别名值 tayjc_compaction.id 唯一标识
+ */
+ String ID_A = _alias_.getAlias() + "." + ID_O;
+ /**
+ * 字段 job_manager_memory 原始值 job_manager_memory Job Manager 内存(MB)
+ */
+ String JOB_MANAGER_MEMORY_O = "job_manager_memory";
+ /**
+ * 字段 job_manager_memory 别名值 tayjc_compaction.job_manager_memory Job Manager 内存(MB)
+ */
+ String JOB_MANAGER_MEMORY_A = _alias_.getAlias() + "." + JOB_MANAGER_MEMORY_O;
+ /**
+ * 字段 task_manager_memory 原始值 task_manager_memory Task Manager 内存(MB)
+ */
+ String TASK_MANAGER_MEMORY_O = "task_manager_memory";
+ /**
+ * 字段 task_manager_memory 别名值 tayjc_compaction.task_manager_memory Task Manager 内存(MB)
+ */
+ String TASK_MANAGER_MEMORY_A = _alias_.getAlias() + "." + TASK_MANAGER_MEMORY_O;
+ /**
+ * 字段 status 原始值 status 逻辑删除标识
+ */
+ String STATUS_O = "status";
+ /**
+ * 字段 status 别名值 tayjc_compaction.status 逻辑删除标识
+ */
+ String STATUS_A = _alias_.getAlias() + "." + STATUS_O;
+ }
+
+ /**
+ * tb_app_yarn_job_config Yarn 任务配置
+ */
+ interface TbAppYarnJobConfig {
+ /**
+ * 表原名
+ */
+ String _origin_ = _name_ + ".tb_app_yarn_job_config";
+ /**
+ * SqlBuilder 别名对象 {@link Alias}
+ */
+ Alias _alias_ = Alias.of(_name_ + ".tb_app_yarn_job_config", "tayjc");
+ /**
+ * 字段 id 原始值 id 唯一标识
+ */
+ String ID_O = "id";
+ /**
+ * 字段 id 别名值 tayjc.id 唯一标识
+ */
+ String ID_A = _alias_.getAlias() + "." + ID_O;
+ /**
+ * 字段 job_manager_memory 原始值 job_manager_memory Job Manager 内存(MB)
+ */
+ String JOB_MANAGER_MEMORY_O = "job_manager_memory";
+ /**
+ * 字段 job_manager_memory 别名值 tayjc.job_manager_memory Job Manager 内存(MB)
+ */
+ String JOB_MANAGER_MEMORY_A = _alias_.getAlias() + "." + JOB_MANAGER_MEMORY_O;
+ /**
+ * 字段 task_manager_memory 原始值 task_manager_memory Task Manager 内存(MB)
+ */
+ String TASK_MANAGER_MEMORY_O = "task_manager_memory";
+ /**
+ * 字段 task_manager_memory 别名值 tayjc.task_manager_memory Task Manager 内存(MB)
+ */
+ String TASK_MANAGER_MEMORY_A = _alias_.getAlias() + "." + TASK_MANAGER_MEMORY_O;
+ /**
+ * 字段 status 原始值 status 逻辑删除标识
+ */
+ String STATUS_O = "status";
+ /**
+ * 字段 status 别名值 tayjc.status 逻辑删除标识
+ */
+ String STATUS_A = _alias_.getAlias() + "." + STATUS_O;
+ }
+ }
+
+ /**
+ * iap-datahub
+ */
+ interface IapDatahub {
+ /**
+ * Schema 名称
+ */
+ String _name_ = "`iap-datahub`";
+
+ /**
+ * data_source 数据源定义,定义数据源名称、类型、连接信息、扩展属性等
+ */
+ interface DataSource {
+ /**
+ * 表原名
+ */
+ String _origin_ = _name_ + ".data_source";
+ /**
+ * SqlBuilder 别名对象 {@link Alias}
+ */
+ Alias _alias_ = Alias.of(_name_ + ".data_source", "ds");
+ /**
+ * 字段 ds_id 原始值 ds_id 数据源标识,主键自增
+ */
+ String DS_ID_O = "ds_id";
+ /**
+ * 字段 ds_id 别名值 ds.ds_id 数据源标识,主键自增
+ */
+ String DS_ID_A = _alias_.getAlias() + "." + DS_ID_O;
+ /**
+ * 字段 tenant_id 原始值 tenant_id 租户标识,外键关联租户表
+ */
+ String TENANT_ID_O = "tenant_id";
+ /**
+ * 字段 tenant_id 别名值 ds.tenant_id 租户标识,外键关联租户表
+ */
+ String TENANT_ID_A = _alias_.getAlias() + "." + TENANT_ID_O;
+ /**
+ * 字段 project_id 原始值 project_id 项目标识,外键关联项目表
+ */
+ String PROJECT_ID_O = "project_id";
+ /**
+ * 字段 project_id 别名值 ds.project_id 项目标识,外键关联项目表
+ */
+ String PROJECT_ID_A = _alias_.getAlias() + "." + PROJECT_ID_O;
+ /**
+ * 字段 group_id 原始值 group_id 分组标识,主键自增
+ */
+ String GROUP_ID_O = "group_id";
+ /**
+ * 字段 group_id 别名值 ds.group_id 分组标识,主键自增
+ */
+ String GROUP_ID_A = _alias_.getAlias() + "." + GROUP_ID_O;
+ /**
+ * 字段 scenario_id 原始值 scenario_id 场景标识,0默认 1UDAL实时同步 2oracle实时同步 3teledb实时同步 4telepg实时同步 5udal离线同步 6oracle离线同步 7teledb离线同步 8telepg离线同步 9ftp采集 10kafka采集 11pulsar采集 12api采集
+ */
+ String SCENARIO_ID_O = "scenario_id";
+ /**
+ * 字段 scenario_id 别名值 ds.scenario_id 场景标识,0默认 1UDAL实时同步 2oracle实时同步 3teledb实时同步 4telepg实时同步 5udal离线同步 6oracle离线同步 7teledb离线同步 8telepg离线同步 9ftp采集 10kafka采集 11pulsar采集 12api采集
+ */
+ String SCENARIO_ID_A = _alias_.getAlias() + "." + SCENARIO_ID_O;
+ /**
+ * 字段 ds_name 原始值 ds_name 数据源名称,项目内唯一
+ */
+ String DS_NAME_O = "ds_name";
+ /**
+ * 字段 ds_name 别名值 ds.ds_name 数据源名称,项目内唯一
+ */
+ String DS_NAME_A = _alias_.getAlias() + "." + DS_NAME_O;
+ /**
+ * 字段 ds_name_cn 原始值 ds_name_cn 数据源中文名称
+ */
+ String DS_NAME_CN_O = "ds_name_cn";
+ /**
+ * 字段 ds_name_cn 别名值 ds.ds_name_cn 数据源中文名称
+ */
+ String DS_NAME_CN_A = _alias_.getAlias() + "." + DS_NAME_CN_O;
+ /**
+ * 字段 ds_role 原始值 ds_role 数据源角色,类型为src、tgt
+ */
+ String DS_ROLE_O = "ds_role";
+ /**
+ * 字段 ds_role 别名值 ds.ds_role 数据源角色,类型为src、tgt
+ */
+ String DS_ROLE_A = _alias_.getAlias() + "." + DS_ROLE_O;
+ /**
+ * 字段 ds_type 原始值 ds_type 数据源类型,类型主要有mysql、oracle、pg、gp、udal、teledb、hdfs、hive、ftp,具体参考系统字典类型表ds_type
+ */
+ String DS_TYPE_O = "ds_type";
+ /**
+ * 字段 ds_type 别名值 ds.ds_type 数据源类型,类型主要有mysql、oracle、pg、gp、udal、teledb、hdfs、hive、ftp,具体参考系统字典类型表ds_type
+ */
+ String DS_TYPE_A = _alias_.getAlias() + "." + DS_TYPE_O;
+ /**
+ * 字段 schema_name 原始值 schema_name 数据库名,针对数据库类数据源,其他数据源可不填
+ */
+ String SCHEMA_NAME_O = "schema_name";
+ /**
+ * 字段 schema_name 别名值 ds.schema_name 数据库名,针对数据库类数据源,其他数据源可不填
+ */
+ String SCHEMA_NAME_A = _alias_.getAlias() + "." + SCHEMA_NAME_O;
+ /**
+ * 字段 ds_state 原始值 ds_state y正常状态,n冻结状态
+ */
+ String DS_STATE_O = "ds_state";
+ /**
+ * 字段 ds_state 别名值 ds.ds_state y正常状态,n冻结状态
+ */
+ String DS_STATE_A = _alias_.getAlias() + "." + DS_STATE_O;
+ /**
+ * 字段 connection 原始值 connection 数据源信息,标准JSON格式
+ */
+ String CONNECTION_O = "connection";
+ /**
+ * 字段 connection 别名值 ds.connection 数据源信息,标准JSON格式
+ */
+ String CONNECTION_A = _alias_.getAlias() + "." + CONNECTION_O;
+ /**
+ * 字段 ext_settings 原始值 ext_settings 数据源扩展设置,标准JSON格式
+ */
+ String EXT_SETTINGS_O = "ext_settings";
+ /**
+ * 字段 ext_settings 别名值 ds.ext_settings 数据源扩展设置,标准JSON格式
+ */
+ String EXT_SETTINGS_A = _alias_.getAlias() + "." + EXT_SETTINGS_O;
+ /**
+ * 字段 remark 原始值 remark 备注信息
+ */
+ String REMARK_O = "remark";
+ /**
+ * 字段 remark 别名值 ds.remark 备注信息
+ */
+ String REMARK_A = _alias_.getAlias() + "." + REMARK_O;
+ /**
+ * 字段 creator_id 原始值 creator_id 创建人标识,外键关联用户表
+ */
+ String CREATOR_ID_O = "creator_id";
+ /**
+ * 字段 creator_id 别名值 ds.creator_id 创建人标识,外键关联用户表
+ */
+ String CREATOR_ID_A = _alias_.getAlias() + "." + CREATOR_ID_O;
+ /**
+ * 字段 create_time 原始值 create_time 创建时间
+ */
+ String CREATE_TIME_O = "create_time";
+ /**
+ * 字段 create_time 别名值 ds.create_time 创建时间
+ */
+ String CREATE_TIME_A = _alias_.getAlias() + "." + CREATE_TIME_O;
+ /**
+ * 字段 modifier_id 原始值 modifier_id 修改人标识,外键关联用户表
+ */
+ String MODIFIER_ID_O = "modifier_id";
+ /**
+ * 字段 modifier_id 别名值 ds.modifier_id 修改人标识,外键关联用户表
+ */
+ String MODIFIER_ID_A = _alias_.getAlias() + "." + MODIFIER_ID_O;
+ /**
+ * 字段 modify_time 原始值 modify_time 修改时间
+ */
+ String MODIFY_TIME_O = "modify_time";
+ /**
+ * 字段 modify_time 别名值 ds.modify_time 修改时间
+ */
+ String MODIFY_TIME_A = _alias_.getAlias() + "." + MODIFY_TIME_O;
+ /**
+ * 字段 record_state 原始值 record_state 记录状态,y有效数据 n已删除数据
+ */
+ String RECORD_STATE_O = "record_state";
+ /**
+ * 字段 record_state 别名值 ds.record_state 记录状态,y有效数据 n已删除数据
+ */
+ String RECORD_STATE_A = _alias_.getAlias() + "." + RECORD_STATE_O;
+ }
+
+ /**
+ * data_source_table 数据表信息
+ */
+ interface DataSourceTable {
+ /**
+ * 表原名
+ */
+ String _origin_ = _name_ + ".data_source_table";
+ /**
+ * SqlBuilder 别名对象 {@link Alias}
+ */
+ Alias _alias_ = Alias.of(_name_ + ".data_source_table", "dst");
+ /**
+ * 字段 table_id 原始值 table_id 主键自增,数据表标识
+ */
+ String TABLE_ID_O = "table_id";
+ /**
+ * 字段 table_id 别名值 dst.table_id 主键自增,数据表标识
+ */
+ String TABLE_ID_A = _alias_.getAlias() + "." + TABLE_ID_O;
+ /**
+ * 字段 tenant_id 原始值 tenant_id 租户标识,外键关联租户表
+ */
+ String TENANT_ID_O = "tenant_id";
+ /**
+ * 字段 tenant_id 别名值 dst.tenant_id 租户标识,外键关联租户表
+ */
+ String TENANT_ID_A = _alias_.getAlias() + "." + TENANT_ID_O;
+ /**
+ * 字段 project_id 原始值 project_id 项目标识,外键关联项目表
+ */
+ String PROJECT_ID_O = "project_id";
+ /**
+ * 字段 project_id 别名值 dst.project_id 项目标识,外键关联项目表
+ */
+ String PROJECT_ID_A = _alias_.getAlias() + "." + PROJECT_ID_O;
+ /**
+ * 字段 ds_id 原始值 ds_id 数据源标识,外键关联数据源定义
+ */
+ String DS_ID_O = "ds_id";
+ /**
+ * 字段 ds_id 别名值 dst.ds_id 数据源标识,外键关联数据源定义
+ */
+ String DS_ID_A = _alias_.getAlias() + "." + DS_ID_O;
+ /**
+ * 字段 table_name 原始值 table_name 数据表名称
+ */
+ String TABLE_NAME_O = "table_name";
+ /**
+ * 字段 table_name 别名值 dst.table_name 数据表名称
+ */
+ String TABLE_NAME_A = _alias_.getAlias() + "." + TABLE_NAME_O;
+ /**
+ * 字段 table_type 原始值 table_type 数据源表类型,不同数据源,表类型不一样
+ */
+ String TABLE_TYPE_O = "table_type";
+ /**
+ * 字段 table_type 别名值 dst.table_type 数据源表类型,不同数据源,表类型不一样
+ */
+ String TABLE_TYPE_A = _alias_.getAlias() + "." + TABLE_TYPE_O;
+ /**
+ * 字段 primary_key 原始值 primary_key 主键字段,多字段按照逗号分隔
+ */
+ String PRIMARY_KEY_O = "primary_key";
+ /**
+ * 字段 primary_key 别名值 dst.primary_key 主键字段,多字段按照逗号分隔
+ */
+ String PRIMARY_KEY_A = _alias_.getAlias() + "." + PRIMARY_KEY_O;
+ /**
+ * 字段 table_sql 原始值 table_sql 建表语句
+ */
+ String TABLE_SQL_O = "table_sql";
+ /**
+ * 字段 table_sql 别名值 dst.table_sql 建表语句
+ */
+ String TABLE_SQL_A = _alias_.getAlias() + "." + TABLE_SQL_O;
+ /**
+ * 字段 table_comment 原始值 table_comment 表备注信息
+ */
+ String TABLE_COMMENT_O = "table_comment";
+ /**
+ * 字段 table_comment 别名值 dst.table_comment 表备注信息
+ */
+ String TABLE_COMMENT_A = _alias_.getAlias() + "." + TABLE_COMMENT_O;
+ /**
+ * 字段 ext_settings 原始值 ext_settings 表扩展属性
+ */
+ String EXT_SETTINGS_O = "ext_settings";
+ /**
+ * 字段 ext_settings 别名值 dst.ext_settings 表扩展属性
+ */
+ String EXT_SETTINGS_A = _alias_.getAlias() + "." + EXT_SETTINGS_O;
+ /**
+ * 字段 remark 原始值 remark 备注信息
+ */
+ String REMARK_O = "remark";
+ /**
+ * 字段 remark 别名值 dst.remark 备注信息
+ */
+ String REMARK_A = _alias_.getAlias() + "." + REMARK_O;
+ /**
+ * 字段 creator_id 原始值 creator_id 创建人标识,外键关联用户表
+ */
+ String CREATOR_ID_O = "creator_id";
+ /**
+ * 字段 creator_id 别名值 dst.creator_id 创建人标识,外键关联用户表
+ */
+ String CREATOR_ID_A = _alias_.getAlias() + "." + CREATOR_ID_O;
+ /**
+ * 字段 create_time 原始值 create_time 创建时间
+ */
+ String CREATE_TIME_O = "create_time";
+ /**
+ * 字段 create_time 别名值 dst.create_time 创建时间
+ */
+ String CREATE_TIME_A = _alias_.getAlias() + "." + CREATE_TIME_O;
+ /**
+ * 字段 modifier_id 原始值 modifier_id 修改人标识,外键关联用户表
+ */
+ String MODIFIER_ID_O = "modifier_id";
+ /**
+ * 字段 modifier_id 别名值 dst.modifier_id 修改人标识,外键关联用户表
+ */
+ String MODIFIER_ID_A = _alias_.getAlias() + "." + MODIFIER_ID_O;
+ /**
+ * 字段 modify_time 原始值 modify_time
+ */
+ String MODIFY_TIME_O = "modify_time";
+ /**
+ * 字段 modify_time 别名值 dst.modify_time
+ */
+ String MODIFY_TIME_A = _alias_.getAlias() + "." + MODIFY_TIME_O;
+ /**
+ * 字段 record_state 原始值 record_state 记录状态,y有效数据 n已删除数据
+ */
+ String RECORD_STATE_O = "record_state";
+ /**
+ * 字段 record_state 别名值 dst.record_state 记录状态,y有效数据 n已删除数据
+ */
+ String RECORD_STATE_A = _alias_.getAlias() + "." + RECORD_STATE_O;
+ }
+
+ /**
+ * data_source_table_field 数据表字段信息,包括字段名称、类型、长度、精度、备注等
+ */
+ interface DataSourceTableField {
+ /**
+ * 表原名
+ */
+ String _origin_ = _name_ + ".data_source_table_field";
+ /**
+ * SqlBuilder 别名对象 {@link Alias}
+ */
+ Alias _alias_ = Alias.of(_name_ + ".data_source_table_field", "dstf");
+ /**
+ * 字段 field_id 原始值 field_id 主键自增,字段标识
+ */
+ String FIELD_ID_O = "field_id";
+ /**
+ * 字段 field_id 别名值 dstf.field_id 主键自增,字段标识
+ */
+ String FIELD_ID_A = _alias_.getAlias() + "." + FIELD_ID_O;
+ /**
+ * 字段 table_id 原始值 table_id 数据源表标识,外键关联数据源表
+ */
+ String TABLE_ID_O = "table_id";
+ /**
+ * 字段 table_id 别名值 dstf.table_id 数据源表标识,外键关联数据源表
+ */
+ String TABLE_ID_A = _alias_.getAlias() + "." + TABLE_ID_O;
+ /**
+ * 字段 tenant_id 原始值 tenant_id 租户标识,外键关联租户表
+ */
+ String TENANT_ID_O = "tenant_id";
+ /**
+ * 字段 tenant_id 别名值 dstf.tenant_id 租户标识,外键关联租户表
+ */
+ String TENANT_ID_A = _alias_.getAlias() + "." + TENANT_ID_O;
+ /**
+ * 字段 project_id 原始值 project_id 项目标识,外键关联项目表
+ */
+ String PROJECT_ID_O = "project_id";
+ /**
+ * 字段 project_id 别名值 dstf.project_id 项目标识,外键关联项目表
+ */
+ String PROJECT_ID_A = _alias_.getAlias() + "." + PROJECT_ID_O;
+ /**
+ * 字段 field_name 原始值 field_name 字段名称,表内唯一
+ */
+ String FIELD_NAME_O = "field_name";
+ /**
+ * 字段 field_name 别名值 dstf.field_name 字段名称,表内唯一
+ */
+ String FIELD_NAME_A = _alias_.getAlias() + "." + FIELD_NAME_O;
+ /**
+ * 字段 field_seq 原始值 field_seq 字段序号
+ */
+ String FIELD_SEQ_O = "field_seq";
+ /**
+ * 字段 field_seq 别名值 dstf.field_seq 字段序号
+ */
+ String FIELD_SEQ_A = _alias_.getAlias() + "." + FIELD_SEQ_O;
+ /**
+ * 字段 field_type 原始值 field_type 字段类型
+ */
+ String FIELD_TYPE_O = "field_type";
+ /**
+ * 字段 field_type 别名值 dstf.field_type 字段类型
+ */
+ String FIELD_TYPE_A = _alias_.getAlias() + "." + FIELD_TYPE_O;
+ /**
+ * 字段 field_comment 原始值 field_comment 字段备注
+ */
+ String FIELD_COMMENT_O = "field_comment";
+ /**
+ * 字段 field_comment 别名值 dstf.field_comment 字段备注
+ */
+ String FIELD_COMMENT_A = _alias_.getAlias() + "." + FIELD_COMMENT_O;
+ /**
+ * 字段 primary_key 原始值 primary_key 是否主键,y是主键,n不是主键
+ */
+ String PRIMARY_KEY_O = "primary_key";
+ /**
+ * 字段 primary_key 别名值 dstf.primary_key 是否主键,y是主键,n不是主键
+ */
+ String PRIMARY_KEY_A = _alias_.getAlias() + "." + PRIMARY_KEY_O;
+ /**
+ * 字段 partition_key 原始值 partition_key 是否分区键,y是分区键,n不是分区键
+ */
+ String PARTITION_KEY_O = "partition_key";
+ /**
+ * 字段 partition_key 别名值 dstf.partition_key 是否分区键,y是分区键,n不是分区键
+ */
+ String PARTITION_KEY_A = _alias_.getAlias() + "." + PARTITION_KEY_O;
+ /**
+ * 字段 length 原始值 length 字段长度
+ */
+ String LENGTH_O = "length";
+ /**
+ * 字段 length 别名值 dstf.length 字段长度
+ */
+ String LENGTH_A = _alias_.getAlias() + "." + LENGTH_O;
+ /**
+ * 字段 scale 原始值 scale 字段精度
+ */
+ String SCALE_O = "scale";
+ /**
+ * 字段 scale 别名值 dstf.scale 字段精度
+ */
+ String SCALE_A = _alias_.getAlias() + "." + SCALE_O;
+ /**
+ * 字段 remark 原始值 remark 备注信息
+ */
+ String REMARK_O = "remark";
+ /**
+ * 字段 remark 别名值 dstf.remark 备注信息
+ */
+ String REMARK_A = _alias_.getAlias() + "." + REMARK_O;
+ /**
+ * 字段 creator_id 原始值 creator_id 创建人标识,外键关联用户表
+ */
+ String CREATOR_ID_O = "creator_id";
+ /**
+ * 字段 creator_id 别名值 dstf.creator_id 创建人标识,外键关联用户表
+ */
+ String CREATOR_ID_A = _alias_.getAlias() + "." + CREATOR_ID_O;
+ /**
+ * 字段 create_time 原始值 create_time 创建时间
+ */
+ String CREATE_TIME_O = "create_time";
+ /**
+ * 字段 create_time 别名值 dstf.create_time 创建时间
+ */
+ String CREATE_TIME_A = _alias_.getAlias() + "." + CREATE_TIME_O;
+ /**
+ * 字段 modifier_id 原始值 modifier_id 修改人标识,外键关联用户表
+ */
+ String MODIFIER_ID_O = "modifier_id";
+ /**
+ * 字段 modifier_id 别名值 dstf.modifier_id 修改人标识,外键关联用户表
+ */
+ String MODIFIER_ID_A = _alias_.getAlias() + "." + MODIFIER_ID_O;
+ /**
+ * 字段 modify_time 原始值 modify_time 修改时间
+ */
+ String MODIFY_TIME_O = "modify_time";
+ /**
+ * 字段 modify_time 别名值 dstf.modify_time 修改时间
+ */
+ String MODIFY_TIME_A = _alias_.getAlias() + "." + MODIFY_TIME_O;
+ /**
+ * 字段 record_state 原始值 record_state 记录状态,y有效数据,n已删除数据
+ */
+ String RECORD_STATE_O = "record_state";
+ /**
+ * 字段 record_state 别名值 dstf.record_state 记录状态,y有效数据,n已删除数据
+ */
+ String RECORD_STATE_A = _alias_.getAlias() + "." + RECORD_STATE_O;
+ }
+ }
+}
\ No newline at end of file
diff --git a/service-common/src/main/java/com/lanyuanxiaoyao/service/common/entity/FlinkJob.java b/service-common/src/main/java/com/lanyuanxiaoyao/service/common/entity/FlinkJob.java
new file mode 100644
index 0000000..38174e4
--- /dev/null
+++ b/service-common/src/main/java/com/lanyuanxiaoyao/service/common/entity/FlinkJob.java
@@ -0,0 +1,123 @@
+package com.lanyuanxiaoyao.service.common.entity;
+
+import java.io.Serializable;
+
+/**
+ * Flink Job
+ *
+ * @author ZhangJiacheng
+ * @version 0.0.1
+ * @date 2021-12-08
+ */
+public class FlinkJob implements Serializable {
+ private Long id;
+ private String name;
+ private RunMode runMode;
+ private TableMeta.YarnMeta oneInOneSyncYarn;
+
+ public FlinkJob() {
+ }
+
+ public FlinkJob(Builder builder) {
+ this.id = builder.id;
+ this.name = builder.name;
+ this.runMode = builder.runMode;
+ this.oneInOneSyncYarn = builder.oneInOneSyncYarn;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public Long getId() {
+ return id;
+ }
+
+ public void setId(Long id) {
+ this.id = id;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public RunMode getRunMode() {
+ return runMode;
+ }
+
+ public void setRunMode(RunMode runMode) {
+ this.runMode = runMode;
+ }
+
+ public TableMeta.YarnMeta getOneInOneSyncYarn() {
+ return oneInOneSyncYarn;
+ }
+
+ public void setOneInOneSyncYarn(TableMeta.YarnMeta oneInOneSyncYarn) {
+ this.oneInOneSyncYarn = oneInOneSyncYarn;
+ }
+
+ @Override
+ public String toString() {
+ return "FlinkJob{" +
+ "id=" + id +
+ ", name='" + name + '\'' +
+ ", runMode=" + runMode +
+ ", oneInOneSyncYarn=" + oneInOneSyncYarn +
+ '}';
+ }
+
+ public enum RunMode {
+ /**
+ * 所有表放在同一个任务中
+ */
+ ALL_IN_ONE,
+ /**
+ * 每个表放在单独的任务中
+ */
+ ONE_IN_ONE,
+ /**
+ * 针对 ACCT 小表,将同一个表放在同一个子任务中
+ */
+ ALL_IN_ONE_BY_TABLE,
+ ALL_IN_ONE_BY_SCHEMA,
+ }
+
+ public static final class Builder {
+ private Long id;
+ private String name;
+ private RunMode runMode;
+ private TableMeta.YarnMeta oneInOneSyncYarn;
+
+ private Builder() {}
+
+ public Builder id(Long id) {
+ this.id = id;
+ return this;
+ }
+
+ public Builder name(String name) {
+ this.name = name;
+ return this;
+ }
+
+ public Builder runMode(RunMode runMode) {
+ this.runMode = runMode;
+ return this;
+ }
+
+ public Builder oneInOneSyncYarn(TableMeta.YarnMeta oneInOneSyncYarn) {
+ this.oneInOneSyncYarn = oneInOneSyncYarn;
+ return this;
+ }
+
+ public FlinkJob build() {
+ return new FlinkJob(this);
+ }
+ }
+
+}
diff --git a/service-common/src/main/java/com/lanyuanxiaoyao/service/common/entity/Record.java b/service-common/src/main/java/com/lanyuanxiaoyao/service/common/entity/Record.java
new file mode 100644
index 0000000..c73ea5e
--- /dev/null
+++ b/service-common/src/main/java/com/lanyuanxiaoyao/service/common/entity/Record.java
@@ -0,0 +1,197 @@
+package com.lanyuanxiaoyao.service.common.entity;
+
+import java.io.Serializable;
+import java.util.Map;
+
+/**
+ * 从 Pulsar 读取的消息封装
+ *
+ * @author lanyuanxiaoyao
+ * @version 0.0.1
+ * @date 2021-11-25
+ */
+public class Record implements Serializable {
+ private Source source;
+ private Statement statement;
+
+ public Record() {
+ }
+
+ public Source getSource() {
+ return source;
+ }
+
+ public void setSource(Source source) {
+ this.source = source;
+ }
+
+ public Statement getStatement() {
+ return statement;
+ }
+
+ public void setStatement(Statement statement) {
+ this.statement = statement;
+ }
+
+ @Override
+ public String toString() {
+ return "Record{" +
+ "source=" + source +
+ ", statement=" + statement +
+ '}';
+ }
+
+ public static class Source implements Serializable {
+ private String sourceId;
+ private String sourceType;
+ private String sourcePos;
+ private String currentTs;
+
+ public Source() {
+ }
+
+ public String getSourceId() {
+ return sourceId;
+ }
+
+ public void setSourceId(String sourceId) {
+ this.sourceId = sourceId;
+ }
+
+ public String getSourceType() {
+ return sourceType;
+ }
+
+ public void setSourceType(String sourceType) {
+ this.sourceType = sourceType;
+ }
+
+ public String getSourcePos() {
+ return sourcePos;
+ }
+
+ public void setSourcePos(String sourcePos) {
+ this.sourcePos = sourcePos;
+ }
+
+ public String getCurrentTs() {
+ return currentTs;
+ }
+
+ public void setCurrentTs(String currentTs) {
+ this.currentTs = currentTs;
+ }
+
+ @Override
+ public String toString() {
+ return "Source{" +
+ "sourceId='" + sourceId + '\'' +
+ ", sourceType='" + sourceType + '\'' +
+ ", sourcePos='" + sourcePos + '\'' +
+ ", currentTs='" + currentTs + '\'' +
+ '}';
+ }
+ }
+
+ public static class Statement implements Serializable {
+ private String schema;
+ private String table;
+ private String opStatement;
+ private String opType;
+ private String op;
+ private String opTs;
+ private String version;
+ private Map before;
+ private Map after;
+
+ public Statement() {
+ }
+
+ public String getSchema() {
+ return schema;
+ }
+
+ public void setSchema(String schema) {
+ this.schema = schema;
+ }
+
+ public String getTable() {
+ return table;
+ }
+
+ public void setTable(String table) {
+ this.table = table;
+ }
+
+ public String getOpStatement() {
+ return opStatement;
+ }
+
+ public void setOpStatement(String opStatement) {
+ this.opStatement = opStatement;
+ }
+
+ public String getOpType() {
+ return opType;
+ }
+
+ public void setOpType(String opType) {
+ this.opType = opType;
+ }
+
+ public String getOp() {
+ return op;
+ }
+
+ public void setOp(String op) {
+ this.op = op;
+ }
+
+ public String getOpTs() {
+ return opTs;
+ }
+
+ public void setOpTs(String opTs) {
+ this.opTs = opTs;
+ }
+
+ public String getVersion() {
+ return version;
+ }
+
+ public void setVersion(String version) {
+ this.version = version;
+ }
+
+ public Map getBefore() {
+ return before;
+ }
+
+ public void setBefore(Map before) {
+ this.before = before;
+ }
+
+ public Map getAfter() {
+ return after;
+ }
+
+ public void setAfter(Map after) {
+ this.after = after;
+ }
+
+ @Override
+ public String toString() {
+ return "Statement{" +
+ "schema='" + schema + '\'' +
+ ", table='" + table + '\'' +
+ ", opStatement='" + opStatement + '\'' +
+ ", opType='" + opType + '\'' +
+ ", op='" + op + '\'' +
+ ", opTs='" + opTs + '\'' +
+ ", version='" + version + '\'' +
+ ", before=" + before +
+ ", after=" + after +
+ '}';
+ }
+ }
+}
diff --git a/service-common/src/main/java/com/lanyuanxiaoyao/service/common/entity/RunMeta.java b/service-common/src/main/java/com/lanyuanxiaoyao/service/common/entity/RunMeta.java
new file mode 100644
index 0000000..273ead9
--- /dev/null
+++ b/service-common/src/main/java/com/lanyuanxiaoyao/service/common/entity/RunMeta.java
@@ -0,0 +1,121 @@
+package com.lanyuanxiaoyao.service.common.entity;
+
+import com.lanyuanxiaoyao.service.common.utils.NameHelper;
+import java.io.Serializable;
+
+/**
+ * 运行时参数
+ *
+ * @author ZhangJiacheng
+ * @date 2023-05-11
+ */
+@SuppressWarnings("FieldMayBeFinal")
+public class RunMeta implements Serializable {
+ private String cluster;
+ private Long flinkJobId;
+ private String alias;
+ private String flinkJobName;
+ private String host;
+ private String applicationId;
+ private String containerId;
+ private String containerPath;
+ private String runType;
+ private String executorVersion;
+ private String jvmPid;
+ private String applicationProxy;
+ private String subscriptionName;
+
+ public RunMeta() {
+ this.flinkJobName = System.getenv("flink_job_name");
+ this.host = System.getenv("NM_HOST");
+ this.applicationId = System.getenv("_APP_ID");
+ this.containerId = System.getenv("CONTAINER_ID");
+ this.containerPath = System.getenv("PWD");
+ this.runType = System.getenv("run_type");
+ this.executorVersion = System.getenv("executor_version");
+ this.jvmPid = System.getenv("JVM_PID");
+ this.applicationProxy = System.getenv("APPLICATION_WEB_PROXY_BASE");
+ }
+
+ public RunMeta(String cluster, Long flinkJobId) {
+ this();
+ this.cluster = cluster;
+ this.flinkJobId = flinkJobId;
+ }
+
+ public RunMeta(String cluster, Long flinkJobId, String alias) {
+ this(cluster, flinkJobId);
+ this.alias = alias;
+ this.subscriptionName = NameHelper.pulsarSubscriptionName(flinkJobId, alias);
+ }
+
+ public String getCluster() {
+ return cluster;
+ }
+
+ public Long getFlinkJobId() {
+ return flinkJobId;
+ }
+
+ public String getAlias() {
+ return alias;
+ }
+
+ public String getFlinkJobName() {
+ return flinkJobName;
+ }
+
+ public String getHost() {
+ return host;
+ }
+
+ public String getApplicationId() {
+ return applicationId;
+ }
+
+ public String getContainerId() {
+ return containerId;
+ }
+
+ public String getContainerPath() {
+ return containerPath;
+ }
+
+ public String getRunType() {
+ return runType;
+ }
+
+ public String getExecutorVersion() {
+ return executorVersion;
+ }
+
+ public String getJvmPid() {
+ return jvmPid;
+ }
+
+ public String getApplicationProxy() {
+ return applicationProxy;
+ }
+
+ public String getSubscriptionName() {
+ return subscriptionName;
+ }
+
+ @Override
+ public String toString() {
+ return "RunMeta{" +
+ "cluster='" + cluster + '\'' +
+ ", flinkJobId='" + flinkJobId + '\'' +
+ ", flinkJobName='" + flinkJobName + '\'' +
+ ", host='" + host + '\'' +
+ ", applicationId='" + applicationId + '\'' +
+ ", containerId='" + containerId + '\'' +
+ ", containerPath='" + containerPath + '\'' +
+ ", runType='" + runType + '\'' +
+ ", executorVersion='" + executorVersion + '\'' +
+ ", jvmPid='" + jvmPid + '\'' +
+ ", applicationProxy='" + applicationProxy + '\'' +
+ ", subscriptionName='" + subscriptionName + '\'' +
+ '}';
+ }
+}
diff --git a/service-common/src/main/java/com/lanyuanxiaoyao/service/common/entity/SyncState.java b/service-common/src/main/java/com/lanyuanxiaoyao/service/common/entity/SyncState.java
new file mode 100644
index 0000000..861ec45
--- /dev/null
+++ b/service-common/src/main/java/com/lanyuanxiaoyao/service/common/entity/SyncState.java
@@ -0,0 +1,259 @@
+package com.lanyuanxiaoyao.service.common.entity;
+
+import java.io.Serializable;
+
+/**
+ * 同步压缩状态表类
+ *
+ * @author ZhangJiacheng
+ * @date 2023-04-24
+ */
+public class SyncState implements Serializable {
+ private Long flinkJobId;
+ private String alias;
+ private String messageId;
+ private Long sourceStartTime;
+ private Long sourceCheckpointTime;
+ private Long sourcePublishTime;
+ private Long sourceOperationTime;
+ private Long compactionStartTime;
+ private Long compactionFinishTime;
+ private String compactionApplicationId;
+ private String compactionStatus;
+ private Long compactionStatusTime;
+ private Long compactionLatestOperationTime;
+
+ public SyncState() {
+ }
+
+ public SyncState(Builder builder) {
+ this.flinkJobId = builder.flinkJobId;
+ this.alias = builder.alias;
+ this.messageId = builder.messageId;
+ this.sourceStartTime = builder.sourceStartTime;
+ this.sourceCheckpointTime = builder.sourceCheckpointTime;
+ this.sourcePublishTime = builder.sourcePublishTime;
+ this.sourceOperationTime = builder.sourceOperationTime;
+ this.compactionStartTime = builder.compactionStartTime;
+ this.compactionFinishTime = builder.compactionFinishTime;
+ this.compactionApplicationId = builder.compactionApplicationId;
+ this.compactionStatus = builder.compactionStatus;
+ this.compactionStatusTime = builder.compactionStatusTime;
+ this.compactionLatestOperationTime = builder.compactionLatestOperationTime;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public Long getFlinkJobId() {
+ return flinkJobId;
+ }
+
+ public void setFlinkJobId(Long flinkJobId) {
+ this.flinkJobId = flinkJobId;
+ }
+
+ public String getAlias() {
+ return alias;
+ }
+
+ public void setAlias(String alias) {
+ this.alias = alias;
+ }
+
+ public String getMessageId() {
+ return messageId;
+ }
+
+ public void setMessageId(String messageId) {
+ this.messageId = messageId;
+ }
+
+ public Long getSourceStartTime() {
+ return sourceStartTime;
+ }
+
+ public void setSourceStartTime(Long sourceStartTime) {
+ this.sourceStartTime = sourceStartTime;
+ }
+
+ public Long getSourceCheckpointTime() {
+ return sourceCheckpointTime;
+ }
+
+ public void setSourceCheckpointTime(Long sourceCheckpointTime) {
+ this.sourceCheckpointTime = sourceCheckpointTime;
+ }
+
+ public Long getSourcePublishTime() {
+ return sourcePublishTime;
+ }
+
+ public void setSourcePublishTime(Long sourcePublishTime) {
+ this.sourcePublishTime = sourcePublishTime;
+ }
+
+ public Long getSourceOperationTime() {
+ return sourceOperationTime;
+ }
+
+ public void setSourceOperationTime(Long sourceOperationTime) {
+ this.sourceOperationTime = sourceOperationTime;
+ }
+
+ public Long getCompactionStartTime() {
+ return compactionStartTime;
+ }
+
+ public void setCompactionStartTime(Long compactionStartTime) {
+ this.compactionStartTime = compactionStartTime;
+ }
+
+ public Long getCompactionFinishTime() {
+ return compactionFinishTime;
+ }
+
+ public void setCompactionFinishTime(Long compactionFinishTime) {
+ this.compactionFinishTime = compactionFinishTime;
+ }
+
+ public String getCompactionApplicationId() {
+ return compactionApplicationId;
+ }
+
+ public void setCompactionApplicationId(String compactionApplicationId) {
+ this.compactionApplicationId = compactionApplicationId;
+ }
+
+ public String getCompactionStatus() {
+ return compactionStatus;
+ }
+
+ public void setCompactionStatus(String compactionStatus) {
+ this.compactionStatus = compactionStatus;
+ }
+
+ public Long getCompactionStatusTime() {
+ return compactionStatusTime;
+ }
+
+ public void setCompactionStatusTime(Long compactionStatusTime) {
+ this.compactionStatusTime = compactionStatusTime;
+ }
+
+ public Long getCompactionLatestOperationTime() {
+ return compactionLatestOperationTime;
+ }
+
+ public void setCompactionLatestOperationTime(Long compactionLatestOperationTime) {
+ this.compactionLatestOperationTime = compactionLatestOperationTime;
+ }
+
+ @Override
+ public String toString() {
+ return "SyncState{" +
+ "flinkJobId=" + flinkJobId +
+ ", alias='" + alias + '\'' +
+ ", messageId='" + messageId + '\'' +
+ ", sourceStartTime=" + sourceStartTime +
+ ", sourceCheckpointTime=" + sourceCheckpointTime +
+ ", sourcePublishTime=" + sourcePublishTime +
+ ", sourceOperationTime=" + sourceOperationTime +
+ ", compactionStartTime=" + compactionStartTime +
+ ", compactionFinishTime=" + compactionFinishTime +
+ ", compactionApplicationId='" + compactionApplicationId + '\'' +
+ ", compactionStatus='" + compactionStatus + '\'' +
+ ", compactionStatusTime=" + compactionStatusTime +
+ ", compactionLatestOperationTime=" + compactionLatestOperationTime +
+ '}';
+ }
+
+ public static final class Builder {
+ private Long flinkJobId;
+ private String alias;
+ private String messageId;
+ private Long sourceStartTime;
+ private Long sourceCheckpointTime;
+ private Long sourcePublishTime;
+ private Long sourceOperationTime;
+ private Long compactionStartTime;
+ private Long compactionFinishTime;
+ private String compactionApplicationId;
+ private String compactionStatus;
+ private Long compactionStatusTime;
+ private Long compactionLatestOperationTime;
+
+ private Builder() {
+ }
+
+ public Builder flinkJobId(Long flinkJobId) {
+ this.flinkJobId = flinkJobId;
+ return this;
+ }
+
+ public Builder alias(String alias) {
+ this.alias = alias;
+ return this;
+ }
+
+ public Builder messageId(String messageId) {
+ this.messageId = messageId;
+ return this;
+ }
+
+ public Builder sourceStartTime(Long sourceStartTime) {
+ this.sourceStartTime = sourceStartTime;
+ return this;
+ }
+
+ public Builder sourceCheckpointTime(Long sourceCheckpointTime) {
+ this.sourceCheckpointTime = sourceCheckpointTime;
+ return this;
+ }
+
+ public Builder sourcePublishTime(Long sourcePublishTime) {
+ this.sourcePublishTime = sourcePublishTime;
+ return this;
+ }
+
+ public Builder sourceOperationTime(Long sourceOperationTime) {
+ this.sourceOperationTime = sourceOperationTime;
+ return this;
+ }
+
+ public Builder compactionStartTime(Long compactionStartTime) {
+ this.compactionStartTime = compactionStartTime;
+ return this;
+ }
+
+ public Builder compactionFinishTime(Long compactionFinishTime) {
+ this.compactionFinishTime = compactionFinishTime;
+ return this;
+ }
+
+ public Builder compactionApplicationId(String compactionApplicationId) {
+ this.compactionApplicationId = compactionApplicationId;
+ return this;
+ }
+
+ public Builder compactionStatus(String compactionStatus) {
+ this.compactionStatus = compactionStatus;
+ return this;
+ }
+
+ public Builder compactionStatusTime(Long compactionStatusTime) {
+ this.compactionStatusTime = compactionStatusTime;
+ return this;
+ }
+
+ public Builder compactionLatestOperationTime(Long compactionLatestOperationTime) {
+ this.compactionLatestOperationTime = compactionLatestOperationTime;
+ return this;
+ }
+
+ public SyncState build() {
+ return new SyncState(this);
+ }
+ }
+}
diff --git a/service-common/src/main/java/com/lanyuanxiaoyao/service/common/entity/TableMeta.java b/service-common/src/main/java/com/lanyuanxiaoyao/service/common/entity/TableMeta.java
new file mode 100644
index 0000000..a17a801
--- /dev/null
+++ b/service-common/src/main/java/com/lanyuanxiaoyao/service/common/entity/TableMeta.java
@@ -0,0 +1,2390 @@
+package com.lanyuanxiaoyao.service.common.entity;
+
+import java.io.Serializable;
+import java.util.List;
+
+/**
+ * 配置表项
+ *
+ * @author ZhangJiacheng
+ * @version 0.0.1
+ * @date 2021-11-30
+ */
+public class TableMeta implements Serializable {
+ private String alias;
+ private String source;
+ private String schema;
+ private String table;
+ private String type;
+ private List primaryKeys;
+ private List partitionKeys;
+ private HudiMeta hudi;
+ private List fields;
+ private String filterField;
+ private List filterValues;
+ private FilterType filterType;
+ private String topic;
+ private String pulsarAddress;
+ private YarnMeta syncYarn;
+ private YarnMeta compactionYarn;
+ private String partitionField;
+ private ConfigMeta config;
+ private JobMeta job;
+ private ConnectionMeta connection;
+ private Integer priority;
+ private SourceType sourceType;
+ private List tags;
+ private Integer version;
+
+ public TableMeta() {
+ }
+
+ public TableMeta(Builder builder) {
+ this.alias = builder.alias;
+ this.source = builder.source;
+ this.schema = builder.schema;
+ this.table = builder.table;
+ this.type = builder.type;
+ this.primaryKeys = builder.primaryKeys;
+ this.partitionKeys = builder.partitionKeys;
+ this.hudi = builder.hudi;
+ this.fields = builder.fields;
+ this.filterField = builder.filterField;
+ this.filterValues = builder.filterValues;
+ this.filterType = builder.filterType;
+ this.topic = builder.topic;
+ this.pulsarAddress = builder.pulsarAddress;
+ this.syncYarn = builder.syncYarn;
+ this.compactionYarn = builder.compactionYarn;
+ this.partitionField = builder.partitionField;
+ this.config = builder.config;
+ this.job = builder.job;
+ this.connection = builder.connection;
+ this.priority = builder.priority;
+ this.sourceType = builder.sourceType;
+ this.tags = builder.tags;
+ this.version = builder.version;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public String getAlias() {
+ return alias;
+ }
+
+ public void setAlias(String alias) {
+ this.alias = alias;
+ }
+
+ public String getSource() {
+ return source;
+ }
+
+ public void setSource(String source) {
+ this.source = source;
+ }
+
+ public String getSchema() {
+ return schema;
+ }
+
+ public void setSchema(String schema) {
+ this.schema = schema;
+ }
+
+ public String getTable() {
+ return table;
+ }
+
+ public void setTable(String table) {
+ this.table = table;
+ }
+
+ public String getType() {
+ return type;
+ }
+
+ public void setType(String type) {
+ this.type = type;
+ }
+
+ public List getPrimaryKeys() {
+ return primaryKeys;
+ }
+
+ public void setPrimaryKeys(List primaryKeys) {
+ this.primaryKeys = primaryKeys;
+ }
+
+ public List getPartitionKeys() {
+ return partitionKeys;
+ }
+
+ public void setPartitionKeys(List partitionKeys) {
+ this.partitionKeys = partitionKeys;
+ }
+
+ public HudiMeta getHudi() {
+ return hudi;
+ }
+
+ public void setHudi(HudiMeta hudi) {
+ this.hudi = hudi;
+ }
+
+ public List getFields() {
+ return fields;
+ }
+
+ public void setFields(List fields) {
+ this.fields = fields;
+ }
+
+ public String getFilterField() {
+ return filterField;
+ }
+
+ public void setFilterField(String filterField) {
+ this.filterField = filterField;
+ }
+
+ public List getFilterValues() {
+ return filterValues;
+ }
+
+ public void setFilterValues(List filterValues) {
+ this.filterValues = filterValues;
+ }
+
+ public FilterType getFilterType() {
+ return filterType;
+ }
+
+ public void setFilterType(FilterType filterType) {
+ this.filterType = filterType;
+ }
+
+ public String getTopic() {
+ return topic;
+ }
+
+ public void setTopic(String topic) {
+ this.topic = topic;
+ }
+
+ public String getPulsarAddress() {
+ return pulsarAddress;
+ }
+
+ public void setPulsarAddress(String pulsarAddress) {
+ this.pulsarAddress = pulsarAddress;
+ }
+
+ public YarnMeta getSyncYarn() {
+ return syncYarn;
+ }
+
+ public void setSyncYarn(YarnMeta syncYarn) {
+ this.syncYarn = syncYarn;
+ }
+
+ public YarnMeta getCompactionYarn() {
+ return compactionYarn;
+ }
+
+ public void setCompactionYarn(YarnMeta compactionYarn) {
+ this.compactionYarn = compactionYarn;
+ }
+
+ public String getPartitionField() {
+ return partitionField;
+ }
+
+ public void setPartitionField(String partitionField) {
+ this.partitionField = partitionField;
+ }
+
+ public ConfigMeta getConfig() {
+ return config;
+ }
+
+ public void setConfig(ConfigMeta config) {
+ this.config = config;
+ }
+
+ public JobMeta getJob() {
+ return job;
+ }
+
+ public void setJob(JobMeta job) {
+ this.job = job;
+ }
+
+ public ConnectionMeta getConnection() {
+ return connection;
+ }
+
+ public void setConnection(ConnectionMeta connection) {
+ this.connection = connection;
+ }
+
+ public Integer getPriority() {
+ return priority;
+ }
+
+ public void setPriority(Integer priority) {
+ this.priority = priority;
+ }
+
+ public SourceType getSourceType() {
+ return sourceType;
+ }
+
+ public void setSourceType(SourceType sourceType) {
+ this.sourceType = sourceType;
+ }
+
+ public List getTags() {
+ return tags;
+ }
+
+ public void setTags(List tags) {
+ this.tags = tags;
+ }
+
+ public Integer getVersion() {
+ return version;
+ }
+
+ public void setVersion(Integer version) {
+ this.version = version;
+ }
+
+ @Override
+ public String toString() {
+ return "TableMeta{" +
+ "alias='" + alias + '\'' +
+ ", source='" + source + '\'' +
+ ", schema='" + schema + '\'' +
+ ", table='" + table + '\'' +
+ ", type='" + type + '\'' +
+ ", primaryKeys=" + primaryKeys +
+ ", partitionKeys=" + partitionKeys +
+ ", hudi=" + hudi +
+ ", fields=" + fields +
+ ", filterField='" + filterField + '\'' +
+ ", filterValues=" + filterValues +
+ ", filterType=" + filterType +
+ ", topic='" + topic + '\'' +
+ ", pulsarAddress='" + pulsarAddress + '\'' +
+ ", syncYarn=" + syncYarn +
+ ", compactionYarn=" + compactionYarn +
+ ", partitionField='" + partitionField + '\'' +
+ ", config=" + config +
+ ", job=" + job +
+ ", connection=" + connection +
+ ", priority=" + priority +
+ ", sourceType=" + sourceType +
+ ", tags=" + tags +
+ ", version=" + version +
+ '}';
+ }
+
+ /**
+ * 过滤操作的类型
+ */
+ public enum FilterType {
+ /**
+ * 包含
+ */
+ INCLUDE,
+ /**
+ * 排除
+ */
+ EXCLUDE,
+ /**
+ * 无操作
+ */
+ NONE,
+ }
+
+ public enum SourceType {
+ /**
+ * UDAL
+ */
+ UDAL,
+ /**
+ * TELEPG
+ */
+ TELEPG,
+ }
+
+ public static final class Builder {
+ private String alias;
+ private String source;
+ private String schema;
+ private String table;
+ private String type;
+ private List primaryKeys;
+ private List partitionKeys;
+ private HudiMeta hudi;
+ private List fields;
+ private String filterField;
+ private List filterValues;
+ private FilterType filterType;
+ private String topic;
+ private String pulsarAddress;
+ private YarnMeta syncYarn;
+ private YarnMeta compactionYarn;
+ private String partitionField;
+ private ConfigMeta config;
+ private JobMeta job;
+ private ConnectionMeta connection;
+ private Integer priority;
+ private SourceType sourceType;
+ private List tags;
+ private Integer version;
+
+ private Builder() {
+ }
+
+ public Builder alias(String alias) {
+ this.alias = alias;
+ return this;
+ }
+
+ public Builder source(String source) {
+ this.source = source;
+ return this;
+ }
+
+ public Builder schema(String schema) {
+ this.schema = schema;
+ return this;
+ }
+
+ public Builder table(String table) {
+ this.table = table;
+ return this;
+ }
+
+ public Builder type(String type) {
+ this.type = type;
+ return this;
+ }
+
+ public Builder primaryKeys(List primaryKeys) {
+ this.primaryKeys = primaryKeys;
+ return this;
+ }
+
+ public Builder partitionKeys(List partitionKeys) {
+ this.partitionKeys = partitionKeys;
+ return this;
+ }
+
+ public Builder hudi(HudiMeta hudi) {
+ this.hudi = hudi;
+ return this;
+ }
+
+ public Builder fields(List fields) {
+ this.fields = fields;
+ return this;
+ }
+
+ public Builder filterField(String filterField) {
+ this.filterField = filterField;
+ return this;
+ }
+
+ public Builder filterValues(List filterValues) {
+ this.filterValues = filterValues;
+ return this;
+ }
+
+ public Builder filterType(FilterType filterType) {
+ this.filterType = filterType;
+ return this;
+ }
+
+ public Builder topic(String topic) {
+ this.topic = topic;
+ return this;
+ }
+
+ public Builder pulsarAddress(String pulsarAddress) {
+ this.pulsarAddress = pulsarAddress;
+ return this;
+ }
+
+ public Builder syncYarn(YarnMeta syncYarn) {
+ this.syncYarn = syncYarn;
+ return this;
+ }
+
+ public Builder compactionYarn(YarnMeta compactionYarn) {
+ this.compactionYarn = compactionYarn;
+ return this;
+ }
+
+ public Builder partitionField(String partitionField) {
+ this.partitionField = partitionField;
+ return this;
+ }
+
+ public Builder config(ConfigMeta config) {
+ this.config = config;
+ return this;
+ }
+
+ public Builder job(JobMeta job) {
+ this.job = job;
+ return this;
+ }
+
+ public Builder connection(ConnectionMeta connection) {
+ this.connection = connection;
+ return this;
+ }
+
+ public Builder priority(Integer priority) {
+ this.priority = priority;
+ return this;
+ }
+
+
+ public Builder sourceType(SourceType sourceType) {
+ this.sourceType = sourceType;
+ return this;
+ }
+
+ public Builder tags(List tags) {
+ this.tags = tags;
+ return this;
+ }
+
+ public Builder version(Integer version) {
+ this.version = version;
+ return this;
+ }
+
+ public TableMeta build() {
+ return new TableMeta(this);
+ }
+ }
+
+ public static final class FieldMeta implements Serializable {
+ private String name;
+ private Integer sequence;
+ private String type;
+ private Boolean isPrimaryKey;
+ private Boolean partitionKey;
+ private Long length;
+ private Integer scala;
+
+ public FieldMeta() {
+ }
+
+ public FieldMeta(Builder builder) {
+ this.name = builder.name;
+ this.sequence = builder.sequence;
+ this.type = builder.type;
+ this.isPrimaryKey = builder.isPrimaryKey;
+ this.partitionKey = builder.partitionKey;
+ this.length = builder.length;
+ this.scala = builder.scala;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ @Override
+ public String toString() {
+ return "FieldMeta{" +
+ "name='" + name + '\'' +
+ ", sequence=" + sequence +
+ ", type='" + type + '\'' +
+ ", isPrimaryKey=" + isPrimaryKey +
+ ", partitionKey=" + partitionKey +
+ ", length=" + length +
+ '}';
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public Integer getSequence() {
+ return sequence;
+ }
+
+ public void setSequence(Integer sequence) {
+ this.sequence = sequence;
+ }
+
+ public String getType() {
+ return type;
+ }
+
+ public void setType(String type) {
+ this.type = type;
+ }
+
+ public Boolean getPrimaryKey() {
+ return isPrimaryKey;
+ }
+
+ public void setPrimaryKey(Boolean primaryKey) {
+ isPrimaryKey = primaryKey;
+ }
+
+ public Boolean getPartitionKey() {
+ return partitionKey;
+ }
+
+ public void setPartitionKey(Boolean partitionKey) {
+ this.partitionKey = partitionKey;
+ }
+
+ public Long getLength() {
+ return length;
+ }
+
+ public void setLength(Long length) {
+ this.length = length;
+ }
+
+ public Integer getScala() {
+ return scala;
+ }
+
+ public void setScala(Integer scala) {
+ this.scala = scala;
+ }
+
+ public static final class Builder {
+ private String name;
+ private Integer sequence;
+ private String type;
+ private Boolean isPrimaryKey;
+ private Boolean partitionKey;
+ private Long length;
+ private Integer scala;
+
+ private Builder() {
+ }
+
+ public Builder name(String name) {
+ this.name = name;
+ return this;
+ }
+
+ public Builder sequence(Integer sequence) {
+ this.sequence = sequence;
+ return this;
+ }
+
+ public Builder type(String type) {
+ this.type = type;
+ return this;
+ }
+
+ public Builder isPrimaryKey(Boolean isPrimaryKey) {
+ this.isPrimaryKey = isPrimaryKey;
+ return this;
+ }
+
+ public Builder partitionKey(Boolean partitionKey) {
+ this.partitionKey = partitionKey;
+ return this;
+ }
+
+ public Builder length(Long length) {
+ this.length = length;
+ return this;
+ }
+
+ public Builder scala(Integer scala) {
+ this.scala = scala;
+ return this;
+ }
+
+ public FieldMeta build() {
+ return new FieldMeta(this);
+ }
+ }
+ }
+
+ public static final class HudiMeta implements Serializable {
+ private String targetDataSource;
+ private String targetTable;
+ private String targetTableType;
+ private String targetHdfsPath;
+ private Integer sourceTasks;
+ private Integer writeTasks;
+ private String writeOperation;
+ private Integer writeTaskMaxMemory;
+ private Integer writeBatchSize;
+ private Integer writeRateLimit;
+ private Integer bucketIndexNumber;
+ private String compactionStrategy;
+ private Integer compactionTasks;
+ private Integer compactionDeltaCommits;
+ private Integer compactionDeltaSeconds;
+ private String compactionAsyncEnabled;
+ private Integer compactionMaxMemory;
+ private String configs;
+ private Integer keepFileVersion;
+ private Integer keepCommitVersion;
+
+ public HudiMeta() {
+ }
+
+ public HudiMeta(Builder builder) {
+ this.targetDataSource = builder.targetDataSource;
+ this.targetTable = builder.targetTable;
+ this.targetTableType = builder.targetTableType;
+ this.targetHdfsPath = builder.targetHdfsPath;
+ this.sourceTasks = builder.sourceTasks;
+ this.writeTasks = builder.writeTasks;
+ this.writeOperation = builder.writeOperation;
+ this.writeTaskMaxMemory = builder.writeTaskMaxMemory;
+ this.writeBatchSize = builder.writeBatchSize;
+ this.writeRateLimit = builder.writeRateLimit;
+ this.bucketIndexNumber = builder.bucketIndexNumber;
+ this.compactionStrategy = builder.compactionStrategy;
+ this.compactionTasks = builder.compactionTasks;
+ this.compactionDeltaCommits = builder.compactionDeltaCommits;
+ this.compactionDeltaSeconds = builder.compactionDeltaSeconds;
+ this.compactionAsyncEnabled = builder.compactionAsyncEnabled;
+ this.compactionMaxMemory = builder.compactionMaxMemory;
+ this.configs = builder.configs;
+ this.keepFileVersion = builder.keepFileVersion;
+ this.keepCommitVersion = builder.keepCommitVersion;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public String getTargetDataSource() {
+ return targetDataSource;
+ }
+
+ public void setTargetDataSource(String targetDataSource) {
+ this.targetDataSource = targetDataSource;
+ }
+
+ public String getTargetTable() {
+ return targetTable;
+ }
+
+ public void setTargetTable(String targetTable) {
+ this.targetTable = targetTable;
+ }
+
+ public String getTargetTableType() {
+ return targetTableType;
+ }
+
+ public void setTargetTableType(String targetTableType) {
+ this.targetTableType = targetTableType;
+ }
+
+ public String getTargetHdfsPath() {
+ return targetHdfsPath;
+ }
+
+ public void setTargetHdfsPath(String targetHdfsPath) {
+ this.targetHdfsPath = targetHdfsPath;
+ }
+
+ public Integer getSourceTasks() {
+ return sourceTasks;
+ }
+
+ public void setSourceTasks(Integer sourceTasks) {
+ this.sourceTasks = sourceTasks;
+ }
+
+ public Integer getWriteTasks() {
+ return writeTasks;
+ }
+
+ public void setWriteTasks(Integer writeTasks) {
+ this.writeTasks = writeTasks;
+ }
+
+ public String getWriteOperation() {
+ return writeOperation;
+ }
+
+ public void setWriteOperation(String writeOperation) {
+ this.writeOperation = writeOperation;
+ }
+
+ public Integer getWriteTaskMaxMemory() {
+ return writeTaskMaxMemory;
+ }
+
+ public void setWriteTaskMaxMemory(Integer writeTaskMaxMemory) {
+ this.writeTaskMaxMemory = writeTaskMaxMemory;
+ }
+
+ public Integer getWriteBatchSize() {
+ return writeBatchSize;
+ }
+
+ public void setWriteBatchSize(Integer writeBatchSize) {
+ this.writeBatchSize = writeBatchSize;
+ }
+
+ public Integer getWriteRateLimit() {
+ return writeRateLimit;
+ }
+
+ public void setWriteRateLimit(Integer writeRateLimit) {
+ this.writeRateLimit = writeRateLimit;
+ }
+
+ public Integer getBucketIndexNumber() {
+ return bucketIndexNumber;
+ }
+
+ public void setBucketIndexNumber(Integer bucketIndexNumber) {
+ this.bucketIndexNumber = bucketIndexNumber;
+ }
+
+ public String getCompactionStrategy() {
+ return compactionStrategy;
+ }
+
+ public void setCompactionStrategy(String compactionStrategy) {
+ this.compactionStrategy = compactionStrategy;
+ }
+
+ public Integer getCompactionTasks() {
+ return compactionTasks;
+ }
+
+ public void setCompactionTasks(Integer compactionTasks) {
+ this.compactionTasks = compactionTasks;
+ }
+
+ public Integer getCompactionDeltaCommits() {
+ return compactionDeltaCommits;
+ }
+
+ public void setCompactionDeltaCommits(Integer compactionDeltaCommits) {
+ this.compactionDeltaCommits = compactionDeltaCommits;
+ }
+
+ public Integer getCompactionDeltaSeconds() {
+ return compactionDeltaSeconds;
+ }
+
+ public void setCompactionDeltaSeconds(Integer compactionDeltaSeconds) {
+ this.compactionDeltaSeconds = compactionDeltaSeconds;
+ }
+
+ public String getCompactionAsyncEnabled() {
+ return compactionAsyncEnabled;
+ }
+
+ public void setCompactionAsyncEnabled(String compactionAsyncEnabled) {
+ this.compactionAsyncEnabled = compactionAsyncEnabled;
+ }
+
+ public Integer getCompactionMaxMemory() {
+ return compactionMaxMemory;
+ }
+
+ public void setCompactionMaxMemory(Integer compactionMaxMemory) {
+ this.compactionMaxMemory = compactionMaxMemory;
+ }
+
+ public String getConfigs() {
+ return configs;
+ }
+
+ public void setConfigs(String configs) {
+ this.configs = configs;
+ }
+
+ public Integer getKeepFileVersion() {
+ return keepFileVersion;
+ }
+
+ public void setKeepFileVersion(Integer keepFileVersion) {
+ this.keepFileVersion = keepFileVersion;
+ }
+
+ public Integer getKeepCommitVersion() {
+ return keepCommitVersion;
+ }
+
+ public void setKeepCommitVersion(Integer keepCommitVersion) {
+ this.keepCommitVersion = keepCommitVersion;
+ }
+
+ @Override
+ public String toString() {
+ return "HudiMeta{" +
+ "targetDataSource='" + targetDataSource + '\'' +
+ ", targetTable='" + targetTable + '\'' +
+ ", targetTableType='" + targetTableType + '\'' +
+ ", targetHdfsPath='" + targetHdfsPath + '\'' +
+ ", sourceTasks=" + sourceTasks +
+ ", writeTasks=" + writeTasks +
+ ", writeOperation='" + writeOperation + '\'' +
+ ", writeTaskMaxMemory=" + writeTaskMaxMemory +
+ ", writeBatchSize=" + writeBatchSize +
+ ", writeRateLimit=" + writeRateLimit +
+ ", bucketIndexNumber=" + bucketIndexNumber +
+ ", compactionStrategy='" + compactionStrategy + '\'' +
+ ", compactionTasks=" + compactionTasks +
+ ", compactionDeltaCommits=" + compactionDeltaCommits +
+ ", compactionDeltaSeconds=" + compactionDeltaSeconds +
+ ", compactionAsyncEnabled='" + compactionAsyncEnabled + '\'' +
+ ", compactionMaxMemory=" + compactionMaxMemory +
+ ", configs='" + configs + '\'' +
+ ", keepFileVersion=" + keepFileVersion +
+ ", keepCommitVersion=" + keepCommitVersion +
+ '}';
+ }
+
+ public static final class Builder {
+ private String targetDataSource;
+ private String targetTable;
+ private String targetTableType;
+ private String targetHdfsPath;
+ private Integer sourceTasks;
+ private Integer writeTasks;
+ private String writeOperation;
+ private Integer writeTaskMaxMemory;
+ private Integer writeBatchSize;
+ private Integer writeRateLimit;
+ private Integer bucketIndexNumber;
+ private String compactionStrategy;
+ private Integer compactionTasks;
+ private Integer compactionDeltaCommits;
+ private Integer compactionDeltaSeconds;
+ private String compactionAsyncEnabled;
+ private Integer compactionMaxMemory;
+ private String configs;
+ private Integer keepFileVersion;
+ private Integer keepCommitVersion;
+
+ private Builder() {
+ }
+
+ public Builder targetDataSource(String targetDataSource) {
+ this.targetDataSource = targetDataSource;
+ return this;
+ }
+
+ public Builder targetTable(String targetTable) {
+ this.targetTable = targetTable;
+ return this;
+ }
+
+ public Builder targetTableType(String targetTableType) {
+ this.targetTableType = targetTableType;
+ return this;
+ }
+
+ public Builder targetHdfsPath(String targetHdfsPath) {
+ this.targetHdfsPath = targetHdfsPath;
+ return this;
+ }
+
+ public Builder sourceTasks(Integer sourceTasks) {
+ this.sourceTasks = sourceTasks;
+ return this;
+ }
+
+ public Builder writeTasks(Integer writeTasks) {
+ this.writeTasks = writeTasks;
+ return this;
+ }
+
+ public Builder writeOperation(String writeOperation) {
+ this.writeOperation = writeOperation;
+ return this;
+ }
+
+ public Builder writeTaskMaxMemory(Integer writeTaskMaxMemory) {
+ this.writeTaskMaxMemory = writeTaskMaxMemory;
+ return this;
+ }
+
+ public Builder writeBatchSize(Integer writeBatchSize) {
+ this.writeBatchSize = writeBatchSize;
+ return this;
+ }
+
+ public Builder writeRateLimit(Integer writeRateLimit) {
+ this.writeRateLimit = writeRateLimit;
+ return this;
+ }
+
+ public Builder bucketIndexNumber(Integer bucketIndexNumber) {
+ this.bucketIndexNumber = bucketIndexNumber;
+ return this;
+ }
+
+ public Builder compactionStrategy(String compactionStrategy) {
+ this.compactionStrategy = compactionStrategy;
+ return this;
+ }
+
+ public Builder compactionTasks(Integer compactionTasks) {
+ this.compactionTasks = compactionTasks;
+ return this;
+ }
+
+ public Builder compactionDeltaCommits(Integer compactionDeltaCommits) {
+ this.compactionDeltaCommits = compactionDeltaCommits;
+ return this;
+ }
+
+ public Builder compactionDeltaSeconds(Integer compactionDeltaSeconds) {
+ this.compactionDeltaSeconds = compactionDeltaSeconds;
+ return this;
+ }
+
+ public Builder compactionAsyncEnabled(String compactionAsyncEnabled) {
+ this.compactionAsyncEnabled = compactionAsyncEnabled;
+ return this;
+ }
+
+ public Builder compactionMaxMemory(Integer compactionMaxMemory) {
+ this.compactionMaxMemory = compactionMaxMemory;
+ return this;
+ }
+
+ public Builder configs(String configs) {
+ this.configs = configs;
+ return this;
+ }
+
+ public Builder keepFileVersion(Integer keepFileVersion) {
+ this.keepFileVersion = keepFileVersion;
+ return this;
+ }
+
+ public Builder keepCommitVersion(Integer keepCommitVersion) {
+ this.keepCommitVersion = keepCommitVersion;
+ return this;
+ }
+
+ public HudiMeta build() {
+ return new HudiMeta(this);
+ }
+ }
+ }
+
+ public static final class YarnMeta implements Serializable {
+ private Integer jobManagerMemory;
+ private Integer taskManagerMemory;
+
+ public YarnMeta() {
+ }
+
+ public YarnMeta(Builder builder) {
+ this.jobManagerMemory = builder.jobManagerMemory;
+ this.taskManagerMemory = builder.taskManagerMemory;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ @Override
+ public String toString() {
+ return "YarnMeta{" + "jobManagerMemory=" + jobManagerMemory + ", taskManagerMemory=" + taskManagerMemory + '}';
+ }
+
+ public Integer getJobManagerMemory() {
+ return jobManagerMemory;
+ }
+
+ public YarnMeta setJobManagerMemory(Integer jobManagerMemory) {
+ this.jobManagerMemory = jobManagerMemory;
+ return this;
+ }
+
+ public Integer getTaskManagerMemory() {
+ return taskManagerMemory;
+ }
+
+ public YarnMeta setTaskManagerMemory(Integer taskManagerMemory) {
+ this.taskManagerMemory = taskManagerMemory;
+ return this;
+ }
+
+ public static final class Builder {
+ private Integer jobManagerMemory;
+ private Integer taskManagerMemory;
+
+ private Builder() {
+ }
+
+ public Builder jobManagerMemory(Integer jobManagerMemory) {
+ this.jobManagerMemory = jobManagerMemory;
+ return this;
+ }
+
+ public Builder taskManagerMemory(Integer taskManagerMemory) {
+ this.taskManagerMemory = taskManagerMemory;
+ return this;
+ }
+
+ public YarnMeta build() {
+ return new YarnMeta(this);
+ }
+ }
+ }
+
+ public static final class ConfigMeta implements Serializable {
+ private String messageId;
+ private String metricPublishUrl;
+ private String metricPrometheusUrl;
+ private String metricApiUrl;
+ private Integer metricPublishDelay;
+ private Integer metricPublishPeriod;
+ private Integer metricPublishTimeout;
+ private Integer metricPublishBatch;
+ private String checkpointRootPath;
+ private String zookeeperUrl;
+
+ public ConfigMeta() {
+ }
+
+ public ConfigMeta(Builder builder) {
+ this.messageId = builder.messageId;
+ this.metricPublishUrl = builder.metricPublishUrl;
+ this.metricPrometheusUrl = builder.metricPrometheusUrl;
+ this.metricApiUrl = builder.metricApiUrl;
+ this.metricPublishDelay = builder.metricPublishDelay;
+ this.metricPublishPeriod = builder.metricPublishPeriod;
+ this.metricPublishTimeout = builder.metricPublishTimeout;
+ this.metricPublishBatch = builder.metricPublishBatch;
+ this.checkpointRootPath = builder.checkpointRootPath;
+ this.zookeeperUrl = builder.zookeeperUrl;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public String getMessageId() {
+ return messageId;
+ }
+
+ public void setMessageId(String messageId) {
+ this.messageId = messageId;
+ }
+
+ public String getMetricPublishUrl() {
+ return metricPublishUrl;
+ }
+
+ public void setMetricPublishUrl(String metricPublishUrl) {
+ this.metricPublishUrl = metricPublishUrl;
+ }
+
+ public String getMetricPrometheusUrl() {
+ return metricPrometheusUrl;
+ }
+
+ public void setMetricPrometheusUrl(String metricPrometheusUrl) {
+ this.metricPrometheusUrl = metricPrometheusUrl;
+ }
+
+ public String getMetricApiUrl() {
+ return metricApiUrl;
+ }
+
+ public void setMetricApiUrl(String metricApiUrl) {
+ this.metricApiUrl = metricApiUrl;
+ }
+
+ public Integer getMetricPublishDelay() {
+ return metricPublishDelay;
+ }
+
+ public void setMetricPublishDelay(Integer metricPublishDelay) {
+ this.metricPublishDelay = metricPublishDelay;
+ }
+
+ public Integer getMetricPublishPeriod() {
+ return metricPublishPeriod;
+ }
+
+ public void setMetricPublishPeriod(Integer metricPublishPeriod) {
+ this.metricPublishPeriod = metricPublishPeriod;
+ }
+
+ public Integer getMetricPublishTimeout() {
+ return metricPublishTimeout;
+ }
+
+ public void setMetricPublishTimeout(Integer metricPublishTimeout) {
+ this.metricPublishTimeout = metricPublishTimeout;
+ }
+
+ public Integer getMetricPublishBatch() {
+ return metricPublishBatch;
+ }
+
+ public void setMetricPublishBatch(Integer metricPublishBatch) {
+ this.metricPublishBatch = metricPublishBatch;
+ }
+
+ public String getCheckpointRootPath() {
+ return checkpointRootPath;
+ }
+
+ public void setCheckpointRootPath(String checkpointRootPath) {
+ this.checkpointRootPath = checkpointRootPath;
+ }
+
+ public String getZookeeperUrl() {
+ return zookeeperUrl;
+ }
+
+ public void setZookeeperUrl(String zookeeperUrl) {
+ this.zookeeperUrl = zookeeperUrl;
+ }
+
+ @Override
+ public String toString() {
+ return "ConfigMeta{" +
+ "messageId='" + messageId + '\'' +
+ ", metricPublishUrl='" + metricPublishUrl + '\'' +
+ ", metricPrometheusUrl='" + metricPrometheusUrl + '\'' +
+ ", metricApiUrl='" + metricApiUrl + '\'' +
+ ", metricPublishDelay=" + metricPublishDelay +
+ ", metricPublishPeriod=" + metricPublishPeriod +
+ ", metricPublishTimeout=" + metricPublishTimeout +
+ ", metricPublishBatch=" + metricPublishBatch +
+ ", checkpointRootPath='" + checkpointRootPath + '\'' +
+ ", zookeeperUrl='" + zookeeperUrl + '\'' +
+ '}';
+ }
+
+ public static final class Builder {
+ private String messageId;
+ private String metricPublishUrl;
+ private String metricPrometheusUrl;
+ private String metricApiUrl;
+ private Integer metricPublishDelay;
+ private Integer metricPublishPeriod;
+ private Integer metricPublishTimeout;
+ private Integer metricPublishBatch;
+ private String checkpointRootPath;
+ private String zookeeperUrl;
+
+ private Builder() {
+ }
+
+ public Builder messageId(String messageId) {
+ this.messageId = messageId;
+ return this;
+ }
+
+ public Builder metricPublishUrl(String metricPublishUrl) {
+ this.metricPublishUrl = metricPublishUrl;
+ return this;
+ }
+
+ public Builder metricPrometheusUrl(String metricPrometheusUrl) {
+ this.metricPrometheusUrl = metricPrometheusUrl;
+ return this;
+ }
+
+ public Builder metricApiUrl(String metricApiUrl) {
+ this.metricApiUrl = metricApiUrl;
+ return this;
+ }
+
+ public Builder metricPublishDelay(Integer metricPublishDelay) {
+ this.metricPublishDelay = metricPublishDelay;
+ return this;
+ }
+
+ public Builder metricPublishPeriod(Integer metricPublishPeriod) {
+ this.metricPublishPeriod = metricPublishPeriod;
+ return this;
+ }
+
+ public Builder metricPublishTimeout(Integer metricPublishTimeout) {
+ this.metricPublishTimeout = metricPublishTimeout;
+ return this;
+ }
+
+ public Builder metricPublishBatch(Integer metricPublishBatch) {
+ this.metricPublishBatch = metricPublishBatch;
+ return this;
+ }
+
+ public Builder checkpointRootPath(String checkpointRootPath) {
+ this.checkpointRootPath = checkpointRootPath;
+ return this;
+ }
+
+ public Builder zookeeperUrl(String zookeeperUrl) {
+ this.zookeeperUrl = zookeeperUrl;
+ return this;
+ }
+
+ public ConfigMeta build() {
+ return new ConfigMeta(this);
+ }
+ }
+ }
+
+ public static final class JobMeta implements Serializable {
+ private Long id;
+ private String name;
+
+ public JobMeta() {
+ }
+
+ public JobMeta(Builder builder) {
+ this.id = builder.id;
+ this.name = builder.name;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public Long getId() {
+ return id;
+ }
+
+ public void setId(Long id) {
+ this.id = id;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ @Override
+ public String toString() {
+ return "JobMeta{" +
+ "id=" + id +
+ ", name='" + name + '\'' +
+ '}';
+ }
+
+ public static final class Builder {
+ private Long id;
+ private String name;
+
+ private Builder() {
+ }
+
+ public Builder id(Long id) {
+ this.id = id;
+ return this;
+ }
+
+ public Builder name(String name) {
+ this.name = name;
+ return this;
+ }
+
+ public JobMeta build() {
+ return new JobMeta(this);
+ }
+ }
+ }
+
+ public static final class RowMeta implements Serializable {
+ private String dsName;
+ private String schemaName;
+ private String tableName;
+ private String tableType;
+ private String fieldName;
+ private Integer fieldSeq;
+ private String fieldType;
+ private String primaryKey;
+ private String partitionKey;
+ private Long length;
+ private String tgtDb;
+ private String tgtTable;
+ private String tgtTableType;
+ private String tgtHdfsPath;
+ private Integer writeTasks;
+ private String writeOperation;
+ private Integer writeTaskMaxMemory;
+ private Integer writeBatchSize;
+ private Integer writeRateLimit;
+ private Integer bucketIndexNumber;
+ private String compactionStrategy;
+ private Integer compactionTasks;
+ private Integer compactionDeltaCommits;
+ private Integer compactionDeltaSeconds;
+ private String compactionAsyncEnabled;
+ private Integer compactionMaxMemory;
+ private String configs;
+ private String filterField;
+ private String filterValues;
+ private String filterType;
+ private String topic;
+ private String pulsarAddress;
+ private Integer syncJobManagerMemory;
+ private Integer syncTaskManagerMemory;
+ private Integer compactionJobManagerMemory;
+ private Integer compactionTaskManagerMemory;
+ private String partitionField;
+ private String messageId;
+ private String metricPublishUrl;
+ private String metricPrometheusUrl;
+ private String metricApiUrl;
+ private Integer metricPublishDelay;
+ private Integer metricPublishPeriod;
+ private Integer metricPublishTimeout;
+ private Integer metricPublishBatch;
+ private Long jobId;
+ private String jobName;
+ private String checkpointRootPath;
+ private Integer sourceTasks;
+ private String alias;
+ private String connection;
+ private Integer priority;
+ private String sourceType;
+ private Integer keepFileVersion;
+ private Integer keepCommitVersion;
+ private String tags;
+ private String zookeeperUrl;
+ private Integer version;
+ private Integer scala;
+
+ public RowMeta() {
+ }
+
+ public RowMeta(Builder builder) {
+ this.dsName = builder.dsName;
+ this.schemaName = builder.schemaName;
+ this.tableName = builder.tableName;
+ this.tableType = builder.tableType;
+ this.fieldName = builder.fieldName;
+ this.fieldSeq = builder.fieldSeq;
+ this.fieldType = builder.fieldType;
+ this.primaryKey = builder.primaryKey;
+ this.partitionKey = builder.partitionKey;
+ this.length = builder.length;
+ this.tgtDb = builder.tgtDb;
+ this.tgtTable = builder.tgtTable;
+ this.tgtTableType = builder.tgtTableType;
+ this.tgtHdfsPath = builder.tgtHdfsPath;
+ this.writeTasks = builder.writeTasks;
+ this.writeOperation = builder.writeOperation;
+ this.writeTaskMaxMemory = builder.writeTaskMaxMemory;
+ this.writeBatchSize = builder.writeBatchSize;
+ this.writeRateLimit = builder.writeRateLimit;
+ this.bucketIndexNumber = builder.bucketIndexNumber;
+ this.compactionStrategy = builder.compactionStrategy;
+ this.compactionTasks = builder.compactionTasks;
+ this.compactionDeltaCommits = builder.compactionDeltaCommits;
+ this.compactionDeltaSeconds = builder.compactionDeltaSeconds;
+ this.compactionAsyncEnabled = builder.compactionAsyncEnabled;
+ this.compactionMaxMemory = builder.compactionMaxMemory;
+ this.configs = builder.configs;
+ this.filterField = builder.filterField;
+ this.filterValues = builder.filterValues;
+ this.filterType = builder.filterType;
+ this.topic = builder.topic;
+ this.pulsarAddress = builder.pulsarAddress;
+ this.syncJobManagerMemory = builder.syncJobManagerMemory;
+ this.syncTaskManagerMemory = builder.syncTaskManagerMemory;
+ this.compactionJobManagerMemory = builder.compactionJobManagerMemory;
+ this.compactionTaskManagerMemory = builder.compactionTaskManagerMemory;
+ this.partitionField = builder.partitionField;
+ this.messageId = builder.messageId;
+ this.metricPublishUrl = builder.metricPublishUrl;
+ this.metricPrometheusUrl = builder.metricPrometheusUrl;
+ this.metricApiUrl = builder.metricApiUrl;
+ this.metricPublishDelay = builder.metricPublishDelay;
+ this.metricPublishPeriod = builder.metricPublishPeriod;
+ this.metricPublishTimeout = builder.metricPublishTimeout;
+ this.metricPublishBatch = builder.metricPublishBatch;
+ this.jobId = builder.jobId;
+ this.jobName = builder.jobName;
+ this.checkpointRootPath = builder.checkpointRootPath;
+ this.sourceTasks = builder.sourceTasks;
+ this.alias = builder.alias;
+ this.connection = builder.connection;
+ this.priority = builder.priority;
+ this.sourceType = builder.sourceType;
+ this.keepFileVersion = builder.keepFileVersion;
+ this.keepCommitVersion = builder.keepCommitVersion;
+ this.tags = builder.tags;
+ this.zookeeperUrl = builder.zookeeperUrl;
+ this.version = builder.version;
+ this.scala = builder.scala;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public String getDsName() {
+ return dsName;
+ }
+
+ public void setDsName(String dsName) {
+ this.dsName = dsName;
+ }
+
+ public String getSchemaName() {
+ return schemaName;
+ }
+
+ public void setSchemaName(String schemaName) {
+ this.schemaName = schemaName;
+ }
+
+ public String getTableName() {
+ return tableName;
+ }
+
+ public void setTableName(String tableName) {
+ this.tableName = tableName;
+ }
+
+ public String getTableType() {
+ return tableType;
+ }
+
+ public void setTableType(String tableType) {
+ this.tableType = tableType;
+ }
+
+ public String getFieldName() {
+ return fieldName;
+ }
+
+ public void setFieldName(String fieldName) {
+ this.fieldName = fieldName;
+ }
+
+ public Integer getFieldSeq() {
+ return fieldSeq;
+ }
+
+ public void setFieldSeq(Integer fieldSeq) {
+ this.fieldSeq = fieldSeq;
+ }
+
+ public String getFieldType() {
+ return fieldType;
+ }
+
+ public void setFieldType(String fieldType) {
+ this.fieldType = fieldType;
+ }
+
+ public String getPrimaryKey() {
+ return primaryKey;
+ }
+
+ public void setPrimaryKey(String primaryKey) {
+ this.primaryKey = primaryKey;
+ }
+
+ public String getPartitionKey() {
+ return partitionKey;
+ }
+
+ public void setPartitionKey(String partitionKey) {
+ this.partitionKey = partitionKey;
+ }
+
+ public Long getLength() {
+ return length;
+ }
+
+ public void setLength(Long length) {
+ this.length = length;
+ }
+
+ public String getTgtDb() {
+ return tgtDb;
+ }
+
+ public void setTgtDb(String tgtDb) {
+ this.tgtDb = tgtDb;
+ }
+
+ public String getTgtTable() {
+ return tgtTable;
+ }
+
+ public void setTgtTable(String tgtTable) {
+ this.tgtTable = tgtTable;
+ }
+
+ public String getTgtTableType() {
+ return tgtTableType;
+ }
+
+ public void setTgtTableType(String tgtTableType) {
+ this.tgtTableType = tgtTableType;
+ }
+
+ public String getTgtHdfsPath() {
+ return tgtHdfsPath;
+ }
+
+ public void setTgtHdfsPath(String tgtHdfsPath) {
+ this.tgtHdfsPath = tgtHdfsPath;
+ }
+
+ public Integer getWriteTasks() {
+ return writeTasks;
+ }
+
+ public void setWriteTasks(Integer writeTasks) {
+ this.writeTasks = writeTasks;
+ }
+
+ public String getWriteOperation() {
+ return writeOperation;
+ }
+
+ public void setWriteOperation(String writeOperation) {
+ this.writeOperation = writeOperation;
+ }
+
+ public Integer getWriteTaskMaxMemory() {
+ return writeTaskMaxMemory;
+ }
+
+ public void setWriteTaskMaxMemory(Integer writeTaskMaxMemory) {
+ this.writeTaskMaxMemory = writeTaskMaxMemory;
+ }
+
+ public Integer getWriteBatchSize() {
+ return writeBatchSize;
+ }
+
+ public void setWriteBatchSize(Integer writeBatchSize) {
+ this.writeBatchSize = writeBatchSize;
+ }
+
+ public Integer getWriteRateLimit() {
+ return writeRateLimit;
+ }
+
+ public void setWriteRateLimit(Integer writeRateLimit) {
+ this.writeRateLimit = writeRateLimit;
+ }
+
+ public Integer getBucketIndexNumber() {
+ return bucketIndexNumber;
+ }
+
+ public void setBucketIndexNumber(Integer bucketIndexNumber) {
+ this.bucketIndexNumber = bucketIndexNumber;
+ }
+
+ public String getCompactionStrategy() {
+ return compactionStrategy;
+ }
+
+ public void setCompactionStrategy(String compactionStrategy) {
+ this.compactionStrategy = compactionStrategy;
+ }
+
+ public Integer getCompactionTasks() {
+ return compactionTasks;
+ }
+
+ public void setCompactionTasks(Integer compactionTasks) {
+ this.compactionTasks = compactionTasks;
+ }
+
+ public Integer getCompactionDeltaCommits() {
+ return compactionDeltaCommits;
+ }
+
+ public void setCompactionDeltaCommits(Integer compactionDeltaCommits) {
+ this.compactionDeltaCommits = compactionDeltaCommits;
+ }
+
+ public Integer getCompactionDeltaSeconds() {
+ return compactionDeltaSeconds;
+ }
+
+ public void setCompactionDeltaSeconds(Integer compactionDeltaSeconds) {
+ this.compactionDeltaSeconds = compactionDeltaSeconds;
+ }
+
+ public String getCompactionAsyncEnabled() {
+ return compactionAsyncEnabled;
+ }
+
+ public void setCompactionAsyncEnabled(String compactionAsyncEnabled) {
+ this.compactionAsyncEnabled = compactionAsyncEnabled;
+ }
+
+ public Integer getCompactionMaxMemory() {
+ return compactionMaxMemory;
+ }
+
+ public void setCompactionMaxMemory(Integer compactionMaxMemory) {
+ this.compactionMaxMemory = compactionMaxMemory;
+ }
+
+ public String getConfigs() {
+ return configs;
+ }
+
+ public void setConfigs(String configs) {
+ this.configs = configs;
+ }
+
+ public String getFilterField() {
+ return filterField;
+ }
+
+ public void setFilterField(String filterField) {
+ this.filterField = filterField;
+ }
+
+ public String getFilterValues() {
+ return filterValues;
+ }
+
+ public void setFilterValues(String filterValues) {
+ this.filterValues = filterValues;
+ }
+
+ public String getFilterType() {
+ return filterType;
+ }
+
+ public void setFilterType(String filterType) {
+ this.filterType = filterType;
+ }
+
+ public String getTopic() {
+ return topic;
+ }
+
+ public void setTopic(String topic) {
+ this.topic = topic;
+ }
+
+ public String getPulsarAddress() {
+ return pulsarAddress;
+ }
+
+ public void setPulsarAddress(String pulsarAddress) {
+ this.pulsarAddress = pulsarAddress;
+ }
+
+ public Integer getSyncJobManagerMemory() {
+ return syncJobManagerMemory;
+ }
+
+ public void setSyncJobManagerMemory(Integer syncJobManagerMemory) {
+ this.syncJobManagerMemory = syncJobManagerMemory;
+ }
+
+ public Integer getSyncTaskManagerMemory() {
+ return syncTaskManagerMemory;
+ }
+
+ public void setSyncTaskManagerMemory(Integer syncTaskManagerMemory) {
+ this.syncTaskManagerMemory = syncTaskManagerMemory;
+ }
+
+ public Integer getCompactionJobManagerMemory() {
+ return compactionJobManagerMemory;
+ }
+
+ public void setCompactionJobManagerMemory(Integer compactionJobManagerMemory) {
+ this.compactionJobManagerMemory = compactionJobManagerMemory;
+ }
+
+ public Integer getCompactionTaskManagerMemory() {
+ return compactionTaskManagerMemory;
+ }
+
+ public void setCompactionTaskManagerMemory(Integer compactionTaskManagerMemory) {
+ this.compactionTaskManagerMemory = compactionTaskManagerMemory;
+ }
+
+ public String getPartitionField() {
+ return partitionField;
+ }
+
+ public void setPartitionField(String partitionField) {
+ this.partitionField = partitionField;
+ }
+
+ public String getMessageId() {
+ return messageId;
+ }
+
+ public void setMessageId(String messageId) {
+ this.messageId = messageId;
+ }
+
+ public String getMetricPublishUrl() {
+ return metricPublishUrl;
+ }
+
+ public void setMetricPublishUrl(String metricPublishUrl) {
+ this.metricPublishUrl = metricPublishUrl;
+ }
+
+ public String getMetricPrometheusUrl() {
+ return metricPrometheusUrl;
+ }
+
+ public void setMetricPrometheusUrl(String metricPrometheusUrl) {
+ this.metricPrometheusUrl = metricPrometheusUrl;
+ }
+
+ public String getMetricApiUrl() {
+ return metricApiUrl;
+ }
+
+ public void setMetricApiUrl(String metricApiUrl) {
+ this.metricApiUrl = metricApiUrl;
+ }
+
+ public Integer getMetricPublishDelay() {
+ return metricPublishDelay;
+ }
+
+ public void setMetricPublishDelay(Integer metricPublishDelay) {
+ this.metricPublishDelay = metricPublishDelay;
+ }
+
+ public Integer getMetricPublishPeriod() {
+ return metricPublishPeriod;
+ }
+
+ public void setMetricPublishPeriod(Integer metricPublishPeriod) {
+ this.metricPublishPeriod = metricPublishPeriod;
+ }
+
+ public Integer getMetricPublishTimeout() {
+ return metricPublishTimeout;
+ }
+
+ public void setMetricPublishTimeout(Integer metricPublishTimeout) {
+ this.metricPublishTimeout = metricPublishTimeout;
+ }
+
+ public Integer getMetricPublishBatch() {
+ return metricPublishBatch;
+ }
+
+ public void setMetricPublishBatch(Integer metricPublishBatch) {
+ this.metricPublishBatch = metricPublishBatch;
+ }
+
+ public Long getJobId() {
+ return jobId;
+ }
+
+ public void setJobId(Long jobId) {
+ this.jobId = jobId;
+ }
+
+ public String getJobName() {
+ return jobName;
+ }
+
+ public void setJobName(String jobName) {
+ this.jobName = jobName;
+ }
+
+ public String getCheckpointRootPath() {
+ return checkpointRootPath;
+ }
+
+ public void setCheckpointRootPath(String checkpointRootPath) {
+ this.checkpointRootPath = checkpointRootPath;
+ }
+
+ public Integer getSourceTasks() {
+ return sourceTasks;
+ }
+
+ public void setSourceTasks(Integer sourceTasks) {
+ this.sourceTasks = sourceTasks;
+ }
+
+ public String getAlias() {
+ return alias;
+ }
+
+ public void setAlias(String alias) {
+ this.alias = alias;
+ }
+
+ public String getConnection() {
+ return connection;
+ }
+
+ public void setConnection(String connection) {
+ this.connection = connection;
+ }
+
+ public Integer getPriority() {
+ return priority;
+ }
+
+ public void setPriority(Integer priority) {
+ this.priority = priority;
+ }
+
+ public String getSourceType() {
+ return sourceType;
+ }
+
+ public void setSourceType(String sourceType) {
+ this.sourceType = sourceType;
+ }
+
+ public Integer getKeepFileVersion() {
+ return keepFileVersion;
+ }
+
+ public void setKeepFileVersion(Integer keepFileVersion) {
+ this.keepFileVersion = keepFileVersion;
+ }
+
+ public Integer getKeepCommitVersion() {
+ return keepCommitVersion;
+ }
+
+ public void setKeepCommitVersion(Integer keepCommitVersion) {
+ this.keepCommitVersion = keepCommitVersion;
+ }
+
+ public String getTags() {
+ return tags;
+ }
+
+ public void setTags(String tags) {
+ this.tags = tags;
+ }
+
+ public String getZookeeperUrl() {
+ return zookeeperUrl;
+ }
+
+ public void setZookeeperUrl(String zookeeperUrl) {
+ this.zookeeperUrl = zookeeperUrl;
+ }
+
+ public Integer getVersion() {
+ return version;
+ }
+
+ public void setVersion(Integer version) {
+ this.version = version;
+ }
+
+ public Integer getScala() {
+ return scala;
+ }
+
+ public void setScala(Integer scala) {
+ this.scala = scala;
+ }
+
+ public static final class Builder {
+ private String dsName;
+ private String schemaName;
+ private String tableName;
+ private String tableType;
+ private String fieldName;
+ private Integer fieldSeq;
+ private String fieldType;
+ private String primaryKey;
+ private String partitionKey;
+ private Long length;
+ private String tgtDb;
+ private String tgtTable;
+ private String tgtTableType;
+ private String tgtHdfsPath;
+ private Integer writeTasks;
+ private String writeOperation;
+ private Integer writeTaskMaxMemory;
+ private Integer writeBatchSize;
+ private Integer writeRateLimit;
+ private Integer bucketIndexNumber;
+ private String compactionStrategy;
+ private Integer compactionTasks;
+ private Integer compactionDeltaCommits;
+ private Integer compactionDeltaSeconds;
+ private String compactionAsyncEnabled;
+ private Integer compactionMaxMemory;
+ private String configs;
+ private String filterField;
+ private String filterValues;
+ private String filterType;
+ private String topic;
+ private String pulsarAddress;
+ private Integer syncJobManagerMemory;
+ private Integer syncTaskManagerMemory;
+ private Integer compactionJobManagerMemory;
+ private Integer compactionTaskManagerMemory;
+ private String partitionField;
+ private String messageId;
+ private String metricPublishUrl;
+ private String metricPrometheusUrl;
+ private String metricApiUrl;
+ private Integer metricPublishDelay;
+ private Integer metricPublishPeriod;
+ private Integer metricPublishTimeout;
+ private Integer metricPublishBatch;
+ private Long jobId;
+ private String jobName;
+ private String checkpointRootPath;
+ private Integer sourceTasks;
+ private String alias;
+ private String connection;
+ private Integer priority;
+ private String sourceType;
+ private Integer keepFileVersion;
+ private Integer keepCommitVersion;
+ private String tags;
+ private String zookeeperUrl;
+ private Integer version;
+ private Integer scala;
+
+ private Builder() {
+ }
+
+ public Builder dsName(String dsName) {
+ this.dsName = dsName;
+ return this;
+ }
+
+ public Builder schemaName(String schemaName) {
+ this.schemaName = schemaName;
+ return this;
+ }
+
+ public Builder tableName(String tableName) {
+ this.tableName = tableName;
+ return this;
+ }
+
+ public Builder tableType(String tableType) {
+ this.tableType = tableType;
+ return this;
+ }
+
+ public Builder fieldName(String fieldName) {
+ this.fieldName = fieldName;
+ return this;
+ }
+
+ public Builder fieldSeq(Integer fieldSeq) {
+ this.fieldSeq = fieldSeq;
+ return this;
+ }
+
+ public Builder fieldType(String fieldType) {
+ this.fieldType = fieldType;
+ return this;
+ }
+
+ public Builder primaryKey(String primaryKey) {
+ this.primaryKey = primaryKey;
+ return this;
+ }
+
+ public Builder partitionKey(String partitionKey) {
+ this.partitionKey = partitionKey;
+ return this;
+ }
+
+ public Builder length(Long length) {
+ this.length = length;
+ return this;
+ }
+
+ public Builder tgtDb(String tgtDb) {
+ this.tgtDb = tgtDb;
+ return this;
+ }
+
+ public Builder tgtTable(String tgtTable) {
+ this.tgtTable = tgtTable;
+ return this;
+ }
+
+ public Builder tgtTableType(String tgtTableType) {
+ this.tgtTableType = tgtTableType;
+ return this;
+ }
+
+ public Builder tgtHdfsPath(String tgtHdfsPath) {
+ this.tgtHdfsPath = tgtHdfsPath;
+ return this;
+ }
+
+ public Builder writeTasks(Integer writeTasks) {
+ this.writeTasks = writeTasks;
+ return this;
+ }
+
+ public Builder writeOperation(String writeOperation) {
+ this.writeOperation = writeOperation;
+ return this;
+ }
+
+ public Builder writeTaskMaxMemory(Integer writeTaskMaxMemory) {
+ this.writeTaskMaxMemory = writeTaskMaxMemory;
+ return this;
+ }
+
+ public Builder writeBatchSize(Integer writeBatchSize) {
+ this.writeBatchSize = writeBatchSize;
+ return this;
+ }
+
+ public Builder writeRateLimit(Integer writeRateLimit) {
+ this.writeRateLimit = writeRateLimit;
+ return this;
+ }
+
+ public Builder bucketIndexNumber(Integer bucketIndexNumber) {
+ this.bucketIndexNumber = bucketIndexNumber;
+ return this;
+ }
+
+ public Builder compactionStrategy(String compactionStrategy) {
+ this.compactionStrategy = compactionStrategy;
+ return this;
+ }
+
+ public Builder compactionTasks(Integer compactionTasks) {
+ this.compactionTasks = compactionTasks;
+ return this;
+ }
+
+ public Builder compactionDeltaCommits(Integer compactionDeltaCommits) {
+ this.compactionDeltaCommits = compactionDeltaCommits;
+ return this;
+ }
+
+ public Builder compactionDeltaSeconds(Integer compactionDeltaSeconds) {
+ this.compactionDeltaSeconds = compactionDeltaSeconds;
+ return this;
+ }
+
+ public Builder compactionAsyncEnabled(String compactionAsyncEnabled) {
+ this.compactionAsyncEnabled = compactionAsyncEnabled;
+ return this;
+ }
+
+ public Builder compactionMaxMemory(Integer compactionMaxMemory) {
+ this.compactionMaxMemory = compactionMaxMemory;
+ return this;
+ }
+
+ public Builder configs(String configs) {
+ this.configs = configs;
+ return this;
+ }
+
+ public Builder filterField(String filterField) {
+ this.filterField = filterField;
+ return this;
+ }
+
+ public Builder filterValues(String filterValues) {
+ this.filterValues = filterValues;
+ return this;
+ }
+
+ public Builder filterType(String filterType) {
+ this.filterType = filterType;
+ return this;
+ }
+
+ public Builder topic(String topic) {
+ this.topic = topic;
+ return this;
+ }
+
+ public Builder pulsarAddress(String pulsarAddress) {
+ this.pulsarAddress = pulsarAddress;
+ return this;
+ }
+
+ public Builder syncJobManagerMemory(Integer syncJobManagerMemory) {
+ this.syncJobManagerMemory = syncJobManagerMemory;
+ return this;
+ }
+
+ public Builder syncTaskManagerMemory(Integer syncTaskManagerMemory) {
+ this.syncTaskManagerMemory = syncTaskManagerMemory;
+ return this;
+ }
+
+ public Builder compactionJobManagerMemory(Integer compactionJobManagerMemory) {
+ this.compactionJobManagerMemory = compactionJobManagerMemory;
+ return this;
+ }
+
+ public Builder compactionTaskManagerMemory(Integer compactionTaskManagerMemory) {
+ this.compactionTaskManagerMemory = compactionTaskManagerMemory;
+ return this;
+ }
+
+ public Builder partitionField(String partitionField) {
+ this.partitionField = partitionField;
+ return this;
+ }
+
+ public Builder messageId(String messageId) {
+ this.messageId = messageId;
+ return this;
+ }
+
+ public Builder metricPublishUrl(String metricPublishUrl) {
+ this.metricPublishUrl = metricPublishUrl;
+ return this;
+ }
+
+ public Builder metricPrometheusUrl(String metricPrometheusUrl) {
+ this.metricPrometheusUrl = metricPrometheusUrl;
+ return this;
+ }
+
+ public Builder metricApiUrl(String metricApiUrl) {
+ this.metricApiUrl = metricApiUrl;
+ return this;
+ }
+
+ public Builder metricPublishDelay(Integer metricPublishDelay) {
+ this.metricPublishDelay = metricPublishDelay;
+ return this;
+ }
+
+ public Builder metricPublishPeriod(Integer metricPublishPeriod) {
+ this.metricPublishPeriod = metricPublishPeriod;
+ return this;
+ }
+
+ public Builder metricPublishTimeout(Integer metricPublishTimeout) {
+ this.metricPublishTimeout = metricPublishTimeout;
+ return this;
+ }
+
+ public Builder metricPublishBatch(Integer metricPublishBatch) {
+ this.metricPublishBatch = metricPublishBatch;
+ return this;
+ }
+
+ public Builder jobId(Long jobId) {
+ this.jobId = jobId;
+ return this;
+ }
+
+ public Builder jobName(String jobName) {
+ this.jobName = jobName;
+ return this;
+ }
+
+ public Builder checkpointRootPath(String checkpointRootPath) {
+ this.checkpointRootPath = checkpointRootPath;
+ return this;
+ }
+
+ public Builder sourceTasks(Integer sourceTasks) {
+ this.sourceTasks = sourceTasks;
+ return this;
+ }
+
+ public Builder alias(String alias) {
+ this.alias = alias;
+ return this;
+ }
+
+ public Builder connection(String connection) {
+ this.connection = connection;
+ return this;
+ }
+
+ public Builder priority(Integer priority) {
+ this.priority = priority;
+ return this;
+ }
+
+ public Builder sourceType(String sourceType) {
+ this.sourceType = sourceType;
+ return this;
+ }
+
+ public Builder keepFileVersion(Integer keepFileVersion) {
+ this.keepFileVersion = keepFileVersion;
+ return this;
+ }
+
+ public Builder keepCommitVersion(Integer keepCommitVersion) {
+ this.keepCommitVersion = keepCommitVersion;
+ return this;
+ }
+
+ public Builder tags(String tags) {
+ this.tags = tags;
+ return this;
+ }
+
+ public Builder zookeeperUrl(String zookeeperUrl) {
+ this.zookeeperUrl = zookeeperUrl;
+ return this;
+ }
+
+ public Builder version(Integer version) {
+ this.version = version;
+ return this;
+ }
+
+ public Builder scala(Integer scala) {
+ this.scala = scala;
+ return this;
+ }
+
+ public RowMeta build() {
+ return new RowMeta(this);
+ }
+ }
+ }
+
+ public static final class ConnectionMeta implements Serializable {
+ /**
+ * {
+ * "jdbc_url": "8eWr854+ycQhBY8X/Ye/rzxxHBoTscQvLfACZ+8AczHONHl5Vaq92DpRzLDZVNY8seyvheBnS0co0FYC4+B5pFhJrK/ilTB5d9yFY5cOtzT3eAk7n/fEAGaaA/xbP0Ei9NqhgBTsT1UgVfT9j3JkLFtbw5RvCOmOGnOVxriAzI1Q0JALMjBAu9FSxkTg8QYL619rUQEovmL1EJsHejoUPie2VsYbUYI3MAnXBU8d80k5xLjRx+PgLTrk5o1ZERT8uWebhjNFoRhVVZr1hzllFMB2BeFBadLb+yJjQ5brgrQJb7uEhtP1pfG5+Wv0+a5DuFjkLPtOwnWDVPxu9N+jKgUTxuTzWbA5M3JIsH+zNo0J55B86rpiheFv3PhZxrt4RJTZwoh27SjsePtOAYQbmNeSt1zseBYnsH2BAbBlCXU=",
+ * "jdbc_driver": "oracle.jdbc.driver.OracleDriver",
+ * "jdbc_user": "lnmuI3MYb2eYSAXa+ZpodQ==",
+ * "jdbc_password": "N/RLVdGIVRCoBX9yfU//sg=="
+ * }
+ */
+ private String url;
+ private String user;
+ private String password;
+ private String driver;
+
+ public ConnectionMeta() {
+ }
+
+ public ConnectionMeta(Builder builder) {
+ this.url = builder.url;
+ this.user = builder.user;
+ this.password = builder.password;
+ this.driver = builder.driver;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public String getUrl() {
+ return url;
+ }
+
+ public void setUrl(String url) {
+ this.url = url;
+ }
+
+ public String getUser() {
+ return user;
+ }
+
+ public void setUser(String user) {
+ this.user = user;
+ }
+
+ public String getPassword() {
+ return password;
+ }
+
+ public void setPassword(String password) {
+ this.password = password;
+ }
+
+ public String getDriver() {
+ return driver;
+ }
+
+ public void setDriver(String driver) {
+ this.driver = driver;
+ }
+
+ @Override
+ public String toString() {
+ return "ConnectionMeta{" +
+ "url='" + url + '\'' +
+ ", user='" + user + '\'' +
+ ", password='" + password + '\'' +
+ ", driver='" + driver + '\'' +
+ '}';
+ }
+
+ public static final class Builder {
+ private String url;
+ private String user;
+ private String password;
+ private String driver;
+
+ private Builder() {
+ }
+
+ public Builder url(String url) {
+ this.url = url;
+ return this;
+ }
+
+ public Builder user(String user) {
+ this.user = user;
+ return this;
+ }
+
+ public Builder password(String password) {
+ this.password = password;
+ return this;
+ }
+
+ public Builder driver(String driver) {
+ this.driver = driver;
+ return this;
+ }
+
+ public ConnectionMeta build() {
+ return new ConnectionMeta(this);
+ }
+ }
+ }
+}
diff --git a/service-common/src/main/java/com/lanyuanxiaoyao/service/common/entity/compaction/ScheduleJob.java b/service-common/src/main/java/com/lanyuanxiaoyao/service/common/entity/compaction/ScheduleJob.java
new file mode 100644
index 0000000..aba5aa1
--- /dev/null
+++ b/service-common/src/main/java/com/lanyuanxiaoyao/service/common/entity/compaction/ScheduleJob.java
@@ -0,0 +1,144 @@
+package com.lanyuanxiaoyao.service.common.entity.compaction;
+
+/**
+ * 压缩调度任务
+ *
+ * @author ZhangJiacheng
+ * @date 2022-09-26
+ */
+public class ScheduleJob {
+ private String id;
+ private Long flinkJobId;
+ private String alias;
+ private String batch;
+ private String status;
+ private String comment;
+
+ public ScheduleJob() {
+ }
+
+ public ScheduleJob(String id, Long flinkJobId, String alias, String batch, String status, String comment) {
+ this.id = id;
+ this.flinkJobId = flinkJobId;
+ this.alias = alias;
+ this.batch = batch;
+ this.status = status;
+ this.comment = comment;
+ }
+
+ public ScheduleJob(Builder builder) {
+ this.id = builder.id;
+ this.flinkJobId = builder.flinkJobId;
+ this.alias = builder.alias;
+ this.batch = builder.batch;
+ this.status = builder.status;
+ this.comment = builder.comment;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public String getId() {
+ return id;
+ }
+
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ public Long getFlinkJobId() {
+ return flinkJobId;
+ }
+
+ public void setFlinkJobId(Long flinkJobId) {
+ this.flinkJobId = flinkJobId;
+ }
+
+ public String getAlias() {
+ return alias;
+ }
+
+ public void setAlias(String alias) {
+ this.alias = alias;
+ }
+
+ public String getBatch() {
+ return batch;
+ }
+
+ public void setBatch(String batch) {
+ this.batch = batch;
+ }
+
+ public String getStatus() {
+ return status;
+ }
+
+ public void setStatus(String status) {
+ this.status = status;
+ }
+
+ public String getComment() {
+ return comment;
+ }
+
+ public void setComment(String comment) {
+ this.comment = comment;
+ }
+
+ @Override
+ public String toString() {
+ return "ScheduleJob{" +
+ "id=" + id +
+ ", flinkJobId=" + flinkJobId +
+ ", alias='" + alias + '\'' +
+ '}';
+ }
+
+ public static final class Builder {
+ private String id;
+ private Long flinkJobId;
+ private String alias;
+ private String batch;
+ private String status;
+ private String comment;
+
+ private Builder() {
+ }
+
+ public Builder id(String id) {
+ this.id = id;
+ return this;
+ }
+
+ public Builder flinkJobId(Long flinkJobId) {
+ this.flinkJobId = flinkJobId;
+ return this;
+ }
+
+ public Builder alias(String alias) {
+ this.alias = alias;
+ return this;
+ }
+
+ public Builder batch(String batch) {
+ this.batch = batch;
+ return this;
+ }
+
+ public Builder status(String status) {
+ this.status = status;
+ return this;
+ }
+
+ public Builder comment(String comment) {
+ this.comment = comment;
+ return this;
+ }
+
+ public ScheduleJob build() {
+ return new ScheduleJob(this);
+ }
+ }
+}
diff --git a/service-common/src/main/java/com/lanyuanxiaoyao/service/common/entity/compaction/ScheduleQueue.java b/service-common/src/main/java/com/lanyuanxiaoyao/service/common/entity/compaction/ScheduleQueue.java
new file mode 100644
index 0000000..11e9876
--- /dev/null
+++ b/service-common/src/main/java/com/lanyuanxiaoyao/service/common/entity/compaction/ScheduleQueue.java
@@ -0,0 +1,15 @@
+package com.lanyuanxiaoyao.service.common.entity.compaction;
+
+import java.util.Deque;
+
+/**
+ * 队列
+ *
+ * @author ZhangJiacheng
+ * @date 2022-09-26
+ */
+public interface ScheduleQueue extends Deque {
+ Iterable poll(int limit);
+
+ Iterable pollWithoutSame(int limit);
+}
diff --git a/service-common/src/main/java/com/lanyuanxiaoyao/service/common/exception/CheckpointRootPathNotFoundException.java b/service-common/src/main/java/com/lanyuanxiaoyao/service/common/exception/CheckpointRootPathNotFoundException.java
new file mode 100644
index 0000000..0ce7ab1
--- /dev/null
+++ b/service-common/src/main/java/com/lanyuanxiaoyao/service/common/exception/CheckpointRootPathNotFoundException.java
@@ -0,0 +1,11 @@
+package com.lanyuanxiaoyao.service.common.exception;
+
+/**
+ * @author ZhangJiacheng
+ * @date 2022-05-23
+ */
+public class CheckpointRootPathNotFoundException extends RuntimeException{
+ public CheckpointRootPathNotFoundException() {
+ super("Checkpoint root path not found");
+ }
+}
diff --git a/service-common/src/main/java/com/lanyuanxiaoyao/service/common/exception/ConfigException.java b/service-common/src/main/java/com/lanyuanxiaoyao/service/common/exception/ConfigException.java
new file mode 100644
index 0000000..3cb21c5
--- /dev/null
+++ b/service-common/src/main/java/com/lanyuanxiaoyao/service/common/exception/ConfigException.java
@@ -0,0 +1,29 @@
+package com.lanyuanxiaoyao.service.common.exception;
+
+import java.util.function.Supplier;
+
+/**
+ * 配置异常
+ *
+ * @author ZhangJiacheng
+ * @date 2022-05-16
+ */
+public class ConfigException extends Exception {
+ public ConfigException(String message) {
+ super(message);
+ }
+
+ public static void check(String message, Supplier checkFunction) throws ConfigException {
+ if (checkFunction.get()) {
+ throw new ConfigException(message);
+ }
+ }
+
+ public static void checkQuiet(String message, Supplier checkFunction) {
+ try {
+ check(message, checkFunction);
+ } catch (ConfigException e) {
+ throw new RuntimeException(e);
+ }
+ }
+}
diff --git a/service-common/src/main/java/com/lanyuanxiaoyao/service/common/exception/FlinkJobNotFoundException.java b/service-common/src/main/java/com/lanyuanxiaoyao/service/common/exception/FlinkJobNotFoundException.java
new file mode 100644
index 0000000..3885d35
--- /dev/null
+++ b/service-common/src/main/java/com/lanyuanxiaoyao/service/common/exception/FlinkJobNotFoundException.java
@@ -0,0 +1,15 @@
+package com.lanyuanxiaoyao.service.common.exception;
+
+/**
+ * @author ZhangJiacheng
+ * @date 2022-05-23
+ */
+public class FlinkJobNotFoundException extends RuntimeException {
+ public FlinkJobNotFoundException() {
+ super("Flink job not found");
+ }
+
+ public FlinkJobNotFoundException(Long flinkJobId) {
+ super("Flink job " + flinkJobId + " not found");
+ }
+}
diff --git a/service-common/src/main/java/com/lanyuanxiaoyao/service/common/exception/MessageIdEmptyException.java b/service-common/src/main/java/com/lanyuanxiaoyao/service/common/exception/MessageIdEmptyException.java
new file mode 100644
index 0000000..0ecc2ed
--- /dev/null
+++ b/service-common/src/main/java/com/lanyuanxiaoyao/service/common/exception/MessageIdEmptyException.java
@@ -0,0 +1,14 @@
+package com.lanyuanxiaoyao.service.common.exception;
+
+
+import com.lanyuanxiaoyao.service.common.Constants;
+
+/**
+ * @author ZhangJiacheng
+ * @date 2022-05-23
+ */
+public class MessageIdEmptyException extends RuntimeException {
+ public MessageIdEmptyException() {
+ super(Constants.LOG_POINT_MESSAGE_ID_EMPTY + " Message id is empty");
+ }
+}
diff --git a/service-common/src/main/java/com/lanyuanxiaoyao/service/common/exception/MissingArgumentException.java b/service-common/src/main/java/com/lanyuanxiaoyao/service/common/exception/MissingArgumentException.java
new file mode 100644
index 0000000..d58f5ba
--- /dev/null
+++ b/service-common/src/main/java/com/lanyuanxiaoyao/service/common/exception/MissingArgumentException.java
@@ -0,0 +1,13 @@
+package com.lanyuanxiaoyao.service.common.exception;
+
+/**
+ * 缺参数异常
+ *
+ * @author ZhangJiacheng
+ * @date 2022-06-20
+ */
+public class MissingArgumentException extends Exception {
+ public MissingArgumentException(String argumentName) {
+ super("Argument: '" + argumentName + "' is not found");
+ }
+}
diff --git a/service-common/src/main/java/com/lanyuanxiaoyao/service/common/exception/PartitionPathNotFoundException.java b/service-common/src/main/java/com/lanyuanxiaoyao/service/common/exception/PartitionPathNotFoundException.java
new file mode 100644
index 0000000..293cf0f
--- /dev/null
+++ b/service-common/src/main/java/com/lanyuanxiaoyao/service/common/exception/PartitionPathNotFoundException.java
@@ -0,0 +1,11 @@
+package com.lanyuanxiaoyao.service.common.exception;
+
+/**
+ * @author ZhangJiacheng
+ * @date 2022-05-23
+ */
+public class PartitionPathNotFoundException extends RuntimeException{
+ public PartitionPathNotFoundException() {
+ super("Partition path not found");
+ }
+}
diff --git a/service-common/src/main/java/com/lanyuanxiaoyao/service/common/exception/PulsarInfoNotFoundException.java b/service-common/src/main/java/com/lanyuanxiaoyao/service/common/exception/PulsarInfoNotFoundException.java
new file mode 100644
index 0000000..3256c4e
--- /dev/null
+++ b/service-common/src/main/java/com/lanyuanxiaoyao/service/common/exception/PulsarInfoNotFoundException.java
@@ -0,0 +1,11 @@
+package com.lanyuanxiaoyao.service.common.exception;
+
+/**
+ * @author ZhangJiacheng
+ * @date 2023-04-28
+ */
+public class PulsarInfoNotFoundException extends RuntimeException {
+ public PulsarInfoNotFoundException(String message) {
+ super(message);
+ }
+}
diff --git a/service-common/src/main/java/com/lanyuanxiaoyao/service/common/exception/SyncStateNotFoundException.java b/service-common/src/main/java/com/lanyuanxiaoyao/service/common/exception/SyncStateNotFoundException.java
new file mode 100644
index 0000000..ada90c9
--- /dev/null
+++ b/service-common/src/main/java/com/lanyuanxiaoyao/service/common/exception/SyncStateNotFoundException.java
@@ -0,0 +1,11 @@
+package com.lanyuanxiaoyao.service.common.exception;
+
+/**
+ * @author ZhangJiacheng
+ * @date 2022-05-23
+ */
+public class SyncStateNotFoundException extends RuntimeException{
+ public SyncStateNotFoundException() {
+ super("Sync state not found");
+ }
+}
diff --git a/service-common/src/main/java/com/lanyuanxiaoyao/service/common/exception/TableMetaNotFoundException.java b/service-common/src/main/java/com/lanyuanxiaoyao/service/common/exception/TableMetaNotFoundException.java
new file mode 100644
index 0000000..4605518
--- /dev/null
+++ b/service-common/src/main/java/com/lanyuanxiaoyao/service/common/exception/TableMetaNotFoundException.java
@@ -0,0 +1,11 @@
+package com.lanyuanxiaoyao.service.common.exception;
+
+/**
+ * @author ZhangJiacheng
+ * @date 2022-05-23
+ */
+public class TableMetaNotFoundException extends RuntimeException{
+ public TableMetaNotFoundException() {
+ super("Table meta not found");
+ }
+}
diff --git a/service-common/src/main/java/com/lanyuanxiaoyao/service/common/exception/ZookeeperUrlNotFoundException.java b/service-common/src/main/java/com/lanyuanxiaoyao/service/common/exception/ZookeeperUrlNotFoundException.java
new file mode 100644
index 0000000..252341c
--- /dev/null
+++ b/service-common/src/main/java/com/lanyuanxiaoyao/service/common/exception/ZookeeperUrlNotFoundException.java
@@ -0,0 +1,11 @@
+package com.lanyuanxiaoyao.service.common.exception;
+
+/**
+ * @author ZhangJiacheng
+ * @date 2022-05-23
+ */
+public class ZookeeperUrlNotFoundException extends RuntimeException{
+ public ZookeeperUrlNotFoundException() {
+ super("Zookeeper url not found");
+ }
+}
diff --git a/service-common/src/main/java/com/lanyuanxiaoyao/service/common/utils/FlinkJobHelper.java b/service-common/src/main/java/com/lanyuanxiaoyao/service/common/utils/FlinkJobHelper.java
new file mode 100644
index 0000000..c46a829
--- /dev/null
+++ b/service-common/src/main/java/com/lanyuanxiaoyao/service/common/utils/FlinkJobHelper.java
@@ -0,0 +1,86 @@
+package com.lanyuanxiaoyao.service.common.utils;
+
+import com.lanyuanxiaoyao.service.common.entity.FlinkJob;
+import com.lanyuanxiaoyao.service.common.entity.TableMeta;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Optional;
+
+/**
+ * Flink Job 工具类
+ *
+ * @author ZhangJiacheng
+ * @version 0.0.1
+ * @date 2021-12-08
+ */
+public class FlinkJobHelper {
+ public static String allFlinkJobSql(String database) {
+ // language=MySQL
+ return "select tafjc.id,\n" +
+ " tafjc.name,\n" +
+ " tafjc.run_mode,\n" +
+ " tayjc.job_manager_memory,\n" +
+ " tayjc.task_manager_memory\n" +
+ "from `" + database + "`.tb_app_flink_job_config tafjc\n" +
+ " left join\n" +
+ " `" + database + "`.tb_app_yarn_job_config tayjc on tafjc.one_in_one_yarn_job_id = tayjc.id and tayjc.status = 'y'\n" +
+ "where tafjc.status = 'y'";
+ }
+
+ public static String flinkJobSql(String database) {
+ // language=MySQL
+ return "select tafjc.id,\n" +
+ " tafjc.name,\n" +
+ " tafjc.run_mode,\n" +
+ " tayjc.job_manager_memory,\n" +
+ " tayjc.task_manager_memory\n" +
+ "from `" + database + "`.tb_app_flink_job_config tafjc\n" +
+ " left join\n" +
+ " `" + database + "`.tb_app_yarn_job_config tayjc on tafjc.one_in_one_yarn_job_id = tayjc.id and tayjc.status = 'y'\n" +
+ "where tafjc.id = ?\n" +
+ " and tafjc.status = 'y'";
+ }
+
+ public static List from(ResultSet rs) throws SQLException {
+ List results = new ArrayList<>();
+ while (rs.next()) {
+ String runModeText = rs.getString(3);
+ FlinkJob.RunMode mode;
+ try {
+ mode = FlinkJob.RunMode.valueOf(runModeText);
+ } catch (IllegalArgumentException e) {
+ mode = FlinkJob.RunMode.ALL_IN_ONE;
+ }
+ TableMeta.YarnMeta yarnMeta = TableMeta.YarnMeta.builder()
+ .jobManagerMemory(rs.getInt(4))
+ .taskManagerMemory(rs.getInt(5))
+ .build();
+ results.add(
+ FlinkJob.builder()
+ .id(rs.getLong(1))
+ .name(rs.getString(2))
+ .runMode(mode)
+ .oneInOneSyncYarn(yarnMeta)
+ .build()
+ );
+ }
+ return results;
+ }
+
+ public static Optional fromOne(ResultSet rs) throws SQLException {
+ List results = from(rs);
+ if (results.size() < 1) {
+ return Optional.empty();
+ } else if (results.size() > 1) {
+ throw new SQLException("Found more than 1 records");
+ } else {
+ return Optional.of(results.get(0));
+ }
+ }
+
+ public static boolean isOneInOneMode(FlinkJob job) {
+ return FlinkJob.RunMode.ONE_IN_ONE.equals(job.getRunMode());
+ }
+}
diff --git a/service-common/src/main/java/com/lanyuanxiaoyao/service/common/utils/LogHelper.java b/service-common/src/main/java/com/lanyuanxiaoyao/service/common/utils/LogHelper.java
new file mode 100644
index 0000000..80b0d14
--- /dev/null
+++ b/service-common/src/main/java/com/lanyuanxiaoyao/service/common/utils/LogHelper.java
@@ -0,0 +1,117 @@
+package com.lanyuanxiaoyao.service.common.utils;
+
+import cn.hutool.core.collection.ListUtil;
+import cn.hutool.core.map.MapBuilder;
+import cn.hutool.core.map.MapUtil;
+import cn.hutool.core.util.ObjectUtil;
+import cn.hutool.core.util.StrUtil;
+import com.lanyuanxiaoyao.service.common.Constants;
+import java.util.List;
+import java.util.Map;
+import org.slf4j.Logger;
+import org.slf4j.MDC;
+
+/**
+ * 日志相关
+ *
+ * @author ZhangJiacheng
+ * @date 2023-12-25
+ */
+public class LogHelper {
+ private static String generateLog(LogPoint point, String template, Object[] args) {
+ if (ObjectUtil.isEmpty(template)) {
+ return point.toString();
+ }
+ if (ObjectUtil.isEmpty(args)) {
+ return point + " " + template;
+ }
+ Object[] items = new Object[args.length + 1];
+ items[0] = point;
+ System.arraycopy(args, 0, items, 1, args.length);
+ return StrUtil.format("{} " + template, items);
+ }
+
+ public static void info(Logger logger, LogPoint point) {
+ logger.info(generateLog(point, null, null));
+ }
+
+ public static void info(Logger logger, LogPoint point, String template) {
+ logger.info(generateLog(point, template, null));
+ }
+
+ public static void info(Logger logger, LogPoint point, String template, Object... args) {
+ logger.info(generateLog(point, template, args));
+ }
+
+ public static void debug(Logger logger, LogPoint point, String template, Object... args) {
+ logger.debug(generateLog(point, template, args));
+ }
+
+ public static void warn(Logger logger, LogPoint point, String template, Object... args) {
+ logger.warn(generateLog(point, template, args));
+ }
+
+ public static void error(Logger logger, LogPoint point, String template, Object... args) {
+ logger.error(generateLog(point, template, args));
+ }
+
+ public static void setMdc(Map mdcList) {
+ mdcList.forEach(MDC::put);
+ }
+
+ public static void setMdc(String... items) {
+ if (items.length % 2 != 0) {
+ throw new IllegalArgumentException("Items must key-value");
+ }
+ MapBuilder builder = MapUtil.builder();
+ for (int i = 0, j = 1; j < items.length; i++, j++) {
+ builder.put(items[i], items[j]);
+ }
+ setMdc(builder.build());
+ }
+
+ public static void removeMdc(List mdcList) {
+ mdcList.forEach(MDC::remove);
+ }
+
+ public static void removeMdc(String... names) {
+ removeMdc(ListUtil.of(names));
+ }
+
+ public static void setMdcFlinkJobAndAlias(Long flinkJobId, String alias) {
+ setMdc(MapUtil.builder()
+ .put(Constants.LOG_FLINK_JOB_ID_LABEL, flinkJobId.toString())
+ .put(Constants.LOG_ALIAS_LABEL, alias)
+ .build());
+ }
+
+ public static void removeMdcFlinkJobAndAlias(Long flinkJobId, String alias) {
+ removeMdc(ListUtil.of(Constants.LOG_FLINK_JOB_ID_LABEL, Constants.LOG_ALIAS_LABEL));
+ }
+
+ public enum LogPoint {
+ PULSAR_SOURCE_CHECKPOINT_INITIAL(100),
+ PULSAR_SOURCE_CHECKPOINT_INITIAL_MESSAGE_ID(101),
+
+ MESSAGE_ID_EMPTY(1),
+ CHECKPOINT_INITIAL(2),
+ CHECKPOINT_INITIAL_MESSAGE_ID(3),
+ PULSAR_SOURCE_BOOTSTRAP_MESSAGE_ID(4),
+ PULSAR_SOURCE_BOOTSTRAP_GET_MESSAGE_ERROR(5),
+ FIELD_TYPE_NOT_FOUND(6),
+ VERSION_UPDATE(7),
+ CHECKPOINT_START(8),
+ CHECKPOINT_COMPLETE(9);
+
+ private final Integer code;
+
+ LogPoint(Integer code) {
+ this.code = code;
+ }
+
+ @Override
+ public String toString() {
+ return String.format("LOP-%06d", code);
+ }
+ }
+}
diff --git a/service-common/src/main/java/com/lanyuanxiaoyao/service/common/utils/MapHelper.java b/service-common/src/main/java/com/lanyuanxiaoyao/service/common/utils/MapHelper.java
new file mode 100644
index 0000000..cee725a
--- /dev/null
+++ b/service-common/src/main/java/com/lanyuanxiaoyao/service/common/utils/MapHelper.java
@@ -0,0 +1,37 @@
+package com.lanyuanxiaoyao.service.common.utils;
+
+import java.util.Map;
+
+/**
+ * Map工具类
+ *
+ * @author ZhangJiacheng
+ * @date 2023-03-20
+ */
+public class MapHelper {
+ // 如果大小写同时存在,那么这个忽略大小写的方案就会首先返回大写键的值
+ public static Object getWithoutCase(Map map, String key) {
+ String upperKey = key.toUpperCase(), lowerKey = key.toLowerCase();
+ return map.containsKey(upperKey) ? map.get(upperKey) : map.containsKey(lowerKey) ? map.get(lowerKey) : map.get(key);
+ }
+
+ public static String getStringWithoutCase(Map map, String key) {
+ return (String) getWithoutCase(map, key);
+ }
+
+ public static Integer getIntWithoutCase(Map map, String key) {
+ return (Integer) getWithoutCase(map, key);
+ }
+
+ public static Long getLongWithoutCase(Map map, String key) {
+ return (Long) getWithoutCase(map, key);
+ }
+
+ public static Double getDoubleWithoutCase(Map map, String key) {
+ return (Double) getWithoutCase(map, key);
+ }
+
+ public static Float getFloatWithoutCase(Map map, String key) {
+ return (Float) getWithoutCase(map, key);
+ }
+}
diff --git a/service-common/src/main/java/com/lanyuanxiaoyao/service/common/utils/NameHelper.java b/service-common/src/main/java/com/lanyuanxiaoyao/service/common/utils/NameHelper.java
new file mode 100644
index 0000000..31db70a
--- /dev/null
+++ b/service-common/src/main/java/com/lanyuanxiaoyao/service/common/utils/NameHelper.java
@@ -0,0 +1,103 @@
+package com.lanyuanxiaoyao.service.common.utils;
+
+import cn.hutool.core.util.StrUtil;
+import com.lanyuanxiaoyao.service.common.Constants;
+
+/**
+ * 命名相关工具
+ *
+ * @author ZhangJiacheng
+ * @date 2022-06-24
+ */
+public class NameHelper {
+ public static String pulsarSubscriptionName(Long flinkJobId, String alias) {
+ return Constants.PULSAR_SUBSCRIPTION_NAME_PREFIX + "_" + flinkJobId + "_" + alias + "_20230425";
+ }
+
+ // Sync job name
+
+ public static final String SYNC_JOB_NAME_REGEX = "^Sync_(\\d+?)_(.+)$";
+
+ public static boolean isSyncJob(String name) {
+ return StrUtil.isNotBlank(name) && name.matches(SYNC_JOB_NAME_REGEX);
+ }
+
+ public static String syncJobName(Long flinkJobId, String flinkJobName) {
+ return "Sync_" + flinkJobId + "_" + flinkJobName;
+ }
+
+ public static final String COMPACTION_JOB_NAME_REGEX = "^Compaction_(\\d+?)_(.+?)$";
+
+ public static boolean isCompactionJob(String name) {
+ return StrUtil.isNotBlank(name) && name.matches(COMPACTION_JOB_NAME_REGEX);
+ }
+
+ public static String compactionJobName(Long flinkJobId, String alias) {
+ return "Compaction_" + flinkJobId + "_" + alias;
+ }
+
+ // flink job name
+
+ public static String syncFlinkName(Long flinkJobId, String flinkJobName) {
+ return flinkJobName + " (ID: " + flinkJobId + ")";
+ }
+
+ public static String syncFlinkName(Long flinkJobId, String flinkJobName, String alias) {
+ return flinkJobName + " " + alias + " (ID: " + flinkJobId + ")";
+ }
+
+ public static String compactionFlinkName(Long flinkJobId, String schema, String alias) {
+ return schema + " " + alias + " (ID: " + flinkJobId + ")";
+ }
+
+ // sync state name
+
+ public static String syncStateName(Long flinkJobId, String alias) {
+ return flinkJobId + "-" + alias;
+ }
+
+ // zk lock name
+ public static final String ZK_ROOT_PATH = "/hudi";
+ public static final String ZK_LOCK_PATH = ZK_ROOT_PATH + "/lock";
+ public static final String ZK_LAUNCHER_LOCK_PATH = ZK_LOCK_PATH + "/launcher";
+ public static final String ZK_RUNNING_LOCK_PATH = ZK_LOCK_PATH + "/running";
+
+ public static final String ZK_SYNC_SUFFIX_PATH = "/sync";
+ public static final String ZK_SYNC_LAUNCHER_LOCK_PATH = ZK_LAUNCHER_LOCK_PATH + ZK_SYNC_SUFFIX_PATH;
+ public static final String ZK_SYNC_RUNNING_LOCK_PATH = ZK_RUNNING_LOCK_PATH + ZK_SYNC_SUFFIX_PATH;
+
+ public static String syncLockName(Long flinkJobId, String alias) {
+ if (StrUtil.isNotBlank(alias)) {
+ return "sync_lock_" + flinkJobId + "_" + alias;
+ }
+ return "sync_lock_" + flinkJobId;
+ }
+
+ public static String syncLauncherLockPath(Long flinkJobId) {
+ return ZK_SYNC_LAUNCHER_LOCK_PATH + "/" + syncLockName(flinkJobId, null);
+ }
+
+ public static String syncRunningLockPath(Long flinkJobId) {
+ return syncRunningLockPath(flinkJobId, null);
+ }
+
+ public static String syncRunningLockPath(Long flinkJobId, String alias) {
+ return ZK_SYNC_RUNNING_LOCK_PATH + "/" + syncLockName(flinkJobId, alias);
+ }
+
+ public static final String ZK_COMPACTION_SUFFIX_PATH = "/compaction";
+ public static final String ZK_COMPACTION_LAUNCHER_LOCK_PATH = ZK_LAUNCHER_LOCK_PATH + ZK_COMPACTION_SUFFIX_PATH;
+ public static final String ZK_COMPACTION_RUNNING_LOCK_PATH = ZK_RUNNING_LOCK_PATH + ZK_COMPACTION_SUFFIX_PATH;
+
+ public static String compactionLockName(Long flinkJobId, String alias) {
+ return "compaction_lock_" + flinkJobId + "_" + alias;
+ }
+
+ public static String compactionLauncherLockPath(Long flinkJobId, String alias) {
+ return ZK_COMPACTION_LAUNCHER_LOCK_PATH + "/" + compactionLockName(flinkJobId, alias);
+ }
+
+ public static String compactionRunningLockPath(Long flinkJobId, String alias) {
+ return ZK_COMPACTION_RUNNING_LOCK_PATH + "/" + compactionLockName(flinkJobId, alias);
+ }
+}
diff --git a/service-common/src/main/java/com/lanyuanxiaoyao/service/common/utils/RecordHelper.java b/service-common/src/main/java/com/lanyuanxiaoyao/service/common/utils/RecordHelper.java
new file mode 100644
index 0000000..53b9be3
--- /dev/null
+++ b/service-common/src/main/java/com/lanyuanxiaoyao/service/common/utils/RecordHelper.java
@@ -0,0 +1,127 @@
+package com.lanyuanxiaoyao.service.common.utils;
+
+import com.lanyuanxiaoyao.service.common.Constants;
+import com.lanyuanxiaoyao.service.common.entity.Record;
+import com.lanyuanxiaoyao.service.common.entity.TableMeta;
+import java.util.*;
+import java.util.function.Function;
+import java.util.stream.Collectors;
+
+/**
+ * Record 工具类
+ *
+ * @author ZhangJiacheng
+ * @version 0.0.1
+ * @date 2021-12-03
+ */
+public class RecordHelper {
+ public static Boolean isNotVersionUpdateRecord(String record) {
+ return !isVersionUpdateRecord(record);
+ }
+
+ public static Boolean isVersionUpdateRecord(String record) {
+ return record.contains(Constants.VERSION_UPDATE_KEY);
+ }
+
+ public static Boolean isNotVersionUpdateRecord(Record record) {
+ return !isVersionUpdateRecord(record);
+ }
+
+ public static Boolean isVersionUpdateRecord(Record record) {
+ // Record{source=Source{sourceId='versionUpdate', sourceType='null', sourcePos='null', currentTs='2022-11-15 22:17:44'}, statement=Statement{schema='crm_ivpn_cust', table='customer', opStatement='null', opType='version', op='null', opTs='2022-11-15 00:17:43', version='20220925', before=null, after=null}}
+ return Constants.VERSION_UPDATE_KEY.equals(record.getSource().getSourceId())
+ && Constants.VERSION_KEY.equals(record.getStatement().getOpType());
+ }
+
+ /**
+ * 获取当前的 Statement, 即 source 和 target 选不为空的操作
+ *
+ * @param record 消息
+ * @return 更新的字段内容
+ */
+ public static Map getCurrentStatement(Record record) {
+ Map before = record.getStatement().getBefore();
+ Map after = record.getStatement().getAfter();
+ return (after == null ? before : after.isEmpty() ? before : after);
+ }
+
+ public static Optional