You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@knox.apache.org by "Kevin Minder (JIRA)" <ji...@apache.org> on 2015/04/20 21:00:59 UTC

[jira] [Updated] (KNOX-380) Rewrite functions should accept multiple parameters and retain param names

     [ https://issues.apache.org/jira/browse/KNOX-380?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kevin Minder updated KNOX-380:
------------------------------
    Fix Version/s:     (was: 0.6.0)
                   0.7.0

> Rewrite functions should accept multiple parameters and retain param names
> --------------------------------------------------------------------------
>
>                 Key: KNOX-380
>                 URL: https://issues.apache.org/jira/browse/KNOX-380
>             Project: Apache Knox
>          Issue Type: Improvement
>          Components: Server
>    Affects Versions: 0.4.0
>            Reporter: Kevin Minder
>             Fix For: 0.7.0
>
>
> This came up while trying to implement functions for rewriting a host:port in a RM REST API response body.  The client is supposed to take that host:port and add it to the end of a URL as a path.  So the encrypted needed to turn host:port into a single encrypted value that could be part of the path.  The thinking for the rule was something like this:
> {code}
>  <rule dir="OUT" name="RESOURCEMANAGER/resourcemanager/nodeId/outbound">
>         <match pattern="{host=*}:{port=*}"/>
>         <rewrite template="{$encrypt(host,':', port)}"/>
> </rule>
> {code}
> It looks like this should start with Evaluator and work its way outward.
> {code}
> package org.apache.hadoop.gateway.util.urltemplate;
> import java.util.List;
> public interface Evaluator {
>   //List<String> evaluate( String function, List<String> parameters );
>   List<String> evaluate( String function, List<String> parameters, Resolver resolver );
> }
> {code}
> This would transition the responsibility of resolving the parameter names in List<String> parameters to the function implementation.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)