loading table of contents...

Chapter 2. Preparing Ambari Server for Views

When hosting multiple views in Ambari, it is strongly recommended you increase the amount of memory available to the Ambari Server. Since each view requires it’s own memory footprint, increasing the Ambari Server maximum available memory will help support multiple deployed views and concurrent use.

  1. On the Ambari Server host, edit the ambari-env.sh file:

    vi /var/lib/ambari-server/ambari-env.sh

  2. For the AMBARI_JVM_ARGS variable, replace the default -Xmx2048m with the following:

    -Xmx4096m -XX:PermSize=128m -XX:MaxPermSize=128m

  3. Restart Ambari Server for this change to take effect.

    ambari-server restart

If the Ambari Server instance is configured for HTTPS, a trust store must also be configured so that the deployed views are able to trust the certificate used by the Ambari Server during API communications. The process includes creating a trust store with the certificate that the Ambari Server has been configured to use, and then setting up the Ambari Server to use the newly created trust store. The steps are included below:

  1. On the Ambari Server, create a new keystore that will contain the Ambari Server's HTTPS certificate.

    keytool -import -file <path_to_the_Ambari_Server's_SSL_Certificate> -alias ambari-server -keystore ambari-server-truststore

    When prompted to 'Trust this certificate?' type "yes".

  2. Configure the ambari-server to use this new trust store:

    ambari-server setup-security
    Using python  /usr/bin/python2.6
    Security setup options...
    ===========================================================================
    Choose one of the following options: 
      [1] Enable HTTPS for Ambari server.
      [2] Encrypt passwords stored in ambari.properties file.
      [3] Setup Ambari kerberos JAAS configuration.
      [4] Setup truststore.
      [5] Import certificate to truststore.
    ===========================================================================
    Enter choice, (1-5): *4*
    Do you want to configure a truststore [y/n] (y)? *y*
    TrustStore type [jks/jceks/pkcs12] (jks): *jks*
    Path to TrustStore file : *<path to the ambari-server-truststore keystore>*
    Password for TrustStore:
    Re-enter password: 
    Ambari Server 'setup-security' completed successfully.
  3. (Optional) Decrease Timeout Value.

    The views.request.read.timeout.millis property in /etc/ambari-server/conf/ambari.properties sets the timeout value for requests made by Ambari views to non-ambari services, such as webHcat, or Hive. By default, views.request.read.timeout.millis is set to 10 seconds.

    The views.ambari.request.read.timeout.millis property in /etc/ambari-server/conf/ambari.properties sets the timeout values for requests made by Ambari views to Ambari services. By default, views.ambari.request.read.timeout.millis is set to 5 seconds.

    Usually no action is required. However, if you experience timeouts, or long wait times, you can decrease the values for each of these properties to lower response times.

  4. Once configured, the Ambari Server must be restarted for the changes to take effect.

    ambari-server restart