I could not find anything on this after hours of Google search so I hope I can get some ideas to my problem here.
I am trying to get data from a remote hive cluster using spark2. I have followed:
- How to connect to a Hive metastore programmatically in SparkSQL?
- How to connect to remote hive server from spark
And I was able to connect to the remote hive metastore successfully.
However, my problem starts when I execute a query in the remote hive. e.g spark.sql("select count(*) from table"). I will get an "unknown host: ns-bigdata" error. Where ns-bigdata is the cluster name of the remote cluster.
What other things am I missing here? Need I specify where the hive.metastore.warehouse.dir should be as well? e.g. hdfs://local-cluster:8020/user/hive/warehouse
Thanks in advance.