You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by zh...@apache.org on 2020/09/19 14:53:44 UTC
[shardingsphere-elasticjob] branch master updated: Create a new
module for error-handler (#1469) (#1470)
This is an automated email from the ASF dual-hosted git repository.
zhangliang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere-elasticjob.git
The following commit(s) were added to refs/heads/master by this push:
new 6ad35e3 Create a new module for error-handler (#1469) (#1470)
6ad35e3 is described below
commit 6ad35e3e96f403ed26b74c4ad7ebf35dcb862e0c
Author: Tboy <gu...@immomo.com>
AuthorDate: Sat Sep 19 22:53:29 2020 +0800
Create a new module for error-handler (#1469) (#1470)
---
.../elasticjob-error-handler-email/pom.xml | 30 ++++++++++++++++++
.../elasticjob-error-handler-general}/pom.xml | 33 ++++++++-----------
.../elasticjob/error/handler}/JobErrorHandler.java | 2 +-
.../error/handler}/JobErrorHandlerFactory.java | 2 +-
.../error/handler}/impl/IgnoreJobErrorHandler.java | 4 +--
.../error/handler}/impl/LogJobErrorHandler.java | 4 +--
.../error/handler}/impl/ThrowJobErrorHandler.java | 4 +--
...sphere.elasticjob.error.handler.JobErrorHandler | 20 ++++++++++++
.../error/handler}/JobErrorHandlerFactoryTest.java | 6 ++--
.../handler}/impl/IgnoreJobErrorHandlerTest.java | 2 +-
.../handler}/impl/LogJobErrorHandlerTest.java | 2 +-
.../handler}/impl/ThrowJobErrorHandlerTest.java | 2 +-
.../elasticjob-error-handler-sms/pom.xml | 30 ++++++++++++++++++
elasticjob-error-handler/pom.xml | 37 ++++++++++++++++++++++
.../elasticjob-executor-kernel/pom.xml | 5 +++
.../elasticjob/executor/ElasticJobExecutor.java | 4 +--
pom.xml | 1 +
17 files changed, 152 insertions(+), 36 deletions(-)
diff --git a/elasticjob-error-handler/elasticjob-error-handler-email/pom.xml b/elasticjob-error-handler/elasticjob-error-handler-email/pom.xml
new file mode 100644
index 0000000..dc65635
--- /dev/null
+++ b/elasticjob-error-handler/elasticjob-error-handler-email/pom.xml
@@ -0,0 +1,30 @@
+<?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">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.apache.shardingsphere.elasticjob</groupId>
+ <artifactId>elasticjob-error-handler</artifactId>
+ <version>3.0.0-beta-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>elasticjob-error-handler-email</artifactId>
+</project>
diff --git a/elasticjob-executor/elasticjob-executor-kernel/pom.xml b/elasticjob-error-handler/elasticjob-error-handler-general/pom.xml
similarity index 67%
copy from elasticjob-executor/elasticjob-executor-kernel/pom.xml
copy to elasticjob-error-handler/elasticjob-error-handler-general/pom.xml
index cf404e4..1093a8c 100644
--- a/elasticjob-executor/elasticjob-executor-kernel/pom.xml
+++ b/elasticjob-error-handler/elasticjob-error-handler-general/pom.xml
@@ -8,7 +8,7 @@
~ 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.
@@ -16,33 +16,30 @@
~ 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">
+<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">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.apache.shardingsphere.elasticjob</groupId>
- <artifactId>elasticjob-executor</artifactId>
+ <artifactId>elasticjob-error-handler</artifactId>
<version>3.0.0-beta-SNAPSHOT</version>
</parent>
- <artifactId>elasticjob-executor-kernel</artifactId>
- <name>${project.artifactId}</name>
+
+ <artifactId>elasticjob-error-handler-general</artifactId>
<dependencies>
<dependency>
<groupId>org.apache.shardingsphere.elasticjob</groupId>
- <artifactId>elasticjob-api</artifactId>
- <version>${project.parent.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.shardingsphere.elasticjob</groupId>
<artifactId>elasticjob-infra-common</artifactId>
<version>${project.parent.version}</version>
</dependency>
+
<dependency>
- <groupId>org.apache.shardingsphere.elasticjob</groupId>
- <artifactId>elasticjob-tracing-api</artifactId>
- <version>${project.parent.version}</version>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
</dependency>
-
+
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
@@ -52,19 +49,15 @@
<groupId>junit</groupId>
<artifactId>junit</artifactId>
</dependency>
+
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
</dependency>
+
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-inline</artifactId>
</dependency>
-
- <dependency>
- <groupId>ch.qos.logback</groupId>
- <artifactId>logback-classic</artifactId>
- <scope>test</scope>
- </dependency>
</dependencies>
</project>
diff --git a/elasticjob-infra/elasticjob-infra-common/src/main/java/org/apache/shardingsphere/elasticjob/infra/handler/error/JobErrorHandler.java b/elasticjob-error-handler/elasticjob-error-handler-general/src/main/java/org/apache/shardingsphere/elasticjob/error/handler/JobErrorHandler.java
similarity index 94%
rename from elasticjob-infra/elasticjob-infra-common/src/main/java/org/apache/shardingsphere/elasticjob/infra/handler/error/JobErrorHandler.java
rename to elasticjob-error-handler/elasticjob-error-handler-general/src/main/java/org/apache/shardingsphere/elasticjob/error/handler/JobErrorHandler.java
index f438f1e..934b265 100644
--- a/elasticjob-infra/elasticjob-infra-common/src/main/java/org/apache/shardingsphere/elasticjob/infra/handler/error/JobErrorHandler.java
+++ b/elasticjob-error-handler/elasticjob-error-handler-general/src/main/java/org/apache/shardingsphere/elasticjob/error/handler/JobErrorHandler.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-package org.apache.shardingsphere.elasticjob.infra.handler.error;
+package org.apache.shardingsphere.elasticjob.error.handler;
import org.apache.shardingsphere.elasticjob.infra.spi.TypedSPI;
diff --git a/elasticjob-infra/elasticjob-infra-common/src/main/java/org/apache/shardingsphere/elasticjob/infra/handler/error/JobErrorHandlerFactory.java b/elasticjob-error-handler/elasticjob-error-handler-general/src/main/java/org/apache/shardingsphere/elasticjob/error/handler/JobErrorHandlerFactory.java
similarity index 96%
rename from elasticjob-infra/elasticjob-infra-common/src/main/java/org/apache/shardingsphere/elasticjob/infra/handler/error/JobErrorHandlerFactory.java
rename to elasticjob-error-handler/elasticjob-error-handler-general/src/main/java/org/apache/shardingsphere/elasticjob/error/handler/JobErrorHandlerFactory.java
index d97b79f..e401d5b 100644
--- a/elasticjob-infra/elasticjob-infra-common/src/main/java/org/apache/shardingsphere/elasticjob/infra/handler/error/JobErrorHandlerFactory.java
+++ b/elasticjob-error-handler/elasticjob-error-handler-general/src/main/java/org/apache/shardingsphere/elasticjob/error/handler/JobErrorHandlerFactory.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-package org.apache.shardingsphere.elasticjob.infra.handler.error;
+package org.apache.shardingsphere.elasticjob.error.handler;
import com.google.common.base.Strings;
import lombok.AccessLevel;
diff --git a/elasticjob-infra/elasticjob-infra-common/src/main/java/org/apache/shardingsphere/elasticjob/infra/handler/error/impl/IgnoreJobErrorHandler.java b/elasticjob-error-handler/elasticjob-error-handler-general/src/main/java/org/apache/shardingsphere/elasticjob/error/handler/impl/IgnoreJobErrorHandler.java
similarity index 87%
rename from elasticjob-infra/elasticjob-infra-common/src/main/java/org/apache/shardingsphere/elasticjob/infra/handler/error/impl/IgnoreJobErrorHandler.java
rename to elasticjob-error-handler/elasticjob-error-handler-general/src/main/java/org/apache/shardingsphere/elasticjob/error/handler/impl/IgnoreJobErrorHandler.java
index 70d82cd..87634c7 100644
--- a/elasticjob-infra/elasticjob-infra-common/src/main/java/org/apache/shardingsphere/elasticjob/infra/handler/error/impl/IgnoreJobErrorHandler.java
+++ b/elasticjob-error-handler/elasticjob-error-handler-general/src/main/java/org/apache/shardingsphere/elasticjob/error/handler/impl/IgnoreJobErrorHandler.java
@@ -15,9 +15,9 @@
* limitations under the License.
*/
-package org.apache.shardingsphere.elasticjob.infra.handler.error.impl;
+package org.apache.shardingsphere.elasticjob.error.handler.impl;
-import org.apache.shardingsphere.elasticjob.infra.handler.error.JobErrorHandler;
+import org.apache.shardingsphere.elasticjob.error.handler.JobErrorHandler;
/**
* Job error handler for ignore exception.
diff --git a/elasticjob-infra/elasticjob-infra-common/src/main/java/org/apache/shardingsphere/elasticjob/infra/handler/error/impl/LogJobErrorHandler.java b/elasticjob-error-handler/elasticjob-error-handler-general/src/main/java/org/apache/shardingsphere/elasticjob/error/handler/impl/LogJobErrorHandler.java
similarity index 89%
rename from elasticjob-infra/elasticjob-infra-common/src/main/java/org/apache/shardingsphere/elasticjob/infra/handler/error/impl/LogJobErrorHandler.java
rename to elasticjob-error-handler/elasticjob-error-handler-general/src/main/java/org/apache/shardingsphere/elasticjob/error/handler/impl/LogJobErrorHandler.java
index 6daab69..e0e8abc 100644
--- a/elasticjob-infra/elasticjob-infra-common/src/main/java/org/apache/shardingsphere/elasticjob/infra/handler/error/impl/LogJobErrorHandler.java
+++ b/elasticjob-error-handler/elasticjob-error-handler-general/src/main/java/org/apache/shardingsphere/elasticjob/error/handler/impl/LogJobErrorHandler.java
@@ -15,10 +15,10 @@
* limitations under the License.
*/
-package org.apache.shardingsphere.elasticjob.infra.handler.error.impl;
+package org.apache.shardingsphere.elasticjob.error.handler.impl;
-import org.apache.shardingsphere.elasticjob.infra.handler.error.JobErrorHandler;
import lombok.extern.slf4j.Slf4j;
+import org.apache.shardingsphere.elasticjob.error.handler.JobErrorHandler;
/**
* Job error handler for log error message.
diff --git a/elasticjob-infra/elasticjob-infra-common/src/main/java/org/apache/shardingsphere/elasticjob/infra/handler/error/impl/ThrowJobErrorHandler.java b/elasticjob-error-handler/elasticjob-error-handler-general/src/main/java/org/apache/shardingsphere/elasticjob/error/handler/impl/ThrowJobErrorHandler.java
similarity index 89%
rename from elasticjob-infra/elasticjob-infra-common/src/main/java/org/apache/shardingsphere/elasticjob/infra/handler/error/impl/ThrowJobErrorHandler.java
rename to elasticjob-error-handler/elasticjob-error-handler-general/src/main/java/org/apache/shardingsphere/elasticjob/error/handler/impl/ThrowJobErrorHandler.java
index 29c8d7d..e5607e6 100644
--- a/elasticjob-infra/elasticjob-infra-common/src/main/java/org/apache/shardingsphere/elasticjob/infra/handler/error/impl/ThrowJobErrorHandler.java
+++ b/elasticjob-error-handler/elasticjob-error-handler-general/src/main/java/org/apache/shardingsphere/elasticjob/error/handler/impl/ThrowJobErrorHandler.java
@@ -15,10 +15,10 @@
* limitations under the License.
*/
-package org.apache.shardingsphere.elasticjob.infra.handler.error.impl;
+package org.apache.shardingsphere.elasticjob.error.handler.impl;
+import org.apache.shardingsphere.elasticjob.error.handler.JobErrorHandler;
import org.apache.shardingsphere.elasticjob.infra.exception.JobSystemException;
-import org.apache.shardingsphere.elasticjob.infra.handler.error.JobErrorHandler;
/**
* Job error handler for throw exception.
diff --git a/elasticjob-error-handler/elasticjob-error-handler-general/src/main/resources/META-INF/services/org.apache.shardingsphere.elasticjob.error.handler.JobErrorHandler b/elasticjob-error-handler/elasticjob-error-handler-general/src/main/resources/META-INF/services/org.apache.shardingsphere.elasticjob.error.handler.JobErrorHandler
new file mode 100644
index 0000000..76db4ce
--- /dev/null
+++ b/elasticjob-error-handler/elasticjob-error-handler-general/src/main/resources/META-INF/services/org.apache.shardingsphere.elasticjob.error.handler.JobErrorHandler
@@ -0,0 +1,20 @@
+#
+# 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.
+#
+
+org.apache.shardingsphere.elasticjob.error.handler.impl.LogJobErrorHandler
+org.apache.shardingsphere.elasticjob.error.handler.impl.IgnoreJobErrorHandler
+org.apache.shardingsphere.elasticjob.error.handler.impl.ThrowJobErrorHandler
diff --git a/elasticjob-infra/elasticjob-infra-common/src/test/java/org/apache/shardingsphere/elasticjob/infra/handler/error/JobErrorHandlerFactoryTest.java b/elasticjob-error-handler/elasticjob-error-handler-general/src/test/java/org/apache/shardingsphere/elasticjob/error/handler/JobErrorHandlerFactoryTest.java
similarity index 86%
rename from elasticjob-infra/elasticjob-infra-common/src/test/java/org/apache/shardingsphere/elasticjob/infra/handler/error/JobErrorHandlerFactoryTest.java
rename to elasticjob-error-handler/elasticjob-error-handler-general/src/test/java/org/apache/shardingsphere/elasticjob/error/handler/JobErrorHandlerFactoryTest.java
index db19406..f9e5ec1 100644
--- a/elasticjob-infra/elasticjob-infra-common/src/test/java/org/apache/shardingsphere/elasticjob/infra/handler/error/JobErrorHandlerFactoryTest.java
+++ b/elasticjob-error-handler/elasticjob-error-handler-general/src/test/java/org/apache/shardingsphere/elasticjob/error/handler/JobErrorHandlerFactoryTest.java
@@ -15,11 +15,11 @@
* limitations under the License.
*/
-package org.apache.shardingsphere.elasticjob.infra.handler.error;
+package org.apache.shardingsphere.elasticjob.error.handler;
+import org.apache.shardingsphere.elasticjob.error.handler.impl.LogJobErrorHandler;
+import org.apache.shardingsphere.elasticjob.error.handler.impl.ThrowJobErrorHandler;
import org.apache.shardingsphere.elasticjob.infra.exception.JobConfigurationException;
-import org.apache.shardingsphere.elasticjob.infra.handler.error.impl.LogJobErrorHandler;
-import org.apache.shardingsphere.elasticjob.infra.handler.error.impl.ThrowJobErrorHandler;
import org.junit.Test;
import static org.hamcrest.CoreMatchers.instanceOf;
diff --git a/elasticjob-infra/elasticjob-infra-common/src/test/java/org/apache/shardingsphere/elasticjob/infra/handler/error/impl/IgnoreJobErrorHandlerTest.java b/elasticjob-error-handler/elasticjob-error-handler-general/src/test/java/org/apache/shardingsphere/elasticjob/error/handler/impl/IgnoreJobErrorHandlerTest.java
similarity index 93%
rename from elasticjob-infra/elasticjob-infra-common/src/test/java/org/apache/shardingsphere/elasticjob/infra/handler/error/impl/IgnoreJobErrorHandlerTest.java
rename to elasticjob-error-handler/elasticjob-error-handler-general/src/test/java/org/apache/shardingsphere/elasticjob/error/handler/impl/IgnoreJobErrorHandlerTest.java
index 69c35e9..f868ca2 100644
--- a/elasticjob-infra/elasticjob-infra-common/src/test/java/org/apache/shardingsphere/elasticjob/infra/handler/error/impl/IgnoreJobErrorHandlerTest.java
+++ b/elasticjob-error-handler/elasticjob-error-handler-general/src/test/java/org/apache/shardingsphere/elasticjob/error/handler/impl/IgnoreJobErrorHandlerTest.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-package org.apache.shardingsphere.elasticjob.infra.handler.error.impl;
+package org.apache.shardingsphere.elasticjob.error.handler.impl;
import org.junit.Test;
diff --git a/elasticjob-infra/elasticjob-infra-common/src/test/java/org/apache/shardingsphere/elasticjob/infra/handler/error/impl/LogJobErrorHandlerTest.java b/elasticjob-error-handler/elasticjob-error-handler-general/src/test/java/org/apache/shardingsphere/elasticjob/error/handler/impl/LogJobErrorHandlerTest.java
similarity index 96%
rename from elasticjob-infra/elasticjob-infra-common/src/test/java/org/apache/shardingsphere/elasticjob/infra/handler/error/impl/LogJobErrorHandlerTest.java
rename to elasticjob-error-handler/elasticjob-error-handler-general/src/test/java/org/apache/shardingsphere/elasticjob/error/handler/impl/LogJobErrorHandlerTest.java
index cf49563..3307881 100644
--- a/elasticjob-infra/elasticjob-infra-common/src/test/java/org/apache/shardingsphere/elasticjob/infra/handler/error/impl/LogJobErrorHandlerTest.java
+++ b/elasticjob-error-handler/elasticjob-error-handler-general/src/test/java/org/apache/shardingsphere/elasticjob/error/handler/impl/LogJobErrorHandlerTest.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-package org.apache.shardingsphere.elasticjob.infra.handler.error.impl;
+package org.apache.shardingsphere.elasticjob.error.handler.impl;
import lombok.SneakyThrows;
import org.junit.Test;
diff --git a/elasticjob-infra/elasticjob-infra-common/src/test/java/org/apache/shardingsphere/elasticjob/infra/handler/error/impl/ThrowJobErrorHandlerTest.java b/elasticjob-error-handler/elasticjob-error-handler-general/src/test/java/org/apache/shardingsphere/elasticjob/error/handler/impl/ThrowJobErrorHandlerTest.java
similarity index 94%
rename from elasticjob-infra/elasticjob-infra-common/src/test/java/org/apache/shardingsphere/elasticjob/infra/handler/error/impl/ThrowJobErrorHandlerTest.java
rename to elasticjob-error-handler/elasticjob-error-handler-general/src/test/java/org/apache/shardingsphere/elasticjob/error/handler/impl/ThrowJobErrorHandlerTest.java
index e23725d..1653900 100644
--- a/elasticjob-infra/elasticjob-infra-common/src/test/java/org/apache/shardingsphere/elasticjob/infra/handler/error/impl/ThrowJobErrorHandlerTest.java
+++ b/elasticjob-error-handler/elasticjob-error-handler-general/src/test/java/org/apache/shardingsphere/elasticjob/error/handler/impl/ThrowJobErrorHandlerTest.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-package org.apache.shardingsphere.elasticjob.infra.handler.error.impl;
+package org.apache.shardingsphere.elasticjob.error.handler.impl;
import org.apache.shardingsphere.elasticjob.infra.exception.JobSystemException;
import org.junit.Test;
diff --git a/elasticjob-error-handler/elasticjob-error-handler-sms/pom.xml b/elasticjob-error-handler/elasticjob-error-handler-sms/pom.xml
new file mode 100644
index 0000000..32bf986
--- /dev/null
+++ b/elasticjob-error-handler/elasticjob-error-handler-sms/pom.xml
@@ -0,0 +1,30 @@
+<?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">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.apache.shardingsphere.elasticjob</groupId>
+ <artifactId>elasticjob-error-handler</artifactId>
+ <version>3.0.0-beta-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>elasticjob-error-handler-sms</artifactId>
+</project>
diff --git a/elasticjob-error-handler/pom.xml b/elasticjob-error-handler/pom.xml
new file mode 100644
index 0000000..4c93759
--- /dev/null
+++ b/elasticjob-error-handler/pom.xml
@@ -0,0 +1,37 @@
+<?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">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.apache.shardingsphere.elasticjob</groupId>
+ <artifactId>elasticjob</artifactId>
+ <version>3.0.0-beta-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>elasticjob-error-handler</artifactId>
+ <packaging>pom</packaging>
+
+ <modules>
+ <module>elasticjob-error-handler-general</module>
+ <module>elasticjob-error-handler-email</module>
+ <module>elasticjob-error-handler-sms</module>
+ </modules>
+</project>
diff --git a/elasticjob-executor/elasticjob-executor-kernel/pom.xml b/elasticjob-executor/elasticjob-executor-kernel/pom.xml
index cf404e4..3681ee3 100644
--- a/elasticjob-executor/elasticjob-executor-kernel/pom.xml
+++ b/elasticjob-executor/elasticjob-executor-kernel/pom.xml
@@ -42,6 +42,11 @@
<artifactId>elasticjob-tracing-api</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.projectlombok</groupId>
diff --git a/elasticjob-executor/elasticjob-executor-kernel/src/main/java/org/apache/shardingsphere/elasticjob/executor/ElasticJobExecutor.java b/elasticjob-executor/elasticjob-executor-kernel/src/main/java/org/apache/shardingsphere/elasticjob/executor/ElasticJobExecutor.java
index a21428e..8e7dcf6 100644
--- a/elasticjob-executor/elasticjob-executor-kernel/src/main/java/org/apache/shardingsphere/elasticjob/executor/ElasticJobExecutor.java
+++ b/elasticjob-executor/elasticjob-executor-kernel/src/main/java/org/apache/shardingsphere/elasticjob/executor/ElasticJobExecutor.java
@@ -21,11 +21,11 @@ import lombok.extern.slf4j.Slf4j;
import org.apache.shardingsphere.elasticjob.api.ElasticJob;
import org.apache.shardingsphere.elasticjob.api.JobConfiguration;
import org.apache.shardingsphere.elasticjob.api.listener.ShardingContexts;
+import org.apache.shardingsphere.elasticjob.error.handler.JobErrorHandler;
+import org.apache.shardingsphere.elasticjob.error.handler.JobErrorHandlerFactory;
import org.apache.shardingsphere.elasticjob.infra.env.IpUtils;
import org.apache.shardingsphere.elasticjob.infra.exception.ExceptionUtils;
import org.apache.shardingsphere.elasticjob.infra.exception.JobExecutionEnvironmentException;
-import org.apache.shardingsphere.elasticjob.infra.handler.error.JobErrorHandler;
-import org.apache.shardingsphere.elasticjob.infra.handler.error.JobErrorHandlerFactory;
import org.apache.shardingsphere.elasticjob.infra.handler.threadpool.JobExecutorServiceHandlerFactory;
import org.apache.shardingsphere.elasticjob.executor.item.JobItemExecutor;
import org.apache.shardingsphere.elasticjob.executor.item.JobItemExecutorFactory;
diff --git a/pom.xml b/pom.xml
index e43cced..0d40804 100644
--- a/pom.xml
+++ b/pom.xml
@@ -33,6 +33,7 @@
<module>elasticjob-api</module>
<module>elasticjob-infra</module>
<module>elasticjob-executor</module>
+ <module>elasticjob-error-handler</module>
<module>elasticjob-lite</module>
<module>elasticjob-cloud</module>
<module>elasticjob-distribution</module>