Skip to content

Conversation

@steven-aerts
Copy link
Contributor

@steven-aerts steven-aerts commented Jun 11, 2021

The change introduced in spark 1.9.0 which changed:

SpecificData.get()

into:

SpecificData.getForSchema(schema)

introduced a significant performance degradation in environments where the class belonging to the schema is provided by a different classloader then the classloader containing SpecificData.

In this patch we use the classCache of the default SpecificData so the sometimes expensive classloader codepath is cached.

Make sure you have checked all steps below.

Jira

Tests

  • My PR does not need testing for this extremely good reason: performance optimization which is tested

Commits

  • My commits all reference Jira issues in their subject lines. In addition, my commits follow the guidelines from "How to write a good git commit message":
    1. Subject is separated from body by a blank line
    2. Subject is limited to 50 characters (not including Jira issue reference)
    3. Subject does not end with a period
    4. Subject uses the imperative mood ("add", not "adding")
    5. Body wraps at 72 characters
    6. Body explains "what" and "why", not "how"

Documentation

  • In case of new functionality, my PR adds documentation that describes how to use it.
    • All the public functions and the classes in the PR contain Javadoc that explain what it does

The change introduced in spark 1.9.0 which changed:

  SpecificData.get()

into:

  SpecificData.getForSchema(schema)

introduced a significant performance degradation in environments where
the class of `other` is provided by a different classloader then the
classloader containing `SpecificData`.

In this patch we use the classCache of the default SpecificData so the
sometimes expensive classloader codepath is cached.
@github-actions github-actions bot added the Java Pull Requests for Java binding label Jun 11, 2021
@steven-aerts
Copy link
Contributor Author

Fixed by AVRO-3186 in #1304

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

Labels

Java Pull Requests for Java binding

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant