9

How to query external hive Metastore From Spark

 4 years ago
source link: https://blog.knoldus.com/how-to-query-external-hive-metastore-from-spark/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client
cropped-knoldus-blog.jpg

How to query external hive Metastore From Spark

Reading Time: < 1 minute

In this Blog we will learn how can we access tables from hive metastore in spark,so now just lets get started

  • start your hive metastore as  as service with following command
  • hive –service metastore by default it will start metastore on port 9083
Screenshot from 2017-10-24 20-47-58.png
  • go to your spark client and tell driver to conncet to metastore listening on port 9083  when starting the hive thrift server with following command
  • $SPARK_HOME/sbin/start-thriftserver.sh –driver-java-options “-Dhive.metastore.uris=thrift://localhost:9083”
Screenshot from 2017-10-24 20-53-28.png
as you can see show tables show all the tables that are in hive metastore now they are available to spark-client

i hope this blog will help


knoldus-advt-sticker


Recommend

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK