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.

Running CREATE IF NOT EXISTS command but still getting Database already exists error

Running CREATE IF NOT EXISTS command but still getting Database already exists error

Contributor

Looking at https://community.hortonworks.com/questions/40382/hive-throws-database-already-exists-error-while-cr... suggests that HiveMetastore might not be running, but it is and we haven't received alerts to suggest it wasn't. We connect (Hive Metastore) to an external Oracle database though, wondering if network latency with this database could cause this error?

ERROR [HiveServer2-Background-Pool: Thread-102344]: metastore.RetryingHMSHandler (RetryingHMSHandler.java:invoke(159)) - AlreadyExistsException(message:Database clickstream already exists)
       at org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.create_database(HiveMetaStore.java:901)
       at sun.reflect.GeneratedMethodAccessor142.invoke(Unknown Source)
...

To clarify, this is happening only intermittently when run though a NiFI processor. Typcially early in the morning

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