找不到eclipse对应的hadoop

您所在的位置:网站首页 locationmaster下载 找不到eclipse对应的hadoop

找不到eclipse对应的hadoop

2023-07-19 02:11| 来源: 网络整理| 查看: 265

找不到eclipse对应的hadoop-eclipse-plugin版本怎么办?build.xml踩坑

我安装的hadoop版本为3.2.1,虚拟机是:Ubuntu16.04

先说最终解决方案

重装Eclipse后将eclipse-hadoop3x-master.zip\eclipse-hadoop3x-master\release 下的2.6.0放入plugins(在第一次打开eclipse之前)

绕的大弯路

hadoop-eclipse-plugin-3.2.1没有找到与hadoop版本对应的插件 将hadoop-eclipse-plugin-2.6.0放入eclipse/plugins中无法打开map reduce location 于是找了个3.1.2的插件版本,发现可以打开location 但是无法New,在这里插入图片描述 点击new 并没有反应。 没办法,想自己生成hadoop-eclipse-plugin-3.2.1(没有成功,最后还是使用的2.6.0) (下面是一些问题的解决,但是最后一个问题无法解决)

第一步 配置ant

终端中直接执行ant命令。若提示无法找到build.xml则配置成功,我安装的虚拟机自带有ant,所以我没有去ant官网下载。

第二步 下载 eclipse-hadoop3x-master

下载完后解压,打开 eclipse-hadoop3x\ivy 目录下的libraries.properties,设置hadoop版本号为你自己的版本号。

进入目录 eclipse-hadoop3x\src\contrib\eclipse-plugin 配置build.xml (注意,不是配置的eclipseIDE下面的build.xml,我开始自己瞎搞,后面发现有好几个build.xml,注意配置的是eclipse-hadoop3x\src\contrib\eclipse-plugin下的)

配置build.xml

我主要记录我遇到的问题

第一次配置,depends没删干净: ...... 这里的depends ....

终端先进入到 eclipse-hadoop3x\src\contrib\eclipse-plugin 这个目录下,然后执行 (注意一定要先cd进到eclipse-hadoop3x\src\contrib\eclipse-plugin 这个目录下)

ant jar -Dversion=3.2.1 -Declipse.home='/home hadoop/桌面/eclipse' -Dhadoop.home='/usr/local/hadoop'

(Declipse.home是eclipse路径,后面那个是hadoop路径) 出现了问题: /home/hadoop/桌面/eclipse-hadoop3x-master/src/contrib/eclipse-plugin/build.xml:80: destination directory “/home/hadoop/桌面/eclipse-hadoop3x-master/build/contrib/eclipse-plugin/classes” does not exist or is not a directory

就是因为第二步的target后面的depends没删干净

第二次配置

修改build.xml如下:(depends删干净了)

在这里插入图片描述 错误信息终于变了!!! 这里显示找不到11.0.2,去修改这个文件,找具体的hadoop中的文件改成对应的版本 在这里插入图片描述 改成具体的版本:(如下)11.0.2 改成 27.0-jre在这里插入图片描述 有时也要改build.xml copy下的描述。 原理是使build.xml,引用libraries.properties后,使xml中copy的名字和版本和hadoop里面的一样。 最后成功时出现 BUILD SUCCESSFUL (终于) 在这里插入图片描述 生成的插件在 eclipse-hadoop3x\build\contrib\eclipse-plugin 目录下。

问题三

生成后将plugin放入到eclipse/plugins下,打开eclipse window/preference 找不到mapreduce 解决方法:重装了一次eclipse 2018-12

问题四

在这里插入图片描述 这个问题没能解决。。。

最终解决方案

重装Eclipse后将eclipse-hadoop3x-master.zip\eclipse-hadoop3x-master\release 下的2.6.0放入plugins(在第一次打开eclipse之前)

问题四没能解决

最终的build.xml:(3.2.1)

最终的libraries.properties:

# Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. #This properties file lists the versions of the various artifacts used by hadoop and components. #It drives ivy and the generation of a maven POM # This is the version of hadoop we are generating hadoop.version=3.2.1 hadoop-gpl-compression.version=0.1.0 #These are the versions of our dependencies (in alphabetical order) apacheant.version=1.7.0 ant-task.version=2.0.10 asm.version=3.2 aspectj.version=1.6.5 aspectj.version=1.6.11 checkstyle.version=4.2 commons-cli.version=1.2 commons-codec.version=1.11 commons-collections.version=3.2.2 commons-configuration.version=2.1.1 commons-daemon.version=1.0.13 commons-httpclient.version=3.0.1 commons-lang.version=3.7 commons-logging.version=1.0.4 commons-logging-api.version=1.0.4 commons-math.version=3.11 commons-el.version=1.0 commons-fileupload.version=1.2 commons-io.version=2.5 commons-net.version=3.1 core.version=3.1.1 coreplugin.version=1.3.2 hsqldb.version=1.8.0.10 ivy.version=2.1.0 jasper.version=5.5.12 jackson.version=1.9.13 #not able to figureout the version of jsp & jsp-api version to get it resolved throught ivy # but still declared here as we are going to have a local copy from the lib folder jsp.version=2.1 jsp-api.version=5.5.12 jsp-api-2.1.version=6.1.14 jsp-2.1.version=6.1.14 jets3t.version=0.6.1 jetty.version=6.1.26 jetty-util.version=6.1.26 jersey-core.version=1.8 jersey-json.version=1.8 jersey-server.version=1.8 junit.version=4.5 jdeb.version=0.8 jdiff.version=1.0.9 json.version=1.0 protobuf.version=2.5.0 kfs.version=0.1 netty.version=3.10.5.Final log4j.version=1.2.17 lucene-core.version=2.3.1 htrace.version=4.1.0-incubating mockito-all.version=1.8.5 jsch.version=0.1.42 oro.version=2.0.8 rats-lib.version=0.5.1 servlet.version=4.0.6 servlet-api.version=3.1.0 slf4j-api.version=1.7.25 slf4j-log4j12.version=1.7.25 guava.version=27.0-jre wagon-http.version=1.0-beta-2a xmlenc.version=0.52 xerces.version=1.4.4


【本文地址】


今日新闻


推荐新闻


CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3