Skip to content

Commit

Permalink
Merge pull request #1 from apache/master
Browse files Browse the repository at this point in the history
merge apache/elastic-job to  wjdxw/elastic-job
  • Loading branch information
wjdxw authored Aug 18, 2024
2 parents 3b3cedc + 756de29 commit d14bae2
Show file tree
Hide file tree
Showing 1,388 changed files with 28,682 additions and 47,148 deletions.
9 changes: 8 additions & 1 deletion .asf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ notifications:
pullrequests: [email protected]

github:
description: Distributed scheduled job framework
description: Distributed scheduled job
labels:
- elasticjob
- database
Expand All @@ -35,3 +35,10 @@ github:
features:
issues: true
projects: true
protected_branches:
master:
required_status_checks:
contexts:
- Check - CheckStyle
- Check - Spotless
- Check - License
2 changes: 0 additions & 2 deletions .github/ISSUE_TEMPLATE/bug-report.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ Please answer these questions before submitting your issue. Thanks!

### Which version of ElasticJob did you use?

### Which project did you use? ElasticJob-Lite or ElasticJob-Cloud?

### Expected behavior

### Actual behavior
Expand Down
49 changes: 49 additions & 0 deletions .github/workflows/graalvm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
#
# 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.
#

name: NativeTest CI - GraalVM Native Image

on:
pull_request:
branches: [ master ]
paths:
- '.github/workflows/graalvm.yml'
- 'reachability-metadata/src/**'
- 'test/native/native-image-filter/**'
- 'test/native/src/**'

jobs:
build:
if: github.repository == 'apache/shardingsphere-elasticjob'
strategy:
matrix:
java: [ '22.0.2' ]
os: [ 'ubuntu-latest' ]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Set up GraalVM CE ${{ matrix.java }}
uses: graalvm/setup-graalvm@v1
with:
java-version: ${{ matrix.java }}
distribution: 'graalvm-community'
github-token: ${{ secrets.GITHUB_TOKEN }}
cache: 'maven'
native-image-job-reports: 'true'
- name: Run nativeTest with GraalVM CE for ${{ matrix.java-version }}
continue-on-error: true
run: ./mvnw -PnativeTestInElasticJob -T1C -B -e clean test
25 changes: 15 additions & 10 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,36 +21,41 @@
name: Java CI with Maven

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
build:
if: github.repository == 'apache/shardingsphere-elasticjob'
strategy:
matrix:
java: [ 8, 17, 19 ]
java: [ 8, 17, 21, 22 ]
os: [ 'windows-latest', 'macos-latest', 'ubuntu-latest' ]

runs-on: ${{ matrix.os }}

steps:
- name: Configure Git
if: matrix.os == 'windows-latest'
run: |
git config --global core.longpaths true
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: 'temurin'
distribution: 'zulu'
java-version: ${{ matrix.java }}
- name: Build with Maven
cache: 'maven'
- name: Build with Maven in Windows
if: matrix.os == 'windows-latest'
run: |
./mvnw --batch-mode --no-transfer-progress '-Dmaven.javadoc.skip=true' clean install -T1C
- name: Build with Maven in Linux or macOS
if: matrix.os == 'macos-latest' || matrix.os == 'ubuntu-latest'
run: |
./mvnw --batch-mode --no-transfer-progress '-Dmaven.javadoc.skip=true' clean install
./mvnw --batch-mode --no-transfer-progress '-Dmaven.javadoc.skip=true' clean install -Pcheck -T1C
- name: Upload coverage to Codecov
if: matrix.os == 'ubuntu-latest' && matrix.java == '8'
uses: codecov/codecov-action@v3
with:
file: '**/target/site/jacoco/jacoco.xml'
- name: Build Examples with Maven
run: ./mvnw clean package -B -f examples/pom.xml -T1C
58 changes: 58 additions & 0 deletions .github/workflows/required-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
#
# 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.
#

name: Required - Check

on:
pull_request:
branches: [ master ]
workflow_dispatch:

concurrency:
group: check-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
check-checkstyle:
name: Check - CheckStyle
if: github.repository == 'apache/shardingsphere-elasticjob'
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v3
- name: Run CheckStyle
run: ./mvnw checkstyle:check -Pcheck -T1C

check-spotless:
name: Check - Spotless
if: github.repository == 'apache/shardingsphere-elasticjob'
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v3
- name: Run Spotless
run: ./mvnw spotless:check -Pcheck -T1C

