【问题标题】:Unable to create table in hive using Zeppelin无法使用 Zeppelin 在配置单元中创建表
【发布时间】:2019-02-07 04:09:37
【问题描述】:

我正在使用 spark 解释器在 zeppelin 中对创建表运行查询。

spark.sql("create table person as select * from TABLE_NAME")

查询运行没有任何错误。

但是当我对该表运行查询时,我收到了这个错误

spark.sql("select count(*) from person")

: org.apache.spark.SparkException: Job aborted due to stage failure: 
Task 30 in stage 80.0 failed 4 times, most recent failure: Lost task 30.3 in stage 80.0 (TID 7772, ip-10-226-34-88.ec2.internal, executor 530): 
org.apache.hadoop.hdfs.BlockMissingException: Could not obtain block: 
BP-97775991-10.226.34.113-1532420342496:blk_1073799259_58435 file=/user/hive/warehouse/person/part-0001

我该如何解决这个问题?

【问题讨论】:

    标签: apache-spark hive amazon-emr apache-zeppelin


    【解决方案1】:

    问题是表格的格式 - 默认是“parquet” 尝试将其更改为“兽人”:

    spark.sql("select * from TABLE_NAME").write.format("orc").saveAsTable("person")
    

    【讨论】:

      猜你喜欢
      • 2015-04-16
      • 1970-01-01
      • 2015-07-19
      • 2018-02-03
      • 2023-01-13
      • 2016-05-20
      • 2023-03-04
      • 2017-08-05
      • 1970-01-01
      相关资源
      最近更新 更多