0
我試圖運行調用EL函數replaceAll()的Oozie工作流。這是一個使用的replaceAll()的作用是這樣的Oozie EL函數:嘗試將String轉換爲類型「java.lang.Double」的異常
<action name="createSuccess">
<fs>
<configuration>
<property>
<name>runDate</name>
<value>${replaceAll(hdfsDir, nameNode + '/(.+)/' + region + '/([0-9\\-]+)/?', '$2')}</value>
</property>
</configuration>
<mkdir path="${nameNode}/path/run/${region}/${runDate}"/>
<touchz path="${nameNode}/path/run/${region}/${runDate}/success.txt"/>
</fs>
<ok to="end"/>
<error to="sendEmailKill"/>
</action>
hdfsDir是一樣的東西HDFS://的NameNode:8020 /一些/路徑/區域/ 2015年4月22日,我需要抓住該日期的結束作爲財產並使用它。
但是當我運行上面的動作,我得到這個異常:
javax.servlet.jsp.el.ELException: An exception occured trying to convert String "hdfs://nameNode:8020" to type "java.lang.Double"
at org.apache.commons.el.Logger.logError(Logger.java:481)
at org.apache.commons.el.Logger.logError(Logger.java:498)
at org.apache.commons.el.Logger.logError(Logger.java:566)
at org.apache.commons.el.Coercions.coerceToPrimitiveNumber(Coercions.java:440)
at org.apache.commons.el.Coercions.applyArithmeticOperator(Coercions.java:852)
at org.apache.commons.el.ArithmeticOperator.apply(ArithmeticOperator.java:83)
at org.apache.commons.el.BinaryOperatorExpression.evaluate(BinaryOperatorExpression.java:170)
at org.apache.commons.el.FunctionInvocation.evaluate(FunctionInvocation.java:163)
at org.apache.commons.el.ExpressionString.evaluate(ExpressionString.java:114)
at org.apache.commons.el.ExpressionEvaluatorImpl.evaluate(ExpressionEvaluatorImpl.java:274)
at org.apache.commons.el.ExpressionEvaluatorImpl.evaluate(ExpressionEvaluatorImpl.java:190)
at org.apache.oozie.util.ELEvaluator.evaluate(ELEvaluator.java:203)
at org.apache.oozie.command.wf.ActionStartXCommand.execute(ActionStartXCommand.java:175)
at org.apache.oozie.command.wf.ActionStartXCommand.execute(ActionStartXCommand.java:60)
at org.apache.oozie.command.XCommand.call(XCommand.java:280)
at org.apache.oozie.service.CallableQueueService$CompositeCallable.call(CallableQueueService.java:326)
at org.apache.oozie.service.CallableQueueService$CompositeCallable.call(CallableQueueService.java:255)
at org.apache.oozie.service.CallableQueueService$CallableWrapper.run(CallableQueueService.java:175)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:744)
任何想法,爲什麼我得到這個例外,如何解決呢?