incubator-oozie-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ken Ernst <ker...@mobileposse.com>
Subject Oozie decision action - Switch / Case predicate
Date Sat, 22 Oct 2011 13:05:36 GMT
Hello,
I want to parameterize the right had side of the predicate in a case statement but it does
not seem to work. It always returns false. Does anyone know of why this would not work? For
example I have the following decision control node where the the right hand side of the case
predicate is 12, however I would like to make this a job property (I.e. fileThresholdCount).

This works (returns true when the output of my java action 'dir.numberOfFiles' is greater
than 12).
-----------------------------------------------------------
  <decision name="check-return">
    <switch>
      <case to="hive-consolidate-dir">${wf:actionData('hfsNumFiles')['dir.numberOfFiles']
ge 12}</case>
      <default to="end"/>
    </switch>
  </decision>
-----------------------------------------------------------

These do not seem to work, always returns false.

-----------------------------------------------------------
 <decision name="check-return">
    <switch>
      <case to="hive-consolidate-dir">${wf:actionData('hfsNumFiles')['dir.numberOfFiles']
ge wf:conf('fileThresholdCount')}</case>
      <default to="end"/>
    </switch>
  </decision>

 <decision name="check-return">
    <switch>
      <case to="hive-consolidate-dir">${wf:actionData('hfsNumFiles')['dir.numberOfFiles']
ge  fileThresholdCount}</case>
      <default to="end"/>
    </switch>
  </decision>
-----------------------------------------------------------

Thanks!

Ken Ernst



Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message