kafkatopic edit

Edit a Kafka topic.

Syntax

IMPORTANT
Ensure that the mapr-kafka package is installed on the server node, before running the kafkatopic edit command. When mapr-kafka package is not installed, the following error is encountered: Command execution failed! 'kafkatopic' commands requires 'mapr-kafka' package.
CLI

The command facilitates editing of a Kafka topic.

$ maprcli kafkatopic edit -topic <topicname> [-parameter <parameter value> -parameter <parameter value>..]
REST
http[s]://<host>:<port>/rest/kafkatopic/edit?topic=<topicname>

Parameters

Parameter Description
-topic The topic name. This is a mandatory parameter.
-partitions The number of partitions. Default value is 1. This is an optional parameter.
-ttl The time to live in seconds. Default value is 604800. This is an optional parameter.
-compression Turn compression on or off with this parameter. lzf, lz4, zlib are the supported compression schemes. Default value is off. This is an optional parameter.

Examples

Edit a topic night_temp with time to live as 40000 seconds, 4 partitions and zlib compression scheme.
$ maprcli kafkatopic edit -topic night_temp -ttl 40000 -partitions 4 -compression zlib
TIP
Verify the topic edit with the maprcli kafkatopic info command.