title: Hudi 编译
date: 2022-07-26T14:51:26+08:00
draft: false
categories:
tags:
keywords:
编译命令
1
2
3
mvn clean install -DskipTests -Dmaven.test.skip=true -Dscala-2.12 -Dhadoop.version=3.0.0-cdh6.2.0 -Pflink1.15 -Pflink-bundle-shade-hive2 -T4C --settings ~/.m2/flink-settings.xml
mvn clean install -DskipTests -Dmaven.test.skip=true -Dscala-2.12 -Dhadoop.version=3.0.0-cdh6.2.0 -Pflink1.17 -Pflink-bundle-shade-hive2 -T20C
编译报错遇到缺失 jar 包
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
mvn install:install-file -DgroupId=io.confluent -DartifactId=kafka-avro-serializer -Dversion=5.3.4 -Dpackaging=jar -Dfile=/mnt/d/Users/Administrator/Downloads/kafka-av
ro-serializer-5.3.4.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/kafka-avro-serializer-5.3.4.jar to /home/xfhuang/.m2/repository/io/confluent/kafka-avro-serializer/5.3.4/kafka-avro-serializer-5.3.4.jar
[INFO] Installing /tmp/mvninstall7988030215677885116.pom to /home/xfhuang/.m2/repository/io/confluent/kafka-avro-serializer/5.3.4/kafka-avro-serializer-5.3.4.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.537 s
[INFO] Finished at: 2022-07-26T14:49:36+08:00
[INFO] ------------------------------------------------------------------------
~
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
kafka-schema-registry-client
mvn install:install-file -DgroupId=io.confluent -DartifactId=kafka-schema-registry-client -Dversion=5.3.4 -Dpackaging=jar -Dfile=/mnt/d/Users/Administrator/Downloads/kafka-schema-registry-client-5.3.4.jar
kafka-connect-avro-converter
mvn install:install-file -DgroupId=io.confluent -DartifactId=kafka-connect-avro-converter -Dversion=5.3.4 -Dpackaging=jar -Dfile=/mnt/d/Users/Administrator/Downloads/kafka-schema-registry-5.3.4.jar
common-config
mvn install:install-file -DgroupId=io.confluent -DartifactId=common-config -Dversion=5.3.4 -Dpackaging=jar -Dfile=/mnt/d/Users/Administrator/Downloads/common-config-5.3.4.jar
common-utils
mvn install:install-file -DgroupId=io.confluent -DartifactId=common-utils -Dversion=5.3.4 -Dpackaging=jar -Dfile=/mnt/d/Users/Administrator/Downloads/common-utils-5.3.4.jar
4.hudi-timeline-service 模块参数不兼容问题
4.1 报错如下
1
2
3
4
5
6
7
8
9
10
11
12
13
[ERROR] Failed to execute goal org . apache . maven . plugins : maven - compiler - plugin : 3.8 . 0 : compile ( default - compile ) on project hudi - timeline - service : Compilation failure
[ERROR] / data / HDP_Codebase / hudi - 0.13 . 1 / hudi - timeline - service / src / main / java / org / apache / hudi / timeline / service / TimelineService . java :[ 348 , 115 ] incompatible types : int cannot be converted to java . lang . ClassLoader
[ERROR]
[ERROR] -> [ Help 1 ]
[ERROR]
[ERROR] To see the full stack trace of the errors , re - run Maven with the - e switch .
[ERROR] Re - run Maven using the - X switch to enable full debug logging .
[ERROR]
[ERROR] For more information about the errors and possible solutions , please read the following articles :
[ERROR] [ Help 1 ] http : //cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
[ERROR]
[ERROR] After correcting the problems , you can resume the build with the command
[ERROR] mvn < args > - rf : hudi - timeline - service
编译 hudi 0.13.0 的版本事遇到:
1
mvn clean install -DskipTests -Dmaven.test.skip=true -Dscala-2.12 -Dhadoop.version=3.0.0-cdh6.2.0 -Pflink1.15 -Pflink-bundle-shade-hive3 -T4C --settings ~/.m2/flink-settings.xml
4.2 代码传参异常,ScheduledExecutorScheduler 第三个参数为 ClassLoader
1
2
3
final Server server = new Server ( pool );
ScheduledExecutorScheduler scheduler = new ScheduledExecutorScheduler ( "TimelineService-JettyScheduler" , true , 8 );
server . addBean ( scheduler );
支持 2 个参数,去掉第三个参数调整为
final Server server = new Server(pool);
ScheduledExecutorScheduler scheduler = new ScheduledExecutorScheduler(“TimelineService-JettyScheduler”, true);
server.addBean(scheduler);
flink1.17 编译
1
2
3
4
5
6
7
mvn clean install -DskipTests -Dmaven.test.skip=true -Dscala-2.12 -Dhadoop.version=3.0.0-cdh6.2.0 -Pflink1.17 -Pflink-bundle-shade-hive2 -T4C --settings ~/.m2/flink-settings.xml
mvn clean install -Dspark3.2 -DskipTests -Dmaven.test.skip=true -Dscala-2.12 -Dhadoop.version=3.0.0 -Pflink1.17 -Pflink-bundle-shade-hive2 -D -T4C --settings ~/.m2/settings-flink.xml
编译spark3.4
mvn clean install -DskipTests -Dmaven.test.skip=true -Dscala-2.12 -Dspark3.4 -T4C --settings ~/.m2/settings-flink.xml
mvn clean install -Pjava17 -DskipTests -Dmaven.test.skip=true -Dscala-2.12 -T4C -Drat.skip=true
install snapshot
1
2
3
mvn install:install-file -DgroupId=org.apache.hudi -DartifactId=hudi-spark_2.12 -Dversion=1.0.0-SNAPSHOT -Dpackaging=jar -Dfile=./hudi-spark_2.12-1.0.0-SNAPSHOT.jar
mvn install:install-file -DgroupId=org.apache.hudi -DartifactId=hudi-spark3.2.x_2.12 -Dversion=1.0.0-SNAPSHOT -Dpackaging=jar -Dfile=./hudi-spark3.2.x_2.12-1.0.0-SNAPSHOT.jar
更新 by20231025
1
mvn clean install -Dspark3.2 -DskipTests -Dmaven.test.skip=true -Dscala-2.12 -Dhadoop.version=3.0.0 -Pflink1.17 -Pflink-bundle-shade-hive2 -T4C --settings ~/.m2/settings-flink.xml
这样编译的 spark3.2 的 bundle 包
Licensed under CC BY-NC-SA 4.0
最后更新于 Jan 06, 2025 05:52 UTC