Skip to content

Commit

Permalink
[SPARK-2469] Use Snappy (instead of LZF) for default shuffle compress…
Browse files Browse the repository at this point in the history
…ion codec

This reduces shuffle compression memory usage by 3x.

Author: Reynold Xin <[email protected]>

Closes apache#1415 from rxin/snappy and squashes the following commits:

06c1a01 [Reynold Xin] SPARK-2469: Use Snappy (instead of LZF) for default shuffle compression codec.
  • Loading branch information
rxin committed Jul 16, 2014
1 parent c2048a5 commit 4576d80
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ private[spark] object CompressionCodec {
ctor.newInstance(conf).asInstanceOf[CompressionCodec]
}

val DEFAULT_COMPRESSION_CODEC = classOf[LZFCompressionCodec].getName
val DEFAULT_COMPRESSION_CODEC = classOf[SnappyCompressionCodec].getName
}


Expand Down Expand Up @@ -103,7 +103,7 @@ class LZFCompressionCodec(conf: SparkConf) extends CompressionCodec {
/**
* :: DeveloperApi ::
* Snappy implementation of [[org.apache.spark.io.CompressionCodec]].
* Block size can be configured by spark.io.compression.snappy.block.size.
* Block size can be configured by `spark.io.compression.snappy.block.size`.
*
* Note: The wire protocol for this codec is not guaranteed to be compatible across versions
* of Spark. This is intended for use as an internal compression utility within a single Spark
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class CompressionCodecSuite extends FunSuite {

test("default compression codec") {
val codec = CompressionCodec.createCodec(conf)
assert(codec.getClass === classOf[LZFCompressionCodec])
assert(codec.getClass === classOf[SnappyCompressionCodec])
testCodec(codec)
}

Expand Down

0 comments on commit 4576d80

Please sign in to comment.