Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge executor-kernel to kernel module #2323

Merged
merged 17 commits into from
Oct 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,11 @@
</parent>
<artifactId>elasticjob-api</artifactId>
<name>${project.artifactId}</name>

<dependencies>
<dependency>
<groupId>org.apache.shardingsphere</groupId>
<artifactId>shardingsphere-infra-spi</artifactId>
</dependency>
</dependencies>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@
* limitations under the License.
*/

package org.apache.shardingsphere.elasticjob.executor.item;
package org.apache.shardingsphere.elasticjob.spi;

import org.apache.shardingsphere.elasticjob.api.ElasticJob;
import org.apache.shardingsphere.elasticjob.api.ShardingContext;
import org.apache.shardingsphere.elasticjob.api.JobConfiguration;
import org.apache.shardingsphere.elasticjob.executor.JobFacade;
import org.apache.shardingsphere.elasticjob.spi.param.ShardingContext;
import org.apache.shardingsphere.elasticjob.spi.param.JobRuntimeService;

/**
* Job item executor.
Expand All @@ -34,8 +34,8 @@ public interface JobItemExecutor<T extends ElasticJob> {
*
* @param elasticJob elastic job
* @param jobConfig job configuration
* @param jobFacade job facade
* @param jobRuntimeService job runtime service
* @param shardingContext sharding context
*/
void process(T elasticJob, JobConfiguration jobConfig, JobFacade jobFacade, ShardingContext shardingContext);
void process(T elasticJob, JobConfiguration jobConfig, JobRuntimeService jobRuntimeService, ShardingContext shardingContext);
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,17 @@
* limitations under the License.
*/

package org.apache.shardingsphere.elasticjob.executor.fixture.job;
package org.apache.shardingsphere.elasticjob.spi.param;

import org.apache.shardingsphere.elasticjob.api.ElasticJob;
import org.apache.shardingsphere.elasticjob.api.ShardingContext;

public interface FooJob extends ElasticJob {
/**
* Job runtime service.
*/
public interface JobRuntimeService {

/**
* Do job.
* Judge job whether to need resharding.
*
* @param shardingContext sharding context
* @return need resharding or not
*/
void foo(ShardingContext shardingContext);
boolean isNeedSharding();
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* limitations under the License.
*/

package org.apache.shardingsphere.elasticjob.api;
package org.apache.shardingsphere.elasticjob.spi.param;

import lombok.Getter;
import lombok.RequiredArgsConstructor;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
* limitations under the License.
*/

package org.apache.shardingsphere.elasticjob.executor.item.impl;
package org.apache.shardingsphere.elasticjob.spi.type;

import org.apache.shardingsphere.elasticjob.api.ElasticJob;
import org.apache.shardingsphere.elasticjob.executor.item.JobItemExecutor;
import org.apache.shardingsphere.elasticjob.spi.JobItemExecutor;
import org.apache.shardingsphere.infra.spi.annotation.SingletonSPI;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
* limitations under the License.
*/

package org.apache.shardingsphere.elasticjob.executor.item.impl;
package org.apache.shardingsphere.elasticjob.spi.type;

import org.apache.shardingsphere.elasticjob.api.ElasticJob;
import org.apache.shardingsphere.elasticjob.executor.item.JobItemExecutor;
import org.apache.shardingsphere.elasticjob.spi.JobItemExecutor;
import org.apache.shardingsphere.infra.spi.annotation.SingletonSPI;
import org.apache.shardingsphere.infra.spi.type.typed.TypedSPI;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
package org.apache.shardingsphere.elasticjob.annotation.job;

import org.apache.shardingsphere.elasticjob.api.ElasticJob;
import org.apache.shardingsphere.elasticjob.api.ShardingContext;
import org.apache.shardingsphere.elasticjob.spi.param.ShardingContext;

public interface CustomJob extends ElasticJob {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
import org.apache.shardingsphere.elasticjob.annotation.ElasticJobProp;
import org.apache.shardingsphere.elasticjob.annotation.SimpleTracingConfigurationFactory;
import org.apache.shardingsphere.elasticjob.annotation.job.CustomJob;
import org.apache.shardingsphere.elasticjob.api.ShardingContext;
import org.apache.shardingsphere.elasticjob.spi.param.ShardingContext;

@ElasticJobConfiguration(
cron = "0/5 * * * * ?",
Expand Down
5 changes: 0 additions & 5 deletions ecosystem/error-handler/type/dingtalk/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,6 @@
<artifactId>elasticjob-error-handler-spi</artifactId>
<version>${project.parent.version}</version>
</dependency>
<dependency>
<groupId>org.apache.shardingsphere.elasticjob</groupId>
<artifactId>elasticjob-error-handler-general</artifactId>
<version>${project.parent.version}</version>
</dependency>
<dependency>
<groupId>org.apache.shardingsphere.elasticjob</groupId>
<artifactId>elasticjob-restful</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
package org.apache.shardingsphere.elasticjob.error.handler.dingtalk;

import org.apache.shardingsphere.elasticjob.error.handler.JobErrorHandlerPropertiesValidator;
import org.apache.shardingsphere.elasticjob.error.handler.JobPropertiesValidateRule;
import org.apache.shardingsphere.elasticjob.infra.validate.JobPropertiesValidateRule;

import java.util.Properties;

Expand Down
5 changes: 0 additions & 5 deletions ecosystem/error-handler/type/email/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,6 @@
<artifactId>elasticjob-error-handler-spi</artifactId>
<version>${project.parent.version}</version>
</dependency>
<dependency>
<groupId>org.apache.shardingsphere.elasticjob</groupId>
<artifactId>elasticjob-error-handler-general</artifactId>
<version>${project.parent.version}</version>
</dependency>

<dependency>
<groupId>com.sun.mail</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
package org.apache.shardingsphere.elasticjob.error.handler.email;

import org.apache.shardingsphere.elasticjob.error.handler.JobErrorHandlerPropertiesValidator;
import org.apache.shardingsphere.elasticjob.error.handler.JobPropertiesValidateRule;
import org.apache.shardingsphere.elasticjob.infra.validate.JobPropertiesValidateRule;

import java.util.Properties;

Expand Down
40 changes: 0 additions & 40 deletions ecosystem/error-handler/type/general/pom.xml

This file was deleted.

This file was deleted.

This file was deleted.

1 change: 0 additions & 1 deletion ecosystem/error-handler/type/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
<packaging>pom</packaging>

<modules>
<module>general</module>
<module>email</module>
<module>wechat</module>
<module>dingtalk</module>
Expand Down
5 changes: 0 additions & 5 deletions ecosystem/error-handler/type/wechat/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,6 @@
<artifactId>elasticjob-error-handler-spi</artifactId>
<version>${project.parent.version}</version>
</dependency>
<dependency>
<groupId>org.apache.shardingsphere.elasticjob</groupId>
<artifactId>elasticjob-error-handler-general</artifactId>
<version>${project.parent.version}</version>
</dependency>
<dependency>
<groupId>org.apache.shardingsphere.elasticjob</groupId>
<artifactId>elasticjob-restful</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
package org.apache.shardingsphere.elasticjob.error.handler.wechat;

import org.apache.shardingsphere.elasticjob.error.handler.JobErrorHandlerPropertiesValidator;
import org.apache.shardingsphere.elasticjob.error.handler.JobPropertiesValidateRule;
import org.apache.shardingsphere.elasticjob.infra.validate.JobPropertiesValidateRule;

import java.util.Properties;

Expand Down
56 changes: 0 additions & 56 deletions ecosystem/executor/kernel/pom.xml

This file was deleted.

Loading