-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into zhaoyuguang_12
- Loading branch information
Showing
58 changed files
with
1,246 additions
and
434 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
...ontent/user-manual/elasticjob-lite/configuration/built-in-strategy/_index.cn.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
+++ | ||
title = "内置策略" | ||
weight = 4 | ||
chapter = true | ||
+++ | ||
|
||
## 简介 | ||
|
||
ElasticJob 通过 SPI 方式允许开发者扩展策略; | ||
与此同时,ElasticJob 也提供了大量的内置策略以便于开发者使用。 | ||
|
||
## 使用方式 | ||
|
||
内置策略通过 type 进行配置。 | ||
本章节根据功能区分并罗列 ElasticJob 全部的内置算法,供开发者参考。 |
15 changes: 15 additions & 0 deletions
15
...ontent/user-manual/elasticjob-lite/configuration/built-in-strategy/_index.en.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
+++ | ||
title = "Built-in Strategy" | ||
weight = 4 | ||
chapter = true | ||
+++ | ||
|
||
## Introduction | ||
|
||
ElasticJob allows developers to implement strategies via SPI; | ||
At the same time, ElasticJob also provides a couple of built-in strategies for simplify developers. | ||
|
||
## Usage | ||
|
||
The built-in strategies are configured by type. | ||
This chapter distinguishes and lists all the built-in strategies of ElasticJob according to its functions for developers' reference. |
22 changes: 22 additions & 0 deletions
22
...user-manual/elasticjob-lite/configuration/built-in-strategy/error-handler.cn.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
+++ | ||
title = "错误处理策略" | ||
weight = 3 | ||
+++ | ||
|
||
## 记录日志策略 | ||
|
||
类型:LOG | ||
|
||
记录作业异常日志,但不中断作业执行。 | ||
|
||
## 抛出异常策略 | ||
|
||
类型:THROW | ||
|
||
抛出系统异常并中断作业执行。 | ||
|
||
## 忽略异常策略 | ||
|
||
类型:IGNORE | ||
|
||
忽略系统异常且不中断作业执行。 |
22 changes: 22 additions & 0 deletions
22
...user-manual/elasticjob-lite/configuration/built-in-strategy/error-handler.en.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
+++ | ||
title = "Error Handler Strategy" | ||
weight = 3 | ||
+++ | ||
|
||
## Log Strategy | ||
|
||
Type: LOG | ||
|
||
Log error and do not interrupt job. | ||
|
||
## Throw Strategy | ||
|
||
Type: THROW | ||
|
||
Throw system exception and interrupt job. | ||
|
||
## Ignore Strategy | ||
|
||
Type: IGNORE | ||
|
||
Ignore exception and do not interrupt job. |
37 changes: 37 additions & 0 deletions
37
...tent/user-manual/elasticjob-lite/configuration/built-in-strategy/sharding.cn.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
+++ | ||
title = "作业分片策略" | ||
weight = 1 | ||
+++ | ||
|
||
## 平均分片策略 | ||
|
||
类型:AVG_ALLOCATION | ||
|
||
根据分片项平均分片。 | ||
|
||
如果作业服务器数量与分片总数无法整除,多余的分片将会顺序的分配至每一个作业服务器。 | ||
|
||
举例说明: | ||
1. 如果 3 台作业服务器且分片总数为9,则分片结果为:1=[0,1,2], 2=[3,4,5], 3=[6,7,8]; | ||
2. 如果 3 台作业服务器且分片总数为8,则分片结果为:1=[0,1,6], 2=[2,3,7], 3=[4,5]; | ||
3. 如果 3 台作业服务器且分片总数为10,则分片结果为:1=[0,1,2,9], 2=[3,4,5], 3=[6,7,8]。 | ||
|
||
## 奇偶分片策略 | ||
|
||
类型:ODEVITY | ||
|
||
根据作业名称哈希值的奇偶数决定按照作业服务器 IP 升序或是降序的方式分片。 | ||
|
||
如果作业名称哈希值是偶数,则按照 IP 地址进行升序分片; | ||
如果作业名称哈希值是奇数,则按照 IP 地址进行降序分片。 | ||
可用于让服务器负载在多个作业共同运行时分配的更加均匀。 | ||
|
||
举例说明: | ||
1. 如果 3 台作业服务器,分片总数为2且作业名称的哈希值为偶数,则分片结果为:1 = [0], 2 = [1], 3 = []; | ||
2. 如果 3 台作业服务器,分片总数为2且作业名称的哈希值为奇数,则分片结果为:3 = [0], 2 = [1], 1 = []。 | ||
|
||
## 轮询分片策略 | ||
|
||
类型:ROUND_ROBIN | ||
|
||
根据作业名称轮询分片。 |
Oops, something went wrong.