This is the documentation for Cloudera Manager 5.1.0.
Documentation for other versions is available at Cloudera Documentation.

The Solr Service

You can install the Solr service through the Cloudera Manager installation wizard, using either parcels or packages, and have the service created and started as part of the first run installation wizard. See Installing Search.

If you elect not to include the Solr service using the installation wizard, you can you the Add Service wizard to perform the installation. The wizard will automatically configure and start the dependent services and the Solr service. See Adding a Service for instructions.

For further information on the Solr service, see:

The following sections describe how to configure other CDH components to work with the Solr service.

Configuring Sentry Authorization for Solr

Required Role:

Configuring Sentry Authorization for Solr

  1. Ensure the following requirements are satisfied:
    • Cloudera Search 1.1.1 or later or CDH 5 or later.
    • A secure Hadoop cluster.
  2. Create the policy file sentry-provider.ini as an HDFS file. When you create the policy file sentry-provider.ini follow the instructions in the Policy File section in Configuring Sentry for Search (CDH 4) or Configuring Sentry for Search (CDH 5). The file must be owned by owned by the solr user in the solr group, with perms=600. By default Cloudera Manager assumes the policy file is in the HDFS location /user/solr/sentry. To configure the location:
    1. Go to the Solr service.
    2. Click the Configuration tab.
    3. Under the Service-Wide category, select Sentry and modify the path in the Sentry Global Policy File property.
    4. Click Save Changes.
  3. Under the Service-Wide category, go to the Policy File Based Sentry section.
  4. Check Enable Sentry Authorization Using Policy Files, then click Save Changes.
  5. Restart the Solr service.

Configuring the Flume Morphline Solr Sink for Use with the Solr Service

Required Role:

To use a Flume Morphline Solr sink, the Flume service must be running on your cluster. See the Flume Near Real-Time Indexing Reference (CDH 4) or Flume Near Real-Time Indexing Reference (CDH 5)for information about the Flume Morphline Solr Sink and The Flume Service.

  1. Go to the Flume service.
  2. Click the Configuration tab.
  3. Expand the Agent default role group and click the Flume-NG Solr Sink category.
  4. Edit the following settings, which are templates that you must modify for your deployment:
    • Morphlines File (morphlines.conf) - Configures Morphlines for Flume agents. You must use $ZK_HOST in this field instead of specifying a ZooKeeper quorum. Cloudera Manager automatically replaces the $ZK_HOST variable with the correct value during the Flume configuration deployment.
    • Custom MIME-types File (custom-mimetypes.xml) - Configuration for the detectMimeTypes command. See the Cloudera Morphlines Reference Guide for details on this command.
    • Grok Dictionary File (grok-dictionary.conf) - Configuration for the grok command. See the Cloudera Morphlines Reference Guide for details on this command.

Once configuration is complete, Cloudera Manager automatically deploys the required files to the Flume agent's process directory when it starts the Flume agent. Therefore, you can reference the files in the Flume agent configuration using their relative path names. For example, you can use the name morphlines.conf to refer to the location of the Morphlines configuration file.

Deploying Solr with Hue

Required Role:

In CDH 4.3 and earlier, in order to use Solr with Hue, you must update the URL for the Solr Server in the Hue Server advanced configuration snippet.
  1. Go to the Hue service.
  2. Click the Configuration tab.
  3. Search for the word "snippet". This will display a set of Hue advanced configuration snippet properties.
  4. Add information about your Solr host to the Hue Server Configuration Advanced Configuration Snippet for hue_safety_valve_server.ini found under the Hue Server Default Group > Advanced category. For example, if your hostname is SOLR_HOST, you might add the following:
    [search]
    ## URL of the Solr Server
    solr_url=http://SOLR_HOST:8983/solr
  5. Click Save Changes to save your advanced configuration snippet changes.
  6. Restart the Hue Service.
  Important: If you are using parcels with CDH 4.3, you must register the "hue-search" application manually or access will fail. You do not need to do this if you are using CDH 4.4 or later.
  1. Stop the Hue service.
  2. From the command line do the following:
    1. cd /opt/cloudera/parcels/CDH 4.3.0-1.cdh4.3.0.pXXX/share/hue 
      (Substitute your own local repository path for the /opt/cloudera/parcels/... if yours is different, and specify the appropriate name of the CDH 4.3 parcel that exists in your repository.)
    2. ./build/env/bin/python ./tools/app_reg/app_reg.py 
        --install /opt/cloudera/parcels/SOLR-0.9.0-1.cdh4.3.0.pXXX/share/hue/apps/search  
    3. sed -i 's/\.\/apps/..\/..\/..\/..\/..\/apps/g' ./build/env/lib/python2.X/site-packages/hue.pth 
      where python2.X should be the version you are using (for example, python2.4).
  3. Start the Hue service.