mirror of
https://github.com/PowerJob/PowerJob.git
synced 2025-07-17 00:00:04 +08:00
127 lines
14 KiB
XML
127 lines
14 KiB
XML
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
|
||
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
|
||
<channel>
|
||
<title>介绍 on OhMyScheduler</title>
|
||
<link>https://kfcfans.gitee.io/ohmyscheduler/</link>
|
||
<description>Recent content in 介绍 on OhMyScheduler</description>
|
||
<generator>Hugo -- gohugo.io</generator>
|
||
<language>en-us</language>
|
||
|
||
<atom:link href="https://kfcfans.gitee.io/ohmyscheduler/index.xml" rel="self" type="application/rss+xml" />
|
||
|
||
|
||
<item>
|
||
<title>调度中心(Server)部署</title>
|
||
<link>https://kfcfans.gitee.io/ohmyscheduler/docs/startup/1-server-startup/</link>
|
||
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
|
||
|
||
<guid>https://kfcfans.gitee.io/ohmyscheduler/docs/startup/1-server-startup/</guid>
|
||
<description>环境要求 Open JDK 8+
|
||
Apache Maven 3+
|
||
任意 Spring Data Jpa 支持的关系型数据库(MySQL/Oracle/MS SQLServer&hellip;)
|
||
MongoDB(可选),任意支持GridFS的mongoDB版本(4.2.6测试通过,其余未经测试,仅从理论角度分析可用),缺失该组件的情况下将无法使用在线日志、容器部署等扩展功能
|
||
初始化关系数据库 调度服务器(oh-my-scheduler-server)的持久化层基于Spring Boot Jpa实现,对于能够直连数据库的应用,开发者仅需完成数据库的创建,即运行SQL:CREATE database if NOT EXISTS oms-product default character set utf8mb4 collate utf8mb4_unicode_ci;`
|
||
OhMyScheduler支持环境隔离,提供日常(daily)、预发(pre)和线上(product)三套环境,请根据使用的环境分别部署对应的数据库:oms-daily、oms-pre和oms-product。 调度服务器属于时间敏感应用,强烈建议检查当前数据库所使用的时区信息(show variables like &quot;%time_zone%&quot;;),务必确保time_zone代表的时区与JDBC URL中serverTimezone字段代表的时区一致! 手动建表表SQL文件:下载地址 部署调度服务器—源码编译 调度服务器(oh-my-scheduler-server)支持任意的水平扩展,即多实例集群部署仅需要在同一个局域网内启动新的服务器实例,性能强劲无上限!
|
||
调度服务器(oh-my-scheduler-server)为了支持环境隔离,分别采用了日常(application-daily.properties)、预发(application-pre.properties)和线上(application-product.properties)三套配置文件,请根据实际需求进行修改,以下为配置文件详解。
|
||
配置项 含义 可选 server.port SpringBoot配置,HTTP端口号,默认7700 否 oms.</description>
|
||
</item>
|
||
|
||
<item>
|
||
<title>执行器(Worker)初始化</title>
|
||
<link>https://kfcfans.gitee.io/ohmyscheduler/docs/startup/2-worker-startup/</link>
|
||
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
|
||
|
||
<guid>https://kfcfans.gitee.io/ohmyscheduler/docs/startup/2-worker-startup/</guid>
|
||
<description>基于宿主应用的执行器初始化 宿主应用即原有的业务应用,假如需要调度执行的任务与当前业务有较为紧密的联系,建议采取该方式。
|
||
OhMyScheduler当前支持Shell、Python等脚本处理器和Java处理器。脚本处理器只需要开发者完成脚本的编写(xxx.sh / xxx.py),在控制台填入脚本内容即可,本章不再赘述。本章将重点阐述Java处理器开发方法与使用技巧。
|
||
Java处理器可根据代码所处位置划分为内置Java处理器和容器Java处理器,前者直接集成在宿主应用(也就是接入本系统的业务应用)中,一般用来处理业务需求;后者可以在一个独立的轻量级的Java工程中开发,通过容器技术(详见容器章节)被worker集群热加载,提供Java的“脚本能力”,一般用于处理灵活多变的需求。 Java处理器可根据对象创建者划分为SpringBean处理器和普通Java对象处理器,前者由Spring IOC容器完成处理器的创建和初始化,后者则有OhMyScheduler维护其状态。如果宿主应用支持Spring,强烈建议使用SpringBean处理器,开发者仅需要将Processor注册进Spring IOC容器(一个@Component注解或一句bean配置)。 Java处理器可根据功能划分为单机处理器、广播处理器、Map处理器和MapReduce处理器。 单机处理器对应了单机任务,即某个任务的某次运行只会有某一台机器的某一个线程参与运算。 广播处理器对应了广播任务,即某个任务的某次运行会调动集群内所有机器参与运算。 Map处理器对应了Map任务,即某个任务在运行过程中,允许产生子任务并分发到其他机器进行运算。 MapReduce处理器对应了MapReduce任务,在Map任务的基础上,增加了所有任务结束后的汇总统计。 首先,添加相关的jar包依赖,最新依赖版本请参考maven中央仓库:推荐地址&amp;备用地址
|
||
&lt;dependency&gt; &lt;groupId&gt;com.github.kfcfans&lt;/groupId&gt; &lt;artifactId&gt;oh-my-scheduler-worker&lt;/artifactId&gt; &lt;version&gt;1.2.0&lt;/version&gt; &lt;/dependency&gt; 其次,填写执行器客户端配置文件OhMyConfig,各参数说明如下表所示:
|
||
属性名称 含义 默认值 appName 宿主应用名称,需要提前在控制台完成注册 无,必填项,否则启动报错 port Worker工作端口 27777 serverAddress 调度中心(oh-my-scheduler-server)地址列表 无,必填项,否则启动报错 storeStrategy 本地存储策略,枚举值磁盘/内存,大型MapReduce等会产生大量Task的任务推荐使用磁盘降低内存压力,否则建议使用内存加速计算 StoreStrategy.DISK(磁盘) maxResultLength 每个Task返回结果的默认长度,超长将被截断。过长可能导致网络拥塞 8096 enableTestMode 是否启用测试模式,启用后无需Server也能顺利启动OhMyScheduler-Worker,用于处理器本地的单元测试 false 最后,初始化客户端,完成执行器的启动,代码示例如下:</description>
|
||
</item>
|
||
|
||
<item>
|
||
<title>处理器编写</title>
|
||
<link>https://kfcfans.gitee.io/ohmyscheduler/docs/startup/3-processor-develop/</link>
|
||
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
|
||
|
||
<guid>https://kfcfans.gitee.io/ohmyscheduler/docs/startup/3-processor-develop/</guid>
|
||
<description>处理器概述 OhMyScheduler当前支持Shell、Python等脚本处理器和Java处理器。脚本处理器只需要开发者完成脚本的编写(xxx.sh / xxx.py),在控制台填入脚本内容即可,本章不再赘述。本章将重点阐述Java处理器开发方法与使用技巧。
|
||
Java处理器可根据代码所处位置划分为内置Java处理器和容器Java处理器,前者直接集成在宿主应用(也就是接入本系统的业务应用)中,一般用来处理业务需求;后者可以在一个独立的轻量级的Java工程中开发,通过容器技术(详见容器章节)被worker集群热加载,提供Java的“脚本能力”,一般用于处理灵活多变的需求。 Java处理器可根据对象创建者划分为SpringBean处理器和普通Java对象处理器,前者由Spring IOC容器完成处理器的创建和初始化,后者则有OhMyScheduler维护其状态。如果宿主应用支持Spring,强烈建议使用SpringBean处理器,开发者仅需要将Processor注册进Spring IOC容器(一个@Component注解或一句bean配置)。 Java处理器可根据功能划分为单机处理器、广播处理器、Map处理器和MapReduce处理器。 单机处理器对应了单机任务,即某个任务的某次运行只会有某一台机器的某一个线程参与运算。 广播处理器对应了广播任务,即某个任务的某次运行会调动集群内所有机器参与运算。 Map处理器对应了Map任务,即某个任务在运行过程中,允许产生子任务并分发到其他机器进行运算。 MapReduce处理器对应了MapReduce任务,在Map任务的基础上,增加了所有任务结束后的汇总统计。 初始化宿主应用 首先,添加相关的jar包依赖,最新依赖版本请参考maven中央仓库:推荐地址&amp;备用地址
|
||
&lt;dependency&gt; &lt;groupId&gt;com.github.kfcfans&lt;/groupId&gt; &lt;artifactId&gt;oh-my-scheduler-worker&lt;/artifactId&gt; &lt;version&gt;1.2.0&lt;/version&gt; &lt;/dependency&gt; </description>
|
||
</item>
|
||
|
||
<item>
|
||
<title></title>
|
||
<link>https://kfcfans.gitee.io/ohmyscheduler/docs/shortcodes/columns/</link>
|
||
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
|
||
|
||
<guid>https://kfcfans.gitee.io/ohmyscheduler/docs/shortcodes/columns/</guid>
|
||
<description>Columns Columns help organize shorter pieces of content horizontally for readability.
|
||
{{&lt; columns &gt;}} &lt;!-- begin columns block --&gt; # Left Content Lorem markdownum insigne... &lt;---&gt; &lt;!-- magic sparator, between columns --&gt; # Mid Content Lorem markdownum insigne... &lt;---&gt; &lt;!-- magic sparator, between columns --&gt; # Right Content Lorem markdownum insigne... {{&lt; /columns &gt;}} Example Left Content Lorem markdownum insigne. Olympo signis Delphis! Retexi Nereius nova develat stringit, frustra Saturnius uteroque inter!</description>
|
||
</item>
|
||
|
||
<item>
|
||
<title></title>
|
||
<link>https://kfcfans.gitee.io/ohmyscheduler/docs/shortcodes/details/</link>
|
||
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
|
||
|
||
<guid>https://kfcfans.gitee.io/ohmyscheduler/docs/shortcodes/details/</guid>
|
||
<description>Details Details shortcode is a helper for details html5 element. It is going to replace expand shortcode.
|
||
Example {{&lt; details &#34;Title&#34; [open] &gt;}} ## Markdown content Lorem markdownum insigne... {{&lt; /details &gt;}} {{&lt; details title=&#34;Title&#34; open=true &gt;}} ## Markdown content Lorem markdownum insigne... {{&lt; /details &gt;}} Title Markdown content Lorem markdownum insigne&hellip; </description>
|
||
</item>
|
||
|
||
<item>
|
||
<title></title>
|
||
<link>https://kfcfans.gitee.io/ohmyscheduler/docs/shortcodes/expand/</link>
|
||
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
|
||
|
||
<guid>https://kfcfans.gitee.io/ohmyscheduler/docs/shortcodes/expand/</guid>
|
||
<description>Expand Expand shortcode can help to decrease clutter on screen by hiding part of text. Expand content by clicking on it.
|
||
Example Default {{&lt; expand &gt;}} ## Markdown content Lorem markdownum insigne... {{&lt; /expand &gt;}} Expand ↕ Markdown content Lorem markdownum insigne&hellip; With Custom Label {{&lt; expand &#34;Custom Label&#34; &#34;...&#34; &gt;}} ## Markdown content Lorem markdownum insigne... {{&lt; /expand &gt;}} Custom Label .</description>
|
||
</item>
|
||
|
||
<item>
|
||
<title></title>
|
||
<link>https://kfcfans.gitee.io/ohmyscheduler/docs/shortcodes/hints/</link>
|
||
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
|
||
|
||
<guid>https://kfcfans.gitee.io/ohmyscheduler/docs/shortcodes/hints/</guid>
|
||
<description>Hints Hint shortcode can be used as hint/alerts/notification block.
|
||
There are 3 colors to choose: info, warning and danger.
|
||
{{&lt; hint [info|warning|danger] &gt;}} **Markdown content** Lorem markdownum insigne. Olympo signis Delphis! Retexi Nereius nova develat stringit, frustra Saturnius uteroque inter! Oculis non ritibus Telethusa {{&lt; /hint &gt;}} Example Markdown content
|
||
Lorem markdownum insigne. Olympo signis Delphis! Retexi Nereius nova develat stringit, frustra Saturnius uteroque inter! Oculis non ritibus Telethusa Markdown content</description>
|
||
</item>
|
||
|
||
<item>
|
||
<title></title>
|
||
<link>https://kfcfans.gitee.io/ohmyscheduler/docs/shortcodes/katex/</link>
|
||
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
|
||
|
||
<guid>https://kfcfans.gitee.io/ohmyscheduler/docs/shortcodes/katex/</guid>
|
||
<description>KaTeX KaTeX shortcode let you render math typesetting in markdown document. See KaTeX
|
||
Example {{&lt; katex [display] [class=&#34;text-center&#34;] &gt;}} f(x) = \int_{-\infty}^\infty\hat f(\xi)\,e^{2 \pi i \xi x}\,d\xi {{&lt; /katex &gt;}} Display Mode Example Here is some inline example: \(\pi(x)\) , rendered in the same line. And below is display example, having display: block \[f(x) = \int_{-\infty}^\infty\hat f(\xi)\,e^{2 \pi i \xi x}\,d\xi\] Text continues here.</description>
|
||
</item>
|
||
|
||
<item>
|
||
<title></title>
|
||
<link>https://kfcfans.gitee.io/ohmyscheduler/docs/shortcodes/mermaid/</link>
|
||
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
|
||
|
||
<guid>https://kfcfans.gitee.io/ohmyscheduler/docs/shortcodes/mermaid/</guid>
|
||
<description>Mermaid Chart Mermaid is library for generating svg charts and diagrams from text.
|
||
Example {{&lt; mermaid [class=&#34;text-center&#34;]&gt;}} sequenceDiagram Alice-&gt;&gt;Bob: Hello Bob, how are you? alt is sick Bob-&gt;&gt;Alice: Not so good :( else is well Bob-&gt;&gt;Alice: Feeling fresh like a daisy end opt Extra response Bob-&gt;&gt;Alice: Thanks for asking end {{&lt; /mermaid &gt;}} </description>
|
||
</item>
|
||
|
||
<item>
|
||
<title></title>
|
||
<link>https://kfcfans.gitee.io/ohmyscheduler/docs/shortcodes/tabs/</link>
|
||
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
|
||
|
||
<guid>https://kfcfans.gitee.io/ohmyscheduler/docs/shortcodes/tabs/</guid>
|
||
<description>Tabs Tabs let you organize content by context, for example installation instructions for each supported platform.
|
||
{{&lt; tabs &#34;uniqueid&#34; &gt;}} {{&lt; tab &#34;MacOS&#34; &gt;}} # MacOS Content {{&lt; /tab &gt;}} {{&lt; tab &#34;Linux&#34; &gt;}} # Linux Content {{&lt; /tab &gt;}} {{&lt; tab &#34;Windows&#34; &gt;}} # Windows Content {{&lt; /tab &gt;}} {{&lt; /tabs &gt;}} Example MacOS MacOS This is tab MacOS content.
|
||
Lorem markdownum insigne. Olympo signis Delphis! Retexi Nereius nova develat stringit, frustra Saturnius uteroque inter!</description>
|
||
</item>
|
||
|
||
</channel>
|
||
</rss> |