win8下eclipse搭建hadoop2.7.2开发环境

来源:互联网 发布:京东有没有类似淘宝客 编辑:程序博客网 时间:2024/05/20 00:49
1、基础环境
eclipse版本:4.61  neon
系统:win8
hadoop2.7.2集群:
master:10.88.248.138    slave:10.88.248.92
2、把hadoop-eclipse-plugin-2.7.2.jar放在eclipse下plugins目录下,重启eclipse

3、配置Hadoop installation directory

如果hadoop-eclipse-plugin-2.7.2.jar安装成功,打开Windows—Preferences后,在窗口左侧会有Hadoop Map/Reduce选项,点击此选项,在窗口右侧设置Hadoop安装路径。

4、配置Map/Reduce Locations

打开Windows-->Perspective-->Open Perspective-->Other


选择Map/Reduce,点击OK,在右下方看到有个Map/Reduce Locations的图标,如下图所示:


在Map/Reduce Location选项卡区空白处点击右键新建Location:

在新建location窗口中输入Location Name,任意名称即可.配置Map/Reduce Master和DFS Mastrer,Host和Port配置成与core-site.xml的设置一致即可。
<property>
        <name>fs.defaultFS</name>
        <value>hdfs://10.88.248.138:9000</value>
    </property>

在界面配置如下:

点击"Finish"按钮,关闭窗口。
5、测试配置
在eclipse左侧project explorer里的DFSLocations—>10.88.248.138(右键可以disconnect和refresh操作),如能看到user,表示配置成功,也可以通过: ./hadoop dfs -mkdir /test        ./hadoop dfs -mkdir /test/test123  指令创建目录,如果能显示也证明配置成功

0 0
原创粉丝点击