Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]
Created 12-26-2018 07:23 AM
Hi Folks,
Hope all are doing well.!!!
I've upgrade HDP 2.6.5 to HDP 3.0.1.0-187 successfully. now i'm trying to connecting hive datbases using spark-shell, i'm unable to see any hive databases. Even i have copied /etc/hive/conf/hive-site.xml to /etc/spark2/conf/ and restarted spark service. After restart spark service, hive-site.xml to original xml file.
Have there any alternative solution to resolve the issue?
Kindly assist me to fix the issue.
Created 01-07-2019 06:17 AM
Hi Vinay,
use the below code to connect hive and list the databases :
spark-shell --conf spark.sql.hive.hiveserver2.jdbc.url="jdbc:hive2://hiveserverip:10000/" spark.datasource.hive.warehouse.load.staging.dir="/tmp" spark.hadoop.hive.zookeeper.quorum="zookeeperquoremip:2181" --jars /usr/hdp/current/hive_warehouse_connector/hive-warehouse-connector-assembly-1.0.0.3.0.0.0-1634.jar
val hive = com.hortonworks.spark.sql.hive.llap.HiveWarehouseBuilder.session(spark).build()
hive.showDatabases().show(100, false)
Reference article
Created on 06-15-2020 05:34 AM - edited 06-15-2020 05:34 AM
@sattar As this is an older post, you would have a better chance of receiving a resolution by starting a new thread. This will also provide the opportunity to provide details specific to your environment that could aid others in providing a more accurate answer to your question.
Regards,
Vidya Sargur,Created 12-27-2018 10:59 AM
Can you share your spark code let me test if you set the parameters as above?
Is your cluster kerberized?
Created 12-27-2018 11:46 AM
Following properties i have defined in custom spark2-default configuration.
spark.hadoop.hive.zookeeper.quorum
spark.hadoop.hive.llap.daemon.service.hosts
spark.datasource.hive.warehouse.load.staging.dir
spark.datasource.hive.warehouse.metastoreUri
spark.sql.hive.hiveserver2.jdbc.url
yes we're using kerberized cluster.
Created 12-27-2018 05:40 PM
In a Kerberized cluster, you MUST add the below parameter
spark.sql.hive.hiveserver2.jdbc.url.principal = $hiveS2@REALM
The above principle you can either copy it from Advanced hive-site hive.server2.authentication.kerberos.principal or get by
$ klist -kt /etc/security/keytabs/hiveserver2.service.keytab
Please check the correct HS2 keytab in /etc/security/keytabs/ that should resolve the issue.
Created 12-28-2018 07:18 AM
I had already defined spark.sql.hive.hiveserver2.jdbc.url.principal=hive/[email protected] in configuration.
Created 12-28-2018 09:53 AM
What do you mean by "After restart spark service, hive-site.xml to original xml file." Make sure all changes are made through Ambari otherwise it will be overwritten!
Can you give latest status ...
Created 12-28-2018 11:18 AM
I had copied manually /etc/hive/conf/hive-site.xml to /etc/spark2/conf/ and restarted spark service. After restart /etc/spark2/conf/hive-site.xml changed to previous hive-site.xml which i had replaced.
Latest status is, still not able to see hive database by spark. even i have also added below properties in spark configuration:
spark.sql.hive.hiveserver2.jdbc.url.principal
spark.hadoop.hive.zookeeper.quorum
spark.hadoop.hive.llap.daemon.service.hosts
spark.datasource.hive.warehouse.load.staging.dir
spark.datasource.hive.warehouse.metastoreUri
spark.sql.hive.hiveserver2.jdbc.url
Created 12-31-2018 11:14 AM
Can you install hive,spark clients on the hive/Spark nodes?
Created 01-02-2019 05:31 AM
Created 01-02-2019 08:37 AM
Could you please confirm do we really need to enable Interactive query? because after enable Interactive query, i'm unable to start interactive query service. Below are the logs:
2019-01-02T08:36:41,455 WARN [main] cli.LlapStatusServiceDriver: Watch mode enabled and got YARN error. Retrying..
2019-01-02T08:36:43,462 WARN [main] cli.LlapStatusServiceDriver: Watch mode enabled and got YARN error. Retrying..
2019-01-02T08:36:45,469 WARN [main] cli.LlapStatusServiceDriver: Watch mode enabled and got YARN error. Retrying..
2019-01-02T08:36:47,476 INFO [main] LlapStatusServiceDriverConsole: LLAP status unknown