主頁 > 後端開發 > 利用ElasticJob來實作自動化分布式任務調度SpringBoot

利用ElasticJob來實作自動化分布式任務調度SpringBoot

2022-08-03 17:29:49 後端開發

今天我們來了解利用ElasticJob來實作自動化分布式任務調度SpringBoot定時任務前文展示quartz實作基于資料庫的分布式任務管理和job生命周期的控制,那在分布式場景下如何解決彈性調度、資源管控、以及作業治理等呢?針對這些功能前當當團隊開發了ElasticJob,2020 年 5 月 28 日ElasticJob成為 Apache ShardingSphere 的子專案;本文介紹ElasticJob以及SpringBoot的集成,@pdai

知識準備

需要對分布式任務的知識體系和ElasticJob有基本的理解,@pdai

什么是ElasticJob

ElasticJob 是面向互聯網生態和海量任務的分布式調度解決方案,由兩個相互獨立的子專案 ElasticJob-Lite 和 ElasticJob-Cloud 組成, 它通過彈性調度、資源管控、以及作業治理的功能,打造一個適用于互聯網場景的分布式調度解決方案,并通過開放的架構設計,提供多元化的作業生態, 它的各個產品使用統一的作業 API,開發者僅需一次開發,即可隨意部署,ElasticJob 已于 2020 年 5 月 28 日成為 Apache ShardingSphere 的子專案,

使用 ElasticJob 能夠讓開發工程師不再擔心任務的線性吞吐量提升等非功能需求,使他們能夠更加專注于面向業務編碼設計; 同時,它也能夠解放運維工程師,使他們不必再擔心任務的可用性和相關管理需求,只通過輕松的增加服務節點即可達到自動化運維的目的,

ElasticJob-Lite: 定位為輕量級無中心化解決方案,使用 jar 的形式提供分布式任務的協調服務,

SpringBoot定時任務 - 什么是ElasticJob?如何集成ElasticJob實作分布式任務調度?_elastic

Elasticjob-lite的案例- ??SpringBoot集成定時任務 - 分布式Elasticjob-lite方式??

ElasticJob-Cloud: 采用自研 Mesos Framework 的解決方案,額外提供資源治理、應用分發以及行程隔離等功能,

SpringBoot定時任務 - 什么是ElasticJob?如何集成ElasticJob實作分布式任務調度?_elastic_02

ElasticJob-Lite和ElasticJob-Cloud的區別

 

ElasticJob-Lite

ElasticJob-Cloud

無中心化

資源分配

不支持

支持

作業模式

常駐

常駐 + 瞬時

部署依賴

ZooKeeper

ZooKeeper + Mesos

實作案例

本例將展示ElasticJob-Lite集成Springboot的案例,案例參考自ElasticJob的官網,同時做了一些調整和issue修復,

POM依賴

ElaticJob針對SpringBoot集成的starter依賴,針對錯誤通知的依賴elasticjob-error-handler-xxx(如果需要的話)

對任務的記錄和追蹤是存放在DB的,所以需要配置JPA和MySQL/H2等,

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>

<dependency>
<groupId>org.apache.shardingsphere.elasticjob</groupId>
<artifactId>elasticjob-lite-spring-boot-starter</artifactId>
<version>3.0.1</version>
</dependency>
<dependency>
<groupId>org.apache.shardingsphere.elasticjob</groupId>
<artifactId>elasticjob-error-handler-dingtalk</artifactId>
<version>3.0.1</version>
</dependency>
<dependency>
<groupId>org.apache.shardingsphere.elasticjob</groupId>
<artifactId>elasticjob-error-handler-wechat</artifactId>
<version>3.0.1</version>
</dependency>
<dependency>
<groupId>org.apache.shardingsphere.elasticjob</groupId>
<artifactId>elasticjob-error-handler-email</artifactId>
<version>3.0.1</version>
</dependency>
<dependency>
<groupId>org.apache.curator</groupId>
<artifactId>curator-test</artifactId>
<version>5.2.0</version>
</dependency>

<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.42</version><!--$NO-MVN-MAN-VER$-->
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>

基礎Entity和Dao

Foo

/*
* 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 tech.pdai.springboot.elasticjob.lite.entity;

import java.io.Serializable;

public final class Foo implements Serializable {

private static final long serialVersionUID = 2706842871078949451L;

private final long id;

private final String location;

private Status status;

public Foo(final long id, final String location, final Status status){
this.id = id;
this.location = location;
this.status = status;
}

public long getId(){
return id;
}

public String getLocation(){
return location;
}

public Status getStatus(){
return status;
}

public void setStatus(final Status status){
this.status = status;
}

@Override
public String toString(){
return String.format("id: %s, location: %s, status: %s", id, location, status);
}

public enum Status {
TODO,
COMPLETED
}
}

dao

/*
* 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 tech.pdai.springboot.elasticjob.lite.repository;

import org.springframework.stereotype.Repository;
import tech.pdai.springboot.elasticjob.lite.entity.Foo;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

@Repository
public class FooRepository {

private final Map<Long, Foo> data = https://www.cnblogs.com/famens/p/new ConcurrentHashMap<>(300, 1);

public FooRepository(){
init();
}

private void init(){
addData(0L, 100L, "Beijing");
addData(100L, 200L, "Shanghai");
addData(200L, 300L, "Guangzhou");
}

private void addData(final long idFrom, final long idTo, final String location){
for (long i = idFrom; i < idTo; i++) {
data.put(i, new Foo(i, location, Foo.Status.TODO));
}
}

public List<Foo> findTodoData(final String location, final int limit){
List<Foo> result = new ArrayList<>(limit);
int count = 0;
for (Map.Entry<Long, Foo> each : data.entrySet()) {
Foo foo = each.getValue();
if (foo.getLocation().equals(location) && foo.getStatus() == Foo.Status.TODO) {
result.add(foo);
count++;
if (count == limit) {
break;
}
}
}
return result;
}

public void setCompleted(final long id){
data.get(id).setStatus(Foo.Status.COMPLETED);
}
}

Job定義

  • 基本的Job, 實作SimpleJob介面
/*
* 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 tech.pdai.springboot.elasticjob.lite.job;

import java.time.LocalDateTime;
import java.util.List;

import org.apache.shardingsphere.elasticjob.api.ShardingContext;
import org.apache.shardingsphere.elasticjob.simple.job.SimpleJob;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import tech.pdai.springboot.elasticjob.lite.entity.Foo;
import tech.pdai.springboot.elasticjob.lite.repository.FooRepository;

@Component
public class SpringBootSimpleJob implements SimpleJob {

private final Logger logger = LoggerFactory.getLogger(SpringBootSimpleJob.class);

@Autowired
private FooRepository fooRepository;

@Override
public void execute(final ShardingContext shardingContext){
logger.info("Item: {} | Time: {} | Thread: {} | {}",
shardingContext.getShardingItem(), LocalDateTime.now(), Thread.currentThread().getId(), "SIMPLE");
List<Foo> data = https://www.cnblogs.com/famens/p/fooRepository.findTodoData(shardingContext.getShardingParameter(), 10);
for (Foo each : data) {
fooRepository.setCompleted(each.getId());
}
}
}
  • 資料流處理Job, 實作DataflowJob介面
  • 例如:進口氣動球閥

包含兩個主要方法,一個是獲取資料的方法fetchData, 一個是處理資料的方法processData

/*
* 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 tech.pdai.springboot.elasticjob.lite.job;

import java.time.LocalDateTime;
import java.util.List;

import javax.annotation.Resource;

import org.apache.shardingsphere.elasticjob.api.ShardingContext;
import org.apache.shardingsphere.elasticjob.dataflow.job.DataflowJob;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;
import tech.pdai.springboot.elasticjob.lite.entity.Foo;
import tech.pdai.springboot.elasticjob.lite.repository.FooRepository;

@Component
public class SpringBootDataflowJob implements DataflowJob<Foo> {

private final Logger logger = LoggerFactory.getLogger(SpringBootDataflowJob.class);

@Resource
private FooRepository fooRepository;

@Override
public List<Foo> fetchData(final ShardingContext shardingContext){
logger.info("Item: {} | Time: {} | Thread: {} | {}",
shardingContext.getShardingItem(), LocalDateTime.now(), Thread.currentThread().getId(), "DATAFLOW FETCH");
return fooRepository.findTodoData(shardingContext.getShardingParameter(), 10);
}

@Override
public void processData(final ShardingContext shardingContext, final List<Foo> data){
logger.info("Item: {} | Time: {} | Thread: {} | {}",
shardingContext.getShardingItem(), LocalDateTime.now(), Thread.currentThread().getId(), "DATAFLOW PROCESS");
for (Foo each : data) {
fooRepository.setCompleted(each.getId());
}
}
}
  • 錯誤通知處理 - Email
/*
* 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 tech.pdai.springboot.elasticjob.lite.job;

import org.apache.shardingsphere.elasticjob.api.ShardingContext;
import org.apache.shardingsphere.elasticjob.simple.job.SimpleJob;
import org.springframework.stereotype.Component;

@Component
public class SpringBootOccurErrorNoticeEmailJob implements SimpleJob {

@Override
public void execute(final ShardingContext shardingContext){
throw new RuntimeException(String.format("An exception has occurred in Job, The parameter is %s", shardingContext.getShardingParameter()));
}
}
  • 錯誤通知處理 - Wechat
/*
* 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 tech.pdai.springboot.elasticjob.lite.job;

import org.apache.shardingsphere.elasticjob.api.ShardingContext;
import org.apache.shardingsphere.elasticjob.simple.job.SimpleJob;
import org.springframework.stereotype.Component;

@Component
public class SpringBootOccurErrorNoticeWechatJob implements SimpleJob {

@Override
public void execute(final ShardingContext shardingContext){
throw new RuntimeException(String.format("An exception has occurred in Job, The parameter is %s", shardingContext.getShardingParameter()));
}
}
  • 錯誤通知處理 - Dingtalk
/*
* 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 tech.pdai.springboot.elasticjob.lite.job;

import org.apache.shardingsphere.elasticjob.api.ShardingContext;
import org.apache.shardingsphere.elasticjob.simple.job.SimpleJob;
import org.springframework.stereotype.Component;

@Component
public class SpringBootOccurErrorNoticeDingtalkJob implements SimpleJob {

@Override
public void execute(final ShardingContext shardingContext){
throw new RuntimeException(String.format("An exception has occurred in Job, The parameter is %s", shardingContext.getShardingParameter()));
}
}

裝載配置

spring:
profiles:
active: dev

elasticjob:
tracing:
type: RDB
regCenter:
serverLists: localhost:6181
namespace: elasticjob-lite-springboot
jobs:
simpleJob:
elasticJobClass: tech.pdai.springboot.elasticjob.lite.job.SpringBootSimpleJob
cron: 0/5 * * * * ?
shardingTotalCount: 3
shardingItemParameters: 0=Beijing,1=Shanghai,2=Guangzhou
dataflowJob:
elasticJobClass: tech.pdai.springboot.elasticjob.lite.job.SpringBootDataflowJob
cron: 0/5 * * * * ?
shardingTotalCount: 3
shardingItemParameters: 0=Beijing,1=Shanghai,2=Guangzhou
scriptJob:
elasticJobType: SCRIPT
cron: 0/10 * * * * ?
shardingTotalCount: 3
props:
script.command.line: "echo SCRIPT Job: "
occurErrorNoticeDingtalkJob:
elasticJobClass: tech.pdai.springboot.elasticjob.lite.job.SpringBootOccurErrorNoticeDingtalkJob
overwrite: true
shardingTotalCount: 3
shardingItemParameters: 0=Beijing,1=Shanghai,2=Guangzhou
jobErrorHandlerType: DINGTALK
jobBootstrapBeanName: occurErrorNoticeDingtalkBean
props:
dingtalk:
webhook: you_webhook
keyword: you_keyword
secret: you_secret
connectTimeout: 3000
readTimeout: 5000
occurErrorNoticeWechatJob:
elasticJobClass: tech.pdai.springboot.elasticjob.lite.job.SpringBootOccurErrorNoticeWechatJob
overwrite: true
shardingTotalCount: 3
shardingItemParameters: 0=Beijing,1=Shanghai,2=Guangzhou
jobErrorHandlerType: WECHAT
jobBootstrapBeanName: occurErrorNoticeWechatBean
props:
wechat:
webhook: you_webhook
connectTimeout: 3000
readTimeout: 5000
occurErrorNoticeEmailJob:
elasticJobClass: tech.pdai.springboot.elasticjob.lite.job.SpringBootOccurErrorNoticeEmailJob
overwrite: true
shardingTotalCount: 3
shardingItemParameters: 0=Beijing,1=Shanghai,2=Guangzhou
jobErrorHandlerType: EMAIL
jobBootstrapBeanName: occurErrorNoticeEmailBean
props:
email:
host: host
port: 465
username: username
password: password
useSsl: true
subject: ElasticJob error message
from: [email protected]
to: [email protected],[email protected]
cc: [email protected]
bcc: [email protected]
debug: false
dump:
port: 9888

knife4j:
enable: true
setting:
# default lang
language: en-US
# footer
enableFooter: false
enableFooterCustom: true
footerCustomContent: MIT | [Java 全堆疊](https://pdai.tech)
# models
enableSwaggerModels: true
swaggerModelName: My Models

注冊中心主要依賴ZK, 才用內置的zk.

/*
* 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 tech.pdai.springboot.elasticjob.lite;

import java.io.File;
import java.io.IOException;

import org.apache.curator.test.TestingServer;

/**
* Embed ZooKeeper.
*
* <p>
* Only used for examples
* </p>
*/
public final class EmbedZookeeperServer {

private static TestingServer testingServer;

/**
* Embed ZooKeeper.
*
* @param port ZooKeeper port
*/
public static void start(final int port){
try {
testingServer = new TestingServer(port, new File(String.format("target/test_zk_data/%s/", System.nanoTime())));
} catch (final Exception ex) {
ex.printStackTrace();
} finally {
Runtime.getRuntime().addShutdownHook(new Thread(() -> {
try {
Thread.sleep(1000L);
testingServer.close();
} catch (final InterruptedException | IOException ignore) {
}
}));
}
}
}

