本文共 1412 字,大约阅读时间需要 4 分钟。
设置hadoop 本地环境
is designed to run on inside . However, Hadoop is configured to run things in a non-distributed mode as a single Java process by default. This is specially useful for debugging since distributed debugging is really a nightmare. This post introduces how to set up a standalone Hadoop environment.
旨在在 上运行。 但是,默认情况下,Hadoop被配置为以非分布式模式作为单个Java进程运行事物。 这对于调试特别有用,因为分布式调试确实是一场噩梦。 这篇文章介绍了如何设置独立的Hadoop环境。
Follow the instruction of “1. Install needed packages” part in to install packages. Fllow “4. Hadoop Concigurations” to configure hadoop-env.sh (this file only).
请遵循“ 1。 “安装所需的软件包”部分来安装软件包。 调剂“ 4。 Hadoop配置”中配置hadoop-env.sh(仅此文件)。
Just run hadoop jobs whose input and output is in local directories. We use a simple example to show how to a Hadoop job.
只需运行hadoop作业,其输入和输出在本地目录中。 我们使用一个简单的示例来展示如何 Hadoop作业。
The example finds and displays every match of the given regular expression. Output is written to the given output directory.
该示例查找并显示给定正则表达式的每个匹配项。 输出被写入给定的输出目录。
$ mkdir input$ cp conf/*.xml input$ bin/hadoop jar hadoop-mapred-examples-0.21.0.jar grep input output '[a-z.]+'$ cat output/*
The jar file’s name may be different depending on the Hadoop distribution’s version.
jar文件的名称可能会有所不同,具体取决于Hadoop发行版的版本。
Is it simple? Enjoy it and go further to play .
简单吗? 尽情享受它,然后继续玩《 。
翻译自:
设置hadoop 本地环境
转载地址:http://wfowd.baihongyu.com/