简体   繁体   English

Hadoop作业执行

[英]Hadoop Job execution

I am trying to run an Djikstra's Algorithm in Hadoop using the MapReduce Framework. 我正在尝试使用MapReduce框架在Hadoop中运行Djikstra算法。 I was successful in executing a sample wordcount program using the following command: 我使用以下命令成功执行了示例单词计数程序:

./bin/hadoop jar ./share/hadoop/mapreduce/hadoop-mapreduce-examples-0.23.9.jar wordcount /examples/jverne /examples/jverne/output ./bin/hadoop jar ./share/hadoop/mapreduce/hadoop-mapreduce-examples-0.23.9.jar wordcount / examples / jverne / examples / jverne / output

Now i want to execute my Djikstra.java using the above command. 现在,我想使用上述命令执行Djikstra.java。 I have created the class files of my application using netbeans. 我已经使用netbeans创建了应用程序的类文件。 According to me the class files should be placed in /share/hadoop/mapreduce/hadoop-mapreduce-examples-0.23.9.jar as it contains the class files of wordcount program. 据我说,类文件应该放在/share/hadoop/mapreduce/hadoop-mapreduce-examples-0.23.9.jar中,因为它包含wordcount程序的类文件。 I am not sure how should i modify the command so that it will execute my class files and execute my djikstra algorithm. 我不确定如何修改命令,以便它将执行我的类文件并执行我的djikstra算法。

Any help will be appreciated. 任何帮助将不胜感激。

Have a great day 祝你有美好的一天

Any hadoop job can be executed using the below command 可以使用以下命令执行任何hadoop作业

./bin/hadoop jar /path/to/your/jar yourMainClass /path/to/input /path/to/output

Now, to run your job, create a jar of your code, give the path to the jar and the main class name, also specify the input as well as output. 现在,要运行您的工作,请创建一个代码jar,提供该jar的路径和主类名称,并指定输入和输出。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM