本文共 380 字,大约阅读时间需要 1 分钟。
已经不维护
python2中比较好,对python3支持不好。hdfs和PyArrow比较常用,这里以hdfs为例:
from hdfs import InsecureClientclient = 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/
转载地址:http://hrgix.baihongyu.com/