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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T10:52:50+00:00 2026-06-18T10:52:50+00:00

How can I display intermediate values (i.e print a variable or a list )

  • 0

How can I display intermediate values (i.e print a variable or a list ) on the terminal while running the mapreduce program using python MRJob library?

  • 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-18T10:52:51+00:00Added an answer on June 18, 2026 at 10:52 am

    You can output the results to standard error using sys.stderr.write(). Here is an example:

    from mrjob.job import MRJob
    import sys
    class MRWordCounter(MRJob):
        def mapper(self, key, line):
            sys.stderr.write("MAPPER INPUT: ({0},{1})\n".format(key,line))
            for word in line.split():
                yield word, 1
    
        def reducer(self, word, occurrences):
            occurencesList= list(occurrences)
            sys.stderr.write("REDUCER INPUT: ({0},{1})\n".format(word,occurencesList))
            yield word, sum(occurencesList)
    
    if __name__ == '__main__':
        MRWordCounter.run()
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I know I can display an ArrayList by using for(i=0;i<data.list.length;i++){ html += data.list[i] +<br
I can display errors for specific fields using this tag: <s:fielderror fieldName=myField /> But
I can display a list of all customers and I can display a list
I can display a texture using shaders, glVertexAttribPointer and glDrawArrays like so: Init const
I can display a test ad using admob and sencha touch. But when test:false,
How I can display a message for a few seconds without using Toast on
How I can display timer in titlebar of a webpage using javascript or any
I'm aware that you can display the options menu by using openOptionsMenu() method, but
I can display a simple Visual Basic inputbox from a PowerShell script like this:
How i can display all applications icons and name which are installed in device

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.