-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
103 changed files
with
8,507 additions
and
6,499 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42 changes: 42 additions & 0 deletions
42
powerjob-common/src/main/java/tech/powerjob/common/enums/TaskTrackerBehavior.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
package tech.powerjob.common.enums; | ||
|
||
import lombok.AllArgsConstructor; | ||
import lombok.Getter; | ||
|
||
/** | ||
* TaskTracker 行为枚举 | ||
* | ||
* @author tjq | ||
* @since 2024/2/24 | ||
*/ | ||
@Getter | ||
@AllArgsConstructor | ||
public enum TaskTrackerBehavior { | ||
|
||
/** | ||
* 普通:不特殊处理,参与集群计算,会导致 TaskTracker 负载比常规节点高。适用于节点数不那么多,任务不那么繁重的场景 | ||
*/ | ||
NORMAL(1), | ||
/** | ||
* 划水:只负责管理节点,不参与计算,稳定性最优。适用于节点数量非常多的大规模计算场景,少一个计算节点来换取稳定性提升 | ||
*/ | ||
PADDLING(11) | ||
; | ||
|
||
|
||
private final Integer v; | ||
|
||
public static TaskTrackerBehavior of(Integer type) { | ||
|
||
if (type == null) { | ||
return NORMAL; | ||
} | ||
|
||
for (TaskTrackerBehavior t : values()) { | ||
if (t.v.equals(type)) { | ||
return t; | ||
} | ||
} | ||
return NORMAL; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
powerjob-common/src/main/java/tech/powerjob/common/model/JobAdvancedRuntimeConfig.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package tech.powerjob.common.model; | ||
|
||
import lombok.Getter; | ||
import lombok.Setter; | ||
import lombok.ToString; | ||
import lombok.experimental.Accessors; | ||
|
||
/** | ||
* 任务运行时高级配置 | ||
* | ||
* @author tjq | ||
* @since 2024/2/24 | ||
*/ | ||
@Getter | ||
@Setter | ||
@ToString | ||
@Accessors(chain = true) | ||
public class JobAdvancedRuntimeConfig { | ||
|
||
/** | ||
* MR 任务专享参数,TaskTracker 行为 {@link tech.powerjob.common.enums.TaskTrackerBehavior} | ||
*/ | ||
private Integer taskTrackerBehavior; | ||
|
||
} |
43 changes: 43 additions & 0 deletions
43
powerjob-common/src/main/java/tech/powerjob/common/model/TaskDetailInfo.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
package tech.powerjob.common.model; | ||
|
||
import lombok.Data; | ||
import lombok.experimental.Accessors; | ||
import tech.powerjob.common.PowerSerializable; | ||
|
||
/** | ||
* Task 详细信息 | ||
* | ||
* @author tjq | ||
* @since 2024/2/25 | ||
*/ | ||
@Data | ||
@Accessors(chain = true) | ||
public class TaskDetailInfo implements PowerSerializable { | ||
|
||
private String taskId; | ||
private String taskName; | ||
/** | ||
* 任务对象(map 的 subTask) | ||
*/ | ||
private String taskContent; | ||
/** | ||
* 处理器地址 | ||
*/ | ||
private String processorAddress; | ||
private Integer status; | ||
private String statusStr; | ||
private String result; | ||
private Integer failedCnt; | ||
/** | ||
* 创建时间 | ||
*/ | ||
private Long createdTime; | ||
/** | ||
* 最后修改时间 | ||
*/ | ||
private Long lastModifiedTime; | ||
/** | ||
* ProcessorTracker 最后上报时间 | ||
*/ | ||
private Long lastReportTime; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.