Skip to content

Conversation

@LantaoJin
Copy link
Contributor

What changes were proposed in this pull request?

spark.kryo.registrator in 3.0 has a regression problem. From SPARK-12080, it supports multiple user registrators by

private val userRegistrators = conf.get("spark.kryo.registrator", "")
    .split(',').map(_.trim)
    .filter(!_.isEmpty)

But it donsn't work in 3.0. Fix it by toSequence in Kryo.scala

Why are the changes needed?

In previous Spark version (2.x), it supported multiple user registrators by

private val userRegistrators = conf.get("spark.kryo.registrator", "")
    .split(',').map(_.trim)
    .filter(!_.isEmpty)

But it doesn't work in 3.0. It's should be a regression.

Does this PR introduce any user-facing change?

No

How was this patch tested?

Existed unit tests.

@SparkQA
Copy link

SparkQA commented Jul 15, 2020

Test build #125880 has finished for PR 29123 at commit 45d1e43.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@LantaoJin
Copy link
Contributor Author

retest this please

@LantaoJin
Copy link
Contributor Author

Retest this please

@SparkQA
Copy link

SparkQA commented Jul 16, 2020

Test build #125928 has finished for PR 29123 at commit 45d1e43.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@LantaoJin
Copy link
Contributor Author

@LantaoJin
Copy link
Contributor Author

cc @cloud-fan

val KRYO_USER_REGISTRATORS = ConfigBuilder("spark.kryo.registrator")
.version("0.5.0")
.stringConf
.createOptional
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do you know which commit broke it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cloud-fan
Copy link
Contributor

thanks, merging to master/3.0!

@cloud-fan cloud-fan closed this in 26e6574 Jul 29, 2020
cloud-fan pushed a commit that referenced this pull request Jul 29, 2020
### What changes were proposed in this pull request?
`spark.kryo.registrator` in 3.0 has a regression problem. From [SPARK-12080](https://issues.apache.org/jira/browse/SPARK-12080), it supports multiple user registrators by
```scala
private val userRegistrators = conf.get("spark.kryo.registrator", "")
    .split(',').map(_.trim)
    .filter(!_.isEmpty)
```
But it donsn't work in 3.0. Fix it by `toSequence` in `Kryo.scala`

### Why are the changes needed?
In previous Spark version (2.x), it supported multiple user registrators by
```scala
private val userRegistrators = conf.get("spark.kryo.registrator", "")
    .split(',').map(_.trim)
    .filter(!_.isEmpty)
```
But it doesn't work in 3.0. It's should be a regression.

### Does this PR introduce _any_ user-facing change?
No

### How was this patch tested?
Existed unit tests.

Closes #29123 from LantaoJin/SPARK-32283.

Authored-by: LantaoJin <[email protected]>
Signed-off-by: Wenchen Fan <[email protected]>
(cherry picked from commit 26e6574)
Signed-off-by: Wenchen Fan <[email protected]>
@dongjoon-hyun
Copy link
Member

+1, late LGTM. Thank you, @LantaoJin and @cloud-fan .

cc @HeartSaVioR and @srowen

@HeartSaVioR
Copy link
Contributor

Nice find and thanks for fixing this! I have no idea why I took different way to deal with KRYO_USER_REGISTRATORS and KRYO_CLASSES_TO_REGISTER... I guess it was just a mistake. My bad.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants