Search in sources :

Example 1 with TransactionState

use of org.apache.kafka.common.message.DescribeTransactionsResponseData.TransactionState in project kafka by apache.

the class DescribeTransactionsResponse method errorCounts.

@Override
public Map<Errors, Integer> errorCounts() {
    Map<Errors, Integer> errorCounts = new HashMap<>();
    for (TransactionState transactionState : data.transactionStates()) {
        Errors error = Errors.forCode(transactionState.errorCode());
        updateErrorCounts(errorCounts, error);
    }
    return errorCounts;
}
Also used : Errors(org.apache.kafka.common.protocol.Errors) TransactionState(org.apache.kafka.common.message.DescribeTransactionsResponseData.TransactionState) HashMap(java.util.HashMap)

Aggregations

HashMap (java.util.HashMap)1 TransactionState (org.apache.kafka.common.message.DescribeTransactionsResponseData.TransactionState)1 Errors (org.apache.kafka.common.protocol.Errors)1