Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

perf: 分库分表改造前置准备 #2991 #2994

Merged
merged 65 commits into from
Nov 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
b85b871
perf: 分库分表改造-任务表以及子表加入 task_instance_id 字段 #2991
wangyu096 May 20, 2024
10f85d5
perf: 分库分表改造-任务表以及子表加入 task_instance_id 字段 #2991
wangyu096 May 21, 2024
b355c29
perf: 分库分表改造-任务表以及子表加入 task_instance_id 字段 #2991
wangyu096 May 21, 2024
a169879
perf: 分库分表改造-任务表以及子表加入 task_instance_id 字段 #2991
wangyu096 May 21, 2024
b50f2ea
perf: 分库分表改造-任务表以及子表加入 task_instance_id 字段 #2991
wangyu096 May 22, 2024
9113712
perf: 分库分表改造-任务表以及子表加入 task_instance_id 字段 #2991
wangyu096 May 22, 2024
1853189
perf: 分库分表改造-任务表以及子表加入 task_instance_id 字段 #2991
wangyu096 May 23, 2024
c5dae1c
perf: 分库分表改造-任务表以及子表加入 task_instance_id 字段 #2991
wangyu096 May 23, 2024
22be3d3
perf: 分库分表改造-任务表以及子表加入 task_instance_id 字段 #2991
wangyu096 May 23, 2024
1de8d9d
perf: 分库分表改造-任务表以及子表加入 task_instance_id 字段 #2991
wangyu096 May 23, 2024
227a9f5
perf: 分库分表改造-任务表以及子表加入 task_instance_id 字段 #2991
wangyu096 May 23, 2024
266f991
perf: 分库分表改造-任务表以及子表加入 task_instance_id 字段 #2991
wangyu096 May 23, 2024
1d6c056
perf: 分库分表改造-任务表以及子表加入 task_instance_id 字段 #2991
wangyu096 May 23, 2024
3ef71bd
perf: 分库分表改造-任务表以及子表加入 task_instance_id 字段 #2991
wangyu096 May 23, 2024
a4d4711
perf: 分库分表改造-任务表以及子表加入 task_instance_id 字段 #2991
wangyu096 May 24, 2024
109bf51
perf: 分库分表改造-任务表以及子表加入 task_instance_id 字段 #2991
wangyu096 May 24, 2024
30c2248
perf: 分库分表改造-任务表以及子表加入 task_instance_id 字段 #2991
wangyu096 May 24, 2024
4b7a384
perf: 分库分表改造-任务表以及子表加入 task_instance_id 字段 #2991
wangyu096 May 24, 2024
8db2f6b
perf: 分库分表改造-任务表以及子表加入 task_instance_id 字段 #2991
wangyu096 May 24, 2024
6b4e41f
perf: 分库分表改造-任务表以及子表加入 task_instance_id 字段 #2991
wangyu096 May 24, 2024
f1245fd
perf: 分库分表改造-任务表以及子表加入 task_instance_id 字段
wangyu096 May 29, 2024
636c0bb
Merge branch 'master' of https://github.com/Tencent/bk-job into issue…
wangyu096 Jun 3, 2024
bbb526c
perf: 分库分表改造-任务表以及子表加入 task_instance_id 字段 #2991
wangyu096 Jul 5, 2024
62172ab
Merge branch 'master' of https://github.com/Tencent/bk-job into issue…
wangyu096 Aug 2, 2024
46be829
perf: 分库分表改造-任务表以及子表加入 task_instance_id 字段 #2991
wangyu096 Aug 15, 2024
59386ab
Merge branch 'master' of https://github.com/Tencent/bk-job into issue…
wangyu096 Sep 11, 2024
9bb3774
perf: 分库分表改造-任务表以及子表加入 task_instance_id 字段 #2991
wangyu096 Nov 1, 2024
6d15130
perf: 分库分表改造-任务表以及子表加入 task_instance_id 字段 #2991
wangyu096 Nov 16, 2024
74c8332
perf: 分库分表改造-任务表以及子表加入 task_instance_id 字段 #2991
wangyu096 Nov 17, 2024
6d9a6c2
perf: 分库分表改造-任务表以及子表加入 task_instance_id 字段 #2991
wangyu096 Nov 17, 2024
5abf564
perf: 分库分表改造-任务表以及子表加入 task_instance_id 字段 #2991
wangyu096 Nov 17, 2024
b2330a9
perf: 分库分表改造-任务表以及子表加入 task_instance_id 字段 #2991
wangyu096 Nov 18, 2024
bb7ccb8
perf: 分库分表改造-任务表以及子表加入 task_instance_id 字段 #2991
wangyu096 Nov 18, 2024
fe9f0a7
perf: 分库分表改造-任务表以及子表加入 task_instance_id 字段 #2991
wangyu096 Nov 18, 2024
bcf0f86
perf: 分库分表改造-任务表以及子表加入 task_instance_id 字段 #2991
wangyu096 Nov 18, 2024
85c49c9
perf: 分库分表改造-任务表以及子表加入 task_instance_id 字段 #2991
wangyu096 Nov 18, 2024
984e607
perf: 分库分表改造-任务表以及子表加入 task_instance_id 字段 #2991
wangyu096 Nov 18, 2024
b981c5d
perf: 分库分表改造-任务表以及子表加入 task_instance_id 字段 #2991
wangyu096 Nov 19, 2024
faa571c
perf: 分库分表改造-任务表以及子表加入 task_instance_id 字段 #2991
wangyu096 Nov 19, 2024
17ee608
perf: 分库分表改造-任务表以及子表加入 task_instance_id 字段 #2991
wangyu096 Nov 19, 2024
d0b786f
perf: 分库分表改造-任务表以及子表加入 task_instance_id 字段 #2991
wangyu096 Nov 19, 2024
4ec6913
perf: 分库分表改造-任务表以及子表加入 task_instance_id 字段 #2991
wangyu096 Nov 19, 2024
769cff0
perf: 分库分表改造-任务表以及子表加入 task_instance_id 字段 #2991
wangyu096 Nov 19, 2024
33f458f
perf: 分库分表改造-任务表以及子表加入 task_instance_id 字段 #2991
wangyu096 Nov 19, 2024
f406f1d
perf: 分库分表改造-任务表以及子表加入 task_instance_id 字段 #2991
wangyu096 Nov 19, 2024
7c4940e
perf: 分库分表改造-任务表以及子表加入 task_instance_id 字段 #2991
wangyu096 Nov 20, 2024
a662b19
perf: 分库分表改造-任务表以及子表加入 task_instance_id 字段 #2991
wangyu096 Nov 20, 2024
15382b9
perf: 分库分表改造-任务表以及子表加入 task_instance_id 字段 #2991
wangyu096 Nov 20, 2024
cfaf616
perf: 分库分表改造-任务表以及子表加入 task_instance_id 字段 #2991
wangyu096 Nov 20, 2024
83aea6a
perf: 分库分表改造-任务表以及子表加入 task_instance_id 字段 #2991
wangyu096 Nov 20, 2024
68c51b9
perf: 分库分表改造-任务表以及子表加入 task_instance_id 字段 #2991
wangyu096 Nov 20, 2024
08ceb39
perf: 分库分表改造-任务表以及子表加入 task_instance_id 字段 #2991
wangyu096 Nov 20, 2024
8c7522f
perf: 分库分表改造-任务表以及子表加入 task_instance_id 字段 #2991
wangyu096 Nov 20, 2024
70488c8
perf: 分库分表改造-任务表以及子表加入 task_instance_id 字段 #2991
wangyu096 Nov 21, 2024
8243d21
perf: 分库分表改造-任务表以及子表加入 task_instance_id 字段 #2991
wangyu096 Nov 21, 2024
54fed24
perf: 分库分表改造-任务表以及子表加入 task_instance_id 字段 #2991
wangyu096 Nov 21, 2024
8425a92
perf: 分库分表改造-任务表以及子表加入 task_instance_id 字段 #2991
wangyu096 Nov 21, 2024
70a7d20
perf: 分库分表改造-任务表以及子表加入 task_instance_id 字段 #2991
wangyu096 Nov 21, 2024
c190aa4
perf: 分库分表改造-任务表以及子表加入 task_instance_id 字段 #2991
wangyu096 Nov 21, 2024
a34e41f
perf: 分库分表改造-任务表以及子表加入 task_instance_id 字段 #2991
wangyu096 Nov 22, 2024
d4ef3aa
perf: 分库分表改造-任务表以及子表加入 task_instance_id 字段 #2991
wangyu096 Nov 22, 2024
049a505
perf: 分库分表改造-任务表以及子表加入 task_instance_id 字段 #2991
wangyu096 Nov 23, 2024
2df9011
perf: 分库分表改造-任务表以及子表加入 task_instance_id 字段 #2991
wangyu096 Nov 23, 2024
659ce74
perf: 分库分表改造-任务表以及子表加入 task_instance_id 字段 #2991
wangyu096 Nov 23, 2024
9cd40b6
perf: 分库分表改造-任务表以及子表加入 task_instance_id 字段 #2991
wangyu096 Nov 25, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
6 changes: 6 additions & 0 deletions src/backend/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,9 @@ ext {
set('mockitoVersion', "4.0.0")
set('embeddedRedisVersion', "0.6")
set('openai4jVersion', "0.18.0")
set('shardingJdbcVersion', "5.4.1")
set('snakeyamlVersion', "1.33")
set('bkDevOpsLeafVersion', "1.0.2-RELEASE")
}

