Map Reduce Implementation of a community detection algorithm extending Louvain method for community detection.
This is a maven project.
$mvn clean install
will complie and create louvain-mr-0.1.jar in target directory.
This algorithm expects data in metis unweighted graph format. See here for more information.
convert the data by using following command
$java -cp "path to louvain-mr-0.1.jar" edu.usc.pgroup.louvain.hadoop.tools.DataConverter "path to metis graph file" "path to metis partition file" number_of_partitions
Example:
$java -cp louvain-mr-0.1.jar edu.usc.pgroup.louvain.hadoop.tools.DataConverter /home/charith/data/4elt.graph /home/charith/data/4elt.graph.part.5 5
This will create set of partitioned files in /home/charith/data/ directory.
Use Following commeand to run the Hadoop Job
$hadoop jar "path to louvain-mr-0.1.jar" edu.usc.pgroup.louvain.hadoop.LouvainMR "input directory path where partition files are located" "output path" -1 "true to enable loggin false to disable logging"
Example command:
$./bin/hadoop jar louvain-mr-0.1.jar edu.usc.pgroup.louvain.hadoop.LouvainMR /home/charith/software/hadoop-2.2.0/input /home/charith/software/hadoop-2.2.0/output -1 true
Community mappings will be written to output path once the job is complete.