Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MINOR] Use putAll to populate Properties #48993

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -504,9 +504,7 @@ class KafkaTestUtils(
props.put("sasl.enabled.mechanisms", "GSSAPI,SCRAM-SHA-512")
}

// Can not use properties.putAll(propsMap.asJava) in scala-2.12
// See https://github.com/scala/bug/issues/10418
withBrokerProps.foreach { case (k, v) => props.put(k, v) }
props.putAll(withBrokerProps.asJava)
props
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -283,9 +283,7 @@ object HiveScriptIOSchema extends HiveInspectors {
propsMap = propsMap + (serdeConstants.LIST_COLUMN_TYPES -> columnTypesNames)

val properties = new Properties()
// Can not use properties.putAll(propsMap.asJava) in scala-2.12
// See https://github.com/scala/bug/issues/10418
propsMap.foreach { case (k, v) => properties.put(k, v) }
properties.putAll(propsMap.asJava)
serde.initialize(null, properties)

serde
Expand All @@ -299,9 +297,7 @@ object HiveScriptIOSchema extends HiveInspectors {
val instance = Utils.classForName[RecordReader](klass).getConstructor().
newInstance()
val props = new Properties()
// Can not use props.putAll(outputSerdeProps.toMap.asJava) in scala-2.12
// See https://github.com/scala/bug/issues/10418
ioschema.outputSerdeProps.toMap.foreach { case (k, v) => props.put(k, v) }
props.putAll(ioschema.outputSerdeProps.toMap.asJava)
instance.initialize(inputStream, conf, props)
instance
}
Expand Down