2020-05-20 21:29:41 +08:00

127 lines
14 KiB
XML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?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&amp;hellip;
MongoDB可选任意支持GridFS的mongoDB版本4.2.6测试通过,其余未经测试,仅从理论角度分析可用),缺失该组件的情况下将无法使用在线日志、容器部署等扩展功能
初始化关系数据库 调度服务器oh-my-scheduler-server的持久化层基于Spring Boot Jpa实现对于能够直连数据库的应用开发者仅需完成数据库的创建即运行SQLCREATE 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 &amp;quot;%time_zone%&amp;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;amp;备用地址
&amp;lt;dependency&amp;gt; &amp;lt;groupId&amp;gt;com.github.kfcfans&amp;lt;/groupId&amp;gt; &amp;lt;artifactId&amp;gt;oh-my-scheduler-worker&amp;lt;/artifactId&amp;gt; &amp;lt;version&amp;gt;1.2.0&amp;lt;/version&amp;gt; &amp;lt;/dependency&amp;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;amp;备用地址
&amp;lt;dependency&amp;gt; &amp;lt;groupId&amp;gt;com.github.kfcfans&amp;lt;/groupId&amp;gt; &amp;lt;artifactId&amp;gt;oh-my-scheduler-worker&amp;lt;/artifactId&amp;gt; &amp;lt;version&amp;gt;1.2.0&amp;lt;/version&amp;gt; &amp;lt;/dependency&amp;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.
{{&amp;lt; columns &amp;gt;}} &amp;lt;!-- begin columns block --&amp;gt; # Left Content Lorem markdownum insigne... &amp;lt;---&amp;gt; &amp;lt;!-- magic sparator, between columns --&amp;gt; # Mid Content Lorem markdownum insigne... &amp;lt;---&amp;gt; &amp;lt;!-- magic sparator, between columns --&amp;gt; # Right Content Lorem markdownum insigne... {{&amp;lt; /columns &amp;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 {{&amp;lt; details &amp;#34;Title&amp;#34; [open] &amp;gt;}} ## Markdown content Lorem markdownum insigne... {{&amp;lt; /details &amp;gt;}} {{&amp;lt; details title=&amp;#34;Title&amp;#34; open=true &amp;gt;}} ## Markdown content Lorem markdownum insigne... {{&amp;lt; /details &amp;gt;}} Title Markdown content Lorem markdownum insigne&amp;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 {{&amp;lt; expand &amp;gt;}} ## Markdown content Lorem markdownum insigne... {{&amp;lt; /expand &amp;gt;}} Expand ↕ Markdown content Lorem markdownum insigne&amp;hellip; With Custom Label {{&amp;lt; expand &amp;#34;Custom Label&amp;#34; &amp;#34;...&amp;#34; &amp;gt;}} ## Markdown content Lorem markdownum insigne... {{&amp;lt; /expand &amp;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.
{{&amp;lt; hint [info|warning|danger] &amp;gt;}} **Markdown content** Lorem markdownum insigne. Olympo signis Delphis! Retexi Nereius nova develat stringit, frustra Saturnius uteroque inter! Oculis non ritibus Telethusa {{&amp;lt; /hint &amp;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 {{&amp;lt; katex [display] [class=&amp;#34;text-center&amp;#34;] &amp;gt;}} f(x) = \int_{-\infty}^\infty\hat f(\xi)\,e^{2 \pi i \xi x}\,d\xi {{&amp;lt; /katex &amp;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 {{&amp;lt; mermaid [class=&amp;#34;text-center&amp;#34;]&amp;gt;}} sequenceDiagram Alice-&amp;gt;&amp;gt;Bob: Hello Bob, how are you? alt is sick Bob-&amp;gt;&amp;gt;Alice: Not so good :( else is well Bob-&amp;gt;&amp;gt;Alice: Feeling fresh like a daisy end opt Extra response Bob-&amp;gt;&amp;gt;Alice: Thanks for asking end {{&amp;lt; /mermaid &amp;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.
{{&amp;lt; tabs &amp;#34;uniqueid&amp;#34; &amp;gt;}} {{&amp;lt; tab &amp;#34;MacOS&amp;#34; &amp;gt;}} # MacOS Content {{&amp;lt; /tab &amp;gt;}} {{&amp;lt; tab &amp;#34;Linux&amp;#34; &amp;gt;}} # Linux Content {{&amp;lt; /tab &amp;gt;}} {{&amp;lt; tab &amp;#34;Windows&amp;#34; &amp;gt;}} # Windows Content {{&amp;lt; /tab &amp;gt;}} {{&amp;lt; /tabs &amp;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>