I am able to connect to Beeline, created a database, and use that database. But got the following error when trying to create a table. The create-table statement syntax is correct.
Connected to: Apache Hive (version 220.127.116.11.1.0.0-78)
Driver: Hive JDBC (version 18.104.22.168.1.0.0-78)
Transaction isolation: TRANSACTION_REPEATABLE_READ
Beeline version 22.214.171.124.1.0.0-78 by Apache Hive
0: jdbc:hive2://name01.abc.local:2181,data01> Create table blah blah;
Error: Error while compiling statement: FAILED: HiveAuthzPluginException Failed to retrieve roles for hive: Metastore Authorization api invocation for remote metastore is disabled in this configuration. Run commands via jdbc/odbc clients via HiveServer2 that is using embedded metastore. (state=42000,code=40000)
As far as I know, this is related to Hive Metastore, so I went to Ambari and found the following setting in Hive.
It is strange to me to see the port number is 2181. I thought the port number should be 10000. However, I tried the following command
beeline -u "jdbc:hive2://name1.iehp.local:10000"
and got the error
WARN jdbc.HiveConnection: Failed to connect to name1.abc.local:10000 Could not open connection to the HS2 server. Please check the server URI and if the URI is correct, then ask the administrator to check the server status. Error: Could not open client transport with JDBC Uri: jdbc:hive2://name1.abc.local:10000: java.net.UnknownHostException: name1.iehp.local (state=08S01,code=0)