Using an Oracle Database
To use an Oracle database, several conditions must be met.
- You should collect information about the Oracle database you will use.
- You should install the Oracle JDBC.
- For larger CDH clusters, adjust Oracle settings or ask your DBA to do this for you.
- Ensure your Oracle database supports UTF8 character set encoding.
Create databases for each of the following features that are part of the Cloudera Management Services:
- Activity Monitor
- Service Monitor
- Report Manager
- Host Monitor
- Cloudera Navigator (optional -- Cloudera Navigator is a separately-purchased add-on to Cloudera Enterprise)
In addition add a database for each Hive Metastore Server.
Collect Oracle Database Information
Installing, configuring, and maintaining an Oracle database should be completed by your organization's database administrator. In preparation for configuring Cloudera Manager to work with Oracle databases, gather the following information from your Oracle DBA:
- Host Name - The DNS name or the IP address of the host where the Oracle database is installed.
- SID - the name of the database that will store Cloudera Manager information. This database could contain schemas that would store information for the Cloudera Manager Server, Activity Monitor, Service Monitor, Report Manager, Host Monitor, and Cloudera Navigator.
- User name - a user name for each schema that is storing information. This means you might have six unique usernames for the six schemas.
- Password - a password corresponding to each user name.
You will use the Oracle database information that you have gathered to configure the external database to work with the Cloudera Manager Server.
Installing the Oracle JDBC Connector
You must install the JDBC connector on the Cloudera Manager Server host, as well as hosts to which you assign the Activity Monitor, Service Monitor, Report Manager, Host Monitor, Cloudera Navigator, and Hive Metastore Server roles.
Cloudera recommends that you assign all roles that require databases on the same host and install the connector on that host. While putting all such roles on the same host is recommended, it is not required. You could install a role, such as Activity Monitor on one host and other roles on a separate host. In such a case you would install the JDBC connector on each host running roles that access the database.
Download and install the ojdbc6.jar file, which contains the JDBC driver. There are different versions of the ojdbc6.jar file. You must download the version that is designed for:
- Java 6
- The Oracle database version used in your environment For example, for an environment using Oracle 11g R2, the jar file can be downloaded from http://www.oracle.com/technetwork/database/enterprise-edition/jdbc-112010-090769.html.
Copy the appropriate JDBC jar file to /usr/share/cmf/lib/ojdbc6.jar for use with the Cloudera Manager databases (e.g. for the Activity Monitor etc.), and to /usr/share/java/oracle-connector-java.jar for use with Hive.
$ mkdir /usr/share/java (if necessary) $ cp /tmp/ojdbc6.jar /usr/share/java/oracle-connector-java.jar $ cp /tmp/ojdbc6.jar /usr/share/cmf/lib/ojdbc6.jar
Adjust Oracle Settings to Accommodate Larger Clusters
Cloudera Management services require high write throughput. Depending on the size of your deployments, your DBA may need to modify Oracle settings for monitoring services. Note that these guidelines are for larger clusters and do not apply to Cloudera Manager configuration database and to smaller clusters. Many factors contribute to whether to reconfigure your database settings, but in most cases, if your cluster has more than 100 hosts, you should consider making the following changes:
- Enable direct and asynchronous I/O by setting the FILESYSTEMIO_OPTIONS parameter to SETALL.
- Increase the RAM available to Oracle by changing the MEMORY_TARGET parameter. The amount of memory to assign depends on the size of Hadoop cluster.
- Create more redo log groups and spread the redo log members across separate disks/LUNs.
- Increase the size of redo log members to be at least 1 gigabyte.
Adjust Oracle System Settings for Sufficient Database Connectivity
Work with your Oracle database administrator to ensure appropriate values are applied for your Oracle database settings. You must determine the number of connections, transactions, and sessions to be allowed. Allow 100 maximum connections for each database and then add 50 extra connections. For example, for two databases set the maximum connections to 250. If you store seven databases on one host (the databases for Activity Monitor, Service Monitor, Report Manager, Host Monitor, Cloudera Manager Server, Cloudera Navigator, and Hive Metastore), set the maximum connections to 750.
From the maximum number of connections, you can determine the number of anticipated sessions using the following formula:
sessions = (1.1 * maximum_connections) + 5
For example, if a host has two databases, you anticipate 250 maximum connections. If you anticipate a maximum of 250 connections, plan for 280 sessions.
Once you know the number of sessions, you can determine the number of anticipated transactions using the following formula:
transactions = 1.1 * sessions
Continuing with the previous example, if you anticipate 280 sessions, you can plan for 308 transactions.
Work with your Oracle database administrator to apply these derived values to your system.
Using the sample values above, Oracle attributes would be set as follows:
alter system set processes=250; alter system set transactions=308; alter system set sessions=280;
Ensure your Oracle Database Supports UTF8
The database you use must be configured to support UTF8 character set encoding. One way your DBA might implement UTF8 character set encoding in Oracle databases is using the dbca utility. In such a case, when creating a database, the characterSet AL32UTF8 option might be used to specify proper encoding. Consult with your DBA to ensure UTF8 encoding is properly configured.
Having collected information about your Oracle database, installed the Oracle JDBC, considered having database settings adjusted, and ensured UTF-8 encoding is enabled, proceed to Install CDH and Cloudera Manager.
|<< Previous: Installing an Embedded PostgreSQL Database||Next: Installing Cloudera Manager and CDH >>|