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.
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.
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.
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.