forked from apache/spark
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert "[SPARK-37600][BUILD] Upgrade to Hadoop 3.3.2" (apache#565)
This reverts commit 4da04fc5,
- Loading branch information
Showing
11 changed files
with
144 additions
and
93 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
core/src/main/java/org/apache/hadoop/shaded/net/jpountz/lz4/LZ4Compressor.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
} | ||
} |
49 changes: 49 additions & 0 deletions
49
core/src/main/java/org/apache/hadoop/shaded/net/jpountz/lz4/LZ4Factory.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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()); | ||
} | ||
} |
36 changes: 36 additions & 0 deletions
36
core/src/main/java/org/apache/hadoop/shaded/net/jpountz/lz4/LZ4SafeDecompressor.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters