Skip to content

Commit 409300a

Browse files
committed
[P4-T09] make fe-core dependency tree odps-free: drop odps deps, sink MCUtils into BE
Completes the requirement that fe-core have zero odps (direct or transitive). - fe-core/pom.xml: remove the two direct odps deps (odps-sdk-core, odps-sdk-table-api). fe-core source is already odps-free after the legacy removal, so the drop is compile-safe. - Sink MCUtils from fe-common into be-java-extensions/max-compute-connector (package org.apache.doris.maxcompute) -- its only consumer after the legacy removal. The JNI scanner/writer drop the now-same-package import; MCProperties (odps-free constants) stays in fe-common. - fe-common/pom.xml: drop odps-sdk-core. It was also leaking netty + protobuf transitively to fe-common's own DorisHttpException / GsonUtilsBase, so declare netty-all + protobuf-java directly (proper dependency hygiene). Verified: mvn -pl :fe-core dependency:tree | grep odps is empty; fe-common + be-java-ext(max-compute) + fe-core all compile.
1 parent 7a4db35 commit 409300a

5 files changed

Lines changed: 11 additions & 39 deletions

File tree

fe/fe-common/src/main/java/org/apache/doris/common/maxcompute/MCUtils.java renamed to fe/be-java-extensions/max-compute-connector/src/main/java/org/apache/doris/maxcompute/MCUtils.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@
1515
// specific language governing permissions and limitations
1616
// under the License.
1717

18-
package org.apache.doris.common.maxcompute;
18+
package org.apache.doris.maxcompute;
19+
20+
import org.apache.doris.common.maxcompute.MCProperties;
1921

2022
import com.aliyun.auth.credentials.Credential;
2123
import com.aliyun.auth.credentials.provider.EcsRamRoleCredentialProvider;

‎fe/be-java-extensions/max-compute-connector/src/main/java/org/apache/doris/maxcompute/MaxComputeJniScanner.java‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919

2020
import org.apache.doris.common.jni.JniScanner;
2121
import org.apache.doris.common.jni.vec.ColumnType;
22-
import org.apache.doris.common.maxcompute.MCUtils;
2322

2423
import com.aliyun.odps.Odps;
2524
import com.aliyun.odps.table.configuration.CompressionCodec;

‎fe/be-java-extensions/max-compute-connector/src/main/java/org/apache/doris/maxcompute/MaxComputeJniWriter.java‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
import org.apache.doris.common.jni.vec.VectorColumn;
2222
import org.apache.doris.common.jni.vec.VectorTable;
2323
import org.apache.doris.common.maxcompute.MCProperties;
24-
import org.apache.doris.common.maxcompute.MCUtils;
2524

2625
import com.aliyun.odps.Odps;
2726
import com.aliyun.odps.OdpsType;

‎fe/fe-common/pom.xml‎

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -134,23 +134,15 @@ under the License.
134134
<artifactId>antlr4-runtime</artifactId>
135135
<version>${antlr4.version}</version>
136136
</dependency>
137+
<!-- Used by DorisHttpException (netty) and GsonUtilsBase (protobuf); previously pulled in
138+
transitively via odps-sdk-core, now declared directly so fe-common is odps-free. -->
137139
<dependency>
138-
<groupId>com.aliyun.odps</groupId>
139-
<artifactId>odps-sdk-core</artifactId>
140-
<exclusions>
141-
<exclusion>
142-
<groupId>org.apache.arrow</groupId>
143-
<artifactId>arrow-vector</artifactId>
144-
</exclusion>
145-
<exclusion>
146-
<groupId>org.ini4j</groupId>
147-
<artifactId>ini4j</artifactId>
148-
</exclusion>
149-
<exclusion>
150-
<groupId>org.bouncycastle</groupId>
151-
<artifactId>bcprov-jdk18on</artifactId>
152-
</exclusion>
153-
</exclusions>
140+
<groupId>io.netty</groupId>
141+
<artifactId>netty-all</artifactId>
142+
</dependency>
143+
<dependency>
144+
<groupId>com.google.protobuf</groupId>
145+
<artifactId>protobuf-java</artifactId>
154146
</dependency>
155147
</dependencies>
156148
<build>

‎fe/fe-core/pom.xml‎

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -359,26 +359,6 @@ under the License.
359359
<artifactId>fe-sql-parser</artifactId>
360360
<version>${project.version}</version>
361361
</dependency>
362-
<dependency>
363-
<groupId>com.aliyun.odps</groupId>
364-
<artifactId>odps-sdk-core</artifactId>
365-
<version>${maxcompute.version}</version>
366-
<exclusions>
367-
<exclusion>
368-
<artifactId>antlr-runtime</artifactId>
369-
<groupId>org.antlr</groupId>
370-
</exclusion>
371-
<exclusion>
372-
<artifactId>antlr4</artifactId>
373-
<groupId>org.antlr</groupId>
374-
</exclusion>
375-
</exclusions>
376-
</dependency>
377-
<dependency>
378-
<groupId>com.aliyun.odps</groupId>
379-
<artifactId>odps-sdk-table-api</artifactId>
380-
<version>${maxcompute.version}</version>
381-
</dependency>
382362
<!-- https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-web -->
383363
<dependency>
384364
<groupId>org.springframework.boot</groupId>

0 commit comments

Comments
 (0)