Skip to content

Commit dfa35b9

Browse files
authored
feat(linking): use linkId for update group API (#2352)
Signed-off-by: Shichao Nie <[email protected]>
1 parent 95a2107 commit dfa35b9

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

clients/src/main/java/org/apache/kafka/clients/admin/UpdateGroupSpec.java

+8-8
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@
1414
import java.util.Objects;
1515

1616
public class UpdateGroupSpec {
17-
private String clusterId;
17+
private String linkId;
1818
private boolean promoted;
1919

20-
public UpdateGroupSpec clusterId(String clusterId) {
21-
this.clusterId = clusterId;
20+
public UpdateGroupSpec linkId(String linkId) {
21+
this.linkId = linkId;
2222
return this;
2323
}
2424

@@ -27,8 +27,8 @@ public UpdateGroupSpec promoted(boolean promoted) {
2727
return this;
2828
}
2929

30-
public String clusterId() {
31-
return clusterId;
30+
public String linkId() {
31+
return linkId;
3232
}
3333

3434
public boolean promoted() {
@@ -42,18 +42,18 @@ public boolean equals(Object o) {
4242
if (o == null || getClass() != o.getClass())
4343
return false;
4444
UpdateGroupSpec spec = (UpdateGroupSpec) o;
45-
return promoted == spec.promoted && Objects.equals(clusterId, spec.clusterId);
45+
return promoted == spec.promoted && Objects.equals(linkId, spec.linkId);
4646
}
4747

4848
@Override
4949
public int hashCode() {
50-
return Objects.hash(clusterId, promoted);
50+
return Objects.hash(linkId, promoted);
5151
}
5252

5353
@Override
5454
public String toString() {
5555
return "UpdateGroupsSpec{" +
56-
"clusterId='" + clusterId + '\'' +
56+
"linkId='" + linkId + '\'' +
5757
", promoted=" + promoted +
5858
'}';
5959
}

clients/src/main/java/org/apache/kafka/clients/admin/internals/UpdateGroupHandler.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ public AutomqUpdateGroupRequest.Builder buildBatchedRequest(
8686
validateKeys(groupIds);
8787
return new AutomqUpdateGroupRequest.Builder(
8888
new AutomqUpdateGroupRequestData()
89-
.setClusterId(groupSpec.clusterId())
89+
.setLinkId(groupSpec.linkId())
9090
.setGroupId(this.groupId.idValue)
9191
.setPromoted(groupSpec.promoted())
9292
);

clients/src/main/resources/common/message/AutomqUpdateGroupRequest.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@
2424
"flexibleVersions": "0+",
2525
"fields": [
2626
{
27-
"name": "ClusterId",
27+
"name": "LinkId",
2828
"type": "string",
2929
"versions": "0+",
30-
"about": "The unique cluster ID which used for identification of the cluster to be linked"
30+
"about": "The unique ID of a kafka link"
3131
},
3232
{
3333
"name": "GroupId",

0 commit comments

Comments
 (0)