天道酬勤,学无止境

python hdfs

Use python to access Hadoop HDFS storage to implement file operations

In the debugging environment, we use the shell interface test provided by hadoop to add delete view, but it is not conducive to complex logic programmingView file contentwww.xiaorui.cc Accessing hdfs with python is a headache. . . .This is the library of pyhdfsimport pyhdfs fs = pyhdfs.connect("192.168.1.1", 9000) pyhdfs.get(fs, "/rui/111", "/var/111") f = pyhdfs.open(fs, "/test/xxx", "w") pyhdfs.write(fs, f, "fuck\0gfw\n") pyhdfs.close(fs, f) pyhdfs.disconnect(fs)The installation process of pyhdfs is very vomiting bloodsvn checkout http://libpyhdfs.googlecode.com/svn/trunk/ libpyhdfs cd

2021-06-01 20:14:13    分类:博客    python hadoop接口   python hdfs   python hadoop   hadoop