trino手动编译

根据网上的信息,Trino 是一个开源的分布式 SQL 查询引擎,用于对大数据进行高效的分析1。Trino 原名 PrestoSQL,是由 Presto 社区在 2019 年创建的一个分支项目,以区别于 Facebook 维护的 PrestoDB2。Trino 和 PrestoDB 有很多相同的特性和功能,但也有一些不同之处3

下载源码,进行编译

1
2
3
 pc git clone git@github.com:trinodb/trino.git
cd trino
./mvnw clean install -skipTests

安装过程中会报错 Can’t foud com.github.everit-org.json-schema:org.everit.json.schema:jar:1.12.1

解决办法如下:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
 mvn install:install-file -Dfile=/mnt/d/Users/Administrator/Downloads/org.everit.json.schema-1.13.0.jar -DgroupId=com.github.everit-org.json-schema -DartifactId=org.everit.json.schema -Dversion=1.13.0 -Dpackaging=jar
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------< org.apache.maven:standalone-pom >-------------------
[INFO] Building Maven Stub Project (No POM) 1
[INFO] --------------------------------[ pom ]---------------------------------
[INFO]
[INFO] --- maven-install-plugin:2.4:install-file (default-cli) @ standalone-pom ---
[INFO] Installing /mnt/d/Users/Administrator/Downloads/org.everit.json.schema-1.13.0.jar to /home/xfhuang/.m2/repository/com/github/everit-org/json-schema/org.everit.json.schema/1.13.0/org.everit.json.schema-1.13.0.jar
[INFO] Installing /tmp/mvninstall18325866100330339761.pom to /home/xfhuang/.m2/repository/com/github/everit-org/json-schema/org.everit.json.schema/1.13.0/org.everit.json.schema-1.13.0.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  0.794 s
[INFO] Finished at: 2023-03-21T17:04:05+08:00
[INFO] ------------------------------------------------------------------------

另外还需要在 trino-kafka 下的 pom 文件中,

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
<dependency>
            <groupId>io.confluent</groupId>
            <artifactId>kafka-json-schema-serializer</artifactId>
            <!-- This is under Confluent Community License and it should not be used with compile scope -->
            <scope>test</scope>
            <!-- 添加1.12.1的版本的去除-->
            <exclusions>
                <exclusion>
                    <groupId>com.github.everit-org.json-schema</groupId>
                    <artifactId>org.everit.json.schema</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

编译过程遇到这个报错·Rule 6: org.apache.maven.plugins.enforcer.EnforceBytecodeVersion failed with message: *drift-codec-1.14.jar·,google 了一下,依然没有解决,最后删掉这个 jar 包,重新编译跑起来,尽然成功了。

image-20230322094535719

参考文档:

maven 如何将本地 jar 安装到本地仓库

https://github.com/trinodb/trino/issues/12474

Licensed under CC BY-NC-SA 4.0
最后更新于 Jan 06, 2025 05:52 UTC
comments powered by Disqus
Built with Hugo
主题 StackJimmy 设计
Caret Up