You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@knox.apache.org by lm...@apache.org on 2015/01/27 14:58:52 UTC

[1/2] knox git commit: Revert "KNOX-485 - make the data/deployments directory configurable (Andreina J via lmccay)"

Repository: knox
Updated Branches:
  refs/heads/master 8c3913359 -> c1b9a27bf
  refs/heads/v0.5.1 0b45978ef -> bbffb6612


Revert "KNOX-485 - make the data/deployments directory configurable (Andreina J via lmccay)"

This reverts commit 0b45978ef5e5c1318e4de9e1308cecc894e3f97d.


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

Branch: refs/heads/v0.5.1
Commit: bbffb6612b4f68fce3ca4adc0033024fc967fe81
Parents: 0b45978
Author: Larry McCay <lm...@hortonworks.com>
Authored: Tue Jan 27 08:46:59 2015 -0500
Committer: Larry McCay <lm...@hortonworks.com>
Committed: Tue Jan 27 08:46:59 2015 -0500

----------------------------------------------------------------------
 .../gateway/config/impl/GatewayConfigImpl.java    |  2 +-
 .../hadoop/gateway/GatewayGlobalConfigTest.java   | 18 ------------------
 .../resources/conf-demo/conf/gateway-default.xml  |  5 -----
 .../resources/conf-demo/conf/gateway-site.xml     |  5 -----
 4 files changed, 1 insertion(+), 29 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/knox/blob/bbffb661/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 bd4284e..35739b1 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
@@ -274,7 +274,7 @@ public class GatewayConfigImpl extends Configuration implements GatewayConfig {
 
   @Override
   public String getGatewayDeploymentDir() {
-    return get(DEPLOYMENT_DIR, getGatewayDataDir() + File.separator + DEFAULT_DEPLOYMENT_DIR);
+    return getGatewayDataDir() + File.separator + "deployments";
   }
 
   @Override

http://git-wip-us.apache.org/repos/asf/knox/blob/bbffb661/gateway-server/src/test/java/org/apache/hadoop/gateway/GatewayGlobalConfigTest.java
----------------------------------------------------------------------
diff --git a/gateway-server/src/test/java/org/apache/hadoop/gateway/GatewayGlobalConfigTest.java b/gateway-server/src/test/java/org/apache/hadoop/gateway/GatewayGlobalConfigTest.java
index 4534165..279198c 100644
--- a/gateway-server/src/test/java/org/apache/hadoop/gateway/GatewayGlobalConfigTest.java
+++ b/gateway-server/src/test/java/org/apache/hadoop/gateway/GatewayGlobalConfigTest.java
@@ -84,22 +84,4 @@ public class GatewayGlobalConfigTest {
     GatewayConfig config = new GatewayConfigImpl();
     assertThat( config.getDefaultAppRedirectPath(), is( "/gateway/sandbox" ) );
   }
-
-  @Test
-  public void testForUpdatedDeploymentDir() {
-    String homeDirName = getHomeDirName("conf-demo/conf/gateway-site.xml");
-    System.setProperty(GatewayConfigImpl.GATEWAY_HOME_VAR, homeDirName);
-    System.setProperty(GatewayConfigImpl.GATEWAY_DATA_HOME_VAR, homeDirName);
-    GatewayConfig config = new GatewayConfigImpl();
-    assertTrue(("/test").equalsIgnoreCase(config.getGatewayDeploymentDir()));
-  }
-
-  @Test
-  public void testDefaultDeploymentDir() {
-    String homeDirName = getHomeDirName("conf-site/conf/gateway-site.xml");
-    System.setProperty(GatewayConfigImpl.GATEWAY_HOME_VAR, homeDirName);
-    System.setProperty(GatewayConfigImpl.GATEWAY_DATA_HOME_VAR, homeDirName);
-    GatewayConfig config = new GatewayConfigImpl();
-    assertThat(config.getGatewayDeploymentDir(), is(homeDirName + File.separator + "deployments"));
-  }
 }

http://git-wip-us.apache.org/repos/asf/knox/blob/bbffb661/gateway-server/src/test/resources/conf-demo/conf/gateway-default.xml
----------------------------------------------------------------------
diff --git a/gateway-server/src/test/resources/conf-demo/conf/gateway-default.xml b/gateway-server/src/test/resources/conf-demo/conf/gateway-default.xml
index 0adf47f..80a4c96 100644
--- a/gateway-server/src/test/resources/conf-demo/conf/gateway-default.xml
+++ b/gateway-server/src/test/resources/conf-demo/conf/gateway-default.xml
@@ -48,9 +48,4 @@ limitations under the License.
         <value>SSLv3</value>
         <description>Excluded SSL protocols.</description>
     </property>
-    <property>
-        <name>gateway.deployment.dir</name>
-        <value>/test</value>
-        <description>The path that contains deployments.</description>
-    </property>
 </configuration>

http://git-wip-us.apache.org/repos/asf/knox/blob/bbffb661/gateway-server/src/test/resources/conf-demo/conf/gateway-site.xml
----------------------------------------------------------------------
diff --git a/gateway-server/src/test/resources/conf-demo/conf/gateway-site.xml b/gateway-server/src/test/resources/conf-demo/conf/gateway-site.xml
index 0635bde..518e737 100644
--- a/gateway-server/src/test/resources/conf-demo/conf/gateway-site.xml
+++ b/gateway-server/src/test/resources/conf-demo/conf/gateway-site.xml
@@ -54,10 +54,5 @@ limitations under the License.
         <value>shiro.ini</value>
         <description>The location of the Shiro configuration file.</description>
     </property>
