[雪峰磁针石博客]大数据Hadoop工具python教程2-python访问HDFS ...

https://pypi.org/project/hdfs3 已经不维护
PyArrow
https://pypi.org/project/hdfs/
https://pypi.org/project/snakebite/ python2中比较好,对python3支持不好。

hdfs和PyArrow比较常用,这里以hdfs为例:

 快速入门

from hdfs import InsecureClient
client = InsecureClient('http://localhost:50070', user='hduser_')

fs_folders_list = client.list("/")
print(fs_folders_list)
with client.read('/user/hduser/input.txt', encoding='utf-8') as reader:
    for line in reader:
        print(line)

执行结果:

['user']
https://china-testing.github.io/

https://diogoalexandrefranco.github.io/interacting-with-hdfs-from-pyspark/
http://wesmckinney.com/blog/python-hdfs-interfaces/
https://www.thomashenson.com/hadoop-python-example/
https://blog.cloudera.com/blog/2013/01/a-guide-to-python-frameworks-for-hadoop/

https://community.hortonworks.com/articles/92321/interacting-with-hadoop-hdfs-using-python-codes.html
http://yizhanggou.top/python%E8%AE%BF%E9%97%AEhdfs%E7%9A%84%E5%87%A0%E7%A7%8D%E6%96%B9%E5%BC%8F/
https://blog.csdn.net/Gamer_gyt/article/details/52446757

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值