本文介绍了hadoop-hadoop中的输入/输出文件存储在哪里,以及如何在hadoop中执行Java文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
假设我编写了一个Java程序,并且想在Hadoop中运行它,
Suppose I write a java program and i want to run it in Hadoop, then
- 文件应保存在哪里?
- 如何从hadoop访问它?
- 我应该通过以下命令调用它吗?
hadoop classname
- hadoop中执行Java文件的命令是什么?
- where should the file be saved?
- how to access it from hadoop?
- should i be calling it by the following command?
hadoop classname
- what is the command in hadoop to execute the java file?
推荐答案
我能想到的最简单的答案是:
The simplest answers I can think of to your questions are:
1)任何地方
2,3,4)$HADOOP_HOME/bin/hadoop jar [path_to_your_jar_file]
1) Anywhere
2,3,4)$HADOOP_HOME/bin/hadoop jar [path_to_your_jar_file]
在此处提出了类似的问题在apache hadoop中执行helloworld.java
A similar question was asked here Executing helloworld.java in apache hadoop
这篇关于hadoop-hadoop中的输入/输出文件存储在哪里,以及如何在hadoop中执行Java文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!