https://opendal.apache.org/ logo
Connect to HDFS HA using nameservice · ...
# general
s
Hi I need to connect to a HA Hdfs cluster using nameservice. But OpenDAL client all the way till Hdfs-sys only supports configuring a name node. I have created an issue on hdrs . Please advise on the next steps. https://github.com/Xuanwo/hdrs/issues/127
x
I remember that we already support this.
We can connect to a name service via
hdfs://cluster_name
configured in config directly.
s
Thank you! But I was checking OpenDAL client and it supports configuring namenode. https://github.com/apache/incubator-opendal/blob/main/core/src/services/hdfs/backend.rs#L108 https://github.com/Xuanwo/hdrs/blob/main/src/client.rs#L145 The name node keeps on being set across the layers. Can I configure cluster_name as name node at https://github.com/apache/incubator-opendal/blob/main/core/src/services/hdfs/backend.rs#L38 ?
x
We have a user uses cluster name in namenode directly. Would you like to have a try?
s
Thank you, yes I will try . But did not understand completely. The user in opendal hdfs backend client is actually the cluster name ? We can use that to provide the cluster name config ?
Sorry about the confusion . You mean there is a user passing cluster name as name node. Can you please point to the user ?
x
Sorry, this user used opendal internally so I can't share more information.
s
Sure, but I am not sure how that would work. Based on the article we need a bunch of client side configs to connect to a ha cluster. https://community.cloudera.com/t5/Support-Questions/Figuring-out-the-active-name-node-of-a-remote-Hadoop-cluster/m-p/174702#M136965 Not sure how the cluster name would get resolved if we pass it as namenode
OpenDAL hdfs builder takes in a map but the attributes in the client are fixed. So we can’t pass in more configs like ha namenodes , namenode rpc address etc
x
Those config are loaded from HADOOP_CONF_DIR
hdrs is just a libhdfs wrapper, we will call hdfs java client.
We don't expose too much config since we will load those from HADOOP_CONF_DIR directly.
I didn't get what cluster means. But one of our users confirmed that using URI like
hdfs://hostname
works.
The hostname will be mapped to different namenodes in config, right?
s
Thank you so much! Let me try and get back on it
It worked. Thank you so much!
x
Happy to know!
s
Hi @Xuanwo Using hdfs and relying on the java client is significantly increasing our image size. We are planning to test webhdfs. Can you please help with a way to use nameservice or connect to HA hdfs ? The docs dont mention any such info.
x
webhdfs itself is still an open issue at hdfs side: https://issues.apache.org/jira/browse/HDFS-6371
But someone in SO said httpfs (we can connect it with webhdfs) is HA aware: https://stackoverflow.com/questions/43257259/does-webhdfs-support-high-availability-when-failover-happens
s
Thank you!
Hi @Xuanwo The ticket mentioned in the thread shows HA aware webhdfs connection as resolved. Reference - https://issues.apache.org/jira/browse/HDFS-5122 https://issues.apache.org/jira/browse/HDFS-5122
x
Thanks for the information, let me check it out.