TT Bigdata TT Bigdata
首页
GitHub (opens new window)
JaneTTR

JaneTTR

数据酿造智慧,每一滴都是沉淀!
  • 开发环境

  • Ambari 编译

  • Bigtop 编译

  • Ambari 源码编译

  • 前端开发

  • 后端开发

  • 官方组件编译

    • 准备阶段

    • 理解packages.gradle

    • 理解bigtop.bom

    • Hadoop编译

    • Flink编译

      • version-1.15.3

      • version-1.17.2

        • Flink_1.17.2编译
        • [O]Flink版本适配改造(三)
        • [O]Flink版本适配改造(四)
        • [O]Flink版本适配改造(五)
          • 编译适配总结:最终补丁整理
          • 完整 diff 补丁内容如下
        • [B]Flink版本适配改造(一)
        • [B]Flink版本适配改造(二)
        • [B]Flink版本适配改造(三)
    • Spark编译

    • Livy编译

    • Zeppelin编译

    • Zookeeper编译

    • Hbase编译

    • Hive编译

    • Kafka编译

    • Solr编译

    • Tez编译

  • 扩展组件编译

  • 源码编译
  • 官方组件编译
  • Flink编译
  • version-1.17.2
JaneTTR
2025-05-06
目录
编译适配总结:最终补丁整理
完整 diff 补丁内容如下

[O]Flink版本适配改造(五)

# 编译适配总结:最终补丁整理

经过前几节的连续改造,我们已实现了 Node.js 安装加速、权限修复、依赖安装稳定化等关键优化。

下述补丁可直接应用于 Flink 1.17.2 的源码中版本验证 ,确保以下命令执行无误:

mvn install -Drat.skip=true -DskipTests -Dhadoop.version=3.3.4
1

# 完整 diff 补丁内容如下

以下为对 flink-runtime-web/pom.xml 的补丁:

Subject: [PATCH] fixed: 1.17.2 对于node 的一些加速
---
Index: flink-runtime-web/pom.xml
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/flink-runtime-web/pom.xml b/flink-runtime-web/pom.xml
--- a/flink-runtime-web/pom.xml	(revision 207b5d7adfb63215c12896fce6c1eb55edd64c84)
+++ b/flink-runtime-web/pom.xml	(date 1746854832500)
@@ -247,6 +247,8 @@
 				</executions>
 			</plugin>
 
+
+			<!-- 1) 安装 Node + npm -->
 			<plugin>
 				<groupId>com.github.eirslett</groupId>
 				<artifactId>frontend-maven-plugin</artifactId>
@@ -254,33 +256,75 @@
 				<executions>
 					<execution>
 						<id>install node and npm</id>
+						<phase>generate-resources</phase>
 						<goals>
 							<goal>install-node-and-npm</goal>
 						</goals>
 						<configuration>
 							<nodeVersion>v16.13.2</nodeVersion>
 							<npmVersion>8.1.2</npmVersion>
+							<nodeDownloadRoot>https://cdn.npmmirror.com/binaries/node/</nodeDownloadRoot>
+							<npmDownloadRoot>https://registry.npmmirror.com/npm/-/</npmDownloadRoot>
 						</configuration>
 					</execution>
+				</executions>
+				<configuration>
+					<workingDirectory>web-dashboard</workingDirectory>
+				</configuration>
+			</plugin>
+			<!-- 2) 修复 npm 可执行权限 -->
+			<plugin>
+				<groupId>org.apache.maven.plugins</groupId>
+				<artifactId>maven-antrun-plugin</artifactId>
+				<version>3.0.0</version>
+				<executions>
+					<execution>
+						<id>fix-npm-permissions</id>
+						<phase>generate-resources</phase>
+						<goals>
+							<goal>run</goal>
+						</goals>
+						<configuration>
+							<target>
+								<echo message=">>> chmod 755 web-dashboard/node/npm" />
+								<chmod file="${project.basedir}/web-dashboard/node/npm" perm="755"/>
+							</target>
+						</configuration>
+					</execution>
+				</executions>
+			</plugin>
+
+			<!-- 3) npm install -->
+			<plugin>
+				<groupId>com.github.eirslett</groupId>
+				<artifactId>frontend-maven-plugin</artifactId>
+				<version>1.11.0</version>
+				<executions>
 					<execution>
 						<id>npm install</id>
+						<phase>process-resources</phase>
 						<goals>
 							<goal>npm</goal>
 						</goals>
 						<configuration>
-							<arguments>ci --cache-max=0 --no-save ${npm.proxy}</arguments>
+							<arguments>install --unsafe-perm --verbose --progress</arguments>
+							<npmRegistryURL>https://registry.npmmirror.com/</npmRegistryURL>
 							<environmentVariables>
 								<HUSKY_SKIP_INSTALL>true</HUSKY_SKIP_INSTALL>
+								<HOME>${project.build.directory}/.npmhome</HOME>
 							</environmentVariables>
 						</configuration>
 					</execution>
+
+					<!-- 4) ci-check -->
 					<execution>
 						<id>npm run ci-check</id>
+						<phase>process-resources</phase>
 						<goals>
 							<goal>npm</goal>
 						</goals>
 						<configuration>
-							<arguments>run ci-check</arguments>
+							<arguments>run ci-check --verbose</arguments>
 						</configuration>
 					</execution>
 				</executions>


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
#Flink#Bigtop#源码编译#版本适配#Maven
[O]Flink版本适配改造(四)
[B]Flink版本适配改造(一)

← [O]Flink版本适配改造(四) [B]Flink版本适配改造(一)→

最近更新
01
当前版本 2026/08
08-29
02
把 Ambari Server HA 稳稳地跑起来
08-17
03
从一次启用操作追到主备就绪
08-17
更多文章>
Theme by Vdoing | Copyright © 2017-2026 JaneTTR | MIT License
  • 跟随系统
  • 浅色模式
  • 深色模式
  • 阅读模式