Support Questions
Find answers, ask questions, and share your expertise

Anyone seen Hive CLI and beeline show different output?

Anyone seen Hive CLI and beeline show different output?

I have an HDP 2.5 cluster (no Ranger) where I can launch the Hive CLI and create a table, call it X. Then when I connect via beeline table X is not visible. The opposite is also true: if I create a table Y via beeline then the table is not visible via the Hive CLI. Under the covers, the corresponding directory structure exists in HDFS for both (i.e., I see X.db and Y.db under /apps/hive/warehouse). Anyone seen such a thing before? It seems like beeline and Hive CLI are using different metastores.


Re: Anyone seen Hive CLI and beeline show different output?

Super Guru

Are you running both tools with the same user? What are the permissions in HDFS? Permissions in Hive tables?

You have to see user/permissons on HiveServer2. Also you should not use Hive CLI anymore.

See the two permissions and authorization variations below:


HDP supports two Hive clients: the Hive CLI and Beeline. The primary difference between the two involves how the clients connect to Hive.

  • The Hive CLI, which connects directly to HDFS and the Hive Metastore, and can be used only on a host with access to those services.
  • Beeline, which connects to HiveServer2 and requires access to only one .jar file: hive-jdbc-<version>-standalone.jar.

Hortonworks recommends using HiveServer2 and a JDBC client (such as Beeline) as the primary way to access Hive. This approach uses SQL standard-based authorization or Ranger-based authorization. However, some users may wish to access Hive data from other applications, such as Pig. For these use cases, use the Hive CLI and storage-based authorization.

Re: Anyone seen Hive CLI and beeline show different output?

Turns out my initial intuition was correct. I spent more time hands-on with the cluster and found that there were two instances of MySQL running on two different nodes. One was properly backing the Hive metastore and therefore any interaction through beeline or Spark via Zeppelin would see those tables. The other was running locally where the Hive CLI was executed. This caused a split-brain type situation. Since the Hive configuration JDBC URL pointed to localhost they were both connecting to the local MySQL. We corrected the JDBC URL and everything is functioning properly again.