This topic describes the operating system environment variables and configuration items of a Kafka cluster in E-MapReduce (EMR).

Operating system environment variables

You can log on to an Elastic Compute Service (ECS) instance of an EMR Kafka cluster as the operating system user named kafka, which belongs to the user group named group. After you log on to the ECS instance, you can perform various operations.

The following table describes the predefined environment variables of a shell terminal in an EMR Kafka cluster.

Variable Description
KAFKA_ROOT The root directory in which the Kafka service is installed.
KAFKA_HOME The directory in which the software of Kafka brokers is installed.
LOG_DIR_ROOT The root directory in which the service logs of the EMR cluster are stored.
KAFKA_ZOOKEEPER The path that is used to access the ZooKeeper service of the EMR Kafka cluster.

Example: master-1-1.c-0e6a8cxxxxxxxxxx.cn-hangzhou.emr.aliyuncs.com:2181/emr-kafka.

KAFKA_CONF_DIR The directory in which the configuration files of Kafka brokers are stored.

Configuration items

Configuration item Description
kafka_opts The value of the KAFKA_OPTS environment variable for the startup of Kafka.
kafka.heap.opts The process heap size of a Kafka broker. This configuration item supports node-level settings. The default value is dynamically set based on the node resources when a cluster is created.
kafka_server_start_cmd_addition_args The additional parameters of the Kafka startup command. For example, you can set an additional classpath.
kafka.ssl.config.type The configurations of the SSL feature. Valid values:
  • NO_SSL: disables the SSL feature. This is the default value.
  • DEFAULT: enables the SSL feature by using the default certificate.
  • CUSTOM: customizes SSL configurations.
kafka.sasl.config.type The configurations of the Simple Authentication and Security Layer (SASL) feature. Valid values:
  • NO_SASL: disables the SASL feature. This is the default value.
  • DEFAULT: enables the SASL feature by using the default Kerberos authentication mode.
  • CUSTOM: customizes SASL configurations.
kafka.server.jaas.content The content of the Java Authentication and Authorization Service (JAAS) configuration file that is used to start a Kafka broker.
kafka.client.jaas.content The content of the JAAS configuration file that is used to start components such as Schema Registry.
kafka.config.expert.model Specifies whether to run the Kafka cluster in expert configuration mode. Valid values:
  • false: runs the Kafka cluster in non-expert configuration mode. This is the default value. The parameters of features such as SSL and SASL are automatically associated based on the environment.
  • true: runs the Kafka cluster in expert configuration mode. You can manually configure the parameters of features such as SSL and SASL in the EMR console.
kafka.cruisecontrol.metric.reporter.enable Specifies whether to enable the Cruise Control reporter to collect metrics. Valid values:
  • false: disables the Cruise Control reporter from collecting metrics. This is the default value.
  • true: enables the Cruise Control reporter to collect metrics.
kafka.connect.heap.opts The process heap size of a Kafka Connect cluster. Default value: -Xmx2G -Xms2G.