TT Bigdata TT Bigdata
首页
  • 部署专题

    • 常规安装
    • 一键部署
  • 组件安装

    • 常规&高可用
  • 版本专题

    • 更新说明
  • Ambari-Env

    • 环境准备
    • 开始使用
  • 组件编译

    • 专区—Ambari
    • 专区—Bigtop-官方组件
    • 专区—Bigtop-扩展组件
  • 报错解决

    • 专区—Ambari
    • 专区—Bigtop
  • 其他技巧

    • Maven镜像加速
    • Gradle镜像加速
    • Bower镜像加速
    • 虚拟环境思路
    • R环境安装+一键安装脚本
    • Ivy配置私有镜像仓库
    • Node.js 多版本共存方案
    • Ambari Web本地启动
    • Npm镜像加速
    • PostgreSQL快速安装
    • Temurin JDK 23快速安装
  • 成神之路

    • 专区—Ambari
    • 专区—Bigtop
  • 集成案例

    • Redis集成教学
    • Dolphin集成教学
    • Doris集成教学
    • 持续整理...
  • 核心代码

    • 各组件代码
    • 通用代码模板
  • 国产化&其他系统

    • Rocky系列
    • Ubuntu系列
  • 生产调优

    • 组件调优指南
    • 1v1指导调优
  • 支持&共建

    • 蓝图愿景
    • 技术支持
    • 合作共建
登陆
GitHub (opens new window)

JaneTTR

数据酿造智慧,每一滴都是沉淀!
首页
  • 部署专题

    • 常规安装
    • 一键部署
  • 组件安装

    • 常规&高可用
  • 版本专题

    • 更新说明
  • Ambari-Env

    • 环境准备
    • 开始使用
  • 组件编译

    • 专区—Ambari
    • 专区—Bigtop-官方组件
    • 专区—Bigtop-扩展组件
  • 报错解决

    • 专区—Ambari
    • 专区—Bigtop
  • 其他技巧

    • Maven镜像加速
    • Gradle镜像加速
    • Bower镜像加速
    • 虚拟环境思路
    • R环境安装+一键安装脚本
    • Ivy配置私有镜像仓库
    • Node.js 多版本共存方案
    • Ambari Web本地启动
    • Npm镜像加速
    • PostgreSQL快速安装
    • Temurin JDK 23快速安装
  • 成神之路

    • 专区—Ambari
    • 专区—Bigtop
  • 集成案例

    • Redis集成教学
    • Dolphin集成教学
    • Doris集成教学
    • 持续整理...
  • 核心代码

    • 各组件代码
    • 通用代码模板
  • 国产化&其他系统

    • Rocky系列
    • Ubuntu系列
  • 生产调优

    • 组件调优指南
    • 1v1指导调优
  • 支持&共建

    • 蓝图愿景
    • 技术支持
    • 合作共建
登陆
GitHub (opens new window)
  • Sqoop编译

  • Ranger编译

  • Phoenix编译

  • Dolphinscheduler编译

  • Doris编译

  • Cloudbeaver编译

  • Atlas编译

  • Superset编译

  • Celeborn编译

  • Ozone编译

  • Impala编译

  • Trino编译

    • version-474

      • Trino_474 编译
      • [O] Trino 版本适配改造(一)
        • 背景说明
        • 为什么需要移除 node 检查
        • 适配后的优势
        • 常见问题与处理建议
        • 补丁完整内容如下
      • [O] Trino 版本适配改造(二)
      • [B] Trino 版本适配改造(一)
      • [B] Trino 版本适配改造(二)
      • [B] Trino 版本适配改造(三)
  • Paimon编译

  • Hudi编译

  • 组件编译-Bigtop-增强
  • Trino编译
  • version-474
JaneTTR
2025-05-06
目录

[O] Trino 版本适配改造(一)

# 背景说明

Trino 的源码构建流程中,Web UI 前端默认会在 verify 阶段引入 Node 检查环节,这一机制在外网环境下通常无感,但在离线、内网、企业 CI/CD 等场景下,容易因为依赖缺失、网络不通而导致编译失败。

实际企业适配时,node 检查相关流程对环境敏感度极高,一旦卡住会导致整体构建中断,且日志溯源复杂,尤其是自动化管道里,问题更隐蔽。

# 为什么需要移除 node 检查

提示

Trino Web 前端工程的 node 检查主要目的是保障源码二次开发时产物可控。但对大多数集成/打包/适配场景,其实更关注最终功能与 rpm/deb 制品的完整性,而非本地开发环境的一致性。

实际生产环境中,常见的编译痛点有:

  • 离线或内网环境无法拉取 npm 包,npm run check 一步直接失败
  • node 版本不兼容,部分依赖包编译不过
  • Jenkins、GitLab CI 等流水线环境权限受限,导致前端构建链路异常
  • 产物复用场景下无需重复校验 node,仅需保证前端资源已预编译即可

# 适配后的优势

优势点 说明
编译链路更稳定 剔除 node 检查后,整个构建流程显著减少对外部依赖的要求 更灵活
适配场景更丰富 兼容内网、离线、半自动化、多平台等企业级实际使用环境
问题定位更高效 编译日志简化,错误溯源聚焦在实际业务模块
批量构建更便捷 支持批量、多版本自动化构建,无需为每台机器反复配置前端环境

# 常见问题与处理建议

常见报错

如遇到 npm: command not found、Unable to download node package 等类似报错,基本均为 node 校验相关。

推荐处理方法:

  1. 参考本文补丁,移除或注释掉 Trino 前端 node 检查相关 execution
  2. 若需保留前端开发能力,建议本地提前构建好静态资源,再进行后续的主线编译
  3. 按需禁用部分无关插件(如 git-commit-id、sortpom),减少工具链偶发冲突

# 补丁完整内容如下

Subject: [PATCH] [fixed] 去掉node check
---
Index: core/trino-web-ui/pom.xml
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/core/trino-web-ui/pom.xml b/core/trino-web-ui/pom.xml
--- a/core/trino-web-ui/pom.xml	(revision 0cba1d64a2e993a6f5e75420b23e424f1d887908)
+++ b/core/trino-web-ui/pom.xml	(revision 47b25b47700dc5bae231351850bc7861554e8b3b)
@@ -103,28 +103,28 @@
                             <workingDirectory>src/main/resources/webapp/src</workingDirectory>
                         </configuration>
                     </execution>
-                    <execution>
-                        <id>check (webapp)</id>
-                        <goals>
-                            <goal>npm</goal>
-                        </goals>
-                        <phase>verify</phase>
-                        <configuration>
-                            <arguments>run ${frontend.check.goal}</arguments>
-                            <workingDirectory>src/main/resources/webapp/src</workingDirectory>
-                        </configuration>
-                    </execution>
-                    <execution>
-                        <id>check (webapp-preview)</id>
-                        <goals>
-                            <goal>npm</goal>
-                        </goals>
-                        <phase>verify</phase>
-                        <configuration>
-                            <arguments>run ${frontend.check.goal}</arguments>
-                            <workingDirectory>src/main/resources/webapp-preview</workingDirectory>
-                        </configuration>
-                    </execution>
+<!--                    <execution>-->
+<!--                        <id>check (webapp)</id>-->
+<!--                        <goals>-->
+<!--                            <goal>npm</goal>-->
+<!--                        </goals>-->
+<!--                        <phase>verify</phase>-->
+<!--                        <configuration>-->
+<!--                            <arguments>run ${frontend.check.goal}</arguments>-->
+<!--                            <workingDirectory>src/main/resources/webapp/src</workingDirectory>-->
+<!--                        </configuration>-->
+<!--                    </execution>-->
+<!--                    <execution>-->
+<!--                        <id>check (webapp-preview)</id>-->
+<!--                        <goals>-->
+<!--                            <goal>npm</goal>-->
+<!--                        </goals>-->
+<!--                        <phase>verify</phase>-->
+<!--                        <configuration>-->
+<!--                            <arguments>run ${frontend.check.goal}</arguments>-->
+<!--                            <workingDirectory>src/main/resources/webapp-preview</workingDirectory>-->
+<!--                        </configuration>-->
+<!--                    </execution>-->
                     <execution>
                         <id>package (webapp-preview)</id>
                         <goals>
Index: pom.xml
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/pom.xml b/pom.xml
--- a/pom.xml	(revision 0cba1d64a2e993a6f5e75420b23e424f1d887908)
+++ b/pom.xml	(revision 47b25b47700dc5bae231351850bc7861554e8b3b)
@@ -3008,5 +3008,36 @@
                 </plugins>
             </build>
         </profile>
+        <profile>
+            <id>disable-git-plugin</id>
+            <build>
+                <plugins>
+                    <plugin>
+                        <groupId>io.github.git-commit-id</groupId>
+                        <artifactId>git-commit-id-maven-plugin</artifactId>
+                        <configuration>
+                            <skip>true</skip>
+                        </configuration>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+        <profile>
+            <id>disable-sortpom</id>
+            <build>
+                <plugins>
+                    <plugin>
+                        <groupId>com.github.ekryd.sortpom</groupId>
+                        <artifactId>sortpom-maven-plugin</artifactId>
+                        <executions>
+                            <execution>
+                                <id>default</id>
+                                <phase>none</phase> <!-- 禁用插件的执行 -->
+                            </execution>
+                        </executions>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
     </profiles>
 </project>

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
100
101
102
103
104
105
106
107
#Trino#Bigtop#版本适配
Trino_474 编译
[O] Trino 版本适配改造(二)

← Trino_474 编译 [O] Trino 版本适配改造(二)→

最近更新
01
bigtop-select 打包缺 compat 报错修复 deb
07-16
02
bigtop-select 打包缺 control 文件报错修复 deb
07-16
03
首次编译-环境初始化 必装
07-16
更多文章>
Theme by Vdoing | Copyright © 2017-2025 JaneTTR | MIT License
  • 跟随系统
  • 浅色模式
  • 深色模式
  • 阅读模式