Hadoop on Windows

Softwares:

Windows 8 Pro 64-bit

Cygwin 1.7.17-1 (1.7.18, using "cygcheck -c cygwin")

JDK 1.7.0_15 64-bit

Hadoop 1.1.1 (1.0.4, bin/hadoop version)


0. Prerequisites


A. Installing Cygwin

When asked to select packages to install, make sure to select "openssh" (also "openssl") in "Net" category. It is required for proper functionality of Hadoop clusters and Eclipse plugin [1].

To save the trouble of configuration, it may also help to run Hadoop in a virtual machine as provided in Yahoo's tutorial [7].


B. Downloading Hadoop

From hadoop.apache.org, download Hadoop, and unpack it, for example, to C:\hadoop\.

Edit the file "conf/hadoop-env.sh" to define at least JAVA_HOME to be the root of the Java installation.

export JAVA_HOME="/cygdrive/c/Program Files/Java/jre7"
(or make a symbol link: ln -s /cygdrive/c/Program\ Files/Java/jdk1.7.0_15 /usr/local/jdk1.7.0_15)

Then, Hadoop can run in a non-distributed mode, or called Local (Standalone) Mode, as a single Java process. Besides, the "grep" example [5] in Hadoop official documents, the following is a "wordcount" example from IBM developerWorks China [2]:

$ cd /cygdrive/c/hadoop/
$ mkdir test-in
$ cd test-in
$ echo "hello world bye world" >file1.txt
$ echo "hello hadoop goodbye hadoop" >file2.txt
$ cd ..
$ bin/hadoop jar hadoop-examples-*.jar wordcount test-in test-out
$ cat test-out/*

In case of the IOException below:

ERROR security.UserGroupInformation: Privi

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值