hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject svn commit: r833553 - in /hadoop/common/trunk: ./ src/java/org/apache/hadoop/http/ src/test/core/org/apache/hadoop/http/
Date Fri, 06 Nov 2009 20:54:41 GMT
Author: ddas
Date: Fri Nov  6 20:54:40 2009
New Revision: 833553

URL: http://svn.apache.org/viewvc?rev=833553&view=rev
Log:
HADOOP-6337. Updates FilterInitializer class to be more visible, and the init of the class
is made to take a Configuration argument. Contributed by Jakob Homan.

Modified:
    hadoop/common/trunk/CHANGES.txt
    hadoop/common/trunk/src/java/org/apache/hadoop/http/FilterInitializer.java
    hadoop/common/trunk/src/java/org/apache/hadoop/http/HttpServer.java
    hadoop/common/trunk/src/test/core/org/apache/hadoop/http/TestGlobalFilter.java
    hadoop/common/trunk/src/test/core/org/apache/hadoop/http/TestServletFilter.java

Modified: hadoop/common/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/CHANGES.txt?rev=833553&r1=833552&r2=833553&view=diff
==============================================================================
--- hadoop/common/trunk/CHANGES.txt (original)
+++ hadoop/common/trunk/CHANGES.txt Fri Nov  6 20:54:40 2009
@@ -10,6 +10,10 @@
     hadoop-config.sh so that it allows setting java command options for
     JAVA_PLATFORM.  (Koji Noguchi via szetszwo)
 
+    HADOOP-6337. Updates FilterInitializer class to be more visible,
+    and the init of the class is made to take a Configuration argument.
+    (Jakob Homan via ddas)
+
   IMPROVEMENTS
 
     HADOOP-6283. Improve the exception messages thrown by

Modified: hadoop/common/trunk/src/java/org/apache/hadoop/http/FilterInitializer.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/src/java/org/apache/hadoop/http/FilterInitializer.java?rev=833553&r1=833552&r2=833553&view=diff
==============================================================================
--- hadoop/common/trunk/src/java/org/apache/hadoop/http/FilterInitializer.java (original)
+++ hadoop/common/trunk/src/java/org/apache/hadoop/http/FilterInitializer.java Fri Nov  6
20:54:40 2009
@@ -17,6 +17,8 @@
  */
 package org.apache.hadoop.http;
 
+import org.apache.hadoop.conf.Configuration;
+
 /**
  * Initialize a javax.servlet.Filter. 
  */
@@ -24,6 +26,7 @@
   /**
    * Initialize a Filter to a FilterContainer.
    * @param container The filter container
+   * @param conf Configuration for run-time parameters
    */
-  abstract void initFilter(FilterContainer container);
+  public abstract void initFilter(FilterContainer container, Configuration conf);
 }
\ No newline at end of file

Modified: hadoop/common/trunk/src/java/org/apache/hadoop/http/HttpServer.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/src/java/org/apache/hadoop/http/HttpServer.java?rev=833553&r1=833552&r2=833553&view=diff
==============================================================================
--- hadoop/common/trunk/src/java/org/apache/hadoop/http/HttpServer.java (original)
+++ hadoop/common/trunk/src/java/org/apache/hadoop/http/HttpServer.java Fri Nov  6 20:54:40
2009
@@ -127,7 +127,7 @@
     final FilterInitializer[] initializers = getFilterInitializers(conf); 
     if (initializers != null) {
       for(FilterInitializer c : initializers) {
-        c.initFilter(this);
+        c.initFilter(this, conf);
       }
     }
     addDefaultServlets();

Modified: hadoop/common/trunk/src/test/core/org/apache/hadoop/http/TestGlobalFilter.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/src/test/core/org/apache/hadoop/http/TestGlobalFilter.java?rev=833553&r1=833552&r2=833553&view=diff
==============================================================================
--- hadoop/common/trunk/src/test/core/org/apache/hadoop/http/TestGlobalFilter.java (original)
+++ hadoop/common/trunk/src/test/core/org/apache/hadoop/http/TestGlobalFilter.java Fri Nov
 6 20:54:40 2009
@@ -68,7 +68,7 @@
     static public class Initializer extends FilterInitializer {
       public Initializer() {}
 
-      void initFilter(FilterContainer container) {
+      public void initFilter(FilterContainer container, Configuration conf) {
         container.addGlobalFilter("recording", RecordingFilter.class.getName(), null);
       }
     }

Modified: hadoop/common/trunk/src/test/core/org/apache/hadoop/http/TestServletFilter.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/src/test/core/org/apache/hadoop/http/TestServletFilter.java?rev=833553&r1=833552&r2=833553&view=diff
==============================================================================
--- hadoop/common/trunk/src/test/core/org/apache/hadoop/http/TestServletFilter.java (original)
+++ hadoop/common/trunk/src/test/core/org/apache/hadoop/http/TestServletFilter.java Fri Nov
 6 20:54:40 2009
@@ -66,7 +66,7 @@
     static public class Initializer extends FilterInitializer {
       public Initializer() {}
 
-      void initFilter(FilterContainer container) {
+      public void initFilter(FilterContainer container, Configuration conf) {
         container.addFilter("simple", SimpleFilter.class.getName(), null);
       }
     }



Mime
View raw message