python - Python - 如何从 HDFS 读取 xml?
问题描述
我正在使用 PySpark,我想使用xml.etree
librairie 从 HDFS 读取 xml。
这是我的代码:
from xml.etree import ElementTree
dom = ElementTree.parse('hdfs://hadoop-master:9000/response.xml')
但我得到这个错误:
IOError: [Errno 2] No such file or directory: 'hdfs://hadoop-master:9000/response.xml'
有没有办法解决这个问题?
谢谢
解决方案
推荐阅读
- angular - 角度 8:反应形式匹配密码
- orientdb - OrientDB 大数据数归档慢响应?
- javascript - PersistGate 导致应用停止渲染
- java - 执行 API 测试时忽略证书
- android - 当我们从 Android 的外部应用程序手动更改权限时会发生什么
- c# - 如何创建具有任意扩展名的文件的 href 下载链接
- angular - 通过单击按钮显示列
- android - 将 aab 应用程序包发布到 Google Play 商店的任何缺点
- java - 数组左旋转给一些输入错误
- r - 如何使用 lapply 来基于来自单独列表的 dfs 的数据帧的子集列表