-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Expand file tree
/
Copy pathpom.xml
More file actions
145 lines (137 loc) · 6.89 KB
/
Copy pathpom.xml
File metadata and controls
145 lines (137 loc) · 6.89 KB
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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
<?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">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.apache.doris</groupId>
<artifactId>fe-filesystem</artifactId>
<version>${revision}</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>fe-filesystem-obs</artifactId>
<packaging>jar</packaging>
<name>Doris FE Filesystem - OBS</name>
<description>Huawei Cloud OBS filesystem provider for Doris FE using the native OBS SDK.</description>
<dependencies>
<dependency>
<groupId>org.apache.doris</groupId>
<artifactId>fe-filesystem-spi</artifactId>
<version>${revision}</version>
<!-- SPI/API (and its transitive fe-extension-spi) live on the fe-core host classpath
and are loaded parent-first; provided so they are not bundled into the plugin lib/. -->
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.doris</groupId>
<artifactId>fe-foundation</artifactId>
<version>${revision}</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
</dependency>
<!-- Huawei Cloud OBS native SDK (presigned URL via TemporarySignature) -->
<dependency>
<groupId>com.huaweicloud</groupId>
<artifactId>esdk-obs-java-bundle</artifactId>
<version>${esdk-obs.version}</version>
</dependency>
<!-- Huawei Cloud IAM SDK (getStsToken via IamClient) -->
<dependency>
<groupId>com.huaweicloud.sdk</groupId>
<artifactId>huaweicloud-sdk-iam</artifactId>
<version>${huaweicloud-sdk-iam.version}</version>
</dependency>
<!-- Supplies org.apache.hadoop.fs.obs.OBSFileSystem. Nothing here calls it: this module reaches OBS
through the native esdk SDK above, and the ONLY reference is the initialize=false
Class.forName probe in ObsFileSystemProperties, which decides whether toHadoopConfigurationMap
emits fs.obs.impl=OBSFileSystem or falls back to fs.obs.impl=S3AFileSystem. The probe resolves
against THIS module's own classloader, so the jar has to sit in this plugin for the probe to
tell the truth. Consumers that actually instantiate the class carry their own copy
(fe-connector-paimon, be-java-extensions/hadoop-deps); fe-connector-iceberg needs none because
it normalizes obs:// to s3 and goes through S3AFileSystem.
runtime scope keeps it off the compile classpath; plugin-zip.xml packs the runtime closure.
com/obs/* DUPLICATION — read before touching versions or artifact names. The -hw-46 jar is a
fat jar that inlines the whole esdk SDK (762 com/obs/* classes, identical to the
esdk-obs-java-optimised 3.21.8.2 content), and esdk-obs-java-bundle above ships 511 of which
510 collide. That is TWO copies of com.obs.services.ObsClient in this plugin's lib/, at
DIFFERENT versions (3.21.11 declared above vs 3.21.8.2 inlined here), and ObsObjStorage
compiles against the former. DirectoryPluginRuntimeManager.collectJars sorts lib/ jars
lexicographically, so "esdk-obs-java-bundle-*" precedes "hadoop-huaweicloud-*" and the
declared 3.21.11 wins — correct, but only because of that ordering. If either artifact is
renamed or the esdk coordinates change, re-check that the bundle still sorts first.
The transitive esdk-obs-java-optimised is excluded below: it is a third, redundant copy of
the same classes already inlined in the fat jar, and the only one that could shadow the
declared bundle if the sort order ever shifted.
NOTE: the -hw-46 artifact is NOT in Maven Central; it comes from the huawei-obs-sdk repo
declared in <repositories> below (fe-connector-paimon declares the same repo for the same dep). -->
<dependency>
<groupId>com.huaweicloud</groupId>
<artifactId>hadoop-huaweicloud</artifactId>
<scope>runtime</scope>
<exclusions>
<exclusion>
<groupId>com.huaweicloud</groupId>
<artifactId>esdk-obs-java-optimised</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<repositories>
<!-- for huawei obs sdk (hadoop-huaweicloud is not published to Maven Central) -->
<repository>
<id>huawei-obs-sdk</id>
<url>https://repo.huaweicloud.com/repository/maven/huaweicloudsdk/</url>
</repository>
</repositories>
<build>
<finalName>doris-fe-filesystem-obs</finalName>
<plugins>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<appendAssemblyId>false</appendAssemblyId>
<descriptors>
<descriptor>src/main/assembly/plugin-zip.xml</descriptor>
</descriptors>
</configuration>
<executions>
<execution>
<id>make-assembly</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>