任務持久化,本地環境

測驗觸發

通過controller介面觸發測驗例外通知功能,

/*
* 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 tech.pdai.springboot.elasticjob.lite.controller;

import javax.annotation.Resource;

import io.swagger.annotations.ApiOperation;
import org.apache.shardingsphere.elasticjob.lite.api.bootstrap.impl.OneOffJobBootstrap;
import org.springframework.context.annotation.Lazy;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import tech.pdai.springboot.elasticjob.lite.entity.response.ResponseResult;

/**
* 這里需要加上@Lazy, 請看這個issue:https://github.com/apache/shardingsphere-elasticjob/issues/2014
*/
@Lazy
@RestController
public class OneOffJobController {

@Resource(name = "occurErrorNoticeDingtalkBean")
private OneOffJobBootstrap occurErrorNoticeDingtalkJob;

@Resource(name = "occurErrorNoticeWechatBean")
private OneOffJobBootstrap occurErrorNoticeWechatJob;

@Resource(name = "occurErrorNoticeEmailBean")
private OneOffJobBootstrap occurErrorNoticeEmailJob;

@ApiOperation("Test occurErrorNoticeDingtalkJob")
@GetMapping("/execute/occurErrorNoticeDingtalkJob")
public ResponseResult<String> executeOneOffJob(){
occurErrorNoticeDingtalkJob.execute();
return ResponseResult.success();
}

@ApiOperation("Test executeOccurErrorNoticeWechatJob")
@GetMapping("/execute/occurErrorNoticeWechatJob")
public ResponseResult<String> executeOccurErrorNoticeWechatJob(){
occurErrorNoticeWechatJob.execute();
return ResponseResult.success();
}

@ApiOperation("Test executeOccurErrorNoticeEmailJob")
@GetMapping("/execute/occurErrorNoticeEmailJob")
public ResponseResult<String> executeOccurErrorNoticeEmailJob(){
occurErrorNoticeEmailJob.execute();
return ResponseResult.success();
}
}

簡單測驗

非OneOff的任務,可以通過console查看相關日志

[WARN ] 2022-06-06 20:03:49,828 --Thread-1-- [org.apache.zookeeper.server.ServerCnxnFactory] maxCnxns is not configured, using default value 0. 

. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v2.5.3)

[INFO ] 2022-06-06 20:03:50,380 --main-- [tech.pdai.springboot.elasticjob.lite.SpringBootMain] Starting SpringBootMain using Java 1.8.0_181 on MacBook-Pro.local with PID 6275 (/Users/pdai/pdai/www/tech-pdai-spring-demos/424-springboot-demo-schedule-elastic-job-lite/target/classes started by pdai in /Users/pdai/pdai/www/tech-pdai-spring-demos)
[INFO ] 2022-06-06 20:03:50,380 --main-- [tech.pdai.springboot.elasticjob.lite.SpringBootMain] The following profiles are active: dev
[INFO ] 2022-06-06 20:03:51,464 --main-- [org.springframework.data.repository.config.RepositoryConfigurationDelegate] Bootstrapping Spring Data JPA repositories in DEFAULT mode.
[INFO ] 2022-06-06 20:03:51,479 --main-- [org.springframework.data.repository.config.RepositoryConfigurationDelegate] Finished Spring Data repository scanning in 6 ms. Found 0 JPA repository interfaces.
[INFO ] 2022-06-06 20:03:52,039 --main-- [org.springframework.boot.web.embedded.tomcat.TomcatWebServer] Tomcat initialized with port(s): 8080 (http)
[INFO ] 2022-06-06 20:03:52,048 --main-- [org.apache.coyote.http11.Http11NioProtocol] Initializing ProtocolHandler ["http-nio-8080"]
[INFO ] 2022-06-06 20:03:52,049 --main-- [org.apache.catalina.core.StandardService] Starting service [Tomcat]
[INFO ] 2022-06-06 20:03:52,049 --main-- [org.apache.catalina.core.StandardEngine] Starting Servlet engine: [Apache Tomcat/9.0.50]
[INFO ] 2022-06-06 20:03:52,128 --main-- [org.apache.catalina.core.ContainerBase.[Tomcat].[localhost].[/]] Initializing Spring embedded WebApplicationContext
[INFO ] 2022-06-06 20:03:52,128 --main-- [org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext] Root WebApplicationContext: initialization completed in 1698 ms
[INFO ] 2022-06-06 20:03:52,156 --main-- [com.zaxxer.hikari.HikariDataSource] HikariPool-1 - Starting...
[INFO ] 2022-06-06 20:03:52,330 --main-- [com.zaxxer.hikari.HikariDataSource] HikariPool-1 - Start completed.
[INFO ] 2022-06-06 20:03:52,335 --main-- [org.springframework.boot.autoconfigure.h2.H2ConsoleAutoConfiguration] H2 console available at '/h2-console'. Database available at 'jdbc:h2:mem:job_event_storage'
[INFO ] 2022-06-06 20:03:52,472 --main-- [org.hibernate.jpa.internal.util.LogHelper] HHH000204: Processing PersistenceUnitInfo [name: default]
[INFO ] 2022-06-06 20:03:52,526 --main-- [org.hibernate.Version] HHH000412: Hibernate ORM core version 5.4.32.Final
[INFO ] 2022-06-06 20:03:52,656 --main-- [org.hibernate.annotations.common.Version] HCANN000001: Hibernate Commons Annotations {5.1.2.Final}
[INFO ] 2022-06-06 20:03:52,750 --main-- [org.hibernate.dialect.Dialect] HHH000400: Using dialect: org.hibernate.dialect.H2Dialect
[INFO ] 2022-06-06 20:03:52,939 --main-- [org.hibernate.engine.transaction.jta.platform.internal.JtaPlatformInitiator] HHH000490: Using JtaPlatform implementation: [org.hibernate.engine.transaction.jta.platform.internal.NoJtaPlatform]
[INFO ] 2022-06-06 20:03:52,950 --main-- [org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean] Initialized JPA EntityManagerFactory for persistence unit 'default'
[WARN ] 2022-06-06 20:03:53,163 --main-- [org.springframework.boot.autoconfigure.orm.jpa.JpaBaseConfiguration$JpaWebConfiguration] spring.jpa.open-in-view is enabled by default. Therefore, database queries may be performed during view rendering. Explicitly configure spring.jpa.open-in-view to disable this warning
[INFO ] 2022-06-06 20:03:53,719 --main-- [org.apache.shardingsphere.elasticjob.lite.internal.snapshot.SnapshotService] ElasticJob: Snapshot service is running on port '9888'
[INFO ] 2022-06-06 20:03:53,836 --main-- [org.apache.shardingsphere.elasticjob.lite.spring.boot.job.ElasticJobBootstrapConfiguration] creating Job Bootstrap Beans
[INFO ] 2022-06-06 20:03:53,868 --main-- [org.apache.shardingsphere.elasticjob.lite.spring.core.setup.SpringProxyJobClassNameProvider] create SpringProxyJobClassNameProvider
[INFO ] 2022-06-06 20:03:54,250 --main-- [org.quartz.impl.StdSchedulerFactory] Using default implementation for ThreadExecutor
[INFO ] 2022-06-06 20:03:54,258 --main-- [org.quartz.core.SchedulerSignalerImpl] Initialized Scheduler Signaller of type: class org.quartz.core.SchedulerSignalerImpl
[INFO ] 2022-06-06 20:03:54,258 --main-- [org.quartz.core.QuartzScheduler] Quartz Scheduler v.2.3.2 created.
[INFO ] 2022-06-06 20:03:54,258 --main-- [org.apache.shardingsphere.elasticjob.lite.internal.schedule.JobShutdownHookPlugin] Registering Quartz shutdown hook. simpleJob
[INFO ] 2022-06-06 20:03:54,258 --main-- [org.quartz.simpl.RAMJobStore] RAMJobStore initialized.
[INFO ] 2022-06-06 20:03:54,259 --main-- [org.quartz.core.QuartzScheduler] Scheduler meta-data: Quartz Scheduler (v2.3.2) 'simpleJob' with instanceId 'NON_CLUSTERED'
Scheduler class: 'org.quartz.core.QuartzScheduler' - running locally.
NOT STARTED.
Currently in standby mode.
Number of jobs executed: 0
Using thread pool 'org.quartz.simpl.SimpleThreadPool' - with 1 threads.
Using job-store 'org.quartz.simpl.RAMJobStore' - which does not support persistence. and is not clustered.

[INFO ] 2022-06-06 20:03:54,259 --main-- [org.quartz.impl.StdSchedulerFactory] Quartz scheduler 'simpleJob' initialized from an externally provided properties instance.
[INFO ] 2022-06-06 20:03:54,259 --main-- [org.quartz.impl.StdSchedulerFactory] Quartz scheduler version: 2.3.2
[INFO ] 2022-06-06 20:03:54,329 --main-- [org.quartz.impl.StdSchedulerFactory] Using default implementation for ThreadExecutor
[INFO ] 2022-06-06 20:03:54,330 --main-- [org.quartz.core.SchedulerSignalerImpl] Initialized Scheduler Signaller of type: class org.quartz.core.SchedulerSignalerImpl
[INFO ] 2022-06-06 20:03:54,330 --main-- [org.quartz.core.QuartzScheduler] Quartz Scheduler v.2.3.2 created.
[INFO ] 2022-06-06 20:03:54,330 --main-- [org.apache.shardingsphere.elasticjob.lite.internal.schedule.JobShutdownHookPlugin] Registering Quartz shutdown hook. dataflowJob
[INFO ] 2022-06-06 20:03:54,330 --main-- [org.quartz.simpl.RAMJobStore] RAMJobStore initialized.
[INFO ] 2022-06-06 20:03:54,330 --main-- [org.quartz.core.QuartzScheduler] Scheduler meta-data: Quartz Scheduler (v2.3.2) 'dataflowJob' with instanceId 'NON_CLUSTERED'
Scheduler class: 'org.quartz.core.QuartzScheduler' - running locally.
NOT STARTED.
Currently in standby mode.
Number of jobs executed: 0
Using thread pool 'org.quartz.simpl.SimpleThreadPool' - with 1 threads.
Using job-store 'org.quartz.simpl.RAMJobStore' - which does not support persistence. and is not clustered.

