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

Masatake Iwasaki commented on HADOOP-16530:
-------------------------------------------

Thanks for working on this, [~jojochuang].
{quote}Looking at HDFS-12221, the impact of this dependency is very minimal: 
only used by offlineimageviewer
{quote}
xercesImpl seems to be used in Configuration too. If the jar is on the 
classpath, xerces classes are loaded via ServiceLoader.
{noformat}
$ jar tvf hadoop-2.9.2/share/hadoop/hdfs/lib/xercesImpl-2.9.1.jar | grep 
META-INF/services
     0 Fri Sep 14 18:22:18 JST 2007 META-INF/services/
    52 Fri Sep 14 18:22:18 JST 2007 
META-INF/services/javax.xml.datatype.DatatypeFactory
    50 Fri Sep 14 18:22:18 JST 2007 
META-INF/services/javax.xml.parsers.DocumentBuilderFactory
    44 Fri Sep 14 18:22:18 JST 2007 
META-INF/services/javax.xml.parsers.SAXParserFactory
    51 Fri Sep 14 18:22:18 JST 2007 
META-INF/services/javax.xml.validation.SchemaFactory
    51 Fri Sep 14 18:22:18 JST 2007 
META-INF/services/org.w3c.dom.DOMImplementationSourceList
    37 Fri Sep 14 18:22:18 JST 2007 META-INF/services/org.xml.sax.driver
{noformat}
I can see xercesImpl classes loaded in debug log emitted by namenode with 
system property {{-Djaxp.debug=true}}.
{noformat}
JAXP: find factoryId =javax.xml.parsers.SAXParserFactory
JAXP: found jar resource=META-INF/services/javax.xml.parsers.SAXParserFactory 
using ClassLoader: sun.misc.Launcher$AppClassLoader@756095fc
JAXP: found in resource, value=org.apache.xerces.jaxp.SAXParserFactoryImpl
JAXP: created new instance of class org.apache.xerces.jaxp.SAXParserFactoryImpl 
using ClassLoader: sun.misc.Launcher$AppClassLoader@756095fc
JAXP: find factoryId =javax.xml.parsers.SAXParserFactory
JAXP: found jar resource=META-INF/services/javax.xml.parsers.SAXParserFactory 
using ClassLoader: sun.misc.Launcher$AppClassLoader@756095fc
JAXP: found in resource, value=org.apache.xerces.jaxp.SAXParserFactoryImpl
JAXP: created new instance of class org.apache.xerces.jaxp.SAXParserFactoryImpl 
using ClassLoader: sun.misc.Launcher$AppClassLoader@756095fc
JAXP: find factoryId =javax.xml.parsers.SAXParserFactory
JAXP: found jar resource=META-INF/services/javax.xml.parsers.SAXParserFactory 
using ClassLoader: ContextLoader@hdfs
JAXP: found in resource, value=org.apache.xerces.jaxp.SAXParserFactoryImpl
JAXP: created new instance of class org.apache.xerces.jaxp.SAXParserFactoryImpl 
using ClassLoader: ContextLoader@hdfs
JAXP: find factoryId =javax.xml.parsers.DocumentBuilderFactory
JAXP: found jar 
resource=META-INF/services/javax.xml.parsers.DocumentBuilderFactory using 
ClassLoader: ContextLoader@hdfs
JAXP: found in resource, value=org.apache.xerces.jaxp.DocumentBuilderFactoryImpl
JAXP: created new instance of class 
org.apache.xerces.jaxp.DocumentBuilderFactoryImpl using ClassLoader: 
ContextLoader@hdfs
JAXP: find factoryId =javax.xml.transform.TransformerFactory
JAXP: loaded from fallback value: 
com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl
JAXP: created new instance of class 
com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl using 
ClassLoader: null
{noformat}
If the jar of xercesImpl is not on the classpath, alternate implementation 
including JDK built-in is used.

> Update xercesImpl in branch-2
> -----------------------------
>
>                 Key: HADOOP-16530
>                 URL: https://issues.apache.org/jira/browse/HADOOP-16530
>             Project: Hadoop Common
>          Issue Type: Improvement
>            Reporter: Wei-Chiu Chuang
>            Assignee: Wei-Chiu Chuang
>            Priority: Major
>              Labels: release-blocker
>         Attachments: HADOOP-16530.branch-2.001.patch
>
>
> Hadoop 2 depends on xercesImpl 2.9.1, which is more than 10 years old. The 
> latest version is 2.12.0, released last year Let's update this dependency.
> HDFS-12221 removed xercesImpl in Hadoop 3. Looking at HDFS-12221, the impact 
> of this dependency is very minimal: only used by offlineimageviewer. 
> TestOfflineEditsViewer passed for me after the update. Not sure about the 
> impact of downstream applications though.



--
This message was sent by Atlassian Jira
(v8.3.2#803003)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to