| <?xml version="1.0" encoding="utf-8" standalone="yes"?> |
| <rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"> |
| <channel> |
| <title>内置策略 on ElasticJob</title> |
| <link>https://shardingsphere.apache.org/elasticjob/current/cn/user-manual/elasticjob-lite/configuration/built-in-strategy/</link> |
| <description>Recent content in 内置策略 on ElasticJob</description> |
| <generator>Hugo -- gohugo.io</generator> |
| <language>en-us</language> |
| |
| <atom:link href="https://shardingsphere.apache.org/elasticjob/current/cn/user-manual/elasticjob-lite/configuration/built-in-strategy/index.xml" rel="self" type="application/rss+xml" /> |
| |
| |
| <item> |
| <title>作业分片策略</title> |
| <link>https://shardingsphere.apache.org/elasticjob/current/cn/user-manual/elasticjob-lite/configuration/built-in-strategy/sharding/</link> |
| <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate> |
| |
| <guid>https://shardingsphere.apache.org/elasticjob/current/cn/user-manual/elasticjob-lite/configuration/built-in-strategy/sharding/</guid> |
| <description>平均分片策略 类型:AVG_ALLOCATION |
| 根据分片项平均分片。 |
| 如果作业服务器数量与分片总数无法整除,多余的分片将会顺序的分配至每一个作业服务器。 |
| 举例说明: |
| 如果 3 台作业服务器且分片总数为9,则分片结果为:1=[0,1,2], 2=[3,4,5], 3=[6,7,8]; 如果 3 台作业服务器且分片总数为8,则分片结果为:1=[0,1,6], 2=[2,3,7], 3=[4,5]; 如果 3 台作业服务器且分片总数为10,则分片结果为:1=[0,1,2,9], 2=[3,4,5], 3=[6,7,8]。 奇偶分片策略 类型:ODEVITY |
| 根据作业名称哈希值的奇偶数决定按照作业服务器 IP 升序或是降序的方式分片。 |
| 如果作业名称哈希值是偶数,则按照 IP 地址进行升序分片; 如果作业名称哈希值是奇数,则按照 IP 地址进行降序分片。 可用于让服务器负载在多个作业共同运行时分配的更加均匀。 |
| 举例说明: |
| 如果 3 台作业服务器,分片总数为2且作业名称的哈希值为偶数,则分片结果为:1 = [0], 2 = [1], 3 = []; 如果 3 台作业服务器,分片总数为2且作业名称的哈希值为奇数,则分片结果为:3 = [0], 2 = [1], 1 = []。 轮询分片策略 类型:ROUND_ROBIN |
| 根据作业名称轮询分片。</description> |
| </item> |
| |
| <item> |
| <title>线程池策略</title> |
| <link>https://shardingsphere.apache.org/elasticjob/current/cn/user-manual/elasticjob-lite/configuration/built-in-strategy/thread-pool/</link> |
| <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate> |
| |
| <guid>https://shardingsphere.apache.org/elasticjob/current/cn/user-manual/elasticjob-lite/configuration/built-in-strategy/thread-pool/</guid> |
| <description>CPU 资源策略 类型:CPU |
| 根据 CPU 核数 * 2 创建作业处理线程池。 |
| 单线程策略 类型:SINGLE_THREAD |
| 使用单线程处理作业。</description> |
| </item> |
| |
| <item> |
| <title>错误处理策略</title> |
| <link>https://shardingsphere.apache.org/elasticjob/current/cn/user-manual/elasticjob-lite/configuration/built-in-strategy/error-handler/</link> |
| <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate> |
| |
| <guid>https://shardingsphere.apache.org/elasticjob/current/cn/user-manual/elasticjob-lite/configuration/built-in-strategy/error-handler/</guid> |
| <description>记录日志策略 类型:LOG |
| 默认内置:是 |
| 记录作业异常日志,但不中断作业执行。 |
| 抛出异常策略 类型:THROW |
| 默认内置:是 |
| 抛出系统异常并中断作业执行。 |
| 忽略异常策略 类型:IGNORE |
| 默认内置:是 |
| 忽略系统异常且不中断作业执行。 |
| 邮件通知策略 类型:EMAIL |
| 默认内置:否 |
| 发送邮件消息通知,但不中断作业执行。 |
| Maven 坐标: |
| &lt;dependency&gt; &lt;groupId&gt;org.apache.shardingsphere.elasticjob&lt;/groupId&gt; &lt;artifactId&gt;elasticjob-error-handler-email&lt;/artifactId&gt; &lt;version&gt;${latest.release.version}&lt;/version&gt; &lt;/dependency&gt; 可配置属性: |
| 属性名 说明 默认值 host TODO 无 port TODO 无 username TODO 无 password TODO 无 useSsl TODO 无 subject TODO ElasticJob error message from TODO 无 to TODO 无 cc TODO 无 bcc TODO 无 debug TODO 无 企业微信通知策略 类型:WECHAT</description> |
| </item> |
| |
| </channel> |
| </rss> |