atlas-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From shweth...@apache.org
Subject [1/2] incubator-atlas git commit: ATLAS-1226 Servlet init-params in web.xml are unused (mneethiraj via shwethags)
Date Mon, 17 Oct 2016 07:53:41 GMT
Repository: incubator-atlas
Updated Branches:
  refs/heads/master 5b7945eeb -> 51d24ae3b


ATLAS-1226 Servlet init-params in web.xml are unused (mneethiraj via shwethags)


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

Branch: refs/heads/master
Commit: a2eca47e3b0cb7deb25e0d182582d9ad906a83b8
Parents: 5b7945e
Author: Shwetha GS <sshivalingamurthy@hortonworks.com>
Authored: Mon Oct 17 12:16:24 2016 +0530
Committer: Shwetha GS <sshivalingamurthy@hortonworks.com>
Committed: Mon Oct 17 12:16:24 2016 +0530

----------------------------------------------------------------------
 pom.xml                                         |  5 ++---
 release-log.txt                                 |  1 +
 .../atlas/web/listeners/GuiceServletConfig.java | 22 +++++++++++++++-----
 3 files changed, 20 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/a2eca47e/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 811d9b9..b60e0c8 100644
--- a/pom.xml
+++ b/pom.xml
@@ -404,7 +404,6 @@
         <slf4j.version>1.7.7</slf4j.version>
         <jetty.version>9.2.12.v20150709</jetty.version>
         <jersey.version>1.19</jersey.version>
-        <jackson.version>1.8.3</jackson.version>
         <tinkerpop.version>2.6.0</tinkerpop.version>
         <titan.version>0.5.4</titan.version>
         <hadoop.version>2.7.1</hadoop.version>
@@ -852,13 +851,13 @@
             <dependency>
                 <groupId>org.codehaus.jackson</groupId>
                 <artifactId>jackson-core-asl</artifactId>
-                <version>${jackson.version}</version>
+                <version>${codehaus.jackson.version}</version>
             </dependency>
 
             <dependency>
                 <groupId>org.codehaus.jackson</groupId>
                 <artifactId>jackson-mapper-asl</artifactId>
-                <version>${jackson.version}</version>
+                <version>${codehaus.jackson.version}</version>
             </dependency>
 
             <dependency>

http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/a2eca47e/release-log.txt
----------------------------------------------------------------------
diff --git a/release-log.txt b/release-log.txt
index d11a361..32db576 100644
--- a/release-log.txt
+++ b/release-log.txt
@@ -9,6 +9,7 @@ ATLAS-1060 Add composite indexes for exact match performance improvements
for al
 ATLAS-1127 Modify creation and modification timestamps to Date instead of Long(sumasai)
 
 ALL CHANGES:
+ATLAS-1226 Servlet init-params in web.xml are unused (mneethiraj via shwethags)
 ATLAS-1224 Minor fixes for hive and falcon bridge twiki (ayubkhan via sumasai) 
 ATLAS-1223 Type REST API v2 implementation (apoorvnaik via sumasai)
 ATLAS-1210 patch file to add "position" attribute to hive_column type (sarath.kum4r@gmail.com
via sumasai)

http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/a2eca47e/webapp/src/main/java/org/apache/atlas/web/listeners/GuiceServletConfig.java
----------------------------------------------------------------------
diff --git a/webapp/src/main/java/org/apache/atlas/web/listeners/GuiceServletConfig.java b/webapp/src/main/java/org/apache/atlas/web/listeners/GuiceServletConfig.java
index 7a8a4f0..0c2e0ec 100755
--- a/webapp/src/main/java/org/apache/atlas/web/listeners/GuiceServletConfig.java
+++ b/webapp/src/main/java/org/apache/atlas/web/listeners/GuiceServletConfig.java
@@ -18,6 +18,7 @@
 
 package org.apache.atlas.web.listeners;
 
+import java.util.Enumeration;
 import java.util.HashMap;
 import java.util.Map;
 
@@ -36,6 +37,7 @@ import org.apache.atlas.web.filters.ActiveServerFilter;
 import org.apache.atlas.web.filters.AuditFilter;
 import org.apache.atlas.web.service.ActiveInstanceElectorModule;
 import org.apache.atlas.web.service.ServiceModule;
+import org.apache.commons.collections.iterators.EnumerationIterator;
 import org.apache.commons.configuration.Configuration;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -93,13 +95,23 @@ public class GuiceServletConfig extends GuiceServletContextListener {
                             filter("/*").through(AuditFilter.class);
                             configureActiveServerFilterIfNecessary();
 
-                            String packages = getServletContext().getInitParameter(GUICE_CTX_PARAM);
+                            Map<String, String> initParams     = new HashMap<>();
+                            Enumeration<String> initParamNames = getServletContext().getInitParameterNames();
 
-                            LOG.info("Jersey loading from packages: " + packages);
+                            while (initParamNames.hasMoreElements()) {
+                                String initParamName  = initParamNames.nextElement();
+                                String initParamValue = getServletContext().getInitParameter(initParamName);
 
-                            Map<String, String> params = new HashMap<>();
-                            params.put(PackagesResourceConfig.PROPERTY_PACKAGES, packages);
-                            serve("/" + AtlasClient.BASE_URI + "*").with(GuiceContainer.class,
params);
+                                if (GUICE_CTX_PARAM.equals(initParamName)) {
+                                    LOG.info("Jersey loading from packages: " + initParamValue);
+
+                                    initParams.put(PackagesResourceConfig.PROPERTY_PACKAGES,
initParamValue);
+                                } else {
+                                    initParams.put(initParamName, initParamValue);
+                                }
+                            }
+
+                            serve("/" + AtlasClient.BASE_URI + "*").with(GuiceContainer.class,
initParams);
                         }
 
                         private void configureActiveServerFilterIfNecessary() {


Mime
View raw message