Oozie EL function: An exception occured trying to convert String to type "java.lang.Double" -
i trying run oozie workflow calls el function replaceall(). action that's using replaceall() this
<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/some/path/region/2015-04-22 , need grab date @ end property , use it.
but when run above action, got exception:
javax.servlet.jsp.el.elexception: exception occured trying convert string "hdfs://namenode:8020" type "java.lang.double" @ org.apache.commons.el.logger.logerror(logger.java:481) @ org.apache.commons.el.logger.logerror(logger.java:498) @ org.apache.commons.el.logger.logerror(logger.java:566) @ org.apache.commons.el.coercions.coercetoprimitivenumber(coercions.java:440) @ org.apache.commons.el.coercions.applyarithmeticoperator(coercions.java:852) @ org.apache.commons.el.arithmeticoperator.apply(arithmeticoperator.java:83) @ org.apache.commons.el.binaryoperatorexpression.evaluate(binaryoperatorexpression.java:170) @ org.apache.commons.el.functioninvocation.evaluate(functioninvocation.java:163) @ 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:203) @ org.apache.oozie.command.wf.actionstartxcommand.execute(actionstartxcommand.java:175) @ org.apache.oozie.command.wf.actionstartxcommand.execute(actionstartxcommand.java:60) @ org.apache.oozie.command.xcommand.call(xcommand.java:280) @ org.apache.oozie.service.callablequeueservice$compositecallable.call(callablequeueservice.java:326) @ org.apache.oozie.service.callablequeueservice$compositecallable.call(callablequeueservice.java:255) @ 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:744)
any ideas why i'm getting exception , how fix it?
after trial error, figured out can not use "+" concatenate 2 strings. have use this:
${replaceall(hdfsdumpdir, concat(concat(concat(namenode, '/(.+)/'), region), '/'), '')}
Comments
Post a Comment