Acceldata
Pulse

Configure the Java Options for Services Using JMX Agent in CDP

You can update the Java options for the services through the CDP UI.

Below are the detailed, the service-wise details for all services supported by the JMX agent.


Kafka

Info

Ensure to update the CDP Kafka with JMX settings before proceeding. For details, see Configure CDP Kafka and Zookeeper.

If Kafka Connect is NOT enabled:

  1. In the CM UI, navigate to Kafka > Configuration.
  2. Search for Additional Broker Java Options (broker_java_opts).
  3. Add the following line at the end:

Bash

export KAFKA_OPTS="$KAFKA_OPTS -javaagent:/opt/acceldata/jmx/lib/jmxtrans-agent.jar=/opt/acceldata/jmx/config/enabled/vm_kafka.xml"

If Kafka Connect is enabled:

Add the following snippet at the end of the kafka-env template:

Bash

AGENT_PATH="/opt/acceldata/jmx/lib/jmxtrans-agent.jar"

if [[ "$KAFKA_OPTS" != *"$AGENT_PATH"* ]]; then

CURRENT_CMD_STRING=$(ps -p $$ -o args=)

if [[ "$CURRENT_CMD_STRING" == *"kafka-connect"* ]]; then

export KAFKA_OPTS="$KAFKA_OPTS -javaagent:$AGENT_PATH=/opt/acceldata/jmx/config/enabled/vm_kafka3_connect.xml"

elif [[ "$CURRENT_CMD_STRING" == *"kafka start"* ]] || [[ "$CURRENT_CMD_STRING" == *"kafka-server-start"* ]]; then

export KAFKA_OPTS="$KAFKA_OPTS -javaagent:$AGENT_PATH=/opt/acceldata/jmx/config/enabled/vm_kafka3.xml"

fi

fi


Hive Metastore

Info

Ensure to update the CDP Hive Metastore and Hive Server with JMX settings before proceeding. For details, see Configure CDP Hive and Tez.

  1. In the CM UI, navigate to Hive > Java Configuration Options.
  2. Update the property with the following values.

Bash

export HADOOP_OPTS="$HADOOP_OPTS -javaagent:/opt/acceldata/jmx/lib/jmxtrans-agent.jar=/opt/acceldata/jmx/config/enabled/vm_hive_metastore.xml"


Hive Server

  1. In the CM UI, navigate to Tez > Java Configuration Options.
  2. Update the property with the following values.

Bash

export HADOOP_OPTS="$HADOOP_OPTS -javaagent:/opt/acceldata/jmx/lib/jmxtrans-agent.jar=/opt/acceldata/jmx/config/enabled/vm_hive_server.xml"


Hive on Tez

  1. In the CM UI, navigate to Hive on Tez > Configuration.
  2. Search for hivesearver2 _ java_opts and update the following value in Java Configuration Options for HiveServer2.

Bash

-javaagent:/opt/acceldata/jmx/lib/jmxtrans-agent.jar=/opt/acceldata/jmx/config/enabled/vm_hive_server.xml