Add tthe hostmap
provider to the cluster topology descriptor and a
parameter for each DataNode in the cluster, as follows:
Open the cluster topology descriptor file,
, in a text editor.$cluster-name
.xmlAdd the Hostmap provider to
topology/gateway
using the following format:<provider> <role>hostmap</role> <name>static</name> <enabled>true</enabled> <param> <name>$external-name</name> <value>$internal-dn-host</value> </param> </provider>
where:
$cluster-name
.xml is the name of the topology descriptor file, located in/etc/knox/conf/topologies
.$external-name
is the value that the gateway uses to replace$internal_host
host names in responses.$internal-dn-host
is a comma separated list of host names that the gateway will replace when rewriting responses.
To the
hostmap
provider, add aparam
for each additional DataNode in your cluster:<param> <name>$external-name2</name> <value>$internal-dn2-host</value> </param>
Save the file.
The gateway creates a new WAR file with modified timestamp in
/var/lib/knox/data/deployments
.