check-license:
name: Check - License
if: github.repository == 'apache/shardingsphere-elasticjob'
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v3
- name: Run Apache Rat
run: ./mvnw apache-rat:check -Pcheck -T1C
26 changes: 25 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,26 +1,40 @@
# maven ignore
target/
*.class
*.jar
*.war
*.zip
*.tar
*.tar.gz
dependency-reduced-pom.xml
.flattened-pom.xml
pom.xml.versionsBackup

# maven plugin ignore
release.properties
*.gpg

# eclipse ignore
.settings/
.project
.classpath
.factorypath

# idea ignore
.idea/
!/.idea/icon.png
*.ipr
*.iml
*.iws

# vscode ignore
.vscode/

# temp ignore
logs/
*.doc
*.log
*.tlog
*.doc
*.cache
*.diff
*.patch
Expand All @@ -30,4 +44,14 @@ logs/
.DS_Store
Thumbs.db

# antlr ignore
gen/
*.tokens

# profiler ignore
.profiler/

# hugo ignore
public/
.hugo_build.lock
*.html-e
8 changes: 4 additions & 4 deletions .mvn/wrapper/maven-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
# 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.

distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.8.5/apache-maven-3.8.5-bin.zip
wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.1/maven-wrapper-3.1.1.jar
wrapperVersion=3.3.2
distributionType=only-script
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.8/apache-maven-3.9.8-bin.zip
31 changes: 5 additions & 26 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
# [ElasticJob - distributed scheduled job solution](http://shardingsphere.apache.org/elasticjob/)
# [ElasticJob - Distributed scheduled job](http://shardingsphere.apache.org/elasticjob/)

**Official website: https://shardingsphere.apache.org/elasticjob/**

[![Stargazers over time](https://starchart.cc/apache/shardingsphere-elasticjob.svg)](https://starchart.cc/apache/shardingsphere-elasticjob)

ElasticJob is a distributed scheduling solution consisting of two separate projects, ElasticJob-Lite and ElasticJob-Cloud.

Through the functions of flexible scheduling, resource management and job management,
it creates a distributed scheduling solution suitable for Internet scenarios,
and provides a diversified job ecosystem through open architecture design.
Expand All @@ -21,8 +19,8 @@ You are welcome to communicate with the community via the [mailing list](mailto:
[![GitHub release](https://img.shields.io/github/release/apache/shardingsphere-elasticjob.svg)](https://github.com/apache/shardingsphere-elasticjob/releases)

[![Maven Status](https://maven-badges.herokuapp.com/maven-central/org.apache.shardingsphere.elasticjob/elasticjob/badge.svg)](https://maven-badges.herokuapp.com/maven-central/org.apache.shardingsphere.elasticjob/elasticjob)
[![Build Status](https://secure.travis-ci.org/apache/shardingsphere-elasticjob.png?branch=master)](https://travis-ci.org/apache/shardingsphere-elasticjob)
[![GitHub Workflow](https://img.shields.io/github/workflow/status/apache/shardingsphere-elasticjob/Java%20CI%20with%20Maven%20on%20macOS/master)](https://github.com/apache/shardingsphere-elasticjob/actions?query=workflow%3A%22Java+CI+with+Maven+on+macOS%22)
[![Build Status](https://api.travis-ci.com/apache/shardingsphere-elasticjob.svg?branch=master)](https://travis-ci.org/apache/shardingsphere-elasticjob)
[![GitHub Workflow](https://img.shields.io/github/actions/workflow/status/apache/shardingsphere-elasticjob/maven.yml?branch=master)](https://github.com/apache/shardingsphere-elasticjob/actions/workflows/maven.yml?query=branch%3Amaster)
[![codecov](https://codecov.io/gh/apache/shardingsphere-elasticjob/branch/master/graph/badge.svg)](https://codecov.io/gh/apache/shardingsphere-elasticjob)
[![Maintainability](https://cloud.quality-gate.com/dashboard/api/badge?projectName=apache_shardingsphere-elasticjob&branchName=master)](https://cloud.quality-gate.com/dashboard/branches/396041#overview)

Expand All @@ -31,24 +29,9 @@ You are welcome to communicate with the community via the [mailing list](mailto:
Using ElasticJob developers can no longer worry about the non functional requirements such as job scale out, so that they can focus more on business coding.
At the same time, it can release operators too, so that they do not have to worry about high availability and management, and can automatically operate by simply adding servers.

### ElasticJob-Lite

A lightweight, decentralized solution that provides distributed task sharding services.

![ElasticJob-Lite Architecture](https://shardingsphere.apache.org/elasticjob/current/img/architecture/elasticjob_lite.png)

### ElasticJob-Cloud
It is a lightweight, decentralized solution that provides distributed task sharding services.

Uses Mesos to manage and isolate resources.

![ElasticJob-Cloud Architecture](https://shardingsphere.apache.org/elasticjob/current/img/architecture/elasticjob_cloud.png)

| | *ElasticJob-Lite* | *ElasticJob-Cloud* |
| ----------------- | ----------------- | ------------------ |
| Decentralization | Yes | No |
| Resource Assign | No | Yes |
| Job Execution | Daemon | Daemon + Transient |
| Deploy Dependency | ZooKeeper | ZooKeeper + Mesos |
![ElasticJob Architecture](https://shardingsphere.apache.org/elasticjob/current/img/architecture/elasticjob_lite.png)

## Features

Expand Down Expand Up @@ -94,7 +77,3 @@ Maven 3.5.0 or above required.
### ZooKeeper

ZooKeeper 3.6.0 or above required. [See details](https://zookeeper.apache.org/)

### Mesos (ElasticJob-Cloud only)

Mesos 1.1.0 or compatible version required (For ElasticJob-Cloud only). [See details](https://mesos.apache.org/)
26 changes: 3 additions & 23 deletions README_ZH.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

[![Stargazers over time](https://starchart.cc/apache/shardingsphere-elasticjob.svg)](https://starchart.cc/apache/shardingsphere-elasticjob)

ElasticJob 是面向互联网生态和海量任务的分布式调度解决方案,由两个相互独立的子项目 ElasticJob-Lite 和 ElasticJob-Cloud 组成
ElasticJob 是面向互联网生态和海量任务的分布式调度解决方案。
它通过弹性调度、资源管控、以及作业治理的功能,打造一个适用于互联网场景的分布式调度解决方案,并通过开放的架构设计,提供多元化的作业生态。
它的各个产品使用统一的作业 API,开发者仅需一次开发,即可随意部署。

Expand All @@ -24,25 +24,9 @@ ElasticJob 已于 2020 年 5 月 28 日成为 [Apache ShardingSphere](https://sh

使用 ElasticJob 能够让开发工程师不再担心任务的线性吞吐量提升等非功能需求,使他们能够更加专注于面向业务编码设计;
同时,它也能够解放运维工程师,使他们不必再担心任务的可用性和相关管理需求,只通过轻松的增加服务节点即可达到自动化运维的目的。
它定位为轻量级无中心化解决方案,使用 jar 的形式提供分布式任务的协调服务。

### ElasticJob-Lite

定位为轻量级无中心化解决方案,使用 jar 的形式提供分布式任务的协调服务。

![ElasticJob-Lite Architecture](https://shardingsphere.apache.org/elasticjob/current/img/architecture/elasticjob_lite.png)

### ElasticJob-Cloud

采用自研 Mesos Framework 的解决方案,额外提供资源治理、应用分发以及进程隔离等功能。

![ElasticJob-Cloud Architecture](https://shardingsphere.apache.org/elasticjob/current/img/architecture/elasticjob_cloud.png)

| | *ElasticJob-Lite* | *ElasticJob-Cloud* |
| --------- | ----------------- | ------------------ |
| 无中心化 |||
| 资源分配 | 不支持 | 支持 |
| 作业模式 | 常驻 | 常驻 + 瞬时 |
| 部署依赖 | ZooKeeper | ZooKeeper + Mesos |
![ElasticJob Architecture](https://shardingsphere.apache.org/elasticjob/current/img/architecture/elasticjob_lite.png)

## 功能列表

Expand Down Expand Up @@ -88,7 +72,3 @@ ElasticJob 已于 2020 年 5 月 28 日成为 [Apache ShardingSphere](https://sh
### ZooKeeper

请使用 ZooKeeper 3.6.0 及其以上版本。[详情参见](https://zookeeper.apache.org/)

### Mesos(仅 ElasticJob-Cloud 使用)

请使用 Mesos 1.1.0 及其兼容版本。[详情参见](https://mesos.apache.org/)
Loading

0 comments on commit d14bae2

Please sign in to comment.