hadoop cygwin eclipse 从入门到配置hadoop的心路历程 伪分布式

2 篇文章 0 订阅
1 篇文章 0 订阅

Cygwin安装和配置

参考文档:http://blog.csdn.net/liu_jason/article/details/7705484 完成cygwin的安装

配置cygwin到window环境变量中,否则后边允许程序会出错 path加上C:\cygwin\bin


Hadoop安装和配置

参考文档:http://blog.csdn.net/liu_jason/article/details/7706781

注释:我这里用的是hadoop0.20.2。且注意文档中的文件目录,sysdata下的文件全部为自动生成


 Eclipse中运行

参考文档:http://www.cnblogs.com/flyoung2008/archive/2011/12/09/2281400.html

注释:其中第二张图,因为都是在本机上建立的伪分布的环境,所以

Map/Reduce Master

localhost
9001

DFS Master

localhost
9000
user name为默认名称就行,不用像图中一样是grid


hdfs://centos1:9000/tmp/wordcount/word.txt   hdfs://centos1:9000/tmp/wordcount/out
改成

hdfs://localhost:9000/tmp/wordcount/word.txt   hdfs://localhost:9000/tmp/wordcount/out


如果运行中提示
Output directory hdfs://localhost:9000/tmp/wordcount/out already exists
删除tmp/wordcount/out文件夹
如果提示

 
 
  1. $ bin/hadoop fs -cat /tmp/wordcount/word.txt  
  2. 12/06/29 18:07:53 INFO hdfs.DFSClient: No node available for block: blk_-6169034246478912245_1004 file=/tmp/wordcount/word.txt  
  3. 12/06/29 18:07:53 INFO hdfs.DFSClient: Could not obtain block blk_-6169034246478912245_1004 from any node:  java.io.IOException: No live nodes contain current block  
  4. 12/06/29 18:07:56 INFO hdfs.DFSClient: No node available for block: blk_-6169034246478912245_1004 file=/tmp/wordcount/word.txt  
  5. 12/06/29 18:07:56 INFO hdfs.DFSClient: Could not obtain block blk_-6169034246478912245_1004 from any node:  java.io.IOException: No live nodes contain current block  
  6. 12/06/29 18:07:59 INFO hdfs.DFSClient: No node available for block: blk_-6169034246478912245_1004 file=/tmp/wordcount/word.txt  
  7. 12/06/29 18:07:59 INFO hdfs.DFSClient: Could not obtain block blk_-6169034246478912245_1004 from any node:  java.io.IOException: No live nodes contain current block  
  8. 12/06/29 18:08:02 WARN hdfs.DFSClient: DFS Read: java.io.IOException: Could not obtain block: blk_-6169034246478912245_1004 file=/tmp/wordcount/word.txt  
  9.         at org.apache.hadoop.hdfs.DFSClient$DFSInputStream.chooseDataNode(DFSClient.java:1812)  
  10.         at org.apache.hadoop.hdfs.DFSClient$DFSInputStream.blockSeekTo(DFSClient.java:1638)  
  11.         at org.apache.hadoop.hdfs.DFSClient$DFSInputStream.read(DFSClient.java:1767)  
  12.         at java.io.DataInputStream.read(DataInputStream.java:83)  
  13.         at org.apache.hadoop.io.IOUtils.copyBytes(IOUtils.java:47)  
  14.         at org.apache.hadoop.io.IOUtils.copyBytes(IOUtils.java:85)  
  15.         at org.apache.hadoop.fs.FsShell.printToStdout(FsShell.java:114)  
  16.         at org.apache.hadoop.fs.FsShell.access$100(FsShell.java:49)  
  17.         at org.apache.hadoop.fs.FsShell$1.process(FsShell.java:352)  
  18.         at org.apache.hadoop.fs.FsShell$DelayedExceptionThrowing.globAndProcess(FsShell.java:1898)  
  19.         at org.apache.hadoop.fs.FsShell.cat(FsShell.java:346)  
  20.         at org.apache.hadoop.fs.FsShell.doall(FsShell.java:1543)  
  21.         at org.apache.hadoop.fs.FsShell.run(FsShell.java:1761)  
  22.         at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:65)  
  23.         at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:79)  
  24.         at org.apache.hadoop.fs.FsShell.main(FsShell.java:1880
在配置文件hdfs-site.xml中添加 <property>   <name>dfs.datanode.max.transfer.threads</name>   <value>8096</value> </property> <property>     <name>dfs.datanode.max.xcievers</name>     <value>8096</value>     <description></description> </property>

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值