Skip to content

Commit

Permalink
[feature] merge main
Browse files Browse the repository at this point in the history
  • Loading branch information
XiaoJiang521 committed Nov 13, 2023
2 parents 3211319 + 4c6b067 commit 1f58e49
Show file tree
Hide file tree
Showing 8 changed files with 35 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ datasource_list=(
"datasource-sqlserver-cdc"
"datasource-starrocks"
"datasource-mongodbcdc"
"datasource-mongodb"
)

# the datasource default version is 1.0.0, you can also choose a custom version. eg: 1.1.2: sh install-datasource.sh 2.1.2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
import org.apache.seatunnel.app.thirdparty.metrics.IEngineMetricsExtractor;
import org.apache.seatunnel.common.config.Common;
import org.apache.seatunnel.common.config.DeployMode;
import org.apache.seatunnel.common.utils.ExceptionUtils;
import org.apache.seatunnel.engine.client.SeaTunnelClient;
import org.apache.seatunnel.engine.client.job.ClientJobProxy;
import org.apache.seatunnel.engine.client.job.JobExecutionEnvironment;
Expand Down Expand Up @@ -76,7 +77,8 @@ public Result<Long> jobExecute(Integer userId, Long jobDefineId) {

public String writeJobConfigIntoConfFile(String jobConfig, Long jobDefineId) {
String projectRoot = System.getProperty("user.dir");
String filePath = projectRoot + "\\profile\\" + jobDefineId + ".conf";
String filePath =
projectRoot + File.separator + "profile" + File.separator + jobDefineId + ".conf";
try {
File file = new File(filePath);
if (!file.exists()) {
Expand Down Expand Up @@ -120,6 +122,7 @@ public Long executeJobBySeaTunnel(Integer userId, String filePath, Long jobInsta
});

} catch (ExecutionException | InterruptedException e) {
ExceptionUtils.getMessage(e);
throw new RuntimeException(e);
}
return jobInstanceId;
Expand Down Expand Up @@ -189,8 +192,14 @@ public Result<Void> jobStore(Integer userId, Long jobInstanceId) {
JobInstance jobInstance = jobInstanceDao.getJobInstance(jobInstanceId);

String projectRoot = System.getProperty("user.dir");
String filePath = projectRoot + "\\profile\\" + jobInstance.getJobDefineId() + ".conf";

String filePath =
projectRoot
+ File.separator
+ "profile"
+ File.separator
+ jobInstance.getJobDefineId()
+ ".conf";
log.info("jobStore filePath:{}", filePath);
SeaTunnelEngineProxy.getInstance()
.restoreJob(filePath, jobInstanceId, Long.valueOf(jobInstance.getJobEngineId()));
return Result.success();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ public Boolean updateVirtualTable(
VirtualTable virtualTable =
VirtualTable.builder()
.id(Long.valueOf(tableId))
.datasourceId(originalTable.getDatasourceId())
.datasourceId(Long.parseLong(req.getDatasourceId()))
.virtualDatabaseName(req.getDatabaseName())
.virtualTableName(req.getTableName())
.description(req.getDescription())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,7 @@ connector-datasource-mapper:
Doris:
businessMode:
- DATA_INTEGRATION
- DATA_REPLICA
sceneMode:
- SINGLE_TABLE

Expand Down
8 changes: 4 additions & 4 deletions seatunnel-ui/src/router/sync-task.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export default {
name: 'synchronization-definition',
component: components['projects-task-synchronization-definition'],
meta: {
title: '同步任务定义',
title: 'synchronization-definition',
activeMenu: 'projects',
showSide: true
// auth: 'project:seatunnel-task:view'
Expand All @@ -46,7 +46,7 @@ export default {
name: 'synchronization-definition-dag',
component: components['projects-task-synchronization-definition-dag'],
meta: {
title: '同步任务定义画布',
title: 'synchronization-definition-dag',
activeMenu: 'projects',
activeSide: '/task/synchronization-definition',
showSide: true,
Expand All @@ -58,7 +58,7 @@ export default {
name: 'synchronization-instance',
component: components['projects-task-synchronization-instance'],
meta: {
title: '同步任务实例',
title: 'synchronization-instance',
activeMenu: 'projects',
showSide: true
// auth: 'project:seatunnel-task-instance:view'
Expand All @@ -69,7 +69,7 @@ export default {
name: 'synchronization-instance-detail',
component: components['projects-task-synchronization-instance-detail'],
meta: {
title: '同步任务实例详情',
title: 'synchronization-instance-detail',
activeMenu: 'projects',
activeSide: '/task/synchronization-instance',
showSide: true,
Expand Down
4 changes: 2 additions & 2 deletions seatunnel-ui/src/router/virtual-tables.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export default {
name: 'virtual-tables-create',
component: components['virtual-tables-detail'],
meta: {
title: '虚拟表创建',
title: 'virtual-tables-create',
activeMenu: 'virtual-tables',
}
},
Expand All @@ -53,7 +53,7 @@ export default {
name: 'virtual-tables-editor',
component: components['virtual-tables-detail'],
meta: {
title: '虚拟表编辑',
title: 'virtual-tables-editor',
activeMenu: 'virtual-tables',
}
}
Expand Down
3 changes: 1 addition & 2 deletions seatunnel-ui/src/service/sync-task-definition/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,6 @@ export function queryTaskDetail(jobCode: string, taskCode: string): any {
})
}

// source类型,获取源名称
export function listSourceName(
jobId: string,
sceneMode: string,
Expand All @@ -161,7 +160,7 @@ export function listSourceName(
}
})
}
// sink类型,获取源名称

export function findSink(
jobId: string,
status: 'DOWNLOADED' | 'NOT_DOWNLOAD' | 'ALL' = 'DOWNLOADED'
Expand Down
13 changes: 13 additions & 0 deletions seatunnel-web-dist/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -363,6 +363,19 @@
</exclusions>
</dependency>

<dependency>
<groupId>org.apache.seatunnel</groupId>
<artifactId>datasource-mongodb</artifactId>
<version>${project.version}</version>
<scope>provided</scope>
<exclusions>
<exclusion>
<groupId>*</groupId>
<artifactId>*</artifactId>
</exclusion>
</exclusions>
</dependency>

<!-- jdbc driver -->
<dependency>
<groupId>com.oracle.database.jdbc</groupId>
Expand Down

0 comments on commit 1f58e49

Please sign in to comment.