You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by cd...@apache.org on 2017/04/10 18:48:54 UTC
hadoop git commit: HADOOP-14225. Remove xmlenc dependency
Repository: hadoop
Updated Branches:
refs/heads/trunk be144117a -> a5e57df3c
HADOOP-14225. Remove xmlenc dependency
Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/a5e57df3
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/a5e57df3
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/a5e57df3
Branch: refs/heads/trunk
Commit: a5e57df3c56bf753f40809a2994d556095594de2
Parents: be14411
Author: Chris Douglas <cd...@apache.org>
Authored: Mon Apr 10 11:48:40 2017 -0700
Committer: Chris Douglas <cd...@apache.org>
Committed: Mon Apr 10 11:48:40 2017 -0700
----------------------------------------------------------------------
LICENSE.txt | 1 -
.../hadoop-client-minicluster/pom.xml | 4 --
hadoop-common-project/hadoop-common/pom.xml | 5 --
.../hadoop/fs/MD5MD5CRC32FileChecksum.java | 62 --------------------
hadoop-hdfs-project/hadoop-hdfs-nfs/pom.xml | 5 --
hadoop-hdfs-project/hadoop-hdfs/pom.xml | 5 --
.../hadoop/hdfs/server/namenode/DfsServlet.java | 21 -------
hadoop-project/pom.xml | 5 --
8 files changed, 108 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hadoop/blob/a5e57df3/LICENSE.txt
----------------------------------------------------------------------
diff --git a/LICENSE.txt b/LICENSE.txt
index a7e43c4..10af7ce 100644
--- a/LICENSE.txt
+++ b/LICENSE.txt
@@ -1711,7 +1711,6 @@ Hamcrest Core 1.3
ASM Core 5.0.4
ASM Commons 5.0.2
ASM Tree 5.0.2
-xmlenc Library 0.52
--------------------------------------------------------------------------------
(3-clause BSD)
Redistribution and use in source and binary forms, with or without
http://git-wip-us.apache.org/repos/asf/hadoop/blob/a5e57df3/hadoop-client-modules/hadoop-client-minicluster/pom.xml
----------------------------------------------------------------------
diff --git a/hadoop-client-modules/hadoop-client-minicluster/pom.xml b/hadoop-client-modules/hadoop-client-minicluster/pom.xml
index c58ac38..b6197b3 100644
--- a/hadoop-client-modules/hadoop-client-minicluster/pom.xml
+++ b/hadoop-client-modules/hadoop-client-minicluster/pom.xml
@@ -218,10 +218,6 @@
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
</exclusion>
- <exclusion>
- <groupId>xmlenc</groupId>
- <artifactId>xmlenc</artifactId>
- </exclusion>
</exclusions>
</dependency>
<!-- Add optional runtime dependency on the in-development timeline server module
http://git-wip-us.apache.org/repos/asf/hadoop/blob/a5e57df3/hadoop-common-project/hadoop-common/pom.xml
----------------------------------------------------------------------
diff --git a/hadoop-common-project/hadoop-common/pom.xml b/hadoop-common-project/hadoop-common/pom.xml
index ee82df0..f76575d 100644
--- a/hadoop-common-project/hadoop-common/pom.xml
+++ b/hadoop-common-project/hadoop-common/pom.xml
@@ -61,11 +61,6 @@
<scope>compile</scope>
</dependency>
<dependency>
- <groupId>xmlenc</groupId>
- <artifactId>xmlenc</artifactId>
- <scope>compile</scope>
- </dependency>
- <dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<scope>compile</scope>
http://git-wip-us.apache.org/repos/asf/hadoop/blob/a5e57df3/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/MD5MD5CRC32FileChecksum.java
----------------------------------------------------------------------
diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/MD5MD5CRC32FileChecksum.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/MD5MD5CRC32FileChecksum.java
index 21f56ed..3fdb7e9 100644
--- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/MD5MD5CRC32FileChecksum.java
+++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/MD5MD5CRC32FileChecksum.java
@@ -27,12 +27,6 @@ import org.apache.hadoop.fs.Options.ChecksumOpt;
import org.apache.hadoop.io.MD5Hash;
import org.apache.hadoop.io.WritableUtils;
import org.apache.hadoop.util.DataChecksum;
-import org.xml.sax.Attributes;
-import org.xml.sax.SAXException;
-import org.znerd.xmlenc.XMLOutputter;
-
-import org.apache.hadoop.fs.MD5MD5CRC32CastagnoliFileChecksum;
-import org.apache.hadoop.fs.MD5MD5CRC32GzipFileChecksum;
/** MD5 of MD5 of CRC32. */
@InterfaceAudience.LimitedPrivate({"HDFS"})
@@ -107,62 +101,6 @@ public class MD5MD5CRC32FileChecksum extends FileChecksum {
md5.write(out);
}
- /** Write that object to xml output. */
- public static void write(XMLOutputter xml, MD5MD5CRC32FileChecksum that
- ) throws IOException {
- xml.startTag(MD5MD5CRC32FileChecksum.class.getName());
- if (that != null) {
- xml.attribute("bytesPerCRC", "" + that.bytesPerCRC);
- xml.attribute("crcPerBlock", "" + that.crcPerBlock);
- xml.attribute("crcType", ""+ that.getCrcType().name());
- xml.attribute("md5", "" + that.md5);
- }
- xml.endTag();
- }
-
- /** Return the object represented in the attributes. */
- public static MD5MD5CRC32FileChecksum valueOf(Attributes attrs
- ) throws SAXException {
- final String bytesPerCRC = attrs.getValue("bytesPerCRC");
- final String crcPerBlock = attrs.getValue("crcPerBlock");
- final String md5 = attrs.getValue("md5");
- String crcType = attrs.getValue("crcType");
- DataChecksum.Type finalCrcType;
- if (bytesPerCRC == null || crcPerBlock == null || md5 == null) {
- return null;
- }
-
- try {
- // old versions don't support crcType.
- if (crcType == null || crcType.equals("")) {
- finalCrcType = DataChecksum.Type.CRC32;
- } else {
- finalCrcType = DataChecksum.Type.valueOf(crcType);
- }
-
- switch (finalCrcType) {
- case CRC32:
- return new MD5MD5CRC32GzipFileChecksum(
- Integer.parseInt(bytesPerCRC),
- Integer.parseInt(crcPerBlock),
- new MD5Hash(md5));
- case CRC32C:
- return new MD5MD5CRC32CastagnoliFileChecksum(
- Integer.parseInt(bytesPerCRC),
- Integer.parseInt(crcPerBlock),
- new MD5Hash(md5));
- default:
- // we should never get here since finalCrcType will
- // hold a valid type or we should have got an exception.
- return null;
- }
- } catch (Exception e) {
- throw new SAXException("Invalid attributes: bytesPerCRC=" + bytesPerCRC
- + ", crcPerBlock=" + crcPerBlock + ", crcType=" + crcType
- + ", md5=" + md5, e);
- }
- }
-
@Override
public String toString() {
return getAlgorithmName() + ":" + md5;
http://git-wip-us.apache.org/repos/asf/hadoop/blob/a5e57df3/hadoop-hdfs-project/hadoop-hdfs-nfs/pom.xml
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs-nfs/pom.xml b/hadoop-hdfs-project/hadoop-hdfs-nfs/pom.xml
index 403f097..6541669 100644
--- a/hadoop-hdfs-project/hadoop-hdfs-nfs/pom.xml
+++ b/hadoop-hdfs-project/hadoop-hdfs-nfs/pom.xml
@@ -169,11 +169,6 @@ http://maven.apache.org/xsd/maven-4.0.0.xsd">
<scope>provided</scope>
</dependency>
<dependency>
- <groupId>xmlenc</groupId>
- <artifactId>xmlenc</artifactId>
- <scope>compile</scope>
- </dependency>
- <dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcprov-jdk16</artifactId>
<scope>test</scope>
http://git-wip-us.apache.org/repos/asf/hadoop/blob/a5e57df3/hadoop-hdfs-project/hadoop-hdfs/pom.xml
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/pom.xml b/hadoop-hdfs-project/hadoop-hdfs/pom.xml
index 9b6c058..6e1a318 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/pom.xml
+++ b/hadoop-hdfs-project/hadoop-hdfs/pom.xml
@@ -164,11 +164,6 @@ http://maven.apache.org/xsd/maven-4.0.0.xsd">
<scope>provided</scope>
</dependency>
<dependency>
- <groupId>xmlenc</groupId>
- <artifactId>xmlenc</artifactId>
- <scope>compile</scope>
- </dependency>
- <dependency>
<groupId>io.netty</groupId>
<artifactId>netty</artifactId>
<scope>compile</scope>
http://git-wip-us.apache.org/repos/asf/hadoop/blob/a5e57df3/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/DfsServlet.java
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/DfsServlet.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/DfsServlet.java
index 6b489fc..2fb369c 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/DfsServlet.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/DfsServlet.java
@@ -25,9 +25,7 @@ import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.hdfs.server.common.JspHelper;
-import org.apache.hadoop.ipc.RemoteException;
import org.apache.hadoop.security.UserGroupInformation;
-import org.znerd.xmlenc.XMLOutputter;
/**
* A base class for the servlets in DFS.
@@ -38,25 +36,6 @@ abstract class DfsServlet extends HttpServlet {
static final Log LOG = LogFactory.getLog(DfsServlet.class.getCanonicalName());
- /** Write the object to XML format */
- protected void writeXml(Exception except, String path, XMLOutputter doc)
- throws IOException {
- doc.startTag(RemoteException.class.getSimpleName());
- doc.attribute("path", path);
- if (except instanceof RemoteException) {
- doc.attribute("class", ((RemoteException) except).getClassName());
- } else {
- doc.attribute("class", except.getClass().getName());
- }
- String msg = except.getLocalizedMessage();
- int i = msg.indexOf("\n");
- if (i >= 0) {
- msg = msg.substring(0, i);
- }
- doc.attribute("message", msg.substring(msg.indexOf(":") + 1).trim());
- doc.endTag();
- }
-
protected UserGroupInformation getUGI(HttpServletRequest request,
Configuration conf) throws IOException {
return JspHelper.getUGI(getServletContext(), request, conf);
http://git-wip-us.apache.org/repos/asf/hadoop/blob/a5e57df3/hadoop-project/pom.xml
----------------------------------------------------------------------
diff --git a/hadoop-project/pom.xml b/hadoop-project/pom.xml
index dec2b06..8a0e7eb 100644
--- a/hadoop-project/pom.xml
+++ b/hadoop-project/pom.xml
@@ -546,11 +546,6 @@
<version>1.0</version>
</dependency>
<dependency>
- <groupId>xmlenc</groupId>
- <artifactId>xmlenc</artifactId>
- <version>0.52</version>
- </dependency>
- <dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.5.2</version>
---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org