Adding a Topic to a Stream

You can manually add a topic to a stream using the MCS and the CLI.

Adding a Topic to a Stream Using the MapR Control System

  1. Log in to MCS and go to the Topics tab in the stream information page.
  2. Click Add Topic in the All topics pane.
  3. Specify the name of the topic in the Topic Name field.
    A name can include alphanumeric characters and the following characters: . (dot), _ (underscore), and - (hyphen).
  4. Specify the number of partitions to use for the topic.
    After you create the topic, you can increase the number of partitions, but you cannot reduce the number. If the topic is associated with a stream for change log, you cannot modify the partitions after you create the topic.
  5. Click Add Topic to create the topic.

Adding a Topic to a Stream Using the CLI or the REST API

The basic command to create a topic is:

maprcli stream topic create -path <Stream Path> -topic <Topic Name> 

For complete reference information, see stream topic create.