重要的话说在前面——无论找了多少篇别人的教程,自己一定要按官方文档一步一步做!
放上oozie该小节官方文档: http://oozie.apache.org/docs/5.0.0/DG_CustomActionExecutor.html
本文自定义的是Synchronous Node
-
oozie的自定义action用java编写,maven的依赖如下
<dependency> <groupId>org.apache.oozie</groupId> <artifactId>oozie-core</artifactId> <version>5.0.0</version> <scope>provided</scope> </dependency>
-
类要继承ActionExecutor,并override所需的方法,其中以下几个方法是必须要实现的
public class TestActionExecutor extends ActionExecutor { public static final String NODENAME = "testaction"; private static final String SUCCEEDED = "OK"; private static final String FAILED = "FAIL"; pr