配置批处理job,同时启动两个并行任务processData,syncTableTask,执行往后执行第三个任务job:playDurationTask。
xml配置如下:
<job id="statTask" xmlns="http://xmlns.jcp.org/xml/ns/javaee" version="1.0"> <properties> <property name="targetDate" value="20001010" /> <property name="bitcoinFile" value="bitcoins.txt" /> </properties> <split id="split1" next="processDatabase"> <flow id="flow1"> <step id="processData"> <batchlet ref="playProcessLogTask"> <properties> <property name="firstItem" value="#{partitionPlan[‘firstItem‘]}" /> <property name="numItems" value="#{partitionPlan[‘numItems‘]}" /> </properties> </batchlet> <partition> <mapper ref="playProcessLogMapper" /> </partition> </step> </flow> <flow id="flow2"> <step id="syncTableTask"> <batchlet ref="syncTableTask"> </batchlet> </step> </flow> </split> <step id="processDatabase"> <batchlet ref="playDurationTask"> </batchlet> </step> </job>