[INFO ] 2022-06-06 20:03:54,330 --main-- [org.quartz.impl.StdSchedulerFactory] Quartz scheduler 'dataflowJob' initialized from an externally provided properties instance.
[INFO ] 2022-06-06 20:03:54,330 --main-- [org.quartz.impl.StdSchedulerFactory] Quartz scheduler version: 2.3.2
[INFO ] 2022-06-06 20:03:54,360 --main-- [org.quartz.impl.StdSchedulerFactory] Using default implementation for ThreadExecutor
[INFO ] 2022-06-06 20:03:54,360 --main-- [org.quartz.core.SchedulerSignalerImpl] Initialized Scheduler Signaller of type: class org.quartz.core.SchedulerSignalerImpl
[INFO ] 2022-06-06 20:03:54,360 --main-- [org.quartz.core.QuartzScheduler] Quartz Scheduler v.2.3.2 created.
[INFO ] 2022-06-06 20:03:54,360 --main-- [org.apache.shardingsphere.elasticjob.lite.internal.schedule.JobShutdownHookPlugin] Registering Quartz shutdown hook. scriptJob
[INFO ] 2022-06-06 20:03:54,360 --main-- [org.quartz.simpl.RAMJobStore] RAMJobStore initialized.
[INFO ] 2022-06-06 20:03:54,360 --main-- [org.quartz.core.QuartzScheduler] Scheduler meta-data: Quartz Scheduler (v2.3.2) 'scriptJob' with instanceId 'NON_CLUSTERED'
Scheduler class: 'org.quartz.core.QuartzScheduler' - running locally.
NOT STARTED.
Currently in standby mode.
Number of jobs executed: 0
Using thread pool 'org.quartz.simpl.SimpleThreadPool' - with 1 threads.
Using job-store 'org.quartz.simpl.RAMJobStore' - which does not support persistence. and is not clustered.

[INFO ] 2022-06-06 20:03:54,360 --main-- [org.quartz.impl.StdSchedulerFactory] Quartz scheduler 'scriptJob' initialized from an externally provided properties instance.
[INFO ] 2022-06-06 20:03:54,360 --main-- [org.quartz.impl.StdSchedulerFactory] Quartz scheduler version: 2.3.2
[INFO ] 2022-06-06 20:03:54,387 --main-- [org.quartz.impl.StdSchedulerFactory] Using default implementation for ThreadExecutor
[INFO ] 2022-06-06 20:03:54,387 --main-- [org.quartz.core.SchedulerSignalerImpl] Initialized Scheduler Signaller of type: class org.quartz.core.SchedulerSignalerImpl
[INFO ] 2022-06-06 20:03:54,387 --main-- [org.quartz.core.QuartzScheduler] Quartz Scheduler v.2.3.2 created.
[INFO ] 2022-06-06 20:03:54,387 --main-- [org.apache.shardingsphere.elasticjob.lite.internal.schedule.JobShutdownHookPlugin] Registering Quartz shutdown hook. occurErrorNoticeDingtalkJob
[INFO ] 2022-06-06 20:03:54,387 --main-- [org.quartz.simpl.RAMJobStore] RAMJobStore initialized.
[INFO ] 2022-06-06 20:03:54,387 --main-- [org.quartz.core.QuartzScheduler] Scheduler meta-data: Quartz Scheduler (v2.3.2) 'occurErrorNoticeDingtalkJob' with instanceId 'NON_CLUSTERED'
Scheduler class: 'org.quartz.core.QuartzScheduler' - running locally.
NOT STARTED.
Currently in standby mode.
Number of jobs executed: 0
Using thread pool 'org.quartz.simpl.SimpleThreadPool' - with 1 threads.
Using job-store 'org.quartz.simpl.RAMJobStore' - which does not support persistence. and is not clustered.

[INFO ] 2022-06-06 20:03:54,387 --main-- [org.quartz.impl.StdSchedulerFactory] Quartz scheduler 'occurErrorNoticeDingtalkJob' initialized from an externally provided properties instance.
[INFO ] 2022-06-06 20:03:54,387 --main-- [org.quartz.impl.StdSchedulerFactory] Quartz scheduler version: 2.3.2
[INFO ] 2022-06-06 20:03:54,412 --main-- [org.quartz.impl.StdSchedulerFactory] Using default implementation for ThreadExecutor
[INFO ] 2022-06-06 20:03:54,413 --main-- [org.quartz.core.SchedulerSignalerImpl] Initialized Scheduler Signaller of type: class org.quartz.core.SchedulerSignalerImpl
[INFO ] 2022-06-06 20:03:54,413 --main-- [org.quartz.core.QuartzScheduler] Quartz Scheduler v.2.3.2 created.
[INFO ] 2022-06-06 20:03:54,413 --main-- [org.apache.shardingsphere.elasticjob.lite.internal.schedule.JobShutdownHookPlugin] Registering Quartz shutdown hook. occurErrorNoticeWechatJob
[INFO ] 2022-06-06 20:03:54,413 --main-- [org.quartz.simpl.RAMJobStore] RAMJobStore initialized.
[INFO ] 2022-06-06 20:03:54,413 --main-- [org.quartz.core.QuartzScheduler] Scheduler meta-data: Quartz Scheduler (v2.3.2) 'occurErrorNoticeWechatJob' with instanceId 'NON_CLUSTERED'
Scheduler class: 'org.quartz.core.QuartzScheduler' - running locally.
NOT STARTED.
Currently in standby mode.
Number of jobs executed: 0
Using thread pool 'org.quartz.simpl.SimpleThreadPool' - with 1 threads.
Using job-store 'org.quartz.simpl.RAMJobStore' - which does not support persistence. and is not clustered.

[INFO ] 2022-06-06 20:03:54,413 --main-- [org.quartz.impl.StdSchedulerFactory] Quartz scheduler 'occurErrorNoticeWechatJob' initialized from an externally provided properties instance.
[INFO ] 2022-06-06 20:03:54,413 --main-- [org.quartz.impl.StdSchedulerFactory] Quartz scheduler version: 2.3.2
[INFO ] 2022-06-06 20:03:54,446 --main-- [org.quartz.impl.StdSchedulerFactory] Using default implementation for ThreadExecutor
[INFO ] 2022-06-06 20:03:54,447 --main-- [org.quartz.core.SchedulerSignalerImpl] Initialized Scheduler Signaller of type: class org.quartz.core.SchedulerSignalerImpl
[INFO ] 2022-06-06 20:03:54,447 --main-- [org.quartz.core.QuartzScheduler] Quartz Scheduler v.2.3.2 created.
[INFO ] 2022-06-06 20:03:54,447 --main-- [org.apache.shardingsphere.elasticjob.lite.internal.schedule.JobShutdownHookPlugin] Registering Quartz shutdown hook. occurErrorNoticeEmailJob
[INFO ] 2022-06-06 20:03:54,447 --main-- [org.quartz.simpl.RAMJobStore] RAMJobStore initialized.
[INFO ] 2022-06-06 20:03:54,447 --main-- [org.quartz.core.QuartzScheduler] Scheduler meta-data: Quartz Scheduler (v2.3.2) 'occurErrorNoticeEmailJob' with instanceId 'NON_CLUSTERED'
Scheduler class: 'org.quartz.core.QuartzScheduler' - running locally.
NOT STARTED.
Currently in standby mode.
Number of jobs executed: 0
Using thread pool 'org.quartz.simpl.SimpleThreadPool' - with 1 threads.
Using job-store 'org.quartz.simpl.RAMJobStore' - which does not support persistence. and is not clustered.

