Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

HIVE service can't start using CM API

Highlighted

HIVE service can't start using CM API

Contributor

I tried to use CM API to create a HIVE service and then started. The service can't be started due to following errors.

 

Caused by: org.datanucleus.exceptions.NucleusException: Attempt to invoke the "BONECP" plugin to create a ConnectionPool gave an error : The specified datastore driver ("com.mysql.jdbc.Driver") was not found in the CLASSPATH. Please check your CLASSPATH specification, and the name of the driver.

 

hive = cluster.create_service(SERVICE_INSTANCE_NAME, SERVICE_NAME)

hive.create_hive_metastore_database()
hive.create_hive_metastore_tables()
hive.create_hive_warehouse()
hive.create_hive_userdir()

cluster.auto_assign_roles()
cluster.auto_configure()

 

I guess if cluster.auto_configure() will connect mysql DB instead of build-in Postgre DB?

4 REPLIES 4
Highlighted

Re: HIVE service can't start using CM API

Cloudera Employee

> The specified datastore driver ("com.mysql.jdbc.Driver") was not found in the CLASSPATH

 

For some licensing reasons, Cloudera Manager doesn't ship with the MySQL JDBC drivers.  Here, Hive is configured to use MySQL, and is failing to find the driver.  

 

If you want to use MySQL, follow the instructions at ("Installing the MySQL JDBC Connector") http://www.cloudera.com/content/cloudera/en/documentation/cloudera-manager/v5-latest/Cloudera-Manage...

 

 

Highlighted

Re: HIVE service can't start using CM API

Contributor

I didn't plan to use MySQL; instread, I would like to use embedded DB.

Using the the CM API above, the API configured Hive to use MySQL. Do you have any example to setup embedded DB.

Highlighted

Re: HIVE service can't start using CM API

Configure Hive's database information to match the embedded db. Be sure to use the fully qualified domain name for the host, not "localhost". The database name and user name must be identical (probably both "hive"). Make sure the port is right. Whatever you supply as the password will be used to create the user account in the postgresql database.

This command will create the user and database for you:
http://cloudera.github.io/cm_api/apidocs/v4/path__clusters_-clusterName-_services_-serviceName-_comm...

Then you have to create the tables as normal, along with the HDFS directories etc. as normal.
Highlighted

Re: HIVE service can't start using CM API

New Contributor

Hi,

 

Even I am facing the same issue. How is it resolved?

Don't have an account?
Coming from Hortonworks? Activate your account here