当前位置:网站首页>org.apache.parquet.schema.InvalidSchemaException: A group type can not be empty. Parquet does not su
org.apache.parquet.schema.InvalidSchemaException: A group type can not be empty. Parquet does not su
2022-04-23 14:02:00 【百夜﹍悠ゼ】
1.读取cvs文件数据写入parquet文件
val spark =SparkSession.builder().appName("test").master("local").getOrCreate()
val file = "hdfs://clusters/test/demo.csv"
val frame = spark.read.option("header","true").csv(file)
frame.printSchema()
val newfile = file.split("\\.")(0)+".parquet"
frame.write.parquet(newfile)
报错提示:
org.apache.parquet.schema.InvalidSchemaException: A group type can not be empty. Parquet does not support empty group without leaves. Empty group: spark_schema
网上找了一大堆资料,大体解释都是说dataframe的schema结构问题,但本文并非此问题。
经过N次尝试,最终确定问题所在是 .parquet(newfile)。代码程序查询,发现此parquet方法调用的parquet包存在两个,默认使用了第一个包,而然这个包并非是spark-sql下的parquet包。
然后,就抱着试试的心态删除了版本1.8.1的parquet包,留下和spark依赖中的parquet包,重新运行代码,直捣黄龙。
版权声明
本文为[百夜﹍悠ゼ]所创,转载请带上原文链接,感谢
https://blog.csdn.net/AlierSnow/article/details/118966472
边栏推荐
- _模_板_
- Ptorch classical convolutional neural network lenet
- 可否把模板的头文件和源文件分开编译
- New关键字的学习和总结
- 联想产品经理林林:天津当地网络运营商网络故障 ZUI系统后台服务器暂时无法正常工作
- Multithreading
- 33 million IOPs, 39 microsecond delay, carbon footprint certification, who is serious?
- Quartus Prime硬件实验开发(DE2-115板)实验二功能可调综合计时器设计
- As a junior college student, I studied hard in closed doors for 56 days, won Ali offer with tears, five rounds of interviews and six hours of soul torture
- 商家案例 | 运动健康APP用户促活怎么做?做好这几点足矣
猜你喜欢
Universal template for scikit learn model construction
Business case | how to promote the activity of sports and health app users? It is enough to do these points well
烟雾传感器(mq-2)使用详细教程(基于树莓派3b+实现)
How does redis solve the problems of cache avalanche, cache breakdown and cache penetration
Crontab timing task output generates a large number of mail and runs out of file system inode problem processing
Lin Lin, product manager of Lenovo: network failure of local network operator in Tianjin. The background server of Zui system can't work normally for the time being
微信小程序进行蓝牙初始化、搜索附近蓝牙设备及连接指定蓝牙(一)
基于ibeacons签到系统
Pytorch 经典卷积神经网络 LeNet
Node接入支付宝开放平台的沙箱实现支付功能
随机推荐
基于ibeacons签到系统
As a junior college student, I studied hard in closed doors for 56 days, won Ali offer with tears, five rounds of interviews and six hours of soul torture
Quartus prime hardware experimental development (de2-115 board) experiment II function adjustable comprehensive timer design
微信小程序的订阅号开发(消息推送)
腾讯根据ip解析地址
Lin Lin, product manager of Lenovo: network failure of local network operator in Tianjin. The background server of Zui system can't work normally for the time being
收藏博客贴
cnpm的诡异bug
JS 力扣刷题 102. 二叉树的层序遍历
Android: answers to the recruitment and interview of intermediate Android Development Agency in early 2019 (medium)
烟雾传感器(mq-2)使用详细教程(基于树莓派3b+实现)
关于stream流,浅记一下------
微信小程序与低功耗蓝牙通信-往硬件端发送数据(三)
About note 1
2021年秋招,薪资排行NO
switch使用(微信小程序)
STM32 learning record 0007 - new project (based on register version)
变长参数__VA_ARGS__ 和 写日志的宏定义
Introduction to spark basic operation
Taobao released the baby prompt "your consumer protection deposit is insufficient, and the expiration protection has been started"