[INFO ] 2022-06-06 20:03:54,447 --main-- [org.quartz.impl.StdSchedulerFactory] Quartz scheduler 'occurErrorNoticeEmailJob' initialized from an externally provided properties instance.
[INFO ] 2022-06-06 20:03:54,447 --main-- [org.quartz.impl.StdSchedulerFactory] Quartz scheduler version: 2.3.2
[INFO ] 2022-06-06 20:03:54,462 --main-- [org.apache.shardingsphere.elasticjob.lite.spring.boot.job.ElasticJobBootstrapConfiguration] Job Bootstrap Beans created.
[INFO ] 2022-06-06 20:03:54,474 --main-- [org.apache.coyote.http11.Http11NioProtocol] Starting ProtocolHandler ["http-nio-8080"]
[INFO ] 2022-06-06 20:03:54,483 --main-- [org.springframework.boot.web.embedded.tomcat.TomcatWebServer] Tomcat started on port(s): 8080 (http) with context path ''
[INFO ] 2022-06-06 20:03:54,772 --main-- [tech.pdai.springboot.elasticjob.lite.SpringBootMain] Started SpringBootMain in 4.75 seconds (JVM running for 5.51)
[INFO ] 2022-06-06 20:03:54,774 --main-- [org.apache.shardingsphere.elasticjob.lite.spring.boot.job.ScheduleJobBootstrapStartupRunner] Starting ElasticJob Bootstrap.
[INFO ] 2022-06-06 20:03:54,780 --main-- [org.quartz.core.QuartzScheduler] Scheduler simpleJob_$_NON_CLUSTERED started.
[INFO ] 2022-06-06 20:03:54,781 --main-- [org.quartz.core.QuartzScheduler] Scheduler dataflowJob_$_NON_CLUSTERED started.
[INFO ] 2022-06-06 20:03:54,782 --main-- [org.quartz.core.QuartzScheduler] Scheduler scriptJob_$_NON_CLUSTERED started.
[INFO ] 2022-06-06 20:03:54,782 --main-- [org.apache.shardingsphere.elasticjob.lite.spring.boot.job.ScheduleJobBootstrapStartupRunner] ElasticJob Bootstrap started.
[INFO ] 2022-06-06 20:03:55,068 --elasticjob-dataflowJob-1-- [tech.pdai.springboot.elasticjob.lite.job.SpringBootDataflowJob] Item: 0 | Time: 2022-06-06T20:03:55.068 | Thread: 130 | DATAFLOW FETCH
[INFO ] 2022-06-06 20:03:55,068 --elasticjob-dataflowJob-3-- [tech.pdai.springboot.elasticjob.lite.job.SpringBootDataflowJob] Item: 2 | Time: 2022-06-06T20:03:55.068 | Thread: 133 | DATAFLOW FETCH
[INFO ] 2022-06-06 20:03:55,068 --elasticjob-simpleJob-1-- [tech.pdai.springboot.elasticjob.lite.job.SpringBootSimpleJob] Item: 0 | Time: 2022-06-06T20:03:55.068 | Thread: 129 | SIMPLE
[INFO ] 2022-06-06 20:03:55,068 --elasticjob-simpleJob-3-- [tech.pdai.springboot.elasticjob.lite.job.SpringBootSimpleJob] Item: 2 | Time: 2022-06-06T20:03:55.068 | Thread: 134 | SIMPLE
[INFO ] 2022-06-06 20:03:55,068 --elasticjob-dataflowJob-2-- [tech.pdai.springboot.elasticjob.lite.job.SpringBootDataflowJob] Item: 1 | Time: 2022-06-06T20:03:55.068 | Thread: 131 | DATAFLOW FETCH
[INFO ] 2022-06-06 20:03:55,068 --elasticjob-simpleJob-2-- [tech.pdai.springboot.elasticjob.lite.job.SpringBootSimpleJob] Item: 1 | Time: 2022-06-06T20:03:55.068 | Thread: 132 | SIMPLE
[INFO ] 2022-06-06 20:03:55,076 --elasticjob-dataflowJob-2-- [tech.pdai.springboot.elasticjob.lite.job.SpringBootDataflowJob] Item: 1 | Time: 2022-06-06T20:03:55.076 | Thread: 131 | DATAFLOW PROCESS
[INFO ] 2022-06-06 20:03:55,076 --elasticjob-dataflowJob-1-- [tech.pdai.springboot.elasticjob.lite.job.SpringBootDataflowJob] Item: 0 | Time: 2022-06-06T20:03:55.076 | Thread: 130 | DATAFLOW PROCESS
[INFO ] 2022-06-06 20:03:55,076 --elasticjob-dataflowJob-3-- [tech.pdai.springboot.elasticjob.lite.job.SpringBootDataflowJob] Item: 2 | Time: 2022-06-06T20:03:55.076 | Thread: 133 | DATAFLOW PROCESS
[INFO ] 2022-06-06 20:04:00,015 --elasticjob-simpleJob-4-- [tech.pdai.springboot.elasticjob.lite.job.SpringBootSimpleJob] Item: 0 | Time: 2022-06-06T20:04:00.015 | Thread: 158 | SIMPLE
[INFO ] 2022-06-06 20:04:00,015 --elasticjob-dataflowJob-4-- [tech.pdai.springboot.elasticjob.lite.job.SpringBootDataflowJob] Item: 0 | Time: 2022-06-06T20:04:00.015 | Thread: 159 | DATAFLOW FETCH
[INFO ] 2022-06-06 20:04:00,015 --elasticjob-dataflowJob-5-- [tech.pdai.springboot.elasticjob.lite.job.SpringBootDataflowJob] Item: 1 | Time: 2022-06-06T20:04:00.015 | Thread: 163 | DATAFLOW FETCH
[INFO ] 2022-06-06 20:04:00,015 --elasticjob-simpleJob-5-- [tech.pdai.springboot.elasticjob.lite.job.SpringBootSimpleJob] Item: 1 | Time: 2022-06-06T20:04:00.015 | Thread: 160 | SIMPLE
[INFO ] 2022-06-06 20:04:00,015 --elasticjob-dataflowJob-4-- [tech.pdai.springboot.elasticjob.lite.job.SpringBootDataflowJob] Item: 0 | Time: 2022-06-06T20:04:00.015 | Thread: 159 | DATAFLOW PROCESS
[INFO ] 2022-06-06 20:04:00,015 --elasticjob-dataflowJob-5-- [tech.pdai.springboot.elasticjob.lite.job.SpringBootDataflowJob] Item: 1 | Time: 2022-06-06T20:04:00.015 | Thread: 163 | DATAFLOW PROCESS
[INFO ] 2022-06-06 20:04:00,015 --elasticjob-simpleJob-6-- [tech.pdai.springboot.elasticjob.lite.job.SpringBootSimpleJob] Item: 2 | Time: 2022-06-06T20:04:00.015 | Thread: 164 | SIMPLE
[INFO ] 2022-06-06 20:04:00,015 --elasticjob-dataflowJob-6-- [tech.pdai.springboot.elasticjob.lite.job.SpringBootDataflowJob] Item: 2 | Time: 2022-06-06T20:04:00.015 | Thread: 165 | DATAFLOW FETCH
[INFO ] 2022-06-06 20:04:00,016 --elasticjob-dataflowJob-6-- [tech.pdai.springboot.elasticjob.lite.job.SpringBootDataflowJob] Item: 2 | Time: 2022-06-06T20:04:00.016 | Thread: 165 | DATAFLOW PROCESS
SCRIPT Job: {"jobName":"scriptJob","taskId":"scriptJob@-@0,1,2@-@READY@[email protected]@-@6275","shardingTotalCount":3,"jobParameter":"","shardingItem":1}
SCRIPT Job: {"jobName":"scriptJob","taskId":"scriptJob@-@0,1,2@-@READY@[email protected]@-@6275","shardingTotalCount":3,"jobParameter":"","shardingItem":2}
SCRIPT Job: {"jobName":"scriptJob","taskId":"scriptJob@-@0,1,2@-@READY@[email protected]@-@6275","shardingTotalCount":3,"jobParameter":"","shardingItem":0}
[INFO ] 2022-06-06 20:04:05,012 --elasticjob-simpleJob-8-- [tech.pdai.springboot.elasticjob.lite.job.SpringBootSimpleJob] Item: 1 | Time: 2022-06-06T20:04:05.012 | Thread: 181 | SIMPLE
[INFO ] 2022-06-06 20:04:05,012 --elasticjob-simpleJob-7-- [tech.pdai.springboot.elasticjob.lite.job.SpringBootSimpleJob] Item: 0 | Time: 2022-06-06T20:04:05.012 | Thread: 178 | SIMPLE
[INFO ] 2022-06-06 20:04:05,012 --elasticjob-dataflowJob-9-- [tech.pdai.springboot.elasticjob.lite.job.SpringBootDataflowJob] Item: 2 | Time: 2022-06-06T20:04:05.012 | Thread: 182 | DATAFLOW FETCH
[INFO ] 2022-06-06 20:04:05,012 --elasticjob-dataflowJob-7-- [tech.pdai.springboot.elasticjob.lite.job.SpringBootDataflowJob] Item: 0 | Time: 2022-06-06T20:04:05.011 | Thread: 179 | DATAFLOW FETCH
[INFO ] 2022-06-06 20:04:05,012 --elasticjob-dataflowJob-8-- [tech.pdai.springboot.elasticjob.lite.job.SpringBootDataflowJob] Item: 1 | Time: 2022-06-06T20:04:05.012 | Thread: 180 | DATAFLOW FETCH
[INFO ] 2022-06-06 20:04:05,012 --elasticjob-dataflowJob-7-- [tech.pdai.springboot.elasticjob.lite.job.SpringBootDataflowJob] Item: 0 | Time: 2022-06-06T20:04:05.012 | Thread: 179 | DATAFLOW PROCESS
[INFO ] 2022-06-06 20:04:05,012 --elasticjob-dataflowJob-9-- [tech.pdai.springboot.elasticjob.lite.job.SpringBootDataflowJob] Item: 2 | Time: 2022-06-06T20:04:05.012 | Thread: 182 | DATAFLOW PROCESS
[INFO ] 2022-06-06 20:04:05,012 --elasticjob-dataflowJob-8-- [tech.pdai.springboot.elasticjob.lite.job.SpringBootDataflowJob] Item: 1 | Time: 2022-06-06T20:04:05.012 | Thread: 180 | DATAFLOW PROCESS
[INFO ] 2022-06-06 20:04:05,012 --elasticjob-simpleJob-9-- [tech.pdai.springboot.elasticjob.lite.job.SpringBootSimpleJob] Item: 2 | Time: 2022-06-06T20:04:05.012 | Thread: 183 | SIMPLE
[INFO ] 2022-06-06 20:04:10,016 --elasticjob-dataflowJob-10-- [tech.pdai.springboot.elasticjob.lite.job.SpringBootDataflowJob] Item: 0 | Time: 2022-06-06T20:04:10.016 | Thread: 184 | DATAFLOW FETCH
[INFO ] 2022-06-06 20:04:10,016 --elasticjob-dataflowJob-11-- [tech.pdai.springboot.elasticjob.lite.job.SpringBootDataflowJob] Item: 1 | Time: 2022-06-06T20:04:10.016 | Thread: 187 | DATAFLOW FETCH
[INFO ] 2022-06-06 20:04:10,016 --elasticjob-simpleJob-11-- [tech.pdai.springboot.elasticjob.lite.job.SpringBootSimpleJob] Item: 1 | Time: 2022-06-06T20:04:10.016 | Thread: 188 | SIMPLE
[INFO ] 2022-06-06 20:04:10,016 --elasticjob-dataflowJob-10-- [tech.pdai.springboot.elasticjob.lite.job.SpringBootDataflowJob] Item: 0 | Time: 2022-06-06T20:04:10.016 | Thread: 184 | DATAFLOW PROCESS
[INFO ] 2022-06-06 20:04:10,016 --elasticjob-simpleJob-10-- [tech.pdai.springboot.elasticjob.lite.job.SpringBootSimpleJob] Item: 0 | Time: 2022-06-06T20:04:10.016 | Thread: 185 | SIMPLE
[INFO ] 2022-06-06 20:04:10,016 --elasticjob-dataflowJob-11-- [tech.pdai.springboot.elasticjob.lite.job.SpringBootDataflowJob] Item: 1 | Time: 2022-06-06T20:04:10.016 | Thread: 187 | DATAFLOW PROCESS
[INFO ] 2022-06-06 20:04:10,017 --elasticjob-simpleJob-12-- [tech.pdai.springboot.elasticjob.lite.job.SpringBootSimpleJob] Item: 2 | Time: 2022-06-06T20:04:10.017 | Thread: 189 | SIMPLE
[INFO ] 2022-06-06 20:04:10,017 --elasticjob-dataflowJob-12-- [tech.pdai.springboot.elasticjob.lite.job.SpringBootDataflowJob] Item: 2 | Time: 2022-06-06T20:04:10.017 | Thread: 190 | DATAFLOW FETCH
[INFO ] 2022-06-06 20:04:10,017 --elasticjob-dataflowJob-12-- [tech.pdai.springboot.elasticjob.lite.job.SpringBootDataflowJob] Item: 2 | Time: 2022-06-06T20:04:10.017 | Thread: 190 | DATAFLOW PROCESS
SCRIPT Job: {"jobName":"scriptJob","taskId":"scriptJob@-@0,1,2@-@READY@[email protected]@-@6275","shardingTotalCount":3,"jobParameter":"","shardingItem":0}
SCRIPT Job: {"jobName":"scriptJob","taskId":"scriptJob@-@0,1,2@-@READY@[email protected]@-@6275","shardingTotalCount":3,"jobParameter":"","shardingItem":2}
SCRIPT Job: {"jobName":"scriptJob","taskId":"scriptJob@-@0,1,2@-@READY@[email protected]@-@6275","shardingTotalCount":3,"jobParameter":"","shardingItem":1}
[INFO ] 2022-06-06 20:04:15,014 --elasticjob-simpleJob-13-- [tech.pdai.springboot.elasticjob.lite.job.SpringBootSimpleJob] Item: 0 | Time: 2022-06-06T20:04:15.014 | Thread: 200 | SIMPLE
[INFO ] 2022-06-06 20:04:15,014 --elasticjob-dataflowJob-13-- [tech.pdai.springboot.elasticjob.lite.job.SpringBootDataflowJob] Item: 0 | Time: 2022-06-06T20:04:15.014 | Thread: 201 | DATAFLOW FETCH
[INFO ] 2022-06-06 20:04:15,015 --elasticjob-dataflowJob-13-- [tech.pdai.springboot.elasticjob.lite.job.SpringBootDataflowJob] Item: 0 | Time: 2022-06-06T20:04:15.015 | Thread: 201 | DATAFLOW PROCESS
[INFO ] 2022-06-06 20:04:15,015 --elasticjob-dataflowJob-14-- [tech.pdai.springboot.elasticjob.lite.job.SpringBootDataflowJob] Item: 1 | Time: 2022-06-06T20:04:15.015 | Thread: 203 | DATAFLOW FETCH
[INFO ] 2022-06-06 20:04:15,015 --elasticjob-simpleJob-15-- [tech.pdai.springboot.elasticjob.lite.job.SpringBootSimpleJob] Item: 2 | Time: 2022-06-06T20:04:15.015 | Thread: 204 | SIMPLE
[INFO ] 2022-06-06 20:04:15,015 --elasticjob-simpleJob-14-- [tech.pdai.springboot.elasticjob.lite.job.SpringBootSimpleJob] Item: 1 | Time: 2022-06-06T20:04:15.015 | Thread: 202 | SIMPLE
[INFO ] 2022-06-06 20:04:15,015 --elasticjob-dataflowJob-14-- [tech.pdai.springboot.elasticjob.lite.job.SpringBootDataflowJob] Item: 1 | Time: 2022-06-06T20:04:15.015 | Thread: 203 | DATAFLOW PROCESS
[INFO ] 2022-06-06 20:04:15,015 --elasticjob-dataflowJob-15-- [tech.pdai.springboot.elasticjob.lite.job.SpringBootDataflowJob] Item: 2 | Time: 2022-06-06T20:04:15.015 | Thread: 205 | DATAFLOW FETCH
[INFO ] 2022-06-06 20:04:15,015 --elasticjob-dataflowJob-15-- [tech.pdai.springboot.elasticjob.lite.job.SpringBootDataflowJob] Item: 2 | Time: 2022-06-06T20:04:15.015 | Thread: 205 | DATAFLOW PROCESS

OneOff的任務,通過controller api訪問

SpringBoot定時任務 - 什么是ElasticJob?如何集成ElasticJob實作分布式任務調度?_elastic_03

由于這里沒有配置正確的,這里會報例外日志

