Skip to content

Commit dbe6b3f

Browse files
committed
fix comments
1 parent 8ede045 commit dbe6b3f

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

core/src/main/scala/org/apache/spark/broadcast/TorrentBroadcast.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,8 @@ private[spark] class TorrentBroadcast[T: ClassTag](obj: T, id: Long)
9999
private def calcChecksum(block: ByteBuffer): Int = {
100100
val adler = new Adler32()
101101
if (block.hasArray) {
102-
adler.update(block.array, block.arrayOffset + block.position(), block.limit() - block.position())
102+
adler.update(block.array, block.arrayOffset + block.position(), block.limit()
103+
- block.position())
103104
} else {
104105
val bytes = new Array[Byte](block.remaining())
105106
block.duplicate.get(bytes)

sql/hive/src/main/scala/org/apache/spark/sql/hive/execution/ScriptTransformationExec.scala

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -412,9 +412,9 @@ case class HiveScriptIOSchema (
412412
propsMap = propsMap + (serdeConstants.LIST_COLUMN_TYPES -> columnTypesNames)
413413

414414
val properties = new Properties()
415-
// properties.putAll(propsMap.asJava)
416-
// see https://github.com/apache/kafka/pull/3647
417-
propsMap.foreach{ case (k, v) => properties.put(k, v) }
415+
// Can not use properties.putAll(propsMap.asJava) in scala-2.12
416+
// See https://github.com/scala/bug/issues/10418
417+
propsMap.foreach { case (k, v) => properties.put(k, v) }
418418
serde.initialize(null, properties)
419419

420420
serde
@@ -426,8 +426,8 @@ case class HiveScriptIOSchema (
426426
recordReaderClass.map { klass =>
427427
val instance = Utils.classForName(klass).newInstance().asInstanceOf[RecordReader]
428428
val props = new Properties()
429-
// props.putAll(outputSerdeProps.toMap.asJava)
430-
// see https://github.com/apache/kafka/pull/3647
429+
// Can not use props.putAll(outputSerdeProps.toMap.asJava) in scala-2.12
430+
// See https://github.com/scala/bug/issues/10418
431431
outputSerdeProps.toMap.foreach { case (k, v) => props.put(k, v) }
432432
instance.initialize(inputStream, conf, props)
433433
instance

0 commit comments

Comments
 (0)