Skip to content

修改MapReduce任务

MapReduce可修改参数

参数名参数类型参数值参数规则备注
jobIdLong任务ID
jobNameString任务名称
shardNumIntergerReduce分片数
argsStrString执行任务参数封装了对应新增的方法,通过k,v的形式新增
executorInfoString执行器名称
triggerTypeInteger触发类型2. 固定时间 3.CRON 表达式 99.工作流
triggerIntervalString间隔时长
blockStrategyInteger阻塞策略1、丢弃 2、覆盖 3、并行
executorTimeoutInteger任务执行超时时间单位:秒
maxRetryTimesInteger最大重试次数
retryIntervalInteger重试间隔单位:秒
parallelNumInteger并行数
descriptionString描述

MapReduce修改demo

java
/**
* 修改MapReduce任务
*/
public Boolean updateMapReduceJob(Long jobId) {
    return SnailJobOpenApi.updateMapReduceJob(jobId)
            .addArgsStr("update测试数据", new Random().nextInt(1000))
            .execute();
}