[INFO ] 2022-06-06 20:05:00,818 --Curator-SafeNotifyService-0-- [org.quartz.core.QuartzScheduler] Scheduler occurErrorNoticeDingtalkJob_$_NON_CLUSTERED started. 
[ERROR] 2022-06-06 20:05:00,908 --elasticjob-occurErrorNoticeDingtalkJob-3-- [org.apache.shardingsphere.elasticjob.error.handler.dingtalk.DingtalkJobErrorHandler] An exception has occurred in Job 'occurErrorNoticeDingtalkJob', but failed to send dingtalk because of
java.lang.RuntimeException: An exception has occurred in Job, The parameter is Guangzhou
at tech.pdai.springboot.elasticjob.lite.job.SpringBootOccurErrorNoticeDingtalkJob.execute(SpringBootOccurErrorNoticeDingtalkJob.java:29)
at org.apache.shardingsphere.elasticjob.simple.executor.SimpleJobExecutor.process(SimpleJobExecutor.java:33)
at org.apache.shardingsphere.elasticjob.simple.executor.SimpleJobExecutor.process(SimpleJobExecutor.java:29)
at org.apache.shardingsphere.elasticjob.executor.ElasticJobExecutor.process(ElasticJobExecutor.java:172)
at org.apache.shardingsphere.elasticjob.executor.ElasticJobExecutor.lambda$process$0(ElasticJobExecutor.java:153)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at com.google.common.util.concurrent.TrustedListenableFutureTask$TrustedFutureInterruptibleTask.runInterruptibly(TrustedListenableFutureTask.java:125)
at com.google.common.util.concurrent.InterruptibleTask.run(InterruptibleTask.java:57)
at com.google.common.util.concurrent.TrustedListenableFutureTask.run(TrustedListenableFutureTask.java:78)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Suppressed: org.apache.http.client.ClientProtocolException: null
at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:187)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:83)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:108)
at org.apache.shardingsphere.elasticjob.error.handler.dingtalk.DingtalkJobErrorHandler.handleException(DingtalkJobErrorHandler.java:80)
at org.apache.shardingsphere.elasticjob.executor.ElasticJobExecutor.process(ElasticJobExecutor.java:183)
... 8 common frames omitted
Caused by: org.apache.http.ProtocolException: Target host is not specified
at org.apache.http.impl.conn.DefaultRoutePlanner.determineRoute(DefaultRoutePlanner.java:71)
at org.apache.http.impl.client.InternalHttpClient.determineRoute(InternalHttpClient.java:125)
at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:184)
... 12 common frames omitted
[ERROR] 2022-06-06 20:05:00,908 --elasticjob-occurErrorNoticeDingtalkJob-2-- [org.apache.shardingsphere.elasticjob.error.handler.dingtalk.DingtalkJobErrorHandler] An exception has occurred in Job 'occurErrorNoticeDingtalkJob', but failed to send dingtalk because of
java.lang.RuntimeException: An exception has occurred in Job, The parameter is Shanghai
at tech.pdai.springboot.elasticjob.lite.job.SpringBootOccurErrorNoticeDingtalkJob.execute(SpringBootOccurErrorNoticeDingtalkJob.java:29)
at org.apache.shardingsphere.elasticjob.simple.executor.SimpleJobExecutor.process(SimpleJobExecutor.java:33)
at org.apache.shardingsphere.elasticjob.simple.executor.SimpleJobExecutor.process(SimpleJobExecutor.java:29)
at org.apache.shardingsphere.elasticjob.executor.ElasticJobExecutor.process(ElasticJobExecutor.java:172)
at org.apache.shardingsphere.elasticjob.executor.ElasticJobExecutor.lambda$process$0(ElasticJobExecutor.java:153)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at com.google.common.util.concurrent.TrustedListenableFutureTask$TrustedFutureInterruptibleTask.runInterruptibly(TrustedListenableFutureTask.java:125)
at com.google.common.util.concurrent.InterruptibleTask.run(InterruptibleTask.java:57)
at com.google.common.util.concurrent.TrustedListenableFutureTask.run(TrustedListenableFutureTask.java:78)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Suppressed: org.apache.http.client.ClientProtocolException: null
at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:187)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:83)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:108)
at org.apache.shardingsphere.elasticjob.error.handler.dingtalk.DingtalkJobErrorHandler.handleException(DingtalkJobErrorHandler.java:80)
at org.apache.shardingsphere.elasticjob.executor.ElasticJobExecutor.process(ElasticJobExecutor.java:183)
... 8 common frames omitted
Caused by: org.apache.http.ProtocolException: Target host is not specified
at org.apache.http.impl.conn.DefaultRoutePlanner.determineRoute(DefaultRoutePlanner.java:71)
at org.apache.http.impl.client.InternalHttpClient.determineRoute(InternalHttpClient.java:125)
at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:184)
... 12 common frames omitted
[ERROR] 2022-06-06 20:05:00,908 --elasticjob-occurErrorNoticeDingtalkJob-1-- [org.apache.shardingsphere.elasticjob.error.handler.dingtalk.DingtalkJobErrorHandler] An exception has occurred in Job 'occurErrorNoticeDingtalkJob', but failed to send dingtalk because of
java.lang.RuntimeException: An exception has occurred in Job, The parameter is Beijing
at tech.pdai.springboot.elasticjob.lite.job.SpringBootOccurErrorNoticeDingtalkJob.execute(SpringBootOccurErrorNoticeDingtalkJob.java:29)
at org.apache.shardingsphere.elasticjob.simple.executor.SimpleJobExecutor.process(SimpleJobExecutor.java:33)
at org.apache.shardingsphere.elasticjob.simple.executor.SimpleJobExecutor.process(SimpleJobExecutor.java:29)
at org.apache.shardingsphere.elasticjob.executor.ElasticJobExecutor.process(ElasticJobExecutor.java:172)
at org.apache.shardingsphere.elasticjob.executor.ElasticJobExecutor.lambda$process$0(ElasticJobExecutor.java:153)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at com.google.common.util.concurrent.TrustedListenableFutureTask$TrustedFutureInterruptibleTask.runInterruptibly(TrustedListenableFutureTask.java:125)
at com.google.common.util.concurrent.InterruptibleTask.run(InterruptibleTask.java:57)
at com.google.common.util.concurrent.TrustedListenableFutureTask.run(TrustedListenableFutureTask.java:78)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Suppressed: org.apache.http.client.ClientProtocolException: null
at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:187)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:83)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:108)
at org.apache.shardingsphere.elasticjob.error.handler.dingtalk.DingtalkJobErrorHandler.handleException(DingtalkJobErrorHandler.java:80)
at org.apache.shardingsphere.elasticjob.executor.ElasticJobExecutor.process(ElasticJobExecutor.java:183)
... 8 common frames omitted
Caused by: org.apache.http.ProtocolException: Target host is not specified
at org.apache.http.impl.conn.DefaultRoutePlanner.determineRoute(DefaultRoutePlanner.java:71)
at org.apache.http.impl.client.InternalHttpClient.determineRoute(InternalHttpClient.java:125)
at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:184)
... 12 common frames omitted

運維控制臺

ElasticJob 也提供了UI控制臺的功能,包括作業操作和作業歷史,可以在??這里??下載,

啟動運行

比如這里,我下載了apache-shardingsphere-elasticjob-3.0.1-lite-ui-bin.tar.gz,需要通過如下工具解壓,因為某些解壓縮工具在解壓ShardingSphere-ElasticJob-UI二進制包時可能將檔案名截斷,導致找不到某些類,

tar zxvf apache-shardingsphere-elasticjob-${RELEASE.VERSION}-lite-ui-bin.tar.gz

解壓完以后,在conf目錄配置JDBC(只需要與application-xx.yml中的datasource配置一致即可, 比如這里我們配置h2記憶體資料庫)

server.port=8088

auth.root_username=root
auth.root_password=root
auth.guest_username=guest
auth.guest_password=guest
auth.token_expires_after_seconds=3600

spring.datasource.default.driver-class-name=org.h2.Driver
spring.datasource.default.url=jdbc:h2:mem:job_event_storage # 看這里
spring.datasource.default.username=sa
spring.datasource.default.password=
spring.jpa.show-sql=false

配置完后,啟動

pdai@MacBook-Pro apache-shardingsphere-elasticjob-3.0.1-lite-ui-bin % vi bin/start.sh 
pdai@MacBook-Pro apache-shardingsphere-elasticjob-3.0.1-lite-ui-bin % bin/start.sh
Starting the ShardingSphere-ElasticJob-UI ...
Please check the STDOUT file: /Users/pdai/apache-shardingsphere-elasticjob-3.0.1-lite-ui-bin/logs/stdout.log
pdai@MacBook-Pro apache-shardingsphere-elasticjob-3.0.1-lite-ui-bin % cat logs/stdout.log
20:20:30,474 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback.groovy]
20:20:30,475 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback-test.xml]
20:20:30,476 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Found resource [logback.xml] at [file:/Users/pdai/apache-shardingsphere-elasticjob-3.0.1-lite-ui-bin/conf/logback.xml]
20:20:30,476 |-WARN in ch.qos.logback.classic.LoggerContext[default] - Resource [logback.xml] occurs multiple times on the classpath.
20:20:30,476 |-WARN in ch.qos.logback.classic.LoggerContext[default] - Resource [logback.xml] occurs at [file:/Users/pdai/apache-shardingsphere-elasticjob-3.0.1-lite-ui-bin/conf/logback.xml]
20:20:30,476 |-WARN in ch.qos.logback.classic.LoggerContext[default] - Resource [logback.xml] occurs at [jar:file:/Users/pdai/apache-shardingsphere-elasticjob-3.0.1-lite-ui-bin/lib/shardingsphere-elasticjob-lite-ui-bin-distribution-3.0.1.jar!/logback.xml]
20:20:30,476 |-WARN in ch.qos.logback.classic.LoggerContext[default] - Resource [logback.xml] occurs at [jar:file:/Users/pdai/apache-shardingsphere-elasticjob-3.0.1-lite-ui-bin/lib/shardingsphere-elasticjob-lite-ui-backend-3.0.1.jar!/logback.xml]
20:20:30,588 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - debug attribute not set
20:20:30,588 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.ConsoleAppender]
20:20:30,593 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [console]
20:20:30,598 |-INFO in ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Assuming default type [ch.qos.logback.classic.encoder.PatternLayoutEncoder] for [encoder] property
20:20:30,653 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting level of logger [org.apache.shardingsphere] to INFO
20:20:30,653 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting additivity of logger [org.apache.shardingsphere] to false
20:20:30,653 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [console] to Logger[org.apache.shardingsphere]
20:20:30,653 |-INFO in ch.qos.logback.classic.joran.action.LevelAction - ROOT level set to INFO
20:20:30,653 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [console] to Logger[ROOT]
20:20:30,653 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - End of configuration.
20:20:30,656 |-INFO in ch.qos.logback.classic.joran.JoranConfigurator@3835c46 - Registering current configuration as safe fallback point


. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v1.5.21.RELEASE)