group "com.tencent.bk.job"
Expand Down Expand Up @@ -348,6 +351,9 @@ subprojects {
dependency "org.mockito:mockito-inline:$mockitoVersion"
dependency "com.github.kstyrc:embedded-redis:$embeddedRedisVersion"
dependency "dev.ai4j:openai4j:$openai4jVersion"
dependency "org.apache.shardingsphere:shardingsphere-jdbc-core:$shardingJdbcVersion"
dependency "org.yaml:snakeyaml:$snakeyamlVersion"
dependency "com.tencent.devops.leaf:leaf-boot-starter:$bkDevOpsLeafVersion"
}
}
dependencies {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.BeansException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
import org.springframework.beans.factory.support.AbstractBeanDefinition;
import org.springframework.beans.factory.support.BeanDefinitionRegistry;
Expand Down
42 changes: 42 additions & 0 deletions src/backend/commons/common-mysql-sharding/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
/*
* Tencent is pleased to support the open source community by making BK-JOB蓝鲸智云作业平台 available.
*
* Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
*
* BK-JOB蓝鲸智云作业平台 is licensed under the MIT License.
*
* License for BK-JOB蓝鲸智云作业平台:
* --------------------------------------------------------------------
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
* documentation files (the "Software"), to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
* to permit persons to whom the Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of
* the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
* THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
* CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
* IN THE SOFTWARE.
*/

dependencies {
api project(":commons:common")
implementation 'io.micrometer:micrometer-registry-prometheus'
implementation("org.springframework.boot:spring-boot-autoconfigure")
implementation 'org.springframework:spring-web'
implementation 'org.aspectj:aspectjrt'
implementation 'org.aspectj:aspectjweaver'
api 'org.apache.shardingsphere:shardingsphere-jdbc-core'
api 'org.yaml:snakeyaml'
api 'com.tencent.devops.leaf:leaf-boot-starter'
api 'org.jooq:jooq'
api 'org.springframework.boot:spring-boot-starter-jdbc'
compileOnly 'org.projectlombok:lombok'
annotationProcessor 'org.projectlombok:lombok'
testImplementation 'org.junit.jupiter:junit-jupiter'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
}
apply from: "./leaf_gen_jooq.gradle"
78 changes: 78 additions & 0 deletions src/backend/commons/common-mysql-sharding/leaf_gen_jooq.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
/*
* Tencent is pleased to support the open source community by making BK-JOB蓝鲸智云作业平台 available.
*
* Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
*
* BK-JOB蓝鲸智云作业平台 is licensed under the MIT License.
*
* License for BK-JOB蓝鲸智云作业平台:
* --------------------------------------------------------------------
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
* documentation files (the "Software"), to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
* to permit persons to whom the Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of
* the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
* THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
* CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
* IN THE SOFTWARE.
*/
apply plugin: 'nu.studer.jooq'

dependencies {
api "org.jooq:jooq"
jooqRuntime "mysql:mysql-connector-java"
}

def databaseName = "job_leaf"
def targetPackageName = "com.tencent.bk.job.common.sharding.mysql.jooq.model"

jooq {
genenrate(sourceSets.main) {

jdbc {
driver = 'com.mysql.cj.jdbc.Driver'
def mysqlURL = System.getProperty("mysqlURL")
def mysqlUser = System.getProperty("mysqlUser")
def mysqlPasswd = System.getProperty("mysqlPasswd")

if (mysqlURL == null) {
// gradle.properties 中的 Jooq DB 配置
mysqlURL = project.findProperty("DB_HOST")
mysqlUser = project.findProperty("DB_USERNAME")
mysqlPasswd = project.findProperty("DB_PASSWORD")
}

println("mysqlURL=" + mysqlURL)
println("mysqlUser=" + mysqlUser)
url = "jdbc:mysql://${mysqlURL}/${databaseName}?useSSL=false&serverTimezone=UTC"
user = mysqlUser
password = mysqlPasswd
}

generator {
name = 'org.jooq.codegen.DefaultGenerator'
database {
name = 'org.jooq.meta.mysql.MySQLDatabase'
inputSchema = "${databaseName}"
}

generate {
relations = false
deprecated = false
fluentSetters = true
generatedAnnotation = false
javaTimeTypes = true
}

target {
packageName = "${targetPackageName}"
encoding = 'UTF-8'
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
/*
* Tencent is pleased to support the open source community by making BK-JOB蓝鲸智云作业平台 available.
*
* Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
*
* BK-JOB蓝鲸智云作业平台 is licensed under the MIT License.
*
* License for BK-JOB蓝鲸智云作业平台:
* --------------------------------------------------------------------
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
* documentation files (the "Software"), to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
* to permit persons to whom the Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of
* the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
* THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
* CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
* IN THE SOFTWARE.
*/

package com.tencent.bk.job.common.sharding.mysql;

import com.tencent.bk.job.common.sharding.mysql.jooq.model.tables.TLeafAlloc;
import com.tencent.bk.job.common.sharding.mysql.jooq.model.tables.records.TLeafAllocRecord;
import com.tencent.bk.job.common.util.date.DateUtils;
import com.tencent.devops.leaf.segment.dao.IDAllocDao;
import com.tencent.devops.leaf.segment.model.LeafAlloc;
import org.jooq.DSLContext;
import org.jooq.Record1;
import org.jooq.Result;
import org.jooq.impl.DSL;

import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;

/**
* 基于 JOOQ+美团 Leaf分布式 ID 组件,生成分布式 ID
*/
public class JooqLeafIdAllocator implements IDAllocDao {
private final DSLContext dslContext;

private static final TLeafAlloc T_LEAF_ALLOC = TLeafAlloc.T_LEAF_ALLOC;


public JooqLeafIdAllocator(DSLContext dslContext) {
this.dslContext = dslContext;
}

@Override
public List<LeafAlloc> getAllLeafAllocs() {
Result<TLeafAllocRecord> leafAllocRecords = dslContext.selectFrom(T_LEAF_ALLOC).fetch();
List<LeafAlloc> leafAllocs = new ArrayList<>();
leafAllocRecords.forEach(leafAllocRecord -> {
LeafAlloc leafAlloc = generateLeafAlloc(leafAllocRecord);
leafAllocs.add(leafAlloc);
});
return leafAllocs;
}

private LeafAlloc generateLeafAlloc(TLeafAllocRecord leafAllocRecord) {
LeafAlloc leafAlloc = new LeafAlloc();
leafAlloc.setKey(leafAllocRecord.getBizTag());
leafAlloc.setMaxId(leafAllocRecord.getMaxId());
leafAlloc.setStep(leafAllocRecord.getStep());
leafAlloc.setUpdateTime(DateUtils.defaultLocalDateTime(leafAllocRecord.getUpdateTime()));
return leafAlloc;
}

@Override
public LeafAlloc updateMaxIdAndGetLeafAlloc(String tag) {
TLeafAllocRecord leafAllocRecord;
leafAllocRecord = dslContext.transactionResult(t -> {
DSLContext context = DSL.using(t);
context.update(T_LEAF_ALLOC)
.set(T_LEAF_ALLOC.MAX_ID, T_LEAF_ALLOC.MAX_ID.add(T_LEAF_ALLOC.STEP))
.set(T_LEAF_ALLOC.UPDATE_TIME, LocalDateTime.now())
.where(T_LEAF_ALLOC.BIZ_TAG.eq(tag))
.execute();
return context.selectFrom(T_LEAF_ALLOC)
.where(T_LEAF_ALLOC.BIZ_TAG
.eq(tag))
.fetchOne();
});
return generateLeafAlloc(leafAllocRecord);
}

@Override
public LeafAlloc updateMaxIdByCustomStepAndGetLeafAlloc(LeafAlloc leafAlloc) {
TLeafAllocRecord leafAllocRecord;
leafAllocRecord = dslContext.transactionResult(t -> {
DSLContext context = DSL.using(t);
context.update(T_LEAF_ALLOC)
.set(T_LEAF_ALLOC.MAX_ID, T_LEAF_ALLOC.MAX_ID.add(leafAlloc.getStep()))
.set(T_LEAF_ALLOC.UPDATE_TIME, LocalDateTime.now())
.where(T_LEAF_ALLOC.BIZ_TAG.eq(leafAlloc.getKey()))
.execute();
return context.selectFrom(T_LEAF_ALLOC)
.where(T_LEAF_ALLOC.BIZ_TAG.eq(leafAlloc.getKey()))
.fetchOne();
});
return generateLeafAlloc(leafAllocRecord);
}

@Override
public List<String> getAllTags() {
Result<Record1<String>> tagRecords = dslContext
.select(T_LEAF_ALLOC.BIZ_TAG)
.from(T_LEAF_ALLOC)
.fetch();
List<String> tags = new ArrayList<>();
tagRecords.forEach(record -> tags.add(record.value1()));
return tags;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
/*
* Tencent is pleased to support the open source community by making BK-JOB蓝鲸智云作业平台 available.
*
* Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
*
* BK-JOB蓝鲸智云作业平台 is licensed under the MIT License.
*
* License for BK-JOB蓝鲸智云作业平台:
* --------------------------------------------------------------------
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
* documentation files (the "Software"), to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
* to permit persons to whom the Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of
* the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
* THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
* CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
* IN THE SOFTWARE.
*/

package com.tencent.bk.job.common.sharding.mysql;

/**
* 分布式 ID KEY
*/
public class SegmentIdKeys {

public static final String KEY_JOB_EXECUTE_TASK_INSTANCE = "job_execute.task_instance";
public static final String KEY_JOB_EXECUTE_STEP_INSTANCE = "job_execute.step_instance";
public static final String KEY_JOB_EXECUTE_GSE_TASK = "job_execute.gse_task";
public static final String KEY_JOB_EXECUTE_OPERATION_LOG = "job_execute.operation_log";
public static final String KEY_JOB_EXECUTE_FILE_SOURCE_TASK_LOG = "job_execute.file_source_task_log";
public static final String KEY_JOB_EXECUTE_GSE_FILE_EXECUTE_OBJ_TASK = "job_execute.gse_file_execute_obj_task";
public static final String KEY_JOB_EXECUTE_GSE_SCRIPT_EXECUTE_OBJ_TASK =
"job_execute.gse_script_execute_obj_task";
public static final String KEY_JOB_EXECUTE_ROLLING_CONFIG = "job_execute.rolling_config";
public static final String KEY_JOB_EXECUTE_STEP_INSTANCE_ROLLING_TASK =
"job_execute.step_instance_rolling_task";
public static final String KEY_JOB_EXECUTE_STEP_INSTANCE_VARIABLE = "job_execute.step_instance_variable";
public static final String KEY_JOB_EXECUTE_TASK_INSTANCE_VARIABLE = "job_execute.task_instance_variable";
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,22 +22,16 @@
* IN THE SOFTWARE.
*/

package com.tencent.bk.job.backup.api.inner;
package com.tencent.bk.job.common.sharding.mysql;

import com.tencent.bk.job.backup.model.inner.ServiceArchiveDBRequest;
import com.tencent.bk.job.common.annotation.InternalAPI;
import com.tencent.bk.job.common.model.InternalResponse;
import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.tencent.bk.job.common.exception.InternalException;

@Api(tags = {"DB_Archive"})
@RequestMapping("/service/archiveDB")
@RestController
@InternalAPI
public interface ServiceArchiveResource {
@PostMapping
InternalResponse<?> archive(@RequestBody ServiceArchiveDBRequest request);
/**
* 分片配置解析异常
*/
public class ShardingConfigParseException extends InternalException {

public ShardingConfigParseException(String message) {
super(message);
}
}
Loading
Loading