如何编译hadoop2.4.1插件-成都创新互联网站建设

关于创新互联

多方位宣传企业产品与服务 突出企业形象

公司简介 公司的服务 荣誉资质 新闻动态 联系我们

如何编译hadoop2.4.1插件

小编给大家分享一下如何编译hadoop2.4.1插件,相信大部分人都还不怎么了解,因此分享这篇文章给大家参考一下,希望大家阅读完这篇文章后大有收获,下面让我们一起去了解一下吧!

超过十余年行业经验,技术领先,服务至上的经营模式,全靠网络和口碑获得客户,为自己降低成本,也就是为客户降低成本。到目前业务范围包括了:成都网站设计、成都网站建设,成都网站推广,成都网站优化,整体网络托管,成都微信小程序,微信开发,App定制开发,同时也可以让客户的网站和网络营销和我们一样获得订单和生意!

操作于 win7 32位  Eclipse 4.1  Kepler 

①下载插件源码包

https://github.com/winghc/hadoop2x-eclipse-plugin

点击右侧download下载

解压,打开解压目录“ xxxx\hadoop2x-eclipse-plugin-master\src\contrib”

②新建一个java项目

将contrib下的eclipse-plugin里面的内容拷贝到java项目下实际上只要拷贝5个就好。

META-INF
resources
src
build.properties
plugin.xml

拷贝完成了。那么问题来了:

全是红叉叉。。。(个人有很多红叉叉网上资料全都没有描述,解决后记录下。)

好像有个包名错了。。这个自己改吧- -不解释;

缺少一些jar包,(不小心放了汉化包。。以中文的描述吧问题不难,英文的相信你们对应的上)

缺少的第一部分jar包为"插件依赖项":右键项目->构建路径->配置构建路径->然后添加库->插件依赖项 下一步完成!

还有错。。。少jar包。

这个jar包不截图了大概就是少org.apache.hadoop.fs 类似的

大家都说去源码包lib下找到jar包全部引入就好。。。可是我的lib下面没有啊- -真的没有啊啊啊啊。。。

所以不要纠结了- -(认真你就输了,这个错误可以继续后续编译,编译完成了,jar包就来了所以不要在这些jar包上找方法了)。

③修改build.xml文件


 

 

 
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
     
    
        
            
        
        
        
        
        
        
        
        
        
            
    
     
    
        
    
     
    
        
        
        
        
        
            
            
            
            
        
        
            
            
            
        
        
            
            
            
        
        
            
            
            
        
        
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
        
        
     
    
        
        
            
            
        
    
        
        
        
            
        
        
        
            
        
        
        
        
    
    
        
        
    

修改前5项:

jdk.home指定编译时用的jdk,

hadoop和eclipse版本号是用来给jar起名字的,

hadoop.home是hadoop安装目录,会从里面提取需要的文件,

eclipse.home是eclipse的安装目录,MyEclipse中是那个Common目录。

everything is ok! 右键build.xml文件Run AS Ant Build

