From 3cf0c049961f76135653629d562eb01bf37f9457 Mon Sep 17 00:00:00 2001 From: fjh100456 Date: Mon, 25 Dec 2017 20:06:40 +0800 Subject: [PATCH] update compressionCodecClassName to compressionCodecName update compressionCodecClassName to compressionCodecName --- .../org/apache/spark/sql/hive/CompressionCodecSuite.scala | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sql/hive/src/test/scala/org/apache/spark/sql/hive/CompressionCodecSuite.scala b/sql/hive/src/test/scala/org/apache/spark/sql/hive/CompressionCodecSuite.scala index 8ce362b99e61a..c7eb4719814f4 100644 --- a/sql/hive/src/test/scala/org/apache/spark/sql/hive/CompressionCodecSuite.scala +++ b/sql/hive/src/test/scala/org/apache/spark/sql/hive/CompressionCodecSuite.scala @@ -30,7 +30,7 @@ class CompressionCodecSuite extends TestHiveSingleton with SQLTestUtils { withSQLConf(SQLConf.PARQUET_COMPRESSION.key -> c) { val expected = if (c == "NONE") "UNCOMPRESSED" else c val option = new ParquetOptions(Map.empty[String, String], spark.sessionState.conf) - assert(option.compressionCodecClassName == expected) + assert(option.compressionCodecName == expected) } } } @@ -40,14 +40,14 @@ class CompressionCodecSuite extends TestHiveSingleton with SQLTestUtils { withSQLConf(SQLConf.PARQUET_COMPRESSION.key -> "snappy") { val props = Map("compression" -> "uncompressed", ParquetOutputFormat.COMPRESSION -> "gzip") val option = new ParquetOptions(props, spark.sessionState.conf) - assert(option.compressionCodecClassName == "UNCOMPRESSED") + assert(option.compressionCodecName == "UNCOMPRESSED") } // When "compression" is not configured, "parquet.compression" should be the preferred choice. withSQLConf(SQLConf.PARQUET_COMPRESSION.key -> "snappy") { val props = Map(ParquetOutputFormat.COMPRESSION -> "gzip") val option = new ParquetOptions(props, spark.sessionState.conf) - assert(option.compressionCodecClassName == "GZIP") + assert(option.compressionCodecName == "GZIP") } // When both "compression" and "parquet.compression" are not configured, @@ -55,7 +55,7 @@ class CompressionCodecSuite extends TestHiveSingleton with SQLTestUtils { withSQLConf(SQLConf.PARQUET_COMPRESSION.key -> "snappy") { val props = Map.empty[String, String] val option = new ParquetOptions(props, spark.sessionState.conf) - assert(option.compressionCodecClassName == "SNAPPY") + assert(option.compressionCodecName == "SNAPPY") } } }