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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T17:34:54+00:00 2026-06-05T17:34:54+00:00

I am using Hadoop 0.20.2, and am using the old API. I’m trying to

  • 0

I am using Hadoop 0.20.2, and am using the old API. I’m trying to send chunks of data to mappers as opposed to sending one line at a time (the data covers multiple lines). I’ve attempted to us the NLineInputFormat to set how many lines to get at once, but the mapper is still receiving only 1 line at a time. I’m pretty sure that I have the right code. Are there any reasons why this would fail to work?

For your reference,

JobConf conf = new JobConf(WordCount.class);

conf.setInt(“mapred.line.input.format.linespermap”, 2);

conf.setInputFormat(NLineInputFormat.class);

Basically, I’m using the sample code from http://hadoop.apache.org/common/docs/r0.20.2/mapred_tutorial.html#Example%3A+WordCount+v1.0, only changing the TextInputFormat.

Thanks in advance

  • 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-05T17:34:56+00:00Added an answer on June 5, 2026 at 5:34 pm

    NLineInputFormat is designed to ensure that mappers all receive the same number of input records (except the final part of the split for each file).

    So by changing the input property to 2, each mapper should (at maximum) receive 2 input pairs, not 2 input lines at a time (which is what i think you are looking for).

    You should be able to confirm this by looking at the counters for each map task, “Map input records” which should be reporting 2 for most of your mappers

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

Sidebar

Related Questions

I am trying to parse data from commoncrawl.org using hadoop streaming. I set up
I am trying to run MapReduce jobs using hadoop-eclipse plugin with Eclipse Indigo, but
I'm using the new Hadoop API to write a sequence of map-reduce jobs. I
Apache Pig can load data from Hadoop sequence files using the PiggyBank SequenceFileLoader :
Whenever I specify a resource using the Spring Data Hadoop namespace, by application throws
I am using hadoop hdfs to store large data. I need to first transfer
I've been trying to use Hadoop to send N amount of lines to a
Now I am using Hadoop to process the data that will finally be loaded
I have been using Hadoop quite a while now. After some time I realized
We are using Hadoop through the Hadoop C/C++ API (libhdfs.so). We use the latest

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.