当前位置: 首页 > article >正文

【spark源码修改】hive3.1.3 spark3.5.4编译,需要修改源码,最终编译成功

【spark源码修改】hive3.1.3 spark3.5.4编译,需要修改源码,最终编译成功

  • 1. 准备安装包与maven编译环境
    • 1.1 安装环境准备
    • 1.2 修改pom
    • 1.3 打包命令
  • 2. 编译与问题解决
    • 2.1 开始编译 失败, 缺包pentaho-aggdesigner-algorithm:pom:5.1.5-jhyde
    • 2.2 Hive Spark Remote Client 模块编译失败,类找不到,原因是升级后,类不兼容
  • 3. 修改源码
    • 3.1 源码不兼容,源码SparkCounter分析(附带修改过程与结果,spark2,spark3源码对比)
    • 3.2 修改代码 SparkCounter
    • 3.3 修改代码 ShuffleWriteMetrics
  • 4. 继续编译
    • 4.1 有一个test的类不兼容,直接删掉就行,重新编译
    • 4.2 Hive Llap Server 编译失败
    • 4.3 编译完成
    • 4.4 编译后的安装包


1. 准备安装包与maven编译环境

1.1 安装环境准备

安装包到官网找, hive.apache.org, spark.apache.org
maven环境准备: 初始化只改了settings的ali源

1.2 修改pom

pom版本修改前:

    <spark.version>2.3.0</spark.version>
    <scala.binary.version>2.11</scala.binary.version>
    <scala.version>2.11.8</scala.version>

修改后:

    <spark.version>3.5.4</spark.version>
    <scala.binary.version>2.13</scala.binary.version>
    <scala.version>2.13.8</scala.version>

1.3 打包命令

mvn clean package -Pdist -DskipTests -Dmaven.javadoc.skip=true

2. 编译与问题解决

2.1 开始编译 失败, 缺包pentaho-aggdesigner-algorithm:pom:5.1.5-jhyde

pentaho-aggdesigner-algorithm:pom:5.1.5-jhyde 找不到