[INFO ] 20:20:31.061 [main] o.a.s.elasticjob.lite.ui.Bootstrap - Starting Bootstrap v3.0.1 on MacBook-Pro.local with PID 7642 (/Users/pdai/apache-shardingsphere-elasticjob-3.0.1-lite-ui-bin/lib/shardingsphere-elasticjob-lite-ui-backend-3.0.1.jar started by pdai in /Users/pdai/apache-shardingsphere-elasticjob-3.0.1-lite-ui-bin)
[INFO ] 20:20:31.063 [main] o.a.s.elasticjob.lite.ui.Bootstrap - No active profile set, falling back to default profiles: default
[INFO ] 20:20:31.105 [main] o.s.b.c.e.AnnotationConfigEmbeddedWebApplicationContext - Refreshing org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@5454d35e: startup date [Mon Jun 06 20:20:31 CST 2022]; root of context hierarchy
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.springframework.cglib.core.ReflectUtils$1 (file:/Users/pdai/apache-shardingsphere-elasticjob-3.0.1-lite-ui-bin/lib/spring-core-4.3.24.RELEASE.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain)
WARNING: Please consider reporting this to the maintainers of org.springframework.cglib.core.ReflectUtils$1
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
[INFO ] 20:20:32.093 [main] o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration$$EnhancerBySpringCGLIB$$89f6cb55] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
[INFO ] 20:20:32.367 [main] o.s.b.c.e.t.TomcatEmbeddedServletContainer - Tomcat initialized with port(s): 8088 (http)
[INFO ] 20:20:32.384 [main] o.a.coyote.http11.Http11NioProtocol - Initializing ProtocolHandler ["http-nio-8088"]
[INFO ] 20:20:32.407 [main] o.a.catalina.core.StandardService - Starting service [Tomcat]
[INFO ] 20:20:32.408 [main] o.a.catalina.core.StandardEngine - Starting Servlet Engine: Apache Tomcat/8.5.40
[INFO ] 20:20:32.514 [localhost-startStop-1] o.a.c.c.C.[Tomcat].[localhost].[/] - Initializing Spring embedded WebApplicationContext
[INFO ] 20:20:32.515 [localhost-startStop-1] o.s.web.context.ContextLoader - Root WebApplicationContext: initialization completed in 1417 ms
[INFO ] 20:20:32.657 [localhost-startStop-1] o.s.b.w.s.FilterRegistrationBean - Mapping filter: 'characterEncodingFilter' to: [/*]
[INFO ] 20:20:32.657 [localhost-startStop-1] o.s.b.w.s.FilterRegistrationBean - Mapping filter: 'hiddenHttpMethodFilter' to: [/*]
[INFO ] 20:20:32.657 [localhost-startStop-1] o.s.b.w.s.FilterRegistrationBean - Mapping filter: 'httpPutFormContentFilter' to: [/*]
[INFO ] 20:20:32.658 [localhost-startStop-1] o.s.b.w.s.FilterRegistrationBean - Mapping filter: 'requestContextFilter' to: [/*]
[INFO ] 20:20:32.658 [localhost-startStop-1] o.s.b.w.s.FilterRegistrationBean - Mapping filter: 'CORSFilter' to urls: [/api/*]
[INFO ] 20:20:32.658 [localhost-startStop-1] o.s.b.w.s.FilterRegistrationBean - Mapping filter: 'authenticationFilter' to urls: [/api/*]
[INFO ] 20:20:32.658 [localhost-startStop-1] o.s.b.w.s.ServletRegistrationBean - Mapping servlet: 'dispatcherServlet' to [/]
[INFO ] 20:20:32.990 [main] o.s.o.j.LocalContainerEntityManagerFactoryBean - Building JPA container EntityManagerFactory for persistence unit 'default'
[WARN ] 20:20:33.086 [main] openjpa.Runtime - The configuration property named "openjpa.ClassLoadEnhancement" was not recognized and will be ignored, although the name closely matches a valid property called "openjpa.PostLoadOnMerge".
[WARN ] 20:20:33.164 [main] openjpa.Runtime - The configuration property named "openjpa.ClassLoadEnhancement" was not recognized and will be ignored, although the name closely matches a valid property called "openjpa.PostLoadOnMerge".
[WARN ] 20:20:33.179 [main] openjpa.Runtime - An error occurred while registering a ClassTransformer with PersistenceUnitInfo: name 'default', root URL [file:/Users/pdai/apache-shardingsphere-elasticjob-3.0.1-lite-ui-bin/lib/shardingsphere-elasticjob-lite-ui-backend-3.0.1.jar]. The error has been consumed. To see it, set your openjpa.Runtime log level to TRACE. Load-time class transformation will not be available.
[INFO ] 20:20:33.193 [main] o.s.o.j.LocalContainerEntityManagerFactoryBean - Initialized JPA EntityManagerFactory for persistence unit 'default'
[INFO ] 20:20:33.273 [main] openjpa.jdbc.JDBC - Using dictionary class "org.apache.openjpa.jdbc.sql.H2Dictionary" (H2 1.4.196 (2017-06-10) ,H2 JDBC Driver 1.4.196 (2017-06-10)).
[INFO ] 20:20:33.322 [main] openjpa.jdbc.JDBC - Connected to H2 version 1.4 using JDBC driver H2 JDBC Driver version 1.4.196 (2017-06-10).
[INFO ] 20:20:33.326 [main] openjpa.Runtime - Starting OpenJPA 3.1.2
[WARN ] 20:20:33.531 [main] openjpa.Enhance - Creating subclass for "[class org.apache.shardingsphere.elasticjob.lite.ui.domain.TaskResultStatistics, class org.apache.shardingsphere.elasticjob.lite.ui.domain.JobRegisterStatistics, class org.apache.shardingsphere.elasticjob.lite.ui.domain.JobRunningStatistics, class org.apache.shardingsphere.elasticjob.lite.ui.domain.JobStatusTraceLog, class org.apache.shardingsphere.elasticjob.lite.ui.domain.JobExecutionLog, class org.apache.shardingsphere.elasticjob.lite.ui.domain.TaskRunningStatistics]". This means that your application will be less efficient and will consume more memory than it would if you ran the OpenJPA enhancer. Additionally, lazy loading will not be available for one-to-one and many-to-one persistent attributes in types using field access; they will be loaded eagerly instead.
[INFO ] 20:20:34.321 [main] o.s.w.s.m.m.a.RequestMappingHandlerAdapter - Looking for @ControllerAdvice: org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@5454d35e: startup date [Mon Jun 06 20:20:31 CST 2022]; root of context hierarchy
[INFO ] 20:20:34.374 [main] o.s.w.s.m.m.a.RequestMappingHandlerMapping - Mapped "{[/api/jobs/count],methods=[GET]}" onto public int org.apache.shardingsphere.elasticjob.lite.ui.web.controller.JobOperationController.getJobsTotalCount()
[INFO ] 20:20:34.375 [main] o.s.w.s.m.m.a.RequestMappingHandlerMapping - Mapped "{[/api/jobs/getAllJobsBriefInfo],methods=[GET]}" onto public org.apache.shardingsphere.elasticjob.lite.ui.web.response.ResponseResult<java.util.Collection<org.apache.shardingsphere.elasticjob.lite.lifecycle.domain.JobBriefInfo>> org.apache.shardingsphere.elasticjob.lite.ui.web.controller.JobOperationController.getAllJobsBriefInfo()
[INFO ] 20:20:34.375 [main] o.s.w.s.m.m.a.RequestMappingHandlerMapping - Mapped "{[/api/jobs/{jobName}/shutdown],methods=[POST]}" onto public org.apache.shardingsphere.elasticjob.lite.ui.web.response.ResponseResult<java.lang.Boolean> org.apache.shardingsphere.elasticjob.lite.ui.web.controller.JobOperationController.shutdownJob(java.lang.String)
[INFO ] 20:20:34.376 [main] o.s.w.s.m.m.a.RequestMappingHandlerMapping - Mapped "{[/api/jobs/{jobName}/sharding],methods=[GET]}" onto public org.apache.shardingsphere.elasticjob.lite.ui.web.response.ResponseResult<java.util.Collection<org.apache.shardingsphere.elasticjob.lite.lifecycle.domain.ShardingInfo>> org.apache.shardingsphere.elasticjob.lite.ui.web.controller.JobOperationController.getShardingInfo(java.lang.String)
[INFO ] 20:20:34.376 [main] o.s.w.s.m.m.a.RequestMappingHandlerMapping - Mapped "{[/api/jobs/{jobName}/sharding/{item}/disable],methods=[POST]}" onto public org.apache.shardingsphere.elasticjob.lite.ui.web.response.ResponseResult<java.lang.Boolean> org.apache.shardingsphere.elasticjob.lite.ui.web.controller.JobOperationController.disableSharding(java.lang.String,java.lang.String)
[INFO ] 20:20:34.376 [main] o.s.w.s.m.m.a.RequestMappingHandlerMapping - Mapped "{[/api/jobs/{jobName}/sharding/{item}/enable],methods=[POST]}" onto public org.apache.shardingsphere.elasticjob.lite.ui.web.response.ResponseResult<java.lang.Boolean> org.apache.shardingsphere.elasticjob.lite.ui.web.controller.JobOperationController.enableSharding(java.lang.String,java.lang.String)
[INFO ] 20:20:34.376 [main] o.s.w.s.m.m.a.RequestMappingHandlerMapping - Mapped "{[/api/jobs/{jobName}/trigger],methods=[POST]}" onto public org.apache.shardingsphere.elasticjob.lite.ui.web.response.ResponseResult<java.lang.Boolean> org.apache.shardingsphere.elasticjob.lite.ui.web.controller.JobOperationController.triggerJob(java.lang.String)
[INFO ] 20:20:34.376 [main] o.s.w.s.m.m.a.RequestMappingHandlerMapping - Mapped "{[/api/jobs/{jobName}/disable],methods=[POST]}" onto public org.apache.shardingsphere.elasticjob.lite.ui.web.response.ResponseResult<java.lang.Boolean> org.apache.shardingsphere.elasticjob.lite.ui.web.controller.JobOperationController.disableJob(java.lang.String)
[INFO ] 20:20:34.376 [main] o.s.w.s.m.m.a.RequestMappingHandlerMapping - Mapped "{[/api/jobs/{jobName}/enable],methods=[POST]}" onto public org.apache.shardingsphere.elasticjob.lite.ui.web.response.ResponseResult<java.lang.Boolean> org.apache.shardingsphere.elasticjob.lite.ui.web.controller.JobOperationController.enableJob(java.lang.String)
[INFO ] 20:20:34.378 [main] o.s.w.s.m.m.a.RequestMappingHandlerMapping - Mapped "{[/api/event-trace/status/jobNames || /api/event-trace/status/jobNames/{jobNamePrefix:.+}],methods=[GET]}" onto public org.apache.shardingsphere.elasticjob.lite.ui.web.response.ResponseResult<java.util.List<java.lang.String>> org.apache.shardingsphere.elasticjob.lite.ui.web.controller.EventTraceHistoryController.findJobNamesByPrefixInStatusTraceLog(java.lang.String)
[INFO ] 20:20:34.378 [main] o.s.w.s.m.m.a.RequestMappingHandlerMapping - Mapped "{[/api/event-trace/execution],methods=[POST]}" onto public org.apache.shardingsphere.elasticjob.lite.ui.web.response.ResponseResult<org.apache.shardingsphere.elasticjob.lite.ui.dto.response.BasePageResponse<org.apache.shardingsphere.elasticjob.tracing.event.JobExecutionEvent>> org.apache.shardingsphere.elasticjob.lite.ui.web.controller.EventTraceHistoryController.findJobExecutionEvents(org.apache.shardingsphere.elasticjob.lite.ui.dto.request.FindJobExecutionEventsRequest)
[INFO ] 20:20:34.378 [main] o.s.w.s.m.m.a.RequestMappingHandlerMapping - Mapped "{[/api/event-trace/execution/jobNames || /api/event-trace/execution/jobNames/{jobNamePrefix:.+}],methods=[GET]}" onto public org.apache.shardingsphere.elasticjob.lite.ui.web.response.ResponseResult<java.util.List<java.lang.String>> org.apache.shardingsphere.elasticjob.lite.ui.web.controller.EventTraceHistoryController.findJobNamesByPrefix(java.lang.String)
[INFO ] 20:20:34.378 [main] o.s.w.s.m.m.a.RequestMappingHandlerMapping - Mapped "{[/api/event-trace/execution/ip || /api/event-trace/execution/ip/{ipPrefix:.+}],methods=[GET]}" onto public org.apache.shardingsphere.elasticjob.lite.ui.web.response.ResponseResult<java.util.List<java.lang.String>> org.apache.shardingsphere.elasticjob.lite.ui.web.controller.EventTraceHistoryController.findIpByPrefix(java.lang.String)
[INFO ] 20:20:34.379 [main] o.s.w.s.m.m.a.RequestMappingHandlerMapping - Mapped "{[/api/event-trace/status],methods=[POST]}" onto public org.apache.shardingsphere.elasticjob.lite.ui.web.response.ResponseResult<org.apache.shardingsphere.elasticjob.lite.ui.dto.response.BasePageResponse<org.apache.shardingsphere.elasticjob.tracing.event.JobStatusTraceEvent>> org.apache.shardingsphere.elasticjob.lite.ui.web.controller.EventTraceHistoryController.findJobStatusTraceEvents(org.apache.shardingsphere.elasticjob.lite.ui.dto.request.FindJobStatusTraceEventsRequest)
[INFO ] 20:20:34.382 [main] o.s.w.s.m.m.a.RequestMappingHandlerMapping - Mapped "{[/api/servers/count],methods=[GET]}" onto public int org.apache.shardingsphere.elasticjob.lite.ui.web.controller.ServerOperationController.getServersTotalCount()
[INFO ] 20:20:34.382 [main] o.s.w.s.m.m.a.RequestMappingHandlerMapping - Mapped "{[/api/servers/getAllServersBriefInfo],methods=[GET]}" onto public org.apache.shardingsphere.elasticjob.lite.ui.web.response.ResponseResult<java.util.Collection<org.apache.shardingsphere.elasticjob.lite.lifecycle.domain.ServerBriefInfo>> org.apache.shardingsphere.elasticjob.lite.ui.web.controller.ServerOperationController.getAllServersBriefInfo()
[INFO ] 20:20:34.382 [main] o.s.w.s.m.m.a.RequestMappingHandlerMapping - Mapped "{[/api/servers/{serverIp}/disable],methods=[POST]}" onto public org.apache.shardingsphere.elasticjob.lite.ui.web.response.ResponseResult<java.lang.Boolean> org.apache.shardingsphere.elasticjob.lite.ui.web.controller.ServerOperationController.disableServer(java.lang.String)
[INFO ] 20:20:34.382 [main] o.s.w.s.m.m.a.RequestMappingHandlerMapping - Mapped "{[/api/servers/{serverIp}/enable],methods=[POST]}" onto public org.apache.shardingsphere.elasticjob.lite.ui.web.response.ResponseResult<java.lang.Boolean> org.apache.shardingsphere.elasticjob.lite.ui.web.controller.ServerOperationController.enableServer(java.lang.String)
[INFO ] 20:20:34.383 [main] o.s.w.s.m.m.a.RequestMappingHandlerMapping - Mapped "{[/api/servers/{serverIp}/shutdown],methods=[POST]}" onto public org.apache.shardingsphere.elasticjob.lite.ui.web.response.ResponseResult<java.lang.Boolean> org.apache.shardingsphere.elasticjob.lite.ui.web.controller.ServerOperationController.shutdownServer(java.lang.String)
[INFO ] 20:20:34.383 [main] o.s.w.s.m.m.a.RequestMappingHandlerMapping - Mapped "{[/api/servers/{serverIp:.+}],methods=[DELETE]}" onto public org.apache.shardingsphere.elasticjob.lite.ui.web.response.ResponseResult<java.lang.Boolean> org.apache.shardingsphere.elasticjob.lite.ui.web.controller.ServerOperationController.removeServer(java.lang.String)
[INFO ] 20:20:34.383 [main] o.s.w.s.m.m.a.RequestMappingHandlerMapping - Mapped "{[/api/servers/{serverIp}/jobs/{jobName}/disable],methods=[POST]}" onto public org.apache.shardingsphere.elasticjob.lite.ui.web.response.ResponseResult<java.lang.Boolean> org.apache.shardingsphere.elasticjob.lite.ui.web.controller.ServerOperationController.disableServerJob(java.lang.String,java.lang.String)
[INFO ] 20:20:34.383 [main] o.s.w.s.m.m.a.RequestMappingHandlerMapping - Mapped "{[/api/servers/{serverIp}/jobs/{jobName}/enable],methods=[POST]}" onto public org.apache.shardingsphere.elasticjob.lite.ui.web.response.ResponseResult<java.lang.Boolean> org.apache.shardingsphere.elasticjob.lite.ui.web.controller.ServerOperationController.enableServerJob(java.lang.String,java.lang.String)
[INFO ] 20:20:34.383 [main] o.s.w.s.m.m.a.RequestMappingHandlerMapping - Mapped "{[/api/servers/{serverIp}/jobs/{jobName}/shutdown],methods=[POST]}" onto public org.apache.shardingsphere.elasticjob.lite.ui.web.response.ResponseResult<java.lang.Boolean> org.apache.shardingsphere.elasticjob.lite.ui.web.controller.ServerOperationController.shutdownServerJob(java.lang.String,java.lang.String)
[INFO ] 20:20:34.383 [main] o.s.w.s.m.m.a.RequestMappingHandlerMapping - Mapped "{[/api/servers/{serverIp}/jobs/{jobName:.+}],methods=[DELETE]}" onto public org.apache.shardingsphere.elasticjob.lite.ui.web.response.ResponseResult<java.lang.Boolean> org.apache.shardingsphere.elasticjob.lite.ui.web.controller.ServerOperationController.removeServerJob(java.lang.String,java.lang.String)
[INFO ] 20:20:34.384 [main] o.s.w.s.m.m.a.RequestMappingHandlerMapping - Mapped "{[/api/servers/{serverIp}/jobs],methods=[GET]}" onto public org.apache.shardingsphere.elasticjob.lite.ui.web.response.ResponseResult<java.util.Collection<org.apache.shardingsphere.elasticjob.lite.lifecycle.domain.JobBriefInfo>> org.apache.shardingsphere.elasticjob.lite.ui.web.controller.ServerOperationController.getJobs(java.lang.String)
[INFO ] 20:20:34.387 [main] o.s.w.s.m.m.a.RequestMappingHandlerMapping - Mapped "{[/api/registry-center/activated],methods=[GET]}" onto public org.apache.shardingsphere.elasticjob.lite.ui.web.response.ResponseResult<org.apache.shardingsphere.elasticjob.lite.ui.domain.RegistryCenterConfiguration> org.apache.shardingsphere.elasticjob.lite.ui.web.controller.RegistryCenterController.activated()
[INFO ] 20:20:34.387 [main] o.s.w.s.m.m.a.RequestMappingHandlerMapping - Mapped "{[/api/registry-center/add],methods=[POST]}" onto public org.apache.shardingsphere.elasticjob.lite.ui.web.response.ResponseResult<java.lang.Boolean> org.apache.shardingsphere.elasticjob.lite.ui.web.controller.RegistryCenterController.add(org.apache.shardingsphere.elasticjob.lite.ui.domain.RegistryCenterConfiguration)
[INFO ] 20:20:34.387 [main] o.s.w.s.m.m.a.RequestMappingHandlerMapping - Mapped "{[/api/registry-center/load],methods=[GET]}" onto public org.apache.shardingsphere.elasticjob.lite.ui.web.response.ResponseResult<java.util.Collection<org.apache.shardingsphere.elasticjob.lite.ui.domain.RegistryCenterConfiguration>> org.apache.shardingsphere.elasticjob.lite.ui.web.controller.RegistryCenterController.load(javax.servlet.http.HttpServletRequest)
[INFO ] 20:20:34.387 [main] o.s.w.s.m.m.a.RequestMappingHandlerMapping - Mapped "{[/api/registry-center],methods=[DELETE]}" onto public org.apache.shardingsphere.elasticjob.lite.ui.web.response.ResponseResult org.apache.shardingsphere.elasticjob.lite.ui.web.controller.RegistryCenterController.delete(org.apache.shardingsphere.elasticjob.lite.ui.domain.RegistryCenterConfiguration)
[INFO ] 20:20:34.387 [main] o.s.w.s.m.m.a.RequestMappingHandlerMapping - Mapped "{[/api/registry-center/connect],methods=[POST]}" onto public org.apache.shardingsphere.elasticjob.lite.ui.web.response.ResponseResult<java.lang.Boolean> org.apache.shardingsphere.elasticjob.lite.ui.web.controller.RegistryCenterController.connect(org.apache.shardingsphere.elasticjob.lite.ui.domain.RegistryCenterConfiguration,javax.servlet.http.HttpServletRequest)
[INFO ] 20:20:34.389 [main] o.s.w.s.m.m.a.RequestMappingHandlerMapping - Mapped "{[/api/data-source/drivers],methods=[GET]}" onto public org.apache.shardingsphere.elasticjob.lite.ui.web.response.ResponseResult<java.util.Collection<java.lang.String>> org.apache.shardingsphere.elasticjob.lite.ui.web.controller.EventTraceDataSourceController.availableDrivers()
[INFO ] 20:20:34.389 [main] o.s.w.s.m.m.a.RequestMappingHandlerMapping - Mapped "{[/api/data-source/connectTest],methods=[POST]}" onto public org.apache.shardingsphere.elasticjob.lite.ui.web.response.ResponseResult<java.lang.Boolean> org.apache.shardingsphere.elasticjob.lite.ui.web.controller.EventTraceDataSourceController.connectTest(org.apache.shardingsphere.elasticjob.lite.ui.domain.EventTraceDataSourceConfiguration,javax.servlet.http.HttpServletRequest)
[INFO ] 20:20:34.389 [main] o.s.w.s.m.m.a.RequestMappingHandlerMapping - Mapped "{[/api/data-source/activated],methods=[GET]}" onto public boolean org.apache.shardingsphere.elasticjob.lite.ui.web.controller.EventTraceDataSourceController.activated(javax.servlet.http.HttpServletRequest)
[INFO ] 20:20:34.389 [main] o.s.w.s.m.m.a.RequestMappingHandlerMapping - Mapped "{[/api/data-source/add],methods=[POST]}" onto public org.apache.shardingsphere.elasticjob.lite.ui.web.response.ResponseResult<java.lang.Boolean> org.apache.shardingsphere.elasticjob.lite.ui.web.controller.EventTraceDataSourceController.add(org.apache.shardingsphere.elasticjob.lite.ui.domain.EventTraceDataSourceConfiguration)
[INFO ] 20:20:34.390 [main] o.s.w.s.m.m.a.RequestMappingHandlerMapping - Mapped "{[/api/data-source/load],methods=[GET]}" onto public org.apache.shardingsphere.elasticjob.lite.ui.web.response.ResponseResult<java.util.Collection<org.apache.shardingsphere.elasticjob.lite.ui.domain.EventTraceDataSourceConfiguration>> org.apache.shardingsphere.elasticjob.lite.ui.web.controller.EventTraceDataSourceController.load(javax.servlet.http.HttpServletRequest)
[INFO ] 20:20:34.390 [main] o.s.w.s.m.m.a.RequestMappingHandlerMapping - Mapped "{[/api/data-source],methods=[DELETE]}" onto public org.apache.shardingsphere.elasticjob.lite.ui.web.response.ResponseResult org.apache.shardingsphere.elasticjob.lite.ui.web.controller.EventTraceDataSourceController.delete(org.apache.shardingsphere.elasticjob.lite.ui.domain.EventTraceDataSourceConfiguration)
[INFO ] 20:20:34.390 [main] o.s.w.s.m.m.a.RequestMappingHandlerMapping - Mapped "{[/api/data-source/connect],methods=[POST]}" onto public org.apache.shardingsphere.elasticjob.lite.ui.web.response.ResponseResult<java.lang.Boolean> org.apache.shardingsphere.elasticjob.lite.ui.web.controller.EventTraceDataSourceController.connect(org.apache.shardingsphere.elasticjob.lite.ui.domain.EventTraceDataSourceConfiguration,javax.servlet.http.HttpServletRequest)
[INFO ] 20:20:34.392 [main] o.s.w.s.m.m.a.RequestMappingHandlerMapping - Mapped "{[/api/jobs/config/{jobName:.+}],methods=[GET]}" onto public org.apache.shardingsphere.elasticjob.lite.ui.web.response.ResponseResult<org.apache.shardingsphere.elasticjob.infra.pojo.JobConfigurationPOJO> org.apache.shardingsphere.elasticjob.lite.ui.web.controller.JobConfigController.getJobConfig(java.lang.String)
[INFO ] 20:20:34.392 [main] o.s.w.s.m.m.a.RequestMappingHandlerMapping - Mapped "{[/api/jobs/config],methods=[PUT]}" onto public org.apache.shardingsphere.elasticjob.lite.ui.web.response.ResponseResult<java.lang.Boolean> org.apache.shardingsphere.elasticjob.lite.ui.web.controller.JobConfigController.updateJobConfig(org.apache.shardingsphere.elasticjob.infra.pojo.JobConfigurationPOJO)
[INFO ] 20:20:34.392 [main] o.s.w.s.m.m.a.RequestMappingHandlerMapping - Mapped "{[/api/jobs/config/{jobName:.+}],methods=[DELETE]}" onto public org.apache.shardingsphere.elasticjob.lite.ui.web.response.ResponseResult<java.lang.Boolean> org.apache.shardingsphere.elasticjob.lite.ui.web.controller.JobConfigController.removeJob(java.lang.String)
[INFO ] 20:20:34.393 [main] o.s.w.s.m.m.a.RequestMappingHandlerMapping - Mapped "{[/error],produces=[text/html]}" onto public org.springframework.web.servlet.ModelAndView org.springframework.boot.autoconfigure.web.BasicErrorController.errorHtml(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse)
[INFO ] 20:20:34.393 [main] o.s.w.s.m.m.a.RequestMappingHandlerMapping - Mapped "{[/error]}" onto public org.springframework.http.ResponseEntity<java.util.Map<java.lang.String, java.lang.Object>> org.springframework.boot.autoconfigure.web.BasicErrorController.error(javax.servlet.http.HttpServletRequest)
[INFO ] 20:20:34.412 [main] o.s.w.s.h.SimpleUrlHandlerMapping - Mapped URL path [/webjars/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
[INFO ] 20:20:34.412 [main] o.s.w.s.h.SimpleUrlHandlerMapping - Mapped URL path [/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
[INFO ] 20:20:34.422 [main] o.s.w.s.m.m.a.ExceptionHandlerExceptionResolver - Detected @ExceptionHandler methods in restExceptionHandler
[INFO ] 20:20:34.438 [main] o.s.w.s.h.SimpleUrlHandlerMapping - Mapped URL path [/**/favicon.ico] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
[INFO ] 20:20:34.453 [main] o.s.b.a.w.WebMvcAutoConfiguration$WelcomePageHandlerMapping - Adding welcome page: class path resource [public/index.html]
[INFO ] 20:20:34.624 [main] o.s.j.e.a.AnnotationMBeanExporter - Registering beans for JMX exposure on startup
[INFO ] 20:20:34.634 [main] o.a.coyote.http11.Http11NioProtocol - Starting ProtocolHandler ["http-nio-8088"]
[INFO ] 20:20:34.655 [main] o.a.tomcat.util.net.NioSelectorPool - Using a shared selector for servlet write/read
[INFO ] 20:20:34.666 [main] o.s.b.c.e.t.TomcatEmbeddedServletContainer - Tomcat started on port(s): 8088 (http)
[INFO ] 20:20:34.670 [main] o.a.s.elasticjob.lite.ui.Bootstrap - Started Bootstrap in 3.898 seconds (JVM running for 4.52)

