flink1.13.5编译,各种填坑

解决Flink源码编译问题及填坑指南
本文详细记录了解决使用Flink1.13.5和Hadoop2.7.2时无法部署jar到集群的问题,通过自编译源码来解决。首先,从官网下载源码并修改pom文件中Hadoop和Hive的版本。在编译过程中遇到npm报错,如权限问题和依赖下载失败,通过设置npm源为淘宝镜像和更新npm包来解决。此外,还遇到了confluent.version版本过高导致的错误,将版本号更改为5.3.0。最后,通过添加-maven.compile.fork=true和-rf参数来跳过编译失败的模块,成功编译出可部署的jar包。

系列文章目录



前言

问题:使用官网flink1.13.5,hadoop2.7.2,无法把jar提交到集群进行standalone和yarn模式的部署
解决方法:自编译源码


一、源码准备

到官网或者github下载源码

二、 修改pom

pom中把hadoop和hive的版本改为与自己的版本一致。

三、编译

1.编译失败

编译命令:
mvn clean install -DskipTests

[INFO] > fsevents@1.2.7 install /root/opensource/flink-1.13.5/flink-runtime-web/web-dashboard/node_modules/fsevents
[INFO] > node install
[INFO] 
[INFO] 
[INFO] > node-sass@4.11.0 install /root/opensource/flink-1.13.5/flink-runtime-web/web-dashboard/node_modules/node-sass
[INFO] > node scripts/install.js
[INFO] 
[ERROR] Unable to save binary /root/opensource/flink-1.13.5/flink-runtime-web/web-dashboard/node_modules/node-sass/vendor/linux-x64-64 : {
   
    Error: EACCES: permission denied, mkdir '/root/opensource/flink-1.13.5/flink-runtime-web/web-dashboard/node_modules/node-sass/vendor'
[ERROR]     at Object.mkdirSync (fs.js:729:3)
[ERROR]     at sync (/root/opensource/flink-1.13.5/flink-runtime-web/web-dashboard/node_modules/mkdirp/index.js:71:13)
[ERROR]     at Function.sync (/root/opensource/flink-1.13.5/flink-runtime-web/web-dashboard/node_modules/mkdirp/index.js:77:24)
[ERROR]     at checkAndDownloadBinary (/root/opensource/flink-1.13.5/flink-runtime-web/web-dashboard/node_modules/node-sass/scripts/install.js:114:11)
[ERROR]     at Object.<anonymous> (/root/opensource/flink-1.13.5/flink-runtime-web/web-dashboard/node_modules/node-sass/scripts/install.js:157:1)
[ERROR]     at Module._compile (internal/modules/cjs/loader.js:689:30)
[ERROR]     at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
[ERROR]     at Module.load (internal/modules/cjs/loader.js:599:32)
[ERROR]     at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
[ERROR]     at Function.Module._load (internal/modules/cjs/loader.js:530:3)
[ERROR]   errno: -13,
[ERROR]   syscall: 'mkdir',
[ERROR]   code: 'EACCES',
[ERROR]   path:
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值