/
Python - HDFS with high availability
Python - HDFS with high availability
Preamble
This article is for using Python on an HDFS with high availability option. The particularity of high availability is to have two namenodes for one HDFS, in case of failure.
Libraries dependency
from hdfs import InsecureClient
Downloading
try: client_hdfs = InsecureClient('http://nn1:50070','hdfs') ret = client_hdfs.download('my_hdfs_file','my_local_path') except: try: client_hdfs = InsecureClient('http://nn2:50070','hdfs') ret = client_hdfs.download('my_hdfs_file','my_local_path') except: print("no namenode available")
, multiple selections available,
Related content
R - HDFS with high availability
R - HDFS with high availability
More like this
Python - Read & Write files from HDFS
Python - Read & Write files from HDFS
More like this
Java - HDFS with High Availability
Java - HDFS with High Availability
More like this
Talend - HDFS with high availability
Talend - HDFS with high availability
More like this
Python - Write figure to HDFS
Python - Write figure to HDFS
More like this
Python
Python
More like this