In order to support paimon with hive2, we need to modify the origin HiveMetastoreClient.java
to let it compatible with both hive2 and hive3.
And this modified HiveMetastoreClient should be at the front of the CLASSPATH, so that
it can overwrite the HiveMetastoreClient in hadoop jar.
This PR mainly changes:
1. Copy HiveMetastoreClient.java in FE to BE's preload jar.
2. Split the origin `preload-extensions-jar-with-dependencies.jar` into 2 jars
1. `preload-extensions-project.jar`, which contains the modified HiveMetastoreClient.
2. `preload-extensions-jar-with-dependencies.jar`, which contains other dependency jars.
3. Modify the `start_be.sh`, to let `preload-extensions-project.jar` be loaded first.
4. Change the way the assemble the jni scanner jar
Only need to assemble the project jar, without other dependencies.
Because actually we only use classed under `org.apache.doris` package.
So remove other unused dependency jars can also reduce the output size of BE.
5. fix bug that the prefix of paimon properties should be `paimon.`, not `paimon`
6. Support paimon with hive2
User can set `hive.version` in paimon catalog properties to specify the hive version.
281 lines
11 KiB
XML
281 lines
11 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!--
|
|
Licensed to the Apache Software Foundation (ASF) under one
|
|
or more contributor license agreements. See the NOTICE file
|
|
distributed with this work for additional information
|
|
regarding copyright ownership. The ASF licenses this file
|
|
to you under the Apache License, Version 2.0 (the
|
|
"License"); you may not use this file except in compliance
|
|
with the License. You may obtain a copy of the License at
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
Unless required by applicable law or agreed to in writing,
|
|
software distributed under the License is distributed on an
|
|
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
KIND, either express or implied. See the License for the
|
|
specific language governing permissions and limitations
|
|
under the License.
|
|
-->
|
|
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
|
<parent>
|
|
<artifactId>be-java-extensions</artifactId>
|
|
<groupId>org.apache.doris</groupId>
|
|
<version>${revision}</version>
|
|
</parent>
|
|
<modelVersion>4.0.0</modelVersion>
|
|
|
|
<artifactId>preload-extensions</artifactId>
|
|
|
|
<properties>
|
|
<maven.compiler.source>8</maven.compiler.source>
|
|
<maven.compiler.target>8</maven.compiler.target>
|
|
<scala.binary.version>2.12</scala.binary.version>
|
|
<spark.version>3.2.0</spark.version>
|
|
<janino.version>3.0.16</janino.version>
|
|
</properties>
|
|
|
|
<dependencies>
|
|
<dependency>
|
|
<groupId>org.apache.arrow</groupId>
|
|
<artifactId>arrow-memory-unsafe</artifactId>
|
|
<version>${arrow.version}</version>
|
|
<scope>compile</scope>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.apache.parquet</groupId>
|
|
<artifactId>parquet-avro</artifactId>
|
|
<version>1.10.1</version>
|
|
<scope>compile</scope>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.scala-lang</groupId>
|
|
<artifactId>scala-library</artifactId>
|
|
<version>${scala.version}</version>
|
|
<scope>compile</scope>
|
|
</dependency>
|
|
<!-- For Avro and Hudi Scanner PreLoad -->
|
|
<dependency>
|
|
<groupId>org.apache.hadoop</groupId>
|
|
<artifactId>hadoop-common</artifactId>
|
|
<!-- Must be provided, we use hadoop_libs in BE's 3rd party instead -->
|
|
<scope>provided</scope>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.apache.hudi</groupId>
|
|
<artifactId>hudi-spark-client</artifactId>
|
|
<version>${hudi.version}</version>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.apache.hudi</groupId>
|
|
<artifactId>hudi-spark-common_${scala.binary.version}</artifactId>
|
|
<version>${hudi.version}</version>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.apache.avro</groupId>
|
|
<artifactId>avro</artifactId>
|
|
<exclusions>
|
|
<exclusion>
|
|
<groupId>org.apache.avro</groupId>
|
|
<artifactId>avro-tools</artifactId>
|
|
</exclusion>
|
|
</exclusions>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.apache.hudi</groupId>
|
|
<artifactId>hudi-spark3-common</artifactId>
|
|
<version>${hudi.version}</version>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.apache.hudi</groupId>
|
|
<artifactId>hudi-spark3.2.x_${scala.binary.version}</artifactId>
|
|
<version>${hudi.version}</version>
|
|
<exclusions>
|
|
<exclusion>
|
|
<artifactId>json4s-ast_2.11</artifactId>
|
|
<groupId>org.json4s</groupId>
|
|
</exclusion>
|
|
<exclusion>
|
|
<artifactId>json4s-core_2.11</artifactId>
|
|
<groupId>org.json4s</groupId>
|
|
</exclusion>
|
|
<exclusion>
|
|
<artifactId>json4s-jackson_2.11</artifactId>
|
|
<groupId>org.json4s</groupId>
|
|
</exclusion>
|
|
<exclusion>
|
|
<artifactId>json4s-scalap_2.11</artifactId>
|
|
<groupId>org.json4s</groupId>
|
|
</exclusion>
|
|
</exclusions>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.apache.spark</groupId>
|
|
<artifactId>spark-core_${scala.binary.version}</artifactId>
|
|
<exclusions>
|
|
<exclusion>
|
|
<groupId>javax.servlet</groupId>
|
|
<artifactId>*</artifactId>
|
|
</exclusion>
|
|
<exclusion>
|
|
<artifactId>jackson-module-scala_2.12</artifactId>
|
|
<groupId>com.fasterxml.jackson.module</groupId>
|
|
</exclusion>
|
|
<exclusion>
|
|
<artifactId>hadoop-client-api</artifactId>
|
|
<groupId>org.apache.hadoop</groupId>
|
|
</exclusion>
|
|
<exclusion>
|
|
<artifactId>hadoop-client-runtime</artifactId>
|
|
<groupId>org.apache.hadoop</groupId>
|
|
</exclusion>
|
|
</exclusions>
|
|
<version>${spark.version}</version>
|
|
<scope>compile</scope>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.apache.spark</groupId>
|
|
<artifactId>spark-sql_${scala.binary.version}</artifactId>
|
|
<version>${spark.version}</version>
|
|
<scope>compile</scope>
|
|
<exclusions>
|
|
<exclusion>
|
|
<artifactId>hadoop-client-api</artifactId>
|
|
<groupId>org.apache.hadoop</groupId>
|
|
</exclusion>
|
|
</exclusions>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.apache.spark</groupId>
|
|
<artifactId>spark-launcher_${scala.binary.version}</artifactId>
|
|
<version>${spark.version}</version>
|
|
<scope>compile</scope>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.apache.spark</groupId>
|
|
<artifactId>spark-catalyst_${scala.binary.version}</artifactId>
|
|
<version>${spark.version}</version>
|
|
<scope>compile</scope>
|
|
<exclusions>
|
|
<exclusion>
|
|
<groupId>org.codehaus.janino</groupId>
|
|
<artifactId>janino</artifactId>
|
|
</exclusion>
|
|
<exclusion>
|
|
<groupId>org.codehaus.janino</groupId>
|
|
<artifactId>commons-compiler</artifactId>
|
|
</exclusion>
|
|
</exclusions>
|
|
</dependency>
|
|
<dependency>
|
|
<!-- version of spark's janino is error -->
|
|
<groupId>org.codehaus.janino</groupId>
|
|
<artifactId>janino</artifactId>
|
|
<version>${janino.version}</version>
|
|
<exclusions>
|
|
<exclusion>
|
|
<groupId>org.codehaus.janino</groupId>
|
|
<artifactId>commons-compiler</artifactId>
|
|
</exclusion>
|
|
</exclusions>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.codehaus.janino</groupId>
|
|
<artifactId>commons-compiler</artifactId>
|
|
<version>${janino.version}</version>
|
|
</dependency>
|
|
<dependency>
|
|
<!-- version of spark's jackson module is error -->
|
|
<groupId>com.fasterxml.jackson.module</groupId>
|
|
<artifactId>jackson-module-scala_${scala.binary.version}</artifactId>
|
|
<version>${jackson.version}</version>
|
|
<exclusions>
|
|
<exclusion>
|
|
<groupId>com.google.guava</groupId>
|
|
<artifactId>guava</artifactId>
|
|
</exclusion>
|
|
</exclusions>
|
|
</dependency>
|
|
<!-- For JDBC Scanner PreLoad-->
|
|
<dependency>
|
|
<groupId>com.oracle.database.jdbc</groupId>
|
|
<artifactId>ojdbc8</artifactId>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>com.alibaba</groupId>
|
|
<artifactId>druid</artifactId>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>com.clickhouse</groupId>
|
|
<artifactId>clickhouse-jdbc</artifactId>
|
|
<classifier>all</classifier>
|
|
<scope>compile</scope>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>com.oracle.ojdbc</groupId>
|
|
<artifactId>orai18n</artifactId>
|
|
<version>19.3.0.0</version>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.apache.doris</groupId>
|
|
<artifactId>hive-catalog-shade</artifactId>
|
|
</dependency>
|
|
<!-- For BE CosN Access -->
|
|
<dependency>
|
|
<groupId>org.apache.hadoop</groupId>
|
|
<artifactId>hadoop-cos</artifactId>
|
|
<version>3.3.5</version>
|
|
</dependency>
|
|
<!-- For BE Paimon OSS/S3 Access -->
|
|
<dependency>
|
|
<groupId>org.apache.paimon</groupId>
|
|
<artifactId>paimon-s3</artifactId>
|
|
<version>${paimon.version}</version>
|
|
</dependency>
|
|
|
|
<dependency>
|
|
<groupId>org.apache.paimon</groupId>
|
|
<artifactId>paimon-oss</artifactId>
|
|
<version>${paimon.version}</version>
|
|
</dependency>
|
|
</dependencies>
|
|
|
|
<build>
|
|
<finalName>preload-extensions</finalName>
|
|
<plugins>
|
|
<plugin>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-assembly-plugin</artifactId>
|
|
<executions>
|
|
<execution>
|
|
<id>make-assembly-project</id>
|
|
<phase>package</phase>
|
|
<goals>
|
|
<goal>single</goal>
|
|
</goals>
|
|
<configuration>
|
|
<descriptors>
|
|
<descriptor>src/main/resources/package-proj.xml</descriptor>
|
|
</descriptors>
|
|
</configuration>
|
|
</execution>
|
|
<execution>
|
|
<id>make-assembly-deps</id>
|
|
<phase>package</phase>
|
|
<goals>
|
|
<goal>single</goal>
|
|
</goals>
|
|
<configuration>
|
|
<descriptors>
|
|
<descriptor>src/main/resources/package-deps.xml</descriptor>
|
|
</descriptors>
|
|
</configuration>
|
|
</execution>
|
|
</executions>
|
|
</plugin>
|
|
</plugins>
|
|
</build>
|
|
</project>
|