2014-03-06 94 views
-1

我試圖從鏈接運行zip文件下載https://github.com/verma7/GeneticAlgorithmsUsingMapReduce 但我無法在Apache Hadoop中運行它。 哪些文件我應該從zip運行以執行Mapreduce任務? 任何人都可以請告訴我如何使用Hadoop使用從以下鏈接的zip文件 https://github.com/verma7/GeneticAlgorithmsUsingMapReduce 我正在面臨幾個問題,而這樣做 請幫助我。 我想知道一步一步的過程。錯誤運行hadoop mapreduce運行jar文件

回答

0

您是否閱讀過鏈接中的自述文件?它有關於如何運行MR作業的分步說明。

Requirement: Hadoop 0.19 or higher (and it's dependencies) 

################################################################################### 
You may need to modify the variable "rootDir" in MapReduce.java and CGA.java to 
point to your home directory or some directory on the HDFS that you have read 
and write permissions on. 

To compile the class files and the jar files, run 

$ ant compile jar 

This will create a build and bin directory for the class files, by compiling 
against Hadoop 0.19 jar located in the lib directory. Also, it will create 
ga.jar which MapReduces simple genetic algorithm and cga.jar which 
MapReduces compact genetic algorithm. 

################################################################################### 
To execute, go to the root Hadoop directory and run, 

$ hadoop jar ga.jar <nMaps> <nReducers> <variables> <nIterations> <popTimesNlogN> 

where <nMaps> and <nReducers> is the number of mappers and reducers you want to 
start, <variables> is the size of the ONEMAX problem that this program solves, 
<nIterations> is the number of iterations you want to run and <popTimesNlogN> sets 
the size of the population to a multiple of n log n, where n is the number of 
variables. 

For example, 
$ hadoop jar ga.jar 4 4 10000 100 10