打開http://localhost:8088,輸入我們配置的root/root賬號

SpringBoot定時任務 - 什么是ElasticJob?如何集成ElasticJob實作分布式任務調度?_分布式任務_04

全域配置

配置zk

SpringBoot定時任務 - 什么是ElasticJob?如何集成ElasticJob實作分布式任務調度?_elastic_05

配置資料源

SpringBoot定時任務 - 什么是ElasticJob?如何集成ElasticJob實作分布式任務調度?_分布式任務_06

作業操作

作業維度

SpringBoot定時任務 - 什么是ElasticJob?如何集成ElasticJob實作分布式任務調度?_elastic_07

服務器維度

SpringBoot定時任務 - 什么是ElasticJob?如何集成ElasticJob實作分布式任務調度?_spring_08

作業歷史

作業歷史本質上就是從H2中獲取資料,你也可以訪問H2-Console查看

歷史軌跡

SpringBoot定時任務 - 什么是ElasticJob?如何集成ElasticJob實作分布式任務調度?_elastic_09

歷史狀態

SpringBoot定時任務 - 什么是ElasticJob?如何集成ElasticJob實作分布式任務調度?_spring_10

參考資料

轉載請註明出處,本文鏈接:https://www.uj5u.com/houduan/500741.html

標籤:Python

