Skip to content

Commit 7632a07

Browse files
morningmanclaude
andcommitted
[P5-T29] paimon B8 (C1): delete dead fe-core legacy subtree + sever reverse-refs
Batch 1 / commit 1 of removing the legacy paimon subsystem from fe-core after the SPI cutover (apache#64446). Mirrors P4 apache#64300; per that precedent the reverse-ref removal and dead-file deletion must land as one compiling unit (PaimonUtils:57 calls the removed ExternalMetaCacheMgr.paimon()). Delete 33 dead main files (datasource/paimon/* except the LIVE PaimonVendedCredentialsProvider + datasource/metacache/paimon/* + datasource/systable/PaimonSysTable) and 5 dead tests (SUT is a deleted class). Sever live reverse-refs to the deleted classes: - ExternalCatalog: drop the PAIMON db-creation switch arm (PluginDriven forces PLUGIN). - ExternalMetaCacheMgr / ExternalMetaCacheRouteResolver: drop the paimon engine routing/accessor/registration (PluginDriven catalogs route to the default cache). - Env.getDdlStmt: drop the dead PAIMON_EXTERNAL_TABLE branch; KEEP the LIVE PLUGIN_EXTERNAL_TABLE D-046 SHOW CREATE LOCATION/PROPERTIES rendering. - UserAuthentication: drop the PaimonSysExternalTable branch (the live PluginDrivenSysExternalTable branch already authorizes sys-tables). - ShowPartitionsCommand: drop the legacy paimon clauses + handleShowPaimonTablePartitions(); KEEP hasPartitionStatsCapability() (drives the 5-column path post-cutover) and the live TableType.PAIMON_EXTERNAL_TABLE enum. - Scrub 3 dangling {@link}/@see PaimonSysTable/PaimonSysExternalTable javadocs. Decouple the STILL-CONSUMED property/metastore/Paimon* classes from the deleted PaimonExternalCatalog by inlining getPaimonCatalogType() string literals ("hms"/"filesystem"/"dlf"/"rest"/"jdbc"). These thin metastore-property classes stay in fe-core; their paimon-SDK catalog-building methods are stripped in commit 2. Tests: swap StatementContextTest preload mock PaimonExternalTable -> PluginDrivenMvccExternalTable; trim ExternalMetaCacheRouteResolverTest's deleted paimon route + fixture predicates; repoint Jdbc/Rest metastore-props constant assertions to literals. fe-core test-compile + checkstyle clean; 49 affected tests pass. KEEP for Batch 2 (docker-gated): PaimonVendedCredentialsProvider + the generic VendedCredentialsFactory paimon seam; the 5 paimon maven deps remain until then. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_011mTrPcvMZtFjsxWJM5TRnG
1 parent 38e7140 commit 7632a07

57 files changed

Lines changed: 202 additions & 6301 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎fe/fe-core/src/main/java/org/apache/doris/catalog/Env.java‎

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,6 @@
108108
import org.apache.doris.datasource.hive.event.MetastoreEventsProcessor;
109109
import org.apache.doris.datasource.iceberg.IcebergExternalTable;
110110
import org.apache.doris.datasource.iceberg.IcebergSysExternalTable;
111-
import org.apache.doris.datasource.paimon.PaimonExternalTable;
112-
import org.apache.doris.datasource.paimon.PaimonSysExternalTable;
113111
import org.apache.doris.deploy.DeployManager;
114112
import org.apache.doris.deploy.impl.LocalFileDeployManager;
115113
import org.apache.doris.dictionary.DictionaryManager;
@@ -4914,28 +4912,6 @@ public static void getDdlStmt(Command command, String dbName, TableIf table, Lis
49144912
}
49154913
}
49164914
sb.append("\n)");
4917-
} else if (table.getType() == TableType.PAIMON_EXTERNAL_TABLE) {
4918-
addTableComment(table, sb);
4919-
PaimonExternalTable paimonExternalTable;
4920-
if (table instanceof PaimonExternalTable) {
4921-
paimonExternalTable = (PaimonExternalTable) table;
4922-
} else if (table instanceof PaimonSysExternalTable) {
4923-
paimonExternalTable = ((PaimonSysExternalTable) table).getSourceTable();
4924-
} else {
4925-
throw new RuntimeException("Unexpected Paimon table type: " + table.getClass().getSimpleName());
4926-
}
4927-
Map<String, String> properties = paimonExternalTable.getTableProperties();
4928-
sb.append("\nLOCATION '").append(properties.getOrDefault("path", "")).append("'");
4929-
sb.append("\nPROPERTIES (");
4930-
Iterator<Entry<String, String>> iterator = properties.entrySet().iterator();
4931-
while (iterator.hasNext()) {
4932-
Entry<String, String> prop = iterator.next();
4933-
sb.append("\n \"").append(prop.getKey()).append("\" = \"").append(prop.getValue()).append("\"");
4934-
if (iterator.hasNext()) {
4935-
sb.append(",");
4936-
}
4937-
}
4938-
sb.append("\n)");
49394915
} else if (table.getType() == TableType.PLUGIN_EXTERNAL_TABLE) {
49404916
addTableComment(table, sb);
49414917
PluginDrivenExternalTable pluginExternalTable;

‎fe/fe-core/src/main/java/org/apache/doris/datasource/ExternalCatalog.java‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@
5050
import org.apache.doris.datasource.lakesoul.LakeSoulExternalDatabase;
5151
import org.apache.doris.datasource.metacache.MetaCache;
5252
import org.apache.doris.datasource.operations.ExternalMetadataOps;
53-
import org.apache.doris.datasource.paimon.PaimonExternalDatabase;
5453
import org.apache.doris.datasource.test.TestExternalCatalog;
5554
import org.apache.doris.datasource.test.TestExternalDatabase;
5655
import org.apache.doris.nereids.trees.plans.commands.info.CreateTableInfo;
@@ -963,8 +962,6 @@ protected ExternalDatabase<? extends ExternalTable> buildDbForInit(String remote
963962
return new LakeSoulExternalDatabase(this, dbId, localDbName, remoteDbName);
964963
case TEST:
965964
return new TestExternalDatabase(this, dbId, localDbName, remoteDbName);
966-
case PAIMON:
967-
return new PaimonExternalDatabase(this, dbId, localDbName, remoteDbName);
968965
case TRINO_CONNECTOR:
969966
return new PluginDrivenExternalDatabase(this, dbId, localDbName, remoteDbName);
970967
case REMOTE_DORIS:

‎fe/fe-core/src/main/java/org/apache/doris/datasource/ExternalMetaCacheMgr.java‎

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232
import org.apache.doris.datasource.metacache.MetaCacheEntryDef;
3333
import org.apache.doris.datasource.metacache.MetaCacheEntryInvalidation;
3434
import org.apache.doris.datasource.metacache.MetaCacheEntryStats;
35-
import org.apache.doris.datasource.paimon.PaimonExternalMetaCache;
3635
import org.apache.doris.fs.FileSystemCache;
3736

3837
import com.github.benmanes.caffeine.cache.stats.CacheStats;
@@ -63,7 +62,6 @@ public class ExternalMetaCacheMgr {
6362
private static final String ENGINE_HIVE = "hive";
6463
private static final String ENGINE_HUDI = "hudi";
6564
private static final String ENGINE_ICEBERG = "iceberg";
66-
private static final String ENGINE_PAIMON = "paimon";
6765
private static final String ENGINE_DORIS = "doris";
6866

6967
/**
@@ -173,11 +171,6 @@ public IcebergExternalMetaCache iceberg(long catalogId) {
173171
return (IcebergExternalMetaCache) engine(ENGINE_ICEBERG);
174172
}
175173

176-
public PaimonExternalMetaCache paimon(long catalogId) {
177-
prepareCatalogByEngine(catalogId, ENGINE_PAIMON);
178-
return (PaimonExternalMetaCache) engine(ENGINE_PAIMON);
179-
}
180-
181174
public DorisExternalMetaCache doris(long catalogId) {
182175
prepareCatalogByEngine(catalogId, ENGINE_DORIS);
183176
return (DorisExternalMetaCache) engine(ENGINE_DORIS);
@@ -299,7 +292,6 @@ private void registerBuiltinEngineCaches() {
299292
cacheRegistry.register(new HiveExternalMetaCache(commonRefreshExecutor, fileListingExecutor));
300293
cacheRegistry.register(new HudiExternalMetaCache(commonRefreshExecutor));
301294
cacheRegistry.register(new IcebergExternalMetaCache(commonRefreshExecutor));
302-
cacheRegistry.register(new PaimonExternalMetaCache(commonRefreshExecutor));
303295
cacheRegistry.register(new DorisExternalMetaCache(commonRefreshExecutor));
304296
}
305297

‎fe/fe-core/src/main/java/org/apache/doris/datasource/PluginDrivenSysExternalTable.java‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
* <p>Created transiently by {@link org.apache.doris.datasource.systable.PluginDrivenSysTable} during
3232
* planning/describe (via {@code createSysExternalTable}); it is NEVER added to a persisted table map
3333
* and is NOT GSON-registered, mirroring legacy sys ExternalTables (e.g.
34-
* {@link org.apache.doris.datasource.paimon.PaimonSysExternalTable}).</p>
34+
* {@code PaimonSysExternalTable}).</p>
3535
*
3636
* <p>It reports {@link org.apache.doris.catalog.TableIf.TableType#PLUGIN_EXTERNAL_TABLE} (inherited);
3737
* no connector-specific table type is introduced. The whole schema/partition/row-count path is reused

‎fe/fe-core/src/main/java/org/apache/doris/datasource/metacache/ExternalMetaCacheRouteResolver.java‎

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
import org.apache.doris.datasource.doris.RemoteDorisExternalCatalog;
2323
import org.apache.doris.datasource.hive.HMSExternalCatalog;
2424
import org.apache.doris.datasource.iceberg.IcebergExternalCatalog;
25-
import org.apache.doris.datasource.paimon.PaimonExternalCatalog;
2625

2726
import java.util.ArrayList;
2827
import java.util.LinkedHashSet;
@@ -38,7 +37,6 @@ public class ExternalMetaCacheRouteResolver {
3837
private static final String ENGINE_HIVE = "hive";
3938
private static final String ENGINE_HUDI = "hudi";
4039
private static final String ENGINE_ICEBERG = "iceberg";
41-
private static final String ENGINE_PAIMON = "paimon";
4240
private static final String ENGINE_DORIS = "doris";
4341

4442
private final ExternalMetaCacheRegistry registry;
@@ -66,10 +64,6 @@ private void addBuiltinRoutes(Set<ExternalMetaCache> resolved, CatalogIf<?> cata
6664
resolved.add(registry.resolve(ENGINE_ICEBERG));
6765
return;
6866
}
69-
if (catalog instanceof PaimonExternalCatalog) {
70-
resolved.add(registry.resolve(ENGINE_PAIMON));
71-
return;
72-
}
7367
if (catalog instanceof RemoteDorisExternalCatalog) {
7468
resolved.add(registry.resolve(ENGINE_DORIS));
7569
return;

‎fe/fe-core/src/main/java/org/apache/doris/datasource/metacache/paimon/PaimonLatestSnapshotProjectionLoader.java‎

Lines changed: 0 additions & 83 deletions
This file was deleted.

‎fe/fe-core/src/main/java/org/apache/doris/datasource/metacache/paimon/PaimonPartitionInfoLoader.java‎

Lines changed: 0 additions & 58 deletions
This file was deleted.

‎fe/fe-core/src/main/java/org/apache/doris/datasource/metacache/paimon/PaimonTableLoader.java‎

Lines changed: 0 additions & 48 deletions
This file was deleted.

0 commit comments

Comments
 (0)