Github user HyukjinKwon commented on a diff in the pull request:
https://github.com/apache/spark/pull/12701#discussion_r61186507
--- Diff: core/src/main/scala/org/apache/spark/SparkConf.scala ---
@@ -191,7 +191,7 @@ class SparkConf(loadDefaults: Boolean) extends
Cloneable with Logging {
*/
def registerKryoClasses(classes: Array[Class[_]]): SparkConf = {
val allClassNames = new LinkedHashSet[String]()
- allClassNames ++= get("spark.kryo.classesToRegister",
"").split(',').filter(!_.isEmpty)
+ allClassNames ++= get("spark.kryo.classesToRegister",
"").split(',').trim.filter(!_.isEmpty)
--- End diff --
Isn't `trim` being applied to `Array[String]`?
I think this should be `.split(',').map(_.trim)`
```scala
scala> "A, B, C".split(",").trim
<console>:8: error: value trim is not a member of Array[String]
"A, B, C".split(",").trim
^
```
```scala
scala> "A, B, C".split(",").map(_.trim)
res2: Array[String] = Array(A, B, C)
```
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]