windows下eclipse连接虚拟机下或集群的linux系统部署的hadoop
由于在linux下用eclipse操作起来确实没有习惯用window方便,简单。所以就迎着之前老window下eclipse获取linux的hadoop的连接不到的问题继续解决。也许我用虚拟机下5天的开发时间,我window下4天就可以搞定,那多出的一天何不解决这个问题呢,何况使用hadoop不一定就只用5天。
1.前提条件:
windows下的eclipse集成好hadoop插件。
eclipse版本:3.3.2
hadoop版本:0.20.2
2.配置hadoop:
用SecureCRT,putty或winSCP等远程软件可以连接到linux系统,Linux系统的网络类型最好是桥接或host-only。
然后配置haodoop location的ip,端口号和hdfs的详细信息
易出问题:
Cannot connect to the Map/Reduce location: hadoop
Call to localhsot/10.1.23.42:9001 failed on connection exception: java.net.ConnectException: Connection refused: no further information
解决方法:
hadoop目录conf/core-site.xml、mapred-site.xml、hdfs-site.xml中配置的value都用的localhost替换固定的ip(10.1.23.42),localhost 指的本机,对于外部访问的话,换成ip。
参考连接: