我正在做一个概念证明,我需要捕获我正在运行的clojure jar的输出,以供以后在工作流中使用。我正在设置捕获输出标志,并将oozie.action.output.properties传递给clojure jar以写入输出,该输出被格式化为属性文件。我的问题是我的环境中似乎未设置属性oozie.action.output.properties。我可以在色相GUI或oozie配置文件中设置此设置吗,还是必须在OS上进行设置?
这是错误
018-12-04 04:35:10,096警告ActionStartXCommand:523-服务器[quickstart.cloudera]用户[cloudera]组[-]令牌[] APP [Call_clojure]作业[0000000-181204041705135-oozie-oozi-W ] ACTION [0000000-181204041705135-oozie-oozi-W @ java-1adf] ActionStartXCommand中的ELException javax.servlet.jsp.el.ELException:无法解析变量[oozie] 在org.apache.oozie.util.ELEvaluator $ Context.resolveVariable(ELEvaluator.java:107) 在org.apache.commons.el.NamedValue.evaluate(NamedValue.java:124) 在org.apache.commons.el.ComplexValue.evaluate(ComplexValue.java:140) 在org.apache.commons.el.ExpressionString.evaluate(ExpressionString.java:114) 在org.apache.commons.el.ExpressionEvaluatorImpl.evaluate(ExpressionEvaluatorImpl.java:274) 在org.apache.commons.el.ExpressionEvaluatorImpl.evaluate(ExpressionEvaluatorImpl.java:190) 在org.apache.oozie.util.ELEvaluator.evaluate(ELEvaluator.java:204) 在org.apache.oozie.command.wf.ActionStartXCommand.execute(ActionStartXCommand.java:195) 在org.apache.oozie.command.wf.ActionStartXCommand.execute(ActionStartXCommand.java:64) 在org.apache.oozie.command.XCommand.call(XCommand.java:286) 在org.apache.oozie.service.CallableQueueService $ CompositeCallable.call(CallableQueueService.java:321) 在org.apache.oozie.service.CallableQueueService $ CompositeCallable.call(CallableQueueService.java:250) 在org.apache.oozie.service.CallableQueueService $ CallableWrapper.run(CallableQueueService.java:175) 在java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) 在java.util.concurrent.ThreadPoolExecutor $ Worker.run(ThreadPoolExecutor.java:615) 在java.lang.Thread.run(Thread.java:745)
这是工作流程
<workflow-app name="Call_clojure" xmlns="uri:oozie:workflow:0.5">
<start to="java-1adf"/>
<kill name="Kill">
<message>Action failed, error message[${wf:errorMessage(wf:lastErrorNode())}]</message>
</kill>
<action name="java-1adf">
<java>
<job-tracker>${jobTracker}</job-tracker>
<name-node>${nameNode}</name-node>
<main-class>test.core</main-class>
<arg>true</arg>
<arg>${oozie.action.output.properties}</arg>
<capture-output/>
</java>
<ok to="decision-ee8f"/>
<error to="Kill"/>
</action>
<action name="shell-8e75">
<shell xmlns="uri:oozie:shell-action:0.1">
<job-tracker>${jobTracker}</job-tracker>
<name-node>${nameNode}</name-node>
<exec>testscript.sh</exec>
<capture-output/>
</shell>
<ok to="End"/>
<error to="Kill"/>
</action>
<decision name="decision-ee8f">
<switch>
<case to="shell-8e75">
${${value} == 'true'}
</case>
<default to="End"/>
</switch>
</decision>
<end name="End"/>
最后是简单的clojure测试代码
(ns prop.core
(:gen-class))
(defn -main “我还没有做很多……”。 [值路径和参数] (吐出路径(str“值:”值)))
谢谢