您是否閱讀過鏈接中的自述文件?它有關於如何運行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
來源
2014-03-06 12:42:08
rVr