Manage Kafka Queue Settings

The notes on this page only work in the noted versions. To adjust the number of Kafka partitions in later releases, use the appropriate tools within your Kafka deployment, for example the bin/kafka-reassign-partitions.sh and bin/kafka-topics.sh commands in the Kafka installation.

Show Kafka Queue Settings

Description Returns a list of the Kafka queue settings.
MethodGET /api/v1/clusterconfig/kafka-queues/partition-assignment
Authentication Requiredyes
Return Codes
200 Request complete
400 Bad authentication
500 Request failed
http
GET /api/v1/clusterconfig/kafka-queues/partition-assignment

To redirect the output to a JSON file, run the script like this:

shell
$ script >$YOUR_FILE_NAME.json

You can then use this as the payload in further requests when updating the information.

Show:
shell
curl -v -X GET $YOUR_LOGSCALE_URL/api/v1/clusterconfig/kafka-queues/partition-assignment \
    -H "Authorization: Bearer $TOKEN" \
    -H "Content-Type: application/json"

Set replication defaults for Kafka Queues

Description Apply default partition settings to all nodes in the cluster.
MethodPOST /api/v1/clusterconfig/kafka-queues/partition-assignment/set-replication-defaults
Request Data 
Authentication Requiredyes
Return Codes
200 Request complete
400 Bad authentication
500 Request failed

The ingest queues are partitions of the Kafka queue humio-ingest. LogScale offers an API for editing the Kafka partition to broker assignments in this queue. Note that changes to these settings are applied asynchronously, thus you can get the previous settings, or a mix with the latest settings, for a few seconds after applying a new set.

http
POST   /api/v1/clusterconfig/kafka-queues/partition-assignment/set-replication-defaults

The format of the file should be a JSON object with partition count and replicas:

shell
$ echo '{ "partitionCount": 24, "replicas": 2 }' > YOUR_FILE_NAME.json
Show:
shell
curl -v -X POST $YOUR_LOGSCALE_URL/api/v1/clusterconfig/kafka-queues/partition-assignment/set-replication-defaults \
    -H "Authorization: Bearer $TOKEN" \
    -H "Content-Type: application/json" \
    -d '@$YOUR_FILE_NAME.json'