gatorsmile commented on a change in pull request #25787: [SPARK-29081] Replace
calls to SerializationUtils.clone on properties with a faster implementation
URL: https://github.com/apache/spark/pull/25787#discussion_r324396180
##########
File path: core/src/main/scala/org/apache/spark/util/Utils.scala
##########
@@ -2950,6 +2950,13 @@ private[spark] object Utils extends Logging {
val codec = codecFactory.getCodec(path)
codec == null || codec.isInstanceOf[SplittableCompressionCodec]
}
+
+ /** Create a new properties object with the same values as `props` */
+ def cloneProperties(props: Properties): Properties = {
+ val resultProps = new Properties()
+ resultProps.putAll(props)
Review comment:
```
[ERROR] [Error]
/home/runner/work/spark/spark/core/src/main/scala/org/apache/spark/util/Utils.scala:2957:
ambiguous reference to overloaded definition,
both method putAll in class Properties of type (x$1: java.util.Map[_, _])Unit
and method putAll in class Hashtable of type (x$1: java.util.Map[_ <:
Object, _ <: Object])Unit
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]