passing variable to oozie case section doesnt work

335 views Asked by At

I have a oozie action which has below node.

working Node::

 <decision name="CheckFilesSize">
        <switch>
            <case to="MoveStageToInbound">
              ${ fs:dirSize(&#39;s3://hadoopdev/data/processor_controller/outbound/raw_events&#39;) gt 1 * KB}
            </case>
            <case to="DoNothing">
            </case>
            <default to="end"/>
        </switch>
    </decision>

when i Try to parameterize the path used with vraiable value from job.properties it doesnt work.

<decision name="CheckFilesSize">
        <switch>
            <case to="MoveStageToInbound">
              ${ fs:dirSize(&#39;${bucket_name}/data/processor_controller/outbound/raw_events&#39;) gt 1 * KB}
            </case>
            <case to="DoNothing">
            </case>
            <default to="end"/>
        </switch>
    </decision>

I get below error.

EL_ERROR Illegal character in path at index 0: {bucket_name}/data/processor_controller/outbound/raw_events

1

There are 1 answers

0
santosh On

Try using like this -

 ${ fs:dirSize(&#39;$bucket_name/data/stbh/inbound/xml_element_orphans&#39;) gt 1 * KB}