Search in sources :

Example 1 with SyncGroupResponse

use of org.apache.kafka.common.requests.SyncGroupResponse in project apache-kafka-on-k8s by banzaicloud.

the class WorkerCoordinatorTest method syncGroupResponse.

private SyncGroupResponse syncGroupResponse(short assignmentError, String leader, long configOffset, List<String> connectorIds, List<ConnectorTaskId> taskIds, Errors error) {
    ConnectProtocol.Assignment assignment = new ConnectProtocol.Assignment(assignmentError, leader, LEADER_URL, configOffset, connectorIds, taskIds);
    ByteBuffer buf = ConnectProtocol.serializeAssignment(assignment);
    return new SyncGroupResponse(error, buf);
}
Also used : SyncGroupResponse(org.apache.kafka.common.requests.SyncGroupResponse) ByteBuffer(java.nio.ByteBuffer)

Example 2 with SyncGroupResponse

use of org.apache.kafka.common.requests.SyncGroupResponse in project kafka by apache.

the class WorkerCoordinatorTest method syncGroupResponse.

private SyncGroupResponse syncGroupResponse(short assignmentError, String leader, long configOffset, List<String> connectorIds, List<ConnectorTaskId> taskIds, Errors error) {
    ConnectProtocol.Assignment assignment = new ConnectProtocol.Assignment(assignmentError, leader, LEADER_URL, configOffset, connectorIds, taskIds);
    ByteBuffer buf = ConnectProtocol.serializeAssignment(assignment);
    return new SyncGroupResponse(new SyncGroupResponseData().setErrorCode(error.code()).setAssignment(Utils.toArray(buf)));
}
Also used : SyncGroupResponse(org.apache.kafka.common.requests.SyncGroupResponse) SyncGroupResponseData(org.apache.kafka.common.message.SyncGroupResponseData) ByteBuffer(java.nio.ByteBuffer)

Aggregations

ByteBuffer (java.nio.ByteBuffer)2 SyncGroupResponse (org.apache.kafka.common.requests.SyncGroupResponse)2 SyncGroupResponseData (org.apache.kafka.common.message.SyncGroupResponseData)1