{"id":15462,"date":"2025-04-18T21:57:56","date_gmt":"2025-04-18T13:57:56","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/15462.html"},"modified":"2025-04-18T21:57:56","modified_gmt":"2025-04-18T13:57:56","slug":"dolphinscheduler%e8%87%aa%e8%ba%ab%e5%ae%b9%e9%94%99%e5%af%bc%e8%87%b4%e7%9a%84%e6%9c%8d%e5%8a%a1%e5%99%a8%e6%8c%81%e7%bb%ad%e5%b4%a9%e6%ba%83%e9%87%8d%e5%a4%a7%e9%97%ae%e9%a2%98%e7%9a%84%e6%8e%92","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/15462.html","title":{"rendered":"DolphinScheduler\u81ea\u8eab\u5bb9\u9519\u5bfc\u81f4\u7684\u670d\u52a1\u5668\u6301\u7eed\u5d29\u6e83\u91cd\u5927\u95ee\u9898\u7684\u6392\u67e5\u4e0e\u89e3\u51b3"},"content":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418135749-68025a5d80aba.webp\" alt=\"file\" \/><\/p>\n<h3 id=\"01-\u95ee\u9898\u590d\u73b0\">01 \u95ee\u9898\u590d\u73b0<\/h3>\n<p>\u5728DolphinScheduler\u4e2d\u6709\u5982\u4e0b\u4e00\u4e2aShell\u4efb\u52a1&#xff1a;<\/p>\n<p>current_timestamp() {<br \/>\n    date &#043;&#034;%Y-%m-%d %H:%M:%S&#034;<br \/>\n}<\/p>\n<p>TIMESTAMP&#061;$(current_timestamp)<br \/>\necho $TIMESTAMP<br \/>\nsleep 60 <\/p>\n<p>\u5728DolphinScheduler\u5c06\u5de5\u4f5c\u6d41\u6267\u884c\u7b56\u7565\u8bbe\u7f6e\u4e3a\u5e76\u884c&#xff1a;<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418135749-68025a5decd1a.webp\" alt=\"file\" \/><\/p>\n<p>\u5b9a\u65f6\u5468\u671f\u8c03\u5ea6\u8bbe\u7f6e\u4e3a10\u79d2\u4e00\u6b21&#xff1a;<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418135750-68025a5e20e18.webp\" alt=\"file\" \/><\/p>\n<p>\u5c06\u5b9a\u65f6\u8c03\u5ea6\u4e0a\u7ebf\u540e&#xff0c;\u4f1a\u8c03\u5ea6\u6267\u884c\u4efb\u52a1&#xff0c;\u6b64\u65f6\u4e00\u5207\u6b63\u5e38&#xff1a;<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418135750-68025a5e40fc8.webp\" alt=\"file\" \/><\/p>\n<p>\u6b64\u65f6\u5c06Master\u8282\u70b9\u7ed9kill\u6389&#xff0c;\u6a21\u62df\u5b95\u673a&#xff1a;<\/p>\n<p>$ jps<br \/>\n1979710 AlertServer<br \/>\n1979626 WorkerServer<br \/>\n1979546 MasterServer<br \/>\n1979794 ApiApplicationServer<br \/>\n1980483 Jps<br \/>\n$ kill -9 1979546 <\/p>\n<p>\u53bb\u5230DolphinScheduler\u4e2d\u67e5\u770b&#xff0c;\u53d1\u73b0Master\u5df2\u7ecf\u4e0d\u5b58\u5728\u4e86&#xff1a;<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418135750-68025a5e8c406.webp\" alt=\"file\" \/><\/p>\n<p>\u6b64\u65f6\u89c2\u5bdfDolphinScheduler\u5de5\u4f5c\u6d41\u6267\u884c&#xff0c;\u53d1\u73b0\u5176\u4e0d\u4f1a\u7ee7\u7eed\u8c03\u5ea6\u4efb\u52a1\u6267\u884c\u4e86&#xff0c;\u5e76\u4e14\u6240\u6709\u7684\u4efb\u52a1\u5219\u4f1a\u4e00\u76f4\u6267\u884c\u4e0b\u53bb&#xff0c;\u76f4\u5230\u62a5\u9519\u3002<\/p>\n<p>\u5f53\u8fc7\u4e86\u4e00\u6bb5\u65f6\u95f4\u540e&#xff08;\u6a21\u62df\u53d1\u73b0\u4e86\u5b95\u673a\u95ee\u9898&#xff09;&#xff0c;\u6b64\u65f6\u91cd\u542fDolphinScheduler&#xff1a;<\/p>\n<p>sh bin\/stop-all.sh<br \/>\nsh bin\/start-all.sh <\/p>\n<p>\u91cd\u542f\u5b8c\u6210\u540e&#xff0c;\u5c31\u4f1a\u5c06\u4e4b\u524d\u6ca1\u6709\u6267\u884c\u6210\u529f\u7684\u4efb\u52a1&#xff0c;\u5305\u62ec\u6ca1\u6709\u6267\u884c\u7684\u8c03\u5ea6\u4efb\u52a1&#xff0c;\u5168\u90e8\u90fd\u6267\u884c\u4e00\u6b21&#xff1a;<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418135750-68025a5ecc6da.webp\" alt=\"file\" \/><\/p>\n<p>\u8fd9\u5c31\u6709\u4e00\u4e2a\u81f4\u547d\u7684\u95ee\u9898&#xff1a;\u5982\u679c\u90fd\u662f\u9ad8\u6027\u80fd\u4efb\u52a1\u7684\u8bdd&#xff0c;\u5c31\u4f1a\u5bfc\u81f4CPU\u3001\u5185\u5b58\u88ab\u6253\u6ee1&#xff0c;\u4ece\u800c\u8ba9\u670d\u52a1\u5668\u6574\u4e2a\u5b95\u673a&#xff01;&#xff01;&#xff01;<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418135751-68025a5fbe8de.webp\" alt=\"file\" \/><\/p>\n<h3 id=\"02-\u591a\u573a\u666f\u6d4b\u8bd5\">02 \u591a\u573a\u666f\u6d4b\u8bd5<\/h3>\n<ul>\n<li>Master\u5b95\u673a\u540e&#xff0c;\u91cd\u542f\u6574\u4e2aDS&#xff1a;\u4f1a\u4ea7\u751f\u4e0a\u8ff0\u95ee\u9898\u3002<\/li>\n<li>Master\u5b95\u673a\u540e&#xff0c;\u91cd\u542f\u76f8\u5e94\u7684Master&#xff1a;\u4f1a\u4ea7\u751f\u4e0a\u8ff0\u95ee\u9898\u3002\u2014\u2014\u6709\u7f3a\u9677&#xff0c;\u5b98\u65b9\u6ca1\u6709\u5355\u72ec\u7684Master\u540e\u53f0\u542f\u52a8&#xff0c;\u53ea\u6709\u524d\u53f0\u542f\u52a8\u7684\u811a\u672c&#xff0c;\u4f46\u53ef\u4ee5\u91cd\u590d\u6267\u884cstart-all.sh\u3002<\/li>\n<li>Worker\u5b95\u673a\u540e&#xff0c;\u91cd\u542f\u6574\u4e2aDS&#xff1a;\u4e0d\u4f1a\u4ea7\u751f\u4e0a\u8ff0\u95ee\u9898\u3002\u2014\u2014\u56e0\u4e3aMaster\u4f1a\u6301\u7eed\u7684\u8c03\u5ea6\u4efb\u52a1&#xff0c;\u800cWorker\u5b95\u673a\u540e\u7684\u7ed3\u679c\u5c31\u662f\u8c03\u5ea6\u4efb\u52a1\u76f4\u63a5\u5931\u8d25\u3002<\/li>\n<li>Worker\u5b95\u673a\u540e&#xff0c;\u91cd\u542f\u76f8\u5e94\u7684Worker&#xff1a;\u4e0d\u4f1a\u4ea7\u751f\u4e0a\u8ff0\u95ee\u9898\u3002\u2014\u2014\u6709\u7f3a\u9677&#xff0c;\u5b98\u65b9\u6ca1\u6709\u5355\u72ec\u7684Worker\u540e\u53f0\u542f\u52a8&#xff0c;\u53ea\u6709\u524d\u53f0\u542f\u52a8\u7684\u811a\u672c&#xff0c;\u4f46\u53ef\u4ee5\u91cd\u590d\u6267\u884cstart-all.sh\u3002<\/li>\n<li>DS\u6574\u4e2a\u5b95\u673a\u540e&#xff0c;\u91cd\u542f\u6574\u4e2aDS&#xff1a;\u4f1a\u4ea7\u751f\u4e0a\u8ff0\u95ee\u9898\u3002<\/li>\n<li>DS\u4f7f\u7528stop-all.sh\u505c\u6b62\u540e&#xff0c;\u91cd\u542f\u6574\u4e2aDS&#xff1a;\u4f1a\u4ea7\u751f\u4e0a\u8ff0\u95ee\u9898\u3002<\/li>\n<\/ul>\n<p>\u5176\u6838\u5fc3\u5c31\u662f\u5728\u4e8eMaster&#xff0c;\u53ea\u8981\u914d\u7f6e\u4e86\u5468\u671f\u4efb\u52a1&#xff0c;\u65e0\u8bbaMaster\u662f\u5b95\u673a\u8fd8\u662f\u8c03\u7528\u811a\u672c\u5173\u95ed\u7684&#xff0c;\u5176\u90fd\u4f1a\u4ea7\u751f\u4e0a\u8ff0\u95ee\u9898\u3002<\/p>\n<h3 id=\"03-\u539f\u7406\u5206\u6790\">03 \u539f\u7406\u5206\u6790<\/h3>\n<p>DolphinScheduler\u6838\u5fc3\u89d2\u8272&#xff1a;<\/p>\n<ul>\n<li>MasterServer\u4e3b\u8981\u8d1f\u8d23 DAG \u4efb\u52a1\u5207\u5206\u3001\u4efb\u52a1\u63d0\u4ea4\u76d1\u63a7&#xff0c;\u5e76\u540c\u65f6\u76d1\u542c\u5176\u5b83MasterServer\u548cWorkerServer\u7684\u5065\u5eb7\u72b6\u6001\u3002MasterServer\u670d\u52a1\u542f\u52a8\u65f6\u5411Zookeeper\u6ce8\u518c\u4e34\u65f6\u8282\u70b9&#xff0c;\u901a\u8fc7\u76d1\u542cZookeeper\u4e34\u65f6\u8282\u70b9\u53d8\u5316\u6765\u8fdb\u884c\u5bb9\u9519\u5904\u7406\u3002<\/li>\n<li>WorkerServer\u4e3b\u8981\u8d1f\u8d23\u4efb\u52a1\u7684\u6267\u884c\u548c\u63d0\u4f9b\u65e5\u5fd7\u670d\u52a1\u3002WorkerServer\u670d\u52a1\u542f\u52a8\u65f6\u5411Zookeeper\u6ce8\u518c\u4e34\u65f6\u8282\u70b9&#xff0c;\u5e76\u7ef4\u6301\u5fc3\u8df3\u3002<\/li>\n<li>ApiServer\u4e3b\u8981\u8d1f\u8d23\u5904\u7406\u524d\u7aefUI\u5c42\u7684\u8bf7\u6c42\u3002<\/li>\n<\/ul>\n<p>\u5927\u81f4\u7684\u4efb\u52a1\u8fd0\u884c\u6d41\u7a0b\u5982\u4e0b&#xff1a;<\/p>\n<ul>\n<li>\n<p>\u5728API-Server\u4e2d\u521b\u5efa\u4efb\u52a1&#xff0c;\u5e76\u5c06\u5143\u6570\u636e\u6301\u4e45\u5316\u5230DB\u4e2d\u3002<\/p>\n<\/li>\n<li>\n<p>\u901a\u8fc7\u624b\u52a8\u70b9\u51fb\u6216\u5b9a\u65f6\u6267\u884c\u751f\u6210\u4e00\u4e2a\u89e6\u53d1\u5de5\u4f5c\u6d41\u6267\u884c\u7684Command\u5199\u5165DB\u3002<\/p>\n<\/li>\n<li>\n<p>Master\u6d88\u8d39DB\u4e2d\u7684Command&#xff0c;\u5f00\u59cb\u6267\u884c\u5de5\u4f5c\u6d41&#xff0c;\u5e76\u5c06\u5de5\u4f5c\u6d41\u4e2d\u7684\u4efb\u52a1\u5206\u53d1\u7ed9Worker\u6267\u884c\u3002<\/p>\n<\/li>\n<li>\n<p>\u5f53\u6574\u4e2a\u5de5\u4f5c\u6d41\u6267\u884c\u7ed3\u675f\u4e4b\u540e&#xff0c;Master\u7ed3\u675f\u5de5\u4f5c\u6d41\u7684\u6267\u884c\u3002<\/p>\n<\/li>\n<\/ul>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418135751-68025a5ff0c46.webp\" alt=\"file\" \/><\/p>\n<p>\u53c2\u8003\u5b98\u7f51&#xff0c;\u4e0a\u8ff0\u7684DolphinScheduler\u6838\u5fc3\u4efb\u52a1\u6267\u884c\u6d41\u7a0b\u53ef\u4ee5\u7ec6\u5316\u4e3a\u5982\u4e0b&#xff1a;<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418135752-68025a6042764.webp\" alt=\"file\" \/><\/p>\n<p>\u9274\u4e8e\u4efb\u52a1\u8c03\u5ea6\u7684\u590d\u6742\u6027&#xff0c;\u4e00\u4e2a\u5927\u7684\u6d41\u7a0b\u53ef\u4ee5\u5212\u5206\u4e3a\u5c0f\u7684\u6d41\u7a0b&#xff0c;\u5728\u4e3b\u7ebf\u6d41\u7a0b\u4e4b\u5916\u8fd8\u9644\u52a0\u4e86\u652f\u7ebf\u6d41\u7a0b&#xff0c;\u4e0b\u9762\u5bf9\u6267\u884c\u8c03\u5ea6\u6d41\u7a0b\u62c6\u5206\u8fdb\u884c\u5206\u6790\u4e00\u4e0b&#xff0c;\u8fd9\u6837\u66f4\u5bb9\u6613\u7406\u89e3&#xff1a;<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418135752-68025a605fda9.webp\" alt=\"file\" \/><\/p>\n<p>\u5728\u672c\u6b21\u95ee\u9898\u4e2d&#xff0c;\u4e3b\u8981\u5173\u6ce8\u7684\u5c31\u662fCommand\u5206\u53d1\u6d41\u7a0b\u3002\u5176Command\u5206\u53d1\u6d41\u7a0b\u662f\u4e00\u4e2a\u5f02\u6b65\u5206\u5e03\u5f0f\u751f\u4ea7\u6d88\u8d39\u6a21\u5f0f\u3002<\/p>\n<p>i. \u9996\u5148\u662f\u751f\u4ea7\u8005api-server&#xff0c;\u4f1a\u5c06\u7528\u6237\u7684\u8fd0\u884c\u5de5\u4f5c\u6d41http\u8bf7\u6c42\u5c01\u88c5\u6210command\u6570\u636e&#xff0c;insert\u5230t_ds_command\u8868\u4e2d&#xff0c;\u5982\u4e0b\u662f\u4e00\u4e2a\u542f\u52a8\u5de5\u4f5c\u6d41\u5b9e\u4f8b\u7684command\u6837\u4f8b&#xff08;\u8001\u7248\u672c&#xff09;&#xff1a;<\/p>\n<p>{<br \/>\n    &#034;commandType&#034;: &#034;START_PROCESS&#034;,<br \/>\n    &#034;processDefinitionCode&#034;: 14285512555584,<br \/>\n    &#034;executorId&#034;: 1,<br \/>\n    &#034;commandParam&#034;: &#034;{}&#034;,<br \/>\n    &#034;taskDependType&#034;: &#034;TASK_POST&#034;,<br \/>\n    &#034;failureStrategy&#034;: &#034;CONTINUE&#034;,<br \/>\n    &#034;warningType&#034;: &#034;NONE&#034;,<br \/>\n    &#034;startTime&#034;: 1723444881372,<br \/>\n    &#034;processInstancePriority&#034;: &#034;MEDIUM&#034;,<br \/>\n    &#034;updateTime&#034;: 1723444881372,<br \/>\n    &#034;workerGroup&#034;: &#034;default&#034;,<br \/>\n    &#034;tenantCode&#034;: &#034;default&#034;,<br \/>\n    &#034;environmentCode&#034;: -1,<br \/>\n    &#034;dryRun&#034;: 0,<br \/>\n    &#034;processInstanceId&#034;: 0,<br \/>\n    &#034;processDefinitionVersion&#034;: 1,<br \/>\n    &#034;testFlag&#034;: 0<br \/>\n} <\/p>\n<p>ii.\u5176\u6b21\u662f\u6d88\u8d39\u8005&#xff0c;master server\u4e2d\u7684MasterSchedulerBootstrap loop\u7a0b\u5e8f&#xff0c; MasterSchedulerBootstrap\u4f7f\u7528ZK\u5206\u914d\u5230\u81ea\u5df1\u7684slot&#xff0c;\u4ecet_ds_command\u8868\u4e2dselect\u5c5e\u4e8eslot\u7684command\u5217\u8868\u5904\u7406&#xff0c;\u5176\u67e5\u8be2\u8bed\u53e5\u662f&#xff1a;<\/p>\n<p>&lt;select id&#061;&#034;queryCommandPageBySlot&#034; resultType&#061;&#034;org.apache.dolphinscheduler.dao.entity.Command&#034;&gt;<br \/>\n        select *<br \/>\n        from t_ds_command<br \/>\n        where id % #{masterCount} &#061; #{thisMasterSlot}<br \/>\n        order by process_instance_priority, id asc<br \/>\n            limit #{limit}<br \/>\n&lt;\/select&gt; <\/p>\n<p>iii.MasterSchedulerBootstrap loop\u8f6e\u8bad\u67e5\u5230\u5f85\u5904\u7406\u7684command\u4efb\u52a1&#xff0c;\u5c06command\u4efb\u52a1\u548cmaster host\u751f\u6210ProcessInstance&#xff0c;\u5c06ProcessInstance\u5bf9\u8c61\u63d2\u5165\u5230t_ds_process_instance\u8868\u4e2d&#xff0c; \u540c\u65f6\u751f\u6210\u5305\u542b\u8fd0\u884c\u6240\u9700\u8981\u7684\u4e0a\u4e0b\u6587\u4fe1\u606f\u7684\u53ef\u6267\u884c\u4efb\u52a1workflowExecuteRunnable\u3002 \u5c06workflowExecuteRunnablecache\u5230\u672c\u5730cache processInstanceExecCacheManager&#xff0c;\u540c\u65f6\u751f\u4ea7\u5c06ProcessInstance\u7684WorkflowEventType.START_WORKFLOW\u751f\u4ea7\u5230workflowEventQueue\u961f\u5217\u4e2d\u3002<\/p>\n<p>\u4e0a\u9762\u7684\u6b65\u9aa4\u662f\u7528\u6237\u5728Web\u9875\u9762\u70b9\u51fb\u542f\u52a8\u4efb\u52a1\u540e\u7684\u6d41\u7a0b&#xff0c;\u800c\u672c\u6b21\u7684\u95ee\u9898\u662fMaster\u5468\u671f\u8c03\u5ea6\u7684\u95ee\u9898\u3002\u7ecf\u8fc7\u67e5\u9605\u8d44\u6599&#xff0c;\u5468\u671f\u8c03\u5ea6\u4efb\u52a1\u5219\u662fMasterServer\u5c06\u5176\u5c01\u88c5\u4e3a\u547d\u4ee4\u6570\u636e\u5e76\u63d2\u5165t_ds_process_instance\u8868\u4e2d&#xff0c;\u540e\u7eed\u6b65\u9aa4\u5982\u4e0a&#xff0c;\u5927\u81f4\u6d41\u7a0b\u5982\u4e0b&#xff1a;<\/p>\n<ul>\n<li>\n<p>\u547d\u4ee4\u5206\u53d1&#xff1a;\u4ee5\u7528\u6237\u63d0\u4ea4\u7684\u5de5\u4f5c\u6d41\u8bf7\u6c42\u4e3a\u89e6\u53d1&#xff0c;MasterServer\u5c06\u5176\u5c01\u88c5\u4e3a\u547d\u4ee4\u6570\u636e\u5e76\u63d2\u5165\u6570\u636e\u5e93\u4e2d\u3002<\/p>\n<\/li>\n<li>\n<p>\u4efb\u52a1\u5206\u914d&#xff1a;MasterServer\u5faa\u73af\u67e5\u8be2\u5f85\u5904\u7406\u7684\u547d\u4ee4&#xff0c;\u4f9d\u7167\u8d1f\u8f7d\u60c5\u51b5\u5c06\u4efb\u52a1\u5206\u914d\u5230\u5bf9\u5e94\u7684ProcessInstance\u4e2d\u3002<\/p>\n<\/li>\n<li>\n<p>\u4efb\u52a1\u6267\u884c&#xff1a;\u6839\u636eDAG\u7684\u4f9d\u8d56\u5173\u7cfb&#xff0c;WorkerServer\u4f1a\u4f18\u5148\u6267\u884c\u65e0\u4f9d\u8d56\u7684\u4efb\u52a1&#xff0c;\u7136\u540e\u6839\u636e\u4f18\u5148\u7ea7\u9010\u6b65\u6267\u884c\u5176\u4ed6\u4efb\u52a1\u3002<\/p>\n<\/li>\n<li>\n<p>\u72b6\u6001\u53cd\u9988&#xff1a;\u4efb\u52a1\u6267\u884c\u8fc7\u7a0b\u4e2d&#xff0c;WorkerServer\u4f1a\u5b9a\u671f\u56de\u8c03MasterServer&#xff0c;\u901a\u77e5\u4efb\u52a1\u7684\u8fdb\u5c55\u548c\u6267\u884c\u72b6\u6001\u3002<\/p>\n<\/li>\n<\/ul>\n<p>\u6240\u4ee5&#xff0c;\u4e0a\u8ff0\u7684\u95ee\u9898\u5c31\u5728\u8fd9&#xff0c;\u5f53Master\u4ece\u505c\u6b62\u5230\u542f\u52a8\u65f6&#xff0c;t_ds_command\u4e2d\u4f1a\u4ea7\u751f\u5927\u91cf\u7684\u4efb\u52a1\u6570\u636e\u3002<\/p>\n<p>\u5728DolphinScheduler3.2.1\u4e2d&#xff0c;\u5176t_ds_command\u6570\u636e\u6837\u4f8b\u4e3a&#xff1a;<\/p>\n<p>id  |command_type|process_definition_code|process_definition_version|process_instance_id|command_param                        |task_depend_type|failure_strategy|warning_type|warning_group_id|schedule_time      |start_time         |executor_id|update_time        |process_instance_priority|worker_group|tenant_code|environment_code|dry_run|test_flag|<br \/>\n&#8212;-&#043;&#8212;&#8212;&#8212;&#8212;&#043;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;&#043;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;&#043;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-&#043;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-&#043;&#8212;&#8212;&#8212;&#8212;&#8212;-&#043;&#8212;&#8212;&#8212;&#8212;&#8212;-&#043;&#8212;&#8212;&#8212;&#8212;&#043;&#8212;&#8212;&#8212;&#8212;&#8212;-&#043;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-&#043;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-&#043;&#8212;&#8212;&#8212;&#8211;&#043;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-&#043;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-&#043;&#8212;&#8212;&#8212;&#8212;&#043;&#8212;&#8212;&#8212;&#8211;&#043;&#8212;&#8212;&#8212;&#8212;&#8212;-&#043;&#8212;&#8212;-&#043;&#8212;&#8212;&#8212;&#043;<br \/>\n1988|           6|         15921642898976|                         4|                  0|{&#034;schedule_timezone&#034;:&#034;Asia\/Shanghai&#034;}|               2|               1|           0|               0|2024-12-11 00:36:40|2024-12-11 00:39:01|          2|2024-12-11 00:39:01|                        2|default     |default    |              -1|      0|        0|<br \/>\n1989|           6|         15921642898976|                         4|                  0|{&#034;schedule_timezone&#034;:&#034;Asia\/Shanghai&#034;}|               2|               1|           0|               0|2024-12-11 00:36:50|2024-12-11 00:39:01|          2|2024-12-11 00:39:01|                        2|default     |default    |              -1|      0|        0|<br \/>\n1990|           6|         15921642898976|                         4|                  0|{&#034;schedule_timezone&#034;:&#034;Asia\/Shanghai&#034;}|               2|               1|           0|               0|2024-12-11 00:37:00|2024-12-11 00:39:01|          2|2024-12-11 00:39:01|                        2|default     |default    |              -1|      0|        0| <\/p>\n<p>\u800ccommand_type\u7684\u679a\u4e3e\u7531\u6e90\u7801\u4e2d\u7684CommandType\u5b9a\u4e49&#xff0c;\u5176\u5185\u5bb9\u5982\u4e0b&#xff1a;<\/p>\n<p>\/**<br \/>\n * command types<br \/>\n * 0 start a new process<br \/>\n * 1 start a new process from current nodes<br \/>\n * 2 recover tolerance fault process<br \/>\n * 3 recover suspended process<br \/>\n * 4 start process from failure task nodes<br \/>\n * 5 complement data<br \/>\n * 6 start a new process from scheduler<br \/>\n * 7 repeat running a process<br \/>\n * 8 pause a process<br \/>\n * 9 stop a process<br \/>\n * 10 recover waiting thread<br \/>\n * 11 recover serial wait<br \/>\n * 12 start a task node in a process instance<br \/>\n *\/<br \/>\nSTART_PROCESS(0, &#034;start a new process&#034;),<br \/>\nSTART_CURRENT_TASK_PROCESS(1, &#034;start a new process from current nodes&#034;),<br \/>\nRECOVER_TOLERANCE_FAULT_PROCESS(2, &#034;recover tolerance fault process&#034;),<br \/>\nRECOVER_SUSPENDED_PROCESS(3, &#034;recover suspended process&#034;),<br \/>\nSTART_FAILURE_TASK_PROCESS(4, &#034;start process from failure task nodes&#034;),<br \/>\nCOMPLEMENT_DATA(5, &#034;complement data&#034;),<br \/>\nSCHEDULER(6, &#034;start a new process from scheduler&#034;),<br \/>\nREPEAT_RUNNING(7, &#034;repeat running a process&#034;),<br \/>\nPAUSE(8, &#034;pause a process&#034;),<br \/>\nSTOP(9, &#034;stop a process&#034;),<br \/>\nRECOVER_WAITING_THREAD(10, &#034;recover waiting thread&#034;),<br \/>\nRECOVER_SERIAL_WAIT(11, &#034;recover serial wait&#034;),<br \/>\nEXECUTE_TASK(12, &#034;start a task node in a process instance&#034;),<br \/>\nDYNAMIC_GENERATION(13, &#034;dynamic generation&#034;),<br \/>\n; <\/p>\n<p>\u90a3\u4e3a\u4ec0\u4e48\u4f1a\u8fd9\u6837\u5462&#xff1f;\u672c\u8d28\u4e0a\u662fMaster\u81ea\u8eab\u7684\u5bb9\u9519\u673a\u5236\u9020\u6210\u7684&#xff0c;\u5176\u5bb9\u9519\u673a\u5236\u53ef\u4ee5\u7ec6\u5206\u4e3a\u5982\u4e0b\u51e0\u4e2a\u6a21\u5757&#xff1a;<\/p>\n<ul>\n<li>\n<p>1&#xff09;Master\u81ea\u8eab\u7684\u5bb9\u9519&#xff1a;\u5982\u679c\u662f\u591aMaster\u540c\u65f6\u8fd0\u884c&#xff0c;\u5176\u4e2d\u4e00\u4e2a\u4f5c\u4e3aActive Master\u8d1f\u8d23\u5904\u7406\u4efb\u52a1\u8c03\u5ea6\u8bf7\u6c42&#xff0c;\u5176\u4ed6\u8282\u70b9\u4f5c\u4e3aStandby Master\u3002\u5f53Active Master\u51fa\u73b0\u6545\u969c\u65f6&#xff0c;Standby Master\u5c06\u81ea\u52a8\u63a5\u7ba1\u5176\u5de5\u4f5c&#xff0c;\u786e\u4fdd\u7cfb\u7edf\u7684\u6b63\u5e38\u8fd0\u884c\u3002\u8fd9\u662f\u901a\u8fc7ZooKeeper\u5b9e\u73b0\u7684&#xff0c;ZooKeeper\u8d1f\u8d23\u9009\u4e3eActive Master\u8282\u70b9&#xff0c;\u5e76\u76d1\u63a7\u8282\u70b9\u7684\u72b6\u6001\u3002<\/p>\n<\/li>\n<li>\n<p>2&#xff09;\u72b6\u6001\u540c\u6b65&#xff1a;\u591aMaster\u8282\u70b9\u4e4b\u95f4\u4f1a\u8fdb\u884c\u72b6\u6001\u540c\u6b65&#xff0c;\u4ee5\u786e\u4fdd\u5728Active Master\u5b95\u673a\u65f6&#xff0c;Standby Master\u80fd\u591f\u63a5\u7ba1\u4efb\u52a1\u8c03\u5ea6\u3002<\/p>\n<\/li>\n<li>\n<p>3&#xff09;\u6545\u969c\u6062\u590d&#xff1a;\u5f53Master\u8282\u70b9\u5b95\u673a\u540e&#xff0c;\u5176\u4ed6Master\u8282\u70b9\u4f1a\u901a\u8fc7ZooKeeper\u7684Watcher\u673a\u5236\u76d1\u542c\u5230\u8fd9\u4e00\u4e8b\u4ef6&#xff0c;\u5e76\u89e6\u53d1\u6545\u969c\u6062\u590d\u3002<\/p>\n<\/li>\n<li>\n<p>4&#xff09;\u6b63\u5728\u8fd0\u884c\u4efb\u52a1\u7684\u5bb9\u9519&#xff1a;\u5f53\u524dMaster\u8282\u70b9\u5b95\u673a\u540e&#xff0c;\u65b0Master\u4f1a\u901a\u8fc7\u5df2\u4e0b\u7ebf\u7684Master\u7684\u5730\u5740\u548c\u6b63\u5728\u8fd0\u884c\u7684\u5de5\u4f5c\u6d41\u72b6\u6001\u6570\u7ec4\u83b7\u53d6\u9700\u8981\u5bb9\u9519\u7684ProcessInstance\u5217\u8868&#xff0c;\u4e4b\u540e\u5c06\u5176\u653e\u5165t_ds_command\u8868\u4e2d&#xff08;\u540e\u7eed\u6d41\u7a0b\u5c31\u662fMaster\u83b7\u53d6\u5230\u5e76\u8c03\u5ea6&#043;Worker\u6267\u884c\u4e86&#xff09;\u3002<\/p>\n<\/li>\n<li>\n<p>5&#xff09;\u5206\u5e03\u5f0f\u9501&#xff1a;\u5728\u5bb9\u9519\u8fc7\u7a0b\u4e2d&#xff0c;Master\u8282\u70b9\u4f1a\u4f7f\u7528ZK\u5206\u5e03\u5f0f\u9501&#043;\u91c7\u7528\u6307\u5b9acommand\u8868\u5206\u914dID\u7684\u5f62\u5f0f\u6765\u786e\u4fdd\u53ea\u6709\u4e00\u4e2aMaster\u8282\u70b9\u6267\u884c\u5bb9\u9519\u64cd\u4f5c&#xff0c;\u907f\u514d\u591a\u4e2aMaster\u8282\u70b9\u540c\u65f6\u63a5\u7ba1\u540c\u4e00\u4e2a\u4efb\u52a1\u3002<\/p>\n<\/li>\n<li>\n<p>6&#xff09;\u5b9a\u65f6\u5bb9\u9519\u7ebf\u7a0b&#xff1a;\u9664\u4e86ZooKeeper\u7684\u4e8b\u4ef6\u89e6\u53d1\u5bb9\u9519\u5916&#xff0c;DolphinScheduler\u8fd8\u5b9e\u73b0\u4e86\u4e00\u4e2a\u5b9a\u65f6\u7ebf\u7a0bFailoverExecuteThread&#xff0c;\u7528\u4e8eMaster\u91cd\u542f\u540e\u6062\u590d\u81ea\u8eab\u4e4b\u524d\u7684\u5de5\u4f5c\u6d41\u5b9e\u4f8b\u3002<\/p>\n<\/li>\n<li>\n<p>7&#xff09;\u4efb\u52a1\u91cd\u8bd5&#xff1a;DolphinScheduler\u8fd8\u652f\u6301\u4efb\u52a1\u5931\u8d25\u540e\u7684\u91cd\u8bd5\u673a\u5236&#xff0c;\u8fd9\u4e0e\u670d\u52a1\u5b95\u673a\u5bb9\u9519\u76f8\u8f85\u76f8\u6210&#xff0c;\u786e\u4fdd\u4efb\u52a1\u7684\u6700\u7ec8\u6267\u884c\u6210\u529f\u3002<\/p>\n<\/li>\n<\/ul>\n<p>\u6240\u4ee5&#xff0c;\u6b64\u65f6\u6839\u636e\u539f\u7406&#043;\u590d\u73b0\u53ef\u4ee5\u521d\u6b65\u63a8\u6d4b\u51fa&#xff0c;\u662f\u5728Master\u542f\u52a8\u65f6\u7684\u67d0\u4e00\u4e2a\u7ebf\u7a0b\u8fdb\u884c\u7684\u5b9a\u65f6\u5bb9\u9519&#xff0c;\u63a5\u4e0b\u6765\u5c31\u8fdb\u5165\u6e90\u7801\u6765\u771f\u6b63\u9a8c\u8bc1\u4e00\u4e0b\u3002<\/p>\n<h3 id=\"04-\u6e90\u7801\u89e3\u6790\">04 \u6e90\u7801\u89e3\u6790<\/h3>\n<p>\u5728org.apache.dolphinscheduler.server.master.MasterServer\u4e0b&#xff0c;\u542f\u52a8Master\u65f6\u4f1a\u6709run\u5165\u53e3&#xff1a;<\/p>\n<p>\/**<br \/>\n * run master server<br \/>\n *\/<br \/>\n&#064;PostConstruct<br \/>\npublic void run() throws SchedulerException {<br \/>\n    \/\/ init rpc server<br \/>\n    this.masterRPCServer.start();<br \/>\n    \/\/ install task plugin<br \/>\n    this.taskPluginManager.loadPlugin();<br \/>\n    this.masterSlotManager.start();<br \/>\n    \/\/ self tolerant<br \/>\n    this.masterRegistryClient.start();<br \/>\n    this.masterRegistryClient.setRegistryStoppable(this);<br \/>\n    this.masterSchedulerBootstrap.start();<br \/>\n    this.eventExecuteService.start();<br \/>\n    this.failoverExecuteThread.start();<br \/>\n    this.schedulerApi.start();<br \/>\n    this.taskGroupCoordinator.start();<br \/>\n    MasterServerMetrics.registerMasterCpuUsageGauge(() -&gt; {<br \/>\n        SystemMetrics systemMetrics &#061; metricsProvider.getSystemMetrics();<br \/>\n        return systemMetrics.getTotalCpuUsedPercentage();<br \/>\n    });<br \/>\n    MasterServerMetrics.registerMasterMemoryAvailableGauge(() -&gt; {<br \/>\n        SystemMetrics systemMetrics &#061; metricsProvider.getSystemMetrics();<br \/>\n        return (systemMetrics.getSystemMemoryMax() &#8211; systemMetrics.getSystemMemoryUsed()) \/ 1024.0 \/ 1024 \/ 1024;<br \/>\n    });<br \/>\n    MasterServerMetrics.registerMasterMemoryUsageGauge(() -&gt; {<br \/>\n        SystemMetrics systemMetrics &#061; metricsProvider.getSystemMetrics();<br \/>\n        return systemMetrics.getJvmMemoryUsedPercentage();<br \/>\n    });<br \/>\n    Runtime.getRuntime().addShutdownHook(new Thread(() -&gt; {<br \/>\n        if (!ServerLifeCycleManager.isStopped()) {<br \/>\n            close(&#034;MasterServer shutdownHook&#034;);<br \/>\n        }<br \/>\n    }));<br \/>\n} <\/p>\n<p>\u901a\u8fc7\u4e0a\u9762\u7684\u4ee3\u7801&#xff0c;\u53ef\u4ee5\u770b\u5230Master\u542f\u52a8\u6267\u884c\u4e86&#xff1a;<\/p>\n<ul>\n<li>\n<p>masterRPCServer.start()&#xff1a;\u521d\u59cb\u5316\u5e76\u542f\u52a8RPC\u670d\u52a1\u5668&#xff0c;\u7528\u4e8e\u8282\u70b9\u95f4\u901a\u4fe1\u3002<\/p>\n<\/li>\n<li>\n<p>taskPluginManager.loadPlugin()&#xff1a;\u52a0\u8f7d\u4efb\u52a1\u63d2\u4ef6&#xff0c;\u8fd9\u4e9b\u63d2\u4ef6\u53ef\u4ee5\u6269\u5c55DolphinScheduler\u7684\u4efb\u52a1\u7c7b\u578b\u3002<\/p>\n<\/li>\n<li>\n<p>masterSlotManager.start()&#xff1a;\u542f\u52a8Master\u7684Slot\u7ba1\u7406\u5668&#xff0c;\u5b83\u8d1f\u8d23\u7ba1\u7406Master\u7684\u8d44\u6e90\u69fd\u4f4d&#xff0c;\u7528\u4e8e\u4efb\u52a1\u8c03\u5ea6\u3002<\/p>\n<\/li>\n<li>\n<p>masterRegistryClient.start()&#xff1a;\u542f\u52a8Master\u7684\u6ce8\u518c\u5ba2\u6237\u7aef&#xff0c;\u5b83\u8d1f\u8d23\u5c06Master\u8282\u70b9\u6ce8\u518c\u5230\u5206\u5e03\u5f0f\u534f\u8c03\u670d\u52a1&#xff08;\u5982ZooKeeper&#xff09;\u4e2d\u3002<\/p>\n<\/li>\n<li>\n<p>masterRegistryClient.setRegistryStoppable(this)&#xff1a;\u8bbe\u7f6e\u6ce8\u518c\u5ba2\u6237\u7aef\u7684\u53ef\u505c\u6b62\u5bf9\u8c61&#xff0c;\u4ee5\u4fbf\u5728Master\u505c\u6b62\u65f6\u80fd\u591f\u8fdb\u884c\u6e05\u7406\u5de5\u4f5c\u3002<\/p>\n<\/li>\n<li>\n<p>masterSchedulerBootstrap.start()&#xff1a;\u542f\u52a8Master\u7684\u8c03\u5ea6\u5f15\u5bfc\u670d\u52a1&#xff0c;\u5b83\u8d1f\u8d23\u521d\u59cb\u5316\u8c03\u5ea6\u76f8\u5173\u7684\u670d\u52a1\u3002<\/p>\n<\/li>\n<li>\n<p>eventExecuteService.start()&#xff1a;\u542f\u52a8\u4e8b\u4ef6\u6267\u884c\u670d\u52a1&#xff0c;\u5b83\u8d1f\u8d23\u5904\u7406\u5de5\u4f5c\u6d41\u4e2d\u7684\u4e8b\u4ef6&#xff0c;\u5982\u4efb\u52a1\u72b6\u6001\u53d8\u5316\u3002<\/p>\n<\/li>\n<li>\n<p>failoverExecuteThread.start()&#xff1a;\u542f\u52a8\u6545\u969c\u6062\u590d\u6267\u884c\u7ebf\u7a0b&#xff0c;\u5b83\u8d1f\u8d23\u5728Master\u5b95\u673a\u540e\u6062\u590d\u4efb\u52a1\u6267\u884c\u3002<\/p>\n<\/li>\n<li>\n<p>schedulerApi.start()&#xff1a;\u542f\u52a8\u8c03\u5ea6API\u670d\u52a1&#xff0c;\u63d0\u4f9b\u8c03\u5ea6\u76f8\u5173\u7684\u63a5\u53e3\u4f9b\u5916\u90e8\u8c03\u7528\u3002<\/p>\n<\/li>\n<li>\n<p>taskGroupCoordinator.start()&#xff1a;\u542f\u52a8\u4efb\u52a1\u7ec4\u534f\u8c03\u5668&#xff0c;\u5b83\u8d1f\u8d23\u534f\u8c03\u4efb\u52a1\u7ec4\u5185\u7684\u4efb\u52a1\u6267\u884c\u3002<\/p>\n<\/li>\n<\/ul>\n<p>\u7ecf\u8fc7\u6e90\u7801\u63a2\u67e5&#xff0c;\u53d1\u73b0\u6700\u5173\u952e\u7684failoverExecuteThread\u4e0d\u662f\u91cd\u65b0\u6267\u884c\u672a\u8c03\u5ea6\u7684\u5468\u671f\u4efb\u52a1&#xff0c;\u800c\u662f\u5bb9\u9519\u672a\u6267\u884c\u5b8c\u7684\u4efb\u52a1\u3002\u5e76\u4e14\u5176\u4ed6\u6e90\u7801\u4e2d\u4e5f\u6ca1\u6709\u5173\u4e8e\u6062\u590d\u5468\u671f\u4efb\u52a1\u8c03\u5ea6\u7684\u5185\u5bb9\u3002<\/p>\n<p>\u90a3\u73b0\u5728\u9700\u8981\u6362\u4e00\u4e2a\u601d\u8def&#xff0c;\u5c31\u662f\u4ece\u4e0b\u5f80\u4e0a\u8d70&#xff1a;<\/p>\n<li>\n<p>\u9996\u5148\u53d1\u73b0\u91cd\u542f\u6062\u590d\u540e&#xff0c;Web\u9875\u9762\u4e0a\u7684\u201c\u8fd0\u884c\u7c7b\u578b\u201d\u662f\u201c\u8c03\u5ea6\u6267\u884c\u201d&#xff0c;\u800c\u6570\u636e\u5e93\u7684\u201ccommand_type\u201d\u662f\u201c6\u201d&#xff0c;\u90a3\u5c31\u610f\u5473\u7740\u5fc5\u987b\u6709\u4e00\u4e2a\u670d\u52a1\u4f1a\u6709\u5f80\u6570\u636e\u5e93\u91cc\u9762\u53bb\u63d2\u5165command_type\u4e3a6\u7684\u65b9\u6cd5\u3002\u5e76\u4e14\u5176\u4f1a\u53bb\u83b7\u53d6t_ds_schedules\u8868\u4e2d\u7684\u4efb\u52a1\u5b9a\u65f6\u8c03\u5ea6\u5b9e\u4f8b\u3002<\/p>\n<\/li>\n<li>\n<p>\u6839\u636e\u6e90\u7801&#xff0c;\u6392\u67e5\u5230dolphinscheduler-dao\u9879\u76ee\u4e0b\u4f1a\u5b58\u653e\u6240\u6709\u7684\u6570\u636e\u5e93\u64cd\u4f5cDAO&#xff0c;\u9042\u53ef\u4ee5\u627e\u5230ScheduleMapper\u7c7b&#xff0c;\u6b64\u7c7b\u662f\u548ct_ds_schedules\u76f8\u5173\u7684DAO\u7c7b&#xff1b;\u4e4b\u540e\u6839\u636et_ds_command\u53cd\u67e5&#xff0c;\u627e\u5230\u4e86CommandServiceImpl\u7c7b\u4e2d\u7684createCommand\u65b9\u6cd5&#xff1b;\u518d\u6839\u636e\u4e24\u8005\u53cd\u67e5&#043;command_type\u4e3a6&#xff0c;\u627e\u5230\u4e86ProcessScheduleTask\u7c7b\u4e2d\u7684executeInternal\u65b9\u6cd5\u3002<\/p>\n<\/li>\n<li>\n<p>ProcessScheduleTask\u7c7b\u4e2d\u7684executeInternal\u65b9\u6cd5&#xff0c;\u540c\u65f6\u6ee1\u8db3&#xff1a;\u83b7\u53d6\u4e86\u8c03\u5ea6\u4efb\u52a1\u3001\u63d2\u5165command\u6570\u636e\u3001\u7c7b\u578b\u4e3a6\u8fd9\u4e09\u4e2a\u6761\u4ef6\u3002<\/p>\n<\/li>\n<li>\n<p>\u67e5\u770bProcessScheduleTask\u7684executeInternal\u6e90\u7801&#xff0c;\u524d\u534a\u90e8\u5206\u662f\u4eceQuartz\u4e0a\u4e0b\u6587\u4e2d\u83b7\u53d6\u5230\u9884\u5b9a\u4e49\u7684\u8c03\u5ea6\u65f6\u95f4\u548c\u8c03\u5ea6\u5b9e\u9645\u8fd0\u884c\u65f6\u95f4&#xff0c;\u4e0b\u534a\u90e8\u5206\u662f\u6821\u9a8c\u8fd9\u4e2a\u8c03\u5ea6Cron\u662f\u5426\u5b58\u5728\u548c\u4e0a\u7ebf\u3002<\/p>\n<\/li>\n<li>\n<p>\u5728executeInternal\u4e2d&#xff0c;\u6700\u5173\u952e\u7684\u5176\u5b9e\u5c31\u662fscheduledFireTime\u548cfireTime\u3002<\/p>\n<\/li>\n<p>\u627e\u5230\u8fd9\u91cc\u7684\u8bdd&#xff0c;\u6211\u4eec\u518d\u7ed3\u5408DolphinScheduler&#043;Quartz\u603b\u7ed3\u4e00\u4e0b\u8c03\u5ea6\u7684\u539f\u7406&#xff1a;<\/p>\n<ul>\n<li>\n<p>Web\u9875\u9762\u8bbe\u7f6e\u8c03\u5ea6&#xff0c;\u5176\u4f1a\u901a\u8fc7SchedulerController\u4e2d\u7684createSchedule()\u6765\u521b\u5efa\u8c03\u5ea6&#xff0c;\u5e76\u5f80t_ds_schedules\u4e2d\u63d2\u5165\u4e00\u6761\u6570\u636e&#xff1b;<\/p>\n<\/li>\n<li>\n<p>Web\u9875\u9762\u8bbe\u7f6e\u8c03\u5ea6\u4e0a\u7ebf&#xff0c;\u5176\u4f1a\u901a\u8fc7QuartzScheduler\u4e2d\u7684insertOrUpdateScheduleTask()\u5411Quartz\u4e2d\u521b\u5efaTrigger\u89e6\u53d1\u5668&#xff0c;\u5e76\u5f80QRTZ_CRON_TRIGGERS\u4e2d\u63d2\u5165\u4e00\u6761\u6570\u636e&#xff1b;<\/p>\n<\/li>\n<li>\n<p>\u4e4b\u540e\u5b9a\u671f\u8c03\u7528ProcessScheduleTask\u4e2d\u7684executeInternal()\u6765\u5f80t_ds_command\u4e2d\u63d2\u5165\u6570\u636e&#xff1b;<\/p>\n<\/li>\n<li>\n<p>\u4e4b\u540e\u5c31\u662fMaster-Worker\u7684\u6267\u884c\u6d41\u7a0b\u4e86&#xff1b;<\/p>\n<\/li>\n<\/ul>\n<p>\u4e86\u89e3\u4e86\u5927\u81f4\u7684\u8c03\u5ea6\u6d41\u7a0b\u540e&#xff0c;\u7ed3\u5408\u6e90\u7801\u4e2d\u7684scheduledFireTime\u548cfireTime&#xff0c;\u5c31\u53ef\u4ee5\u63a8\u65ad\u51fa\u8c03\u5ea6\u65f6\u95f4\u4e0d\u662f\u7531DolphinScheduler\u8bbe\u7f6e\u7684&#xff0c;\u800c\u662f\u7531Quartz\u8bbe\u7f6e\u7684\u3002<\/p>\n<p>\u90a3\u5c31\u7ee7\u7eed\u67e5\u9605Quartz\u76f8\u5173\u7684\u8d44\u6599&#xff0c;\u53d1\u73b0\u5728Quartz\u4e2d\u6709\u4e00\u4e2amisfire\u673a\u5236&#xff1a;\u5468\u671f\u6027\u4efb\u52a1A\u9700\u8981\u5728\u67d0\u4e2a\u89c4\u5b9a\u7684\u65f6\u95f4\u6267\u884c&#xff0c;\u4f46\u662f\u7531\u4e8e\u67d0\u79cd\u539f\u56e0\u5bfc\u81f4\u4efb\u52a1A\u672a\u6267\u884c&#xff0c;\u79f0\u4e3aMisFire\u3002<\/p>\n<p>\u800cQuartz\u5224\u65ad\u4e00\u4e2a\u4efb\u52a1\u662fMisFire&#xff0c;\u63d0\u4f9b\u4e86\u4e00\u4e2a\u914d\u7f6e\u9879&#xff1a;org.quartz.jobStore.misfireThreshold&#xff0c;\u9ed8\u8ba4\u662f60000ms&#xff08;\u537360\u79d2&#xff09;\u3002<\/p>\n<p>misfire\u4ea7\u751f\u9700\u8981\u67092\u4e2a\u524d\u7f6e\u6761\u4ef6&#xff1a;<\/p>\n<ul>\n<li>\n<p>\u4e00\u4e2a\u662fjob\u5230\u8fbe\u89e6\u53d1\u65f6\u95f4\u65f6\u6ca1\u6709\u88ab\u6267\u884c&#xff1b;<\/p>\n<\/li>\n<li>\n<p>\u4e8c\u662f\u88ab\u6267\u884c\u7684\u5ef6\u8fdf\u65f6\u95f4\u8d85\u8fc7\u4e86Quartz\u914d\u7f6e\u7684misfireThreshold\u9600\u503c&#xff1b;<\/p>\n<\/li>\n<\/ul>\n<p>\u5982\u679c\u5ef6\u8fdf\u6267\u884c\u7684\u65f6\u95f4\u5c0f\u4e8e\u9600\u503c&#xff0c;\u5219Quartz\u4e0d\u8ba4\u4e3a\u53d1\u751f\u4e86misfire&#xff0c;\u7acb\u5373\u6267\u884cjob&#xff1b;\u5982\u679c\u5ef6\u8fdf\u6267\u884c\u7684\u65f6\u95f4\u5927\u4e8e\u6216\u8005\u7b49\u4e8e\u9600\u503c&#xff0c;\u5219\u88ab\u5224\u65ad\u4e3amisfire&#xff0c;\u7136\u540e\u4f1a\u6309\u7167\u6307\u5b9a\u7684\u7b56\u7565\u6765\u6267\u884c\u3002<\/p>\n<p>\u90a3misfire\u4ea7\u751f\u7684\u539f\u56e0\u4e00\u822c\u5982\u4e0b&#xff1a;<\/p>\n<ul>\n<li>\n<p>\u5f53job\u8fbe\u5230\u89e6\u53d1\u65f6\u95f4\u65f6&#xff0c;\u6240\u6709\u7ebf\u7a0b\u90fd\u88ab\u5176\u4ed6job\u5360\u7528&#xff0c;\u6ca1\u6709\u53ef\u7528\u7ebf\u7a0b\u3002&#xff1b;<\/p>\n<\/li>\n<li>\n<p>\u5728job\u9700\u8981\u89e6\u53d1\u7684\u65f6\u95f4\u70b9&#xff0c;scheduler\u505c\u6b62\u4e86&#xff08;\u53ef\u80fd\u662f\u610f\u5916\u505c\u6b62\u7684&#xff09;&#xff1b;\u3010\u2014\u2014\u5f53\u524d\u7684\u95ee\u9898\u5c5e\u4e8e\u8fd9\u79cd\u7c7b\u578b\u3011<\/p>\n<\/li>\n<li>\n<p>job\u4f7f\u7528\u4e86&#064;DisallowConcurrentExecution\u6ce8\u89e3&#xff0c;job\u4e0d\u80fd\u5e76\u53d1\u6267\u884c&#xff0c;\u5f53\u8fbe\u5230\u4e0b\u4e00\u4e2ajob\u6267\u884c\u70b9\u7684\u65f6\u5019&#xff0c;\u4e0a\u4e00\u4e2a\u4efb\u52a1\u8fd8\u6ca1\u6709\u5b8c\u6210&#xff1b;<\/p>\n<\/li>\n<li>\n<p>job\u6307\u5b9a\u4e86\u8fc7\u53bb\u7684\u5f00\u59cb\u6267\u884c\u65f6\u95f4&#xff0c;\u4f8b\u5982\u5f53\u524d\u65f6\u95f4\u662f8\u70b900\u520600\u79d2&#xff0c;\u6307\u5b9a\u5f00\u59cb\u65f6\u95f4\u4e3a7\u70b900\u520600\u79d2&#xff1b;<\/p>\n<\/li>\n<\/ul>\n<p>\u800c\u5224\u5b9a\u4e86\u4efb\u52a1\u662fMisFire\u540e&#xff0c;\u4f1a\u6709\u4e00\u4e2a\u8865\u507f\u673a\u5236&#xff0c;\u8865\u507f\u673a\u5236\u53ea\u6709\u5728\u4efb\u52a1\u786e\u8ba4\u4e3aMisFire\u72b6\u6001\u540e&#xff0c;\u624d\u4f1a\u88ab\u6267\u884c\u3002\u8865\u507f\u673a\u5236\u914d\u7f6e\u5728Quartz\u6e90\u7801\u7684Trigger\u4e2d&#xff1a;<\/p>\n<p>public interface Trigger extends Serializable, Cloneable, Comparable&lt;Trigger&gt; {<br \/>\n    long serialVersionUID &#061; -3904243490805975570L;<br \/>\n    int MISFIRE_INSTRUCTION_SMART_POLICY &#061; 0;<br \/>\n    int MISFIRE_INSTRUCTION_IGNORE_MISFIRE_POLICY &#061; -1;<br \/>\n    int DEFAULT_PRIORITY &#061; 5;<br \/>\n    &#8230;&#8230; <\/p>\n<p>\u4f46\u662f\u8fd9\u4e2a\u8865\u507f\u673a\u5236\u9700\u8981\u6839\u636eTrigger\u6765\u5224\u5b9a&#xff0c;\u5982\u4e0b\u662f\u4e0d\u540c\u7684Trigger&#xff1a;<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418135752-68025a607b31b.webp\" alt=\"file\" \/><\/p>\n<p>\u5728DolphinScheduler\u4e2d&#xff0c;\u5404\u79cd\u7c7b\u578b\u7684Trigg\u90fd\u4f1a\u6d89\u53ca\u5230&#xff1a;<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418135752-68025a60cbe6b.webp\" alt=\"file\" \/><\/p>\n<p>Trigger\u7684\u7c7b\u578b&#xff1a;<\/p>\n<ul>\n<li>\n<p>SimpleTrigger\u662f\u4e00\u4e2a\u7b80\u5355\u7684\u89e6\u53d1\u5668&#xff0c;\u7528\u4e8e\u6267\u884c\u91cd\u590d\u4efb\u52a1\u3002\u5b83\u53ef\u4ee5\u6307\u5b9a\u4e00\u4e2a\u8d77\u59cb\u65f6\u95f4&#xff0c;\u7136\u540e\u6309\u7167\u56fa\u5b9a\u7684\u95f4\u9694\u65f6\u95f4\u91cd\u590d\u6267\u884c\u4efb\u52a1&#xff0c;\u76f4\u5230\u8fbe\u5230\u6307\u5b9a\u7684\u91cd\u590d\u6b21\u6570\u3002SimpleTrigger\u7684\u5c5e\u6027\u5305\u62ec\u91cd\u590d\u95f4\u9694&#xff08;repeatInterval&#xff09;\u548c\u91cd\u590d\u6b21\u6570&#xff08;repeatCount&#xff09;&#xff0c;\u5b9e\u9645\u6267\u884c\u6b21\u6570\u662frepeatCount &#043; 1&#xff0c;\u56e0\u4e3a\u5728\u5f00\u59cb\u65f6\u95f4&#xff08;startTime&#xff09;\u65f6\u4f1a\u6267\u884c\u4e00\u6b21\u3002<\/p>\n<\/li>\n<li>\n<p>CronTrigger&#xff1a;CronTrigger\u4f7f\u7528Cron\u8868\u8fbe\u5f0f\u6765\u5b9a\u4e49\u590d\u6742\u7684\u8c03\u5ea6\u8ba1\u5212\u3002Cron\u8868\u8fbe\u5f0f\u75316\u62167\u4e2a\u7a7a\u683c\u5206\u9694\u7684\u65f6\u95f4\u5b57\u6bb5\u7ec4\u6210&#xff0c;\u5206\u522b\u8868\u793a\u79d2\u3001\u5206\u3001\u5c0f\u65f6\u3001\u4e00\u4e2a\u6708\u4e2d\u7684\u65e5\u671f\u3001\u6708\u4efd\u3001\u4e00\u5468\u4e2d\u7684\u65e5\u671f\u548c\u53ef\u9009\u7684\u5e74\u4efd\u3002CronTrigger\u5141\u8bb8\u8bbe\u5b9a\u975e\u5e38\u590d\u6742\u7684\u89e6\u53d1\u65f6\u95f4\u8868&#xff0c;\u57fa\u672c\u4e0a\u8986\u76d6\u4e86\u5176\u4ed6\u89e6\u53d1\u5668\u7684\u7edd\u5927\u90e8\u5206\u80fd\u529b\u3002<\/p>\n<\/li>\n<li>\n<p>CalendarIntervalTrigger&#xff1a;CalendarIntervalTrigger\u6307\u5b9a\u4ece\u67d0\u4e00\u4e2a\u65f6\u95f4\u5f00\u59cb&#xff0c;\u4ee5\u4e00\u5b9a\u7684\u65f6\u95f4\u95f4\u9694\u6267\u884c\u7684\u4efb\u52a1\u3002\u4e0d\u540c\u4e8eSimpleTrigger\u53ea\u652f\u6301\u6beb\u79d2\u5355\u4f4d\u7684\u65f6\u95f4\u95f4\u9694&#xff0c;CalendarIntervalTrigger\u652f\u6301\u7684\u95f4\u9694\u5355\u4f4d\u6709\u79d2\u3001\u5206\u949f\u3001\u5c0f\u65f6\u3001\u5929\u3001\u6708\u3001\u5e74\u3002\u5b83\u9002\u5408\u7684\u4efb\u52a1\u7c7b\u4f3c\u4e8e\u6bcf\u5468\u6267\u884c\u4e00\u6b21\u3002<\/p>\n<\/li>\n<li>\n<p>DailyTimeIntervalTrigger&#xff1a;DailyTimeIntervalTrigger\u6307\u5b9a\u6bcf\u5929\u7684\u67d0\u4e2a\u65f6\u95f4\u6bb5\u5185&#xff0c;\u4ee5\u4e00\u5b9a\u7684\u65f6\u95f4\u95f4\u9694\u6267\u884c\u4efb\u52a1\u3002\u5e76\u4e14\u5b83\u53ef\u4ee5\u652f\u6301\u6307\u5b9a\u661f\u671f\u3002\u5b83\u9002\u5408\u7684\u4efb\u52a1\u7c7b\u4f3c\u4e8e\u6bcf\u59299:00\u523018:00&#xff0c;\u6bcf\u969470\u79d2\u6267\u884c\u4e00\u6b21&#xff0c;\u5e76\u4e14\u53ea\u8981\u5468\u4e00\u81f3\u5468\u4e94\u6267\u884c\u3002<\/p>\n<\/li>\n<li>\n<p>&#8230;&#8230;<\/p>\n<\/li>\n<\/ul>\n<p>\u6240\u4ee5&#xff0c;\u56e0\u4e3a\u4e0d\u540c\u7684Trigger\u7c7b\u578b\u5176\u53c2\u6570\u662f\u4e0d\u4e00\u6837\u7684&#xff0c;\u6240\u4ee5\u5f53Trigger\u89e6\u53d1Misfire\u673a\u5236\u65f6&#xff0c;\u6839\u636eTrigger\u7684\u4e0d\u540c&#xff0c;\u7b56\u7565\u4e5f\u4f1a\u4e0d\u540c&#xff1a;<\/p>\n<p>\/**<br \/>\n \u516c\u5171\u7684Misfire\u673a\u5236&#xff0c;\u5728Trigger\u7c7b\u4e2d<br \/>\n **\/<br \/>\n \/\/ \u8fd9\u662f\u4e00\u4e2a\u667a\u80fd\u7b56\u7565&#xff0c;Quartz\u4f1a\u6839\u636eTrigger\u7684\u7c7b\u578b\u81ea\u52a8\u9009\u62e9\u4e00\u4e2a\u5408\u9002\u7684misfire\u7b56\u7565\u3002\u5bf9\u4e8eCronTrigger&#xff0c;\u9ed8\u8ba4\u4f7f\u7528MISFIRE_INSTRUCTION_FIRE_ONCE_NOW\u3002<br \/>\nint MISFIRE_INSTRUCTION_SMART_POLICY &#061; 0;<br \/>\n\/\/ \u8fd9\u4e2a\u7b56\u7565\u4f1a\u5c06\u6240\u6709\u9519\u8fc7\u7684\u89e6\u53d1\u4e8b\u4ef6&#xff0c;\u7acb\u5373\u6267\u884c\u6240\u6709\u8865\u507f\u52a8\u4f5c\u3002\u5373\u4f7f\u5b9a\u65f6\u4efb\u52a1\u6267\u884c\u7684\u65f6\u95f4\u5df2\u7ecf\u7ed3\u675f&#xff0c;\u5b83\u4e5f\u4f1a\u628a\u6240\u6709\u5e94\u8be5\u6267\u884c\u7684\u4efb\u52a1\u4e00\u6b21\u6027\u5168\u90e8\u6267\u884c\u5b8c\u3002<br \/>\nint MISFIRE_INSTRUCTION_IGNORE_MISFIRE_POLICY &#061; -1;<br \/>\n\/**<br \/>\n SimpleTrigger\u7684Misfire\u673a\u5236&#xff0c;\u5728SimpleTrigger\u7c7b\u4e2d<br \/>\n **\/<br \/>\n \/\/ \u5982\u679c\u89e6\u53d1\u5668\u9519\u8fc7\u4e86\u9884\u5b9a\u7684\u89e6\u53d1\u65f6\u95f4&#xff0c;\u8fd9\u4e2a\u7b56\u7565\u4f1a\u7acb\u5373\u6267\u884c\u4e00\u6b21\u4efb\u52a1&#xff0c;\u7136\u540e\u6309\u7167\u539f\u8ba1\u5212\u7ee7\u7eed\u6267\u884c\u540e\u7eed\u7684\u4efb\u52a1\u3002<br \/>\nint MISFIRE_INSTRUCTION_FIRE_NOW &#061; 1;<br \/>\n\/\/ \u8fd9\u4e2a\u7b56\u7565\u4f1a\u5c06\u89e6\u53d1\u5668\u7684\u5f00\u59cb\u65f6\u95f4\u8bbe\u7f6e\u4e3a\u5f53\u524d\u65f6\u95f4&#xff0c;\u5e76\u7acb\u5373\u6267\u884c\u9519\u8fc7\u7684\u4efb\u52a1&#xff0c;\u5305\u62ec\u5df2\u7ecf\u9519\u8fc7\u7684\u91cd\u590d\u6b21\u6570\u3002<br \/>\nint MISFIRE_INSTRUCTION_RESCHEDULE_NOW_WITH_EXISTING_REPEAT_COUNT &#061; 2;<br \/>\n\/\/ \u7c7b\u4f3c\u4e8eMISFIRE_INSTRUCTION_RESCHEDULE_NOW_WITH_EXISTING_REPEAT_COUNT&#xff0c;\u4f46\u662f\u4f1a\u5ffd\u7565\u5df2\u7ecf\u9519\u8fc7\u7684\u89e6\u53d1\u6b21\u6570&#xff0c;\u53ea\u6267\u884c\u5269\u4f59\u7684\u91cd\u590d\u6b21\u6570\u3002<br \/>\nint MISFIRE_INSTRUCTION_RESCHEDULE_NOW_WITH_REMAINING_REPEAT_COUNT &#061; 3;<br \/>\n\/\/ \u8fd9\u4e2a\u7b56\u7565\u4f1a\u5ffd\u7565\u5df2\u7ecf\u9519\u8fc7\u7684\u89e6\u53d1\u6b21\u6570&#xff0c;\u5e76\u5728\u4e0b\u4e00\u4e2a\u9884\u5b9a\u7684\u89e6\u53d1\u65f6\u95f4\u6267\u884c\u4efb\u52a1&#xff0c;\u6267\u884c\u5269\u4f59\u7684\u91cd\u590d\u6b21\u6570\u3002<br \/>\nint MISFIRE_INSTRUCTION_RESCHEDULE_NEXT_WITH_REMAINING_COUNT &#061; 4;<br \/>\n\/\/ \u7c7b\u4f3c\u4e8eMISFIRE_INSTRUCTION_RESCHEDULE_NEXT_WITH_REMAINING_COUNT&#xff0c;\u4f46\u662f\u4f1a\u5305\u62ec\u6240\u6709\u9519\u8fc7\u7684\u91cd\u590d\u6b21\u6570\u3002<br \/>\nint MISFIRE_INSTRUCTION_RESCHEDULE_NEXT_WITH_EXISTING_COUNT &#061; 5;<br \/>\n\/**<br \/>\nCronTrigger\u7684Misfire\u673a\u5236&#xff0c;\u5728CronTrigger\u7c7b\u4e2d<br \/>\n**\/<br \/>\n\/\/ \u5982\u679c\u89e6\u53d1\u5668\u9519\u8fc7\u4e86\u9884\u5b9a\u7684\u89e6\u53d1\u65f6\u95f4&#xff0c;\u8fd9\u4e2a\u7b56\u7565\u4f1a\u7acb\u5373\u6267\u884c\u4e00\u6b21\u4efb\u52a1&#xff0c;\u7136\u540e\u6309\u7167\u539f\u8ba1\u5212\u7ee7\u7eed\u6267\u884c\u540e\u7eed\u7684\u4efb\u52a1\u3002<br \/>\nint MISFIRE_INSTRUCTION_FIRE_ONCE_NOW &#061; 1;<br \/>\n\/\/ \u5bf9\u4e8eCronTrigger&#xff0c;\u8fd9\u4e2a\u7b56\u7565\u4f1a\u5ffd\u7565\u6240\u6709\u9519\u8fc7\u7684\u89e6\u53d1\u4e8b\u4ef6&#xff0c;\u76f4\u63a5\u7b49\u5f85\u4e0b\u4e00\u6b21\u9884\u5b9a\u7684\u89e6\u53d1\u65f6\u95f4\u3002<br \/>\nint MISFIRE_INSTRUCTION_DO_NOTHING &#061; 2;<br \/>\n&#8230;&#8230; <\/p>\n<p>\u5728QuartzScheduler\u7684insertOrUpdateScheduleTask()\u4e2d&#xff0c;\u7528\u7684\u53ea\u6709CronTrigger&#xff0c;\u5176\u6e90\u7801\u5982\u4e0b&#xff1a;<\/p>\n<p>CronTrigger cronTrigger &#061; newTrigger()<br \/>\n        .withIdentity(triggerKey)<br \/>\n        .startAt(startDate)<br \/>\n        .endAt(endDate)<br \/>\n        .withSchedule(<br \/>\n                cronSchedule(cronExpression)<br \/>\n                        .withMisfireHandlingInstructionIgnoreMisfires()<br \/>\n                        .inTimeZone(DateUtils.getTimezone(timezoneId)))<br \/>\n        .forJob(jobDetail).build();<br \/>\n\/\/ \u5f80\u4e0b\u8d70<br \/>\npublic CronScheduleBuilder withMisfireHandlingInstructionIgnoreMisfires() {<br \/>\n    this.misfireInstruction &#061; -1;<br \/>\n    return this;<br \/>\n} <\/p>\n<p>\u5176\u8865\u507f\u673a\u5236\u91c7\u7528\u7684-1\u7f16\u7801&#xff0c;\u4e5f\u5c31\u662f\u4f1a\u5c06\u6240\u6709\u9519\u8fc7\u7684\u89e6\u53d1\u4e8b\u4ef6&#xff0c;\u7acb\u5373\u6267\u884c\u6240\u6709\u8865\u507f\u52a8\u4f5c\u3002\u6240\u4ee5\u6b64\u65f6\u5c31\u53ef\u4ee5\u89e3\u91ca&#xff0c;\u4e3a\u4ec0\u4e48Master\u91cd\u542f\u540e&#xff0c;\u4f1a\u5c06\u6240\u6709\u7684\u672a\u6267\u884c\u7684\u5468\u671f\u4efb\u52a1&#xff0c;\u5168\u90e8\u6267\u884c\u4e00\u6b21&#xff01;&#xff01;&#xff01;<\/p>\n<p>\u8fd9\u4e2a\u8bbe\u7f6e\u6839\u636eTrigger\u7684\u4e0d\u540c&#xff0c;\u4e5f\u53ef\u4ee5\u5206\u522b\u8bbe\u7f6e\u4e0d\u540c\u7684\u53c2\u6570&#xff1a;<\/p>\n<p>\/**<br \/>\n CronTrigger&#xff0c;\u5f15\u7528CronScheduleBuilder\u4e2d\u7684\u8bbe\u7f6e<br \/>\n **\/<br \/>\npublic CronScheduleBuilder withMisfireHandlingInstructionIgnoreMisfires() {<br \/>\n    this.misfireInstruction &#061; -1;<br \/>\n    return this;<br \/>\n}<br \/>\npublic CronScheduleBuilder withMisfireHandlingInstructionDoNothing() {<br \/>\n    this.misfireInstruction &#061; 2;<br \/>\n    return this;<br \/>\n}<br \/>\npublic CronScheduleBuilder withMisfireHandlingInstructionFireAndProceed() {<br \/>\n    this.misfireInstruction &#061; 1;<br \/>\n    return this;<br \/>\n}<br \/>\n\/**<br \/>\n SimpleTrigger&#xff0c;\u5f15\u7528SimpleScheduleBuilder\u7684\u8bbe\u7f6e<br \/>\n**\/<br \/>\npublic SimpleScheduleBuilder withMisfireHandlingInstructionIgnoreMisfires() {<br \/>\n    this.misfireInstruction &#061; -1;<br \/>\n    return this;<br \/>\n}<br \/>\npublic SimpleScheduleBuilder withMisfireHandlingInstructionFireNow() {<br \/>\n    this.misfireInstruction &#061; 1;<br \/>\n    return this;<br \/>\n}<br \/>\npublic SimpleScheduleBuilder withMisfireHandlingInstructionNextWithExistingCount() {<br \/>\n    this.misfireInstruction &#061; 5;<br \/>\n    return this;<br \/>\n}<br \/>\npublic SimpleScheduleBuilder withMisfireHandlingInstructionNextWithRemainingCount() {<br \/>\n    this.misfireInstruction &#061; 4;<br \/>\n    return this;<br \/>\n}<br \/>\npublic SimpleScheduleBuilder withMisfireHandlingInstructionNowWithExistingCount() {<br \/>\n    this.misfireInstruction &#061; 2;<br \/>\n    return this;<br \/>\n}<br \/>\npublic SimpleScheduleBuilder withMisfireHandlingInstructionNowWithRemainingCount() {<br \/>\n    this.misfireInstruction &#061; 3;<br \/>\n    return this;<br \/>\n} <\/p>\n<h3 id=\"05-\u89e3\u51b3\u65b9\u6848\">05 \u89e3\u51b3\u65b9\u6848<\/h3>\n<ul>\n<li>\u5c06\u4efb\u52a1\u8bbe\u7f6e\u4e3a\u201c\u4e32\u884c\u7b49\u5f85\u201d\u3002\u2014\u2014\u53ef\u884c&#xff0c;\u4f46\u65e0\u6cd5\u53d1\u6325\u51fa\u5927\u6570\u636e\u96c6\u7fa4\u7684\u5e76\u884c\u5316\u4f18\u52bf\u3002\u5e76\u4e14\u6709\u4e00\u4e2a\u81f4\u547d\u7684\u7f3a\u9677&#xff0c;\u5c31\u662f\u4e32\u884c\u7b49\u5f85\u7684\u4efb\u52a1\u65e0\u6cd5\u5728\u9875\u9762\u6570\u624b\u52a8\u505c\u6b62&#xff0c;\u9700\u8981\u53bb\u5230t_ds_process_instance\u4e2d\u66f4\u6539\u72b6\u6001\u6216\u5220\u9664\u6570\u636e\u3002<\/li>\n<\/ul>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418135752-68025a60e40e1.webp\" alt=\"file\" \/><\/p>\n<ul>\n<li>\n<p>Master HA&#xff1a;\u5355\u673aMaster\u65f6&#xff0c;\u5bf9Master\u8bbe\u7f6e\u5b88\u62a4&#xff0c;\u5b95\u673a\u540e\u81ea\u52a8\u62c9\u8d77&#xff08;\u4f46\u4e5f\u6709\u65e0\u6cd5\u62c9\u8d77\u7684\u65f6\u5019&#xff09;&#xff1b;\u591a\u673aMaster\u65f6&#xff0c;\u90e8\u7f72\u591a\u53f0Master&#xff0c;\u4f7f\u5176\u53ef\u4ee5\u5b9e\u73b0HA\u3002<\/p>\n<\/li>\n<li>\n<p>DolphinScheduler\u76d1\u63a7\u544a\u8b66&#xff1a;\u6301\u7eed\u76d1\u63a7DolphinScheduler\u8fd0\u884c\u72b6\u6001&#xff0c;\u5f53\u6709\u89d2\u8272\u5b95\u673a\u540e&#xff0c;\u53ca\u65f6\u53d1\u51fa\u544a\u8b66\u4fe1\u606f&#xff08;\u4f1a\u6709\u534a\u591c\u5b95\u673a\u800c\u8fd0\u7ef4\u4eba\u5458\u6ca1\u6709\u53ca\u65f6\u53d1\u73b0\u544a\u8b66\u4fe1\u606f\u7684\u60c5\u51b5&#xff09;\u3002<\/p>\n<\/li>\n<li>\n<p>\u8bbe\u7f6eDolphinScheduler\u7684CPU\u548c\u5185\u5b58\u4f7f\u7528\u9608\u503c&#xff1a;\u5728\u914d\u7f6e\u6587\u4ef6\u4e2d&#xff0c;\u9ed8\u8ba4\u7684CPU\u548c\u5185\u5b58\u9608\u503c\u662f70%&#xff0c;\u4ee5\u4e3a\u7740\u5f53\u670d\u52a1\u5668\u7684CPU\u548c\u5185\u5b58\u5360\u7528\u8fbe\u5230\u4e8670%\u540e&#xff0c;DolphinScheduler\u5c31\u4e0d\u4f1a\u5728\u8fd9\u53f0\u670d\u52a1\u5668\u4e0a\u8c03\u5ea6\u4efb\u52a1\u4e86\u3002\u8fd9\u79cd\u65b9\u5f0f\u7684\u597d\u5904\u662f\u53ef\u4ee5\u4fdd\u8bc1\u670d\u52a1\u5668\u8d44\u6e90\u4e0d\u88ab\u6253\u6ee1&#xff0c;\u5f0a\u7aef\u662f\u5982\u679cMaster\u5bb9\u9519\u7684\u65e7\u4efb\u52a1\u6253\u6ee1\u4e86\u8d44\u6e90&#xff0c;\u90a3\u5c31\u4f1a\u5f71\u54cdDolphinScheduler\u6b63\u5e38\u72b6\u6001\u4e0b\u7684\u65b0\u4efb\u52a1\u4e86\u3002\u5e76\u4e14\u6709\u7684\u4efb\u52a1\u662f\u975e\u5e38\u5173\u952e\u7684\u4efb\u52a1&#xff0c;\u5fc5\u987b\u8981\u8dd1\u6210\u529f\u7684\u3002<\/p>\n<\/li>\n<li>\n<p>\u8bbe\u7f6eDolphinScheduler\u7684\u4efb\u52a1\u6570&#xff1a;\u5728\u914d\u7f6e\u6587\u4ef6\u4e2d&#xff0c;DolphinScheduler\u9ed8\u8ba4\u7684\u4efb\u52a1\u6570\u662f\u5355Worker100\u4e2a&#xff0c;\u5355Master\u662f1000\u4e2a\u3002\u800c\u5728\u73b0\u7f51\u4e2d&#xff0c;\u65e0\u6cd5\u5bf9\u4efb\u52a1\u6570\u53bb\u505a\u5230\u7cbe\u7ec6\u7684\u63a7\u5236&#xff0c;\u5e76\u4e14DolphinScheduler\u4e5f\u65e0\u6cd5\u505a\u5230\u81ea\u52a8\u8c03\u914d\u3002<\/p>\n<\/li>\n<li>\n<p>\u5728\u5b95\u673a\u540e\u91cd\u65b0\u542f\u52a8\u524d\u5220\u9664t_ds_command\u8868\u4e2d\u7684\u6570\u636e&#xff1a;\u7ecf\u8fc7\u9a8c\u8bc1&#xff0c;Master\u5728\u5b95\u673a\u540e\u662f\u4e0d\u4f1a\u5f80t_ds_command\u4e2d\u5199\u6570\u636e\u4e86\u3002\u5176\u4f1a\u5728\u91cd\u542f\u542f\u52a8\u540e&#xff0c;\u5c06\u6570\u636e\u5199\u5230t_ds_command\u540e\u6267\u884c&#xff0c;\u4f46\u5176\u4e2d\u7684\u65f6\u95f4\u5927\u6982\u5c311~2\u79d2\u949f&#xff0c;\u624b\u5de5\u65e0\u6cd5\u53bb\u6267\u884c\u5220\u9664\u3002<\/p>\n<\/li>\n<li>\n<p>\u4fee\u6539t_ds_process_instance\u4e2d\u7684\u6570\u636e&#xff1a;\u6839\u636e\u65f6\u95f4\u5468\u671f&#xff0c;\u4fee\u6539t_ds_process_instance\u4e2d\u6240\u6709\u8fd9\u4e2a\u8303\u56f4\u5185\u7684\u5de5\u4f5c\u6d41\u7684\u72b6\u6001&#xff0c;\u4eba\u5de5\u4f7f\u5176\u7ed3\u675f&#xff08;\u4f46\u5982\u679cDolphinScheduler\u548c\u5143\u6570\u636e\u5e93\u5728\u4e00\u53f0\u670d\u52a1\u5668\u4e0a&#xff0c;\u5bb9\u6613DolphinScheduler\u542f\u52a8\u540e\u91cc\u9762\u628a\u670d\u52a1\u5668\u8d44\u6e90\u6253\u6ee1&#xff0c;\u9020\u6210\u65e0\u6cd5\u64cd\u4f5c\u5143\u6570\u636e\u5e93\u4e86&#xff09;\u3002<\/p>\n<\/li>\n<\/ul>\n<p>\u4e0a\u9762\u7684\u89e3\u51b3\u65b9\u6848\u4e3b\u8981\u662f\u5206\u4e3a&#xff1a;<\/p>\n<ul>\n<li>\n<p>\u907f\u514d\u6216\u51cf\u5c11Master\u7684\u5b95\u673a&#xff1b;<\/p>\n<\/li>\n<li>\n<p>\u5728Master\u5b95\u673a\u540e&#xff0c;\u4e0d\u8981\u8fd0\u884cMisFire\u7684\u4efb\u52a1&#xff1b;<\/p>\n<\/li>\n<\/ul>\n<p>\u9996\u5148\u662f\u201c\u907f\u514d\u6216\u51cf\u5c11Master\u5b95\u673a\u201d&#xff0c;\u8fd9\u5728\u751f\u4ea7\u73af\u5883\u4e2d\u662f\u5f88\u96be\u505a\u5230\u7684&#xff0c;\u8ba1\u7b97\u673a\u7a0b\u5e8f\u7684\u5047\u8bbe\u5c31\u662f100%\u4f1a\u5728\u67d0\u4e00\u4e2a\u65f6\u523b\u4ea7\u751f\u67d0\u4e9b\u95ee\u9898&#xff0c;\u6240\u4ee5\u624d\u6709\u4e86\u5404\u79cd\u5fae\u670d\u52a1\u67b6\u6784\u3001\u9ad8\u53ef\u7528HA\u3001\u591a\u6d3b\u3001\u5bb9\u707e\u7b49\u7b49\u673a\u5236\u3002<\/p>\n<p>\u5176\u6b21\u662f\u201c\u4e0d\u8981\u8fd0\u884cMisFire\u7684\u4efb\u52a1\u201d&#xff0c;\u4f9d\u7167\u524d\u9762\u7684\u89e3\u51b3\u65b9\u6848&#xff0c;\u6ca1\u6709\u4e00\u4e2a\u65b9\u6848\u80fd\u89e3\u51b3\u8fd9\u4e2a\u95ee\u9898\u3002\u6240\u4ee5&#xff0c;\u6839\u636e\u4e4b\u524d\u7684\u6e90\u7801\u89e3\u6790&#xff0c;\u9700\u8981\u8003\u8651\u91c7\u7528\u6e90\u7801\u4fee\u6539&#043;\u91cd\u65b0\u7f16\u8bd1\u6253\u5305\u7684\u65b9\u5f0f\u8fdb\u884c\u89e3\u51b3\u3002<\/p>\n<h3 id=\"06-\u4fee\u6539\u6e90\u7801\">06 \u4fee\u6539\u6e90\u7801<\/h3>\n<p>\u5c06\u5173\u952e\u6e90\u7801\u4fee\u6539\u4e3a&#xff1a;<\/p>\n<p>            CronTrigger cronTrigger &#061; newTrigger()<br \/>\n                    .withIdentity(triggerKey)<br \/>\n                    .startAt(startDate)<br \/>\n                    .endAt(endDate)<br \/>\n                    .withSchedule(<br \/>\n                            cronSchedule(cronExpression)<br \/>\n                                    .withMisfireHandlingInstructionDoNothing()<br \/>\n\/\/                                    .withMisfireHandlingInstructionIgnoreMisfires()<br \/>\n                                    .inTimeZone(DateUtils.getTimezone(timezoneId)))<br \/>\n                    .forJob(jobDetail).build(); <\/p>\n<h3 id=\"07-\u5f00\u53d1\u73af\u5883\u9a8c\u8bc1\">07 \u5f00\u53d1\u73af\u5883\u9a8c\u8bc1<\/h3>\n<p>\u4f7f\u7528Java8\u8fdb\u884c\u3002<\/p>\n<p>\u66f4\u6539Master\u3001worker\u3001API\u4e0b\u7684application.yaml\u4e2d\u7684MySQL\u94fe\u63a5\u4fe1\u606f&#xff1a;<\/p>\n<p>spring:<br \/>\n  config:<br \/>\n    activate:<br \/>\n      on-profile: mysql<br \/>\n  datasource:<br \/>\n    driver-class-name: com.mysql.cj.jdbc.Driver<br \/>\n    url: jdbc:mysql:\/\/IP\u5730\u5740:3306\/dolphinscheduler?useUnicode&#061;true&amp;characterEncoding&#061;UTF-8&amp;useSSL&#061;false<br \/>\n    username: \u8d26\u53f7<br \/>\n    password: \u5bc6\u7801<br \/>\n  quartz:<br \/>\n    properties:<br \/>\n      org.quartz.jobStore.driverDelegateClass: org.quartz.impl.jdbcjobstore.StdJDBCDelegate <\/p>\n<p>\u66f4\u6539Master\u3001Worker\u3001API\u4e0b\u7684Zookeeper\u4fe1\u606f&#xff1a;<\/p>\n<p>registry:<br \/>\n  type: zookeeper<br \/>\n  zookeeper:<br \/>\n    namespace: dolphinscheduler_dev<br \/>\n    connect-string: IP\u5730\u5740:2181<br \/>\n    retry-policy:<br \/>\n      base-sleep-time: 60ms<br \/>\n      max-sleep: 300ms<br \/>\n      max-retries: 5<br \/>\n    session-timeout: 30s<br \/>\n    connection-timeout: 9s<br \/>\n    block-until-connected: 600ms<br \/>\n    digest: ~ <\/p>\n<p>\u66f4\u6539bom\u4e0b\u9762\u7684pom&#xff1a;<\/p>\n<p>            &lt;dependency&gt;<br \/>\n                &lt;groupId&gt;mysql&lt;\/groupId&gt;<br \/>\n                &lt;artifactId&gt;mysql-connector-java&lt;\/artifactId&gt;<br \/>\n                &lt;version&gt;${mysql-connector.version}&lt;\/version&gt;<br \/>\n&lt;!&#8211;                &lt;scope&gt;test&lt;\/scope&gt;&#8211;&gt;<br \/>\n            &lt;\/dependency&gt; <\/p>\n<p>\u66f4\u6539api\u3001master\u3001worker\u4e0b\u7684logback-spring.xml&#xff0c;\u5f00\u542f\u8fd0\u884c\u65e5\u5fd7&#xff1a;<\/p>\n<p>    &lt;root level&#061;&#034;INFO&#034;&gt;<br \/>\n&lt;!&#8211;        &lt;if condition&#061;&#034;${DOCKER:-false}&#034;&gt;&#8211;&gt;<br \/>\n&lt;!&#8211;            &lt;then&gt;&#8211;&gt;<br \/>\n&lt;!&#8211;                &lt;appender-ref ref&#061;&#034;STDOUT&#034;\/&gt;&#8211;&gt;<br \/>\n&lt;!&#8211;            &lt;\/then&gt;&#8211;&gt;<br \/>\n&lt;!&#8211;        &lt;\/if&gt;&#8211;&gt;<br \/>\n        &lt;appender-ref ref&#061;&#034;STDOUT&#034;\/&gt;<br \/>\n        &lt;appender-ref ref&#061;&#034;APILOGFILE&#034;\/&gt;<br \/>\n    &lt;\/root&gt;<\/p>\n<p>    &lt;root level&#061;&#034;INFO&#034;&gt;<br \/>\n&lt;!&#8211;        &lt;if condition&#061;&#034;${DOCKER:-false}&#034;&gt;&#8211;&gt;<br \/>\n&lt;!&#8211;            &lt;then&gt;&#8211;&gt;<br \/>\n&lt;!&#8211;                &lt;appender-ref ref&#061;&#034;STDOUT&#034;\/&gt;&#8211;&gt;<br \/>\n&lt;!&#8211;            &lt;\/then&gt;&#8211;&gt;<br \/>\n&lt;!&#8211;        &lt;\/if&gt;&#8211;&gt;<br \/>\n        &lt;appender-ref ref&#061;&#034;STDOUT&#034;\/&gt;<br \/>\n        &lt;appender-ref ref&#061;&#034;TASKLOGFILE&#034;\/&gt;<br \/>\n        &lt;appender-ref ref&#061;&#034;MASTERLOGFILE&#034;\/&gt;<br \/>\n    &lt;\/root&gt;<br \/>\n    &lt;root level&#061;&#034;INFO&#034;&gt;<br \/>\n&lt;!&#8211;        &lt;if condition&#061;&#034;${DOCKER:-false}&#034;&gt;&#8211;&gt;<br \/>\n&lt;!&#8211;            &lt;then&gt;&#8211;&gt;<br \/>\n&lt;!&#8211;                &lt;appender-ref ref&#061;&#034;STDOUT&#034;\/&gt;&#8211;&gt;<br \/>\n&lt;!&#8211;            &lt;\/then&gt;&#8211;&gt;<br \/>\n&lt;!&#8211;        &lt;\/if&gt;&#8211;&gt;<br \/>\n        &lt;appender-ref ref&#061;&#034;STDOUT&#034;\/&gt;<br \/>\n        &lt;appender-ref ref&#061;&#034;TASKLOGFILE&#034;\/&gt;<br \/>\n        &lt;appender-ref ref&#061;&#034;WORKERLOGFILE&#034;\/&gt;<br \/>\n    &lt;\/root&gt; <\/p>\n<p>\u542f\u52a8 Master\u3001Worker\u3001Api&#xff1a;<\/p>\n<ul>\n<li>\n<p>Master VM Options&#xff1a;-Dlogging.config&#061;classpath:logback-spring.xml -Ddruid.mysql.usePingMethod&#061;false -Dspring.profiles.active&#061;mysql<\/p>\n<\/li>\n<li>\n<p>Worker VM Options&#xff1a;-Dlogging.config&#061;classpath:logback-spring.xml -Ddruid.mysql.usePingMethod&#061;false -Dspring.profiles.active&#061;mysql<\/p>\n<\/li>\n<li>\n<p>Api VM Options&#xff1a;-Dlogging.config&#061;classpath:logback-spring.xml -Dspring.profiles.active&#061;api,mysql<\/p>\n<\/li>\n<\/ul>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418135753-68025a61d1c5d.webp\" alt=\"file\" \/><\/p>\n<p>\u5982\u679c\u62a5\u9519&#xff1a;<\/p>\n<p>Error running &#039;ApiApplicationServer&#039; Error running ApiApplicationServer. Command line is too long. Shorten the command line via JAR manifest or via a classpath file and rerun. \u5219\u52a0\u5165&#xff1a;<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418135754-68025a622b8cd.webp\" alt=\"file\" \/><\/p>\n<p>\u5982\u679c\u8fd8\u662f\u62a5\u9519\u7f3a\u5c11MySQL\u7684JDBC\u9a71\u52a8\u5305&#xff0c;\u5219\u5728Master\u3001Woker\u3001API\u7684Pom\u4e0b\u9762\u6dfb\u52a0&#xff1a;<\/p>\n<p>&lt;dependency&gt;<br \/>\n    &lt;groupId&gt;mysql&lt;\/groupId&gt;<br \/>\n    &lt;artifactId&gt;mysql-connector-java&lt;\/artifactId&gt;<br \/>\n    &lt;version&gt;8.0.33&lt;\/version&gt;<br \/>\n&lt;\/dependency&gt; <\/p>\n<h3 id=\"08-\u6574\u4f53\u7f16\u8bd1\u6253\u5305\">08 \u6574\u4f53\u7f16\u8bd1\u6253\u5305<\/h3>\n<p>\u9700\u8981\u6ce8\u610f&#xff0c;\u6b64\u65f6\u6253\u5305\u7684\u9879\u76ee&#xff0c;\u9700\u8981\u53ea\u662f\u7ecf\u8fc7\u4e86\u300a\u4fee\u6539\u6e90\u7801\u300b\u73af\u5883\u7684&#xff0c;\u4e0d\u662f\u8fdb\u884c\u4e86\u300a\u5f00\u53d1\u73af\u5883\u9a8c\u8bc1\u300b\u73af\u8282\u7684&#xff01;&#xff01;&#xff01;<\/p>\n<p>\u4f7f\u7528Java8\u8fdb\u884c\u3002<\/p>\n<p>\u5728\u9879\u76ee\u6839\u76ee\u5f55\u4e0b\u6267\u884c\u547d\u4ee4&#xff0c;\u6253\u5305\u65f6\u95f4\u8f83\u957f&#xff1a;<\/p>\n<p>mvn spotless:apply clean package -Dmaven.test.skip&#061;true -Prelease<\/p>\n<p>\u6253\u5305\u540e\u7684\u4e8c\u8fdb\u5236\u6587\u4ef6\u5728dolphinscheduler-dist\/target \u4e0b bin.tar.gz \u540e\u7f00\u6587\u4ef6\u3002<\/p>\n<p>\u4e4b\u540e\u5c31\u53ef\u4ee5\u5c1d\u8bd5\u91cd\u65b0\u90e8\u7f72&#xff0c;\u9a8c\u8bc1\u662f\u5426\u89e3\u51b3\u4e0a\u9762\u7684\u95ee\u9898\u4e86\u3002<\/p>\n<h3 id=\"09-\u53ea\u7f16\u8bd1\u5355\u4e2a\u6a21\u5757\">09 \u53ea\u7f16\u8bd1\u5355\u4e2a\u6a21\u5757<\/h3>\n<p>\u53bb\u5230dolphinscheduler-scheduler-quartz\u6839\u76ee\u5f55\u4e0b&#xff0c;\u6267\u884c&#xff1a;<\/p>\n<p>mvn spotless:apply clean package -Dmaven.test.skip&#061;true -Prelease<\/p>\n<p>\u6253\u5305\u540e\u7684\u6587\u4ef6\u5728dolphinscheduler-scheduler-quartz\/target\u76ee\u5f55\u4e0b&#xff1a;<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418135754-68025a6297bd3.webp\" alt=\"file\" \/><\/p>\n<p>\u5c06\u5176\u5728\u670d\u52a1\u5668\u4e0a\u8fdb\u884c\u66ff\u6362&#xff1a;<\/p>\n<p>su dolphinscheduler &#8211;<\/p>\n<p>mv \/opt\/module\/dolphinscheduler-3.2.1\/master-server\/libs\/dolphinscheduler-scheduler-quartz-3.2.1.jar \/opt\/module\/dolphinscheduler-3.2.1\/master-server\/libs\/dolphinscheduler-scheduler-quartz-3.2.1.jar.bak<br \/>\nmv \/opt\/module\/dolphinscheduler-3.2.1\/api-server\/libs\/dolphinscheduler-scheduler-quartz-3.2.1.jar \/opt\/module\/dolphinscheduler-3.2.1\/api-server\/libs\/dolphinscheduler-scheduler-quartz-3.2.1.jar.bak<\/p>\n<p>cp dolphinscheduler-scheduler-quartz-3.2.1.jar \/opt\/module\/dolphinscheduler-3.2.1\/master-server\/libs\/dolphinscheduler-scheduler-quartz-3.2.1.jar<br \/>\ncp dolphinscheduler-scheduler-quartz-3.2.1.jar \/opt\/module\/dolphinscheduler-3.2.1\/api-server\/libs\/dolphinscheduler-scheduler-quartz-3.2.1.jar<\/p>\n<p>chown -R dolphinscheduler:dolphinscheduler \/opt\/module\/dolphinscheduler-3.2.1\/ <\/p>\n<p>\u4e4b\u540e\u5c31\u53ef\u4ee5\u5c1d\u8bd5\u91cd\u542fDolphinScheduler&#xff0c;\u9a8c\u8bc1\u662f\u5426\u89e3\u51b3\u4e0a\u9762\u7684\u95ee\u9898\u4e86\u3002<\/p>\n<h3 id=\"10-\u95ee\u9898\u89e3\u51b3\">10 \u95ee\u9898\u89e3\u51b3<\/h3>\n<p>\u518d\u6b21\u8fdb\u884c\u95ee\u9898\u590d\u73b0&#xff0c;\u53d1\u73b0\u95ee\u9898\u5df2\u7ecf\u88ab\u89e3\u51b3\u4e86&#xff1a;<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418135754-68025a62e8b0f.webp\" alt=\"file\" \/> <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418135755-68025a633b04c.webp\" alt=\"file\" \/><\/p>\n<p>\u81f3\u6b64&#xff0c;\u672c\u6b21\u95ee\u9898\u6392\u67e5\u53ca\u4fee\u590d\u5b8c\u6210\u3002<\/p>\n<p>\u672c\u6587\u7531 \u767d\u9cb8\u5f00\u6e90\u79d1\u6280 \u63d0\u4f9b\u53d1\u5e03\u652f\u6301&#xff01;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb1.1k\u6b21\uff0c\u70b9\u8d5e3\u6b21\uff0c\u6536\u85cf8\u6b21\u3002\u4fee\u6539t_ds_process_instance\u4e2d\u7684\u6570\u636e\uff1a\u6839\u636e\u65f6\u95f4\u5468\u671f\uff0c\u4fee\u6539t_ds_process_instance\u4e2d\u6240\u6709\u8fd9\u4e2a\u8303\u56f4\u5185\u7684\u5de5\u4f5c\u6d41\u7684\u72b6\u6001\uff0c\u4eba\u5de5\u4f7f\u5176\u7ed3\u675f\uff08\u4f46\u5982\u679cDolphinScheduler\u548c\u5143\u6570\u636e\u5e93\u5728\u4e00\u53f0\u670d\u52a1\u5668\u4e0a\uff0c\u5bb9\u6613DolphinScheduler\u542f\u52a8\u540e\u91cc\u9762\u628a\u670d\u52a1\u5668\u8d44\u6e90\u6253\u6ee1\uff0c\u9020\u6210\u65e0\u6cd5\u64cd\u4f5c\u5143\u6570\u636e\u5e93\u4e86\uff09\u3002\u9996\u5148\u53d1\u73b0\u91cd\u542f\u6062\u590d\u540e\uff0cWeb\u9875\u9762\u4e0a\u7684\u201c\u8fd0\u884c\u7c7b\u578b\u201d\u662f\u201c\u8c03\u5ea6\u6267\u884c\u201d\uff0c\u800c\u6570\u636e\u5e93\u7684\u201ccommand_type\u201d\u662f\u201c6\u201d\uff0c\u90a3\u5c31\u610f\u5473\u7740\u5fc5\u987b\u6709\u4e00\u4e2a\u670d\u52a1\u4f1a\u6709\u5f80\u6570\u636e\u5e93\u91cc\u9762\u53bb\u63d2\u5165command_type\u4e3a6\u7684\u65b9\u6cd5\u3002_dolphinscheduler run dev\u540e\u7a7a\u767d<\/p>\n","protected":false},"author":2,"featured_media":15444,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[323],"topic":[],"class_list":["post-15462","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-server","tag-323"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>DolphinScheduler\u81ea\u8eab\u5bb9\u9519\u5bfc\u81f4\u7684\u670d\u52a1\u5668\u6301\u7eed\u5d29\u6e83\u91cd\u5927\u95ee\u9898\u7684\u6392\u67e5\u4e0e\u89e3\u51b3 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/15462.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"DolphinScheduler\u81ea\u8eab\u5bb9\u9519\u5bfc\u81f4\u7684\u670d\u52a1\u5668\u6301\u7eed\u5d29\u6e83\u91cd\u5927\u95ee\u9898\u7684\u6392\u67e5\u4e0e\u89e3\u51b3 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb1.1k\u6b21\uff0c\u70b9\u8d5e3\u6b21\uff0c\u6536\u85cf8\u6b21\u3002\u4fee\u6539t_ds_process_instance\u4e2d\u7684\u6570\u636e\uff1a\u6839\u636e\u65f6\u95f4\u5468\u671f\uff0c\u4fee\u6539t_ds_process_instance\u4e2d\u6240\u6709\u8fd9\u4e2a\u8303\u56f4\u5185\u7684\u5de5\u4f5c\u6d41\u7684\u72b6\u6001\uff0c\u4eba\u5de5\u4f7f\u5176\u7ed3\u675f\uff08\u4f46\u5982\u679cDolphinScheduler\u548c\u5143\u6570\u636e\u5e93\u5728\u4e00\u53f0\u670d\u52a1\u5668\u4e0a\uff0c\u5bb9\u6613DolphinScheduler\u542f\u52a8\u540e\u91cc\u9762\u628a\u670d\u52a1\u5668\u8d44\u6e90\u6253\u6ee1\uff0c\u9020\u6210\u65e0\u6cd5\u64cd\u4f5c\u5143\u6570\u636e\u5e93\u4e86\uff09\u3002\u9996\u5148\u53d1\u73b0\u91cd\u542f\u6062\u590d\u540e\uff0cWeb\u9875\u9762\u4e0a\u7684\u201c\u8fd0\u884c\u7c7b\u578b\u201d\u662f\u201c\u8c03\u5ea6\u6267\u884c\u201d\uff0c\u800c\u6570\u636e\u5e93\u7684\u201ccommand_type\u201d\u662f\u201c6\u201d\uff0c\u90a3\u5c31\u610f\u5473\u7740\u5fc5\u987b\u6709\u4e00\u4e2a\u670d\u52a1\u4f1a\u6709\u5f80\u6570\u636e\u5e93\u91cc\u9762\u53bb\u63d2\u5165command_type\u4e3a6\u7684\u65b9\u6cd5\u3002_dolphinscheduler run dev\u540e\u7a7a\u767d\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/15462.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2025-04-18T13:57:56+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418135749-68025a5d80aba.webp\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"12 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/15462.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/15462.html\",\"name\":\"DolphinScheduler\u81ea\u8eab\u5bb9\u9519\u5bfc\u81f4\u7684\u670d\u52a1\u5668\u6301\u7eed\u5d29\u6e83\u91cd\u5927\u95ee\u9898\u7684\u6392\u67e5\u4e0e\u89e3\u51b3 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2025-04-18T13:57:56+00:00\",\"dateModified\":\"2025-04-18T13:57:56+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/15462.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/15462.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/15462.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"DolphinScheduler\u81ea\u8eab\u5bb9\u9519\u5bfc\u81f4\u7684\u670d\u52a1\u5668\u6301\u7eed\u5d29\u6e83\u91cd\u5927\u95ee\u9898\u7684\u6392\u67e5\u4e0e\u89e3\u51b3\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"DolphinScheduler\u81ea\u8eab\u5bb9\u9519\u5bfc\u81f4\u7684\u670d\u52a1\u5668\u6301\u7eed\u5d29\u6e83\u91cd\u5927\u95ee\u9898\u7684\u6392\u67e5\u4e0e\u89e3\u51b3 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/15462.html","og_locale":"zh_CN","og_type":"article","og_title":"DolphinScheduler\u81ea\u8eab\u5bb9\u9519\u5bfc\u81f4\u7684\u670d\u52a1\u5668\u6301\u7eed\u5d29\u6e83\u91cd\u5927\u95ee\u9898\u7684\u6392\u67e5\u4e0e\u89e3\u51b3 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb1.1k\u6b21\uff0c\u70b9\u8d5e3\u6b21\uff0c\u6536\u85cf8\u6b21\u3002\u4fee\u6539t_ds_process_instance\u4e2d\u7684\u6570\u636e\uff1a\u6839\u636e\u65f6\u95f4\u5468\u671f\uff0c\u4fee\u6539t_ds_process_instance\u4e2d\u6240\u6709\u8fd9\u4e2a\u8303\u56f4\u5185\u7684\u5de5\u4f5c\u6d41\u7684\u72b6\u6001\uff0c\u4eba\u5de5\u4f7f\u5176\u7ed3\u675f\uff08\u4f46\u5982\u679cDolphinScheduler\u548c\u5143\u6570\u636e\u5e93\u5728\u4e00\u53f0\u670d\u52a1\u5668\u4e0a\uff0c\u5bb9\u6613DolphinScheduler\u542f\u52a8\u540e\u91cc\u9762\u628a\u670d\u52a1\u5668\u8d44\u6e90\u6253\u6ee1\uff0c\u9020\u6210\u65e0\u6cd5\u64cd\u4f5c\u5143\u6570\u636e\u5e93\u4e86\uff09\u3002\u9996\u5148\u53d1\u73b0\u91cd\u542f\u6062\u590d\u540e\uff0cWeb\u9875\u9762\u4e0a\u7684\u201c\u8fd0\u884c\u7c7b\u578b\u201d\u662f\u201c\u8c03\u5ea6\u6267\u884c\u201d\uff0c\u800c\u6570\u636e\u5e93\u7684\u201ccommand_type\u201d\u662f\u201c6\u201d\uff0c\u90a3\u5c31\u610f\u5473\u7740\u5fc5\u987b\u6709\u4e00\u4e2a\u670d\u52a1\u4f1a\u6709\u5f80\u6570\u636e\u5e93\u91cc\u9762\u53bb\u63d2\u5165command_type\u4e3a6\u7684\u65b9\u6cd5\u3002_dolphinscheduler run dev\u540e\u7a7a\u767d","og_url":"https:\/\/www.wsisp.com\/helps\/15462.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2025-04-18T13:57:56+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418135749-68025a5d80aba.webp"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"12 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/15462.html","url":"https:\/\/www.wsisp.com\/helps\/15462.html","name":"DolphinScheduler\u81ea\u8eab\u5bb9\u9519\u5bfc\u81f4\u7684\u670d\u52a1\u5668\u6301\u7eed\u5d29\u6e83\u91cd\u5927\u95ee\u9898\u7684\u6392\u67e5\u4e0e\u89e3\u51b3 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2025-04-18T13:57:56+00:00","dateModified":"2025-04-18T13:57:56+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/15462.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/15462.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/15462.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"DolphinScheduler\u81ea\u8eab\u5bb9\u9519\u5bfc\u81f4\u7684\u670d\u52a1\u5668\u6301\u7eed\u5d29\u6e83\u91cd\u5927\u95ee\u9898\u7684\u6392\u67e5\u4e0e\u89e3\u51b3"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/15462","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=15462"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/15462\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/15444"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=15462"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=15462"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=15462"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=15462"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}