Details
-
Improvement
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
2.1.0
-
None
Description
In the Apache Knox service screen > configuration > advanced topology the templating/macros used does automatically add multiple namenode URLs if WebHDFS HA is enabled.
We should changed the template from
<url>http://{{namenode_host}:{{namenode_port}}webhdfs</url>
to something that's simple like:
webhdfs_service_urls
This will automatically add URLs if there are multiple namenodes - thus allowing one less step for setting up HA for WebHDFS in Knox
So for example, if we have a cluster running in HA mode, previously the old templating feature would have looked something like this:
<service> <role>WEBHDFS</role> <url>http://{{namenode_host}}:{{namenode_port}}/webhdfs</url> </service>
and written the following the disk for the WebHDFS service:
<service> <role>WEBHDFS</role> <url>http://namenode_host_1:namenode_port/webhdfs</url> </service>
Even though the cluster is running in HA mode, only 1 url would have been written. Now with this new feature we could replace the old
http://{{namenode_host}}:{{namenode_port}}/webhdfs
with
{{webhdfs_service_urls}}
and the urls for each server running namenode would be put into their place. Thus making the XML written to disk the following:
<service> <role>WEBHDFS</role> <url>http://namenode_host_1:namenode_port/webhdfs</url> <url>http://namenode_host_2:namenode_port/webhdfs</url> <url>http://namenode_host_3:namenode_port/webhdfs</url> </service>