KNOX-483 added webhcat for testing
Project: http://git-wip-us.apache.org/repos/asf/knox/repo Commit: http://git-wip-us.apache.org/repos/asf/knox/commit/b56d5c60 Tree: http://git-wip-us.apache.org/repos/asf/knox/tree/b56d5c60 Diff: http://git-wip-us.apache.org/repos/asf/knox/diff/b56d5c60 Branch: refs/heads/KNOX-481 Commit: b56d5c60476e4b6b17f0c09c0b61b324c92c16e9 Parents: 2c4ba01 Author: Sumit Gupta <su...@apache.org> Authored: Tue Jan 6 16:39:11 2015 -0500 Committer: Sumit Gupta <su...@apache.org> Committed: Tue Jan 27 11:25:20 2015 -0500 ---------------------------------------------------------------------- .../services/webhcat/0.13.0/rewrite.xml | 28 ++++++++++++++++++++ .../services/webhcat/0.13.0/service.xml | 23 ++++++++++++++++ .../webhcat/WebHCatDeploymentContributor.java | 8 +++--- 3 files changed, 55 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/knox/blob/b56d5c60/gateway-service-definitions/src/main/resources/services/webhcat/0.13.0/rewrite.xml ---------------------------------------------------------------------- diff --git a/gateway-service-definitions/src/main/resources/services/webhcat/0.13.0/rewrite.xml b/gateway-service-definitions/src/main/resources/services/webhcat/0.13.0/rewrite.xml new file mode 100644 index 0000000..558abb4 --- /dev/null +++ b/gateway-service-definitions/src/main/resources/services/webhcat/0.13.0/rewrite.xml @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> +<!-- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> +<rules> + + <rule dir="IN" name="WEBHCAT/webhcat/root/inbound" pattern="*://*:*/**/templeton/v1/?{**}"> + <rewrite template="{$serviceUrl[WEBHCAT]}/v1/?{**}"/> + </rule> + + <rule dir="IN" name="WEBHCAT/webhcat/path/inbound" pattern="*://*:*/**/templeton/v1/{path=**}?{**}"> + <rewrite template="{$serviceUrl[WEBHCAT]}/v1/{path=**}?{**}"/> + </rule> + +</rules> http://git-wip-us.apache.org/repos/asf/knox/blob/b56d5c60/gateway-service-definitions/src/main/resources/services/webhcat/0.13.0/service.xml ---------------------------------------------------------------------- diff --git a/gateway-service-definitions/src/main/resources/services/webhcat/0.13.0/service.xml b/gateway-service-definitions/src/main/resources/services/webhcat/0.13.0/service.xml new file mode 100644 index 0000000..9f0c6bf --- /dev/null +++ b/gateway-service-definitions/src/main/resources/services/webhcat/0.13.0/service.xml @@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> +<!-- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> +<service role="WEBHCAT" name="webhcat" version="0.13.0"> + <urls> + <url pattern="/templeton/v1/?**"/> + <url pattern="/templeton/v1/**?**"/> + </urls> +</service> http://git-wip-us.apache.org/repos/asf/knox/blob/b56d5c60/gateway-service-webhcat/src/main/java/org/apache/hadoop/gateway/webhcat/WebHCatDeploymentContributor.java ---------------------------------------------------------------------- diff --git a/gateway-service-webhcat/src/main/java/org/apache/hadoop/gateway/webhcat/WebHCatDeploymentContributor.java b/gateway-service-webhcat/src/main/java/org/apache/hadoop/gateway/webhcat/WebHCatDeploymentContributor.java index 9ee7a9a..857459f 100644 --- a/gateway-service-webhcat/src/main/java/org/apache/hadoop/gateway/webhcat/WebHCatDeploymentContributor.java +++ b/gateway-service-webhcat/src/main/java/org/apache/hadoop/gateway/webhcat/WebHCatDeploymentContributor.java @@ -37,18 +37,18 @@ public class WebHCatDeploymentContributor extends ServiceDeploymentContributorBa @Override public String getRole() { - return "WEBHCAT"; + return "xWEBHCAT"; } @Override public String getName() { - return "webhcat"; + return "xwebhcat"; } @Override public void contributeService( DeploymentContext context, Service service ) throws Exception { - contributeRewriteRules( context, service ); - contributeResources( context, service ); +// contributeRewriteRules( context, service ); +// contributeResources( context, service ); } private void contributeRewriteRules( DeploymentContext context, Service service ) throws IOException {