You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kafka.apache.org by ijuma <gi...@git.apache.org> on 2017/06/02 02:07:01 UTC
[GitHub] kafka pull request #83: KAFKA-1595; Remove deprecated and slower scala JSON ...
GitHub user ijuma reopened a pull request:
https://github.com/apache/kafka/pull/83
KAFKA-1595; Remove deprecated and slower scala JSON parser
Tested that we only use Jackson methods introduced in 2.0 in the main codebase by compiling it with the older version locally. We use a constructor introduced in 2.4 in one test, but I didn't remove it as it seemed harmless. The reasoning for this is explained in the mailing list thread:
http://search-hadoop.com/m/uyzND1FWbWw1qUbWe
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/ijuma/kafka kafka-1595-remove-deprecated-json-parser-jackson
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/kafka/pull/83.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #83
----
commit bdceb1080ef78258c81bb3b8405be1f5e07a12b1
Author: Ismael Juma <is...@juma.me.uk>
Date: 2015-07-17T10:43:22Z
Update to JUnit 4.12.
It includes `assertNotEquals`, which is used in a subsequent
commit.
commit 117cd1db07798d5d8ff021fa2a1569a301d775e6
Author: Ismael Juma <is...@juma.me.uk>
Date: 2015-07-17T11:03:00Z
Introduce `testJsonParse`
Simple test that shows existing behaviour.
commit 26b0525df2c04b0ffd7718b1ef31b94ce12e486c
Author: Ismael Juma <is...@juma.me.uk>
Date: 2015-07-17T11:05:00Z
KAFKA-1595; Remove deprecated and slower scala JSON parser from kafka.consumer.TopicCount
A thin wrapper over Jackson's Tree Model API is used as the replacement. This wrapper
increases safety while providing a simple, but powerful API through the usage of the
`DecodeJson` type class. Even though this has a maintenance cost, it makes the API
much more convenient from Scala. A number of tests were added to verify the
behaviour of this wrapper.
The Scala module for Jackson doesn't provide any help for our current usage, so we don't
depend on it.
An attempt has been made to maintain the existing behaviour regarding when exceptions
are thrown. There are a number of cases where `JsonMappingException` will be thrown
instead of `ClassCastException`, however. It is expected that users would not try to catch
`ClassCastException`.
commit 8a952c31866933fd769840221293ba9c95fed162
Author: Ismael Juma <is...@juma.me.uk>
Date: 2015-07-17T11:06:00Z
Minor clean-ups in `Json.encode`
----
---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---