无法使用Zeppelin在配置单元中创建表

问题描述 投票:0回答:1

我在zeppelin中使用spark解释器运行查询到create table。

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个回答
0
投票

问题是表的格式 - 默认是“实木复合地板”尝试将其更改为“orc”:

spark.sql("select * from TABLE_NAME").write.format("orc").saveAsTable("person")
© www.soinside.com 2019 - 2024. All rights reserved.