Kafka REST 2.0.1: GET /topics/{topic: string}/partitions/{partition_id: string}
Retrieves metadata about a specific partition within a topic.
Description
Depending on the configuration, the type of information retrieved has different behavior.
See the streams.default.stream
parameter in Kafka REST 2.0.1: Configuration Parameters.
Parameters Defined | Response |
---|---|
streams.default.stream is defined | Gets metadata about a specific partition within a MapR-ES topic. The user could pass fully qualified topic name or not. If a fully qualified topic name is not used, metadata is retrieved and appended to the default stream path. |
streams.default.stream is not defined | Gets metadata about specific MapR-ES partitions within a topic. The user could only pass fully qualified topic names that contains stream path. |
Parameters | Description |
---|---|
topic_name (string) | Name of the topic. |
partition_id (int) | ID of the partition to inspect. |
Syntax
http://<host>:8082/topics/<topic_name>/partitions/<partition_id>
Request Example
The following MapR-ES example reads from partition 0 of the topic: /streaming_data/stream:testtopic1.
curl -X GET http://localhost:8082/topics/%2Fstreaming_data%2Fstream%3Atesttopic1/partitions/0
The following Kafka example reads from the kafka topic: kafkatopic1 partition 0.
curl -X GET http://localhost:8082/topics/kafkatopic1/partitions/0
Response Example
{
"partition":0,
"leader":0,
"replicas":
[{
"broker":0,
"leader":true,
"in_sync":true
}]
}