Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In the above question, while calculating the occurrences of the words, we also need a counter of the number of sentences said by DUNCAN and

In the above question, while calculating the occurrences of the words, we also need a counter of the number of sentences said by "DUNCAN" and number of sentences said by "MALCOLM" in the dataset (i.e. from the play Macbeth).

The excerpts from the play are as below :

DUNCAN. Dismay'd not this DUNCAN. So well thy words become thee as thy wounds; DUNCAN. Whence camest thou, worthy Thane? MALCOLM. What will you do? Let's not consort with them. MALCOLM. This murtherous shaft that's shot MALCOLM. Let us seek out some desolate shade and there DUNCAN. Great happiness!

Constraints:

  • Assume that the first string/name in each sentence starts with the person who has spoken that line.
  • Use Counters to solve this problem

Hint:

  • Add counters to the solution of the above question to get count of the lines spoken by DUNCAN and MALCOLM.
  • The value of the counter should be printed in MapReduce output console.
  • Refer CountersLinks to an external site. API

Sample Output:

DUNCAN=5

MALCOLM=30

Expected Solution: You need to paste the MR code, Hadoop commands & path of the final jar that is used to achieve this output.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Oracle Database Foundations Technology Fundamentals For IT Success

Authors: Bob Bryla

1st Edition

0782143725, 9780782143720

More Books

Students also viewed these Databases questions

Question

Does it avoid use of underlining?

Answered: 1 week ago