学无先后,达者为师

网站首页 编程语言 正文

sparkstreaming写入hive表报错问题解决

作者:qq_32457341 更新时间: 2022-08-13 编程语言

问题

当前采用python利用structstreaming写入hive table时,始终没有写入的权限,报错如下:

Caused by: org.apache.hadoop.ipc.RemoteException(org.apache.hadoop.security.AccessControlException):Permission denied : user=xxx, access="WRITE", inode="/":hdfs:supergroup:drwxr-xr-x

根据查询了解到,structstreaming持久化写入数据时,需要配置checkpointLocation参数,不然会写入默认路径:根目录下面,但是根目录没有写入权限,所以会报错;
以下是查询的结果:

This scenario is ideal for long-term persistence of output. Unlike memory and console sinks, files and directories are fault-tolerant. As such, this option requires a checkpoint directory, where state is maintained for fault-tolerance.

在这里插入图片描述
附上查询结果网址如下:https://databricks.com/blog/2017/04/04/real-time-end-to-end-integration-with-apache-kafka-in-apache-sparks-structured-streaming.html

原文链接:https://blog.csdn.net/qq_32457341/article/details/125514822

栏目分类
最近更新