Buildfile: E:\workspace\hadoop2x\build.xml
init:
     [echo] contrib: eclipse-plugin
    [mkdir] Created dir: E:\workspace\hadoop2x\build\contrib\eclipse-plugin
    [mkdir] Created dir: E:\workspace\hadoop2x\build\contrib\eclipse-plugin\classes
    [mkdir] Created dir: E:\workspace\hadoop2x\build\contrib\eclipse-plugin\lib
     [copy] Copying 35 files to E:\workspace\hadoop2x\build\contrib\eclipse-plugin\lib
     [copy] Copying E:\hadoop\hadoop-2.4.1\hadoop-2.4.1\share\hadoop\yarn\hadoop-yarn-api-2.4.1.jar to E:\workspace\hadoop2x\build\contrib\eclipse-plugin\lib\hadoop-yarn-api-2.4.1.jar
     [copy] Copying E:\hadoop\hadoop-2.4.1\hadoop-2.4.1\share\hadoop\yarn\hadoop-yarn-applications-distributedshell-2.4.1.jar to E:\workspace\hadoop2x\build\contrib\eclipse-plugin\lib\hadoop-yarn-applications-distributedshell-2.4.1.jar
     [copy] Copying E:\hadoop\hadoop-2.4.1\hadoop-2.4.1\share\hadoop\yarn\hadoop-yarn-applications-unmanaged-am-launcher-2.4.1.jar to E:\workspace\hadoop2x\build\contrib\eclipse-plugin\lib\hadoop-yarn-applications-unmanaged-am-launcher-2.4.1.jar
     [copy] Copying E:\hadoop\hadoop-2.4.1\hadoop-2.4.1\share\hadoop\yarn\hadoop-yarn-client-2.4.1.jar to E:\workspace\hadoop2x\build\contrib\eclipse-plugin\lib\hadoop-yarn-client-2.4.1.jar
     [copy] Copying E:\hadoop\hadoop-2.4.1\hadoop-2.4.1\share\hadoop\yarn\hadoop-yarn-common-2.4.1.jar to E:\workspace\hadoop2x\build\contrib\eclipse-plugin\lib\hadoop-yarn-common-2.4.1.jar
     [copy] Copying E:\hadoop\hadoop-2.4.1\hadoop-2.4.1\share\hadoop\yarn\hadoop-yarn-server-applicationhistoryservice-2.4.1.jar to E:\workspace\hadoop2x\build\contrib\eclipse-plugin\lib\hadoop-yarn-server-applicationhistoryservice-2.4.1.jar
     [copy] Copying E:\hadoop\hadoop-2.4.1\hadoop-2.4.1\share\hadoop\yarn\hadoop-yarn-server-common-2.4.1.jar to E:\workspace\hadoop2x\build\contrib\eclipse-plugin\lib\hadoop-yarn-server-common-2.4.1.jar
     [copy] Copying E:\hadoop\hadoop-2.4.1\hadoop-2.4.1\share\hadoop\yarn\hadoop-yarn-server-nodemanager-2.4.1.jar to E:\workspace\hadoop2x\build\contrib\eclipse-plugin\lib\hadoop-yarn-server-nodemanager-2.4.1.jar
     [copy] Copying E:\hadoop\hadoop-2.4.1\hadoop-2.4.1\share\hadoop\yarn\hadoop-yarn-server-resourcemanager-2.4.1.jar to E:\workspace\hadoop2x\build\contrib\eclipse-plugin\lib\hadoop-yarn-server-resourcemanager-2.4.1.jar
     [copy] Copying E:\hadoop\hadoop-2.4.1\hadoop-2.4.1\share\hadoop\yarn\hadoop-yarn-server-web-proxy-2.4.1.jar to E:\workspace\hadoop2x\build\contrib\eclipse-plugin\lib\hadoop-yarn-server-web-proxy-2.4.1.jar
     [copy] Copying E:\hadoop\hadoop-2.4.1\hadoop-2.4.1\share\hadoop\common\hadoop-common-2.4.1.jar to E:\workspace\hadoop2x\build\contrib\eclipse-plugin\lib\hadoop-common-2.4.1.jar
     [copy] Copying E:\hadoop\hadoop-2.4.1\hadoop-2.4.1\share\hadoop\common\hadoop-nfs-2.4.1.jar to E:\workspace\hadoop2x\build\contrib\eclipse-plugin\lib\hadoop-nfs-2.4.1.jar
     [copy] Copying E:\hadoop\hadoop-2.4.1\hadoop-2.4.1\share\hadoop\hdfs\hadoop-hdfs-2.4.1.jar to E:\workspace\hadoop2x\build\contrib\eclipse-plugin\lib\hadoop-hdfs-2.4.1.jar
     [copy] Copying E:\hadoop\hadoop-2.4.1\hadoop-2.4.1\share\hadoop\hdfs\hadoop-hdfs-nfs-2.4.1.jar to E:\workspace\hadoop2x\build\contrib\eclipse-plugin\lib\hadoop-hdfs-nfs-2.4.1.jar
     [copy] Copying E:\hadoop\hadoop-2.4.1\hadoop-2.4.1\share\hadoop\common\lib\commons-cli-1.2.jar to E:\workspace\hadoop2x\build\contrib\eclipse-plugin\lib\commons-cli-1.2.jar
     [copy] Copying E:\hadoop\hadoop-2.4.1\hadoop-2.4.1\share\hadoop\common\lib\commons-collections-3.2.1.jar to E:\workspace\hadoop2x\build\contrib\eclipse-plugin\lib\commons-collections-3.2.1.jar
     [copy] Copying E:\hadoop\hadoop-2.4.1\hadoop-2.4.1\share\hadoop\common\lib\commons-configuration-1.6.jar to E:\workspace\hadoop2x\build\contrib\eclipse-plugin\lib\commons-configuration-1.6.jar
     [copy] Copying E:\hadoop\hadoop-2.4.1\hadoop-2.4.1\share\hadoop\common\lib\commons-lang-2.6.jar to E:\workspace\hadoop2x\build\contrib\eclipse-plugin\lib\commons-lang-2.6.jar
     [copy] Copying E:\hadoop\hadoop-2.4.1\hadoop-2.4.1\share\hadoop\common\lib\guava-11.0.2.jar to E:\workspace\hadoop2x\build\contrib\eclipse-plugin\lib\guava-11.0.2.jar
     [copy] Copying E:\hadoop\hadoop-2.4.1\hadoop-2.4.1\share\hadoop\common\lib\hadoop-annotations-2.4.1.jar to E:\workspace\hadoop2x\build\contrib\eclipse-plugin\lib\hadoop-annotations-2.4.1.jar
     [copy] Copying E:\hadoop\hadoop-2.4.1\hadoop-2.4.1\share\hadoop\common\lib\hadoop-auth-2.4.1.jar to E:\workspace\hadoop2x\build\contrib\eclipse-plugin\lib\hadoop-auth-2.4.1.jar
     [copy] Copying E:\hadoop\hadoop-2.4.1\hadoop-2.4.1\share\hadoop\common\lib\jackson-core-asl-1.8.8.jar to E:\workspace\hadoop2x\build\contrib\eclipse-plugin\lib\jackson-core-asl-1.8.8.jar
     [copy] Copying E:\hadoop\hadoop-2.4.1\hadoop-2.4.1\share\hadoop\common\lib\jackson-mapper-asl-1.8.8.jar to E:\workspace\hadoop2x\build\contrib\eclipse-plugin\lib\jackson-mapper-asl-1.8.8.jar
     [copy] Copying E:\hadoop\hadoop-2.4.1\hadoop-2.4.1\share\hadoop\common\lib\log4j-1.2.17.jar to E:\workspace\hadoop2x\build\contrib\eclipse-plugin\lib\log4j-1.2.17.jar
     [copy] Copying E:\hadoop\hadoop-2.4.1\hadoop-2.4.1\share\hadoop\common\lib\netty-3.6.2.Final.jar to E:\workspace\hadoop2x\build\contrib\eclipse-plugin\lib\netty-3.6.2.Final.jar
     [copy] Copying E:\hadoop\hadoop-2.4.1\hadoop-2.4.1\share\hadoop\common\lib\protobuf-java-2.5.0.jar to E:\workspace\hadoop2x\build\contrib\eclipse-plugin\lib\protobuf-java-2.5.0.jar
     [copy] Copying E:\hadoop\hadoop-2.4.1\hadoop-2.4.1\share\hadoop\common\lib\slf4j-api-1.7.5.jar to E:\workspace\hadoop2x\build\contrib\eclipse-plugin\lib\slf4j-api-1.7.5.jar
     [copy] Copying E:\hadoop\hadoop-2.4.1\hadoop-2.4.1\share\hadoop\common\lib\slf4j-log4j12-1.7.5.jar to E:\workspace\hadoop2x\build\contrib\eclipse-plugin\lib\slf4j-log4j12-1.7.5.jar
     [copy] Copying E:\hadoop\hadoop-2.4.1\hadoop-2.4.1\share\hadoop\mapreduce\hadoop-mapreduce-client-app-2.4.1.jar to E:\workspace\hadoop2x\build\contrib\eclipse-plugin\lib\hadoop-mapreduce-client-app-2.4.1.jar
     [copy] Copying E:\hadoop\hadoop-2.4.1\hadoop-2.4.1\share\hadoop\mapreduce\hadoop-mapreduce-client-common-2.4.1.jar to E:\workspace\hadoop2x\build\contrib\eclipse-plugin\lib\hadoop-mapreduce-client-common-2.4.1.jar
     [copy] Copying E:\hadoop\hadoop-2.4.1\hadoop-2.4.1\share\hadoop\mapreduce\hadoop-mapreduce-client-core-2.4.1.jar to E:\workspace\hadoop2x\build\contrib\eclipse-plugin\lib\hadoop-mapreduce-client-core-2.4.1.jar
     [copy] Copying E:\hadoop\hadoop-2.4.1\hadoop-2.4.1\share\hadoop\mapreduce\hadoop-mapreduce-client-hs-2.4.1.jar to E:\workspace\hadoop2x\build\contrib\eclipse-plugin\lib\hadoop-mapreduce-client-hs-2.4.1.jar
     [copy] Copying E:\hadoop\hadoop-2.4.1\hadoop-2.4.1\share\hadoop\mapreduce\hadoop-mapreduce-client-hs-plugins-2.4.1.jar to E:\workspace\hadoop2x\build\contrib\eclipse-plugin\lib\hadoop-mapreduce-client-hs-plugins-2.4.1.jar
     [copy] Copying E:\hadoop\hadoop-2.4.1\hadoop-2.4.1\share\hadoop\mapreduce\hadoop-mapreduce-client-jobclient-2.4.1.jar to E:\workspace\hadoop2x\build\contrib\eclipse-plugin\lib\hadoop-mapreduce-client-jobclient-2.4.1.jar
     [copy] Copying E:\hadoop\hadoop-2.4.1\hadoop-2.4.1\share\hadoop\mapreduce\hadoop-mapreduce-client-shuffle-2.4.1.jar to E:\workspace\hadoop2x\build\contrib\eclipse-plugin\lib\hadoop-mapreduce-client-shuffle-2.4.1.jar
