Skip to content

Conversation

@morningman
Copy link
Contributor

@morningman morningman commented Dec 25, 2024

What problem does this PR solve?

This pull request primarily updates the directory structure for plugins and JDBC drivers, ensuring compatibility with previous versions. Additionally, it includes changes to various configuration files and scripts to reflect these updates.

Directory Structure Updates:

  • be/src/common/config.cpp: Changed the default directory for jdbc_drivers_dir and trino_connector_plugin_dir to ${DORIS_HOME}/plugins/* for better organization. [1] [2]
  • build.sh: Updated the script to create new plugin directories under ${DORIS_OUTPUT}/fe/plugins/ and ${DORIS_OUTPUT}/be/plugins/. [1] [2]

Code Refactoring for Compatibility:

Configuration Updates:

Minor Cleanup:

There are following kinds of plugins in Doris:

  1. jdbc drivers
  2. java udf
  3. trino connectors
  4. hadoop conf
  5. other custom jars

After this PR, all these plugins will be located in ${DORIS_HOME}/plugins/.

${DORIS_HOME}/plugins/jdbc_drivers/
${DORIS_HOME}/plugins/java_udf/
${DORIS_HOME}/plugins/connectors/
${DORIS_HOME}/plugins/hadoop_conf/

I tested:

  1. Put jars in old dir
  2. Put jars in new dir
  3. Put jars in custom dir and set dir in fe/be conf file

All works well.

Release note

None

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:
      • This is a refactor/code format and no logic has been changed.
      • Previous test can cover this change.
      • No code files have been changed.
      • Other reason
  • Behavior changed:

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

    • No.
    • Yes.

Check List (For Reviewer who merge this PR)

  • Confirm the release note
  • Confirm test cases
  • Confirm document
  • Add branch pick label

@Thearas
Copy link
Contributor

Thearas commented Dec 25, 2024

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
Contributor Author

run buildall

@doris-robot
Copy link

TPC-H: Total hot run time: 32418 ms
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpch-tools
Tpch sf100 test result on commit 532d7a4bb9cd0d8f97396aca8471ee06ae35fbc3, data reload: false

------ Round 1 ----------------------------------
q1	17587	6243	6128	6128
q2	2043	287	165	165
q3	10618	1200	756	756
q4	10195	879	430	430
q5	7514	2145	1944	1944
q6	207	185	153	153
q7	897	806	597	597
q8	9223	1346	1124	1124
q9	5062	4874	4973	4874
q10	6860	2412	1884	1884
q11	475	284	263	263
q12	351	368	222	222
q13	17790	3632	2931	2931
q14	255	240	218	218
q15	564	509	495	495
q16	630	623	602	602
q17	555	842	314	314
q18	6895	6444	6324	6324
q19	1542	969	543	543
q20	305	319	190	190
q21	3009	2158	1958	1958
q22	352	330	303	303
Total cold run time: 102929 ms
Total hot run time: 32418 ms

----- Round 2, with runtime_filter_mode=off -----
q1	6389	6376	6378	6376
q2	228	322	241	241
q3	2246	2650	2308	2308
q4	1401	1850	1342	1342
q5	4309	4723	4756	4723
q6	194	177	144	144
q7	2046	1992	1820	1820
q8	2611	2769	2637	2637
q9	7309	7213	7337	7213
q10	3115	3382	2892	2892
q11	571	494	484	484
q12	618	733	607	607
q13	3437	3733	3171	3171
q14	299	313	291	291
q15	583	508	494	494
q16	660	676	630	630
q17	1201	1710	1246	1246
q18	7690	7560	7325	7325
q19	809	1077	1093	1077
q20	1960	2062	1845	1845
q21	5811	5270	4919	4919
q22	598	629	593	593
Total cold run time: 54085 ms
Total hot run time: 52378 ms

@doris-robot
Copy link

TPC-DS: Total hot run time: 197860 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 532d7a4bb9cd0d8f97396aca8471ee06ae35fbc3, data reload: false

query1	1298	992	919	919
query2	6218	2314	2294	2294
query3	11027	4827	4750	4750
query4	32698	23672	23861	23672
query5	4171	605	463	463
query6	275	201	165	165
query7	4002	482	304	304
query8	301	248	243	243
query9	9442	2729	2706	2706
query10	479	312	245	245
query11	17954	15374	15400	15374
query12	161	107	99	99
query13	1556	539	403	403
query14	10464	7317	7524	7317
query15	235	220	194	194
query16	8151	669	484	484
query17	1558	794	625	625
query18	2131	417	321	321
query19	208	199	164	164
query20	117	118	115	115
query21	212	137	117	117
query22	4703	4570	4452	4452
query23	34420	33823	33838	33823
query24	6482	2352	2311	2311
query25	485	467	386	386
query26	911	277	152	152
query27	2345	458	352	352
query28	5280	2539	2500	2500
query29	711	565	422	422
query30	216	184	162	162
query31	993	925	860	860
query32	97	57	63	57
query33	496	356	324	324
query34	769	860	518	518
query35	822	855	760	760
query36	992	1086	977	977
query37	122	110	79	79
query38	4159	4255	4245	4245
query39	1540	1471	1477	1471
query40	208	114	99	99
query41	47	44	48	44
query42	121	108	103	103
query43	509	522	494	494
query44	1318	836	848	836
query45	179	177	175	175
query46	880	1092	666	666
query47	1995	1987	1949	1949
query48	392	406	329	329
query49	714	473	397	397
query50	648	658	388	388
query51	7216	7289	7207	7207
query52	104	101	93	93
query53	235	262	196	196
query54	478	500	416	416
query55	85	75	78	75
query56	251	266	246	246
query57	1268	1241	1164	1164
query58	234	230	223	223
query59	3299	3325	3140	3140
query60	270	254	250	250
query61	114	117	110	110
query62	885	826	807	807
query63	237	186	193	186
query64	4058	1072	688	688
query65	3329	3287	3286	3286
query66	1010	404	320	320
query67	16393	15874	15526	15526
query68	10114	756	525	525
query69	469	293	246	246
query70	1236	1055	1122	1055
query71	429	284	250	250
query72	5971	3828	3826	3826
query73	664	748	367	367
query74	10003	9083	8977	8977
query75	4507	3158	2659	2659
query76	5358	1180	758	758
query77	1000	362	372	362
query78	9994	10192	9395	9395
query79	3360	906	588	588
query80	682	544	427	427
query81	467	283	226	226
query82	209	148	127	127
query83	194	169	204	169
query84	281	92	71	71
query85	753	363	312	312
query86	353	322	293	293
query87	4530	4630	4427	4427
query88	3653	2236	2222	2222
query89	437	337	292	292
query90	2126	189	189	189
query91	138	133	111	111
query92	64	57	53	53
query93	2824	894	541	541
query94	662	391	283	283
query95	343	266	250	250
query96	486	612	277	277
query97	2775	2831	2707	2707
query98	217	197	202	197
query99	1604	1561	1440	1440
Total cold run time: 300581 ms
Total hot run time: 197860 ms

@doris-robot
Copy link

ClickBench: Total hot run time: 32.46 s
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/clickbench-tools
ClickBench test result on commit 532d7a4bb9cd0d8f97396aca8471ee06ae35fbc3, data reload: false

query1	0.04	0.04	0.04
query2	0.09	0.04	0.04
query3	0.23	0.07	0.07
query4	1.61	0.10	0.11
query5	0.43	0.41	0.41
query6	1.16	0.66	0.64
query7	0.02	0.01	0.02
query8	0.05	0.03	0.03
query9	0.58	0.49	0.51
query10	0.55	0.58	0.56
query11	0.14	0.10	0.11
query12	0.15	0.11	0.12
query13	0.62	0.61	0.60
query14	3.12	2.83	2.82
query15	0.89	0.83	0.82
query16	0.39	0.38	0.39
query17	1.08	1.06	1.08
query18	0.23	0.20	0.20
query19	1.84	1.90	2.00
query20	0.01	0.02	0.01
query21	15.36	0.94	0.60
query22	0.75	0.74	0.67
query23	15.33	1.38	0.56
query24	3.25	2.06	1.86
query25	0.24	0.13	0.07
query26	0.19	0.15	0.15
query27	0.05	0.06	0.04
query28	14.58	1.42	1.05
query29	12.55	4.03	3.28
query30	0.26	0.09	0.07
query31	2.82	0.62	0.38
query32	3.22	0.54	0.46
query33	3.09	3.09	3.09
query34	16.69	5.18	4.52
query35	4.53	4.45	4.56
query36	0.64	0.49	0.51
query37	0.10	0.06	0.06
query38	0.04	0.04	0.04
query39	0.03	0.03	0.03
query40	0.19	0.13	0.13
query41	0.07	0.02	0.02
query42	0.04	0.02	0.02
query43	0.04	0.03	0.03
Total cold run time: 107.29 s
Total hot run time: 32.46 s

@doris-robot
Copy link

TeamCity be ut coverage result:
Function Coverage: 38.83% (10104/26021)
Line Coverage: 29.83% (85337/286061)
Region Coverage: 28.98% (43619/150523)
Branch Coverage: 25.51% (22242/87184)
Coverage Report: http://coverage.selectdb-in.cc/coverage/532d7a4bb9cd0d8f97396aca8471ee06ae35fbc3_532d7a4bb9cd0d8f97396aca8471ee06ae35fbc3/report/index.html

@morningman morningman marked this pull request as draft January 14, 2025 03:36
@morningman
Copy link
Contributor Author

run buildall

@morningman morningman marked this pull request as ready for review February 7, 2025 14:17
@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17608	5215	5056	5056
q2	2054	298	163	163
q3	10417	1321	708	708
q4	10223	1009	541	541
q5	7526	2402	2299	2299
q6	191	167	131	131
q7	907	759	608	608
q8	9300	1233	1036	1036
q9	5142	4889	4544	4544
q10	6810	2309	1875	1875
q11	474	284	255	255
q12	342	351	220	220
q13	17757	3656	3055	3055
q14	222	221	204	204
q15	503	462	467	462
q16	607	613	576	576
q17	558	868	338	338
q18	6737	6346	6255	6255
q19	1228	945	533	533
q20	306	330	199	199
q21	2715	2210	1895	1895
q22	357	326	307	307
Total cold run time: 101984 ms
Total hot run time: 31260 ms

----- Round 2, with runtime_filter_mode=off -----
q1	5141	5101	5089	5089
q2	235	333	228	228
q3	2146	2646	2300	2300
q4	1407	1799	1374	1374
q5	4204	4129	4173	4129
q6	204	160	122	122
q7	1856	1852	1698	1698
q8	2576	2677	2559	2559
q9	7285	7118	7020	7020
q10	3018	3182	2721	2721
q11	576	511	478	478
q12	650	770	601	601
q13	3503	3864	3258	3258
q14	272	301	263	263
q15	502	473	460	460
q16	655	694	647	647
q17	1120	1613	1324	1324
q18	7514	7340	7354	7340
q19	745	822	818	818
q20	1945	2009	1843	1843
q21	5309	4869	4751	4751
q22	642	579	556	556
Total cold run time: 51505 ms
Total hot run time: 49579 ms

@doris-robot
Copy link

TPC-DS: Total hot run time: 184610 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 e6e7a252d885241375463b1765cd4bc9f49a851e, data reload: false

query1	957	401	367	367
query2	6527	1911	1921	1911
query3	6790	216	218	216
query4	26315	23902	23838	23838
query5	4335	694	490	490
query6	299	227	205	205
query7	4621	500	299	299
query8	295	232	213	213
query9	8590	2470	2476	2470
query10	459	298	246	246
query11	15626	15153	14930	14930
query12	156	107	108	107
query13	1644	513	389	389
query14	9124	6283	6051	6051
query15	203	198	181	181
query16	7122	630	479	479
query17	930	709	563	563
query18	1936	405	306	306
query19	198	186	157	157
query20	119	118	114	114
query21	214	134	101	101
query22	4416	4446	4779	4446
query23	34473	33698	33129	33129
query24	7945	2380	2418	2380
query25	538	447	386	386
query26	1065	266	148	148
query27	2453	484	328	328
query28	4164	2399	2379	2379
query29	698	532	404	404
query30	227	182	150	150
query31	928	828	766	766
query32	78	57	68	57
query33	541	341	300	300
query34	766	845	503	503
query35	852	814	728	728
query36	959	978	887	887
query37	123	97	80	80
query38	4206	4194	4202	4194
query39	1462	1428	1406	1406
query40	205	117	102	102
query41	52	52	49	49
query42	118	102	100	100
query43	505	522	469	469
query44	1255	775	762	762
query45	177	171	161	161
query46	861	1034	644	644
query47	1762	1822	1747	1747
query48	367	413	289	289
query49	752	498	418	418
query50	676	738	417	417
query51	4154	4220	4101	4101
query52	104	104	92	92
query53	224	255	184	184
query54	463	488	400	400
query55	78	78	84	78
query56	273	258	254	254
query57	1132	1131	1065	1065
query58	240	233	249	233
query59	2766	2794	2801	2794
query60	273	257	284	257
query61	127	119	116	116
query62	829	703	681	681
query63	221	188	179	179
query64	3821	1023	673	673
query65	3224	3117	3130	3117
query66	1062	399	298	298
query67	15809	15586	15847	15586
query68	7837	755	512	512
query69	479	305	282	282
query70	1151	1127	1104	1104
query71	420	306	265	265
query72	5808	3587	3731	3587
query73	733	728	349	349
query74	9236	9194	8884	8884
query75	3189	3212	2674	2674
query76	3254	1168	744	744
query77	514	386	290	290
query78	9988	10126	9312	9312
query79	2223	794	599	599
query80	609	524	456	456
query81	497	286	232	232
query82	470	151	120	120
query83	175	163	152	152
query84	282	95	74	74
query85	771	344	383	344
query86	369	297	284	284
query87	4607	4449	4390	4390
query88	3855	2155	2160	2155
query89	383	318	278	278
query90	1912	193	192	192
query91	138	140	106	106
query92	75	60	57	57
query93	1866	1000	572	572
query94	688	412	297	297
query95	352	271	265	265
query96	468	551	268	268
query97	2765	2851	2740	2740
query98	228	201	202	201
query99	1321	1393	1255	1255
Total cold run time: 270547 ms
Total hot run time: 184610 ms

@doris-robot
Copy link

ClickBench: Total hot run time: 30.88 s
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/clickbench-tools
ClickBench test result on commit e6e7a252d885241375463b1765cd4bc9f49a851e, data reload: false

query1	0.03	0.03	0.03
query2	0.08	0.03	0.03
query3	0.23	0.07	0.07
query4	1.60	0.10	0.10
query5	0.42	0.43	0.42
query6	1.16	0.67	0.64
query7	0.02	0.02	0.02
query8	0.04	0.03	0.03
query9	0.58	0.51	0.53
query10	0.57	0.58	0.57
query11	0.15	0.11	0.11
query12	0.15	0.11	0.11
query13	0.62	0.59	0.59
query14	2.81	2.69	2.70
query15	0.89	0.84	0.84
query16	0.38	0.38	0.38
query17	1.01	1.05	1.01
query18	0.22	0.19	0.20
query19	1.87	1.78	2.00
query20	0.02	0.01	0.02
query21	15.37	0.87	0.52
query22	0.77	1.16	0.63
query23	15.05	1.38	0.63
query24	6.83	1.98	1.20
query25	0.52	0.18	0.09
query26	0.57	0.17	0.15
query27	0.05	0.04	0.04
query28	9.74	0.82	0.43
query29	12.73	3.97	3.35
query30	0.25	0.08	0.06
query31	2.83	0.58	0.38
query32	3.22	0.53	0.47
query33	2.97	2.99	3.15
query34	15.70	5.12	4.50
query35	4.53	4.49	4.56
query36	0.68	0.49	0.49
query37	0.09	0.06	0.06
query38	0.05	0.04	0.04
query39	0.04	0.03	0.02
query40	0.17	0.14	0.13
query41	0.08	0.03	0.03
query42	0.04	0.03	0.02
query43	0.03	0.03	0.03
Total cold run time: 105.16 s
Total hot run time: 30.88 s

CalvinKirs
CalvinKirs previously approved these changes Feb 7, 2025
@github-actions github-actions bot added the approved Indicates a PR has been approved by one committer. label Feb 7, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Feb 7, 2025

PR approved by at least one committer and no changes requested.

@github-actions
Copy link
Contributor

github-actions bot commented Feb 7, 2025

PR approved by anyone and no changes requested.

@doris-robot
Copy link

TeamCity be ut coverage result:
Function Coverage: 42.06% (11018/26194)
Line Coverage: 32.34% (93038/287649)
Region Coverage: 31.52% (47720/151395)
Branch Coverage: 27.53% (24137/87678)
Coverage Report: http://coverage.selectdb-in.cc/coverage/e6e7a252d885241375463b1765cd4bc9f49a851e_e6e7a252d885241375463b1765cd4bc9f49a851e/report/index.html

@morningman
Copy link
Contributor Author

run buildall

@github-actions github-actions bot removed the approved Indicates a PR has been approved by one committer. label Feb 8, 2025
@doris-robot
Copy link

TPC-H: Total hot run time: 31592 ms
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpch-tools
Tpch sf100 test result on commit 863479eabb8573bfd15d66b5001cea7c4a100935, data reload: false

------ Round 1 ----------------------------------
q1	17579	5272	5090	5090
q2	2056	304	167	167
q3	10536	1230	766	766
q4	10212	1023	527	527
q5	7522	2380	2362	2362
q6	185	177	134	134
q7	902	745	603	603
q8	9310	1285	1096	1096
q9	4949	4758	4648	4648
q10	6827	2305	1921	1921
q11	496	271	258	258
q12	353	357	220	220
q13	17762	3728	3067	3067
q14	242	230	215	215
q15	515	471	460	460
q16	624	616	591	591
q17	589	875	350	350
q18	6802	6313	6103	6103
q19	1569	950	555	555
q20	329	327	182	182
q21	2974	2237	1978	1978
q22	359	332	299	299
Total cold run time: 102692 ms
Total hot run time: 31592 ms

----- Round 2, with runtime_filter_mode=off -----
q1	5206	5172	5105	5105
q2	240	328	235	235
q3	2189	2652	2294	2294
q4	1437	1821	1354	1354
q5	4241	4150	4193	4150
q6	208	166	129	129
q7	1893	1819	1716	1716
q8	2599	2627	2572	2572
q9	7221	7260	7210	7210
q10	3024	3242	2797	2797
q11	592	505	479	479
q12	674	789	619	619
q13	3392	3927	3358	3358
q14	272	310	282	282
q15	503	467	456	456
q16	639	662	642	642
q17	1126	1609	1396	1396
q18	7659	7334	7368	7334
q19	854	825	879	825
q20	1996	2001	1841	1841
q21	5478	5052	4739	4739
q22	665	571	562	562
Total cold run time: 52108 ms
Total hot run time: 50095 ms

@doris-robot
Copy link

TPC-DS: Total hot run time: 190387 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 863479eabb8573bfd15d66b5001cea7c4a100935, data reload: false

query1	1344	934	918	918
query2	6230	1873	1874	1873
query3	10953	4399	4355	4355
query4	53202	24738	23044	23044
query5	5119	593	471	471
query6	361	193	198	193
query7	4890	526	307	307
query8	318	248	235	235
query9	5545	2585	2604	2585
query10	416	334	254	254
query11	15213	15024	14843	14843
query12	153	105	112	105
query13	1038	519	382	382
query14	10766	6731	6503	6503
query15	212	201	178	178
query16	7055	646	475	475
query17	1080	721	580	580
query18	1531	421	341	341
query19	218	200	166	166
query20	134	120	128	120
query21	217	122	109	109
query22	4478	4550	4362	4362
query23	34050	33379	33462	33379
query24	5666	2443	2459	2443
query25	503	484	442	442
query26	693	283	171	171
query27	1759	553	336	336
query28	2733	2472	2412	2412
query29	585	554	439	439
query30	207	187	153	153
query31	927	885	832	832
query32	74	70	67	67
query33	459	379	304	304
query34	763	878	513	513
query35	803	822	782	782
query36	966	1009	899	899
query37	135	103	81	81
query38	4212	4321	4354	4321
query39	1529	1465	1457	1457
query40	205	116	103	103
query41	51	48	48	48
query42	118	104	107	104
query43	524	499	486	486
query44	1344	817	832	817
query45	181	173	169	169
query46	890	1075	669	669
query47	1795	1917	1783	1783
query48	412	442	303	303
query49	706	522	424	424
query50	741	773	423	423
query51	4301	4296	4194	4194
query52	115	108	99	99
query53	232	279	195	195
query54	498	510	423	423
query55	85	82	82	82
query56	271	269	248	248
query57	1252	1210	1075	1075
query58	268	244	281	244
query59	2807	2844	2752	2752
query60	302	272	263	263
query61	123	121	118	118
query62	759	739	667	667
query63	235	196	198	196
query64	1487	1044	683	683
query65	3296	3180	3140	3140
query66	745	399	302	302
query67	15803	15599	15506	15506
query68	4798	793	516	516
query69	504	296	263	263
query70	1203	1131	1113	1113
query71	425	300	267	267
query72	5897	3649	3851	3649
query73	1023	761	351	351
query74	8979	9080	8969	8969
query75	3196	3226	2701	2701
query76	3723	1180	805	805
query77	577	378	279	279
query78	9976	10083	9449	9449
query79	2679	807	587	587
query80	697	542	457	457
query81	506	270	239	239
query82	542	151	120	120
query83	172	172	157	157
query84	280	99	79	79
query85	773	355	313	313
query86	372	291	276	276
query87	4435	4454	4364	4364
query88	3542	2207	2211	2207
query89	423	309	284	284
query90	1722	195	197	195
query91	137	139	111	111
query92	72	61	58	58
query93	2145	1036	572	572
query94	710	421	293	293
query95	346	263	259	259
query96	490	565	268	268
query97	2822	2857	2769	2769
query98	239	205	193	193
query99	1362	1442	1278	1278
Total cold run time: 290850 ms
Total hot run time: 190387 ms

@doris-robot
Copy link

ClickBench: Total hot run time: 30.88 s
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/clickbench-tools
ClickBench test result on commit 863479eabb8573bfd15d66b5001cea7c4a100935, data reload: false

query1	0.03	0.05	0.03
query2	0.07	0.04	0.03
query3	0.24	0.07	0.07
query4	1.61	0.10	0.10
query5	0.41	0.42	0.41
query6	1.16	0.67	0.66
query7	0.02	0.02	0.02
query8	0.04	0.03	0.03
query9	0.59	0.52	0.50
query10	0.59	0.57	0.58
query11	0.15	0.10	0.10
query12	0.14	0.11	0.12
query13	0.61	0.60	0.59
query14	2.73	2.85	2.72
query15	0.91	0.86	0.84
query16	0.38	0.39	0.38
query17	1.07	1.04	1.05
query18	0.20	0.20	0.20
query19	1.90	1.78	2.03
query20	0.01	0.01	0.01
query21	15.38	0.91	0.54
query22	0.75	1.17	0.67
query23	14.98	1.38	0.64
query24	7.02	1.89	1.09
query25	0.49	0.18	0.23
query26	0.51	0.15	0.12
query27	0.05	0.05	0.05
query28	10.47	0.84	0.42
query29	12.57	3.95	3.28
query30	0.25	0.09	0.06
query31	2.81	0.58	0.38
query32	3.22	0.54	0.46
query33	3.05	3.02	3.01
query34	15.67	5.11	4.48
query35	4.57	4.50	4.55
query36	0.66	0.52	0.50
query37	0.09	0.06	0.06
query38	0.05	0.05	0.03
query39	0.02	0.02	0.02
query40	0.17	0.13	0.13
query41	0.08	0.02	0.02
query42	0.03	0.03	0.02
query43	0.04	0.03	0.03
Total cold run time: 105.79 s
Total hot run time: 30.88 s

@doris-robot
Copy link

TeamCity be ut coverage result:
Function Coverage: 42.60% (11160/26197)
Line Coverage: 32.63% (93879/287741)
Region Coverage: 31.80% (48161/151445)
Branch Coverage: 27.72% (24313/87716)
Coverage Report: http://coverage.selectdb-in.cc/coverage/863479eabb8573bfd15d66b5001cea7c4a100935_863479eabb8573bfd15d66b5001cea7c4a100935/report/index.html

@morningman
Copy link
Contributor Author

run buildall

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17637	5255	5025	5025
q2	2048	312	171	171
q3	10379	1245	763	763
q4	10198	1010	534	534
q5	7516	2407	2327	2327
q6	180	165	132	132
q7	915	740	610	610
q8	9310	1291	1059	1059
q9	4818	4876	4790	4790
q10	6814	2317	1910	1910
q11	472	281	252	252
q12	348	355	219	219
q13	17794	3692	3082	3082
q14	227	238	208	208
q15	510	466	449	449
q16	639	621	594	594
q17	564	863	348	348
q18	6719	6234	6109	6109
q19	1211	944	549	549
q20	317	321	194	194
q21	2918	2207	1901	1901
q22	360	334	302	302
Total cold run time: 101894 ms
Total hot run time: 31528 ms

----- Round 2, with runtime_filter_mode=off -----
q1	5132	5118	5146	5118
q2	232	326	227	227
q3	2166	2668	2276	2276
q4	1456	1814	1370	1370
q5	4238	4163	4161	4161
q6	218	165	132	132
q7	1855	1829	1665	1665
q8	2590	2652	2564	2564
q9	7240	7189	7150	7150
q10	3014	3186	2781	2781
q11	580	532	504	504
q12	681	788	638	638
q13	3550	3946	3321	3321
q14	285	302	269	269
q15	524	488	461	461
q16	643	672	648	648
q17	1138	1568	1374	1374
q18	7609	7460	7400	7400
q19	817	829	881	829
q20	1964	2050	1866	1866
q21	5441	4944	4712	4712
q22	630	583	531	531
Total cold run time: 52003 ms
Total hot run time: 49997 ms

@doris-robot
Copy link

TPC-DS: Total hot run time: 190000 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 8ce008628c467003302dabe030202922568f4c8f, data reload: false

query1	1321	944	967	944
query2	6217	1881	1826	1826
query3	10991	4586	4409	4409
query4	55958	25640	23003	23003
query5	5206	531	481	481
query6	340	209	184	184
query7	4934	502	290	290
query8	316	248	238	238
query9	5866	2579	2584	2579
query10	418	308	251	251
query11	15137	15073	14986	14986
query12	153	106	108	106
query13	1073	503	370	370
query14	10841	6314	6310	6310
query15	196	198	179	179
query16	7082	627	492	492
query17	1053	707	589	589
query18	1578	430	335	335
query19	225	200	170	170
query20	129	128	119	119
query21	204	127	103	103
query22	4388	4512	4244	4244
query23	33907	33496	33444	33444
query24	5842	2453	2471	2453
query25	491	500	433	433
query26	672	287	163	163
query27	1671	496	340	340
query28	2755	2497	2402	2402
query29	572	553	419	419
query30	211	190	154	154
query31	916	925	808	808
query32	73	62	62	62
query33	435	344	311	311
query34	763	868	517	517
query35	783	829	778	778
query36	945	999	921	921
query37	123	98	79	79
query38	4242	4300	4357	4300
query39	1514	1446	1435	1435
query40	206	112	101	101
query41	52	52	48	48
query42	117	101	101	101
query43	527	510	481	481
query44	1323	811	804	804
query45	177	175	171	171
query46	900	1084	666	666
query47	1829	1893	1774	1774
query48	388	420	315	315
query49	704	531	434	434
query50	718	750	435	435
query51	4254	4344	4309	4309
query52	109	105	104	104
query53	238	268	196	196
query54	499	505	414	414
query55	89	81	79	79
query56	283	313	249	249
query57	1158	1197	1110	1110
query58	252	250	245	245
query59	2857	3040	2620	2620
query60	284	270	265	265
query61	124	167	115	115
query62	777	778	692	692
query63	245	200	188	188
query64	1462	1022	669	669
query65	3178	3122	3125	3122
query66	723	389	308	308
query67	15753	15808	15451	15451
query68	5611	768	520	520
query69	533	300	273	273
query70	1182	1097	1099	1097
query71	437	298	274	274
query72	5896	3692	3781	3692
query73	1297	739	358	358
query74	9272	9175	8904	8904
query75	3304	3219	2718	2718
query76	3884	1192	737	737
query77	546	379	275	275
query78	9989	10117	9355	9355
query79	2232	795	573	573
query80	666	521	446	446
query81	482	276	245	245
query82	220	148	118	118
query83	174	247	149	149
query84	287	95	68	68
query85	730	353	311	311
query86	346	313	290	290
query87	4467	4554	4523	4523
query88	3465	2213	2184	2184
query89	396	315	277	277
query90	1818	191	192	191
query91	133	136	109	109
query92	76	59	58	58
query93	2203	1007	572	572
query94	670	409	283	283
query95	350	270	263	263
query96	487	563	269	269
query97	2801	2893	2729	2729
query98	231	213	199	199
query99	1322	1408	1247	1247
Total cold run time: 294274 ms
Total hot run time: 190000 ms

@doris-robot
Copy link

ClickBench: Total hot run time: 30.62 s
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/clickbench-tools
ClickBench test result on commit 8ce008628c467003302dabe030202922568f4c8f, data reload: false

query1	0.04	0.03	0.03
query2	0.08	0.03	0.04
query3	0.25	0.06	0.06
query4	1.61	0.10	0.11
query5	0.40	0.42	0.39
query6	1.18	0.65	0.68
query7	0.02	0.01	0.01
query8	0.03	0.03	0.03
query9	0.60	0.51	0.54
query10	0.57	0.58	0.56
query11	0.15	0.11	0.10
query12	0.14	0.11	0.11
query13	0.62	0.60	0.59
query14	2.67	2.72	2.68
query15	0.92	0.86	0.83
query16	0.37	0.38	0.36
query17	1.00	1.03	1.08
query18	0.22	0.19	0.19
query19	1.95	1.76	2.04
query20	0.02	0.01	0.02
query21	15.36	0.93	0.56
query22	0.74	1.16	0.73
query23	14.94	1.45	0.62
query24	7.27	1.89	0.96
query25	0.44	0.29	0.16
query26	0.54	0.16	0.13
query27	0.06	0.05	0.05
query28	9.67	0.80	0.43
query29	12.60	3.92	3.22
query30	0.25	0.09	0.06
query31	2.85	0.59	0.38
query32	3.23	0.54	0.46
query33	3.02	3.03	3.03
query34	15.84	5.09	4.49
query35	4.51	4.54	4.51
query36	0.65	0.49	0.49
query37	0.09	0.06	0.06
query38	0.05	0.04	0.03
query39	0.03	0.02	0.02
query40	0.17	0.12	0.12
query41	0.08	0.03	0.03
query42	0.04	0.02	0.02
query43	0.04	0.04	0.03
Total cold run time: 105.31 s
Total hot run time: 30.62 s

@doris-robot
Copy link

TeamCity be ut coverage result:
Function Coverage: 42.65% (11173/26197)
Line Coverage: 32.66% (93979/287747)
Region Coverage: 31.82% (48192/151449)
Branch Coverage: 27.74% (24330/87720)
Coverage Report: http://coverage.selectdb-in.cc/coverage/8ce008628c467003302dabe030202922568f4c8f_8ce008628c467003302dabe030202922568f4c8f/report/index.html

@github-actions
Copy link
Contributor

github-actions bot commented Feb 8, 2025

PR approved by at least one committer and no changes requested.

@github-actions github-actions bot added the approved Indicates a PR has been approved by one committer. label Feb 8, 2025
@morningman morningman merged commit 4edd307 into apache:master Feb 8, 2025
23 of 25 checks passed
lzyy2024 pushed a commit to lzyy2024/doris that referenced this pull request Feb 21, 2025
### What problem does this PR solve?
This pull request primarily updates the directory structure for plugins
and JDBC drivers, ensuring compatibility with previous versions.
Additionally, it includes changes to various configuration files and
scripts to reflect these updates.

#### Directory Structure Updates:

*
[`be/src/common/config.cpp`](diffhunk://#diff-b626e6ab16bc72abf40db76bf5094fcc8ca3c37534c2eb83b63b7805e1b601ffL54-R54):
Changed the default directory for `jdbc_drivers_dir` and
`trino_connector_plugin_dir` to `${DORIS_HOME}/plugins/*` for better
organization.
[[1]](diffhunk://#diff-b626e6ab16bc72abf40db76bf5094fcc8ca3c37534c2eb83b63b7805e1b601ffL54-R54)
[[2]](diffhunk://#diff-b626e6ab16bc72abf40db76bf5094fcc8ca3c37534c2eb83b63b7805e1b601ffL1288-R1288)
*
[`build.sh`](diffhunk://#diff-4d2a8eefdf2a9783512a35da4dc7676a66404b6f3826a8af9aad038722da6823L755-R759):
Updated the script to create new plugin directories under
`${DORIS_OUTPUT}/fe/plugins/` and `${DORIS_OUTPUT}/be/plugins/`.
[[1]](diffhunk://#diff-4d2a8eefdf2a9783512a35da4dc7676a66404b6f3826a8af9aad038722da6823L755-R759)
[[2]](diffhunk://#diff-4d2a8eefdf2a9783512a35da4dc7676a66404b6f3826a8af9aad038722da6823L882-R890)

#### Code Refactoring for Compatibility:

* `be/src/runtime/user_function_cache.cpp` and
`be/src/runtime/user_function_cache.h`: Introduced
`_check_and_return_default_driver_url` method to maintain compatibility
with the old default directory for JDBC drivers.
[[1]](diffhunk://#diff-08d48161cad0bb4c6ec31c154c3017407caaff2402f0feb599f014f2d87ae9edL328-R354)
[[2]](diffhunk://#diff-0cfb7bc4e6df1282c7dc7f9ec6677ffc9a03ed6cd08f4fea11ba43bcc297f0c3R79-R80)
*
[`fe/be-java-extensions/trino-connector-scanner/src/main/java/org/apache/doris/trinoconnector/TrinoConnectorPluginLoader.java`](diffhunk://#diff-19838c8c525ec05716e434f18d1ef270dfa03029385258c53b8fbe7da5ba25b9L43-R43):
Added `checkAndReturnPluginDir` method to ensure compatibility with the
old plugin directory.
[[1]](diffhunk://#diff-19838c8c525ec05716e434f18d1ef270dfa03029385258c53b8fbe7da5ba25b9L43-R43)
[[2]](diffhunk://#diff-19838c8c525ec05716e434f18d1ef270dfa03029385258c53b8fbe7da5ba25b9L75-R84)
[[3]](diffhunk://#diff-19838c8c525ec05716e434f18d1ef270dfa03029385258c53b8fbe7da5ba25b9R94-R116)

#### Configuration Updates:

*
[`fe/fe-common/src/main/java/org/apache/doris/common/Config.java`](diffhunk://#diff-ed7dee981e5322b45ed92fbc3c9e049191574baa990894ae36a97567ce198c74L144-R144):
Updated various configuration paths to use `EnvUtils.getDorisHome()`
instead of `System.getenv("DORIS_HOME")` for consistency and
maintainability.
[[1]](diffhunk://#diff-ed7dee981e5322b45ed92fbc3c9e049191574baa990894ae36a97567ce198c74L144-R144)
[[2]](diffhunk://#diff-ed7dee981e5322b45ed92fbc3c9e049191574baa990894ae36a97567ce198c74L153-R153)
[[3]](diffhunk://#diff-ed7dee981e5322b45ed92fbc3c9e049191574baa990894ae36a97567ce198c74L204-R207)
[[4]](diffhunk://#diff-ed7dee981e5322b45ed92fbc3c9e049191574baa990894ae36a97567ce198c74L358-R358)
[[5]](diffhunk://#diff-ed7dee981e5322b45ed92fbc3c9e049191574baa990894ae36a97567ce198c74L630-R630)
[[6]](diffhunk://#diff-ed7dee981e5322b45ed92fbc3c9e049191574baa990894ae36a97567ce198c74L639-R642)
[[7]](diffhunk://#diff-ed7dee981e5322b45ed92fbc3c9e049191574baa990894ae36a97567ce198c74L1281-R1281)
[[8]](diffhunk://#diff-ed7dee981e5322b45ed92fbc3c9e049191574baa990894ae36a97567ce198c74L2364-R2371)
[[9]](diffhunk://#diff-ed7dee981e5322b45ed92fbc3c9e049191574baa990894ae36a97567ce198c74L2903-R2903)

#### Minor Cleanup:

*
[`fe/fe-core/src/main/java/org/apache/doris/analysis/CreateFunctionStmt.java`](diffhunk://#diff-1481395f49d6c346e93c01ca884ae2b7e65c85247d02cc91a20cd48b98bdf349L271-L273):
Removed commented-out code for better readability.
*
[`fe/fe-core/src/main/java/org/apache/doris/catalog/JdbcResource.java`](diffhunk://#diff-24260bdb6ba0b3ac0f5c719e5c48c3ea70d13405af93670adc8692de523730cfR38):
Refactored `getFullDriverUrl` method to use
`checkAndReturnDefaultDriverUrl` for compatibility with the old JDBC
drivers directory.
[[1]](diffhunk://#diff-24260bdb6ba0b3ac0f5c719e5c48c3ea70d13405af93670adc8692de523730cfR38)
[[2]](diffhunk://#diff-24260bdb6ba0b3ac0f5c719e5c48c3ea70d13405af93670adc8692de523730cfL296-R297)
[[3]](diffhunk://#diff-24260bdb6ba0b3ac0f5c719e5c48c3ea70d13405af93670adc8692de523730cfR316-R336)

There are following kinds of plugins in Doris:

1. jdbc drivers
2. java udf
3. trino connectors
4. hadoop conf
5. other custom jars

After this PR, all these plugins will be located in
`${DORIS_HOME}/plugins/`.

```
${DORIS_HOME}/plugins/jdbc_drivers/
${DORIS_HOME}/plugins/java_udf/
${DORIS_HOME}/plugins/connectors/
${DORIS_HOME}/plugins/hadoop_conf/
```

I tested:

1. Put jars in old dir
2. Put jars in new dir
3. Put jars in custom dir and set dir in fe/be conf file

All works well.
koarz pushed a commit to koarz/doris that referenced this pull request Jun 4, 2025
### What problem does this PR solve?
This pull request primarily updates the directory structure for plugins
and JDBC drivers, ensuring compatibility with previous versions.
Additionally, it includes changes to various configuration files and
scripts to reflect these updates.

#### Directory Structure Updates:

*
[`be/src/common/config.cpp`](diffhunk://#diff-b626e6ab16bc72abf40db76bf5094fcc8ca3c37534c2eb83b63b7805e1b601ffL54-R54):
Changed the default directory for `jdbc_drivers_dir` and
`trino_connector_plugin_dir` to `${DORIS_HOME}/plugins/*` for better
organization.
[[1]](diffhunk://#diff-b626e6ab16bc72abf40db76bf5094fcc8ca3c37534c2eb83b63b7805e1b601ffL54-R54)
[[2]](diffhunk://#diff-b626e6ab16bc72abf40db76bf5094fcc8ca3c37534c2eb83b63b7805e1b601ffL1288-R1288)
*
[`build.sh`](diffhunk://#diff-4d2a8eefdf2a9783512a35da4dc7676a66404b6f3826a8af9aad038722da6823L755-R759):
Updated the script to create new plugin directories under
`${DORIS_OUTPUT}/fe/plugins/` and `${DORIS_OUTPUT}/be/plugins/`.
[[1]](diffhunk://#diff-4d2a8eefdf2a9783512a35da4dc7676a66404b6f3826a8af9aad038722da6823L755-R759)
[[2]](diffhunk://#diff-4d2a8eefdf2a9783512a35da4dc7676a66404b6f3826a8af9aad038722da6823L882-R890)

#### Code Refactoring for Compatibility:

* `be/src/runtime/user_function_cache.cpp` and
`be/src/runtime/user_function_cache.h`: Introduced
`_check_and_return_default_driver_url` method to maintain compatibility
with the old default directory for JDBC drivers.
[[1]](diffhunk://#diff-08d48161cad0bb4c6ec31c154c3017407caaff2402f0feb599f014f2d87ae9edL328-R354)
[[2]](diffhunk://#diff-0cfb7bc4e6df1282c7dc7f9ec6677ffc9a03ed6cd08f4fea11ba43bcc297f0c3R79-R80)
*
[`fe/be-java-extensions/trino-connector-scanner/src/main/java/org/apache/doris/trinoconnector/TrinoConnectorPluginLoader.java`](diffhunk://#diff-19838c8c525ec05716e434f18d1ef270dfa03029385258c53b8fbe7da5ba25b9L43-R43):
Added `checkAndReturnPluginDir` method to ensure compatibility with the
old plugin directory.
[[1]](diffhunk://#diff-19838c8c525ec05716e434f18d1ef270dfa03029385258c53b8fbe7da5ba25b9L43-R43)
[[2]](diffhunk://#diff-19838c8c525ec05716e434f18d1ef270dfa03029385258c53b8fbe7da5ba25b9L75-R84)
[[3]](diffhunk://#diff-19838c8c525ec05716e434f18d1ef270dfa03029385258c53b8fbe7da5ba25b9R94-R116)

#### Configuration Updates:

*
[`fe/fe-common/src/main/java/org/apache/doris/common/Config.java`](diffhunk://#diff-ed7dee981e5322b45ed92fbc3c9e049191574baa990894ae36a97567ce198c74L144-R144):
Updated various configuration paths to use `EnvUtils.getDorisHome()`
instead of `System.getenv("DORIS_HOME")` for consistency and
maintainability.
[[1]](diffhunk://#diff-ed7dee981e5322b45ed92fbc3c9e049191574baa990894ae36a97567ce198c74L144-R144)
[[2]](diffhunk://#diff-ed7dee981e5322b45ed92fbc3c9e049191574baa990894ae36a97567ce198c74L153-R153)
[[3]](diffhunk://#diff-ed7dee981e5322b45ed92fbc3c9e049191574baa990894ae36a97567ce198c74L204-R207)
[[4]](diffhunk://#diff-ed7dee981e5322b45ed92fbc3c9e049191574baa990894ae36a97567ce198c74L358-R358)
[[5]](diffhunk://#diff-ed7dee981e5322b45ed92fbc3c9e049191574baa990894ae36a97567ce198c74L630-R630)
[[6]](diffhunk://#diff-ed7dee981e5322b45ed92fbc3c9e049191574baa990894ae36a97567ce198c74L639-R642)
[[7]](diffhunk://#diff-ed7dee981e5322b45ed92fbc3c9e049191574baa990894ae36a97567ce198c74L1281-R1281)
[[8]](diffhunk://#diff-ed7dee981e5322b45ed92fbc3c9e049191574baa990894ae36a97567ce198c74L2364-R2371)
[[9]](diffhunk://#diff-ed7dee981e5322b45ed92fbc3c9e049191574baa990894ae36a97567ce198c74L2903-R2903)

#### Minor Cleanup:

*
[`fe/fe-core/src/main/java/org/apache/doris/analysis/CreateFunctionStmt.java`](diffhunk://#diff-1481395f49d6c346e93c01ca884ae2b7e65c85247d02cc91a20cd48b98bdf349L271-L273):
Removed commented-out code for better readability.
*
[`fe/fe-core/src/main/java/org/apache/doris/catalog/JdbcResource.java`](diffhunk://#diff-24260bdb6ba0b3ac0f5c719e5c48c3ea70d13405af93670adc8692de523730cfR38):
Refactored `getFullDriverUrl` method to use
`checkAndReturnDefaultDriverUrl` for compatibility with the old JDBC
drivers directory.
[[1]](diffhunk://#diff-24260bdb6ba0b3ac0f5c719e5c48c3ea70d13405af93670adc8692de523730cfR38)
[[2]](diffhunk://#diff-24260bdb6ba0b3ac0f5c719e5c48c3ea70d13405af93670adc8692de523730cfL296-R297)
[[3]](diffhunk://#diff-24260bdb6ba0b3ac0f5c719e5c48c3ea70d13405af93670adc8692de523730cfR316-R336)

There are following kinds of plugins in Doris:

1. jdbc drivers
2. java udf
3. trino connectors
4. hadoop conf
5. other custom jars

After this PR, all these plugins will be located in
`${DORIS_HOME}/plugins/`.

```
${DORIS_HOME}/plugins/jdbc_drivers/
${DORIS_HOME}/plugins/java_udf/
${DORIS_HOME}/plugins/connectors/
${DORIS_HOME}/plugins/hadoop_conf/
```

I tested:

1. Put jars in old dir
2. Put jars in new dir
3. Put jars in custom dir and set dir in fe/be conf file

All works well.
morningman added a commit to morningman/doris that referenced this pull request Jul 8, 2025
This pull request primarily updates the directory structure for plugins
and JDBC drivers, ensuring compatibility with previous versions.
Additionally, it includes changes to various configuration files and
scripts to reflect these updates.

*
[`be/src/common/config.cpp`](diffhunk://#diff-b626e6ab16bc72abf40db76bf5094fcc8ca3c37534c2eb83b63b7805e1b601ffL54-R54):
Changed the default directory for `jdbc_drivers_dir` and
`trino_connector_plugin_dir` to `${DORIS_HOME}/plugins/*` for better
organization.
[[1]](diffhunk://#diff-b626e6ab16bc72abf40db76bf5094fcc8ca3c37534c2eb83b63b7805e1b601ffL54-R54)
[[2]](diffhunk://#diff-b626e6ab16bc72abf40db76bf5094fcc8ca3c37534c2eb83b63b7805e1b601ffL1288-R1288)
*
[`build.sh`](diffhunk://#diff-4d2a8eefdf2a9783512a35da4dc7676a66404b6f3826a8af9aad038722da6823L755-R759):
Updated the script to create new plugin directories under
`${DORIS_OUTPUT}/fe/plugins/` and `${DORIS_OUTPUT}/be/plugins/`.
[[1]](diffhunk://#diff-4d2a8eefdf2a9783512a35da4dc7676a66404b6f3826a8af9aad038722da6823L755-R759)
[[2]](diffhunk://#diff-4d2a8eefdf2a9783512a35da4dc7676a66404b6f3826a8af9aad038722da6823L882-R890)

* `be/src/runtime/user_function_cache.cpp` and
`be/src/runtime/user_function_cache.h`: Introduced
`_check_and_return_default_driver_url` method to maintain compatibility
with the old default directory for JDBC drivers.
[[1]](diffhunk://#diff-08d48161cad0bb4c6ec31c154c3017407caaff2402f0feb599f014f2d87ae9edL328-R354)
[[2]](diffhunk://#diff-0cfb7bc4e6df1282c7dc7f9ec6677ffc9a03ed6cd08f4fea11ba43bcc297f0c3R79-R80)
*
[`fe/be-java-extensions/trino-connector-scanner/src/main/java/org/apache/doris/trinoconnector/TrinoConnectorPluginLoader.java`](diffhunk://#diff-19838c8c525ec05716e434f18d1ef270dfa03029385258c53b8fbe7da5ba25b9L43-R43):
Added `checkAndReturnPluginDir` method to ensure compatibility with the
old plugin directory.
[[1]](diffhunk://#diff-19838c8c525ec05716e434f18d1ef270dfa03029385258c53b8fbe7da5ba25b9L43-R43)
[[2]](diffhunk://#diff-19838c8c525ec05716e434f18d1ef270dfa03029385258c53b8fbe7da5ba25b9L75-R84)
[[3]](diffhunk://#diff-19838c8c525ec05716e434f18d1ef270dfa03029385258c53b8fbe7da5ba25b9R94-R116)

*
[`fe/fe-common/src/main/java/org/apache/doris/common/Config.java`](diffhunk://#diff-ed7dee981e5322b45ed92fbc3c9e049191574baa990894ae36a97567ce198c74L144-R144):
Updated various configuration paths to use `EnvUtils.getDorisHome()`
instead of `System.getenv("DORIS_HOME")` for consistency and
maintainability.
[[1]](diffhunk://#diff-ed7dee981e5322b45ed92fbc3c9e049191574baa990894ae36a97567ce198c74L144-R144)
[[2]](diffhunk://#diff-ed7dee981e5322b45ed92fbc3c9e049191574baa990894ae36a97567ce198c74L153-R153)
[[3]](diffhunk://#diff-ed7dee981e5322b45ed92fbc3c9e049191574baa990894ae36a97567ce198c74L204-R207)
[[4]](diffhunk://#diff-ed7dee981e5322b45ed92fbc3c9e049191574baa990894ae36a97567ce198c74L358-R358)
[[5]](diffhunk://#diff-ed7dee981e5322b45ed92fbc3c9e049191574baa990894ae36a97567ce198c74L630-R630)
[[6]](diffhunk://#diff-ed7dee981e5322b45ed92fbc3c9e049191574baa990894ae36a97567ce198c74L639-R642)
[[7]](diffhunk://#diff-ed7dee981e5322b45ed92fbc3c9e049191574baa990894ae36a97567ce198c74L1281-R1281)
[[8]](diffhunk://#diff-ed7dee981e5322b45ed92fbc3c9e049191574baa990894ae36a97567ce198c74L2364-R2371)
[[9]](diffhunk://#diff-ed7dee981e5322b45ed92fbc3c9e049191574baa990894ae36a97567ce198c74L2903-R2903)

*
[`fe/fe-core/src/main/java/org/apache/doris/analysis/CreateFunctionStmt.java`](diffhunk://#diff-1481395f49d6c346e93c01ca884ae2b7e65c85247d02cc91a20cd48b98bdf349L271-L273):
Removed commented-out code for better readability.
*
[`fe/fe-core/src/main/java/org/apache/doris/catalog/JdbcResource.java`](diffhunk://#diff-24260bdb6ba0b3ac0f5c719e5c48c3ea70d13405af93670adc8692de523730cfR38):
Refactored `getFullDriverUrl` method to use
`checkAndReturnDefaultDriverUrl` for compatibility with the old JDBC
drivers directory.
[[1]](diffhunk://#diff-24260bdb6ba0b3ac0f5c719e5c48c3ea70d13405af93670adc8692de523730cfR38)
[[2]](diffhunk://#diff-24260bdb6ba0b3ac0f5c719e5c48c3ea70d13405af93670adc8692de523730cfL296-R297)
[[3]](diffhunk://#diff-24260bdb6ba0b3ac0f5c719e5c48c3ea70d13405af93670adc8692de523730cfR316-R336)

There are following kinds of plugins in Doris:

1. jdbc drivers
2. java udf
3. trino connectors
4. hadoop conf
5. other custom jars

After this PR, all these plugins will be located in
`${DORIS_HOME}/plugins/`.

```
${DORIS_HOME}/plugins/jdbc_drivers/
${DORIS_HOME}/plugins/java_udf/
${DORIS_HOME}/plugins/connectors/
${DORIS_HOME}/plugins/hadoop_conf/
```

I tested:

1. Put jars in old dir
2. Put jars in new dir
3. Put jars in custom dir and set dir in fe/be conf file

All works well.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants