GraphX编译记录


1. 安装maven后,执行, 由于我测试hadoop 1.2.1下的GraphX,所以编译命令为:: 


mvn -Dhadoop.version=1.2.1 -DskipTests clean package

后来发现编译的项目太多,耗时太长,而eclipse插件编译尝试失败,eclisep的scala项目插件中似乎只要有一点编译问题就无法生成class文件,

最后编译只能使用mvn, 为了减少编译时间,修改了主代码目录下的pom.xml 参数,原始pom.xml:

  <modules>
    <module>core</module>
    <module>bagel</module>
    <module>graphx</module>
    <module>mllib</module>
    <module>tools</module>
    <module>network/common</module>
    <module>network/shuffle</module>
    <module>streaming</module>
    <module>sql/catalyst</module>
    <module>sql/core</module>
    <module>sql/hive</module>
    <module>unsafe</module>
    <module>assembly</module>
    <module>external/twitter</module>
    <module>external/flume</module>
    <module>external/flume-sink</module>
    <module>external/flume-assembly</module>
    <module>external/mqtt</module>
    <module>external/mqtt-assembly</module>
    <module>external/zeromq</module>
    <module>examples</module>
    <module>repl</module>
    <module>launcher</module>
    <module>external/kafka</module>
    <module>external/kafka-assembly</module>
  </modules>



修改后:

  <modules>
    <module>core</module>
    <module>bagel</module>
    <module>graphx</module>
    <module>mllib</module>
    <module>tools</module>
    <module>network/common</module>
    <module>network/shuffle</module>
    <module>streaming</module>
    <module>unsafe</module>
    <module>assembly</module>
    <module>examples</module>
    <module>repl</module>
    <module>launcher</module>
  </modules>

尽管最后编译因为maven库无法下载没有全部通过,但我需要的GraphX已经通过了,我只需要它打包后的jar文件即可。

这里还遇到一个问题是eclipse上装的scala插件是2.11的,但是提示似乎需要2.10 ,于是重装本机scala和eclips插件。

终于GraphX在eclipse项目不报错了,然后能生成class文件。OK


2. 将修改后的class文件使用360压缩软件加入原始包中,替换slave节点对应assambly包,执行即可。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值