You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@knox.apache.org by km...@apache.org on 2013/09/24 17:44:23 UTC

[3/8] git commit: KNOX-42: Changed datanode URLs.

KNOX-42: Changed datanode URLs.


Project: http://git-wip-us.apache.org/repos/asf/incubator-knox/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-knox/commit/87012696
Tree: http://git-wip-us.apache.org/repos/asf/incubator-knox/tree/87012696
Diff: http://git-wip-us.apache.org/repos/asf/incubator-knox/diff/87012696

Branch: refs/heads/master
Commit: 87012696d89cdf9b6794ce82a6629f6f06ff3745
Parents: c44e010
Author: Kevin Minder <ke...@hortonworks.com>
Authored: Mon Sep 23 16:56:54 2013 -0400
Committer: Kevin Minder <ke...@hortonworks.com>
Committed: Tue Sep 24 11:44:15 2013 -0400

----------------------------------------------------------------------
 build.xml                                       |  3 +-
 .../gateway/filter/rewrite/impl/rewrite.xml     |  8 ++--
 .../home/samples/SampleService.groovy           |  2 +-
 .../hdfs/WebHdfsDeploymentContributor.java      | 43 +-------------------
 .../WebHdfsDeploymentContributor/rewrite.xml    |  4 +-
 .../hadoop/gateway/GatewayBasicFuncTest.java    |  2 +-
 .../gateway/util/urltemplate/MatcherTest.java   |  2 +-
 .../gateway/util/urltemplate/ParserTest.java    |  8 ++--
 .../gateway/util/urltemplate/RewriterTest.java  | 12 +++---
 9 files changed, 22 insertions(+), 62 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-knox/blob/87012696/build.xml
----------------------------------------------------------------------
diff --git a/build.xml b/build.xml
index 65415bd..fcc1ec4 100644
--- a/build.xml
+++ b/build.xml
@@ -58,7 +58,8 @@
     </target>
 
     <target name="clean" depends="init" description="Clean up any build artifacts.">
-        <delete file="target/${gateway-version}"/>
+        <delete file="target"/>
+        <delete file="install"/>
     </target>
 
     <target name="build" depends="init" description="Build the product.">

http://git-wip-us.apache.org/repos/asf/incubator-knox/blob/87012696/gateway-provider-rewrite/src/test/java/org/apache/hadoop/gateway/filter/rewrite/impl/rewrite.xml
----------------------------------------------------------------------
diff --git a/gateway-provider-rewrite/src/test/java/org/apache/hadoop/gateway/filter/rewrite/impl/rewrite.xml b/gateway-provider-rewrite/src/test/java/org/apache/hadoop/gateway/filter/rewrite/impl/rewrite.xml
index 7196f87..b10fe0a 100644
--- a/gateway-provider-rewrite/src/test/java/org/apache/hadoop/gateway/filter/rewrite/impl/rewrite.xml
+++ b/gateway-provider-rewrite/src/test/java/org/apache/hadoop/gateway/filter/rewrite/impl/rewrite.xml
@@ -83,17 +83,17 @@
     <rule dir="IN" name="WEBHDFS/webhdfs/namenode/file/inbound" pattern="*://*:*/**/namenode/api/{version}/{path=**}?{**}">
         <rewrite template="http://vm:50070/webhdfs/{version}/{path=**}?{**}"/>
     </rule>
-    <rule dir="IN" name="WEBHDFS/webhdfs/datanode/inbound" pattern="*://*:*/**/datanode/api/{version}/{path=**}?**">
+    <rule dir="IN" name="WEBHDFS/webhdfs/datanode/inbound" pattern="*://*:*/**/webhdfs/data/{version}/{path=**}?**">
         <decode-query/>
-        <match pattern="*://*:*/**/datanode/api/{version}/{path=**}?{host}&amp;{port}&amp;{**}"/>
+        <match pattern="*://*:*/**/webhdfs/data/{version}/{path=**}?{host}&amp;{port}&amp;{**}"/>
         <rewrite template="http://{host}:{port}/{path=**}?{**}"/>
     </rule>
     <rule dir="OUT" name="WEBHDFS/webhdfs/datanode/outbound" pattern="*://*:*/**?**">
         <match pattern="*://{host}:{port}/{path=**}?{**}"/>
