Advanced Configuration Snippets for Custom Configuration
Cloudera Manager exposes configurations named Advanced Configuration Snippet to allow inserting text verbatim into configuration files, such as XML configuration files, properties files, text files, or an environment. This mechanism is intended for advanced use in cases where there is a specific configuration setting that is not exposed in Cloudera Manager. Contact Cloudera Support if you are required to use it. These snippets generally override normal configuration.
The values you enter into a configuration snippet must conform to the syntax of the recipient. For an XML configuration file, the configuration snippet must contain valid XML property definitions. For a properties file, the configuration snippet must contain valid property definitions. Some files simply require a list of host addresses.
Service-wide configuration snippets apply to all roles in the service; a configuration snippet value for a role group applies to all instances of the role associated with that role group.
There are configuration snippets for servers and client configurations. In general after changing a server configuration snippet you must restart the server, and after changing a client configuration snippet you must redeploy the client configuration. Sometimes you can refresh instead of restart. In some cases, you will need to restart a dependent server after changing a client configuration. For example, changing a MapReduce client configuration will mark the dependent Hive server as stale, which must then be restarted. The Admin Console will display an indicator when a server must be restarted. In addition, the All Configuration Issues tab on the Home page will list the actions you must perform to propagate the changes.
- Configuration - allow you to set
configuration properties in various configuration files; the Description field
tells you into which configuration file your additions will be placed.
Configuration files have the extension .xml or .conf. For example, there are several configuration snippets for the Hive service. One Hive configuration snippet property is called the HiveServer2 Advanced Configuration Snippet (Safety Valve) for hive-site.xml; configuration you enter here will be inserted verbatim into the hive-site.xml file associated with the HiveServer2 role group.
This property definition is what you would put in that configuration snippet to specify a MySQL connector library:<property> <name>hive.aux.jars.path</name> <value>file:///usr/share/java/mysql-connector-java.jar</value> </property>
To see a list of configuration snippets that apply to a specific configuration file, enter the configuration file name in the Search field in the top navigation bar. For example, searching for mapred-site.xml will show the configuration snippets that have mapred-site.xml in their description.
- Environment - allow you to specify key-value pairs for a service, role, or client that are inserted into the respective environment. One example of using an environment configuration snippet is to add a JAR to a classpath. Place your JARs in a custom location such as /opt/myjars and extend the classpath via the appropriate service environment configuration snippet. For example, add HBASE_CLASSPATH=/opt/myjars/* to the HBase Service Environment Advanced Configuration Snippet.Note
: Do not place JARs inside locations such as /opt/cloudera or /usr/lib/{hadoop*,hbase*,hive*,etc.} that are managed by Cloudera because they get overwritten at upgrades. - Logging - allow you to set properties in a log4j.properties file.
- Metrics - allow you to set properties to configure Hadoop metrics in a hadoop-metrics.properties or hadoop-metrics2.properties file.
- White and black lists - allow you to specify a list of host addresses that are allowed or disallowed from accessing a service.
Setting an Advanced Configuration Snippet
- Click a service.
- Select .
- Expand a category group and click an Advanced subcategory.
- In the Property column, choose a property that contains the string Advanced Configuration Snippet.
- Click the Value column to enable editing.
- Specify the properties.
- Click Save Changes.
- Restart the service or redeploy client configurations as indicated.
<< Autoconfiguration | Managing Clusters >> | |