Browse Source
Add a new exception, NoReassignmentInProgressException. Modify LeaderAndIsrRequest to include the AddingRepicas and RemovingReplicas fields. Add the ListPartitionReassignments and AlterPartitionReassignments RPCs. Reviewers: Colin P. McCabe <cmccabe@apache.org>, Viktor Somogyi <viktorsomogyi@gmail.com>pull/7133/head
Stanislav Kozlovski
5 years ago
committed by
Colin Patrick McCabe
22 changed files with 867 additions and 15 deletions
@ -0,0 +1,31 @@
@@ -0,0 +1,31 @@
|
||||
/* |
||||
* Licensed to the Apache Software Foundation (ASF) under one or more |
||||
* contributor license agreements. See the NOTICE file distributed with |
||||
* this work for additional information regarding copyright ownership. |
||||
* The ASF licenses this file to You under the Apache License, Version 2.0 |
||||
* (the "License"); you may not use this file except in compliance with |
||||
* the License. You may obtain a copy of the License at |
||||
* |
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* |
||||
* Unless required by applicable law or agreed to in writing, software |
||||
* distributed under the License is distributed on an "AS IS" BASIS, |
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
* See the License for the specific language governing permissions and |
||||
* limitations under the License. |
||||
*/ |
||||
|
||||
package org.apache.kafka.common.errors; |
||||
|
||||
/** |
||||
* Thrown if a reassignment cannot be cancelled because none is in progress. |
||||
*/ |
||||
public class NoReassignmentInProgressException extends ApiException { |
||||
public NoReassignmentInProgressException(String message) { |
||||
super(message); |
||||
} |
||||
|
||||
public NoReassignmentInProgressException(String message, Throwable cause) { |
||||
super(message, cause); |
||||
} |
||||
} |
@ -0,0 +1,114 @@
@@ -0,0 +1,114 @@
|
||||
/* |
||||
* Licensed to the Apache Software Foundation (ASF) under one or more |
||||
* contributor license agreements. See the NOTICE file distributed with |
||||
* this work for additional information regarding copyright ownership. |
||||
* The ASF licenses this file to You under the Apache License, Version 2.0 |
||||
* (the "License"); you may not use this file except in compliance with |
||||
* the License. You may obtain a copy of the License at |
||||
* |
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* |
||||
* Unless required by applicable law or agreed to in writing, software |
||||
* distributed under the License is distributed on an "AS IS" BASIS, |
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
* See the License for the specific language governing permissions and |
||||
* limitations under the License. |
||||
*/ |
||||
|
||||
package org.apache.kafka.common.requests; |
||||
|
||||
import org.apache.kafka.common.message.AlterPartitionReassignmentsRequestData; |
||||
import org.apache.kafka.common.message.AlterPartitionReassignmentsRequestData.ReassignableTopic; |
||||
import org.apache.kafka.common.message.AlterPartitionReassignmentsResponseData; |
||||
import org.apache.kafka.common.message.AlterPartitionReassignmentsResponseData.ReassignablePartitionResponse; |
||||
import org.apache.kafka.common.message.AlterPartitionReassignmentsResponseData.ReassignableTopicResponse; |
||||
import org.apache.kafka.common.protocol.ApiKeys; |
||||
import org.apache.kafka.common.protocol.types.Struct; |
||||
|
||||
import java.nio.ByteBuffer; |
||||
import java.util.ArrayList; |
||||
import java.util.List; |
||||
import java.util.stream.Collectors; |
||||
|
||||
public class AlterPartitionReassignmentsRequest extends AbstractRequest { |
||||
|
||||
public static class Builder extends AbstractRequest.Builder<AlterPartitionReassignmentsRequest> { |
||||
private final AlterPartitionReassignmentsRequestData data; |
||||
|
||||
public Builder(AlterPartitionReassignmentsRequestData data) { |
||||
super(ApiKeys.ALTER_PARTITION_REASSIGNMENTS); |
||||
this.data = data; |
||||
} |
||||
|
||||
@Override |
||||
public AlterPartitionReassignmentsRequest build(short version) { |
||||
return new AlterPartitionReassignmentsRequest(data, version); |
||||
} |
||||
|
||||
@Override |
||||
public String toString() { |
||||
return data.toString(); |
||||
} |
||||
} |
||||
|
||||
private final AlterPartitionReassignmentsRequestData data; |
||||
private final short version; |
||||
|
||||
private AlterPartitionReassignmentsRequest(AlterPartitionReassignmentsRequestData data, short version) { |
||||
super(ApiKeys.ALTER_PARTITION_REASSIGNMENTS, version); |
||||
this.data = data; |
||||
this.version = version; |
||||
} |
||||
|
||||
AlterPartitionReassignmentsRequest(Struct struct, short version) { |
||||
super(ApiKeys.ALTER_PARTITION_REASSIGNMENTS, version); |
||||
this.data = new AlterPartitionReassignmentsRequestData(struct, version); |
||||
this.version = version; |
||||
} |
||||
|
||||
public static AlterPartitionReassignmentsRequest parse(ByteBuffer buffer, short version) { |
||||
return new AlterPartitionReassignmentsRequest( |
||||
ApiKeys.ALTER_PARTITION_REASSIGNMENTS.parseRequest(version, buffer), |
||||
version |
||||
); |
||||
} |
||||
|
||||
public AlterPartitionReassignmentsRequestData data() { |
||||
return data; |
||||
} |
||||
|
||||
/** |
||||
* Visible for testing. |
||||
*/ |
||||
@Override |
||||
public Struct toStruct() { |
||||
return data.toStruct(version); |
||||
} |
||||
|
||||
@Override |
||||
public AbstractResponse getErrorResponse(int throttleTimeMs, Throwable e) { |
||||
ApiError apiError = ApiError.fromThrowable(e); |
||||
List<ReassignableTopicResponse> topicResponses = new ArrayList<>(); |
||||
|
||||
for (ReassignableTopic topic : data.topics()) { |
||||
List<ReassignablePartitionResponse> partitionResponses = topic.partitions().stream().map(partition -> |
||||
new ReassignablePartitionResponse() |
||||
.setPartitionIndex(partition.partitionIndex()) |
||||
.setErrorCode(apiError.error().code()) |
||||
.setErrorMessage(apiError.message()) |
||||
).collect(Collectors.toList()); |
||||
topicResponses.add( |
||||
new ReassignableTopicResponse() |
||||
.setName(topic.name()) |
||||
.setPartitions(partitionResponses) |
||||
); |
||||
} |
||||
|
||||
AlterPartitionReassignmentsResponseData responseData = new AlterPartitionReassignmentsResponseData() |
||||
.setResponses(topicResponses) |
||||
.setErrorCode(apiError.error().code()) |
||||
.setErrorMessage(apiError.message()) |
||||
.setThrottleTimeMs(throttleTimeMs); |
||||
return new AlterPartitionReassignmentsResponse(responseData); |
||||
} |
||||
} |
@ -0,0 +1,84 @@
@@ -0,0 +1,84 @@
|
||||
/* |
||||
* Licensed to the Apache Software Foundation (ASF) under one or more |
||||
* contributor license agreements. See the NOTICE file distributed with |
||||
* this work for additional information regarding copyright ownership. |
||||
* The ASF licenses this file to You under the Apache License, Version 2.0 |
||||
* (the "License"); you may not use this file except in compliance with |
||||
* the License. You may obtain a copy of the License at |
||||
* |
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* |
||||
* Unless required by applicable law or agreed to in writing, software |
||||
* distributed under the License is distributed on an "AS IS" BASIS, |
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
* See the License for the specific language governing permissions and |
||||
* limitations under the License. |
||||
*/ |
||||
|
||||
package org.apache.kafka.common.requests; |
||||
|
||||
import org.apache.kafka.common.message.AlterPartitionReassignmentsResponseData; |
||||
import org.apache.kafka.common.message.AlterPartitionReassignmentsResponseData.ReassignableTopicResponse; |
||||
import org.apache.kafka.common.message.AlterPartitionReassignmentsResponseData.ReassignablePartitionResponse; |
||||
import org.apache.kafka.common.protocol.ApiKeys; |
||||
import org.apache.kafka.common.protocol.Errors; |
||||
import org.apache.kafka.common.protocol.types.Struct; |
||||
|
||||
import java.nio.ByteBuffer; |
||||
import java.util.HashMap; |
||||
import java.util.Map; |
||||
|
||||
public class AlterPartitionReassignmentsResponse extends AbstractResponse { |
||||
|
||||
private final AlterPartitionReassignmentsResponseData data; |
||||
|
||||
public AlterPartitionReassignmentsResponse(Struct struct) { |
||||
this(struct, ApiKeys.ALTER_PARTITION_REASSIGNMENTS.latestVersion()); |
||||
} |
||||
|
||||
AlterPartitionReassignmentsResponse(AlterPartitionReassignmentsResponseData data) { |
||||
this.data = data; |
||||
} |
||||
|
||||
AlterPartitionReassignmentsResponse(Struct struct, short version) { |
||||
this.data = new AlterPartitionReassignmentsResponseData(struct, version); |
||||
} |
||||
|
||||
public static AlterPartitionReassignmentsResponse parse(ByteBuffer buffer, short version) { |
||||
return new AlterPartitionReassignmentsResponse(ApiKeys.ALTER_PARTITION_REASSIGNMENTS.responseSchema(version).read(buffer), version); |
||||
} |
||||
|
||||
public AlterPartitionReassignmentsResponseData data() { |
||||
return data; |
||||
} |
||||
|
||||
@Override |
||||
public boolean shouldClientThrottle(short version) { |
||||
return true; |
||||
} |
||||
|
||||
@Override |
||||
public int throttleTimeMs() { |
||||
return data.throttleTimeMs(); |
||||
} |
||||
|
||||
@Override |
||||
public Map<Errors, Integer> errorCounts() { |
||||
Map<Errors, Integer> counts = new HashMap<>(); |
||||
Errors topLevelErr = Errors.forCode(data.errorCode()); |
||||
counts.put(topLevelErr, counts.getOrDefault(topLevelErr, 0) + 1); |
||||
|
||||
for (ReassignableTopicResponse topicResponse : data.responses()) { |
||||
for (ReassignablePartitionResponse partitionResponse : topicResponse.partitions()) { |
||||
Errors error = Errors.forCode(partitionResponse.errorCode()); |
||||
counts.put(error, counts.getOrDefault(error, 0) + 1); |
||||
} |
||||
} |
||||
return counts; |
||||
} |
||||
|
||||
@Override |
||||
protected Struct toStruct(short version) { |
||||
return data.toStruct(version); |
||||
} |
||||
} |
@ -0,0 +1,104 @@
@@ -0,0 +1,104 @@
|
||||
/* |
||||
* Licensed to the Apache Software Foundation (ASF) under one or more |
||||
* contributor license agreements. See the NOTICE file distributed with |
||||
* this work for additional information regarding copyright ownership. |
||||
* The ASF licenses this file to You under the Apache License, Version 2.0 |
||||
* (the "License"); you may not use this file except in compliance with |
||||
* the License. You may obtain a copy of the License at |
||||
* |
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* |
||||
* Unless required by applicable law or agreed to in writing, software |
||||
* distributed under the License is distributed on an "AS IS" BASIS, |
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
* See the License for the specific language governing permissions and |
||||
* limitations under the License. |
||||
*/ |
||||
package org.apache.kafka.common.requests; |
||||
|
||||
import org.apache.kafka.common.message.ListPartitionReassignmentsRequestData; |
||||
import org.apache.kafka.common.message.ListPartitionReassignmentsResponseData; |
||||
import org.apache.kafka.common.message.ListPartitionReassignmentsResponseData.OngoingPartitionReassignment; |
||||
import org.apache.kafka.common.message.ListPartitionReassignmentsResponseData.OngoingTopicReassignment; |
||||
import org.apache.kafka.common.protocol.ApiKeys; |
||||
import org.apache.kafka.common.protocol.types.Struct; |
||||
|
||||
import java.nio.ByteBuffer; |
||||
import java.util.List; |
||||
import java.util.stream.Collectors; |
||||
|
||||
|
||||
public class ListPartitionReassignmentsRequest extends AbstractRequest { |
||||
|
||||
public static class Builder extends AbstractRequest.Builder<ListPartitionReassignmentsRequest> { |
||||
private final ListPartitionReassignmentsRequestData data; |
||||
|
||||
public Builder(ListPartitionReassignmentsRequestData data) { |
||||
super(ApiKeys.LIST_PARTITION_REASSIGNMENTS); |
||||
this.data = data; |
||||
} |
||||
|
||||
@Override |
||||
public ListPartitionReassignmentsRequest build(short version) { |
||||
return new ListPartitionReassignmentsRequest(data, version); |
||||
} |
||||
|
||||
@Override |
||||
public String toString() { |
||||
return data.toString(); |
||||
} |
||||
} |
||||
|
||||
private ListPartitionReassignmentsRequestData data; |
||||
private final short version; |
||||
|
||||
private ListPartitionReassignmentsRequest(ListPartitionReassignmentsRequestData data, short version) { |
||||
super(ApiKeys.LIST_PARTITION_REASSIGNMENTS, version); |
||||
this.data = data; |
||||
this.version = version; |
||||
} |
||||
|
||||
ListPartitionReassignmentsRequest(Struct struct, short version) { |
||||
super(ApiKeys.LIST_PARTITION_REASSIGNMENTS, version); |
||||
this.data = new ListPartitionReassignmentsRequestData(struct, version); |
||||
this.version = version; |
||||
} |
||||
|
||||
public static ListPartitionReassignmentsRequest parse(ByteBuffer buffer, short version) { |
||||
return new ListPartitionReassignmentsRequest( |
||||
ApiKeys.LIST_PARTITION_REASSIGNMENTS.parseRequest(version, buffer), version |
||||
); |
||||
} |
||||
|
||||
public ListPartitionReassignmentsRequestData data() { |
||||
return data; |
||||
} |
||||
|
||||
/** |
||||
* Visible for testing. |
||||
*/ |
||||
@Override |
||||
public Struct toStruct() { |
||||
return data.toStruct(version); |
||||
} |
||||
|
||||
@Override |
||||
public AbstractResponse getErrorResponse(int throttleTimeMs, Throwable e) { |
||||
ApiError apiError = ApiError.fromThrowable(e); |
||||
|
||||
List<OngoingTopicReassignment> ongoingTopicReassignments = data.topics().stream().map(topic -> |
||||
new OngoingTopicReassignment() |
||||
.setName(topic.name()) |
||||
.setPartitions(topic.partitionIndexes().stream().map(partitionIndex -> |
||||
new OngoingPartitionReassignment().setPartitionIndex(partitionIndex)).collect(Collectors.toList()) |
||||
) |
||||
).collect(Collectors.toList()); |
||||
|
||||
ListPartitionReassignmentsResponseData responseData = new ListPartitionReassignmentsResponseData() |
||||
.setTopics(ongoingTopicReassignments) |
||||
.setErrorCode(apiError.error().code()) |
||||
.setErrorMessage(apiError.message()) |
||||
.setThrottleTimeMs(throttleTimeMs); |
||||
return new ListPartitionReassignmentsResponse(responseData); |
||||
} |
||||
} |
@ -0,0 +1,75 @@
@@ -0,0 +1,75 @@
|
||||
/* |
||||
* Licensed to the Apache Software Foundation (ASF) under one or more |
||||
* contributor license agreements. See the NOTICE file distributed with |
||||
* this work for additional information regarding copyright ownership. |
||||
* The ASF licenses this file to You under the Apache License, Version 2.0 |
||||
* (the "License"); you may not use this file except in compliance with |
||||
* the License. You may obtain a copy of the License at |
||||
* |
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* |
||||
* Unless required by applicable law or agreed to in writing, software |
||||
* distributed under the License is distributed on an "AS IS" BASIS, |
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
* See the License for the specific language governing permissions and |
||||
* limitations under the License. |
||||
*/ |
||||
package org.apache.kafka.common.requests; |
||||
|
||||
import org.apache.kafka.common.message.ListPartitionReassignmentsResponseData; |
||||
import org.apache.kafka.common.protocol.ApiKeys; |
||||
import org.apache.kafka.common.protocol.Errors; |
||||
import org.apache.kafka.common.protocol.types.Struct; |
||||
|
||||
import java.nio.ByteBuffer; |
||||
import java.util.HashMap; |
||||
import java.util.Map; |
||||
|
||||
public class ListPartitionReassignmentsResponse extends AbstractResponse { |
||||
|
||||
private final ListPartitionReassignmentsResponseData data; |
||||
|
||||
public ListPartitionReassignmentsResponse(Struct struct) { |
||||
this(struct, ApiKeys.LIST_PARTITION_REASSIGNMENTS.latestVersion()); |
||||
} |
||||
|
||||
ListPartitionReassignmentsResponse(ListPartitionReassignmentsResponseData responseData) { |
||||
this.data = responseData; |
||||
} |
||||
|
||||
ListPartitionReassignmentsResponse(Struct struct, short version) { |
||||
this.data = new ListPartitionReassignmentsResponseData(struct, version); |
||||
} |
||||
|
||||
public static ListPartitionReassignmentsResponse parse(ByteBuffer buffer, short version) { |
||||
return new ListPartitionReassignmentsResponse(ApiKeys.LIST_PARTITION_REASSIGNMENTS.responseSchema(version).read(buffer), version); |
||||
} |
||||
|
||||
public ListPartitionReassignmentsResponseData data() { |
||||
return data; |
||||
} |
||||
|
||||
@Override |
||||
public boolean shouldClientThrottle(short version) { |
||||
return true; |
||||
} |
||||
|
||||
@Override |
||||
public int throttleTimeMs() { |
||||
return data.throttleTimeMs(); |
||||
} |
||||
|
||||
@Override |
||||
public Map<Errors, Integer> errorCounts() { |
||||
Map<Errors, Integer> counts = new HashMap<>(); |
||||
Errors topLevelErr = Errors.forCode(data.errorCode()); |
||||
counts.put(topLevelErr, 1); |
||||
|
||||
return counts; |
||||
} |
||||
|
||||
@Override |
||||
protected Struct toStruct(short version) { |
||||
return data.toStruct(version); |
||||
} |
||||
} |
@ -0,0 +1,37 @@
@@ -0,0 +1,37 @@
|
||||
// Licensed to the Apache Software Foundation (ASF) under one or more |
||||
// contributor license agreements. See the NOTICE file distributed with |
||||
// this work for additional information regarding copyright ownership. |
||||
// The ASF licenses this file to You under the Apache License, Version 2.0 |
||||
// (the "License"); you may not use this file except in compliance with |
||||
// the License. You may obtain a copy of the License at |
||||
// |
||||
// http://www.apache.org/licenses/LICENSE-2.0 |
||||
// |
||||
// Unless required by applicable law or agreed to in writing, software |
||||
// distributed under the License is distributed on an "AS IS" BASIS, |
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
// See the License for the specific language governing permissions and |
||||
// limitations under the License. |
||||
|
||||
{ |
||||
"apiKey": 45, |
||||
"type": "request", |
||||
"name": "AlterPartitionReassignmentsRequest", |
||||
"validVersions": "0", |
||||
"fields": [ |
||||
{ "name": "TimeoutMs", "type": "int32", "versions": "0+", "default": "60000", |
||||
"about": "The time in ms to wait for the request to complete." }, |
||||
{ "name": "Topics", "type": "[]ReassignableTopic", "versions": "0+", |
||||
"about": "The topics to reassign.", "fields": [ |
||||
{ "name": "Name", "type": "string", "versions": "0+", "entityType": "topicName", |
||||
"about": "The topic name." }, |
||||
{ "name": "Partitions", "type": "[]ReassignablePartition", "versions": "0+", |
||||
"about": "The partitions to reassign.", "fields": [ |
||||
{ "name": "PartitionIndex", "type": "int32", "versions": "0+", |
||||
"about": "The partition index." }, |
||||
{ "name": "Replicas", "type": "[]int32", "versions": "0+", "nullableVersions": "0+", "default": "null", |
||||
"about": "The replicas to place the partitions on, or null to cancel a pending reassignment for this partition." } |
||||
]} |
||||
]} |
||||
] |
||||
} |
@ -0,0 +1,43 @@
@@ -0,0 +1,43 @@
|
||||
// Licensed to the Apache Software Foundation (ASF) under one or more |
||||
// contributor license agreements. See the NOTICE file distributed with |
||||
// this work for additional information regarding copyright ownership. |
||||
// The ASF licenses this file to You under the Apache License, Version 2.0 |
||||
// (the "License"); you may not use this file except in compliance with |
||||
// the License. You may obtain a copy of the License at |
||||
// |
||||
// http://www.apache.org/licenses/LICENSE-2.0 |
||||
// |
||||
// Unless required by applicable law or agreed to in writing, software |
||||
// distributed under the License is distributed on an "AS IS" BASIS, |
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
// See the License for the specific language governing permissions and |
||||
// limitations under the License. |
||||
|
||||
{ |
||||
"apiKey": 45, |
||||
"type": "response", |
||||
"name": "AlterPartitionReassignmentsResponse", |
||||
"validVersions": "0", |
||||
"fields": [ |
||||
{ "name": "ThrottleTimeMs", "type": "int32", "versions": "0+", |
||||
"about": "The duration in milliseconds for which the request was throttled due to a quota violation, or zero if the request did not violate any quota." }, |
||||
{ "name": "ErrorCode", "type": "int16", "versions": "0+", |
||||
"about": "The top-level error code, or 0 if there was no error." }, |
||||
{ "name": "ErrorMessage", "type": "string", "versions": "0+", "nullableVersions": "0+", |
||||
"about": "The top-level error message, or null if there was no error." }, |
||||
{ "name": "Responses", "type": "[]ReassignableTopicResponse", "versions": "0+", |
||||
"about": "The responses to topics to reassign.", "fields": [ |
||||
{ "name": "Name", "type": "string", "versions": "0+", "entityType": "topicName", |
||||
"about": "The topic name" }, |
||||
{ "name": "Partitions", "type": "[]ReassignablePartitionResponse", "versions": "0+", |
||||
"about": "The responses to partitions to reassign", "fields": [ |
||||
{ "name": "PartitionIndex", "type": "int32", "versions": "0+", |
||||
"about": "The partition index." }, |
||||
{ "name": "ErrorCode", "type": "int16", "versions": "0+", |
||||
"about": "The error code for this partition, or 0 if there was no error." }, |
||||
{ "name": "ErrorMessage", "type": "string", "versions": "0+", "nullableVersions": "0+", |
||||
"about": "The error message for this partition, or null if there was no error." } |
||||
]} |
||||
]} |
||||
] |
||||
} |
@ -0,0 +1,32 @@
@@ -0,0 +1,32 @@
|
||||
// Licensed to the Apache Software Foundation (ASF) under one or more |
||||
// contributor license agreements. See the NOTICE file distributed with |
||||
// this work for additional information regarding copyright ownership. |
||||
// The ASF licenses this file to You under the Apache License, Version 2.0 |
||||
// (the "License"); you may not use this file except in compliance with |
||||
// the License. You may obtain a copy of the License at |
||||
// |
||||
// http://www.apache.org/licenses/LICENSE-2.0 |
||||
// |
||||
// Unless required by applicable law or agreed to in writing, software |
||||
// distributed under the License is distributed on an "AS IS" BASIS, |
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
// See the License for the specific language governing permissions and |
||||
// limitations under the License. |
||||
|
||||
{ |
||||
"apiKey": 46, |
||||
"type": "request", |
||||
"name": "ListPartitionReassignmentsRequest", |
||||
"validVersions": "0", |
||||
"fields": [ |
||||
{ "name": "TimeoutMs", "type": "int32", "versions": "0+", "default": "60000", |
||||
"about": "The time in ms to wait for the request to complete." }, |
||||
{ "name": "Topics", "type": "[]ListPartitionReassignmentsTopics", "versions": "0+", "nullableVersions": "0+", |
||||
"about": "The topics to list partition reassignments for, or null to list everything.", "fields": [ |
||||
{ "name": "Name", "type": "string", "versions": "0+", "entityType": "topicName", |
||||
"about": "The topic name" }, |
||||
{ "name": "PartitionIndexes", "type": "[]int32", "versions": "0+", |
||||
"about": "The partitions to list partition reassignments for." } |
||||
]} |
||||
] |
||||
} |
@ -0,0 +1,45 @@
@@ -0,0 +1,45 @@
|
||||
// Licensed to the Apache Software Foundation (ASF) under one or more |
||||
// contributor license agreements. See the NOTICE file distributed with |
||||
// this work for additional information regarding copyright ownership. |
||||
// The ASF licenses this file to You under the Apache License, Version 2.0 |
||||
// (the "License"); you may not use this file except in compliance with |
||||
// the License. You may obtain a copy of the License at |
||||
// |
||||
// http://www.apache.org/licenses/LICENSE-2.0 |
||||
// |
||||
// Unless required by applicable law or agreed to in writing, software |
||||
// distributed under the License is distributed on an "AS IS" BASIS, |
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
// See the License for the specific language governing permissions and |
||||
// limitations under the License. |
||||
|
||||
{ |
||||
"apiKey": 46, |
||||
"type": "response", |
||||
"name": "ListPartitionReassignmentsResponse", |
||||
"validVersions": "0", |
||||
"fields": [ |
||||
{ "name": "ThrottleTimeMs", "type": "int32", "versions": "0+", |
||||
"about": "The duration in milliseconds for which the request was throttled due to a quota violation, or zero if the request did not violate any quota." }, |
||||
{ "name": "ErrorCode", "type": "int16", "versions": "0+", |
||||
"about": "The top-level error code, or 0 if there was no error" }, |
||||
{ "name": "ErrorMessage", "type": "string", "versions": "0+", "nullableVersions": "0+", |
||||
"about": "The top-level error message, or null if there was no error." }, |
||||
{ "name": "Topics", "type": "[]OngoingTopicReassignment", "versions": "0+", |
||||
"about": "The ongoing reassignments for each topic.", "fields": [ |
||||
{ "name": "Name", "type": "string", "versions": "0+", "entityType": "topicName", |
||||
"about": "The topic name." }, |
||||
{ "name": "Partitions", "type": "[]OngoingPartitionReassignment", "versions": "0+", |
||||
"about": "The ongoing reassignments for each partition.", "fields": [ |
||||
{ "name": "PartitionIndex", "type": "int32", "versions": "0+", |
||||
"about": "The index of the partition." }, |
||||
{ "name": "Replicas", "type": "[]int32", "versions": "0+", |
||||
"about": "The current replica set." }, |
||||
{ "name": "AddingReplicas", "type": "[]int32", "versions": "0+", |
||||
"about": "The set of replicas we are currently adding." }, |
||||
{ "name": "RemovingReplicas", "type": "[]int32", "versions": "0+", |
||||
"about": "The set of replicas we are currently removing." } |
||||
]} |
||||
]} |
||||
] |
||||
} |
Loading…
Reference in new issue