spark如何合并github
发表于:2024-10-21 作者:千家信息网编辑
千家信息网最后更新 2024年10月21日,小编给大家分享一下spark如何合并github,希望大家阅读完这篇文章之后都有所收获,下面让我们一起去探讨吧!最近在做内部spark版本升级的工作,涉及到github 上合并pr的工作,具体的是sp
千家信息网最后更新 2024年10月21日spark如何合并github
小编给大家分享一下spark如何合并github,希望大家阅读完这篇文章之后都有所收获,下面让我们一起去探讨吧!
最近在做内部spark版本升级的工作,涉及到github 上合并pr的工作,具体的是spark 2.x升级到spark 3.0.1时兼容hdfs cdh-2.6.0-5.13.1,报编译错误
[INFO] Compiling 25 Scala sources to /Users/libinsong/Documents/codes/tongdun/spark-3.0/resource-managers/yarn/target/scala-2.12/classes ...[ERROR] [Error] resource-managers/yarn/src/main/scala/org/apache/spark/deploy/yarn/Client.scala:298: value setRolledLogsIncludePattern is not a member of org.apache.hadoop.yarn.api.records.LogAggregationContext[ERROR] [Error] resource-managers/yarn/src/main/scala/org/apache/spark/deploy/yarn/Client.scala:300: value setRolledLogsExcludePattern is not a member of org.apache.hadoop.yarn.api.records.LogAggregationContext[ERROR] [Error] resource-managers/yarn/src/main/scala/org/apache/spark/deploy/yarn/Client.scala:551: not found: value isLocalUri[ERROR] [Error] resource-managers/yarn/src/main/scala/org/apache/spark/deploy/yarn/Client.scala:1367: not found: value isLocalUri[ERROR] four errors found
具体的解决方法github spark pr 已经给出了解决方法,修改相应的代码就行,但是仅仅是修改的话,我们可以选择一种更加优雅的方式(以git cherry-pick方式),
现在简单的分享一下:
直接找到setRolledLogsIncludePattern一行,
sparkConf.get(ROLLED_LOG_INCLUDE_PATTERN).foreach { includePattern => try { val logAggregationContext = Records.newRecord(classOf[LogAggregationContext]) logAggregationContext.setRolledLogsIncludePattern(includePattern) sparkConf.get(ROLLED_LOG_EXCLUDE_PATTERN).foreach { excludePattern => logAggregationContext.setRolledLogsExcludePattern(excludePattern) } appContext.setLogAggregationContext(logAggregationContext) } catch { case NonFatal(e) => logWarning(s"Ignoring ${ROLLED_LOG_INCLUDE_PATTERN.key} because the version of YARN " + "does not support it", e) } } appContext.setUnmanagedAM(isClientUnmanagedAMEnabled) sparkConf.get(APPLICATION_PRIORITY).foreach { appPriority => appContext.setPriority(Priority.newInstance(appPriority)) } appContext }
发现master上的代码并不是我们想要的,这个时候我们就可以使用git blame,在github上为
这样我们就能发现该代码有多次修改,找到对应[SPARK-19545][YARN] Fix compile issue for Spark on Yarn when building… 点击进去
找到对应的commitId
执行命令 git cherry-pick 8e8afb3a3468aa743d13e23e10e77e94b772b2ed 就能把该commit 追加到自己的工作目录下
这样既能不需要手动修改代码,也能很好的保存了原始的commit的信息,以便追踪
看完了这篇文章,相信你对"spark如何合并github"有了一定的了解,如果想了解更多相关知识,欢迎关注行业资讯频道,感谢各位的阅读!
代码
工作
方式
方法
篇文章
升级
原始
优雅
一行
信息
命令
完了
手动
时候
更多
版本
目录
知识
行业
资讯
数据库的安全要保护哪些东西
数据库安全各自的含义是什么
生产安全数据库录入
数据库的安全性及管理
数据库安全策略包含哪些
海淀数据库安全审计系统
建立农村房屋安全信息数据库
易用的数据库客户端支持安全管理
连接数据库失败ssl安全错误
数据库的锁怎样保障安全
小学生网络安全国旗下演讲稿
网络技术缺点
数据库十几个表连接查询如何做
河南搜客网络技术有限公司介绍
重庆科技馆互联网
上海易什网络技术有限公司
淮阳联社网络安全培训会
主域服务器关闭备用无法上网
安卓网络代理软件开发
电信公司软件开发系统
网络安全要知道的童谣
香肠派对服务器无法连接怎么办
第一届网络安全周是什么时间
投中数据库笔记
网络安全与科技创新
服务器关闭的游戏还能再上架吗
中山无线软件开发批发价
主播用什么软件开发游戏
长乐网络技术有限公司
连接云数据库
移动应用软件开发技术有哪些
中国为什么根域名服务器
网络技术数据库技术
不同网络同时访问双网卡服务器
闹钟软件开发
具权威的软件开发人员
安家软件开发
关于网络技术方面的论文
数据库安全设备是什么意思
武汉苍穹软件开发