Skip to content

Commit c3f4a02

Browse files
committed
Merge remote-tracking branch 'upstream/master' into dataTypeAndSchema
2 parents 2e58dbd + 9c12de5 commit c3f4a02

3 files changed

Lines changed: 7 additions & 6 deletions

File tree

core/src/main/scala/org/apache/spark/io/CompressionCodec.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ private[spark] object CompressionCodec {
5656
ctor.newInstance(conf).asInstanceOf[CompressionCodec]
5757
}
5858

59-
val DEFAULT_COMPRESSION_CODEC = classOf[LZFCompressionCodec].getName
59+
val DEFAULT_COMPRESSION_CODEC = classOf[SnappyCompressionCodec].getName
6060
}
6161

6262

@@ -103,7 +103,7 @@ class LZFCompressionCodec(conf: SparkConf) extends CompressionCodec {
103103
/**
104104
* :: DeveloperApi ::
105105
* Snappy implementation of [[org.apache.spark.io.CompressionCodec]].
106-
* Block size can be configured by spark.io.compression.snappy.block.size.
106+
* Block size can be configured by `spark.io.compression.snappy.block.size`.
107107
*
108108
* Note: The wire protocol for this codec is not guaranteed to be compatible across versions
109109
* of Spark. This is intended for use as an internal compression utility within a single Spark

core/src/main/scala/org/apache/spark/storage/BlockManagerMasterActor.scala

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -336,6 +336,10 @@ class BlockManagerMasterActor(val isLocal: Boolean, conf: SparkConf, listenerBus
336336
case None =>
337337
blockManagerIdByExecutor(id.executorId) = id
338338
}
339+
340+
logInfo("Registering block manager %s with %s RAM".format(
341+
id.hostPort, Utils.bytesToString(maxMemSize)))
342+
339343
blockManagerInfo(id) =
340344
new BlockManagerInfo(id, System.currentTimeMillis(), maxMemSize, slaveActor)
341345
}
@@ -432,9 +436,6 @@ private[spark] class BlockManagerInfo(
432436
// Mapping from block id to its status.
433437
private val _blocks = new JHashMap[BlockId, BlockStatus]
434438

435-
logInfo("Registering block manager %s with %s RAM".format(
436-
blockManagerId.hostPort, Utils.bytesToString(maxMem)))
437-
438439
def getStatus(blockId: BlockId) = Option(_blocks.get(blockId))
439440

440441
def updateLastSeenMs() {

core/src/test/scala/org/apache/spark/io/CompressionCodecSuite.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ class CompressionCodecSuite extends FunSuite {
4646

4747
test("default compression codec") {
4848
val codec = CompressionCodec.createCodec(conf)
49-
assert(codec.getClass === classOf[LZFCompressionCodec])
49+
assert(codec.getClass === classOf[SnappyCompressionCodec])
5050
testCodec(codec)
5151
}
5252

0 commit comments

Comments
 (0)