| Configuration |
| source=/webhdfs/browseDirectory.jsp#* |
| target=http://{0}/browseDirectory.jsp |
| Converts source URL |
| /webhdfs/browseDirectory.jsp#http://org.apache.hadoop-secure:1022?namenodeInfoPort=50070&dir=%2F |
| to target URL |
| http://http-secure.home:1022/browseDirectory.jsp?namenodeInfoPort=50070&dir=%2F |
| |
| Design |
| Change the default text for messages and resources to "{}" because people might want to have an empty string as a message |
| or a resource. |
| |
| Design |
| String replacement. Take a matching regular expression that includes groups. Use these groups and pass them |
| to a message format pattern as index based params. For example (group)(group} -> "my groups: {0}, {1}. Also use the |
| parameter based substution stuff. For example (group){group) -> "{user} group = {0}, {1}" where the {user} is |
| processed before MessageFormat is called. |
| NOTE: Not done this way. |
| |
| Design |
| Convert existing servlets to filters. Call thim Dispatch. |
| |
| Usability |
| Need a utility for string formatting. Use a Resolver interface. |
| Have it resolve from request params, init params, system properties, etc. |
| Use {word} pattern so it works well with MessageFormat. Use the /w in regex. |
| |
| Add support for configured rewrite patterns |
| <rewrite>*/browseDirectory.jsp?* /gw/vm/webhdfs/browseDirectory.jsp#{0}?{1}</rewrite> |
| <rewrite>/* /gw/vm/webhdfs/{0}</rewrite> |
| |
| Service Rule |
| Need to allow query params from the source url to be used in the construction of the target url. |
| Source:/webhdfs/browseDirectory.jsp?namenodeInfoPort=50070&dir=%2F&datanodeAddr=XXXX |
| Target:XXXX/browseDirectory.jsp?nameNodeInfoPort=50070&dir=%2F |
| |
| Rewrite Rules |
| Need to be able to URL encode/decode information that is taken from the source URL and placed in the target URL. |
| Might be able to assume that everything taken from the source URL needs to be decoded. |
| Reverse is not true. Need to be able to specify which items should be included or alternativly which items should not. |
| This might only matter for rewrite rules. |
| Source: */browseDirectory.jsp?* |
| Target: /gw/vm/webhdfs/browseDirectory.jsp?{1}&datanodeAddr={0,encode} |
| |
| Usability |
| The <target> for each service should be able to use logical names for some of the path. |
| Otherwise the config isn't very reusable. |
| |
| Usability |
| The pattern matching/replacement between <target>/<source> and <rewrite> needs to be more consistent. Fixing this |
| would mean supporting query parameters in some form in <target>/<source> I think. |
| Perhaps the the service/resource should only have a matching pattern and the rewriting of the request URL should |
| be handled by the UrlRewriteFilter on the inbound side. |
| |
| Feature (IMPORTANT) |
| Will definitely need to be able to use source URL query params to build the target URL. |
| This will eliminate the need to have a separate filter chain for every data node. |
| There could be thousands of data nodes. |
| In order to do this the source patterns will have to include query params because they might be all |
| that distinguishes them from another. The example here is that the same URL might be used for the |
| name node and the data nodes and the data node address will be in a query param. |
| |
| Feature |
| Write a special dispatch for WebHDFS PUT/POST redirects. |
| |
| Utility |
| Add scheme & authority support to uritemplate |
| |
| Utility |
| Add query matching support to uritemplate |
| |
| Create a wrapper chain that you can set the org.apache.org.apache.hadoop.gateway chain on. This should allow for dynamic reconfiguration. |
| Have this wrapper control the lifecycle of the chain. Including the init and destroy of the chain. |
| |
| Create a factory that takes a string and creates config. |
| |
| Create a factory that takes config and generate the org.apache.org.apache.hadoop.gateway chain. |
| |
| Put Apache headers in all source. |
| |
| Hook up Copatura |
| |
| Hook up FindBugs |
| |
| Have messages and resources factories check that the required annotations exist and fail if they don't. This |
| will make sure that those annotations exist so that we can find the bundles at extraction time. |
| |