ApplicationMaster:用户类抛出异常:org.apache.spark.sql.AnalysisException:找不到表或视图:“DB_X”.“table_Y”火花会话: SparkSession .builder() .appName(appName) .config("spark.sql.warehouse.dir", "/apps/hive/warehouse") .enableHiveSupport() .getOrCreate();hive-site.xml 中的 Hive 仓库目录:/apps/hive/warehouse/hadoop fs -ls /apps/hive/warehouse/drwxrwxrwx - root hadoop 0 2018-09-03 11:22 /apps/hive/warehouse/DB_X.dbhadoop fs -ls /apps/hive/warehouse/DB_X.dbnone错误在这里抛出:spark .read() .table("DB_X.table_Y");在 Java 中:spark.sql("show databases").show()default在 spark-shell 交互中:spark.sql("show databases").show()defaultDB_X显示创建表 table_Y :CREATE EXTERNAL TABLE `table_Y`(...PARTITIONED BY ( `partition` string COMMENT '')... location '/data/kafka-connect/topics/table_Y'hadoop文件:hadoop fs -ls /data/kafka-connect/topics/table_Ydrwxr-xr-x - kafka hdfs 0 2018-09-11 17:24 /data/kafka-connect/topics/table_Y/partition=0drwxr-xr-x - kafka hdfs 0 2018-09-11 17:24 /data/kafka-connect/topics/table_Y/partition=1hadoop fs -ls data/kafka-connect/topics/table_Y/partition=0-rw-r--r-- 3 kafka hdfs 102388 2018-09-11 17:24 /data/kafka-connect/topics/table_Y/partition=0/table_Y+0+0001823382+0001824381.avro-rw-r--r-- 3 kafka hdfs 102147 2018-09-11 17:24 /data/kafka-connect/topics/table_Y/partition=0/table_Y+0+0001824382+0001825381.avro...在 spark-shell 或 hive-shell 中一切正常hive conf 中的 hive-site.xml 被复制到 spark2/conf使用 HDP 2.6.4.0-91 和 spark 2.2有什么帮助吗?
添加回答
举报
0/150
提交
取消