Skip to content

[fix](paimon) Read Paimon tables on BE without reconstructing the catalog metastore#65867

Open
morningman wants to merge 4 commits into
apache:masterfrom
morningman:fix-27343
Open

[fix](paimon) Read Paimon tables on BE without reconstructing the catalog metastore#65867
morningman wants to merge 4 commits into
apache:masterfrom
morningman:fix-27343

Conversation

@morningman

@morningman morningman commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

What problem does this PR solve?

Reading a Paimon table over a metastore-backed or REST catalog (HMS / DLF) fails on
BE whenever the JNI reader is used — most visibly system tables (e.g. $snapshots,
$files), which always go through JNI, and also branch / time-travel / incremental
reads. Two failures were observed, both caused by the BE rebuilding a catalog it does
not need:

# HMS catalog
[JNI_ERROR] NoClassDefFoundError: org/apache/hadoop/hive/conf/HiveConf
# DLF (REST) catalog
[JNI_ERROR] ClassNotFoundException: com.aliyun.datalake.metastore.hive2.ProxyMetaStoreClient

Root cause. A table loaded from a metastore-backed Paimon catalog carries a Paimon
CatalogLoader (e.g. HiveCatalogLoader) in its CatalogEnvironment. When FE
serializes that table to BE, SnapshotManager#latestSnapshotId resolves the latest
snapshot through the catalog's SnapshotLoader, which on BE reconstructs the catalog's
metastore client and its whole Hive / DLF-REST stack — even though the BE only reads
(via FE-resolved splits and the object store) and the snapshots already live there.
This was previously masked by java-udf's ~122MB hive-catalog-shade on BE's shared
classpath; #65733 replaced it with the slim hive-udf-shade, exposing the dependency.

Fix 1 — serialize a catalog-less table to the BE (PaimonScanNode).

  • data table: rebuild via FileStoreTableFactory with an empty CatalogEnvironment.
    A FileStoreTable is fully defined by fileIO / location / schema, and its dynamic
    options (time travel, incremental) are already merged into the schema by copy(...),
    so nothing is lost except the catalog loader.
  • system table: rebuild it over such a catalog-less data table via SystemTableLoader.

With no catalog loader, SnapshotManager#latestSnapshotId lists the snapshot directory
on the filesystem instead of calling the metastore, so the BE never reconstructs the
catalog and no longer needs any Hive / metastore classes.

Fix 2 — co-locate the Paimon FileIO plugins with paimon-scanner (packaging).
Reading the snapshot from the filesystem makes the BE materialize the object-store
FileIO lazily via FileIO.get()ServiceLoader.load(FileIOLoader.class, ...),
which eagerly instantiates every registered provider. The OSS/S3 plugins
(paimon-s3S3Loader, paimon-jindoJindoLoader) were bundled in
preload-extensions, on BE's JVM system (app) classpath, but the
org.apache.paimon.fs.FileIOLoader interface they implement ships in paimon-common,
bundled only in paimon-scanner's own JniScannerClassLoader. That loader is
parent-first, so the app classloader defines S3Loader / JindoLoader and cannot
resolve the child-only FileIOLoaderNoClassDefFoundError: FileIOLoader, which
aborts discovery. Moving the two plugins into paimon-scanner puts the whole FileIO
SPI (interface + all providers) in one classloader; the Jindo SDK stays on the app
classpath (start_be.sh adds jindofs to DORIS_CLASSPATH) and is still reachable
via parent delegation.

Regression tests to re-run:
io.trino.tests.product.paimon.TestPaimonSparkCompatibility (system-table reads) and
external_table_p2/paimon/test_paimon_dlf_rest_catalog.

Release note

Fix Paimon reads (system tables, branch / time-travel / incremental) failing on BE over
metastore-backed or REST catalogs (HMS / DLF) with NoClassDefFoundError
(HiveConf / FileIOLoader) or ClassNotFoundException: ProxyMetaStoreClient.

Check List (For Author)

  • Test

    • Regression test
    • Unit Test
    • Manual test (add detailed scripts or steps below)
    • No need to test or manual test. Explain why:
  • Behavior changed:

    • No.
    • Yes.
  • Does this need documentation?

    • No.
    • Yes.

