forked from apache/dolphinscheduler
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add dolphinscheduler-scheduler module (apache#10360)
* Add dolphinscheduler-scheduler module
- Loading branch information
1 parent
5c6695d
commit 5c38ae9
Showing
25 changed files
with
520 additions
and
283 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
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
38 changes: 38 additions & 0 deletions
38
dolphinscheduler-scheduler-plugin/dolphinscheduler-scheduler-api/pom.xml
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,38 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
~ Licensed to the Apache Software Foundation (ASF) under one or more | ||
~ contributor license agreements. See the NOTICE file distributed with | ||
~ this work for additional information regarding copyright ownership. | ||
~ The ASF licenses this file to You under the Apache License, Version 2.0 | ||
~ (the "License"); you may not use this file except in compliance with | ||
~ the License. You may obtain a copy of the License at | ||
~ | ||
~ http://www.apache.org/licenses/LICENSE-2.0 | ||
~ | ||
~ Unless required by applicable law or agreed to in writing, software | ||
~ distributed under the License is distributed on an "AS IS" BASIS, | ||
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
~ See the License for the specific language governing permissions and | ||
~ limitations under the License. | ||
--> | ||
<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"> | ||
<parent> | ||
<groupId>org.apache.dolphinscheduler</groupId> | ||
<artifactId>dolphinscheduler-scheduler-plugin</artifactId> | ||
<version>3.0.1-alpha-SNAPSHOT</version> | ||
</parent> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<artifactId>dolphinscheduler-scheduler-api</artifactId> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>org.apache.dolphinscheduler</groupId> | ||
<artifactId>dolphinscheduler-dao</artifactId> | ||
<version>${project.version}</version> | ||
</dependency> | ||
</dependencies> | ||
|
||
</project> |
56 changes: 56 additions & 0 deletions
56
...r-scheduler-api/src/main/java/org/apache/dolphinscheduler/scheduler/api/SchedulerApi.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,56 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one or more | ||
* contributor license agreements. See the NOTICE file distributed with | ||
* this work for additional information regarding copyright ownership. | ||
* The ASF licenses this file to You under the Apache License, Version 2.0 | ||
* (the "License"); you may not use this file except in compliance with | ||
* the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package org.apache.dolphinscheduler.scheduler.api; | ||
|
||
import org.apache.dolphinscheduler.dao.entity.Schedule; | ||
|
||
/** | ||
* This is the interface for scheduler, contains methods to operate schedule task. | ||
*/ | ||
public interface SchedulerApi extends AutoCloseable { | ||
|
||
/** | ||
* Start the scheduler, if not start, the scheduler will not execute task. | ||
* | ||
* @throws SchedulerException if start failed. | ||
*/ | ||
void start() throws SchedulerException; | ||
|
||
/** | ||
* @param projectId project id, the schedule task belongs to. | ||
* @param schedule schedule metadata. | ||
* @throws SchedulerException if insert/update failed. | ||
*/ | ||
void insertOrUpdateScheduleTask(int projectId, Schedule schedule) throws SchedulerException; | ||
|
||
/** | ||
* Delete a schedule task. | ||
* | ||
* @param projectId project id, the schedule task belongs to. | ||
* @param scheduleId schedule id. | ||
* @throws SchedulerException if delete failed. | ||
*/ | ||
void deleteScheduleTask(int projectId, int scheduleId) throws SchedulerException; | ||
|
||
/** | ||
* Close the scheduler and release the resource. | ||
* | ||
* @throws SchedulerException if close failed. | ||
*/ | ||
void close() throws Exception; | ||
} |
Oops, something went wrong.