Skip to content

Commit

Permalink
[SPARK-25611][SPARK-25622] Improve test run time of CompressionCodecS…
Browse files Browse the repository at this point in the history
…uite
  • Loading branch information
dilipbiswal committed Oct 5, 2018
1 parent d6be46e commit 2d7ffa6
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import java.io.File
import java.util.Locale

import scala.collection.JavaConverters._
import scala.util.Random

import org.apache.hadoop.fs.Path
import org.apache.orc.OrcConf.COMPRESS
Expand Down Expand Up @@ -229,8 +230,8 @@ class CompressionCodecSuite extends TestHiveSingleton with ParquetTest with Befo
tableCompressionCodecs: List[String])
(assertionCompressionCodec: (Option[String], String, String, Long) => Unit): Unit = {
withSQLConf(getConvertMetastoreConfName(format) -> convertMetastore.toString) {
tableCompressionCodecs.foreach { tableCompression =>
compressionCodecs.foreach { sessionCompressionCodec =>
Random.shuffle(tableCompressionCodecs).take(1).foreach { tableCompression =>
Random.shuffle(compressionCodecs).take(1).foreach { sessionCompressionCodec =>
withSQLConf(getSparkCompressionConfName(format) -> sessionCompressionCodec) {
// 'tableCompression = null' means no table-level compression
val compression = Option(tableCompression)
Expand Down

0 comments on commit 2d7ffa6

Please sign in to comment.