[ 
https://issues.apache.org/jira/browse/MAPREDUCE-1700?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14562103#comment-14562103
 ] 

Sangjin Lee commented on MAPREDUCE-1700:
----------------------------------------

I would also advise moving this discussion to the mailing group. That way 
you'll get a bigger audience. Also, this is a resolved JIRA, so I don't think 
this is the best place to conduct the discussion.

The thread context classloader is a poor abstraction that's fraught with 
issues. There is no well-defined contract on how to set and use it. The current 
hadoop code does pretty much what you're describing above. However, it's 
difficult to pinpoint always when the user code runs and when the system code 
runs, so it's bound to be imprecise at some point.

Normally the TCCL is not the main way to load classes. So it would be a problem 
only if some code explicitly invokes Thread.getContextClassLoader() to retrieve 
the TCCL and uses it to load classes. So in practice, it's uncommon we see 
issues due to this although it's possible in principle.

> User supplied dependencies may conflict with MapReduce system JARs
> ------------------------------------------------------------------
>
>                 Key: MAPREDUCE-1700
>                 URL: https://issues.apache.org/jira/browse/MAPREDUCE-1700
>             Project: Hadoop Map/Reduce
>          Issue Type: Bug
>          Components: task
>            Reporter: Tom White
>            Assignee: Tom White
>             Fix For: 2.0.3-alpha
>
>         Attachments: MAPREDUCE-1700-ccl.patch, MAPREDUCE-1700-ccl.patch, 
> MAPREDUCE-1700.patch, MAPREDUCE-1700.patch, MAPREDUCE-1700.patch, 
> MAPREDUCE-1700.patch, MAPREDUCE-1700.patch, MAPREDUCE-1700.patch, 
> MAPREDUCE-1700.patch, MAPREDUCE-1700.patch
>
>
> If user code has a dependency on a version of a JAR that is different to the 
> one that happens to be used by Hadoop, then it may not work correctly. This 
> happened with user code using a different version of Avro, as reported 
> [here|https://issues.apache.org/jira/browse/AVRO-493?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12852081#action_12852081].
> The problem is analogous to the one that application servers have with WAR 
> loading. Using a specialized classloader in the Child JVM is probably the way 
> to solve this.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to