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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T05:26:28+00:00 2026-06-02T05:26:28+00:00

After a Nutch crawl in distributed (deploy) mode as follows: bin/nutch crawl s3n://….. -depth

  • 0

After a Nutch crawl in distributed (deploy) mode as follows:

bin/nutch crawl s3n://..... -depth 10 -topN 50000 -dir /crawl -threads 20 

I need to extract each URL fetched along with it’s content in a map reduce friendly format. By using the readseg command below, the contents are fetched but the output format doesn’t lend itself to being map reduced.

bin/nutch readseg -dump /crawl/segments/*  /output  -nogenerate -noparse -noparsedata -noparsetext

Ideally the output should be in this format:

http://abc.com/1     content of http://abc.com/1
http://abc.com/2     content of http://abc.com/2

Any suggestions on how to achieve this?

  • 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-02T05:26:31+00:00Added an answer on June 2, 2026 at 5:26 am

    The answer lies in tweaking the source code of nutch. This turned out to be quite simple. Navigate to the SegmentReader.java file at apache-nutch-1.4-bin/src/java/org/apache/nutch/segment

    Inside the SegmentReader class is a method reduce which is responsible for generating the human readable output the bin/nutch readseg command generates. Alter the StringBuffer dump variable as you see fit – this holds the entire output for a given url which is represented by the key variable.

    Make sure you to run ant to create a new binary and further calls to bin/nutch readseg shall generate the output in your custom format.

    These references were extremely useful in navigating the code:
    [1] http://nutch.apache.org/apidocs-1.4/overview-summary.html
    [2] http://nutch.apache.org/apidocs-1.3/index-all.html

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

Sidebar

Related Questions

I am deleting segments after they gets indexed then how nutch will get that
After highlighting text, I would like to obtain the paragraph in which the selected
After merging a branch back to the trunk what do most people do with
After some experience with functional languages, I'm starting to use recursion more in Java
After loosing much sleep I still cannot figure this out: The code below (its
After working in Eclipse for the past 3 years and memorizing all of the
After the user fills my backing bean with info through the forms, I want
After I thought that I've understood how they work, I tried this: NSString *str1
... after having just read http://www.cocoadev.com/index.pl?CocoaInsecurity ... I am curious to know about your
After researching a bit how the different way people slugify titles, I've noticed that

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.