mirror of
https://github.com/didi/KnowStreaming.git
synced 2025-12-24 11:52:08 +08:00
Update KnowStreaming Task模块简介.md
This commit is contained in:
@@ -199,16 +199,21 @@ public abstract class AbstractDispatchTask<E extends Comparable & EntifyIdInterf
|
|||||||
|
|
||||||
```java
|
```java
|
||||||
// 继承AbstractDispatchTask的抽象类,对Kafka集群进行负载均衡执行
|
// 继承AbstractDispatchTask的抽象类,对Kafka集群进行负载均衡执行
|
||||||
public abstract class AbstractClusterPhyDispatchTask extends AbstractDispatchTask<ClusterPhy> {
|
public abstract class AbstractClusterPhyDispatchTask extends AbstractDispatchTask<ClusterPhy> {
|
||||||
|
|
||||||
// 执行被分配的任务,具体由子类实现
|
// 执行被分配的任务,具体由子类实现
|
||||||
protected abstract TaskResult processSubTask(ClusterPhy clusterPhy, long triggerTimeUnitMs) throws Exception; // 返回所有的Kafka集群
|
protected abstract TaskResult processSubTask(ClusterPhy clusterPhy, long triggerTimeUnitMs) throws Exception;
|
||||||
|
|
||||||
|
// 返回所有的Kafka集群
|
||||||
@Override
|
@Override
|
||||||
public List<ClusterPhy> listAllTasks() {
|
public List<ClusterPhy> listAllTasks() {
|
||||||
return clusterPhyService.listAllClusters();
|
return clusterPhyService.listAllClusters();
|
||||||
}
|
}
|
||||||
|
|
||||||
// 执行被分配给该KS主机的Kafka集群任务
|
// 执行被分配给该KS主机的Kafka集群任务
|
||||||
@Override
|
@Override
|
||||||
public TaskResult processTask(List<ClusterPhy> subTaskList, long triggerTimeUnitMs) { // ... }
|
public TaskResult processTask(List<ClusterPhy> subTaskList, long triggerTimeUnitMs) { // ... }
|
||||||
|
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user