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

  • Home
  • SEARCH
  • 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 8608479
In Process

The Archive Base Latest Questions

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

I have a mapreduce Mapper. This Mapper should use some set of read-only parameters.

  • 0

I have a mapreduce Mapper. This Mapper should use some set of read-only parameters.
Let’s imagine that I want to count occurences of some substrings (title of something) in input lines.
I do have a list of pairs : “some title” => “a regular expression to extract this title from input line”.
These pairs are stored in usual text file.

What is the best way to pass this file to Mapper?
I have only this idea:

  1. Upload file with pairs to hdfs.
  2. Pass path to file using -Dpath.to.file.with.properties
  3. in static{} section of mapper read file and populate map pair “some title” => “regular expr for the title”.

Is it good or bad? please adivce

  • 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-12T03:37:19+00:00Added an answer on June 12, 2026 at 3:37 am

    You’re on track, but I would recommend using the distributed cache. Its purpose is for exactly this – passing read-only files to task nodes.

    1. Put file in HDFS
    2. Add that file to the distributed cache in the main method of your application.
    3. In the Mapper class, override either the configure or setup method depending on which version of the API you are using. In that method it can read from the distributed cache and store everything in memory.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a mapreduce program that first scans an HBase table. I want some
I am trying to experiment this parameter in MapReduce and I have some question.
I have several Mongoid models that I'm running mapreduce on, and I'd like to
I tried implementing a sorting program in mapreduce such that I have just the
we have set up CDH4 (hdfs, hbase, hue, mapreduce, oozie and zookeeper) on a
I have a massive amount of input data (that's why I use Hadoop) and
In a mongoDB map reduce I have code that causes some documents to be
One of my co-workers created a silly bug in mongo mapreduce, he should have
I have a large dataset (about 1.1M documents) that I need to run mapreduce
I have a Class something like this in java for hadoop MapReduce public Class

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.