Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8908953
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T03:18:53+00:00 2026-06-15T03:18:53+00:00

I have a hadoop map-reduce job running as a step in Oozie workflow. It

  • 0

I have a hadoop map-reduce job running as a step in Oozie workflow.
It is started using java action which implements org.apache.hadoop.util.Tool.

When the job is being killed for some reason I want to be able to email a notification which should contain the stacktrace if there was an exception during processing.

Currently I do it this way:

<action name="sendErrorNotifications">
    <email xmlns="uri:oozie:email-action:0.1">
        <to>some-dl@company.com</to>
        <subject>Job execution failed ${wf:id()}</subject>
        <body>Job execution failed, error message: [${wf:errorMessage(wf:lastErrorNode())}]</body>
    </email>
    <ok to="fail" />
    <error to="fail" />
</action>

But all I receive is just:

Job execution failed, error message: [Job failed!]

Which is not very useful 🙂 and I need to go and check all the nodes’ logs by myself.

How can I get more specific messages? Should I catch my exceptions and wrap into some oozie-catchable one in the Tool, or just use something instead of ${wf:errorMessage…

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T03:18:55+00:00Added an answer on June 15, 2026 at 3:18 am

    I found a way to handle errors and access the cause by using Counters. Maybe it is not what they are designed for, but it seems to be the only way out…

    So I catch every Throwable in mapper and reducer like this:

    } catch (Throwable t) {
        Counters.Counter counter = reporter.getCounter("Exceptions", t.getClass().getSimpleName());
            counter.increment(1);
        counter.setDisplayName(t.getClass().getSimpleName() + "\n last failed key: " + key.toString() + "\n " + ExceptionUtils.getStackTrace(t));
        reporter.incrCounter("Exceptions", "TOTAL_COUNT", 1);
        reporter.progress();
    }
    

    And these counters are easily accessible in the Tool via RunningJob after job is finished. “Exceptions” group contains all exceptions’ counters with all needed information in displayName field.

    Please comment if you see any problems in this approach or if you know the better one.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a sequential file which is the output of hadoop map-reduce job. In
I'm working on a Hadoop streaming workflow for Amazon Elastic Map Reduce and it
I have a series map-reduce jobs to process user data (implemented using the Cascading
I'm altering a hadoop map - reduce job that currently compiles and runs fine
I have a 32 core system. When I run a MapReduce job using Hadoop
Is there a distance calculation implementation using hadoop map/reduce. I am trying to calculate
I have an hadoop job with a pretty long map phase and I want
In Hadoop, I can easily create Map/Reduce apps which access and process data in
I have setup hadoop on top of mongodb using hadoop-mongodb driver. Currently I can
All Hadoop jobs have unique jobid. You can use jobid to get job status

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.