Skip to content

Commit

Permalink
Revert "[SPARK-37600][BUILD] Upgrade to Hadoop 3.3.2" (apache#565)
Browse files Browse the repository at this point in the history
This reverts commit 4da04fc5,
  • Loading branch information
leejaywei authored Nov 22, 2022
1 parent 4c60a77 commit 197dc34
Show file tree
Hide file tree
Showing 11 changed files with 144 additions and 93 deletions.
2 changes: 0 additions & 2 deletions LICENSE-binary
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,6 @@ net.sf.py4j:py4j
org.jpmml:pmml-model
org.jpmml:pmml-schema
org.threeten:threeten-extra
org.jdom:jdom2

python/lib/py4j-*-src.zip
python/pyspark/cloudpickle.py
Expand Down Expand Up @@ -506,7 +505,6 @@ Common Development and Distribution License (CDDL) 1.0
javax.activation:activation http://www.oracle.com/technetwork/java/javase/tech/index-jsp-138795.html
javax.xml.stream:stax-api https://jcp.org/en/jsr/detail?id=173
javax.transaction:javax.transaction-api
javax.xml.bind:jaxb-api


Common Development and Distribution License (CDDL) 1.1
Expand Down
3 changes: 0 additions & 3 deletions NOTICE-binary
Original file line number Diff line number Diff line change
Expand Up @@ -917,9 +917,6 @@ This product includes code (JaspellTernarySearchTrie) from Java Spelling Checkin
g Package (jaspell): http://jaspell.sourceforge.net/
License: The BSD License (http://www.opensource.org/licenses/bsd-license.php)

This product includes software developed by the JDOM Project (http://www.jdom.org/)
License: https://raw.githubusercontent.com/hunterhacker/jdom/master/LICENSE.txt

The snowball stemmers in
analysis/common/src/java/net/sf/snowball
were developed by Martin Porter and Richard Boulton.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package org.apache.hadoop.shaded.net.jpountz.lz4;

/**
* TODO(SPARK-36679): A temporary workaround for SPARK-36669. We should remove this after
* Hadoop 3.3.2 release which fixes the LZ4 relocation in shaded Hadoop client libraries.
* This does not need implement all net.jpountz.lz4.LZ4Compressor API, just the ones used
* by Hadoop Lz4Compressor.
*/
public final class LZ4Compressor {

private net.jpountz.lz4.LZ4Compressor lz4Compressor;

public LZ4Compressor(net.jpountz.lz4.LZ4Compressor lz4Compressor) {
this.lz4Compressor = lz4Compressor;
}

public void compress(java.nio.ByteBuffer src, java.nio.ByteBuffer dest) {
lz4Compressor.compress(src, dest);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package org.apache.hadoop.shaded.net.jpountz.lz4;

/**
* TODO(SPARK-36679): A temporary workaround for SPARK-36669. We should remove this after
* Hadoop 3.3.2 release which fixes the LZ4 relocation in shaded Hadoop client libraries.
* This does not need implement all net.jpountz.lz4.LZ4Factory API, just the ones used by
* Hadoop Lz4Compressor.
*/
public final class LZ4Factory {

private net.jpountz.lz4.LZ4Factory lz4Factory;

public LZ4Factory(net.jpountz.lz4.LZ4Factory lz4Factory) {
this.lz4Factory = lz4Factory;
}

public static LZ4Factory fastestInstance() {
return new LZ4Factory(net.jpountz.lz4.LZ4Factory.fastestInstance());
}

public LZ4Compressor highCompressor() {
return new LZ4Compressor(lz4Factory.highCompressor());
}

public LZ4Compressor fastCompressor() {
return new LZ4Compressor(lz4Factory.fastCompressor());
}

public LZ4SafeDecompressor safeDecompressor() {
return new LZ4SafeDecompressor(lz4Factory.safeDecompressor());
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package org.apache.hadoop.shaded.net.jpountz.lz4;

/**
* TODO(SPARK-36679): A temporary workaround for SPARK-36669. We should remove this after
* Hadoop 3.3.2 release which fixes the LZ4 relocation in shaded Hadoop client libraries.
* This does not need implement all net.jpountz.lz4.LZ4SafeDecompressor API, just the ones
* used by Hadoop Lz4Decompressor.
*/
public final class LZ4SafeDecompressor {
private net.jpountz.lz4.LZ4SafeDecompressor lz4Decompressor;

public LZ4SafeDecompressor(net.jpountz.lz4.LZ4SafeDecompressor lz4Decompressor) {
this.lz4Decompressor = lz4Decompressor;
}

public void decompress(java.nio.ByteBuffer src, java.nio.ByteBuffer dest) {
lz4Decompressor.decompress(src, dest);
}
}
38 changes: 19 additions & 19 deletions dev/deps/spark-deps-hadoop-3-hive-2.3
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@ ST4/4.0.4//ST4-4.0.4.jar
activation/1.1.1//activation-1.1.1.jar
aircompressor/0.21//aircompressor-0.21.jar
algebra_2.12/2.0.1//algebra_2.12-2.0.1.jar
aliyun-java-sdk-core/4.5.10//aliyun-java-sdk-core-4.5.10.jar
aliyun-java-sdk-kms/2.11.0//aliyun-java-sdk-kms-2.11.0.jar
aliyun-java-sdk-ram/3.1.0//aliyun-java-sdk-ram-3.1.0.jar
aliyun-sdk-oss/3.13.0//aliyun-sdk-oss-3.13.0.jar
aliyun-java-sdk-core/3.4.0//aliyun-java-sdk-core-3.4.0.jar
aliyun-java-sdk-ecs/4.2.0//aliyun-java-sdk-ecs-4.2.0.jar
aliyun-java-sdk-ram/3.0.0//aliyun-java-sdk-ram-3.0.0.jar
aliyun-java-sdk-sts/3.0.0//aliyun-java-sdk-sts-3.0.0.jar
aliyun-sdk-oss/3.4.1//aliyun-sdk-oss-3.4.1.jar
annotations/17.0.0//annotations-17.0.0.jar
antlr-runtime/3.5.2//antlr-runtime-3.5.2.jar
antlr4-runtime/4.8//antlr4-runtime-4.8.jar
Expand All @@ -25,7 +26,7 @@ automaton/1.11-8//automaton-1.11-8.jar
avro-ipc/1.11.0//avro-ipc-1.11.0.jar
avro-mapred/1.11.0//avro-mapred-1.11.0.jar
avro/1.11.0//avro-1.11.0.jar
aws-java-sdk-bundle/1.11.1026//aws-java-sdk-bundle-1.11.1026.jar
aws-java-sdk-bundle/1.11.901//aws-java-sdk-bundle-1.11.901.jar
azure-data-lake-store-sdk/2.3.9//azure-data-lake-store-sdk-2.3.9.jar
azure-keyvault-core/1.0.0//azure-keyvault-core-1.0.0.jar
azure-storage/7.0.1//azure-storage-7.0.1.jar
Expand Down Expand Up @@ -67,18 +68,18 @@ generex/1.0.2//generex-1.0.2.jar
gmetric4j/1.0.10//gmetric4j-1.0.10.jar
gson/2.2.4//gson-2.2.4.jar
guava/14.0.1//guava-14.0.1.jar
hadoop-aliyun/3.3.2//hadoop-aliyun-3.3.2.jar
hadoop-annotations/3.3.2//hadoop-annotations-3.3.2.jar
hadoop-aws/3.3.2//hadoop-aws-3.3.2.jar
hadoop-azure-datalake/3.3.2//hadoop-azure-datalake-3.3.2.jar
hadoop-azure/3.3.2//hadoop-azure-3.3.2.jar
hadoop-client-api/3.3.2//hadoop-client-api-3.3.2.jar
hadoop-client-runtime/3.3.2//hadoop-client-runtime-3.3.2.jar
hadoop-cloud-storage/3.3.2//hadoop-cloud-storage-3.3.2.jar
hadoop-cos/3.3.2//hadoop-cos-3.3.2.jar
hadoop-openstack/3.3.2//hadoop-openstack-3.3.2.jar
hadoop-aliyun/3.3.1//hadoop-aliyun-3.3.1.jar
hadoop-annotations/3.3.1//hadoop-annotations-3.3.1.jar
hadoop-aws/3.3.1//hadoop-aws-3.3.1.jar
hadoop-azure-datalake/3.3.1//hadoop-azure-datalake-3.3.1.jar
hadoop-azure/3.3.1//hadoop-azure-3.3.1.jar
hadoop-client-api/3.3.1//hadoop-client-api-3.3.1.jar
hadoop-client-runtime/3.3.1//hadoop-client-runtime-3.3.1.jar
hadoop-cloud-storage/3.3.1//hadoop-cloud-storage-3.3.1.jar
hadoop-cos/3.3.1//hadoop-cos-3.3.1.jar
hadoop-openstack/3.3.1//hadoop-openstack-3.3.1.jar
hadoop-shaded-guava/1.1.1//hadoop-shaded-guava-1.1.1.jar
hadoop-yarn-server-web-proxy/3.3.2//hadoop-yarn-server-web-proxy-3.3.2.jar
hadoop-yarn-server-web-proxy/3.3.1//hadoop-yarn-server-web-proxy-3.3.1.jar
hive-beeline/2.3.9//hive-beeline-2.3.9.jar
hive-cli/2.3.9//hive-cli-2.3.9.jar
hive-common/2.3.9//hive-common-2.3.9.jar
Expand All @@ -98,9 +99,9 @@ hive-contrib/1.1.0-cdh5.16.2//hive-contrib-1.1.0-cdh5.16.2.jar
hk2-api/2.6.1//hk2-api-2.6.1.jar
hk2-locator/2.6.1//hk2-locator-2.6.1.jar
hk2-utils/2.6.1//hk2-utils-2.6.1.jar
htrace-core4/4.1.0-incubating//htrace-core4-4.1.0-incubating.jar
httpclient/4.5.13//httpclient-4.5.13.jar
httpcore/4.4.14//httpcore-4.4.14.jar
ini4j/0.5.4//ini4j-0.5.4.jar
istack-commons-runtime/3.0.8//istack-commons-runtime-3.0.8.jar
ivy/2.5.0//ivy-2.5.0.jar
jackson-annotations/2.13.3//jackson-annotations-2.13.3.jar
Expand All @@ -122,11 +123,10 @@ janino/3.0.16//janino-3.0.16.jar
javassist/3.25.0-GA//javassist-3.25.0-GA.jar
javax.jdo/3.2.0-m3//javax.jdo-3.2.0-m3.jar
javolution/5.5.1//javolution-5.5.1.jar
jaxb-api/2.2.11//jaxb-api-2.2.11.jar
jaxb-runtime/2.3.2//jaxb-runtime-2.3.2.jar
jcl-over-slf4j/1.7.32//jcl-over-slf4j-1.7.32.jar
jdo-api/3.0.1//jdo-api-3.0.1.jar
jdom2/2.0.6//jdom2-2.0.6.jar
jdom/1.1//jdom-1.1.jar
jersey-client/2.34//jersey-client-2.34.jar
jersey-common/2.34//jersey-common-2.34.jar
jersey-container-servlet-core/2.34//jersey-container-servlet-core-2.34.jar
Expand Down
7 changes: 0 additions & 7 deletions hadoop-cloud/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -267,13 +267,6 @@
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
</exclusion>
<exclusion>
<!--
This is a code coverage library introduced by aliyun-java-sdk-core, only for testing
-->
<groupId>org.jacoco</groupId>
<artifactId>org.jacoco.agent</artifactId>
</exclusion>
</exclusions>
</dependency>
<!--
Expand Down
54 changes: 0 additions & 54 deletions licenses/LICENSE-jdom.txt

This file was deleted.

3 changes: 1 addition & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@
<slf4j.version>1.7.30</slf4j.version>
<log4j.version>2.18.0</log4j.version>
<!-- make sure to update IsolatedClientLoader whenever this version is changed -->
<hadoop.version>3.3.2</hadoop.version>
<hadoop.version>3.3.1</hadoop.version>
<gson.version>2.8.9</gson.version>
<protobuf.version>3.16.1</protobuf.version>
<yarn.version>${hadoop.version}</yarn.version>
Expand Down Expand Up @@ -3470,7 +3470,6 @@
<profile>
<id>hadoop-2</id>
<properties>
<!-- make sure to update IsolatedClientLoader whenever this version is changed -->
<hadoop.version>2.7.4</hadoop.version>
<curator.version>2.7.1</curator.version>
<commons-io.version>2.8.0</commons-io.version>
Expand Down
6 changes: 1 addition & 5 deletions project/MimaExcludes.scala
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,7 @@ object MimaExcludes {
// [SPARK-37831][CORE] Add task partition id in TaskInfo and Task Metrics
ProblemFilters.exclude[DirectMissingMethodProblem]("org.apache.spark.status.api.v1.TaskData.this"),

// [SPARK-37600][BUILD] Upgrade to Hadoop 3.3.2
ProblemFilters.exclude[MissingClassProblem]("org.apache.hadoop.shaded.net.jpountz.lz4.LZ4Compressor"),
ProblemFilters.exclude[MissingClassProblem]("org.apache.hadoop.shaded.net.jpountz.lz4.LZ4Factory"),
ProblemFilters.exclude[MissingClassProblem]("org.apache.hadoop.shaded.net.jpountz.lz4.LZ4SafeDecompressor"),


// [SPARK-37377][SQL] Initial implementation of Storage-Partitioned Join
ProblemFilters.exclude[MissingClassProblem]("org.apache.spark.sql.connector.read.partitioning.ClusteredDistribution"),
ProblemFilters.exclude[MissingClassProblem]("org.apache.spark.sql.connector.read.partitioning.Distribution"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ private[hive] object IsolatedClientLoader extends Logging {
// If the error message contains hadoop, it is probably because the hadoop
// version cannot be resolved.
val fallbackVersion = if (VersionUtils.isHadoop3) {
"3.3.2"
"3.3.1"
} else {
"2.7.4"
}
Expand Down

0 comments on commit 197dc34

Please sign in to comment.