[
https://issues.apache.org/jira/browse/HADOOP-10703?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14361213#comment-14361213
]
Haohui Mai commented on HADOOP-10703:
-------------------------------------
Search around and checked the source code of jetty 6. It looks like that it is
common that a single servlet / filter instance serves multiple requests
concurrently. Some frameworks might hide the complexity by creating new servlet
instance on the fly -- at the very least jetty will dispatch multiple requests
to the same servlet based on a quick skim over the code.
The patch looks quite good for me. Some minor nits:
{code}
final String[] USER_FACING_URLS = { "*.html", "*.jsp" };
{code}
Since we no longer have jsp, I think you can simple merge {{USER_FACING_URLS}}
into {{ALL_URLS}}.
{code}
+ private static void defineFilter(Context ctx, FilterHolder holder,
+ FilterMapping fmap ) {
{code}
There is an additional space in the declaration. +1 once addressed.
> Duplicate filter instances are created during HttpServer2 initialization
> ------------------------------------------------------------------------
>
> Key: HADOOP-10703
> URL: https://issues.apache.org/jira/browse/HADOOP-10703
> Project: Hadoop Common
> Issue Type: Bug
> Components: security
> Affects Versions: 2.4.0
> Reporter: Benoy Antony
> Assignee: Benoy Antony
> Attachments: HADOOP-10703-002.patch, HADOOP-10703.patch,
> multiple-authenticationfilter-inits.log
>
>
> The HttpServer2.defineFilter creates a Filter instance for each context. By
> default, there are 3 contexts.
> So there will be 3 separate AuthenticationFilter instances and corresponding
> AuthenticationHandler instances. This also results in 3 separate
> initializations of AuthenticationHandler.
> The log file illustrating this repeated initialization is attached.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)