文档首页>
数据湖探索 DLI>
常见问题>
SQL作业相关问题>
作业运维报错>
LOAD数据到OBS外表报错:IllegalArgumentException: Buffer size too small. size
更新时间:2022-11-09 GMT+08:00
LOAD数据到OBS外表报错:IllegalArgumentException: Buffer size too small. size
问题描述
在Spark SQL作业中,使用LOAD DATA命令导入数据到DLI表中时报如下错误:
error.DLI.0001: IllegalArgumentException: Buffer size too small. size = 262144 needed = 2272881
或者如下错误
error.DLI.0999: InvalidProtocolBufferException: EOF in compressed stream footer position: 3 length: 479 range: 0 offset: 3 limit: 479 range 0 = 0 to 479 while trying to read 143805 bytes
问题原因
上述报错可能原因是当前导入的文件数据量较大,同时因为spark.sql.shuffle.partitions参数设置的并行度过大,导致缓存区大小不够而导入数据报错。
解决方案
建议可以尝试调小spark.sql.shuffle.partitions参数值来解决缓冲区不足问题。具体该参数设置步骤如下:
- 登录DLI管理控制台,单击“作业管理 > SQL作业”,对应SQL作业行的操作列,单击“编辑”按钮,跳转到“SQL编辑器”。
- 在“SQL编辑器”中,单击“设置”,参考如下图配置添加参数。
图1 设置参数
- 重新执行作业。
父主题: 作业运维报错
作业运维报错 所有常见问题
- 用户导表到OBS报“path obs://xxx already exists”错误
- 对两个表进行join操作时,提示:SQL_ANALYSIS_ERROR: Reference 't.id' is ambiguous, could be: t.id, t.id.;
- 执行查询语句报错:The current account does not have permission to perform this operation,the current account was restricted. Restricted for no budget.
- 执行查询语句报错:There should be at least one partition pruning predicate on partitioned table XX.YYY
- LOAD数据到OBS外表报错:IllegalArgumentException: Buffer size too small. size
- SQL作业运行报错:DLI.0002 FileNotFoundException
- 用户通过CTAS创建hive表报schema解析异常错误
- 在DataArts Studio上运行DLI SQL脚本,执行结果报org.apache.hadoop.fs.obs.OBSIOException错误
- 使用CDM迁移数据到DLI,迁移作业日志上报UQUERY_CONNECTOR_0001:Invoke DLI service api failed错误
- SQL作业访问报错:File not Found
- SQL作业访问报错:DLI.0003: AccessControlException XXX
- SQL作业访问外表报错:DLI.0001: org.apache.hadoop.security.AccessControlException: verifyBucketExists on {{桶名}}: status [403]
- 执行SQL语句报错:The current account does not have permission to perform this operation,the current account was restricted. Restricted for no budget.
more