Spark-sql use hive table to run problems and solutions in Yarn-cluster mode

Source: Internet
Author: User

1, the program can not load hive package, need to compile the spark (with Spark-shell boot, with Spark-sql can directly access hive table) in the Lib directory, test out the assembly package, for it to create a maven repository, And then add it to dependency inside. The stupidest way to create a repository is to create a path directly, and then change the name of the. Pom inside the Spark-core to copy it directly.

2, when submitted with Yarn-cluster, encountered: Spark SQL Java.lang.RuntimeException:java.lang.RuntimeException:Unable to instantiate Org.apache.hadoop.hive Such a problem, this is the program does not $spark_home/lib inside the DataNucleus package import, in the--jars add can: $ (echo $SPARK _home/lib/*.jar| Tr ' \ n ' | grep DataNucleus | Tr ' \ n ', ')

3. After loading the jar package, it is discovered that spark Metastore is encountered. Retryinghmshandler:nosuchobjectexception error, this is spark did not find Hive-site.xml file, add in--files.

Spark-sql use hive table to run problems and solutions in Yarn-cluster mode

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.