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/07/12 13:28:45 UTC

[shardingsphere-elasticjob-lite] branch master updated: Refactor LocalTaskExecutor (#1033)

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-lite.git


The following commit(s) were added to refs/heads/master by this push:
     new 8fd42ec  Refactor LocalTaskExecutor (#1033)
8fd42ec is described below

commit 8fd42ec9faa504f71d138993bc717b7594127286
Author: Liang Zhang <te...@163.com>
AuthorDate: Sun Jul 12 21:28:38 2020 +0800

    Refactor LocalTaskExecutor (#1033)
    
    * Remove JobExceptionHandler
    
    * Remove ExecutorServiceHandler
    
    * Remove cloud.JobFacade
    
    * Remove useless test suits
    
    * Rename elastic-job to elasticjob
    
    * Decouple LocalCloudJobConfiguration and JobRootConfiguration
    
    * Refactor LocalTaskExecutor
    
    * Remove LocalCloudJobConfiguration
---
 .../elasticjob/cloud/executor/JobFacade.java       | 142 ---------------------
 .../executor/handler/ExecutorServiceHandler.java   |  35 -----
 .../handler/ExecutorServiceHandlerRegistry.java    |  57 ---------
 .../executor/handler/JobExceptionHandler.java      |  32 -----
 .../impl/DefaultExecutorServiceHandler.java        |  34 -----
 .../handler/impl/DefaultJobExceptionHandler.java   |  33 -----
 .../ExecutorServiceHandlerRegistryTest.java        |  92 -------------
 .../impl/DefaultJobExceptionHandlerTest.java       |  39 ------
 .../executor/handler/impl/JobEventCaller.java      |  26 ----
 .../src/test/resources/logback-test.xml            |   2 +-
 .../elasticjob/cloud/executor/CloudJobFacade.java  |   8 +-
 .../cloud/executor/DaemonTaskScheduler.java        |   1 +
 .../cloud/executor/JobTypeConfigurationUtil.java   |   2 -
 .../executor/local/LocalCloudJobConfiguration.java |  50 --------
 .../cloud/executor/local/LocalTaskExecutor.java    |  90 +++++--------
 .../cloud/executor/CloudJobFacadeTest.java         |   6 +-
 .../executor/local/LocalTaskExecutorTest.java      |  28 ++--
 .../config/app/AllCloudAppConfigTests.java         |  29 -----
 .../config/job/AllCloudJobConfigTests.java         |  30 -----
 .../impl/AbstractJobExecutorServiceHandler.java    |   7 +-
 .../lite/console/util/HomeFolderUtils.java         |   2 +-
 .../lite/console/util/HomeFolderUtilsTest.java     |   2 +-
 22 files changed, 58 insertions(+), 689 deletions(-)

diff --git a/elasticjob-cloud/elasticjob-cloud-common/src/main/java/org/apache/shardingsphere/elasticjob/cloud/executor/JobFacade.java b/elasticjob-cloud/elasticjob-cloud-common/src/main/java/org/apache/shardingsphere/elasticjob/cloud/executor/JobFacade.java
deleted file mode 100755
index f6faf97..0000000
--- a/elasticjob-cloud/elasticjob-cloud-common/src/main/java/org/apache/shardingsphere/elasticjob/cloud/executor/JobFacade.java
+++ /dev/null
@@ -1,142 +0,0 @@
-/*
- * 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.shardingsphere.elasticjob.cloud.executor;
-
-import org.apache.shardingsphere.elasticjob.api.JobConfiguration;
-import org.apache.shardingsphere.elasticjob.api.listener.ShardingContexts;
-import org.apache.shardingsphere.elasticjob.cloud.config.JobTypeConfiguration;
-import org.apache.shardingsphere.elasticjob.infra.exception.JobExecutionEnvironmentException;
-import org.apache.shardingsphere.elasticjob.tracing.event.JobExecutionEvent;
-import org.apache.shardingsphere.elasticjob.tracing.event.JobStatusTraceEvent.State;
-
-import java.util.Collection;
-
-/**
- * Job facade.
- */
-public interface JobFacade {
-    
-    /**
-     * Load job root configuration.
-     *
-     * @param fromCache load from cache or not
-     * @return job root configuration
-     */
-    JobTypeConfiguration loadJobRootConfiguration(boolean fromCache);
-    
-    /**
-     * Load job configuration.
-     *
-     * @param fromCache load from cache or not
-     * @return job configuration
-     */
-    JobConfiguration loadJobConfiguration(boolean fromCache);
-    
-    /**
-     * check job execution environment.
-     *
-     * @throws JobExecutionEnvironmentException job execution environment exception
-     */
-    void checkJobExecutionEnvironment() throws JobExecutionEnvironmentException;
-    
-    /**
-     * Failover If necessary.
-     */
-    void failoverIfNecessary();
-    
-    /**
-     * Register job begin.
-     *
-     * @param shardingContexts sharding contexts
-     */
-    void registerJobBegin(ShardingContexts shardingContexts);
-    
-    /**
-     * Register job completed.
-     *
-     * @param shardingContexts sharding contexts
-     */
-    void registerJobCompleted(ShardingContexts shardingContexts);
-    
-    /**
-     * Get sharding contexts.
-     *
-     * @return sharding contexts
-     */
-    ShardingContexts getShardingContexts();
-    
-    /**
-     * Set task misfire flag.
-     *
-     * @param shardingItems sharding items to be set misfire flag
-     * @return whether satisfy misfire condition
-     */
-    boolean misfireIfRunning(Collection<Integer> shardingItems);
-    
-    /**
-     * Clear misfire flag.
-     *
-     * @param shardingItems sharding items to be cleared misfire flag
-     */
-    void clearMisfire(Collection<Integer> shardingItems);
-    
-    /**
-     * Judge job whether need to execute misfire tasks.
-     *
-     * @param shardingItems sharding items
-     * @return whether need to execute misfire tasks
-     */
-    boolean isExecuteMisfired(Collection<Integer> shardingItems);
-    
-    /**
-     * Judge job whether need resharding.
-     *
-     * @return whether need resharding
-     */
-    boolean isNeedSharding();
-    
-    /**
-     * Call before job executed.
-     *
-     * @param shardingContexts sharding contexts
-     */
-    void beforeJobExecuted(ShardingContexts shardingContexts);
-    
-    /**
-     * Call after job executed.
-     *
-     * @param shardingContexts sharding contexts
-     */
-    void afterJobExecuted(ShardingContexts shardingContexts);
-    
-    /**
-     * Post job execution event.
-     *
-     * @param jobExecutionEvent job execution event
-     */
-    void postJobExecutionEvent(JobExecutionEvent jobExecutionEvent);
-    
-    /**
-     * Post job status trace event.
-     *
-     * @param taskId task Id
-     * @param state job state
-     * @param message job message
-     */
-    void postJobStatusTraceEvent(String taskId, State state, String message);
-}
diff --git a/elasticjob-cloud/elasticjob-cloud-common/src/main/java/org/apache/shardingsphere/elasticjob/cloud/executor/handler/ExecutorServiceHandler.java b/elasticjob-cloud/elasticjob-cloud-common/src/main/java/org/apache/shardingsphere/elasticjob/cloud/executor/handler/ExecutorServiceHandler.java
deleted file mode 100755
index 21b995f..0000000
--- a/elasticjob-cloud/elasticjob-cloud-common/src/main/java/org/apache/shardingsphere/elasticjob/cloud/executor/handler/ExecutorServiceHandler.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * 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.shardingsphere.elasticjob.cloud.executor.handler;
-
-import java.util.concurrent.ExecutorService;
-
-/**
- * Executor service handler.
- */
-public interface ExecutorServiceHandler {
-    
-    /**
-     * Create executor service.
-     *
-     * @param jobName job name
-     *
-     * @return executor service
-     */
-    ExecutorService createExecutorService(String jobName);
-}
diff --git a/elasticjob-cloud/elasticjob-cloud-common/src/main/java/org/apache/shardingsphere/elasticjob/cloud/executor/handler/ExecutorServiceHandlerRegistry.java b/elasticjob-cloud/elasticjob-cloud-common/src/main/java/org/apache/shardingsphere/elasticjob/cloud/executor/handler/ExecutorServiceHandlerRegistry.java
deleted file mode 100755
index e36dd94..0000000
--- a/elasticjob-cloud/elasticjob-cloud-common/src/main/java/org/apache/shardingsphere/elasticjob/cloud/executor/handler/ExecutorServiceHandlerRegistry.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * 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.shardingsphere.elasticjob.cloud.executor.handler;
-
-import lombok.AccessLevel;
-import lombok.NoArgsConstructor;
-
-import java.util.HashMap;
-import java.util.Map;
-import java.util.concurrent.ExecutorService;
-
-/**
- * Executor service handler registry.
- */
-@NoArgsConstructor(access = AccessLevel.PRIVATE)
-public final class ExecutorServiceHandlerRegistry {
-    
-    private static final Map<String, ExecutorService> REGISTRY = new HashMap<>();
-
-    /**
-     * Get executor service handler.
-     *
-     * @param jobName job name
-     * @param executorServiceHandler executor service handler
-     * @return executor service
-     */
-    public static synchronized ExecutorService getExecutorServiceHandler(final String jobName, final ExecutorServiceHandler executorServiceHandler) {
-        if (!REGISTRY.containsKey(jobName)) {
-            REGISTRY.put(jobName, executorServiceHandler.createExecutorService(jobName));
-        }
-        return REGISTRY.get(jobName);
-    }
-
-    /**
-     * Remove executor service from executor service handler registry.
-     *
-     * @param jobName job name
-     */
-    public static synchronized void remove(final String jobName) {
-        REGISTRY.remove(jobName);
-    }
-}
diff --git a/elasticjob-cloud/elasticjob-cloud-common/src/main/java/org/apache/shardingsphere/elasticjob/cloud/executor/handler/JobExceptionHandler.java b/elasticjob-cloud/elasticjob-cloud-common/src/main/java/org/apache/shardingsphere/elasticjob/cloud/executor/handler/JobExceptionHandler.java
deleted file mode 100755
index 51ede85..0000000
--- a/elasticjob-cloud/elasticjob-cloud-common/src/main/java/org/apache/shardingsphere/elasticjob/cloud/executor/handler/JobExceptionHandler.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * 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.shardingsphere.elasticjob.cloud.executor.handler;
-
-/**
- * Job exception handler.
- */
-public interface JobExceptionHandler {
-
-    /**
-     * Handle exception.
-     *
-     * @param jobName job name
-     * @param cause cause
-     */
-    void handleException(String jobName, Throwable cause);
-}
diff --git a/elasticjob-cloud/elasticjob-cloud-common/src/main/java/org/apache/shardingsphere/elasticjob/cloud/executor/handler/impl/DefaultExecutorServiceHandler.java b/elasticjob-cloud/elasticjob-cloud-common/src/main/java/org/apache/shardingsphere/elasticjob/cloud/executor/handler/impl/DefaultExecutorServiceHandler.java
deleted file mode 100755
index afb4483..0000000
--- a/elasticjob-cloud/elasticjob-cloud-common/src/main/java/org/apache/shardingsphere/elasticjob/cloud/executor/handler/impl/DefaultExecutorServiceHandler.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * 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.shardingsphere.elasticjob.cloud.executor.handler.impl;
-
-import org.apache.shardingsphere.elasticjob.cloud.executor.handler.ExecutorServiceHandler;
-import org.apache.shardingsphere.elasticjob.infra.concurrent.ElasticJobExecutorService;
-
-import java.util.concurrent.ExecutorService;
-
-/**
- * Default executor service handler.
- */
-public final class DefaultExecutorServiceHandler implements ExecutorServiceHandler {
-    
-    @Override
-    public ExecutorService createExecutorService(final String jobName) {
-        return new ElasticJobExecutorService("inner-job-" + jobName, Runtime.getRuntime().availableProcessors() * 2).createExecutorService();
-    }
-}
diff --git a/elasticjob-cloud/elasticjob-cloud-common/src/main/java/org/apache/shardingsphere/elasticjob/cloud/executor/handler/impl/DefaultJobExceptionHandler.java b/elasticjob-cloud/elasticjob-cloud-common/src/main/java/org/apache/shardingsphere/elasticjob/cloud/executor/handler/impl/DefaultJobExceptionHandler.java
deleted file mode 100755
index 6402bf7..0000000
--- a/elasticjob-cloud/elasticjob-cloud-common/src/main/java/org/apache/shardingsphere/elasticjob/cloud/executor/handler/impl/DefaultJobExceptionHandler.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * 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.shardingsphere.elasticjob.cloud.executor.handler.impl;
-
-import org.apache.shardingsphere.elasticjob.cloud.executor.handler.JobExceptionHandler;
-import lombok.extern.slf4j.Slf4j;
-
-/**
- * Default job exception handler.
- */
-@Slf4j
-public final class DefaultJobExceptionHandler implements JobExceptionHandler {
-    
-    @Override
-    public void handleException(final String jobName, final Throwable cause) {
-        log.error(String.format("Job '%s' exception occur in job processing", jobName), cause);
-    }
-}
diff --git a/elasticjob-cloud/elasticjob-cloud-common/src/test/java/org/apache/shardingsphere/elasticjob/cloud/executor/handler/ExecutorServiceHandlerRegistryTest.java b/elasticjob-cloud/elasticjob-cloud-common/src/test/java/org/apache/shardingsphere/elasticjob/cloud/executor/handler/ExecutorServiceHandlerRegistryTest.java
deleted file mode 100755
index 43b50b4..0000000
--- a/elasticjob-cloud/elasticjob-cloud-common/src/test/java/org/apache/shardingsphere/elasticjob/cloud/executor/handler/ExecutorServiceHandlerRegistryTest.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
- * 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.shardingsphere.elasticjob.cloud.executor.handler;
-
-import lombok.RequiredArgsConstructor;
-import org.apache.shardingsphere.elasticjob.cloud.executor.handler.impl.DefaultExecutorServiceHandler;
-import org.hamcrest.core.IsNot;
-import org.junit.After;
-import org.junit.Test;
-
-import java.util.Set;
-import java.util.concurrent.BrokenBarrierException;
-import java.util.concurrent.CopyOnWriteArraySet;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.CyclicBarrier;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Executors;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-public final class ExecutorServiceHandlerRegistryTest {
-    
-    @After
-    public void clear() {
-        ExecutorServiceHandlerRegistry.remove("test_job");
-    }
-    
-    @Test
-    public void assertRemove() {
-        ExecutorService actual = ExecutorServiceHandlerRegistry.getExecutorServiceHandler("test_job", new DefaultExecutorServiceHandler());
-        ExecutorServiceHandlerRegistry.remove("test_job");
-        assertThat(actual, IsNot.not(ExecutorServiceHandlerRegistry.getExecutorServiceHandler("test_job", new DefaultExecutorServiceHandler())));
-    }
-    
-    @Test
-    public void assertGetExecutorServiceHandlerForSameThread() {
-        assertThat(ExecutorServiceHandlerRegistry.getExecutorServiceHandler("test_job", new DefaultExecutorServiceHandler()),
-                is(ExecutorServiceHandlerRegistry.getExecutorServiceHandler("test_job", new DefaultExecutorServiceHandler())));
-    }
-    
-    @Test
-    public void assertGetExecutorServiceHandlerForConcurrent() throws InterruptedException {
-        int threadCount = 100;
-        CyclicBarrier barrier = new CyclicBarrier(threadCount);
-        ExecutorService executorService = Executors.newFixedThreadPool(threadCount);
-        CountDownLatch latch = new CountDownLatch(threadCount);
-        Set<ExecutorService> set = new CopyOnWriteArraySet<>();
-        for (int i = 0; i < threadCount; i++) {
-            executorService.submit(new GetExecutorServiceHandlerTask(barrier, latch, set));
-        }
-        latch.await();
-        assertThat(set.size(), is(1));
-        assertThat(ExecutorServiceHandlerRegistry.getExecutorServiceHandler("test_job", new DefaultExecutorServiceHandler()), is(set.iterator().next()));
-    }
-    
-    @RequiredArgsConstructor
-    class GetExecutorServiceHandlerTask implements Runnable {
-        
-        private final CyclicBarrier barrier;
-        
-        private final CountDownLatch latch;
-        
-        private final Set<ExecutorService> set;
-        
-        @Override
-        public void run() {
-            try {
-                barrier.await();
-            } catch (final InterruptedException | BrokenBarrierException ex) {
-                ex.printStackTrace();
-            }
-            set.add(ExecutorServiceHandlerRegistry.getExecutorServiceHandler("test_job", new DefaultExecutorServiceHandler()));
-            latch.countDown();
-        }
-    }
-}
diff --git a/elasticjob-cloud/elasticjob-cloud-common/src/test/java/org/apache/shardingsphere/elasticjob/cloud/executor/handler/impl/DefaultJobExceptionHandlerTest.java b/elasticjob-cloud/elasticjob-cloud-common/src/test/java/org/apache/shardingsphere/elasticjob/cloud/executor/handler/impl/DefaultJobExceptionHandlerTest.java
deleted file mode 100755
index 21f1bdb..0000000
--- a/elasticjob-cloud/elasticjob-cloud-common/src/test/java/org/apache/shardingsphere/elasticjob/cloud/executor/handler/impl/DefaultJobExceptionHandlerTest.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * 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.shardingsphere.elasticjob.cloud.executor.handler.impl;
-
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.mockito.Mock;
-import org.mockito.junit.MockitoJUnitRunner;
-
-import static org.mockito.Mockito.atMost;
-import static org.mockito.Mockito.verify;
-
-@RunWith(MockitoJUnitRunner.class)
-public final class DefaultJobExceptionHandlerTest {
-    
-    @Mock
-    private JobEventCaller caller;
-    
-    @Test
-    public void assertHandleException() {
-        new DefaultJobExceptionHandler().handleException("test_job", new RuntimeException("test"));
-        verify(caller, atMost(1)).call();
-    }
-}
diff --git a/elasticjob-cloud/elasticjob-cloud-common/src/test/java/org/apache/shardingsphere/elasticjob/cloud/executor/handler/impl/JobEventCaller.java b/elasticjob-cloud/elasticjob-cloud-common/src/test/java/org/apache/shardingsphere/elasticjob/cloud/executor/handler/impl/JobEventCaller.java
deleted file mode 100755
index 7bfc179..0000000
--- a/elasticjob-cloud/elasticjob-cloud-common/src/test/java/org/apache/shardingsphere/elasticjob/cloud/executor/handler/impl/JobEventCaller.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * 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.shardingsphere.elasticjob.cloud.executor.handler.impl;
-
-public interface JobEventCaller {
-
-    /**
-     * Call method.
-     */
-    void call();
-}
diff --git a/elasticjob-cloud/elasticjob-cloud-common/src/test/resources/logback-test.xml b/elasticjob-cloud/elasticjob-cloud-common/src/test/resources/logback-test.xml
index d66e541..c4ec5ae 100755
--- a/elasticjob-cloud/elasticjob-cloud-common/src/test/resources/logback-test.xml
+++ b/elasticjob-cloud/elasticjob-cloud-common/src/test/resources/logback-test.xml
@@ -38,6 +38,6 @@
     
     <logger name="org.apache.shardingsphere.elasticjob.tracing.rdb.listener.RDBTracingListenerConfiguration" level="OFF" />
     <logger name="org.apache.shardingsphere.elasticjob.tracing.JobEventBus" level="OFF" />
-    <logger name="org.apache.shardingsphere.elasticjob.cloud.executor.handler.impl.DefaultJobExceptionHandler" level="OFF" />
+    <logger name="org.apache.shardingsphere.elasticjob.infra.handler.error.impl.LogJobErrorHandler" level="OFF" />
     <logger name="org.apache.curator.framework.recipes.leader.LeaderSelector" level="OFF" />
 </configuration>
diff --git a/elasticjob-cloud/elasticjob-cloud-executor/src/main/java/org/apache/shardingsphere/elasticjob/cloud/executor/CloudJobFacade.java b/elasticjob-cloud/elasticjob-cloud-executor/src/main/java/org/apache/shardingsphere/elasticjob/cloud/executor/CloudJobFacade.java
index dab3558..10161e4 100755
--- a/elasticjob-cloud/elasticjob-cloud-executor/src/main/java/org/apache/shardingsphere/elasticjob/cloud/executor/CloudJobFacade.java
+++ b/elasticjob-cloud/elasticjob-cloud-executor/src/main/java/org/apache/shardingsphere/elasticjob/cloud/executor/CloudJobFacade.java
@@ -24,6 +24,7 @@ import org.apache.shardingsphere.elasticjob.cloud.api.JobType;
 import org.apache.shardingsphere.elasticjob.cloud.config.JobTypeConfiguration;
 import org.apache.shardingsphere.elasticjob.cloud.config.dataflow.DataflowJobConfiguration;
 import org.apache.shardingsphere.elasticjob.cloud.config.script.ScriptJobConfiguration;
+import org.apache.shardingsphere.elasticjob.executor.JobFacade;
 import org.apache.shardingsphere.elasticjob.infra.context.TaskContext;
 import org.apache.shardingsphere.elasticjob.tracing.JobEventBus;
 import org.apache.shardingsphere.elasticjob.tracing.event.JobExecutionEvent;
@@ -37,7 +38,7 @@ import java.util.Collection;
  * Cloud job facade.
  */
 @RequiredArgsConstructor
-public final class CloudJobFacade implements JobFacade, org.apache.shardingsphere.elasticjob.executor.JobFacade {
+public final class CloudJobFacade implements JobFacade {
     
     private final ShardingContexts shardingContexts;
     
@@ -46,11 +47,6 @@ public final class CloudJobFacade implements JobFacade, org.apache.shardingspher
     private final JobEventBus jobEventBus;
     
     @Override
-    public JobTypeConfiguration loadJobRootConfiguration(final boolean fromCache) {
-        return jobConfig;
-    }
-    
-    @Override
     public JobConfiguration loadJobConfiguration(final boolean fromCache) {
         JobConfiguration result = JobConfiguration.newBuilder(jobConfig.getCoreConfig().getJobName(), jobConfig.getCoreConfig().getShardingTotalCount())
                 .cron(jobConfig.getCoreConfig().getCron()).shardingItemParameters(jobConfig.getCoreConfig().getShardingItemParameters()).jobParameter(jobConfig.getCoreConfig().getJobParameter())
diff --git a/elasticjob-cloud/elasticjob-cloud-executor/src/main/java/org/apache/shardingsphere/elasticjob/cloud/executor/DaemonTaskScheduler.java b/elasticjob-cloud/elasticjob-cloud-executor/src/main/java/org/apache/shardingsphere/elasticjob/cloud/executor/DaemonTaskScheduler.java
index 90d00f3..eed5e4f 100755
--- a/elasticjob-cloud/elasticjob-cloud-executor/src/main/java/org/apache/shardingsphere/elasticjob/cloud/executor/DaemonTaskScheduler.java
+++ b/elasticjob-cloud/elasticjob-cloud-executor/src/main/java/org/apache/shardingsphere/elasticjob/cloud/executor/DaemonTaskScheduler.java
@@ -25,6 +25,7 @@ import org.apache.shardingsphere.elasticjob.api.ElasticJob;
 import org.apache.shardingsphere.elasticjob.api.listener.ShardingContexts;
 import org.apache.shardingsphere.elasticjob.cloud.config.JobCoreConfiguration;
 import org.apache.shardingsphere.elasticjob.executor.ElasticJobExecutor;
+import org.apache.shardingsphere.elasticjob.executor.JobFacade;
 import org.apache.shardingsphere.elasticjob.infra.exception.JobSystemException;
 import org.quartz.CronScheduleBuilder;
 import org.quartz.CronTrigger;
diff --git a/elasticjob-cloud/elasticjob-cloud-executor/src/main/java/org/apache/shardingsphere/elasticjob/cloud/executor/JobTypeConfigurationUtil.java b/elasticjob-cloud/elasticjob-cloud-executor/src/main/java/org/apache/shardingsphere/elasticjob/cloud/executor/JobTypeConfigurationUtil.java
index f7650dd..626acb8 100644
--- a/elasticjob-cloud/elasticjob-cloud-executor/src/main/java/org/apache/shardingsphere/elasticjob/cloud/executor/JobTypeConfigurationUtil.java
+++ b/elasticjob-cloud/elasticjob-cloud-executor/src/main/java/org/apache/shardingsphere/elasticjob/cloud/executor/JobTypeConfigurationUtil.java
@@ -46,8 +46,6 @@ public final class JobTypeConfigurationUtil {
         String jobName = jobConfigurationMap.get("jobName");
         String cron = jobConfigurationMap.get("cron");
         Preconditions.checkArgument(!Strings.isNullOrEmpty(jobName), "jobName can not be empty.");
-        Preconditions.checkArgument(!Strings.isNullOrEmpty(jobType), "jobType can not be empty.");
-        Preconditions.checkArgument(!Strings.isNullOrEmpty(jobClass), "jobClass can not be empty.");
         JobCoreConfiguration jobCoreConfig = JobCoreConfiguration.newBuilder(jobName, cron, ignoredShardingTotalCount)
                 .jobExecutorServiceHandlerType(jobConfigurationMap.get("executorServiceHandler")).jobErrorHandlerType(jobConfigurationMap.get("jobExceptionHandler")).build();
         if (JobType.DATAFLOW.name().equals(jobType)) {
diff --git a/elasticjob-cloud/elasticjob-cloud-executor/src/main/java/org/apache/shardingsphere/elasticjob/cloud/executor/local/LocalCloudJobConfiguration.java b/elasticjob-cloud/elasticjob-cloud-executor/src/main/java/org/apache/shardingsphere/elasticjob/cloud/executor/local/LocalCloudJobConfiguration.java
deleted file mode 100755
index d981790..0000000
--- a/elasticjob-cloud/elasticjob-cloud-executor/src/main/java/org/apache/shardingsphere/elasticjob/cloud/executor/local/LocalCloudJobConfiguration.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * 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.shardingsphere.elasticjob.cloud.executor.local;
-
-import org.apache.shardingsphere.elasticjob.cloud.config.JobRootConfiguration;
-import org.apache.shardingsphere.elasticjob.cloud.config.JobTypeConfiguration;
-import lombok.AllArgsConstructor;
-import lombok.Getter;
-import lombok.RequiredArgsConstructor;
-
-/**
- * Local cloud job configuration.
- */
-@RequiredArgsConstructor
-@AllArgsConstructor
-@Getter
-public final class LocalCloudJobConfiguration implements JobRootConfiguration {
-    
-    private final JobTypeConfiguration typeConfig;
-    
-    private final int shardingItem;
-    
-    private String beanName;
-    
-    private String applicationContext;
-    
-    /**
-     * Get job name.
-     *
-     * @return the job name
-     */
-    public String getJobName() {
-        return typeConfig.getCoreConfig().getJobName();
-    }
-}
diff --git a/elasticjob-cloud/elasticjob-cloud-executor/src/main/java/org/apache/shardingsphere/elasticjob/cloud/executor/local/LocalTaskExecutor.java b/elasticjob-cloud/elasticjob-cloud-executor/src/main/java/org/apache/shardingsphere/elasticjob/cloud/executor/local/LocalTaskExecutor.java
index 19a276d..86402b9 100755
--- a/elasticjob-cloud/elasticjob-cloud-executor/src/main/java/org/apache/shardingsphere/elasticjob/cloud/executor/local/LocalTaskExecutor.java
+++ b/elasticjob-cloud/elasticjob-cloud-executor/src/main/java/org/apache/shardingsphere/elasticjob/cloud/executor/local/LocalTaskExecutor.java
@@ -18,24 +18,18 @@
 package org.apache.shardingsphere.elasticjob.cloud.executor.local;
 
 import com.google.common.base.Joiner;
-import com.google.common.base.Strings;
+import lombok.AccessLevel;
 import lombok.RequiredArgsConstructor;
 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.cloud.api.JobType;
-import org.apache.shardingsphere.elasticjob.cloud.config.JobCoreConfiguration;
 import org.apache.shardingsphere.elasticjob.cloud.config.JobTypeConfiguration;
-import org.apache.shardingsphere.elasticjob.cloud.config.dataflow.DataflowJobConfiguration;
-import org.apache.shardingsphere.elasticjob.cloud.config.script.ScriptJobConfiguration;
 import org.apache.shardingsphere.elasticjob.cloud.executor.CloudJobFacade;
 import org.apache.shardingsphere.elasticjob.cloud.executor.JobTypeConfigurationUtil;
 import org.apache.shardingsphere.elasticjob.cloud.util.config.ShardingItemParameters;
-import org.apache.shardingsphere.elasticjob.dataflow.job.DataflowJob;
 import org.apache.shardingsphere.elasticjob.executor.ElasticJobExecutor;
-import org.apache.shardingsphere.elasticjob.infra.exception.JobSystemException;
-import org.apache.shardingsphere.elasticjob.simple.job.SimpleJob;
+import org.apache.shardingsphere.elasticjob.executor.JobFacade;
 import org.apache.shardingsphere.elasticjob.tracing.JobEventBus;
-import org.springframework.context.support.ClassPathXmlApplicationContext;
 
 import java.util.HashMap;
 import java.util.Map;
@@ -43,69 +37,55 @@ import java.util.Map;
 /**
  * Local task executor.
  */
-@RequiredArgsConstructor
+@RequiredArgsConstructor(access = AccessLevel.PRIVATE)
 public final class LocalTaskExecutor {
     
-    private final LocalCloudJobConfiguration localCloudJobConfiguration;
+    private final ElasticJob elasticJob;
+    
+    private final String elasticJobType;
+    
+    private final JobConfiguration jobConfiguration;
+    
+    private final int shardingItem;
+    
+    public LocalTaskExecutor(final ElasticJob elasticJob, final JobConfiguration jobConfiguration, final int shardingItem) {
+        this(elasticJob, null, jobConfiguration, shardingItem);
+    }
+    
+    public LocalTaskExecutor(final String elasticJobType, final JobConfiguration jobConfiguration, final int shardingItem) {
+        this(null, elasticJobType, jobConfiguration, shardingItem);
+    }
     
     /**
      * Execute job.
      */
     @SuppressWarnings("unchecked")
     public void execute() {
-        CloudJobFacade jobFacade = new CloudJobFacade(getShardingContexts(), getJobTypeConfiguration(), new JobEventBus());
-        ElasticJob elasticJob;
-        switch (localCloudJobConfiguration.getTypeConfig().getJobType()) {
-            case SIMPLE:
-                elasticJob = getJobInstance(SimpleJob.class);
-                break;
-            case DATAFLOW:
-                elasticJob = getJobInstance(DataflowJob.class);
-                break;
-            default:
-                elasticJob = null;
-        }
-        if (null == elasticJob) {
-            new ElasticJobExecutor("SCRIPT", jobFacade.loadJobConfiguration(true), jobFacade).execute();
-        } else {
-            new ElasticJobExecutor(elasticJob, jobFacade.loadJobConfiguration(true), jobFacade).execute();
-        }
+        createElasticJobExecutor(new CloudJobFacade(getShardingContexts(), getJobTypeConfiguration(), new JobEventBus())).execute();
+    }
+    
+    private ElasticJobExecutor createElasticJobExecutor(final JobFacade jobFacade) {
+        return null == elasticJob
+                ? new ElasticJobExecutor(elasticJobType, jobConfiguration, jobFacade)
+                : new ElasticJobExecutor(elasticJob, jobConfiguration, jobFacade);
     }
     
     private ShardingContexts getShardingContexts() {
-        JobCoreConfiguration coreConfig = localCloudJobConfiguration.getTypeConfig().getCoreConfig();
         Map<Integer, String> shardingItemMap = new HashMap<>(1, 1);
-        shardingItemMap.put(localCloudJobConfiguration.getShardingItem(),
-                new ShardingItemParameters(coreConfig.getShardingItemParameters()).getMap().get(localCloudJobConfiguration.getShardingItem()));
-        return new ShardingContexts(Joiner.on("@-@").join(localCloudJobConfiguration.getJobName(), localCloudJobConfiguration.getShardingItem(), "READY", "foo_slave_id", "foo_uuid"),
-                localCloudJobConfiguration.getJobName(), coreConfig.getShardingTotalCount(), coreConfig.getJobParameter(), shardingItemMap);
+        shardingItemMap.put(shardingItem, new ShardingItemParameters(jobConfiguration.getShardingItemParameters()).getMap().get(shardingItem));
+        return new ShardingContexts(Joiner.on("@-@").join(jobConfiguration.getJobName(), shardingItem, "READY", "foo_slave_id", "foo_uuid"),
+                jobConfiguration.getJobName(), jobConfiguration.getShardingTotalCount(), jobConfiguration.getJobParameter(), shardingItemMap);
     }
     
     private JobTypeConfiguration getJobTypeConfiguration() {
         Map<String, String> jobConfigurationMap = new HashMap<>();
-        jobConfigurationMap.put("jobClass", localCloudJobConfiguration.getTypeConfig().getJobClass());
-        jobConfigurationMap.put("jobType", localCloudJobConfiguration.getTypeConfig().getJobType().name());
-        jobConfigurationMap.put("jobName", localCloudJobConfiguration.getJobName());
-        if (JobType.DATAFLOW == localCloudJobConfiguration.getTypeConfig().getJobType()) {
-            jobConfigurationMap.put("streamingProcess", Boolean.toString(((DataflowJobConfiguration) localCloudJobConfiguration.getTypeConfig()).isStreamingProcess()));
-        } else if (JobType.SCRIPT == localCloudJobConfiguration.getTypeConfig().getJobType()) {
-            jobConfigurationMap.put("scriptCommandLine", ((ScriptJobConfiguration) localCloudJobConfiguration.getTypeConfig()).getScriptCommandLine());
+        jobConfigurationMap.put("jobName", jobConfiguration.getJobName());
+        if (jobConfiguration.getProps().containsKey("streaming.process")) {
+            jobConfigurationMap.put("streamingProcess", jobConfiguration.getProps().getProperty("streaming.process"));
         }
-        return JobTypeConfigurationUtil.createJobConfigurationContext(jobConfigurationMap);
-    }
-    
-    private <T extends ElasticJob> T getJobInstance(final Class<T> clazz) {
-        Object result;
-        if (Strings.isNullOrEmpty(localCloudJobConfiguration.getApplicationContext())) {
-            String jobClass = localCloudJobConfiguration.getTypeConfig().getJobClass();
-            try {
-                result = Class.forName(jobClass).newInstance();
-            } catch (final ReflectiveOperationException ex) {
-                throw new JobSystemException("Elastic-Job: Class '%s' initialize failure, the error message is '%s'.", jobClass, ex.getMessage());
-            }
-        } else {
-            result = new ClassPathXmlApplicationContext(localCloudJobConfiguration.getApplicationContext()).getBean(localCloudJobConfiguration.getBeanName());
+        if (jobConfiguration.getProps().containsKey("script.command.line")) {
+            jobConfigurationMap.put("scriptCommandLine", jobConfiguration.getProps().getProperty("script.command.line"));
         }
-        return clazz.cast(result);
+        return JobTypeConfigurationUtil.createJobConfigurationContext(jobConfigurationMap);
     }
 }
diff --git a/elasticjob-cloud/elasticjob-cloud-executor/src/test/java/org/apache/shardingsphere/elasticjob/cloud/executor/CloudJobFacadeTest.java b/elasticjob-cloud/elasticjob-cloud-executor/src/test/java/org/apache/shardingsphere/elasticjob/cloud/executor/CloudJobFacadeTest.java
index 553abec..df1d6fa 100755
--- a/elasticjob-cloud/elasticjob-cloud-executor/src/test/java/org/apache/shardingsphere/elasticjob/cloud/executor/CloudJobFacadeTest.java
+++ b/elasticjob-cloud/elasticjob-cloud-executor/src/test/java/org/apache/shardingsphere/elasticjob/cloud/executor/CloudJobFacadeTest.java
@@ -20,6 +20,7 @@ package org.apache.shardingsphere.elasticjob.cloud.executor;
 import org.apache.shardingsphere.elasticjob.api.ElasticJob;
 import org.apache.shardingsphere.elasticjob.api.listener.ShardingContexts;
 import org.apache.shardingsphere.elasticjob.cloud.api.JobType;
+import org.apache.shardingsphere.elasticjob.executor.JobFacade;
 import org.apache.shardingsphere.elasticjob.infra.context.ExecutionType;
 import org.apache.shardingsphere.elasticjob.infra.exception.JobExecutionEnvironmentException;
 import org.apache.shardingsphere.elasticjob.tracing.JobEventBus;
@@ -74,11 +75,6 @@ public class CloudJobFacadeTest {
     }
     
     @Test
-    public void assertLoadJobRootConfiguration() {
-        assertThat(jobFacade.loadJobRootConfiguration(true), is(jobConfig.getTypeConfig()));
-    }
-    
-    @Test
     public void assertCheckJobExecutionEnvironment() throws JobExecutionEnvironmentException {
         jobFacade.checkJobExecutionEnvironment();
     }
diff --git a/elasticjob-cloud/elasticjob-cloud-executor/src/test/java/org/apache/shardingsphere/elasticjob/cloud/executor/local/LocalTaskExecutorTest.java b/elasticjob-cloud/elasticjob-cloud-executor/src/test/java/org/apache/shardingsphere/elasticjob/cloud/executor/local/LocalTaskExecutorTest.java
index 2b9e9ac..0eb90a5 100755
--- a/elasticjob-cloud/elasticjob-cloud-executor/src/test/java/org/apache/shardingsphere/elasticjob/cloud/executor/local/LocalTaskExecutorTest.java
+++ b/elasticjob-cloud/elasticjob-cloud-executor/src/test/java/org/apache/shardingsphere/elasticjob/cloud/executor/local/LocalTaskExecutorTest.java
@@ -17,13 +17,11 @@
 
 package org.apache.shardingsphere.elasticjob.cloud.executor.local;
 
-import org.apache.shardingsphere.elasticjob.cloud.config.JobCoreConfiguration;
-import org.apache.shardingsphere.elasticjob.cloud.config.dataflow.DataflowJobConfiguration;
-import org.apache.shardingsphere.elasticjob.cloud.config.script.ScriptJobConfiguration;
-import org.apache.shardingsphere.elasticjob.cloud.config.simple.SimpleJobConfiguration;
+import org.apache.shardingsphere.elasticjob.api.JobConfiguration;
 import org.apache.shardingsphere.elasticjob.cloud.executor.local.fixture.TestDataflowJob;
 import org.apache.shardingsphere.elasticjob.cloud.executor.local.fixture.TestSimpleJob;
-import org.apache.shardingsphere.elasticjob.infra.exception.JobSystemException;
+import org.apache.shardingsphere.elasticjob.infra.exception.JobConfigurationException;
+import org.apache.shardingsphere.elasticjob.script.props.ScriptJobProperties;
 import org.junit.Before;
 import org.junit.Test;
 
@@ -51,8 +49,7 @@ public final class LocalTaskExecutorTest {
     
     @Test
     public void assertSimpleJob() {
-        new LocalTaskExecutor(new LocalCloudJobConfiguration(new SimpleJobConfiguration(JobCoreConfiguration
-                .newBuilder(TestSimpleJob.class.getSimpleName(), "*/2 * * * * ?", 3).build(), TestSimpleJob.class.getName()), 1)).execute();
+        new LocalTaskExecutor(new TestSimpleJob(), JobConfiguration.newBuilder(TestSimpleJob.class.getSimpleName(), 3).cron("*/2 * * * * ?").build(), 1).execute();
         assertThat(TestSimpleJob.getShardingContext().getJobName(), is(TestSimpleJob.class.getSimpleName()));
         assertThat(TestSimpleJob.getShardingContext().getShardingItem(), is(1));
         assertThat(TestSimpleJob.getShardingContext().getShardingTotalCount(), is(3));
@@ -63,9 +60,9 @@ public final class LocalTaskExecutorTest {
     
     @Test
     public void assertSpringSimpleJob() {
-        new LocalTaskExecutor(new LocalCloudJobConfiguration(new SimpleJobConfiguration(JobCoreConfiguration.newBuilder(
-                TestSimpleJob.class.getSimpleName(), "*/2 * * * * ?", 3).shardingItemParameters("0=Beijing,1=Shanghai,2=Guangzhou").jobParameter("dbName=dangdang").build(), 
-                TestSimpleJob.class.getName()), 1, "testSimpleJob", "applicationContext.xml")).execute();
+        new LocalTaskExecutor(new TestSimpleJob(), 
+                JobConfiguration.newBuilder(TestSimpleJob.class.getSimpleName(), 3).cron("*/2 * * * * ?")
+                        .shardingItemParameters("0=Beijing,1=Shanghai,2=Guangzhou").jobParameter("dbName=dangdang").build(), 1).execute();
         assertThat(TestSimpleJob.getShardingContext().getJobName(), is(TestSimpleJob.class.getSimpleName()));
         assertThat(TestSimpleJob.getShardingContext().getShardingTotalCount(), is(3));
         assertThat(TestSimpleJob.getShardingContext().getJobParameter(), is("dbName=dangdang"));
@@ -77,8 +74,7 @@ public final class LocalTaskExecutorTest {
     @Test
     public void assertDataflowJob() {
         TestDataflowJob.setInput(Arrays.asList("1", "2", "3"));
-        new LocalTaskExecutor(new LocalCloudJobConfiguration(new DataflowJobConfiguration(JobCoreConfiguration
-                .newBuilder(TestDataflowJob.class.getSimpleName(), "*/2 * * * * ?", 10).build(), TestDataflowJob.class.getName(), false), 5)).execute();
+        new LocalTaskExecutor(new TestDataflowJob(), JobConfiguration.newBuilder(TestDataflowJob.class.getSimpleName(), 10).cron("*/2 * * * * ?").build(), 5).execute();
         assertFalse(TestDataflowJob.getOutput().isEmpty());
         for (String each : TestDataflowJob.getOutput()) {
             assertTrue(each.endsWith("-d"));
@@ -87,8 +83,8 @@ public final class LocalTaskExecutorTest {
     
     @Test
     public void assertScriptJob() throws IOException {
-        new LocalTaskExecutor(new LocalCloudJobConfiguration(
-                new ScriptJobConfiguration(JobCoreConfiguration.newBuilder("TestScriptJob", "*/2 * * * * ?", 3).build(), buildScriptCommandLine()), 1)).execute();
+        new LocalTaskExecutor(new TestDataflowJob(), JobConfiguration.newBuilder("TestScriptJob", 3).cron("*/2 * * * * ?")
+                .setProperty(ScriptJobProperties.SCRIPT_KEY, buildScriptCommandLine()).build(), 1).execute();
     }
     
     private static String buildScriptCommandLine() throws IOException {
@@ -100,8 +96,8 @@ public final class LocalTaskExecutorTest {
         return result.toString();
     }
     
-    @Test(expected = JobSystemException.class)
+    @Test(expected = JobConfigurationException.class)
     public void assertNotExistsJobClass() {
-        new LocalTaskExecutor(new LocalCloudJobConfiguration(new SimpleJobConfiguration(JobCoreConfiguration.newBuilder("not exist", "*/2 * * * * ?", 3).build(), "not exist"), 1)).execute();
+        new LocalTaskExecutor("not exist", JobConfiguration.newBuilder("not exist", 3).cron("*/2 * * * * ?").build(), 1).execute();
     }
 }
diff --git a/elasticjob-cloud/elasticjob-cloud-scheduler/src/test/java/org/apache/shardingsphere/elasticjob/cloud/scheduler/config/app/AllCloudAppConfigTests.java b/elasticjob-cloud/elasticjob-cloud-scheduler/src/test/java/org/apache/shardingsphere/elasticjob/cloud/scheduler/config/app/AllCloudAppConfigTests.java
deleted file mode 100755
index 545f4b6..0000000
--- a/elasticjob-cloud/elasticjob-cloud-scheduler/src/test/java/org/apache/shardingsphere/elasticjob/cloud/scheduler/config/app/AllCloudAppConfigTests.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * 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.shardingsphere.elasticjob.cloud.scheduler.config.app;
-
-import org.junit.runner.RunWith;
-import org.junit.runners.Suite;
-
-@RunWith(Suite.class)
-@Suite.SuiteClasses({
-        CloudAppConfigurationNodeTest.class,
-        CloudAppConfigurationServiceTest.class
-    })
-public final class AllCloudAppConfigTests {
-}
diff --git a/elasticjob-cloud/elasticjob-cloud-scheduler/src/test/java/org/apache/shardingsphere/elasticjob/cloud/scheduler/config/job/AllCloudJobConfigTests.java b/elasticjob-cloud/elasticjob-cloud-scheduler/src/test/java/org/apache/shardingsphere/elasticjob/cloud/scheduler/config/job/AllCloudJobConfigTests.java
deleted file mode 100755
index 92a33cb..0000000
--- a/elasticjob-cloud/elasticjob-cloud-scheduler/src/test/java/org/apache/shardingsphere/elasticjob/cloud/scheduler/config/job/AllCloudJobConfigTests.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * 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.shardingsphere.elasticjob.cloud.scheduler.config.job;
-
-import org.junit.runner.RunWith;
-import org.junit.runners.Suite;
-
-@RunWith(Suite.class)
-@Suite.SuiteClasses({
-        CloudJobConfigurationNodeTest.class,
-        CloudJobConfigurationServiceTest.class,
-        CloudJobConfigurationListenerTest.class
-    })
-public class AllCloudJobConfigTests {
-}
diff --git a/elasticjob-infra/elasticjob-infra-common/src/main/java/org/apache/shardingsphere/elasticjob/infra/handler/threadpool/impl/AbstractJobExecutorServiceHandler.java b/elasticjob-infra/elasticjob-infra-common/src/main/java/org/apache/shardingsphere/elasticjob/infra/handler/threadpool/impl/AbstractJobExecutorServiceHandler.java
index 0b781fd..840370c 100644
--- a/elasticjob-infra/elasticjob-infra-common/src/main/java/org/apache/shardingsphere/elasticjob/infra/handler/threadpool/impl/AbstractJobExecutorServiceHandler.java
+++ b/elasticjob-infra/elasticjob-infra-common/src/main/java/org/apache/shardingsphere/elasticjob/infra/handler/threadpool/impl/AbstractJobExecutorServiceHandler.java
@@ -17,9 +17,10 @@
 
 package org.apache.shardingsphere.elasticjob.infra.handler.threadpool.impl;
 
-import java.util.concurrent.ExecutorService;
-import org.apache.shardingsphere.elasticjob.infra.handler.threadpool.JobExecutorServiceHandler;
 import org.apache.shardingsphere.elasticjob.infra.concurrent.ElasticJobExecutorService;
+import org.apache.shardingsphere.elasticjob.infra.handler.threadpool.JobExecutorServiceHandler;
+
+import java.util.concurrent.ExecutorService;
 
 /**
  * Abstract job executor service handler.
@@ -28,7 +29,7 @@ public abstract class AbstractJobExecutorServiceHandler implements JobExecutorSe
     
     @Override
     public ExecutorService createExecutorService(final String jobName) {
-        return new ElasticJobExecutorService("elastic-job-" + jobName, getPoolSize()).createExecutorService();
+        return new ElasticJobExecutorService("elasticjob-" + jobName, getPoolSize()).createExecutorService();
     }
     
     protected abstract int getPoolSize();
diff --git a/elasticjob-lite/elasticjob-lite-console/src/main/java/org/apache/shardingsphere/elasticjob/lite/console/util/HomeFolderUtils.java b/elasticjob-lite/elasticjob-lite-console/src/main/java/org/apache/shardingsphere/elasticjob/lite/console/util/HomeFolderUtils.java
index 0583b01..208ad82 100644
--- a/elasticjob-lite/elasticjob-lite-console/src/main/java/org/apache/shardingsphere/elasticjob/lite/console/util/HomeFolderUtils.java
+++ b/elasticjob-lite/elasticjob-lite-console/src/main/java/org/apache/shardingsphere/elasticjob/lite/console/util/HomeFolderUtils.java
@@ -30,7 +30,7 @@ public final class HomeFolderUtils {
     
     private static final String USER_HOME = System.getProperty("user.home");
     
-    private static final String CONSOLE_ROOT_FOLDER = ".elastic-job-console";
+    private static final String CONSOLE_ROOT_FOLDER = ".elasticjob-console";
     
     /**
      * Get file path in home folder.
diff --git a/elasticjob-lite/elasticjob-lite-console/src/test/java/org/apache/shardingsphere/elasticjob/lite/console/util/HomeFolderUtilsTest.java b/elasticjob-lite/elasticjob-lite-console/src/test/java/org/apache/shardingsphere/elasticjob/lite/console/util/HomeFolderUtilsTest.java
index 9754588..3c468c2 100644
--- a/elasticjob-lite/elasticjob-lite-console/src/test/java/org/apache/shardingsphere/elasticjob/lite/console/util/HomeFolderUtilsTest.java
+++ b/elasticjob-lite/elasticjob-lite-console/src/test/java/org/apache/shardingsphere/elasticjob/lite/console/util/HomeFolderUtilsTest.java
@@ -26,7 +26,7 @@ import static org.junit.Assert.assertThat;
 
 public final class HomeFolderUtilsTest {
     
-    private static final String HOME_FOLDER = System.getProperty("user.home") + File.separator + ".elastic-job-console" + File.separator;
+    private static final String HOME_FOLDER = System.getProperty("user.home") + File.separator + ".elasticjob-console" + File.separator;
     
     @Test
     public void assertGetFilePathInHomeFolder() {