feature(executor): 增加Flink集群任务模块
新增 executor-manager 和 executor-task manager管理任务信息启停等,task执行业务方法
This commit is contained in:
14
service-executor/service-executor-core/pom.xml
Normal file
14
service-executor/service-executor-core/pom.xml
Normal file
@@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>com.lanyuanxiaoyao</groupId>
|
||||
<artifactId>service-executor</artifactId>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>service-executor-core</artifactId>
|
||||
|
||||
</project>
|
||||
@@ -0,0 +1,12 @@
|
||||
package com.lanyuanxiaoyao.service.executor.core;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* flink 执行任务信息
|
||||
*
|
||||
* @author lanyuanxiaoyao
|
||||
* @date 2023-12-04
|
||||
*/
|
||||
public class Task implements Serializable {
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package com.lanyuanxiaoyao.service.executor.core;
|
||||
|
||||
/**
|
||||
* 一些字符串
|
||||
*
|
||||
* @author lanyuanxiaoyao
|
||||
* @date 2023-12-04
|
||||
*/
|
||||
public interface TaskConstants {
|
||||
String TASK_CONTEXT = "task-context";
|
||||
String TASK_CONTEXT_OPTION = "-" + TASK_CONTEXT;
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
package com.lanyuanxiaoyao.service.executor.core;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* flink 任务信息上下文
|
||||
*
|
||||
* @author lanyuanxiaoyao
|
||||
* @date 2023-12-04
|
||||
*/
|
||||
public class TaskContext implements Serializable {
|
||||
private Map<String, Object> metadata;
|
||||
|
||||
public TaskContext() {
|
||||
}
|
||||
|
||||
public TaskContext(Map<String, Object> metadata) {
|
||||
this.metadata = metadata;
|
||||
}
|
||||
|
||||
public Map<String, Object> getMetadata() {
|
||||
return metadata;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "TaskContext{" +
|
||||
"metadata=" + metadata +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user