Commit 13f5924
authored
[refactor](fe) Merge fe-connector-api into fe-connector-spi (#66407)
### What problem does this PR solve?
Problem Summary:
The connector plugin contract was split across two modules whose names
were
inverted relative to common usage: `fe-connector-api` held the types a
plugin
IMPLEMENTS (`Connector`, `ConnectorMetadata` and its Ops sub-interfaces,
the
scan / write / procedure providers, handles, pushdown and ddl value
types) —
which is what "SPI" normally names — while `fe-connector-spi` held
mostly the
engine services a plugin CONSUMES (`ConnectorContext`,
`ConnectorStorageContext`,
`ConnectorConf`), which is what "API" normally names. Both modules'
package-info
already documented the inversion and asked readers to "read the content,
not the
name". The `fe-connector-metastore-api` / `-metastore-spi` pair right
next to
them follows the opposite (standard) convention, so one directory
carried two
contradictory naming rules.
Swapping the two names does not fix it. A strict split by "who
implements" is
circular: `ConnectorProvider.create` takes a `ConnectorContext` (spi ->
api),
while `ConnectorContext.createSiblingConnector` returns a `Connector`
(api -> spi). That cycle is exactly why Trino keeps its whole plugin
surface in
a single `trino-spi` module, and this framework is modelled on Trino.
This commit does the same: `fe-connector-api` is merged into
`fe-connector-spi`, and `org.apache.doris.connector.api` becomes
`org.apache.doris.connector.spi`. The merge is dependency-neutral —
every module
that depended on `fe-connector-api` (hive, hudi, maxcompute, paimon,
trino,
fe-core) already depended on `fe-connector-spi` as well.
Two consequences worth calling out:
- The connector plugin API version is bumped 2.0 -> 3.0. Every type on
the
contract changed its fully-qualified name, so a plugin built against 2.0
must
be refused by `ApiVersionGate` at load time rather than fail later with
`NoClassDefFoundError`. Both recorded baselines
(`connector-metadata-methods.txt`, `connector-plugin-surface.txt`) and
the
version pinned in `ConnectorPluginSurfaceTest` are updated in this
commit.
`ConnectorPluginManagerTest` used to hardcode the compatible major as a
literal; it now derives both the stale and the current major from the
kernel's declared version, because what that test asserts is the gate
(stale refused, current admitted), not which number is current.
`ConnectorPluginSurfaceTest` remains the one deliberate speed bump.
- `ChildFirstClassLoader.DEFAULT_PARENT_FIRST_PACKAGES` listed only
`org.apache.doris.connector.api.`, so `ConnectorProvider` and
`ConnectorContext` were not parent-first. After the merge the single
`org.apache.doris.connector.spi.` entry covers the whole contract.
The merged `package-info.java` keeps the existing Rule 1-7 design rules;
Rule 4
now explains why both directions live in one module instead of
disclaiming the
inverted names. README.md and AGENTS.md are updated accordingly.1 parent 99dd2b3 commit 13f5924
610 files changed
Lines changed: 2540 additions & 2670 deletions
File tree
- build-support
- tests
- fe
- fe-connector
- fe-connector-api
- src
- main/java/org/apache/doris/connector/api
- test/resources
- fe-connector-es/src
- main
- assembly
- java/org/apache/doris/connector/es
- test/java/org/apache/doris/connector/es
- fe-connector-hive
- src
- main
- assembly
- java/org/apache/doris/connector/hive
- test/java/org/apache/doris/connector/hive
- fe-connector-hms/src
- main/java/org/apache/doris/connector/hms
- event
- test/java/org/apache/doris/connector/hms
- event
- fe-connector-hudi
- src
- main
- assembly
- java/org/apache/doris/connector/hudi
- test/java/org/apache/doris/connector/hudi
- fe-connector-iceberg
- src
- main
- assembly
- java/org/apache/doris/connector/iceberg
- action
- rewrite
- test/java/org/apache/doris/connector/iceberg
- action
- rewrite
- fe-connector-jdbc/src
- main
- assembly
- java/org/apache/doris/connector/jdbc
- client
- test/java/org/apache/doris/connector/jdbc
- client
- fe-connector-maxcompute
- src
- main
- assembly
- java/org/apache/doris/connector/maxcompute
- test/java/org/apache/doris/connector/maxcompute
- fe-connector-paimon
- src
- main
- assembly
- java/org/apache/doris/connector/paimon
- test/java/org/apache/doris/connector/paimon
- fe-connector-spi
- src
- main/java/org/apache/doris/connector/spi
- ddl
- event
- handle
- mvcc
- procedure
- pushdown
- rest
- scan
- write
- test
- java/org/apache/doris/connector/spi
- handle
- mvcc
- procedure
- pushdown
- scan
- write
- resources
- fe-connector-trino
- src
- main
- assembly
- java/org/apache/doris/connector/trino
- test/java/org/apache/doris/connector/trino
- fe-core
- src
- main/java/org/apache/doris
- catalog
- connector
- ddl
- datasource
- connector/converter
- mvcc
- plugin
- scan
- split
- httpv2/restv2
- nereids
- analyzer
- glue/translator
- rules/analysis
- trees/plans
- commands
- call
- execute
- info
- insert
- physical
- planner
- tablefunction
- transaction
- test/java/org/apache/doris
- catalog
- common/cache
- connectorconf/testplugins
- connector
- ddl
- fake
- datasource
- connector/converter
- mvcc
- plugin
- scan
- split
- upgrade
- nereids
- analyzer
- glue/translator
- trees/plans
- commands
- execute
- insert
- physical
- planner
- pluginapiversion/testplugins
- tablefunction
- transaction
- fe-extension-loader/src/main/java/org/apache/doris/extension/loader
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
54 | | - | |
| 54 | + | |
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
| 28 | + | |
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
61 | | - | |
| 61 | + | |
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
| |||
117 | 117 | | |
118 | 118 | | |
119 | 119 | | |
120 | | - | |
| 120 | + | |
121 | 121 | | |
122 | 122 | | |
123 | 123 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
723 | 723 | | |
724 | 724 | | |
725 | 725 | | |
726 | | - | |
727 | | - | |
| 726 | + | |
728 | 727 | | |
729 | 728 | | |
730 | 729 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
| 17 | + | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | | - | |
| 43 | + | |
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
57 | 62 | | |
58 | 63 | | |
59 | 64 | | |
| |||
94 | 99 | | |
95 | 100 | | |
96 | 101 | | |
97 | | - | |
98 | | - | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
99 | 105 | | |
100 | 106 | | |
101 | 107 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | | - | |
44 | | - | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
45 | 50 | | |
46 | 51 | | |
47 | 52 | | |
| |||
99 | 104 | | |
100 | 105 | | |
101 | 106 | | |
102 | | - | |
103 | | - | |
| 107 | + | |
| 108 | + | |
104 | 109 | | |
105 | 110 | | |
106 | 111 | | |
| |||
119 | 124 | | |
120 | 125 | | |
121 | 126 | | |
122 | | - | |
123 | | - | |
124 | | - | |
125 | | - | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
126 | 130 | | |
127 | 131 | | |
128 | 132 | | |
129 | 133 | | |
130 | 134 | | |
131 | 135 | | |
132 | | - | |
| 136 | + | |
133 | 137 | | |
134 | 138 | | |
135 | 139 | | |
| |||
146 | 150 | | |
147 | 151 | | |
148 | 152 | | |
149 | | - | |
| 153 | + | |
150 | 154 | | |
151 | 155 | | |
152 | 156 | | |
| |||
239 | 243 | | |
240 | 244 | | |
241 | 245 | | |
242 | | - | |
243 | | - | |
244 | | - | |
245 | | - | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
246 | 250 | | |
247 | 251 | | |
248 | 252 | | |
| |||
This file was deleted.
0 commit comments