Description
Hadoop added links to datanode web UI in namenode datanodes page (HDFS-10440 & HDFS-10493) in the form of JavaScript. In Knox we added rewrite rules to map JS text '//
'https://gateway.host:8443/gateway/default/hdfs/datanode?host={infoAddr}
'.
This works with Knox 0.7. But in Knox 0.11, the same rule results in the encoded query segment:
'https://gateway.host:8443/gateway/default/hdfs/datanode?host=%7BinfoAddr%7D'
and this breaks JavaScript code.
I did some investigation and it seems that the encoding comes from the Expander code:
private static void appendQueryPart(String part, StringBuilder builder) { try { builder.append(URLEncoder.encode(part, "UTF-8")); } catch ( UnsupportedEncodingException e ) { builder.append(part); } }