… reads

Paimon branch/time-travel/incremental/system-table reads over an HMS
Paimon catalog fail on BE with:

  NoClassDefFoundError: org/apache/hadoop/hive/conf/HiveConf

paimon-hive-connector-3.1 marks hive-exec as `provided` and only bundles
relocated hive classes under org.apache.paimon.shade.*, so the real
org.apache.hadoop.hive.conf.HiveConf (needed by
org.apache.paimon.hive.SerializableHiveConf when a HMS-backed Paimon table
is deserialized on BE, and by HiveCatalog.createHiveConf) was never in
paimon-scanner's own fat jar. It used to be provided accidentally by
java-udf's hive-catalog-shade, which sits on BE's shared JVM classpath
(bin/start_be.sh preloads both preload-extensions and java-udf, and that
classloader is the parent of every per-scanner JniScannerClassLoader).
apache#65733 replaced hive-catalog-shade with the slim hive-udf-shade, dropping
HiveConf from the shared classpath and breaking paimon-scanner.

Make paimon-scanner self-contained by bundling the Hive classes it actually
needs: hive-common (HiveConf plus its construction closure) and
hive-shims-common (shims/Utils, used by the lazy HiveConf#getUser). Both are
pinned to ${hive.version} (3.1.x, matching the Hive the connector was built
against and the previous hive-catalog-shade 3.1.1) and have their transitive
trees pruned; hadoop is already on BE's shared classpath. Net jar growth is
~540KB (hive-common + hive-shims-common only), no jetty/orc/ant bloat.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@morningman
morningman requested a review from CalvinKirs as a code owner July 22, 2026 03:23
@hello-stephen

Copy link
Copy Markdown
Contributor

Thank you for your contribution to Apache Doris.
Don't know what should be done next? See How to process your PR.

Please clearly describe your PR:

  1. What problem was fixed (it's best to include specific error reporting information). How it was fixed.
  2. Which behaviors were modified. What was the previous behavior, what is it now, why was it modified, and what possible impacts might there be.
  3. What features were added. Why was this function added?
  4. Which code was refactored and why was this part of the code refactored?
  5. Which functions were optimized and what is the difference before and after the optimization?

@morningman

Copy link
Copy Markdown
Contributor Author

/review

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated review completed. I found no substantiated blocking issue in the current one-file
change.

Part 1.3 checkpoint conclusions:

  • Goal and proof: this restores the unrelocated HiveConf and shims classes needed when FE
    serializes an HMS-backed Paimon table and the BE Paimon JNI scanner deserializes it. Both
    legacy and Format V2 affected reads converge on that boundary. The PR reports rebuilt-artifact
    smoke coverage for new HiveConf(), the SerializableHiveConf round trip, and getUser.
    Existing HMS regression coverage exercises forced JNI, incremental, time-travel, and
    system-table modes; the named branch product test was not run here.
  • Scope and clarity: this is a focused one-file dependency repair. Wildcard transitive pruning
    keeps the addition to the two small Hive artifacts rather than restoring the former catalog
    shade.
  • Concurrency and lifecycle: no threading, locking, mutable-state ownership, or resource
    lifecycle changes. The existing process-lifetime scanner classloader behavior is unchanged.
  • Configuration and compatibility: no configuration, protocol, storage-format, persistence, or
    serialized-wrapper contract changes. The Hive versions remain within the existing 3.1 family.
  • Parallel paths: legacy and Format V2 JNI modes use the same Paimon scanner artifact; native
    and C++ reader paths do not cross this Java deserialization boundary, and other scanners are
    isolated.
  • Tests and results: no result files changed. Visible CI style, license, and dependency checks
    pass, but they did not execute the deployed Paimon fat jar. The review instructions prohibited
    local builds/tests, so validation here is static plus the PR's reported manual artifact tests.
  • Observability, transactions, writes, FE-BE variables, and performance: no logging/metric,
    transaction, data-write, or FE-BE variable behavior changes. The only identified cost is the
    modest jar/startup footprint; no query hot path changes.
  • Risk closure: the wildcard-pruned external dependency exercised by HiveConf is already
    supplied by the supported BE parent classpath, and the direct Hive jars follow the existing
    assembly, deployment, and parent-first loading path. I found no substantiated closure,
    collision, or version issue.

User focus: no additional focus was provided.

@morningman

Copy link
Copy Markdown
Contributor Author

run buildall

@hello-stephen

Copy link
Copy Markdown
Contributor

FE UT Coverage Report

Increment line coverage `` 🎉
Increment coverage report
Complete coverage report

@hello-stephen

Copy link
Copy Markdown
Contributor
TPC-H: Total hot run time: 29445 ms
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpch-tools
Tpch sf100 test result on commit 1bbb4b41c8d6324eadad37c297ee3e9f807291bb, data reload: false

------ Round 1 ----------------------------------
============================================
q1	17717	4087	4161	4087
q2	2006	332	196	196
q3	10313	1433	816	816
q4	4679	468	338	338
q5	7520	867	571	571
q6	178	173	136	136
q7	757	814	617	617
q8	9355	1558	1652	1558
q9	5630	4368	4359	4359
q10	6787	1748	1471	1471
q11	515	355	327	327
q12	751	592	456	456
q13	18093	3469	2701	2701
q14	265	255	235	235
q15	q16	781	775	708	708
q17	1030	1076	968	968
q18	6791	5637	5512	5512
q19	1175	1242	1061	1061
q20	825	680	552	552
q21	5721	2562	2484	2484
q22	427	356	292	292
Total cold run time: 101316 ms
Total hot run time: 29445 ms

----- Round 2, with runtime_filter_mode=off -----
============================================
q1	4444	4453	4421	4421
q2	287	320	217	217
q3	4502	4924	4425	4425
q4	2066	2136	1375	1375
q5	4358	4273	4283	4273
q6	232	173	130	130
q7	1744	1606	2119	1606
q8	2629	2221	2222	2221
q9	8080	8109	7683	7683
q10	4791	4625	4248	4248
q11	568	433	387	387
q12	767	773	547	547
q13	3343	3481	2937	2937
q14	300	294	270	270
q15	q16	704	764	644	644
q17	1344	1351	1446	1351
q18	7881	7328	7183	7183
q19	1160	1072	1109	1072
q20	2187	2195	1906	1906
q21	5274	4554	4410	4410
q22	501	473	405	405
Total cold run time: 57162 ms
Total hot run time: 51711 ms

@hello-stephen

Copy link
Copy Markdown
Contributor
TPC-DS: Total hot run time: 176734 ms
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpcds-tools
TPC-DS sf100 test result on commit 1bbb4b41c8d6324eadad37c297ee3e9f807291bb, data reload: false

query5	4324	641	491	491
query6	470	233	204	204
query7	4876	611	337	337
query8	339	192	168	168
query9	8764	4014	3996	3996
query10	496	388	296	296
query11	5900	2333	2147	2147
query12	164	103	99	99
query13	1261	566	431	431
query14	6244	5177	4838	4838
query14_1	4174	4200	4210	4200
query15	220	208	180	180
query16	1009	497	448	448
query17	944	696	567	567
query18	2480	487	347	347
query19	210	199	153	153
query20	110	108	109	108
query21	226	156	136	136
query22	13461	13436	13371	13371
query23	17295	16486	16154	16154
query23_1	16106	16209	16192	16192
query24	7465	1753	1252	1252
query24_1	1270	1269	1261	1261
query25	558	450	405	405
query26	1336	372	223	223
query27	2612	596	389	389
query28	4521	1969	1980	1969
query29	1102	638	495	495
query30	342	261	226	226
query31	1116	1090	967	967
query32	105	62	60	60
query33	529	325	244	244
query34	1187	1125	625	625
query35	782	788	672	672
query36	1195	1203	1064	1064
query37	152	106	94	94
query38	1891	1692	1644	1644
query39	863	869	847	847
query39_1	829	816	845	816
query40	268	164	139	139
query41	69	63	62	62
query42	91	93	92	92
query43	323	320	281	281
query44	1392	756	754	754
query45	196	184	166	166
query46	1044	1150	722	722
query47	2153	2132	1995	1995
query48	399	432	296	296
query49	567	413	296	296
query50	1125	463	326	326
query51	10574	10458	10359	10359
query52	90	84	74	74
query53	258	282	200	200
query54	279	233	228	228
query55	73	69	63	63
query56	308	286	284	284
query57	1307	1284	1225	1225
query58	281	265	256	256
query59	1595	1635	1438	1438
query60	315	265	252	252
query61	142	146	143	143
query62	542	492	425	425
query63	226	200	201	200
query64	2791	1057	811	811
query65	4706	4637	4597	4597
query66	1828	506	435	435
query67	29218	29134	28878	28878
query68	3069	1577	969	969
query69	409	305	260	260
query70	1078	927	936	927
query71	370	337	316	316
query72	3028	2625	2371	2371
query73	871	766	405	405
query74	5067	4868	4668	4668
query75	2525	2486	2123	2123
query76	2316	1162	754	754
query77	334	373	274	274
query78	11877	11916	11176	11176
query79	1374	1168	733	733
query80	661	567	449	449
query81	473	331	281	281
query82	563	155	123	123
query83	410	320	295	295
query84	329	157	131	131
query85	911	611	509	509
query86	364	283	291	283
query87	1824	1819	1759	1759
query88	3677	2778	2758	2758
query89	437	379	330	330
query90	1960	196	187	187
query91	204	187	159	159
query92	61	57	55	55
query93	1525	1605	1016	1016
query94	562	332	309	309
query95	779	627	479	479
query96	1060	839	345	345
query97	2628	2618	2525	2525
query98	209	199	199	199
query99	1104	1108	975	975
Total cold run time: 261383 ms
Total hot run time: 176734 ms

@hello-stephen

Copy link
Copy Markdown
Contributor
ClickBench: Total hot run time: 25.04 s
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/clickbench-tools
ClickBench test result on commit 1bbb4b41c8d6324eadad37c297ee3e9f807291bb, data reload: false

query1	0.01	0.01	0.01
query2	0.13	0.05	0.05
query3	0.25	0.13	0.13
query4	1.61	0.14	0.14
query5	0.24	0.22	0.22
query6	1.25	1.11	1.02
query7	0.05	0.01	0.01
query8	0.06	0.03	0.04
query9	0.39	0.32	0.32
query10	0.56	0.57	0.62
query11	0.19	0.13	0.13
query12	0.19	0.14	0.14
query13	0.47	0.48	0.47
query14	1.04	1.02	1.01
query15	0.61	0.59	0.60
query16	0.33	0.34	0.32
query17	1.08	1.07	1.12
query18	0.22	0.21	0.22
query19	2.08	1.92	1.91
query20	0.02	0.01	0.01
query21	15.48	0.19	0.13
query22	5.00	0.05	0.04
query23	16.17	0.30	0.12
query24	3.00	0.40	0.32
query25	0.12	0.05	0.04
query26	0.74	0.21	0.14
query27	0.04	0.04	0.03
query28	3.55	0.94	0.54
query29	12.49	4.15	3.28
query30	0.27	0.16	0.15
query31	2.77	0.58	0.30
query32	3.21	0.59	0.49
query33	3.08	3.22	3.28
query34	15.40	4.21	3.55
query35	3.54	3.53	3.53
query36	0.57	0.46	0.44
query37	0.08	0.06	0.06
query38	0.06	0.04	0.04
query39	0.04	0.03	0.02
query40	0.20	0.17	0.15
query41	0.08	0.03	0.03
query42	0.04	0.03	0.03
query43	0.04	0.03	0.04
Total cold run time: 96.75 s
Total hot run time: 25.04 s

morningman and others added 2 commits July 22, 2026 18:16
…n HMS reads

Reading an HMS-backed Paimon table (branch/time-travel/incremental/system
tables) over an HMS Paimon catalog fails on BE with:

  NoClassDefFoundError: org/apache/hadoop/hive/metastore/api/NoSuchObjectException

This is the metastore-API counterpart of the HiveConf gap fixed in the previous
commit. When BE deserializes an HMS-backed Paimon table, the serialized graph's
org.apache.paimon.hive.HiveCatalogLoader links org.apache.paimon.hive.HiveCatalog,
which references a broad slice of org.apache.hadoop.hive.metastore.api.* (Table,
Database, Partition, StorageDescriptor, SerDeInfo, FieldSchema,
NoSuchObjectException, UnknownTableException, ...). paimon-hive-connector-3.1
marks hive-exec `provided` and only bundles relocated hive under
org.apache.paimon.shade.*, so this real `api` package was never in
paimon-scanner's own fat jar. It used to be provided accidentally by java-udf's
hive-catalog-shade on BE's shared classpath, but apache#65733 replaced that with the
slim hive-udf-shade.

In Hive 3.x the whole thrift-generated metastore `api` package lives in
hive-standalone-metastore (the `hive-metastore` artifact is a thin shim and does
NOT contain it). Bundle it, pinned to ${hive.version} (3.1.x) like the two hive
jars added previously, with its transitive tree pruned: the api classes only
extend org.apache.thrift.* (already on BE's shared classpath via java-common's
libthrift 0.16, exactly as under the old hive-catalog-shade, which itself bundled
no plain thrift) and the java stdlib; datanucleus/orc/hadoop/jetty/etc. are only
needed by the metastore server/client, which BE never runs (it reads the
already-resolved table). Net add is the ~11MB metastore api package only, no
jetty/orc/datanucleus bloat.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DHwqsiGWNosZCeS4ecK97e
…alog metastore

Reading a Paimon system table (e.g. $snapshots) over a metastore-backed catalog
(HMS / DLF) failed on BE with:

  ClassNotFoundException: com.aliyun.datalake.metastore.hive2.ProxyMetaStoreClient

SnapshotManager#latestSnapshotId resolves the latest snapshot through the table's
catalog SnapshotLoader, which on BE reconstructs the catalog's metastore client and
its whole Hive/DLF REST stack (okhttp, tea, hive-exec's SessionState, ...) — even
though the BE only reads and the snapshots already live on the object store.

Serialize a catalog-less table to the BE for every Paimon read (PaimonScanNode):
- data table: rebuild via FileStoreTableFactory with an empty CatalogEnvironment.
  fileIO/location/schema are preserved, and dynamic options (time travel /
  incremental) are already merged into the schema by copy(), so nothing is lost.
- system table: rebuild it over such a catalog-less data table via SystemTableLoader.

With no catalog loader, SnapshotManager#latestSnapshotId falls back to listing the
snapshot directory on the filesystem, and the BE never deserializes a
HiveCatalogLoader. paimon-scanner therefore no longer needs any Hive classes on the
BE, so the hive-common / hive-shims-common / hive-standalone-metastore jars are
removed.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@morningman

Copy link
Copy Markdown
Contributor Author

run buildall

@hello-stephen

Copy link
Copy Markdown
Contributor
TPC-H: Total hot run time: 29714 ms
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpch-tools
Tpch sf100 test result on commit 410ed84f64126fd337a5320b373f91b2594a382e, data reload: false

------ Round 1 ----------------------------------
============================================
q1	17622	4079	4000	4000
q2	2038	329	212	212
q3	10239	1395	855	855
q4	4685	469	338	338
q5	7509	863	573	573
q6	177	169	137	137
q7	756	880	611	611
q8	9375	1622	1615	1615
q9	6269	4345	4336	4336
q10	6748	1737	1510	1510
q11	509	355	346	346
q12	723	571	456	456
q13	18099	3288	2728	2728
q14	284	259	250	250
q15	q16	777	774	718	718
q17	964	927	973	927
q18	6875	5653	5651	5651
q19	1326	1278	1134	1134
q20	851	679	590	590
q21	5982	2629	2426	2426
q22	438	359	301	301
Total cold run time: 102246 ms
Total hot run time: 29714 ms

----- Round 2, with runtime_filter_mode=off -----
============================================
q1	4440	4292	4261	4261
q2	294	315	215	215
q3	4560	4984	4371	4371
q4	2070	2139	1361	1361
q5	4401	4252	4264	4252
q6	231	178	127	127
q7	1749	1946	1898	1898
q8	2790	2226	2206	2206
q9	7994	8151	7834	7834
q10	4706	4655	4230	4230
q11	583	426	423	423
q12	737	796	537	537
q13	3347	3626	2981	2981
q14	306	328	291	291
q15	q16	700	722	652	652
q17	1350	1317	1459	1317
q18	7958	7409	7358	7358
q19	1136	1060	1086	1060
q20	2198	2234	1934	1934
q21	5193	4603	4385	4385
q22	504	469	397	397
Total cold run time: 57247 ms
Total hot run time: 52090 ms

@hello-stephen

Copy link
Copy Markdown
Contributor
TPC-DS: Total hot run time: 176867 ms
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpcds-tools
TPC-DS sf100 test result on commit 410ed84f64126fd337a5320b373f91b2594a382e, data reload: false

query5	4327	623	488	488
query6	465	225	200	200
query7	4880	620	353	353
query8	337	189	167	167
query9	8780	4036	4049	4036
query10	457	353	295	295
query11	5901	2291	2128	2128
query12	163	102	104	102
query13	1271	617	432	432
query14	6226	5195	4882	4882
query14_1	4194	4231	4199	4199
query15	211	205	174	174
query16	1003	516	466	466
query17	935	726	576	576
query18	2441	499	351	351
query19	216	190	152	152
query20	113	108	109	108
query21	235	160	140	140
query22	13530	13718	13399	13399
query23	17365	16488	16165	16165
query23_1	16293	16178	16207	16178
query24	7585	1764	1249	1249
query24_1	1324	1293	1276	1276
query25	571	475	387	387
query26	1367	385	216	216
query27	2597	610	386	386
query28	4492	1980	1987	1980
query29	1093	616	496	496
query30	327	264	230	230
query31	1114	1090	989	989
query32	113	64	60	60
query33	550	327	260	260
query34	1155	1136	633	633
query35	775	820	676	676
query36	1202	1211	1037	1037
query37	170	105	90	90
query38	1895	1702	1645	1645
query39	897	873	850	850
query39_1	826	834	837	834
query40	243	166	145	145
query41	69	68	61	61
query42	93	93	92	92
query43	323	318	285	285
query44	1410	765	765	765
query45	208	185	172	172
query46	1031	1221	723	723
query47	2137	2088	1971	1971
query48	397	413	294	294
query49	572	412	299	299
query50	1112	427	327	327
query51	10496	10435	10586	10435
query52	87	87	76	76
query53	263	284	200	200
query54	290	239	214	214
query55	74	74	65	65
query56	300	281	287	281
query57	1315	1275	1212	1212
query58	278	261	261	261
query59	1571	1666	1430	1430
query60	299	264	245	245
query61	152	151	144	144
query62	539	494	433	433
query63	237	203	197	197
query64	2782	1046	853	853
query65	4744	4642	4618	4618
query66	1812	523	391	391
query67	29276	29277	28505	28505
query68	3107	1601	1004	1004
query69	412	309	266	266
query70	1050	975	950	950
query71	356	320	303	303
query72	3068	2686	2356	2356
query73	809	766	398	398
query74	5051	4916	4759	4759
query75	2573	2497	2134	2134
query76	2319	1184	778	778
query77	349	380	281	281
query78	11831	11765	11273	11273
query79	1402	1116	748	748
query80	655	549	457	457
query81	464	337	293	293
query82	593	149	120	120
query83	410	322	294	294
query84	335	158	129	129
query85	938	620	528	528
query86	353	279	270	270
query87	1825	1828	1733	1733
query88	3694	2743	2732	2732
query89	433	375	326	326
query90	2024	195	199	195
query91	196	189	160	160
query92	65	60	54	54
query93	1475	1518	980	980
query94	562	357	318	318
query95	801	582	473	473
query96	1089	749	350	350
query97	2607	2626	2561	2561
query98	213	208	226	208
query99	1094	1113	962	962
Total cold run time: 262015 ms
Total hot run time: 176867 ms

@hello-stephen

Copy link
Copy Markdown
Contributor
ClickBench: Total hot run time: 24.88 s
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/clickbench-tools
ClickBench test result on commit 410ed84f64126fd337a5320b373f91b2594a382e, data reload: false

query1	0.00	0.00	0.00
query2	0.09	0.05	0.05
query3	0.26	0.14	0.14
query4	1.61	0.13	0.14
query5	0.24	0.24	0.22
query6	1.26	1.06	1.09
query7	0.04	0.02	0.00
query8	0.06	0.04	0.03
query9	0.37	0.31	0.32
query10	0.56	0.56	0.57
query11	0.19	0.14	0.14
query12	0.17	0.14	0.14
query13	0.47	0.48	0.48
query14	1.03	1.01	1.00
query15	0.62	0.63	0.60
query16	0.32	0.32	0.30
query17	1.16	1.17	1.12
query18	0.22	0.21	0.21
query19	2.10	1.99	1.86
query20	0.02	0.01	0.01
query21	15.44	0.18	0.14
query22	4.98	0.06	0.05
query23	16.13	0.31	0.12
query24	3.03	0.43	0.29
query25	0.11	0.05	0.04
query26	0.73	0.21	0.14
query27	0.05	0.04	0.03
query28	3.53	0.88	0.53
query29	12.51	4.08	3.25
query30	0.27	0.16	0.17
query31	2.76	0.58	0.31
query32	3.22	0.60	0.49
query33	3.17	3.18	3.30
query34	15.62	4.24	3.53
query35	3.48	3.49	3.53
query36	0.54	0.44	0.43
query37	0.09	0.06	0.06
query38	0.05	0.04	0.04
query39	0.03	0.02	0.02
query40	0.18	0.16	0.15
query41	0.08	0.03	0.02
query42	0.03	0.02	0.02
query43	0.04	0.04	0.03
Total cold run time: 96.86 s
Total hot run time: 24.88 s

… BE reads

Reading an object-store-backed Paimon table over a REST/DLF catalog failed on BE
when resolving the latest snapshot from the filesystem:

  NoClassDefFoundError: org/apache/paimon/fs/FileIOLoader

The paimon OSS/S3 FileIO plugins (paimon-s3 -> S3Loader, paimon-jindo -> JindoLoader)
were bundled in preload-extensions, which sits on BE's JVM system (app) classpath, but
the org.apache.paimon.fs.FileIOLoader interface they implement lives in paimon-common,
bundled only in paimon-scanner's own JniScannerClassLoader. When a BE read resolves the
latest snapshot from the filesystem, RESTTokenFileIO.fileIO() calls FileIO.get() ->
ServiceLoader.load(FileIOLoader.class, ...), which eagerly instantiates every registered
provider. JniScannerClassLoader is a plain parent-first URLClassLoader, so the app
classloader defines S3Loader/JindoLoader and cannot resolve the child-only FileIOLoader
interface -> the whole discovery aborts.

Co-locate the plugins with the FileIOLoader interface: move paimon-s3 / paimon-jindo from
preload-extensions to paimon-scanner. paimon-scanner already carries a complete paimon
runtime, and the assembly's metaInf-services handler merges the plugins' service files with
paimon-common's, so all five FileIOLoader providers (local/hadoop/viewfs/s3/jindo) and the
interface end up in one classloader. The Jindo SDK stays on the app classpath (start_be.sh
adds jindofs to DORIS_CLASSPATH), so paimon-scanner still reaches it via parent delegation.

Both jars must be rebuilt and redeployed: paimon-scanner (now carries the plugins) and
preload-extensions (must stop advertising the un-linkable providers on the shared classpath).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DHwqsiGWNosZCeS4ecK97e
@morningman morningman changed the title [fix](paimon) Bundle HiveConf into paimon-scanner for Paimon Hive JNI reads [fix](paimon) Read Paimon tables on BE without reconstructing the catalog metastore Jul 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants