Search in sources :

Example 1 with SyncGroupResponseData

use of org.apache.kafka.common.message.SyncGroupResponseData 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)1 SyncGroupResponseData (org.apache.kafka.common.message.SyncGroupResponseData)1 SyncGroupResponse (org.apache.kafka.common.requests.SyncGroupResponse)1