-    <property>
-        <name>gateway.deployment.dir</name>
-        <value>/test</value>
-        <description>The path that contains deployments.</description>
-    </property>
 
 </configuration>


[2/2] knox git commit: KNOX-485 - make the data/deployments directory configurable (Andreina J via lmccay)

Posted by lm...@apache.org.
KNOX-485 - make the data/deployments directory configurable (Andreina J via lmccay)

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

Branch: refs/heads/master
Commit: c1b9a27bf8061074a2635f7f90ef73504faf8f91
Parents: 8c39133
Author: Larry McCay <lm...@hortonworks.com>
Authored: Tue Jan 27 08:58:45 2015 -0500
Committer: Larry McCay <lm...@hortonworks.com>
Committed: Tue Jan 27 08:58:45 2015 -0500

----------------------------------------------------------------------
 .../gateway/config/impl/GatewayConfigImpl.java    |  2 +-
 .../hadoop/gateway/GatewayGlobalConfigTest.java   | 18 ++++++++++++++++++
 .../resources/conf-demo/conf/gateway-default.xml  |  5 +++++
 .../resources/conf-demo/conf/gateway-site.xml     |  5 +++++
 4 files changed, 29 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/knox/blob/c1b9a27b/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 d4819c1..87691b9 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
@@ -275,7 +275,7 @@ public class GatewayConfigImpl extends Configuration implements GatewayConfig {
 
   @Override
   public String getGatewayDeploymentDir() {
-    return getGatewayDataDir() + File.separator + "deployments";
+    return get(DEPLOYMENT_DIR, getGatewayDataDir() + File.separator + DEFAULT_DEPLOYMENT_DIR);
   }
 
   @Override

http://git-wip-us.apache.org/repos/asf/knox/blob/c1b9a27b/gateway-server/src/test/java/org/apache/hadoop/gateway/GatewayGlobalConfigTest.java
----------------------------------------------------------------------
diff --git a/gateway-server/src/test/java/org/apache/hadoop/gateway/GatewayGlobalConfigTest.java b/gateway-server/src/test/java/org/apache/hadoop/gateway/GatewayGlobalConfigTest.java
index 279198c..4534165 100644
--- a/gateway-server/src/test/java/org/apache/hadoop/gateway/GatewayGlobalConfigTest.java
+++ b/gateway-server/src/test/java/org/apache/hadoop/gateway/GatewayGlobalConfigTest.java
@@ -84,4 +84,22 @@ public class GatewayGlobalConfigTest {
     GatewayConfig config = new GatewayConfigImpl();
     assertThat( config.getDefaultAppRedirectPath(), is( "/gateway/sandbox" ) );
   }
+
+  @Test
+  public void testForUpdatedDeploymentDir() {
+    String homeDirName = getHomeDirName("conf-demo/conf/gateway-site.xml");
+    System.setProperty(GatewayConfigImpl.GATEWAY_HOME_VAR, homeDirName);
+    System.setProperty(GatewayConfigImpl.GATEWAY_DATA_HOME_VAR, homeDirName);
+    GatewayConfig config = new GatewayConfigImpl();
+    assertTrue(("/test").equalsIgnoreCase(config.getGatewayDeploymentDir()));
+  }
+
+  @Test
+  public void testDefaultDeploymentDir() {
+    String homeDirName = getHomeDirName("conf-site/conf/gateway-site.xml");
+    System.setProperty(GatewayConfigImpl.GATEWAY_HOME_VAR, homeDirName);
+    System.setProperty(GatewayConfigImpl.GATEWAY_DATA_HOME_VAR, homeDirName);
+    GatewayConfig config = new GatewayConfigImpl();
+    assertThat(config.getGatewayDeploymentDir(), is(homeDirName + File.separator + "deployments"));
+  }
 }

http://git-wip-us.apache.org/repos/asf/knox/blob/c1b9a27b/gateway-server/src/test/resources/conf-demo/conf/gateway-default.xml
----------------------------------------------------------------------
diff --git a/gateway-server/src/test/resources/conf-demo/conf/gateway-default.xml b/gateway-server/src/test/resources/conf-demo/conf/gateway-default.xml
index 80a4c96..0adf47f 100644
--- a/gateway-server/src/test/resources/conf-demo/conf/gateway-default.xml
+++ b/gateway-server/src/test/resources/conf-demo/conf/gateway-default.xml
@@ -48,4 +48,9 @@ limitations under the License.
         <value>SSLv3</value>
         <description>Excluded SSL protocols.</description>
     </property>
+    <property>
+        <name>gateway.deployment.dir</name>
+        <value>/test</value>
+        <description>The path that contains deployments.</description>
+    </property>
 </configuration>

http://git-wip-us.apache.org/repos/asf/knox/blob/c1b9a27b/gateway-server/src/test/resources/conf-demo/conf/gateway-site.xml
----------------------------------------------------------------------
diff --git a/gateway-server/src/test/resources/conf-demo/conf/gateway-site.xml b/gateway-server/src/test/resources/conf-demo/conf/gateway-site.xml
index 518e737..0635bde 100644
--- a/gateway-server/src/test/resources/conf-demo/conf/gateway-site.xml
+++ b/gateway-server/src/test/resources/conf-demo/conf/gateway-site.xml
@@ -54,5 +54,10 @@ limitations under the License.
         <value>shiro.ini</value>
         <description>The location of the Shiro configuration file.</description>
     </property>
+    <property>
+        <name>gateway.deployment.dir</name>
+        <value>/test</value>
+        <description>The path that contains deployments.</description>
+    </property>
 
 </configuration>