Editing a Stream

Describes how to edit streams using the Control System and the CLI.

Editing a Stream Using the Control System

Procedure

  1. Log in to the Control System and go to the stream information page.
  2. Click Edit Stream.
    The Edit Stream page displays.
  3. Make necessary changes to one or more of the following:
    Property Description
    Time To Live The amount of time to elapse between the publication of a message in a topic in this stream and the expiration of that message. Choose:
    • Forever to retain messages indefinitely
    • Seconds to specify the number of seconds. A value of 0 causes messages to be retained indefinitely.
    Messages that have expired are deleted during the next purge process. See Time-to-Live for Messages for details.
    Compression The compression setting to use for the stream. Producer client libraries can bundle messages that are to be published on the same partition and compress them. The messages are sent to the server compressed, are stored compressed, are replicated to other containers compressed, and (if stream replication is configured) replicated to replica streams compressed. Consumer client libraries receive compressed data, decompress it, and pass it to client applications.
    Choose from one of the following compression settings:
    • Inherited (to inherit from the directory where the stream is stored), which is the default setting
    • OFF (to disable compression)
    • LZF
    • LZF4
    • ZLIB
    Auto Create Topics Whether (Yes) or not (No) to create a topic automatically when a producer tries to write the first message to it.
    Default Partitions The default number of partitions to allocate to new topics in the stream.
    Compact Enable (Yes) or disable (No) log compaction. If enabled, obsolete records from topics are detected and deleted. By default, this is disabled (No).
  4. Add, modify, or remove access to streams for users, groups, and roles.
    For each user, group, and/or role, you can grant (by selecting the associated check box) or deny (by deselecting the associated checkbox) the following types of access:
    Administer Can modify the Access Control Expression (ACE) for the stream, set up replication from the stream, and modify attributes of the stream.

    This permission includes the topic permission.

    Copy Stream Can copy data from one MapR stream to another MapR stream (using the mapr copystream utility) and compare the message IDs, metadata, and data in two MapR streams (using the mapr diffstreams utility).
    Topic Can create, edit, or remove topics in the stream.
    Producer Can publish messages to topics in the stream.
    Consumer Can listen to topics in the stream.
    To grant or deny access to users, groups, and/or roles, choose one of the following:
    • Basic Settings: Select the type — public, (OR) user, group, or role — from the drop-down list and grant read and/or write permissions.
      TIP Click to create a copy of the associated ACE setting. Click to remove the associated ACE.
      Click Add Another to add permissions for another user, group, or role.
    • Advanced Settings: Within empty strings (""), specify user (u), group (g), role (r), or public (p) who have and do not have read and/or write access using the following boolean expressions and subexpressions:
      • ! — Negation operator.
      • & — AND operation.
      • | — OR operation.
      Use (), parentheses, for subexpressions.

      Alternatively, click associated with the type of access to use the Access Control Expression window to define access for public or users, group, and/or role. See Defining ACEs for more information.

    NOTE If you switch from Basic to Advanced, the basic settings, if any, are carried over to the Advanced settings. If you switch from Advanced to Basic, all the settings are lost because the subexpressions, and AND (&) and negation (!) operations that are supported by Advanced settings are not supported in the Basic settings.
    To add ACEs for another user, group, or role, click Add Another and repeat this step.
  5. Click Save Changes for the changes to take effect.

Editing a Stream Using the CLI or REST API

About this task

The basic command to edit a stream is

/opt/mapr/bin/maprcli stream edit -path <Stream Path>

To run this command, your user ID must have the following permissions:

For complete reference information, see stream edit.