运行hadoop mapreduce运行jar文件时出错

时间:2014-03-06 07:48:34

标签: hadoop

我试图从链接https://github.com/verma7/GeneticAlgorithmsUsingMapReduce运行zip文件下载 但是我无法在Apache Hadoop中运行它。 我应该从zip运行哪个文件来执行Mapreduce任务?  任何人都可以告诉我如何使用以下链接中的zip文件使用Hadoop https://github.com/verma7/GeneticAlgorithmsUsingMapReduce     这样做时我遇到了几个问题 请帮帮我。 我想知道一步一步的程序。

1 个答案:

答案 0 :(得分:0)

您是否在链接中阅读了README文件?它有关于如何运行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