-
Notifications
You must be signed in to change notification settings - Fork 96
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #170 from stelin/1.x
Openjob API
- Loading branch information
Showing
103 changed files
with
2,135 additions
and
515 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ | |
import javax.validation.constraints.NotNull; | ||
|
||
/** | ||
* @author zhenghongyang <[email protected]> | ||
* @author zhenghongyang [email protected] | ||
* @since 1.0.0 | ||
*/ | ||
@Data | ||
|
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 |
---|---|---|
|
@@ -9,7 +9,7 @@ | |
import javax.validation.constraints.NotNull; | ||
|
||
/** | ||
* @author zhenghongyang <[email protected]> | ||
* @author zhenghongyang [email protected] | ||
* @since 1.0.0 | ||
*/ | ||
@Data | ||
|
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 |
---|---|---|
|
@@ -6,7 +6,7 @@ | |
import javax.validation.constraints.NotNull; | ||
|
||
/** | ||
* @author zhenghongyang <[email protected]> | ||
* @author zhenghongyang [email protected] | ||
* @since 1.0.0 | ||
*/ | ||
@Data | ||
|
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 |
---|---|---|
|
@@ -17,7 +17,7 @@ | |
import io.openjob.server.common.vo.PageVO; | ||
|
||
/** | ||
* @author zhenghongyang <[email protected]> | ||
* @author zhenghongyang [email protected] | ||
* @since 1.0.0 | ||
*/ | ||
public interface JobService { | ||
|
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 |
---|---|---|
|
@@ -34,7 +34,7 @@ | |
import java.util.stream.Collectors; | ||
|
||
/** | ||
* @author zhenghongyang <[email protected]> | ||
* @author zhenghongyang [email protected] | ||
* @since 1.0.0 | ||
*/ | ||
@Service | ||
|
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 |
---|---|---|
|
@@ -66,7 +66,7 @@ | |
import java.util.stream.Collectors; | ||
|
||
/** | ||
* @author zhenghongyang <[email protected]> | ||
* @author zhenghongyang [email protected] | ||
* @since 1.0.0 | ||
*/ | ||
@Slf4j | ||
|
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 |
---|---|---|
|
@@ -4,7 +4,7 @@ | |
import lombok.Data; | ||
|
||
/** | ||
* @author zhenghongyang <[email protected]> | ||
* @author zhenghongyang [email protected] | ||
* @since 1.0.0 | ||
*/ | ||
@Data | ||
|
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 |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
import lombok.Data; | ||
|
||
/** | ||
* @author zhenghongyang <[email protected]> | ||
* @author zhenghongyang [email protected] | ||
* @since 1.0.0 | ||
*/ | ||
@Data | ||
|
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
25 changes: 25 additions & 0 deletions
25
...job-server-cluster/src/main/java/io/openjob/server/cluster/dto/WorkerHeartbeatReqDTO.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 io.openjob.server.cluster.dto; | ||
|
||
import lombok.Data; | ||
|
||
import java.util.List; | ||
|
||
/** | ||
* @author stelin [email protected] | ||
* @since 1.0.8 | ||
*/ | ||
@Data | ||
public class WorkerHeartbeatReqDTO { | ||
private Long appId; | ||
|
||
private String appName; | ||
|
||
private String address; | ||
|
||
private String version; | ||
|
||
/** | ||
* Running job instance ids. | ||
*/ | ||
private List<Long> runningJobInstanceIds; | ||
} |
28 changes: 28 additions & 0 deletions
28
...ob-server-cluster/src/main/java/io/openjob/server/cluster/dto/WorkerHeartbeatRespDTO.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,28 @@ | ||
package io.openjob.server.cluster.dto; | ||
|
||
import lombok.Data; | ||
|
||
import java.util.Set; | ||
|
||
/** | ||
* @author stelin [email protected] | ||
* @since 1.0.8 | ||
*/ | ||
@Data | ||
public class WorkerHeartbeatRespDTO { | ||
|
||
/** | ||
* Worker address list. | ||
*/ | ||
private Set<String> workerAddressList; | ||
|
||
/** | ||
* Cluster version | ||
*/ | ||
private Long clusterVersion; | ||
|
||
/** | ||
* Cluster delay version | ||
*/ | ||
private Long clusterDelayVersion; | ||
} |
47 changes: 47 additions & 0 deletions
47
...er-cluster/src/main/java/io/openjob/server/cluster/dto/WorkerJobInstanceStatusReqDTO.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,47 @@ | ||
package io.openjob.server.cluster.dto; | ||
|
||
import io.openjob.common.constant.FailStatusEnum; | ||
import io.openjob.common.constant.InstanceStatusEnum; | ||
import lombok.Data; | ||
|
||
/** | ||
* @author stelin [email protected] | ||
* @since 1.0.8 | ||
*/ | ||
@Data | ||
public class WorkerJobInstanceStatusReqDTO { | ||
/** | ||
* Job id. | ||
*/ | ||
private Long jobId; | ||
|
||
/** | ||
* Job instance id. | ||
*/ | ||
private Long jobInstanceId; | ||
|
||
/** | ||
* Current circleId. | ||
* Only for second delay task. | ||
*/ | ||
private Long circleId; | ||
|
||
/** | ||
* Job instance status. | ||
* | ||
* @see InstanceStatusEnum | ||
*/ | ||
private Integer status; | ||
|
||
/** | ||
* Fail status | ||
* | ||
* @see FailStatusEnum#getStatus() | ||
*/ | ||
private Integer failStatus; | ||
|
||
/** | ||
* Result | ||
*/ | ||
private String result; | ||
} |
11 changes: 11 additions & 0 deletions
11
...r-cluster/src/main/java/io/openjob/server/cluster/dto/WorkerJobInstanceStatusRespDTO.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,11 @@ | ||
package io.openjob.server.cluster.dto; | ||
|
||
import lombok.Data; | ||
|
||
/** | ||
* @author stelin [email protected] | ||
* @since 1.0.8 | ||
*/ | ||
@Data | ||
public class WorkerJobInstanceStatusRespDTO { | ||
} |
80 changes: 80 additions & 0 deletions
80
...cluster/src/main/java/io/openjob/server/cluster/dto/WorkerJobInstanceTaskBatchReqDTO.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,80 @@ | ||
package io.openjob.server.cluster.dto; | ||
|
||
import lombok.Data; | ||
|
||
import java.util.List; | ||
|
||
/** | ||
* @author stelin [email protected] | ||
* @since 1.0.8 | ||
*/ | ||
@Data | ||
public class WorkerJobInstanceTaskBatchReqDTO { | ||
private List<WorkerJobInstanceTaskReqDTO> taskRequestList; | ||
|
||
@Data | ||
public static class WorkerJobInstanceTaskReqDTO { | ||
/** | ||
* Job id. | ||
*/ | ||
private Long jobId; | ||
|
||
/** | ||
* Job instance id. | ||
*/ | ||
private Long jobInstanceId; | ||
|
||
/** | ||
* Dispatch version | ||
*/ | ||
private Long dispatchVersion; | ||
|
||
/** | ||
* Only for second delay task. | ||
*/ | ||
private Long circleId; | ||
|
||
/** | ||
* Task unique id. | ||
* like 'jobId_instanceId_taskId_circleId' | ||
*/ | ||
private String taskId; | ||
|
||
/** | ||
* Task parent unique id. | ||
* like 'jobId_instanceId_taskId_circleId' | ||
*/ | ||
private String parentTaskId; | ||
|
||
/** | ||
* Task name. | ||
* Only for map reduce task. | ||
*/ | ||
private String taskName; | ||
|
||
/** | ||
* Task status. | ||
*/ | ||
private Integer status; | ||
|
||
/** | ||
* Task result. | ||
*/ | ||
private String result; | ||
|
||
/** | ||
* Task worker address | ||
*/ | ||
private String workerAddress; | ||
|
||
/** | ||
* Task create time. | ||
*/ | ||
private Long createTime; | ||
|
||
/** | ||
* Task update time. | ||
*/ | ||
private Long updateTime; | ||
} | ||
} |
Oops, something went wrong.