Skip to content

Commit

Permalink
[SPARK-36681][CORE][TEST] Enable SnappyCodec test in FileSuite
Browse files Browse the repository at this point in the history
### What changes were proposed in this pull request?

This patch enables `SnappyCodec` test in `FileSuite` as snappy-java relocation issue was fixed in Hadoop 3.3.2 that Spark is using now.

### Why are the changes needed?

Enabling test case.

### Does this PR introduce _any_ user-facing change?

No

### How was this patch tested?

Updated test.

Closes apache#35784 from viirya/SPARK-36681.

Authored-by: Liang-Chi Hsieh <[email protected]>
Signed-off-by: Liang-Chi Hsieh <[email protected]>
  • Loading branch information
viirya committed Mar 9, 2022
1 parent 1584366 commit effef84
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions core/src/test/scala/org/apache/spark/FileSuite.scala
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import com.google.common.io.Files
import org.apache.hadoop.conf.Configuration
import org.apache.hadoop.fs.Path
import org.apache.hadoop.io._
import org.apache.hadoop.io.compress.{BZip2Codec, CompressionCodec, DefaultCodec, Lz4Codec}
import org.apache.hadoop.io.compress.{BZip2Codec, CompressionCodec, DefaultCodec, Lz4Codec, SnappyCodec}
import org.apache.hadoop.mapred.{FileAlreadyExistsException, FileSplit, JobConf, TextInputFormat, TextOutputFormat}
import org.apache.hadoop.mapreduce.Job
import org.apache.hadoop.mapreduce.lib.input.{FileSplit => NewFileSplit, TextInputFormat => NewTextInputFormat}
Expand Down Expand Up @@ -136,8 +136,8 @@ class FileSuite extends SparkFunSuite with LocalSparkContext {
}

// Hadoop "gzip" and "zstd" codecs require native library installed for sequence files
// "snappy" codec does not work due to SPARK-36681.
val codecs = Seq((new DefaultCodec(), "default"), (new BZip2Codec(), "bzip2")) ++ {
val codecs = Seq((new DefaultCodec(), "default"), (new BZip2Codec(), "bzip2"),
(new SnappyCodec(), "snappy")) ++ {
if (VersionUtils.isHadoop3) Seq((new Lz4Codec(), "lz4")) else Seq()
}
codecs.foreach { case (codec, codecName) =>
Expand Down

0 comments on commit effef84

Please sign in to comment.