1.修改配置文件core-site.xml,将其中localhost改为虚拟机的ip地址:

  在Ubuntu中,打开控制台,使用命令ifconfig查看虚拟机ip,如图:

  windows中eclipse连接虚拟机hdfs

  修改【hadoop安装路径】/etc/hadoop下的core-site.xml文件,如图:

  windows中eclipse连接虚拟机hdfs

  2.安装Hadoop-Eclipse-Plugin

  (以下操作在Window系统中进行)

  下载hadoop2x-eclipse-plugin:(下载地址:https://github.com/winghc/hadoop2x-eclipse-plugin)

  解压hadoop2x-eclipse-plugin,将其中的hadoop-eclipse-plugin-2.6.0.jar复制到Eclipse安装目录下的plugins文件夹中,启动Eclipse。

  将hadoop安装包解压到windows系统中(下载地址:http://mirror.bit.edu.cn/apache/hadoop/common/),这里我解压到D:\hadoop

  选择 Window 菜单下的 Preference,左侧找到Hadoop Map/Reduce,填写刚刚解压的Hadoop目录,如图:

  windows中eclipse连接虚拟机hdfs

  3.配置Hadoop-Eclipse-Plugin

  选择 Window 菜单下Show View——Other,找到Map/Reduce Localtions,点击Open,如图:

  windows中eclipse连接虚拟机hdfs

  在Map/Reduce Locations面板中右击,选择New Hadoop location

  windows中eclipse连接虚拟机hdfs

  配置如下:

  windows中eclipse连接虚拟机hdfs

  4.启动hadoop,此时已经可以看到HDFS中的文件了:

  windows中eclipse连接虚拟机hdfs

相关文章:

  • 2022-12-23
  • 2021-07-23
  • 2021-09-05
  • 2021-11-22
  • 2021-10-16
  • 2021-12-29
  • 2021-08-04
  • 2021-04-10
猜你喜欢
  • 2021-12-27
  • 2021-06-26
  • 2021-06-16
  • 2021-04-03
  • 2021-06-04
  • 2022-01-02
相关资源
相似解决方案