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 2014/01/15 22:50:02 UTC
git commit: KNOX-226: Need more Linux friendly installation layout
Updated Branches:
refs/heads/master 5735acfb1 -> 6aaa7021a
KNOX-226: Need more Linux friendly installation layout
Project: http://git-wip-us.apache.org/repos/asf/incubator-knox/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-knox/commit/6aaa7021
Tree: http://git-wip-us.apache.org/repos/asf/incubator-knox/tree/6aaa7021
Diff: http://git-wip-us.apache.org/repos/asf/incubator-knox/diff/6aaa7021
Branch: refs/heads/master
Commit: 6aaa7021a10febd04e9e41faa0f58be11ec5891c
Parents: 5735acf
Author: Kevin Minder <ke...@hortonworks.com>
Authored: Wed Jan 15 16:47:01 2014 -0500
Committer: Kevin Minder <ke...@hortonworks.com>
Committed: Wed Jan 15 16:47:01 2014 -0500
----------------------------------------------------------------------
build.xml | 4 +-
gateway-provider-jersey/pom.xml | 5 +
.../JerseyServiceDeploymentContributorBase.java | 2 +-
gateway-release/home/conf/topologies/README | 1 +
.../home/conf/topologies/sandbox.xml | 123 +++++++++++++++++++
gateway-release/home/data/README | 1 +
gateway-release/home/deployments/README | 1 -
gateway-release/home/deployments/sandbox.xml | 123 -------------------
.../apache/hadoop/gateway/GatewayMessages.java | 2 +-
.../apache/hadoop/gateway/GatewayServer.java | 27 +++-
.../gateway/config/impl/GatewayConfigImpl.java | 48 +++++++-
.../dispatch/PartiallyRepeatableHttpEntity.java | 1 +
.../impl/DefaultServiceRegistryService.java | 2 +-
.../security/impl/DefaultKeystoreService.java | 2 +-
.../security/impl/DefaultMasterService.java | 2 +-
.../services/security/impl/JettySSLService.java | 6 +-
.../hadoop/gateway/config/GatewayConfig.java | 29 ++++-
.../hadoop/gateway/GatewayFuncTestDriver.java | 14 ++-
.../GatewayLdapDynamicGroupFuncTest.java | 3 +-
.../gateway/GatewayLdapGroupFuncTest.java | 3 +-
.../gateway/GatewayLocalServiceFuncTest.java | 6 +-
.../hadoop/gateway/GatewaySampleFuncTest.java | 3 +-
.../hadoop/gateway/GatewayTestConfig.java | 90 ++++++++------
.../deploy/DeploymentFactoryFuncTest.java | 21 ++--
pom.xml | 4 +-
25 files changed, 314 insertions(+), 209 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-knox/blob/6aaa7021/build.xml
----------------------------------------------------------------------
diff --git a/build.xml b/build.xml
index 859b64b..71ca155 100644
--- a/build.xml
+++ b/build.xml
@@ -297,9 +297,9 @@
<target name="install-test-home" description="Install binary release into install directory.">
<delete dir="${install.dir}" quiet="true"/>
<unzip src="target/${gateway-version}/${gateway-artifact}-${gateway-version}.zip/" dest="${install.dir}"/>
- <echo file="${install.dir}/${gateway-artifact}-${gateway-version}/conf/security/master">#1.0# Mon, Aug 26 2013 14:25:31.483
+ <echo file="${install.dir}/${gateway-artifact}-${gateway-version}/data/security/master">#1.0# Mon, Aug 26 2013 14:25:31.483
cGkvajhUZHBNSTQ9OjpPMk5PQktYaHRyUmJoTW1zWGo0bytRPT06OkxtVjlvSDdIOWdvSEZqNTRlWVJ2N3c9PQ==</echo>
- <chmod file="${install.dir}/${gateway-artifact}-${gateway-version}/conf/security/master" perm="600"/>
+ <chmod file="${install.dir}/${gateway-artifact}-${gateway-version}/data/security/master" perm="600"/>
</target>
<target name="spawn-test-ldap" description="Spawn test LDAP server.">
http://git-wip-us.apache.org/repos/asf/incubator-knox/blob/6aaa7021/gateway-provider-jersey/pom.xml
----------------------------------------------------------------------
diff --git a/gateway-provider-jersey/pom.xml b/gateway-provider-jersey/pom.xml
index b679b61..6ecccbf 100644
--- a/gateway-provider-jersey/pom.xml
+++ b/gateway-provider-jersey/pom.xml
@@ -38,6 +38,11 @@
</dependency>
<dependency>
+ <groupId>org.apache.commons</groupId>
+ <artifactId>commons-lang3</artifactId>
+ </dependency>
+
+ <dependency>
<groupId>${gateway-group}</groupId>
<artifactId>gateway-server</artifactId>
<scope>test</scope>
http://git-wip-us.apache.org/repos/asf/incubator-knox/blob/6aaa7021/gateway-provider-jersey/src/main/java/org/apache/hadoop/gateway/jersey/JerseyServiceDeploymentContributorBase.java
----------------------------------------------------------------------
diff --git a/gateway-provider-jersey/src/main/java/org/apache/hadoop/gateway/jersey/JerseyServiceDeploymentContributorBase.java b/gateway-provider-jersey/src/main/java/org/apache/hadoop/gateway/jersey/JerseyServiceDeploymentContributorBase.java
index fc7f114..fb7ac39 100644
--- a/gateway-provider-jersey/src/main/java/org/apache/hadoop/gateway/jersey/JerseyServiceDeploymentContributorBase.java
+++ b/gateway-provider-jersey/src/main/java/org/apache/hadoop/gateway/jersey/JerseyServiceDeploymentContributorBase.java
@@ -17,7 +17,7 @@
*/
package org.apache.hadoop.gateway.jersey;
-import org.apache.commons.lang.StringUtils;
+import org.apache.commons.lang3.StringUtils;
import org.apache.hadoop.gateway.deploy.DeploymentContext;
import org.apache.hadoop.gateway.deploy.ServiceDeploymentContributorBase;
import org.apache.hadoop.gateway.descriptor.FilterParamDescriptor;
http://git-wip-us.apache.org/repos/asf/incubator-knox/blob/6aaa7021/gateway-release/home/conf/topologies/README
----------------------------------------------------------------------
diff --git a/gateway-release/home/conf/topologies/README b/gateway-release/home/conf/topologies/README
new file mode 100644
index 0000000..6588a11
--- /dev/null
+++ b/gateway-release/home/conf/topologies/README
@@ -0,0 +1 @@
+THIS IS THE DIRECTORY WHERE YOU COPY OR SAVE CLUSTER TOPOLOGY DEPLOYMENT DESCRIPTOR FILES
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-knox/blob/6aaa7021/gateway-release/home/conf/topologies/sandbox.xml
----------------------------------------------------------------------
diff --git a/gateway-release/home/conf/topologies/sandbox.xml b/gateway-release/home/conf/topologies/sandbox.xml
new file mode 100644
index 0000000..a9e5719
--- /dev/null
+++ b/gateway-release/home/conf/topologies/sandbox.xml
@@ -0,0 +1,123 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ 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.
+-->
+<topology>
+
+ <gateway>
+
+ <provider>
+ <role>authentication</role>
+ <name>ShiroProvider</name>
+ <enabled>true</enabled>
+ <param>
+ <!--
+ session timeout in minutes, this is really idle timeout,
+ defaults to 30mins, if the property value is not defined,,
+ current client authentication would expire if client idles contiuosly for more than this value
+ -->
+ <name>sessionTimeout</name>
+ <value>30</value>
+ </param>
+ <param>
+ <name>main.ldapRealm</name>
+ <value>org.apache.shiro.realm.ldap.JndiLdapRealm</value>
+ </param>
+ <param>
+ <name>main.ldapRealm.userDnTemplate</name>
+ <value>uid={0},ou=people,dc=hadoop,dc=apache,dc=org</value>
+ </param>
+ <param>
+ <name>main.ldapRealm.contextFactory.url</name>
+ <value>ldap://localhost:33389</value>
+ </param>
+ <param>
+ <name>main.ldapRealm.contextFactory.authenticationMechanism</name>
+ <value>simple</value>
+ </param>
+ <param>
+ <name>urls./**</name>
+ <value>authcBasic</value>
+ </param>
+ </provider>
+
+ <provider>
+ <role>identity-assertion</role>
+ <name>Pseudo</name>
+ <enabled>true</enabled>
+ </provider>
+
+ <!--
+ Defines rules for mapping host names internal to a Hadoop cluster to externally accessible host names.
+ For example, a hadoop service running in AWS may return a response that includes URLs containing the
+ some AWS internal host name. If the client needs to make a subsequent request to the host identified
+ in those URLs they need to be mapped to external host names that the client Knox can use to connect.
+
+ If the external hostname and internal host names are same turn of this provider by setting the value of
+ enabled parameter as false.
+
+ The name parameter specifies the external host names in a comma separated list.
+ The value parameter specifies corresponding internal host names in a comma separated list.
+
+ Note that when you are using Sandbox, the external hostname needs to be localhost, as seen in out
+ of box sandbox.xml. This is because Sandbox uses port mapping to allow clients to connect to the
+ Hadoop services using localhost. In real clusters, external host names would almost never be localhost.
+ -->
+ <provider>
+ <role>hostmap</role>
+ <name>static</name>
+ <enabled>true</enabled>
+ <param><name>localhost</name><value>sandbox,sandbox.hortonworks.com</value></param>
+ </provider>
+
+ </gateway>
+
+ <service>
+ <role>NAMENODE</role>
+ <url>hdfs://localhost:8020</url>
+ </service>
+
+ <service>
+ <role>JOBTRACKER</role>
+ <url>rpc://localhost:8050</url>
+ </service>
+
+ <service>
+ <role>WEBHDFS</role>
+ <url>http://localhost:50070/webhdfs</url>
+ </service>
+
+ <service>
+ <role>WEBHCAT</role>
+ <url>http://localhost:50111/templeton</url>
+ </service>
+
+ <service>
+ <role>OOZIE</role>
+ <url>http://localhost:11000/oozie</url>
+ </service>
+
+ <service>
+ <role>WEBHBASE</role>
+ <url>http://localhost:60080</url>
+ </service>
+
+ <service>
+ <role>HIVE</role>
+ <url>http://localhost:10001/cliservice</url>
+ </service>
+
+</topology>
http://git-wip-us.apache.org/repos/asf/incubator-knox/blob/6aaa7021/gateway-release/home/data/README
----------------------------------------------------------------------
diff --git a/gateway-release/home/data/README b/gateway-release/home/data/README
new file mode 100644
index 0000000..1f425f0
--- /dev/null
+++ b/gateway-release/home/data/README
@@ -0,0 +1 @@
+THIS DIRECTORY IS POPULATED AUTOMATICALLY BY THE GATEWAY AT RUNTIME
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-knox/blob/6aaa7021/gateway-release/home/deployments/README
----------------------------------------------------------------------
diff --git a/gateway-release/home/deployments/README b/gateway-release/home/deployments/README
deleted file mode 100644
index 6588a11..0000000
--- a/gateway-release/home/deployments/README
+++ /dev/null
@@ -1 +0,0 @@
-THIS IS THE DIRECTORY WHERE YOU COPY OR SAVE CLUSTER TOPOLOGY DEPLOYMENT DESCRIPTOR FILES
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-knox/blob/6aaa7021/gateway-release/home/deployments/sandbox.xml
----------------------------------------------------------------------
diff --git a/gateway-release/home/deployments/sandbox.xml b/gateway-release/home/deployments/sandbox.xml
deleted file mode 100644
index a9e5719..0000000
--- a/gateway-release/home/deployments/sandbox.xml
+++ /dev/null
@@ -1,123 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- 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.
--->
-<topology>
-
- <gateway>
-
- <provider>
- <role>authentication</role>
- <name>ShiroProvider</name>
- <enabled>true</enabled>
- <param>
- <!--
- session timeout in minutes, this is really idle timeout,
- defaults to 30mins, if the property value is not defined,,
- current client authentication would expire if client idles contiuosly for more than this value
- -->
- <name>sessionTimeout</name>
- <value>30</value>
- </param>
- <param>
- <name>main.ldapRealm</name>
- <value>org.apache.shiro.realm.ldap.JndiLdapRealm</value>
- </param>
- <param>
- <name>main.ldapRealm.userDnTemplate</name>
- <value>uid={0},ou=people,dc=hadoop,dc=apache,dc=org</value>
- </param>
- <param>
- <name>main.ldapRealm.contextFactory.url</name>
- <value>ldap://localhost:33389</value>
- </param>
- <param>
- <name>main.ldapRealm.contextFactory.authenticationMechanism</name>
- <value>simple</value>
- </param>
- <param>
- <name>urls./**</name>
- <value>authcBasic</value>
- </param>
- </provider>
-
- <provider>
- <role>identity-assertion</role>
- <name>Pseudo</name>
- <enabled>true</enabled>
- </provider>
-
- <!--
- Defines rules for mapping host names internal to a Hadoop cluster to externally accessible host names.
- For example, a hadoop service running in AWS may return a response that includes URLs containing the
- some AWS internal host name. If the client needs to make a subsequent request to the host identified
- in those URLs they need to be mapped to external host names that the client Knox can use to connect.
-
- If the external hostname and internal host names are same turn of this provider by setting the value of
- enabled parameter as false.
-
- The name parameter specifies the external host names in a comma separated list.
- The value parameter specifies corresponding internal host names in a comma separated list.
-
- Note that when you are using Sandbox, the external hostname needs to be localhost, as seen in out
- of box sandbox.xml. This is because Sandbox uses port mapping to allow clients to connect to the
- Hadoop services using localhost. In real clusters, external host names would almost never be localhost.
- -->
- <provider>
- <role>hostmap</role>
- <name>static</name>
- <enabled>true</enabled>
- <param><name>localhost</name><value>sandbox,sandbox.hortonworks.com</value></param>
- </provider>
-
- </gateway>
-
- <service>
- <role>NAMENODE</role>
- <url>hdfs://localhost:8020</url>
- </service>
-
- <service>
- <role>JOBTRACKER</role>
- <url>rpc://localhost:8050</url>
- </service>
-
- <service>
- <role>WEBHDFS</role>
- <url>http://localhost:50070/webhdfs</url>
- </service>
-
- <service>
- <role>WEBHCAT</role>
- <url>http://localhost:50111/templeton</url>
- </service>
-
- <service>
- <role>OOZIE</role>
- <url>http://localhost:11000/oozie</url>
- </service>
-
- <service>
- <role>WEBHBASE</role>
- <url>http://localhost:60080</url>
- </service>
-
- <service>
- <role>HIVE</role>
- <url>http://localhost:10001/cliservice</url>
- </service>
-
-</topology>
http://git-wip-us.apache.org/repos/asf/incubator-knox/blob/6aaa7021/gateway-server/src/main/java/org/apache/hadoop/gateway/GatewayMessages.java
----------------------------------------------------------------------
diff --git a/gateway-server/src/main/java/org/apache/hadoop/gateway/GatewayMessages.java b/gateway-server/src/main/java/org/apache/hadoop/gateway/GatewayMessages.java
index 84ef4c9..851ed23 100644
--- a/gateway-server/src/main/java/org/apache/hadoop/gateway/GatewayMessages.java
+++ b/gateway-server/src/main/java/org/apache/hadoop/gateway/GatewayMessages.java
@@ -67,7 +67,7 @@ public interface GatewayMessages {
void settingGatewayHomeDir( String location, String home );
@Message( level = MessageLevel.INFO, text = "Loading topologies from directory: {0}" )
- void loadingTopologiesFromDirecotry( String topologiesDir );
+ void loadingTopologiesFromDirectory( String topologiesDir );
@Message( level = MessageLevel.DEBUG, text = "Loading topology file: {0}" )
void loadingTopologyFile( String fileName );
http://git-wip-us.apache.org/repos/asf/incubator-knox/blob/6aaa7021/gateway-server/src/main/java/org/apache/hadoop/gateway/GatewayServer.java
----------------------------------------------------------------------
diff --git a/gateway-server/src/main/java/org/apache/hadoop/gateway/GatewayServer.java b/gateway-server/src/main/java/org/apache/hadoop/gateway/GatewayServer.java
index 5db8ff5..0527efc 100644
--- a/gateway-server/src/main/java/org/apache/hadoop/gateway/GatewayServer.java
+++ b/gateway-server/src/main/java/org/apache/hadoop/gateway/GatewayServer.java
@@ -123,7 +123,7 @@ public class GatewayServer {
}
private static void configureLogging( GatewayConfig config ) {
- String fileName = config.getGatewayHomeDir() + "/conf/log4j.properties";
+ String fileName = config.getGatewayConfDir() + File.separator + "log4j.properties";
File file = new File( fileName );
if( file.isFile() && file.canRead() ) {
FileInputStream stream;
@@ -248,7 +248,8 @@ public class GatewayServer {
}
if (config.isSSLEnabled()) {
SSLService ssl = services.getService("SSLService");
- Connector connector = (Connector) ssl.buildSSlConnector(config.getGatewayHomeDir());
+ String keystoreFileName = config.getGatewaySecurityDir() + File.separatorChar + "keystores" + File.separatorChar + "gateway.jks";
+ Connector connector = (Connector) ssl.buildSSlConnector( keystoreFileName );
connector.setHost(address.getHostName());
connector.setPort(address.getPort());
jetty.addConnector(connector);
@@ -268,7 +269,7 @@ public class GatewayServer {
monitor.addTopologyChangeListener( listener );
// Load the current topologies.
- log.loadingTopologiesFromDirecotry( topologiesDir.getAbsolutePath() );
+ log.loadingTopologiesFromDirectory( topologiesDir.getAbsolutePath() );
monitor.reloadTopologies();
// Start the topology monitor.
@@ -342,6 +343,7 @@ public class GatewayServer {
for( TopologyEvent event : events ) {
Topology topology = event.getTopology();
File topoDir = calculateAbsoluteTopologiesDir();
+ File deployDir = calculateAbsoluteDeploymentsDir();
File warDir = calculateDeploymentDir( topology );
if( event.getType().equals( TopologyEvent.Type.DELETED ) ) {
File[] files = topoDir.listFiles( new WarDirFilter( topology.getName() + "\\.war\\.[0-9A-Fa-f]+" ) );
@@ -359,7 +361,10 @@ public class GatewayServer {
internalUndeploy( topology ); // KNOX-152
WebArchive war = null;
war = DeploymentFactory.createDeployment( config, topology );
- File tmp = war.as( ExplodedExporter.class ).exportExploded( topoDir, warDir.getName() + ".tmp" );
+ if( !deployDir.exists() ) {
+ deployDir.mkdirs();
+ }
+ File tmp = war.as( ExplodedExporter.class ).exportExploded( deployDir, warDir.getName() + ".tmp" );
tmp.renameTo( warDir );
internalDeploy( topology, warDir );
//log.deployedTopology( topology.getName());
@@ -379,17 +384,27 @@ public class GatewayServer {
}
private static File calculateAbsoluteTopologiesDir( GatewayConfig config ) {
- File topoDir = new File( config.getGatewayHomeDir(), config.getDeploymentDir() );
+ File topoDir = new File( config.getGatewayTopologyDir() );
topoDir = topoDir.getAbsoluteFile();
return topoDir;
}
+ private static File calculateAbsoluteDeploymentsDir( GatewayConfig config ) {
+ File deployDir = new File( config.getGatewayDeploymentDir() );
+ deployDir = deployDir.getAbsoluteFile();
+ return deployDir;
+ }
+
private File calculateAbsoluteTopologiesDir() {
return calculateAbsoluteTopologiesDir( config );
}
+ private File calculateAbsoluteDeploymentsDir() {
+ return calculateAbsoluteDeploymentsDir( config );
+ }
+
private File calculateDeploymentDir( Topology topology ) {
- File warDir = new File( calculateAbsoluteTopologiesDir(), calculateDeploymentName( topology ) );
+ File warDir = new File( calculateAbsoluteDeploymentsDir(), calculateDeploymentName( topology ) );
return warDir;
}
http://git-wip-us.apache.org/repos/asf/incubator-knox/blob/6aaa7021/gateway-server/src/main/java/org/apache/hadoop/gateway/config/impl/GatewayConfigImpl.java
----------------------------------------------------------------------
diff --git a/gateway-server/src/main/java/org/apache/hadoop/gateway/config/impl/GatewayConfigImpl.java b/gateway-server/src/main/java/org/apache/hadoop/gateway/config/impl/GatewayConfigImpl.java
index e56d2af..fc27cfb 100644
--- a/gateway-server/src/main/java/org/apache/hadoop/gateway/config/impl/GatewayConfigImpl.java
+++ b/gateway-server/src/main/java/org/apache/hadoop/gateway/config/impl/GatewayConfigImpl.java
@@ -106,7 +106,21 @@ public class GatewayConfigImpl extends Configuration implements GatewayConfig {
init();
}
- public String getGatewayHomeDir() {
+ private String getVar( String variableName, String defaultValue ) {
+ String value = get( variableName );
+ if( value == null ) {
+ value = System.getProperty( variableName );
+ }
+ if( value == null ) {
+ value = System.getenv( variableName );
+ }
+ if( value == null ) {
+ value = defaultValue;
+ }
+ return value;
+ }
+
+ private String getGatewayHomeDir() {
String home = get(
GATEWAY_HOME_VAR,
System.getProperty(
@@ -119,6 +133,19 @@ public class GatewayConfigImpl extends Configuration implements GatewayConfig {
set( GATEWAY_HOME_VAR, dir );
}
+ @Override
+ public String getGatewayConfDir() {
+ String value = getVar( GATEWAY_CONF_HOME_VAR, getGatewayHomeDir() + File.separator + "conf" );
+ return value;
+ }
+
+ @Override
+ public String getGatewayDataDir() {
+ String value = getVar( GATEWAY_DATA_HOME_VAR, getGatewayHomeDir() + File.separator + "data" );
+ return value;
+ }
+
+ @Override
public String getHadoopConfDir() {
return get( HADOOP_CONF_DIR );
}
@@ -218,23 +245,38 @@ public class GatewayConfigImpl extends Configuration implements GatewayConfig {
return url;
}
+ @Override
public String getGatewayHost() {
String host = get( HTTP_HOST, "0.0.0.0" );
return host;
}
+ @Override
public int getGatewayPort() {
return Integer.parseInt( get( HTTP_PORT, DEFAULT_HTTP_PORT ) );
}
+ @Override
public String getGatewayPath() {
return get( HTTP_PATH, DEFAULT_HTTP_PATH );
}
- public String getDeploymentDir() {
- return get( DEPLOYMENT_DIR, DEFAULT_DEPLOYMENT_DIR );
+ @Override
+ public String getGatewayTopologyDir() {
+ return getGatewayConfDir() + File.separator + "topologies";
}
+ @Override
+ public String getGatewayDeploymentDir() {
+ return getGatewayDataDir() + File.separator + "deployments";
+ }
+
+ @Override
+ public String getGatewaySecurityDir() {
+ return getGatewayDataDir() + File.separator + "security";
+ }
+
+ @Override
public InetSocketAddress getGatewayAddress() throws UnknownHostException {
String host = getGatewayHost();
int port = getGatewayPort();
http://git-wip-us.apache.org/repos/asf/incubator-knox/blob/6aaa7021/gateway-server/src/main/java/org/apache/hadoop/gateway/dispatch/PartiallyRepeatableHttpEntity.java
----------------------------------------------------------------------
diff --git a/gateway-server/src/main/java/org/apache/hadoop/gateway/dispatch/PartiallyRepeatableHttpEntity.java b/gateway-server/src/main/java/org/apache/hadoop/gateway/dispatch/PartiallyRepeatableHttpEntity.java
index 50fe15b..340e852 100644
--- a/gateway-server/src/main/java/org/apache/hadoop/gateway/dispatch/PartiallyRepeatableHttpEntity.java
+++ b/gateway-server/src/main/java/org/apache/hadoop/gateway/dispatch/PartiallyRepeatableHttpEntity.java
@@ -98,6 +98,7 @@ public class PartiallyRepeatableHttpEntity extends HttpEntityWrapper {
}
@Override
+ @SuppressWarnings( "deprecation" )
public void consumeContent() throws IOException {
throw new UnsupportedOperationException();
}
http://git-wip-us.apache.org/repos/asf/incubator-knox/blob/6aaa7021/gateway-server/src/main/java/org/apache/hadoop/gateway/services/registry/impl/DefaultServiceRegistryService.java
----------------------------------------------------------------------
diff --git a/gateway-server/src/main/java/org/apache/hadoop/gateway/services/registry/impl/DefaultServiceRegistryService.java b/gateway-server/src/main/java/org/apache/hadoop/gateway/services/registry/impl/DefaultServiceRegistryService.java
index 662f7ba..e18f327 100644
--- a/gateway-server/src/main/java/org/apache/hadoop/gateway/services/registry/impl/DefaultServiceRegistryService.java
+++ b/gateway-server/src/main/java/org/apache/hadoop/gateway/services/registry/impl/DefaultServiceRegistryService.java
@@ -165,7 +165,7 @@ public class DefaultServiceRegistryService implements ServiceRegistry, Service {
@Override
public void init(GatewayConfig config, Map<String, String> options)
throws ServiceLifecycleException {
- String securityDir = config.getGatewayHomeDir() + File.separator + "conf" + File.separator + "security";
+ String securityDir = config.getGatewaySecurityDir();
String filename = "registry";
setupRegistryFile(securityDir, filename);
}
http://git-wip-us.apache.org/repos/asf/incubator-knox/blob/6aaa7021/gateway-server/src/main/java/org/apache/hadoop/gateway/services/security/impl/DefaultKeystoreService.java
----------------------------------------------------------------------
diff --git a/gateway-server/src/main/java/org/apache/hadoop/gateway/services/security/impl/DefaultKeystoreService.java b/gateway-server/src/main/java/org/apache/hadoop/gateway/services/security/impl/DefaultKeystoreService.java
index e9f093d..781375b 100644
--- a/gateway-server/src/main/java/org/apache/hadoop/gateway/services/security/impl/DefaultKeystoreService.java
+++ b/gateway-server/src/main/java/org/apache/hadoop/gateway/services/security/impl/DefaultKeystoreService.java
@@ -60,7 +60,7 @@ public class DefaultKeystoreService extends BaseKeystoreService implements Keyst
@Override
public void init(GatewayConfig config, Map<String, String> options)
throws ServiceLifecycleException {
- this.keyStoreDir = config.getGatewayHomeDir() + File.separator + "conf" + File.separator + "security" + File.separator + "keystores" + File.separator;
+ this.keyStoreDir = config.getGatewaySecurityDir() + File.separator + "keystores" + File.separator;
File ksd = new File(this.keyStoreDir);
if (!ksd.exists()) {
if( !ksd.mkdirs() ) {
http://git-wip-us.apache.org/repos/asf/incubator-knox/blob/6aaa7021/gateway-server/src/main/java/org/apache/hadoop/gateway/services/security/impl/DefaultMasterService.java
----------------------------------------------------------------------
diff --git a/gateway-server/src/main/java/org/apache/hadoop/gateway/services/security/impl/DefaultMasterService.java b/gateway-server/src/main/java/org/apache/hadoop/gateway/services/security/impl/DefaultMasterService.java
index 5d2b37f..87067bc 100644
--- a/gateway-server/src/main/java/org/apache/hadoop/gateway/services/security/impl/DefaultMasterService.java
+++ b/gateway-server/src/main/java/org/apache/hadoop/gateway/services/security/impl/DefaultMasterService.java
@@ -42,7 +42,7 @@ public class DefaultMasterService extends CMFMasterService implements MasterServ
}
else {
boolean persisting = options.get( "persist-master").equals("true");
- String securityDir = config.getGatewayHomeDir() + File.separator + "conf" + File.separator + "security";
+ String securityDir = config.getGatewaySecurityDir();
String filename = "master";
setupMasterSecret(securityDir, filename, persisting);
}
http://git-wip-us.apache.org/repos/asf/incubator-knox/blob/6aaa7021/gateway-server/src/main/java/org/apache/hadoop/gateway/services/security/impl/JettySSLService.java
----------------------------------------------------------------------
diff --git a/gateway-server/src/main/java/org/apache/hadoop/gateway/services/security/impl/JettySSLService.java b/gateway-server/src/main/java/org/apache/hadoop/gateway/services/security/impl/JettySSLService.java
index 30aac50..757ac48 100644
--- a/gateway-server/src/main/java/org/apache/hadoop/gateway/services/security/impl/JettySSLService.java
+++ b/gateway-server/src/main/java/org/apache/hadoop/gateway/services/security/impl/JettySSLService.java
@@ -125,12 +125,12 @@ public class JettySSLService implements SSLService {
}
}
- public Object buildSSlConnector(String gatewayHomeDir) {
+ public Object buildSSlConnector( String keystoreFileName ) {
SslContextFactory sslContextFactory = new SslContextFactory( true );
sslContextFactory.setCertAlias( "gateway-identity" );
- String keystorePath = gatewayHomeDir + File.separatorChar + "conf" + File.separatorChar + "security" + File.separatorChar + "keystores" + File.separatorChar + "gateway.jks";
+// String keystorePath = gatewayHomeDir + File.separatorChar + "conf" + File.separatorChar + "security" + File.separatorChar + "keystores" + File.separatorChar + "gateway.jks";
sslContextFactory.setKeyStoreType("JKS");
- sslContextFactory.setKeyStorePath(keystorePath);
+ sslContextFactory.setKeyStorePath(keystoreFileName);
char[] master = ms.getMasterSecret();
sslContextFactory.setKeyStorePassword(new String(master));
char[] keypass = as.getPasswordFromAliasForCluster(GATEWAY_CREDENTIAL_STORE_NAME, GATEWAY_IDENTITY_PASSPHRASE);
http://git-wip-us.apache.org/repos/asf/incubator-knox/blob/6aaa7021/gateway-spi/src/main/java/org/apache/hadoop/gateway/config/GatewayConfig.java
----------------------------------------------------------------------
diff --git a/gateway-spi/src/main/java/org/apache/hadoop/gateway/config/GatewayConfig.java b/gateway-spi/src/main/java/org/apache/hadoop/gateway/config/GatewayConfig.java
index 9a621bc..f4f43e8 100644
--- a/gateway-spi/src/main/java/org/apache/hadoop/gateway/config/GatewayConfig.java
+++ b/gateway-spi/src/main/java/org/apache/hadoop/gateway/config/GatewayConfig.java
@@ -22,15 +22,34 @@ import java.net.UnknownHostException;
public interface GatewayConfig {
+ // Used as the basis for any home directory that is not specified.
static final String GATEWAY_HOME_VAR = "GATEWAY_HOME";
-
+
+ // Variable name for the location of configuration files edited by users
+ static final String GATEWAY_CONF_HOME_VAR = "GATEWAY_CONF_HOME";
+
+ // Variable name for the location of data files generated by the gateway at runtime.
+ static final String GATEWAY_DATA_HOME_VAR = "GATEWAY_DATA_HOME";
+
public static final String HADOOP_KERBEROS_SECURED = "gateway.hadoop.kerberos.secured";
public static final String KRB5_CONFIG = "java.security.krb5.conf";
public static final String KRB5_DEBUG = "sun.security.krb5.debug";
public static final String KRB5_LOGIN_CONFIG = "java.security.auth.login.config";
public static final String KRB5_USE_SUBJECT_CREDS_ONLY = "javax.security.auth.useSubjectCredsOnly";
- String getGatewayHomeDir();
+ /**
+ * The location of the gateway configuration.
+ * Subdirectories will be: topologies
+ * @return The location of the gateway configuration.
+ */
+ String getGatewayConfDir();
+
+ /**
+ * The location of the gateway runtime generated data.
+ * Subdirectories will be security, deployments
+ * @return The location of the gateway runtime generated data.
+ */
+ String getGatewayDataDir();
String getHadoopConfDir();
@@ -40,7 +59,11 @@ public interface GatewayConfig {
String getGatewayPath();
- String getDeploymentDir();
+ String getGatewayTopologyDir();
+
+ String getGatewaySecurityDir();
+
+ String getGatewayDeploymentDir();
InetSocketAddress getGatewayAddress() throws UnknownHostException;
http://git-wip-us.apache.org/repos/asf/incubator-knox/blob/6aaa7021/gateway-test/src/test/java/org/apache/hadoop/gateway/GatewayFuncTestDriver.java
----------------------------------------------------------------------
diff --git a/gateway-test/src/test/java/org/apache/hadoop/gateway/GatewayFuncTestDriver.java b/gateway-test/src/test/java/org/apache/hadoop/gateway/GatewayFuncTestDriver.java
index e043916..2b6e257 100644
--- a/gateway-test/src/test/java/org/apache/hadoop/gateway/GatewayFuncTestDriver.java
+++ b/gateway-test/src/test/java/org/apache/hadoop/gateway/GatewayFuncTestDriver.java
@@ -127,16 +127,16 @@ public class GatewayFuncTestDriver {
*/
public void setupGateway( GatewayTestConfig config, String cluster, XMLTag topology, boolean use ) throws IOException {
this.useGateway = use;
+ this.config = config;
File targetDir = new File( System.getProperty( "user.dir" ), "target" );
File gatewayDir = new File( targetDir, "gateway-home-" + UUID.randomUUID() );
gatewayDir.mkdirs();
- File deployDir = new File( gatewayDir, config.getDeploymentDir() );
- deployDir.mkdirs();
- this.config = config;
config.setGatewayHomeDir( gatewayDir.getAbsolutePath() );
- config.setDeploymentDir( "clusters" );
+
+ File deployDir = new File( config.getGatewayDeploymentDir() );
+ deployDir.mkdirs();
File descriptor = new File( deployDir, cluster + ".xml" );
FileOutputStream stream = new FileOutputStream( descriptor );
@@ -160,7 +160,11 @@ public class GatewayFuncTestDriver {
public void cleanup() throws Exception {
gateway.stop();
- FileUtils.deleteQuietly( new File( config.getGatewayHomeDir() ) );
+ FileUtils.deleteQuietly( new File( config.getGatewayTopologyDir() ) );
+ FileUtils.deleteQuietly( new File( config.getGatewayConfDir() ) );
+ FileUtils.deleteQuietly( new File( config.getGatewaySecurityDir() ) );
+ FileUtils.deleteQuietly( new File( config.getGatewayDeploymentDir() ) );
+ FileUtils.deleteQuietly( new File( config.getGatewayDataDir() ) );
for( Service service : services.values() ) {
service.server.stop();
http://git-wip-us.apache.org/repos/asf/incubator-knox/blob/6aaa7021/gateway-test/src/test/java/org/apache/hadoop/gateway/GatewayLdapDynamicGroupFuncTest.java
----------------------------------------------------------------------
diff --git a/gateway-test/src/test/java/org/apache/hadoop/gateway/GatewayLdapDynamicGroupFuncTest.java b/gateway-test/src/test/java/org/apache/hadoop/gateway/GatewayLdapDynamicGroupFuncTest.java
index 54a7901..e64bc22 100755
--- a/gateway-test/src/test/java/org/apache/hadoop/gateway/GatewayLdapDynamicGroupFuncTest.java
+++ b/gateway-test/src/test/java/org/apache/hadoop/gateway/GatewayLdapDynamicGroupFuncTest.java
@@ -105,9 +105,8 @@ public class GatewayLdapDynamicGroupFuncTest {
GatewayTestConfig testConfig = new GatewayTestConfig();
config = testConfig;
testConfig.setGatewayHomeDir( gatewayDir.getAbsolutePath() );
- testConfig.setDeploymentDir( "clusters" );
- File deployDir = new File( gatewayDir, testConfig.getDeploymentDir() );
+ File deployDir = new File( testConfig.getGatewayDeploymentDir() );
deployDir.mkdirs();
File descriptor = new File( deployDir, "test-cluster.xml" );
http://git-wip-us.apache.org/repos/asf/incubator-knox/blob/6aaa7021/gateway-test/src/test/java/org/apache/hadoop/gateway/GatewayLdapGroupFuncTest.java
----------------------------------------------------------------------
diff --git a/gateway-test/src/test/java/org/apache/hadoop/gateway/GatewayLdapGroupFuncTest.java b/gateway-test/src/test/java/org/apache/hadoop/gateway/GatewayLdapGroupFuncTest.java
index 008914e..e656314 100644
--- a/gateway-test/src/test/java/org/apache/hadoop/gateway/GatewayLdapGroupFuncTest.java
+++ b/gateway-test/src/test/java/org/apache/hadoop/gateway/GatewayLdapGroupFuncTest.java
@@ -105,9 +105,8 @@ public class GatewayLdapGroupFuncTest {
GatewayTestConfig testConfig = new GatewayTestConfig();
config = testConfig;
testConfig.setGatewayHomeDir( gatewayDir.getAbsolutePath() );
- testConfig.setDeploymentDir( "clusters" );
- File deployDir = new File( gatewayDir, testConfig.getDeploymentDir() );
+ File deployDir = new File( testConfig.getGatewayDeploymentDir() );
deployDir.mkdirs();
File descriptor = new File( deployDir, "test-cluster.xml" );
http://git-wip-us.apache.org/repos/asf/incubator-knox/blob/6aaa7021/gateway-test/src/test/java/org/apache/hadoop/gateway/GatewayLocalServiceFuncTest.java
----------------------------------------------------------------------
diff --git a/gateway-test/src/test/java/org/apache/hadoop/gateway/GatewayLocalServiceFuncTest.java b/gateway-test/src/test/java/org/apache/hadoop/gateway/GatewayLocalServiceFuncTest.java
index 091bfe5..0603286 100644
--- a/gateway-test/src/test/java/org/apache/hadoop/gateway/GatewayLocalServiceFuncTest.java
+++ b/gateway-test/src/test/java/org/apache/hadoop/gateway/GatewayLocalServiceFuncTest.java
@@ -76,7 +76,8 @@ public class GatewayLocalServiceFuncTest {
public static void cleanupSuite() throws Exception {
gateway.stop();
ldap.stop( true );
- FileUtils.deleteQuietly( new File( config.getGatewayHomeDir() ) );
+ FileUtils.deleteQuietly( new File( config.getGatewayConfDir() ) );
+ FileUtils.deleteQuietly( new File( config.getGatewayDataDir() ) );
NoOpAppender.tearDown( appenders );
}
@@ -98,9 +99,8 @@ public class GatewayLocalServiceFuncTest {
GatewayTestConfig testConfig = new GatewayTestConfig();
config = testConfig;
testConfig.setGatewayHomeDir( gatewayDir.getAbsolutePath() );
- testConfig.setDeploymentDir( "clusters" );
- File deployDir = new File( gatewayDir, testConfig.getDeploymentDir() );
+ File deployDir = new File( config.getGatewayDeploymentDir() );
deployDir.mkdirs();
File descriptor = new File( deployDir, "cluster.xml" );
http://git-wip-us.apache.org/repos/asf/incubator-knox/blob/6aaa7021/gateway-test/src/test/java/org/apache/hadoop/gateway/GatewaySampleFuncTest.java
----------------------------------------------------------------------
diff --git a/gateway-test/src/test/java/org/apache/hadoop/gateway/GatewaySampleFuncTest.java b/gateway-test/src/test/java/org/apache/hadoop/gateway/GatewaySampleFuncTest.java
index 6f009b1..d3d962a 100644
--- a/gateway-test/src/test/java/org/apache/hadoop/gateway/GatewaySampleFuncTest.java
+++ b/gateway-test/src/test/java/org/apache/hadoop/gateway/GatewaySampleFuncTest.java
@@ -97,9 +97,8 @@ public class GatewaySampleFuncTest {
GatewayTestConfig testConfig = new GatewayTestConfig();
config = testConfig;
testConfig.setGatewayHomeDir( gatewayDir.getAbsolutePath() );
- testConfig.setDeploymentDir( "clusters" );
- File deployDir = new File( gatewayDir, testConfig.getDeploymentDir() );
+ File deployDir = new File( testConfig.getGatewayDeploymentDir() );
deployDir.mkdirs();
File descriptor = new File( deployDir, "test-cluster.xml" );
http://git-wip-us.apache.org/repos/asf/incubator-knox/blob/6aaa7021/gateway-test/src/test/java/org/apache/hadoop/gateway/GatewayTestConfig.java
----------------------------------------------------------------------
diff --git a/gateway-test/src/test/java/org/apache/hadoop/gateway/GatewayTestConfig.java b/gateway-test/src/test/java/org/apache/hadoop/gateway/GatewayTestConfig.java
index 09b2f82..90453e7 100644
--- a/gateway-test/src/test/java/org/apache/hadoop/gateway/GatewayTestConfig.java
+++ b/gateway-test/src/test/java/org/apache/hadoop/gateway/GatewayTestConfig.java
@@ -24,52 +24,81 @@ import java.net.UnknownHostException;
public class GatewayTestConfig implements GatewayConfig {
- private String gatewayHomeDir = "gateway";
+ private String gatewayHomeDir = "gateway-home";
private String hadoopConfDir = "hadoop";
private String gatewayHost = "localhost";
private int gatewayPort = 0;
private String gatewayPath = "gateway";
- private String deployDir = "clusters";
+// private String deployDir = "clusters";
private boolean hadoopKerberosSecured = false;
private String kerberosConfig = "/etc/knox/conf/krb5.conf";
private boolean kerberosDebugEnabled = false;
private String kerberosLoginConfig = "/etc/knox/conf/krb5JAASLogin.conf";
+// @Override
+// public String getGatewayHomeDir() {
+// return gatewayHomeDir;
+// }
+
+ public void setGatewayHomeDir( String gatewayHomeDir ) {
+ this.gatewayHomeDir = gatewayHomeDir;
+ }
+
@Override
- public String getGatewayHomeDir() {
+ public String getGatewayConfDir() {
return gatewayHomeDir;
}
- public void setGatewayHomeDir( String gatewayHomeDir ) {
- this.gatewayHomeDir = gatewayHomeDir;
+ @Override
+ public String getGatewayDataDir() {
+ return gatewayHomeDir;
+ }
+
+ @Override
+ public String getGatewaySecurityDir() {
+ return gatewayHomeDir + "/security";
}
@Override
+ public String getGatewayTopologyDir() {
+ return gatewayHomeDir + "/clusters";
+ }
+
+ @Override
+ public String getGatewayDeploymentDir() {
+ return gatewayHomeDir + "/clusters";
+ }
+
+// public void setDeploymentDir( String clusterConfDir ) {
+// this.deployDir = clusterConfDir;
+// }
+
+ @Override
public String getHadoopConfDir() {
return hadoopConfDir;
}
- public void setHadoopConfDir( String hadoopConfDir ) {
- this.hadoopConfDir = hadoopConfDir;
- }
+// public void setHadoopConfDir( String hadoopConfDir ) {
+// this.hadoopConfDir = hadoopConfDir;
+// }
@Override
public String getGatewayHost() {
return gatewayHost;
}
- public void setGatewayHost( String gatewayHost ) {
- this.gatewayHost = gatewayHost;
- }
+// public void setGatewayHost( String gatewayHost ) {
+// this.gatewayHost = gatewayHost;
+// }
@Override
public int getGatewayPort() {
return gatewayPort;
}
- public void setGatewayPort( int gatewayPort ) {
- this.gatewayPort = gatewayPort;
- }
+// public void setGatewayPort( int gatewayPort ) {
+// this.gatewayPort = gatewayPort;
+// }
@Override
public String getGatewayPath() {
@@ -81,15 +110,6 @@ public class GatewayTestConfig implements GatewayConfig {
}
@Override
- public String getDeploymentDir() {
- return deployDir;
- }
-
- public void setDeploymentDir( String clusterConfDir ) {
- this.deployDir = clusterConfDir;
- }
-
- @Override
public InetSocketAddress getGatewayAddress() throws UnknownHostException {
return new InetSocketAddress( getGatewayHost(), getGatewayPort() );
}
@@ -105,35 +125,35 @@ public class GatewayTestConfig implements GatewayConfig {
return hadoopKerberosSecured;
}
- public void setHadoopKerberosSecured(boolean hadoopKerberosSecured) {
- this.hadoopKerberosSecured = hadoopKerberosSecured;
- }
+// public void setHadoopKerberosSecured(boolean hadoopKerberosSecured) {
+// this.hadoopKerberosSecured = hadoopKerberosSecured;
+// }
@Override
public String getKerberosConfig() {
return kerberosConfig;
}
- public void setKerberosConfig(String kerberosConfig) {
- this.kerberosConfig = kerberosConfig;
- }
+// public void setKerberosConfig(String kerberosConfig) {
+// this.kerberosConfig = kerberosConfig;
+// }
@Override
public boolean isKerberosDebugEnabled() {
return kerberosDebugEnabled;
}
- public void setKerberosDebugEnabled(boolean kerberosConfigEnabled) {
- this.kerberosDebugEnabled = kerberosDebugEnabled;
- }
+// public void setKerberosDebugEnabled(boolean kerberosConfigEnabled) {
+// this.kerberosDebugEnabled = kerberosDebugEnabled;
+// }
@Override
public String getKerberosLoginConfig() {
return kerberosLoginConfig;
}
- public void setKerberosLoginConfig(String kerberosLoginConfig) {
- this.kerberosLoginConfig = kerberosLoginConfig;
- }
+// public void setKerberosLoginConfig(String kerberosLoginConfig) {
+// this.kerberosLoginConfig = kerberosLoginConfig;
+// }
}
http://git-wip-us.apache.org/repos/asf/incubator-knox/blob/6aaa7021/gateway-test/src/test/java/org/apache/hadoop/gateway/deploy/DeploymentFactoryFuncTest.java
----------------------------------------------------------------------
diff --git a/gateway-test/src/test/java/org/apache/hadoop/gateway/deploy/DeploymentFactoryFuncTest.java b/gateway-test/src/test/java/org/apache/hadoop/gateway/deploy/DeploymentFactoryFuncTest.java
index f45d9f6..56862db 100644
--- a/gateway-test/src/test/java/org/apache/hadoop/gateway/deploy/DeploymentFactoryFuncTest.java
+++ b/gateway-test/src/test/java/org/apache/hadoop/gateway/deploy/DeploymentFactoryFuncTest.java
@@ -65,11 +65,13 @@ public class DeploymentFactoryFuncTest {
File targetDir = new File( System.getProperty( "user.dir" ), "target" );
File gatewayDir = new File( targetDir, "gateway-home-" + UUID.randomUUID() );
gatewayDir.mkdirs();
- File deployDir = new File( gatewayDir, "clusters" );
- deployDir.mkdirs();
((GatewayTestConfig) config).setGatewayHomeDir( gatewayDir.getAbsolutePath() );
- ((GatewayTestConfig) config).setDeploymentDir( "clusters" );
+
+ File deployDir = new File( config.getGatewayDeploymentDir() );
+ deployDir.mkdirs();
+
+// ((GatewayTestConfig) config).setDeploymentDir( "clusters" );
DefaultGatewayServices srvcs = new DefaultGatewayServices();
Map<String,String> options = new HashMap<String,String>();
@@ -121,11 +123,9 @@ public class DeploymentFactoryFuncTest {
File targetDir = new File( System.getProperty( "user.dir" ), "target" );
File gatewayDir = new File( targetDir, "gateway-home-" + UUID.randomUUID() );
gatewayDir.mkdirs();
- File deployDir = new File( gatewayDir, "clusters" );
- deployDir.mkdirs();
-
((GatewayTestConfig) config).setGatewayHomeDir( gatewayDir.getAbsolutePath() );
- ((GatewayTestConfig) config).setDeploymentDir( "clusters" );
+ File deployDir = new File( config.getGatewayDeploymentDir() );
+ deployDir.mkdirs();
DefaultGatewayServices srvcs = new DefaultGatewayServices();
Map<String,String> options = new HashMap<String,String>();
@@ -177,13 +177,10 @@ public class DeploymentFactoryFuncTest {
File targetDir = new File( System.getProperty( "user.dir" ), "target" );
File gatewayDir = new File( targetDir, "gateway-home-" + UUID.randomUUID() );
gatewayDir.mkdirs();
-// File deployDir = new File( gatewayDir, config.getDeploymentDir() );
- File deployDir = new File( gatewayDir, "clusters" );
+ ((GatewayTestConfig) config).setGatewayHomeDir( gatewayDir.getAbsolutePath() );
+ File deployDir = new File( config.getGatewayDeploymentDir() );
deployDir.mkdirs();
- ((GatewayTestConfig) config).setGatewayHomeDir( gatewayDir.getAbsolutePath() );
- ((GatewayTestConfig) config).setDeploymentDir( "clusters" );
-
DefaultGatewayServices srvcs = new DefaultGatewayServices();
Map<String,String> options = new HashMap<String,String>();
options.put("persist-master", "false");
http://git-wip-us.apache.org/repos/asf/incubator-knox/blob/6aaa7021/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 6012ac6..a21cdc5 100644
--- a/pom.xml
+++ b/pom.xml
@@ -916,12 +916,12 @@
<dependency>
<groupId>com.jayway.jsonpath</groupId>
<artifactId>json-path</artifactId>
- <version>0.8.1</version>
+ <version>0.9.1</version>
</dependency>
<dependency>
<groupId>com.jayway.jsonpath</groupId>
<artifactId>json-path-assert</artifactId>
- <version>0.8.1</version>
+ <version>0.9.1</version>
<scope>test</scope>
</dependency>