hadoop-hadoop中的输入/输出文件存储在哪里,以及如何在hadoop中执行Java文件? [英] hadoop - Where are input/output files stored in hadoop and how to execute java file in hadoop?

查看:457
本文介绍了hadoop-hadoop中的输入/输出文件存储在哪里,以及如何在hadoop中执行Java文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

假设我编写了一个Java程序,并且想在Hadoop中运行它,

Suppose I write a java program and i want to run it in Hadoop, then

  1. 文件应保存在哪里?
  2. 如何从hadoop访问它?
  3. 我应该通过以下命令调用它吗? hadoop classname
  4. hadoop中执行Java文件的命令是什么?
  1. where should the file be saved?
  2. how to access it from hadoop?
  3. should i be calling it by the following command? hadoop classname
  4. 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文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