zoukankan      html  css  js  c++  java
  • spark连接hive找不到table

    Caused by: org.apache.spark.sql.catalyst.analysis.NoSuchTableException: Table or view 'xxxx' not found....

    hive-site.xml需要配置 hive.metastore.uris  并启动9083 thrift接口。

    <property>
        <name>hive.metastore.uris</name>
        <value>thrift://127.0.0.1:9083</value>
        <description>Thrift URI for the remote metastore. Used by metastore client to connect to remote metastore.</description>
      </property>
    

      

    启动hive的metastroe:

    hive --service metastore
    

      

     附sparsql代码:

    def main(args: Array[String]): Unit = {
    
        val spark: SparkSession = new SparkSession
          .Builder()
          .master("local")
    //      master("spark://bogon:7077")
          .appName("kafka test")
          .config("spark.sql.warehouse.dir", "/user/hive/warehouse")
          .enableHiveSupport()
          .getOrCreate()
    
    }
    

      

  • 相关阅读:
    epplus
    http://www.cmake.org/
    patheditor2
    emgu cv
    OpenCV
    Tesseract
    Blendar基金会
    安装服务windows,installutil
    R 软件
    历史为什么选择C语言?事实证明:暮年的C语言,依旧宝刀未老!
  • 原文地址:https://www.cnblogs.com/kisf/p/11687079.html
Copyright © 2011-2022 走看看