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 8598291
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T01:07:06+00:00 2026-06-12T01:07:06+00:00

I want to add something to the hadoop counters from outside a mappper. So,

  • 0

I want to add something to the hadoop counters from outside a mappper.
So, I want to access the getCounter on context object like this:

context.getCounter(counter, key).increment(amount)

I’m not able to get the context object from where I start the job. I can only do

job.getCounters().findCounter()

which doesn’t let me add something to the hadoop counters.

  • 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-12T01:07:07+00:00Added an answer on June 12, 2026 at 1:07 am

    You can only use/write to the counters from within the mapper/reducer tasks. The job tracker has built in capabilities to interactz with the counters and you don’t really want to interfere with what is already a complex setup.

    I had exactly this issue a few months ago, trying to use the counters to store interim information, but I decided to write the informtion I needed to a defined hdfs directory and read that once my job was complete.

    EDIT: why and whatdo you want to use the counter for outside of the mapper?

    EDIT #2: if you want stats from a finished job, then counters are not the right place for that, as a) they don’t seem to bewritable once the job tracker is done collecting data and b) they are intended to be used for aggregating metrics across tasks. I had a similar need recently and endedup doing my stats sums in the job set-up class (on my edge node) and then writing the data to the logs.

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

Sidebar

Related Questions

I want to dynamically add links to my pages something like this: foreach (Node
I want to add something like this in my application(Google Map) when i tap
I want to add something like this to my page header, in order to
I want to achieve something like the following: UrlBuilder ub = new UrlBuilder(http://www.google.com/search); ub.Parameters.Add(q,request);
I am new to ExtJS and I want to add something like a favorite
I want add new Feed item on entity persist and update. I write this
I want add my custom sidebar next right column all page. Please check this
I have problem, when I want add Node to my GUI from other Thread.
I have numbers in javascript from 01(int) to 09(int) and I want add 1(int)
I'm looking Jquery UI's modal form demo . But i want to add something.

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.