feat(sj_1.1.0-beta2): 校验非Map或者MapReduce任务, 使用AbstractMapExecutor异常问题

This commit is contained in:
opensnail 2024-06-25 18:24:31 +08:00
parent 1175e15be3
commit 2d3ada1634

View File

@ -35,8 +35,11 @@ public abstract class AbstractMapExecutor extends AbstractJobExecutor implements
@Override
protected ExecuteResult doJobExecute(final JobArgs jobArgs) {
MapArgs mapArgs = (MapArgs) jobArgs;
return this.doJobMapExecute(mapArgs);
if (jobArgs instanceof MapArgs) {
return this.doJobMapExecute((MapArgs) jobArgs);
}
throw new SnailJobMapReduceException("For tasks that are not of type map or map reduce, please do not use the AbstractMapExecutor class.");
}
public abstract ExecuteResult doJobMapExecute(MapArgs mapArgs);