compile:
     [echo] contrib: eclipse-plugin
    [javac] Compiling 45 source files to E:\workspace\hadoop2x\build\contrib\eclipse-plugin\classes
    [javac] 注: 某些输入文件使用或覆盖了已过时的 API。
    [javac] 注: 有关详细信息, 请使用 -Xlint:deprecation 重新编译。
    [javac] 注: 某些输入文件使用了未经检查或不安全的操作。
    [javac] 注: 有关详细信息, 请使用 -Xlint:unchecked 重新编译。
jar:
      [jar] Building jar: E:\workspace\hadoop2x\build\contrib\eclipse-plugin\hadoop-2.4.1-eclipse-4.3-plugin.jar
BUILD SUCCESSFUL
Total time: 11 seconds
BUILD SUCCESSFUL 看到这个字样日子就美好了。可以在项目里找到编译好的东东
hadoop-2.4.1-eclipse-4.3-plugin.jar

以上是“如何编译hadoop2.4.1插件”这篇文章的所有内容,感谢各位的阅读!相信大家都有了一定的了解,希望分享的内容对大家有所帮助,如果还想学习更多知识,欢迎关注创新互联行业资讯频道!


分享文章:如何编译hadoop2.4.1插件
当前路径:http://kswsj.cn/article/jcceoo.html

其他资讯