上一篇:Python教程:with陳述句的用法

下一篇:Python輸出指定時間間隔內的日期

標籤雲
其他(157675) Python(38076) JavaScript(25376) Java(17977) C(15215) 區塊鏈(8255) C#(7972) AI(7469) 爪哇(7425) MySQL(7132) html(6777) 基礎類(6313) sql(6102) 熊猫(6058) PHP(5869) 数组(5741) R(5409) Linux(5327) 反应(5209) 腳本語言(PerlPython)(5129) 非技術區(4971) Android(4554) 数据框(4311) css(4259) 节点.js(4032) C語言(3288) json(3245) 列表(3129) 扑(3119) C++語言(3117) 安卓(2998) 打字稿(2995) VBA(2789) Java相關(2746) 疑難問題(2699) 细绳(2522) 單片機工控(2479) iOS(2429) ASP.NET(2402) MongoDB(2323) 麻木的(2285) 正则表达式(2254) 字典(2211) 循环(2198) 迅速(2185) 擅长(2169) 镖(2155) 功能(1967) .NET技术(1958) Web開發(1951) python-3.x(1918) HtmlCss(1915) 弹簧靴(1913) C++(1909) xml(1889) PostgreSQL(1872) .NETCore(1853) 谷歌表格(1846) Unity3D(1843) for循环(1842)

熱門瀏覽
  • 【C++】Microsoft C++、C 和匯編程式檔案

    ......

    uj5u.com 2020-09-10 00:57:23 more
  • 例外宣告

    相比于斷言適用于排除邏輯上不可能存在的狀態,例外通常是用于邏輯上可能發生的錯誤。 例外宣告 Item 1:當函式不可能拋出例外或不能接受拋出例外時,使用noexcept 理由 如果不打算拋出例外的話,程式就會認為無法處理這種錯誤,并且應當盡早終止,如此可以有效地阻止例外的傳播與擴散。 示例 //不可 ......

    uj5u.com 2020-09-10 00:57:27 more
  • Codeforces 1400E Clear the Multiset(貪心 + 分治)

    鏈接:https://codeforces.com/problemset/problem/1400/E 來源:Codeforces 思路:給你一個陣列,現在你可以進行兩種操作,操作1:將一段沒有 0 的區間進行減一的操作,操作2:將 i 位置上的元素歸零。最終問:將這個陣列的全部元素歸零后操作的最少 ......

    uj5u.com 2020-09-10 00:57:30 more
  • UVA11610 【Reverse Prime】

    本人看到此題沒有翻譯,就附帶了一個自己的翻譯版本 思考 這一題,它的第一個要求是找出所有 $7$ 位反向質數及其質因數的個數。 我們應該需要質數篩篩選1~$10^{7}$的所有數,這里就不慢慢介紹了。但是,重讀題,我們突然發現反向質數都是 $7$ 位,而將它反過來后的數字卻是 $6$ 位數,這就說明 ......

    uj5u.com 2020-09-10 00:57:36 more
  • 統計區間素數數量

    1 #pragma GCC optimize(2) 2 #include <bits/stdc++.h> 3 using namespace std; 4 bool isprime[1000000010]; 5 vector<int> prime; 6 inline int getlist(int ......

    uj5u.com 2020-09-10 00:57:47 more
  • C/C++編程筆記:C++中的 const 變數詳解,教你正確認識const用法

    1、C中的const 1、區域const變數存放在堆疊區中,會分配記憶體(也就是說可以通過地址間接修改變數的值)。測驗代碼如下: 運行結果: 2、全域const變數存放在只讀資料段(不能通過地址修改,會發生寫入錯誤), 默認為外部聯編,可以給其他源檔案使用(需要用extern關鍵字修飾) 運行結果: ......

    uj5u.com 2020-09-10 00:58:04 more
  • 【C++犯錯記錄】VS2019 MFC添加資源不懂如何修改資源宏ID

    1. 首先在資源視圖中,添加資源 2. 點擊新添加的資源,復制自動生成的ID 3. 在解決方案資源管理器中找到Resource.h檔案,編輯,使用整個專案搜索和替換的方式快速替換 宏宣告 4. Ctrl+Shift+F 全域搜索,點擊查找全部,然后逐個替換 5. 為什么使用搜索替換而不使用屬性視窗直 ......

    uj5u.com 2020-09-10 00:59:11 more
  • 【C++犯錯記錄】VS2019 MFC不懂的批量添加資源

    1. 打開資源頭檔案Resource.h,在其中預先定義好宏 ID(不清楚其實ID值應該設定多少,可以先新建一個相同的資源項,再在這個資源的ID值的基礎上遞增即可) 2. 在資源視圖中選中專案資源,按F7編輯資源檔案,按 ID 型別 相對路徑的形式添加 資源。(別忘了先把檔案拷貝到專案中的res檔案 ......

    uj5u.com 2020-09-10 01:00:19 more
  • C/C++編程筆記:關于C++的參考型別,專供新手入門使用

    今天要講的是C++中我最喜歡的一個用法——參考,也叫別名。 參考就是給一個變數名取一個變數名,方便我們間接地使用這個變數。我們可以給一個變數創建N個參考,這N + 1個變數共享了同一塊記憶體區域。(參考型別的變數會占用記憶體空間,占用的記憶體空間的大小和指標型別的大小是相同的。雖然參考是一個物件的別名,但 ......

    uj5u.com 2020-09-10 01:00:22 more
  • 【C/C++編程筆記】從頭開始學習C ++:初學者完整指南

    眾所周知,C ++的學習曲線陡峭,但是花時間學習這種語言將為您的職業帶來奇跡,并使您與其他開發人員區分開。您會更輕松地學習新語言,形成真正的解決問題的技能,并在編程的基礎上打下堅實的基礎。 C ++將幫助您養成良好的編程習慣(即清晰一致的編碼風格,在撰寫代碼時注釋代碼,并限制類內部的可見性),并且由 ......

    uj5u.com 2020-09-10 01:00:41 more
最新发布
  • Rust中的智能指標:Box<T> Rc<T> Arc<T> Cell<T> RefCell<T> Weak

    Rust中的智能指標是什么 智能指標(smart pointers)是一類資料結構,是擁有資料所有權和額外功能的指標。是指標的進一步發展 指標(pointer)是一個包含記憶體地址的變數的通用概念。這個地址參考,或 ” 指向”(points at)一些其 他資料 。參考以 & 符號為標志并借用了他們所 ......

    uj5u.com 2023-04-20 07:24:10 more
  • Java的值傳遞和參考傳遞

    值傳遞不會改變本身,參考傳遞(如果傳遞的值需要實體化到堆里)如果發生修改了會改變本身。 1.基本資料型別都是值傳遞 package com.example.basic; public class Test { public static void main(String[] args) { int ......

    uj5u.com 2023-04-20 07:24:04 more
  • [2]SpinalHDL教程——Scala簡單入門

    第一個 Scala 程式 shell里面輸入 $ scala scala> 1 + 1 res0: Int = 2 scala> println("Hello World!") Hello World! 檔案形式 object HelloWorld { /* 這是我的第一個 Scala 程式 * 以 ......

    uj5u.com 2023-04-20 07:23:58 more
  • 理解函式指標和回呼函式

    理解 函式指標 指向函式的指標。比如: 理解函式指標的偽代碼 void (*p)(int type, char *data); // 定義一個函式指標p void func(int type, char *data); // 宣告一個函式func p = func; // 將指標p指向函式func ......

    uj5u.com 2023-04-20 07:23:52 more
  • Django筆記二十五之資料庫函式之日期函式

    本文首發于公眾號:Hunter后端 原文鏈接:Django筆記二十五之資料庫函式之日期函式 日期函式主要介紹兩個大類,Extract() 和 Trunc() Extract() 函式作用是提取日期,比如我們可以提取一個日期欄位的年份,月份,日等資料 Trunc() 的作用則是截取,比如 2022-0 ......

    uj5u.com 2023-04-20 07:23:45 more
  • 一天吃透JVM面試八股文

    什么是JVM? JVM,全稱Java Virtual Machine(Java虛擬機),是通過在實際的計算機上仿真模擬各種計算機功能來實作的。由一套位元組碼指令集、一組暫存器、一個堆疊、一個垃圾回收堆和一個存盤方法域等組成。JVM屏蔽了與作業系統平臺相關的資訊,使得Java程式只需要生成在Java虛擬機 ......

    uj5u.com 2023-04-20 07:23:31 more
  • 使用Java接入小程式訂閱訊息!

    更新完微信服務號的模板訊息之后,我又趕緊把微信小程式的訂閱訊息給實作了!之前我一直以為微信小程式也是要企業才能申請,沒想到小程式個人就能申請。 訊息推送平臺🔥推送下發【郵件】【短信】【微信服務號】【微信小程式】【企業微信】【釘釘】等訊息型別。 https://gitee.com/zhongfuch ......

    uj5u.com 2023-04-20 07:22:59 more
  • java -- 緩沖流、轉換流、序列化流

    緩沖流 緩沖流, 也叫高效流, 按照資料型別分類: 位元組緩沖流:BufferedInputStream,BufferedOutputStream 字符緩沖流:BufferedReader,BufferedWriter 緩沖流的基本原理,是在創建流物件時,會創建一個內置的默認大小的緩沖區陣列,通過緩沖 ......

    uj5u.com 2023-04-20 07:22:49 more
  • Java-SpringBoot-Range請求頭設定實作視頻分段傳輸

    老實說,人太懶了,現在基本都不喜歡寫筆記了,但是網上有關Range請求頭的文章都太水了 下面是抄的一段StackOverflow的代碼...自己大修改過的,寫的注釋挺全的,應該直接看得懂,就不解釋了 寫的不好...只是希望能給視頻網站開發的新手一點點幫助吧. 業務場景:視頻分段傳輸、視頻多段傳輸(理 ......

    uj5u.com 2023-04-20 07:22:42 more
  • Windows 10開發教程_編程入門自學教程_菜鳥教程-免費教程分享

    教程簡介 Windows 10開發入門教程 - 從簡單的步驟了解Windows 10開發,從基本到高級概念,包括簡介,UWP,第一個應用程式,商店,XAML控制元件,資料系結,XAML性能,自適應設計,自適應UI,自適應代碼,檔案管理,SQLite資料庫,應用程式到應用程式通信,應用程式本地化,應用程式 ......

    uj5u.com 2023-04-20 07:22:35 more