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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T04:47:16+00:00 2026-06-05T04:47:16+00:00

I have csv files containing records separated by semicolon. Each line is one record.

  • 0

I have csv files containing records separated by semicolon. Each line is one record. Each line contains edge information of a graph. This means one line looks like the following:

Node_X;Node_Y;5

it is interpreted as an edge or link between nodes x and y having the weight of 5. My mappers get this input. Now what I want to achieve is to aggregate the information using the nodes.

The following example illustrates my scenario:

Node_X;Node_Y;5

Node_X;Node_Z;10

Node_X;Node_A;60

Node_Y;Node_A;20

Then the result by nodes should be:

Node_X;75; Node_Y;25; Node_A;80

I want to collect all distinct nodes and give them as weight the sum of the weights they have with other nodes.

In my mapper, I can read the edge information:

Node_X;Node_A;60

But how can I make two keys out of this line for my reducers?
It should be something like

context.write(Node_X,60);

context.write(Node_A,60);

How can I achieve this?

Thx!

P.S.: The edges are undirected.

  • 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-05T04:47:19+00:00Added an answer on June 5, 2026 at 4:47 am

    It should be something like

    context.write(Node_X,60);

    context.write(Node_A,60);

    Assuming you haven’t tried it before asking, that will work.

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

Sidebar

Related Questions

I have two .csv files containing correlation matrices exported from R. One file contains
I have a couple of files containing a value in each line. EDIT :
I have a .csv file containing over 70 million lines of which each line
I have an input CSV file with a column containing information similar to the
I have two CSV files which use @ to divide each column. The first
We have a web app that exports CSV files containing foreign characters with UTF-8,
I have imported a csv file containing spatial area information in varchar, then converted
I have several billion rows of data in CSV files. Each row can have
I work on unix server. I have many csv files containing, among other info,
I have a large CSV file containing a list of stores, in which one

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.