Hi,

Is it possible to get the values from hadoop counters that are in
map-reduce actions of subworkflows? I have oozie 4.0.
For example:

<?xml version="1.0" encoding="UTF-8"?>
<workflow-app xmlns="uri:oozie:workflow:0.4" name="some-workflow">

    <!-- declare job tracker and namenode settings once -->
    <global>
  <job-tracker>${jobtracker}</job-tracker>
  <name-node>${namenode}</name-node>
    </global>

<start to="sub1"/>


<!-- this sub workflow contains a map-reduce action named mr1 -->
<action name="sub1">
  <sub-workflow>
    <app-path>${namenode}${base_oozie_dir}/sub1.xml</app-path>
    <propagate-configuration/>
  </sub-workflow>
  <ok to="sub2"/>
  <error to="kill"/>
</action>

<!-- this sub workflow contains a map-reduce action named mr2 -->


<action name="sub2">
  <sub-workflow>
    <app-path>${namenode}${base_oozie_dir}/sub2.xml</app-path>
    <propagate-configuration/>
  </sub-workflow>
  <ok to="success"/>
  <error to="kill"/>
</action>

<action name="success">
  <email xmlns="uri:oozie:email-action:0.1">
    <to>${email_alert_to_list}</to>
    <subject>Oozie workflow Succeeded</subject>
    <body>
${hadoop:counters('mr1')['RECORDS']['REDUCE_OUT']}
${hadoop:counters('mr2')['RECORDS']['REDUCE_OUT']}

    </body>
  </email>
  <ok to="end"/>
  <error to="end"/>
</action>




When I try something like this, it fails saying it cannot find the value
of the counter. If I put that email action in each sub workflow, it works
(obviously, I don't want to do this).

Thanks!
--
Frank Maritato


Reply via email to