Downloaded from central: https://repo.maven.apache.org/maven2/org/apache/hadoop/hadoop-mapreduce-client-core/2.7.2/hadoop-mapreduce-client-core-2.7.2.pom (3.5 kB at 12 kB/s)
Downloading from central: https://repo.maven.apache.org/maven2/org/apache/hadoop/hadoop-common/2.6.4/hadoop-common-2.6.4.pom
Downloaded from central: https://repo.maven.apache.org/maven2/org/apache/hadoop/hadoop-common/2.6.4/hadoop-common-2.6.4.pom (31 kB at 77 kB/s)
Downloading from central: https://repo.maven.apache.org/maven2/org/apache/hadoop/hadoop-project-dist/2.6.4/hadoop-project-dist-2.6.4.pom
Downloaded from central: https://repo.maven.apache.org/maven2/org/apache/hadoop/hadoop-project-dist/2.6.4/hadoop-project-dist-2.6.4.pom (18 kB at 48 kB/s)
Downloading from central: https://repo.maven.apache.org/maven2/org/apache/hadoop/hadoop-project/2.6.4/hadoop-project-2.6.4.pom
Downloaded from central: https://repo.maven.apache.org/maven2/org/apache/hadoop/hadoop-project/2.6.4/hadoop-project-2.6.4.pom (43 kB at 106 kB/s)
Downloading from central: https://repo.maven.apache.org/maven2/org/apache/hadoop/hadoop-main/2.6.4/hadoop-main-2.6.4.pom
Downloaded from central: https://repo.maven.apache.org/maven2/org/apache/hadoop/hadoop-main/2.6.4/hadoop-main-2.6.4.pom (18 kB at 47 kB/s)
Downloading from central: https://repo.maven.apache.org/maven2/org/apache/hadoop/hadoop-annotations/2.6.4/hadoop-annotations-2.6.4.pom
Downloaded from central: https://repo.maven.apache.org/maven2/org/apache/hadoop/hadoop-annotations/2.6.4/hadoop-annotations-2.6.4.pom (2.4 kB at 8.0 kB/s)
Downloading from central: https://repo.maven.apache.org/maven2/org/apache/hadoop/hadoop-auth/2.6.4/hadoop-auth-2.6.4.pom
Downloaded from central: https://repo.maven.apache.org/maven2/org/apache/hadoop/hadoop-auth/2.6.4/hadoop-auth-2.6.4.pom (7.7 kB at 20 kB/s)
Downloading from central: https://repo.maven.apache.org/maven2/org/apache/hive/hive-storage-api/2.2.1/hive-storage-api-2.2.1.pom
Downloaded from central: https://repo.maven.apache.org/maven2/org/apache/hive/hive-storage-api/2.2.1/hive-storage-api-2.2.1.pom (5.4 kB at 12 kB/s)
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for Hive 3.1.3:
[INFO] 
[INFO] Hive Upgrade Acid .................................. FAILURE [02:30 min]
[INFO] Hive ............................................... SKIPPED
[INFO] Hive Classifications ............................... SKIPPED
[INFO] Hive Shims Common .................................. SKIPPED
[INFO] Hive Shims 0.23 .................................... SKIPPED
[INFO] Hive Shims Scheduler ............................... SKIPPED
[INFO] Hive Shims ......................................... SKIPPED
[INFO] Hive Common ........................................ SKIPPED
[INFO] Hive Service RPC ................................... SKIPPED
[INFO] Hive Serde ......................................... SKIPPED
[INFO] Hive Standalone Metastore .......................... SKIPPED
[INFO] Hive Metastore ..................................... SKIPPED
[INFO] Hive Vector-Code-Gen Utilities ..................... SKIPPED
[INFO] Hive Llap Common ................................... SKIPPED
[INFO] Hive Llap Client ................................... SKIPPED
[INFO] Hive Llap Tez ...................................... SKIPPED
[INFO] Hive Spark Remote Client ........................... SKIPPED
[INFO] Hive Query Language ................................ SKIPPED
[INFO] Hive Llap Server ................................... SKIPPED
[INFO] Hive Service ....................................... SKIPPED
[INFO] Hive Accumulo Handler .............................. SKIPPED
[INFO] Hive JDBC .......................................... SKIPPED
[INFO] Hive Beeline ....................................... SKIPPED
[INFO] Hive CLI ........................................... SKIPPED
[INFO] Hive Contrib ....................................... SKIPPED
[INFO] Hive Druid Handler ................................. SKIPPED
[INFO] Hive HBase Handler ................................. SKIPPED
[INFO] Hive JDBC Handler .................................. SKIPPED
[INFO] Hive HCatalog ...................................... SKIPPED
[INFO] Hive HCatalog Core ................................. SKIPPED
[INFO] Hive HCatalog Pig Adapter .......................... SKIPPED
[INFO] Hive HCatalog Server Extensions .................... SKIPPED
[INFO] Hive HCatalog Webhcat Java Client .................. SKIPPED
[INFO] Hive HCatalog Webhcat .............................. SKIPPED
[INFO] Hive HCatalog Streaming ............................ SKIPPED
[INFO] Hive HPL/SQL ....................................... SKIPPED
[INFO] Hive Streaming ..................................... SKIPPED
[INFO] Hive Llap External Client .......................... SKIPPED
[INFO] Hive Shims Aggregator .....................

http://www.kler.cn/a/508367.html

相关文章:

  • 重拾Python学习,先从把python删除开始。。。
  • 协程(还需要输入3个字)
  • Python股票量化交易分析-开发属于自己的指标
  • C++实现设计模式---外观模式 (Facade)
  • Git 版本控制:.gitignore 文件完全指南
  • C#上位机通过CAN总线发送bin文件
  • 全国青少年信息学奥林匹克竞赛(信奥赛)备考实战之一维数组(应用技巧)
  • linux 国产化命令
  • 算法随笔_10: 供暖器
  • Linux网络 TCP socket
  • 一体机cell服务器更换内存步骤
  • java 小红书源码 1:1还原 uniapp
  • 小识MySQL中的OLTP和OLAP
  • 全类别机器人传感器模块推荐
  • RK3568笔记七十五:FFMPEG交叉编译
  • Rnote:Star 8.6k,github上的宝藏项目,手绘与手写画图笔记,用它画图做笔记超丝滑,值得尝试!
  • 如何在 ASP.NET Core 中实现速率限制?
  • [JavaScript] 变量与数据类型:从基础到进阶
  • C++第十五讲:异常
  • 春秋杯-WEB
  • maven 微服务项目多 包版本问题
  • 【张雪峰高考志愿填报】合集
  • 职场沟通与行为
  • C++: : error: expected type-specifier before ‘;‘ token
  • 计算机网络 (43)万维网WWW
  • 2025年1月17日(点亮三色LED)