Commit 47a2a80
In apache#20061, we introduced the
`CoordinatorMetadataImage` and `CoordinatorMetadataDelta` interfaces to
basically contain/control how metadata is used within the
`GroupCoordinatorService`, more precisely within the
`GroupCoordinatorShard`. When we did the change, we directly changed the
`GroupCoordinator` interface to take implementation of those interfaces,
requiring to wrap the `MetadataImage` and the `MetadataDelta` in the
`BrokerMetadataPublisher`. While looking at it now, I find this not idea
for a couple a reasons:
1) From a `BrokerMetadataPublisher` perspective, propagating metadata
should be standardized. Basically, all the internal components should
work the same from his point of view. If a component wants to be more
restrictive within his scope, it is fine but the publisher should not be
aware of this.
2) From a `GroupCoordinator` perspective, requiring
`CoordinatorMetadataImage` and `CoordinatorMetadataDelta` limits what we
can do. For instance, we could move more functionality such as electing
shards from the `BrokerMetadataPublisher` to the
`GroupCoordinatorService` to further simplify the metadata publishing
and improving the encapsulation of the components.
3) From a `ShareCoordinator` perspective, the abstraction failed short
as we require `CoordinatorMetadataImage` and `CoordinatorMetadataDelta`
in the interface but we still require `FeaturesImage` as well. The
abstraction fails short here.
This patch is an attempt to change this by moving back to requiring
`MetadataImage` and `MetadataDelta` in the `GroupCoordinator` interface
and to wrap them within the service itself. It does not change the
`ShareCoordinator` yet. I will do this as a follow-up if people agree
with the general approach.
Reviewers: Sean Quah <squah@confluent.io>, Lianet Magrans <lmagrans@confluent.io>
1 parent edf5947 commit 47a2a80
File tree
8 files changed
+54
-57
lines changed- coordinator-common/src
- main/java/org/apache/kafka/coordinator/common/runtime
- test/java/org/apache/kafka/coordinator/common/runtime
- core/src
- main/scala/kafka/server/metadata
- test/scala/unit/kafka/server/metadata
- group-coordinator/src
- main/java/org/apache/kafka/coordinator/group
- test/java/org/apache/kafka/coordinator/group
8 files changed
+54
-57
lines changedLines changed: 5 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2535 | 2535 | | |
2536 | 2536 | | |
2537 | 2537 | | |
2538 | | - | |
2539 | | - | |
| 2538 | + | |
| 2539 | + | |
2540 | 2540 | | |
2541 | | - | |
2542 | | - | |
2543 | | - | |
| 2541 | + | |
| 2542 | + | |
| 2543 | + | |
2544 | 2544 | | |
2545 | 2545 | | |
2546 | 2546 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1968 | 1968 | | |
1969 | 1969 | | |
1970 | 1970 | | |
1971 | | - | |
| 1971 | + | |
1972 | 1972 | | |
1973 | 1973 | | |
1974 | 1974 | | |
| |||
2029 | 2029 | | |
2030 | 2030 | | |
2031 | 2031 | | |
2032 | | - | |
| 2032 | + | |
2033 | 2033 | | |
2034 | 2034 | | |
2035 | 2035 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
234 | 234 | | |
235 | 235 | | |
236 | 236 | | |
237 | | - | |
| 237 | + | |
238 | 238 | | |
239 | 239 | | |
240 | 240 | | |
| |||
Lines changed: 1 addition & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
39 | 38 | | |
40 | 39 | | |
41 | 40 | | |
| |||
292 | 291 | | |
293 | 292 | | |
294 | 293 | | |
295 | | - | |
| 294 | + | |
296 | 295 | | |
297 | 296 | | |
298 | 297 | | |
| |||
Lines changed: 6 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
56 | | - | |
57 | | - | |
58 | 56 | | |
| 57 | + | |
| 58 | + | |
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
| |||
452 | 452 | | |
453 | 453 | | |
454 | 454 | | |
455 | | - | |
456 | 455 | | |
| 456 | + | |
457 | 457 | | |
458 | | - | |
459 | | - | |
460 | | - | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
461 | 461 | | |
462 | 462 | | |
463 | 463 | | |
| |||
Lines changed: 14 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
88 | | - | |
89 | 88 | | |
90 | 89 | | |
91 | 90 | | |
92 | 91 | | |
93 | 92 | | |
94 | 93 | | |
| 94 | + | |
| 95 | + | |
95 | 96 | | |
96 | 97 | | |
97 | 98 | | |
98 | 99 | | |
99 | 100 | | |
| 101 | + | |
| 102 | + | |
100 | 103 | | |
101 | 104 | | |
102 | 105 | | |
| |||
344 | 347 | | |
345 | 348 | | |
346 | 349 | | |
347 | | - | |
| 350 | + | |
348 | 351 | | |
349 | | - | |
| 352 | + | |
350 | 353 | | |
351 | 354 | | |
352 | 355 | | |
| |||
2299 | 2302 | | |
2300 | 2303 | | |
2301 | 2304 | | |
2302 | | - | |
| 2305 | + | |
2303 | 2306 | | |
2304 | 2307 | | |
2305 | | - | |
2306 | | - | |
2307 | | - | |
| 2308 | + | |
| 2309 | + | |
| 2310 | + | |
2308 | 2311 | | |
2309 | 2312 | | |
2310 | | - | |
2311 | | - | |
| 2313 | + | |
| 2314 | + | |
| 2315 | + | |
| 2316 | + | |
2312 | 2317 | | |
2313 | 2318 | | |
2314 | 2319 | | |
| |||
Lines changed: 24 additions & 31 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
91 | | - | |
92 | 91 | | |
93 | 92 | | |
94 | | - | |
95 | | - | |
96 | 93 | | |
97 | 94 | | |
98 | 95 | | |
| |||
3166 | 3163 | | |
3167 | 3164 | | |
3168 | 3165 | | |
3169 | | - | |
| 3166 | + | |
3170 | 3167 | | |
3171 | 3168 | | |
3172 | 3169 | | |
| |||
3224 | 3221 | | |
3225 | 3222 | | |
3226 | 3223 | | |
3227 | | - | |
| 3224 | + | |
3228 | 3225 | | |
3229 | 3226 | | |
3230 | 3227 | | |
| |||
3271 | 3268 | | |
3272 | 3269 | | |
3273 | 3270 | | |
3274 | | - | |
| 3271 | + | |
3275 | 3272 | | |
3276 | | - | |
3277 | | - | |
| 3273 | + | |
| 3274 | + | |
3278 | 3275 | | |
3279 | 3276 | | |
3280 | 3277 | | |
| |||
3321 | 3318 | | |
3322 | 3319 | | |
3323 | 3320 | | |
3324 | | - | |
3325 | | - | |
| 3321 | + | |
| 3322 | + | |
3326 | 3323 | | |
3327 | 3324 | | |
3328 | 3325 | | |
| |||
4149 | 4146 | | |
4150 | 4147 | | |
4151 | 4148 | | |
4152 | | - | |
| 4149 | + | |
4153 | 4150 | | |
4154 | 4151 | | |
4155 | 4152 | | |
| |||
4232 | 4229 | | |
4233 | 4230 | | |
4234 | 4231 | | |
4235 | | - | |
| 4232 | + | |
4236 | 4233 | | |
4237 | 4234 | | |
4238 | 4235 | | |
| |||
4276 | 4273 | | |
4277 | 4274 | | |
4278 | 4275 | | |
4279 | | - | |
| 4276 | + | |
4280 | 4277 | | |
4281 | 4278 | | |
4282 | 4279 | | |
| |||
4347 | 4344 | | |
4348 | 4345 | | |
4349 | 4346 | | |
4350 | | - | |
| 4347 | + | |
4351 | 4348 | | |
4352 | 4349 | | |
4353 | 4350 | | |
| |||
4383 | 4380 | | |
4384 | 4381 | | |
4385 | 4382 | | |
4386 | | - | |
| 4383 | + | |
4387 | 4384 | | |
4388 | 4385 | | |
4389 | 4386 | | |
| |||
4420 | 4417 | | |
4421 | 4418 | | |
4422 | 4419 | | |
4423 | | - | |
| 4420 | + | |
4424 | 4421 | | |
4425 | 4422 | | |
4426 | 4423 | | |
| |||
4510 | 4507 | | |
4511 | 4508 | | |
4512 | 4509 | | |
4513 | | - | |
| 4510 | + | |
4514 | 4511 | | |
4515 | 4512 | | |
4516 | 4513 | | |
| |||
4707 | 4704 | | |
4708 | 4705 | | |
4709 | 4706 | | |
4710 | | - | |
| 4707 | + | |
4711 | 4708 | | |
4712 | 4709 | | |
4713 | 4710 | | |
| |||
5584 | 5581 | | |
5585 | 5582 | | |
5586 | 5583 | | |
5587 | | - | |
| 5584 | + | |
5588 | 5585 | | |
5589 | 5586 | | |
5590 | 5587 | | |
| |||
5759 | 5756 | | |
5760 | 5757 | | |
5761 | 5758 | | |
5762 | | - | |
| 5759 | + | |
5763 | 5760 | | |
5764 | 5761 | | |
5765 | 5762 | | |
| |||
5821 | 5818 | | |
5822 | 5819 | | |
5823 | 5820 | | |
5824 | | - | |
| 5821 | + | |
5825 | 5822 | | |
5826 | 5823 | | |
5827 | 5824 | | |
| |||
5977 | 5974 | | |
5978 | 5975 | | |
5979 | 5976 | | |
5980 | | - | |
| 5977 | + | |
5981 | 5978 | | |
5982 | 5979 | | |
5983 | 5980 | | |
| |||
6026 | 6023 | | |
6027 | 6024 | | |
6028 | 6025 | | |
6029 | | - | |
| 6026 | + | |
6030 | 6027 | | |
6031 | 6028 | | |
6032 | 6029 | | |
| |||
6035 | 6032 | | |
6036 | 6033 | | |
6037 | 6034 | | |
6038 | | - | |
| 6035 | + | |
| 6036 | + | |
| 6037 | + | |
6039 | 6038 | | |
6040 | 6039 | | |
6041 | 6040 | | |
| |||
6051 | 6050 | | |
6052 | 6051 | | |
6053 | 6052 | | |
6054 | | - | |
| 6053 | + | |
6055 | 6054 | | |
6056 | | - | |
6057 | | - | |
6058 | | - | |
6059 | | - | |
6060 | | - | |
6061 | | - | |
6062 | 6055 | | |
6063 | 6056 | | |
6064 | 6057 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1100 | 1100 | | |
1101 | 1101 | | |
1102 | 1102 | | |
1103 | | - | |
| 1103 | + | |
1104 | 1104 | | |
1105 | 1105 | | |
1106 | 1106 | | |
| |||
0 commit comments