无法在 AWS EMR Notebook 中找到该文件
我一直在尝试在 EMR Notebook 中使用一些 .txt
、.csv
文件,但找不到它们。
我正在尝试通过以下方式阅读:
with open('file.txt', 'r') as f:
notes = f.read()
我尝试过的事情:
使用 JupyterHub UI 上传了文件。我可以看到该文件,但无法从路径中读取它。我还使用 JupyterHub 终端检查了该文件。
尝试从 s3 读取(很多人都以这种方式工作):
with open('s3://
/file.txt', 'r') as f: - < p>使用
hdfs dfs
和hadoop 将文件复制到主节点(集群中)中的
hdfs
和hadoop
fs 。文件存在于两个目录中。
但是,我不知道如何访问 EMR Notebook 中的文件。
有什么想法吗?
I have been trying to use some .txt
, .csv
files in an EMR Notebook but I cannot locate them.
I am trying to read via:
with open('file.txt', 'r') as f:
notes = f.read()
Things I tried:
Uploaded the file by using JupyterHub UI. I can see the file but I cant read it from the path. I also checked the file using JupyterHub terminal.
Tried to read from s3 (lots of people got it working in this way):
with open('s3://<repo>/file.txt', 'r') as f:
Copied the file to
hdfs
andhadoop
in master node (in cluster) using both:hdfs dfs
andhadoop fs
. File is present in both directories.
However, I have no clue how I can reach the file in EMR Notebook.
Any ideas?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论