-        <rewrite template="{gateway.url}/datanode/api/{version}/{path=**}?{host}&amp;{port}&amp;{**}"/>
+        <rewrite template="{gateway.url}/webhdfs/data/{version}/{path=**}?{host}&amp;{port}&amp;{**}"/>
         <encode-query/>
     </rule>
-    <rule dir="IN" name="WEBHCAT/webhcat/request" pattern="*://*:*/**/webhdfs/api/{path=**}?{**}">
+    <rule dir="IN" name="WEBHCAT/webhcat/request" pattern="*://*:*/**/webhcat/api/{path=**}?{**}">
         <rewrite template="http://vm:50111/templeton/{path=**}?{**}"/>
     </rule>
     <rule dir="IN" name="OOZIE/oozie/root/inbound" pattern="*://*:*/**/oozie/api/{**}?{**}">

http://git-wip-us.apache.org/repos/asf/incubator-knox/blob/87012696/gateway-release/home/samples/SampleService.groovy
----------------------------------------------------------------------
diff --git a/gateway-release/home/samples/SampleService.groovy b/gateway-release/home/samples/SampleService.groovy
index 10ca4be..e8c5bdf 100644
--- a/gateway-release/home/samples/SampleService.groovy
+++ b/gateway-release/home/samples/SampleService.groovy
@@ -19,7 +19,7 @@ import org.apache.hadoop.gateway.shell.Hadoop
 
 class SampleService {
 
-  static String PATH = "/webhdfs/api/v1"
+  static String PATH = "/namenode/api/v1"
 
   static SampleSimpleCommand simple( Hadoop hadoop ) {
     return new SampleSimpleCommand( hadoop )

http://git-wip-us.apache.org/repos/asf/incubator-knox/blob/87012696/gateway-service-webhdfs/src/main/java/org/apache/hadoop/gateway/hdfs/WebHdfsDeploymentContributor.java
----------------------------------------------------------------------
diff --git a/gateway-service-webhdfs/src/main/java/org/apache/hadoop/gateway/hdfs/WebHdfsDeploymentContributor.java b/gateway-service-webhdfs/src/main/java/org/apache/hadoop/gateway/hdfs/WebHdfsDeploymentContributor.java
index f39912d..b7f0ec5 100644
--- a/gateway-service-webhdfs/src/main/java/org/apache/hadoop/gateway/hdfs/WebHdfsDeploymentContributor.java
+++ b/gateway-service-webhdfs/src/main/java/org/apache/hadoop/gateway/hdfs/WebHdfsDeploymentContributor.java
@@ -38,7 +38,7 @@ public class WebHdfsDeploymentContributor extends ServiceDeploymentContributorBa
 
   private static final String RULES_RESOURCE = WebHdfsDeploymentContributor.class.getName().replace( '.', '/' ) + "/rewrite.xml";
   private static final String WEBHDFS_EXTERNAL_PATH = "/namenode/api/v1";
-  private static final String DATANODE_EXTERNAL_PATH = "/datanode/api/v1";
+  private static final String DATANODE_EXTERNAL_PATH = "/webhdfs/data/v1";
 //  private static final String WEBHDFS_INTERNAL_PATH = "/webhdfs";
 //  private static final String CLUSTER_URL_FUNCTION = "{gateway.url}";
 
@@ -63,47 +63,6 @@ public class WebHdfsDeploymentContributor extends ServiceDeploymentContributorBa
     UrlRewriteRulesDescriptor serviceRules = loadRulesFromClassPath();
     UrlRewriteRulesDescriptor clusterRules = context.getDescriptor( "rewrite" );
     clusterRules.addRules( serviceRules );
-
-//    UrlRewriteRulesDescriptor rules = context.getDescriptor( "rewrite" );
-//    UrlRewriteRuleDescriptor rule;
-//    UrlRewriteActionRewriteDescriptorExt rewrite;
-//    UrlRewriteMatchDescriptor match;
-//
-//    rule = rules.addRule( getQualifiedName() + "/namenode/root/inbound" )
-//        .directions( "inbound" )
-//        .pattern( "*://*:*/**" + WEBHDFS_EXTERNAL_PATH + "/?{**}" );
-//    rewrite = rule.addStep( "rewrite" );
-//    //rewrite.template( service.getUrl().toExternalForm() + "/?user.name={$username}&{**}" );
-//    rewrite.template( service.getUrl() + "/?{**}" );
-//
-//    rule = rules.addRule( getQualifiedName() + "/namenode/file/inbound" )
-//        .directions( "inbound" )
-//        .pattern( "*://*:*/**" + WEBHDFS_EXTERNAL_PATH + "/{path=**}?{**}" );
-//    rewrite = rule.addStep( "rewrite" );
-//    //rewrite.template( service.getUrl().toExternalForm() + "/{path=**}?user.name={$username}&{**}" );
-//    rewrite.template( service.getUrl() + "/{path=**}?{**}" );
-//
-//    rule = rules.addRule( getQualifiedName() + "/datanode/inbound" )
-//        .directions( "inbound" )
-//        .pattern( "*://*:*/**" + DATANODE_EXTERNAL_PATH + "/{path=**}?**" );
-//    //TODO: If the input type is wrong it throws a NPE.
-//    rule.addStep( "decode-query" );
-//    match = rule.addStep( "match" );
-//    match.pattern( "*://*:*/**" + DATANODE_EXTERNAL_PATH + "/{path=**}?{host}&{port}&{**}" );
-//    rewrite = rule.addStep( "rewrite" );
-//    rewrite.template( "http://{host}:{port}/{path=**}?{**}" );
-//
-//    rule = rules.addRule( getQualifiedName() + "/datanode/outbound" )
-//        .directions( "outbound" );
-//    match = rule.addStep( "match" );
-//    match.pattern( "*://{host}:{port}/{path=**}?{**}" );
-//    rewrite = rule.addStep( "rewrite" );
-//    rewrite.template( CLUSTER_URL_FUNCTION + DATANODE_EXTERNAL_PATH + "/{path=**}?host={$hostmap(host)}&{port}&{**}" );
-//    rule.addStep( "encode-query" );
-//
-//    UrlRewriteFilterDescriptor filter = rules.addFilter( getQualifiedName() + "/outbound" );
-//    UrlRewriteFilterContentDescriptor content = filter.addContent( "application/x-http-headers" );
-//    content.addApply( "Location", getQualifiedName() + "/datanode/outbound" );
   }
 
   public void contributeNameNodeResource( DeploymentContext context, Service service ) throws URISyntaxException {

http://git-wip-us.apache.org/repos/asf/incubator-knox/blob/87012696/gateway-service-webhdfs/src/main/resources/org/apache/hadoop/gateway/hdfs/WebHdfsDeploymentContributor/rewrite.xml
----------------------------------------------------------------------
diff --git a/gateway-service-webhdfs/src/main/resources/org/apache/hadoop/gateway/hdfs/WebHdfsDeploymentContributor/rewrite.xml b/gateway-service-webhdfs/src/main/resources/org/apache/hadoop/gateway/hdfs/WebHdfsDeploymentContributor/rewrite.xml
index d0bd2e2..0c746b6 100644
--- a/gateway-service-webhdfs/src/main/resources/org/apache/hadoop/gateway/hdfs/WebHdfsDeploymentContributor/rewrite.xml
+++ b/gateway-service-webhdfs/src/main/resources/org/apache/hadoop/gateway/hdfs/WebHdfsDeploymentContributor/rewrite.xml
@@ -27,7 +27,7 @@
 
     <rule dir="OUT" name="WEBHDFS/webhdfs/outbound/namenode/headers/location">
         <match pattern="{scheme}://{host}:{port}/{path=**}?{**}"/>
-        <rewrite template="{gateway.url}/datanode/api/v1/{path=**}?{scheme}?host={$hostmap(host)}?{port}?{**}"/>
+        <rewrite template="{gateway.url}/webhdfs/data/v1/{path=**}?{scheme}?host={$hostmap(host)}?{port}?{**}"/>
         <encrypt-query/>
     </rule>
 
@@ -49,7 +49,7 @@
 
     <rule dir="IN" name="WEBHDFS/webhdfs/inbound/datanode">
         <decrypt-query/>
-        <match pattern="*://*:*/**/datanode/api/*/{path=**}?{scheme}?{host}?{port}?{**}"/>
+        <match pattern="*://*:*/**/webhdfs/data/*/{path=**}?{scheme}?{host}?{port}?{**}"/>
         <rewrite template="{scheme}://{host}:{port}/{path=**}?{**}"/>
     </rule>
 

http://git-wip-us.apache.org/repos/asf/incubator-knox/blob/87012696/gateway-test/src/test/java/org/apache/hadoop/gateway/GatewayBasicFuncTest.java
----------------------------------------------------------------------
diff --git a/gateway-test/src/test/java/org/apache/hadoop/gateway/GatewayBasicFuncTest.java b/gateway-test/src/test/java/org/apache/hadoop/gateway/GatewayBasicFuncTest.java
index a1de86a..b03b6cb 100644
--- a/gateway-test/src/test/java/org/apache/hadoop/gateway/GatewayBasicFuncTest.java
+++ b/gateway-test/src/test/java/org/apache/hadoop/gateway/GatewayBasicFuncTest.java
@@ -118,7 +118,7 @@ public class GatewayBasicFuncTest {
     driver.setResourceBase( GatewayBasicFuncTest.class );
     driver.setupLdap( findFreePort() );
     driver.setupService( "WEBHDFS", "http://" + TEST_HOST + ":50070/webhdfs", "/cluster/namenode/api", USE_MOCK_SERVICES );
-    driver.setupService( "DATANODE", "http://" + TEST_HOST + ":50075/webhdfs", "/cluster/datanode/api", USE_MOCK_SERVICES );
+    driver.setupService( "DATANODE", "http://" + TEST_HOST + ":50075/webhdfs", "/cluster/webhdfs/data", USE_MOCK_SERVICES );
     driver.setupService( "WEBHCAT", "http://" + TEST_HOST + ":50111/webhcat", "/cluster/webhcat/api", USE_MOCK_SERVICES );
     driver.setupService( "OOZIE", "http://" + TEST_HOST + ":11000/oozie", "/cluster/oozie/api", USE_MOCK_SERVICES );
     driver.setupService( "HIVE", "http://" + TEST_HOST + ":10000", "/cluster/hive/api/v1", USE_MOCK_SERVICES );

http://git-wip-us.apache.org/repos/asf/incubator-knox/blob/87012696/gateway-util-urltemplate/src/test/java/org/apache/hadoop/gateway/util/urltemplate/MatcherTest.java
----------------------------------------------------------------------
diff --git a/gateway-util-urltemplate/src/test/java/org/apache/hadoop/gateway/util/urltemplate/MatcherTest.java b/gateway-util-urltemplate/src/test/java/org/apache/hadoop/gateway/util/urltemplate/MatcherTest.java
index 0382326..912c4ea 100644
--- a/gateway-util-urltemplate/src/test/java/org/apache/hadoop/gateway/util/urltemplate/MatcherTest.java
+++ b/gateway-util-urltemplate/src/test/java/org/apache/hadoop/gateway/util/urltemplate/MatcherTest.java
@@ -639,7 +639,7 @@ public class MatcherTest {
     stringMatcher = new Matcher<String>();
     template = Parser.parse( "*://*:*/**/namenode/api/v1/{path=**}?{**=*}" );
     stringMatcher.add( template, "test-value-B" );
-    template = Parser.parse( "*://*:*/**/datanode/api/v1/{path=**}?host={host=*}&port={port=*}&{**=*}" );
+    template = Parser.parse( "*://*:*/**/webhdfs/data/v1/{path=**}?host={host=*}&port={port=*}&{**=*}" );
     stringMatcher.add( template, "test-value-C" );
     input = Parser.parse( "http://localhost:53221/gateway/cluster/namenode/api/v1/tmp/GatewayWebHdfsFuncTest/testBasicHdfsUseCase/dir?user.name=hdfs&op=MKDIRS" );
     match = stringMatcher.match( input );

http://git-wip-us.apache.org/repos/asf/incubator-knox/blob/87012696/gateway-util-urltemplate/src/test/java/org/apache/hadoop/gateway/util/urltemplate/ParserTest.java
----------------------------------------------------------------------
diff --git a/gateway-util-urltemplate/src/test/java/org/apache/hadoop/gateway/util/urltemplate/ParserTest.java b/gateway-util-urltemplate/src/test/java/org/apache/hadoop/gateway/util/urltemplate/ParserTest.java
index 221b67c..69fdf5b 100644
--- a/gateway-util-urltemplate/src/test/java/org/apache/hadoop/gateway/util/urltemplate/ParserTest.java
+++ b/gateway-util-urltemplate/src/test/java/org/apache/hadoop/gateway/util/urltemplate/ParserTest.java
@@ -910,17 +910,17 @@ public class ParserTest {
     string = expander.expandToString( template, null, null );
     assertThat( string, is( "*://*:*/**?X" ) );
 
-    template = Parser.parse( "http://localhost:62142/gateway/cluster/datanode/api/v1/tmp/GatewayWebHdfsFuncTest/testBasicHdfsUseCase/dir/file?aG9zdD1sb2NhbGhvc3QmcG9ydD02MjEzOSZvcD1DUkVBVEUmdXNlci5uYW1lPWhkZnM" );
+    template = Parser.parse( "http://localhost:62142/gateway/cluster/webhdfs/data/v1/tmp/GatewayWebHdfsFuncTest/testBasicHdfsUseCase/dir/file?aG9zdD1sb2NhbGhvc3QmcG9ydD02MjEzOSZvcD1DUkVBVEUmdXNlci5uYW1lPWhkZnM" );
     assertThat( template, notNullValue() );
     assertThat( template.getQuery().get( "aG9zdD1sb2NhbGhvc3QmcG9ydD02MjEzOSZvcD1DUkVBVEUmdXNlci5uYW1lPWhkZnM" ), notNullValue() );
     string = expander.expandToString( template, null, null );
-    assertThat( string, is( "http://localhost:62142/gateway/cluster/datanode/api/v1/tmp/GatewayWebHdfsFuncTest/testBasicHdfsUseCase/dir/file?aG9zdD1sb2NhbGhvc3QmcG9ydD02MjEzOSZvcD1DUkVBVEUmdXNlci5uYW1lPWhkZnM" ) );
+    assertThat( string, is( "http://localhost:62142/gateway/cluster/webhdfs/data/v1/tmp/GatewayWebHdfsFuncTest/testBasicHdfsUseCase/dir/file?aG9zdD1sb2NhbGhvc3QmcG9ydD02MjEzOSZvcD1DUkVBVEUmdXNlci5uYW1lPWhkZnM" ) );
 
-    template = Parser.parse( "http://localhost:62142/gateway/cluster/datanode/api/v1/tmp/GatewayWebHdfsFuncTest/testBasicHdfsUseCase/dir/file?aG9zdD1sb2NhbGhvc3QmcG9ydD02MjEzOSZvcD1DUkVBVEUmdXNlci5uYW1lPWhkZnM=" );
+    template = Parser.parse( "http://localhost:62142/gateway/cluster/webhdfs/data/v1/tmp/GatewayWebHdfsFuncTest/testBasicHdfsUseCase/dir/file?aG9zdD1sb2NhbGhvc3QmcG9ydD02MjEzOSZvcD1DUkVBVEUmdXNlci5uYW1lPWhkZnM=" );
     assertThat( template, notNullValue() );
     assertThat( template.getQuery().get( "aG9zdD1sb2NhbGhvc3QmcG9ydD02MjEzOSZvcD1DUkVBVEUmdXNlci5uYW1lPWhkZnM" ), notNullValue() );
     string = expander.expandToString( template, null, null );
-    assertThat( string, is( "http://localhost:62142/gateway/cluster/datanode/api/v1/tmp/GatewayWebHdfsFuncTest/testBasicHdfsUseCase/dir/file?aG9zdD1sb2NhbGhvc3QmcG9ydD02MjEzOSZvcD1DUkVBVEUmdXNlci5uYW1lPWhkZnM" ) );
+    assertThat( string, is( "http://localhost:62142/gateway/cluster/webhdfs/data/v1/tmp/GatewayWebHdfsFuncTest/testBasicHdfsUseCase/dir/file?aG9zdD1sb2NhbGhvc3QmcG9ydD02MjEzOSZvcD1DUkVBVEUmdXNlci5uYW1lPWhkZnM" ) );
   }
 
   @Test

http://git-wip-us.apache.org/repos/asf/incubator-knox/blob/87012696/gateway-util-urltemplate/src/test/java/org/apache/hadoop/gateway/util/urltemplate/RewriterTest.java
----------------------------------------------------------------------
diff --git a/gateway-util-urltemplate/src/test/java/org/apache/hadoop/gateway/util/urltemplate/RewriterTest.java b/gateway-util-urltemplate/src/test/java/org/apache/hadoop/gateway/util/urltemplate/RewriterTest.java
index 1e9b441..58e7f1c 100644
--- a/gateway-util-urltemplate/src/test/java/org/apache/hadoop/gateway/util/urltemplate/RewriterTest.java
+++ b/gateway-util-urltemplate/src/test/java/org/apache/hadoop/gateway/util/urltemplate/RewriterTest.java
@@ -242,9 +242,9 @@ public class RewriterTest {
     actualOutput = Rewriter.rewrite( actualInput, sourcePattern, targetPattern, new TestResolver( config, request ), null );
     assertThat( actualOutput, equalTo( expectOutput ) );
 
-    actualInput = new URI( "/datanode/api/v1/test?user.name=hdfs&op=CREATE&overwrite=false&host=vm.home&port=50075" );
+    actualInput = new URI( "/webhdfs/data/v1/test?user.name=hdfs&op=CREATE&overwrite=false&host=vm.home&port=50075" );
     expectOutput = new URI( "http://vm.home:50075/webhdfs/v1/test?op=CREATE&user.name=hdfs&overwrite=false" );
-    sourcePattern = Parser.parse( "/datanode/api/v1/{path=**}?{host}&{port}&{**}" );
+    sourcePattern = Parser.parse( "/webhdfs/data/v1/{path=**}?{host}&{port}&{**}" );
     targetPattern = Parser.parse( "http://{host}:{port}/webhdfs/v1/{path=**}?{**}" );
     actualOutput = Rewriter.rewrite( actualInput, sourcePattern, targetPattern, new TestResolver( config, request ), null );
     // Note: Had to change the order of the expected query params to match.
@@ -282,10 +282,10 @@ public class RewriterTest {
     URI actualInput, actualOutput, expectOutput;
 
     sourcePattern = Parser.parse( "*://{host}:{port}/webhdfs/v1/{path=**}?{**}" );
-    targetPattern = Parser.parse( "{gateway.url}/datanode/api/v1/{path=**}?{host}&{port}&{**}" );
+    targetPattern = Parser.parse( "{gateway.url}/webhdfs/data/v1/{path=**}?{host}&{port}&{**}" );
 
     actualInput = new URI( "http://vm.local:50075/webhdfs/v1/tmp/GatewayWebHdfsFuncTest/dirA700/fileA700?op=CREATE&user.name=hdfs&overwrite=false&permission=700" );
-    expectOutput = new URI( "http://gw:8888/gateway/cluster/datanode/api/v1/tmp/GatewayWebHdfsFuncTest/dirA700/fileA700?host=vm.local&port=50075&op=CREATE&user.name=hdfs&overwrite=false&permission=700" );
+    expectOutput = new URI( "http://gw:8888/gateway/cluster/webhdfs/data/v1/tmp/GatewayWebHdfsFuncTest/dirA700/fileA700?host=vm.local&port=50075&op=CREATE&user.name=hdfs&overwrite=false&permission=700" );
     actualOutput = Rewriter.rewrite( actualInput, sourcePattern, targetPattern, new TestResolver( config, request ), null );
     assertThat( actualOutput, equalTo( expectOutput ) );
   }
@@ -302,10 +302,10 @@ public class RewriterTest {
     Template sourcePattern, targetPattern;
     URI actualInput, actualOutput, expectOutput;
 
-    sourcePattern = Parser.parse( "/datanode/api/v1/{path=**}?{host}&{port}&{**}" );
+    sourcePattern = Parser.parse( "/webhdfs/data/v1/{path=**}?{host}&{port}&{**}" );
     targetPattern = Parser.parse( "http://{host}:{port}/webhdfs/v1/{path=**}?{**}" );
 
-    actualInput = new URI( "/datanode/api/v1/tmp/GatewayWebHdfsFuncTest/dirA700/fileA700?host=vm.local&port=50075&op=CREATE&user.name=hdfs&overwrite=false&permission=700" );
+    actualInput = new URI( "/webhdfs/data/v1/tmp/GatewayWebHdfsFuncTest/dirA700/fileA700?host=vm.local&port=50075&op=CREATE&user.name=hdfs&overwrite=false&permission=700" );
     expectOutput = new URI( "http://vm.local:50075/webhdfs/v1/tmp/GatewayWebHdfsFuncTest/dirA700/fileA700?op=CREATE&user.name=hdfs&overwrite=false&permission=700" );
     actualOutput = Rewriter.rewrite( actualInput, sourcePattern, targetPattern, new TestResolver( config, request ), null );
     assertThat( actualOutput, equalTo( expectOutput ) );