ICP 2 - PallaviArikatla/Big-Data-Programming GitHub Wiki
NAME: PALLAVI ARIKATLA
QUESTION 1: Counting the frequency of words in the given input with MapReduce algorithm.
Start by loading given text file to hdfs creating a directory and check whether it is created or not. If yes, put this text file into the created directory. Write a code for word count in eclipse and export this jar file and run the text file then check for the results.
code
output
QUESTION 2: Counting the frequency of words in given text file that starts with letter ‘a’.
Start by loading given text file to hdfs creating a directory and check whether it is created or not. If yes, put this text file into the created directory. Write a code for word count in eclipse and export this jar file and run the text file then check for the results.
code
output
BONUS QUESTION
QUESTION 3: Determine the prime number in input and print number only once.
Load input to hdfs. With the help of combiner elements will be passed and the combiner checks for the repetition of the number, if the number gets repeated an unique key value will be passed to reducer. Where in reducer with the help of the logic it checks for the prime number. If there is a prime number it must be represented as 0 if not it must be displayed as 1. Code, command and output are as follows.
code
command
output