Python write to hdfs file
问题 What is the best way to create/write/update a file in remote HDFS from local python script? I am able to list files and directories but writing seems to be a problem. I have searched hdfs and snakebite but none of them give a clean way to do this. 回答1: try HDFS liberary.. its really good You can use write(). https://hdfscli.readthedocs.io/en/latest/api.html#hdfs.client.Client.write Example: to create connection: from hdfs import InsecureClient client = InsecureClient('http://host:port', user=