Hadoop
The Map Reduce program written in Java is an algorithm that will recommend to user X
a list of people to follow Fi based on the number of followers that X and Fi have in common. The
input and output of the algorithm will be as follows:
1 3 4 5
2 1 3 5
3 1 2 4 5
4 1 2 3 5
5 3
1 2(2)
2 4(3)
3
4
5 2(1) 1(1) 4(1)
Map Reduce code is built on compiler version : Java 1.8 and using Maven plugin.
Open the project,
1. Run Configuration
2.Add Arguments and run.
Copy the input file to the hdfs file system
Export the project as a Runnable jar.
Run the commmand : hadoop jar name of the jar file input file path output folder path
Sample:
hadoop jar whotofollow.jar input.txt output_who_to_follow
4.To view the results do:
hdfs dfs -cat [output directory name]/*
Make sure that maven plugin is installed in the system
mvn package
hadoop jar (path to the MapReduce-0.0.1-SNAPSHOT.jar file) (input file path) (output directory path)