Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

KNOX - Help requested for parsing query parameters.

KNOX - Help requested for parsing query parameters.

New Contributor

Hi Guys,

I have been struggling with this since a few days now and I can't seem to be able to fix it? It is parsing "id" correctly. But, it is also picking up the entire "amp;attempt" as another query parameter as opposed to just "attempt". Is there a way to strip out extra "amp;" somehow and just keep "attempt=0" or is there another way to fix this? This is KNOX on HDP 2.6.1.

2019-03-07 03:45:16,408 DEBUG hadoop.gateway (UrlRewriteProcessor.java:rewrite(164)) - Rewrote URL: /proxy/application_1551341404019_0002/stages/stage?id=3&attempt=0, direction: OUT via implicit rule: YARNUI/yarn/outbound/proxystage to URL: https://gatewayhost.domain.com:8444/gateway/default/yarn/proxy/application_1551341404019_0002/stages...?amp;attempt=0&id=3

Here's what I have in the rewrite.xml

 <rule dir="OUT" name="YARNUI/yarn/outbound/proxystage" pattern="/proxy/{*}/stages/stage?{**}">     <rewrite template="{$frontend[url]}/yarn/proxy/{*}/stages/stage?{**}"/>  </rule>


Thanks a lot in advance!

Manish


EDIT:- Found a workaround! This seems to have resolved the issue.

<rule dir="OUT" name="YARNUI/yarn/outbound/proxystage" pattern="/proxy/{*}/stages/stage?{amp;attempt}?{**}">
    <rewrite template="{$frontend[url]}/yarn/proxy/{*}/stages/stage?attempt={amp;attempt}?{**}"/>
  </rule>
Don't have an account?
Coming from Hortonworks? Activate your account here