You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by chermenin <gi...@git.apache.org> on 2016/12/16 11:52:23 UTC
[GitHub] flink pull request #3021: [FLINK-3617] Prevent NPE in CaseClassSerializer an...
GitHub user chermenin opened a pull request:
https://github.com/apache/flink/pull/3021
[FLINK-3617] Prevent NPE in CaseClassSerializer and informative error message.
To not to change current implementation of serialization now just NullFieldException has been added.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/chermenin/flink flink-3617
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/flink/pull/3021.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 #3021
----
commit 9f4dee80bfb5b5df41f211f3da8231d59310fa29
Author: Aleksandr Chermenin <al...@epam.com>
Date: 2016-12-16T11:42:50Z
[FLINK-3617] Added null value check.
----
---
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.
---
[GitHub] flink issue #3021: [FLINK-3617] Prevent NPE in CaseClassSerializer and infor...
Posted by StephanEwen <gi...@git.apache.org>.
Github user StephanEwen commented on the issue:
https://github.com/apache/flink/pull/3021
Looks like a good solution.
Since these serializers are very performance critical, I am curious what is more efficient:
- The if-null-check you implemented here
- a try/catch block that catches the nullpointer exception and throws the NullFieldException
Are you interested in microbenchmarking that?
---
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.
---
[GitHub] flink issue #3021: [FLINK-3617] Prevent NPE in CaseClassSerializer and infor...
Posted by StephanEwen <gi...@git.apache.org>.
Github user StephanEwen commented on the issue:
https://github.com/apache/flink/pull/3021
Looks good, thanks, will merge this...
---
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.
---
[GitHub] flink issue #3021: [FLINK-3617] Prevent NPE in CaseClassSerializer and infor...
Posted by chermenin <gi...@git.apache.org>.
Github user chermenin commented on the issue:
https://github.com/apache/flink/pull/3021
Yep, i'll do a benchmark to test approaches and compare them each other at this week. I will write the results here. Big thanks for your idea)
---
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.
---
[GitHub] flink issue #3021: [FLINK-3617] Prevent NPE in CaseClassSerializer and infor...
Posted by chermenin <gi...@git.apache.org>.
Github user chermenin commented on the issue:
https://github.com/apache/flink/pull/3021
@StephanEwen What do you think about merging this PR?
---
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.
---
[GitHub] flink issue #3021: [FLINK-3617] Prevent NPE in CaseClassSerializer and infor...
Posted by StephanEwen <gi...@git.apache.org>.
Github user StephanEwen commented on the issue:
https://github.com/apache/flink/pull/3021
This has been merged a while back in fdce1f319c512fc845b64cbb7cbfb10f9d899021
I forgot to add the keywork that the bot closes the pull request.
Can you manually close this pull request?
---
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.
---
[GitHub] flink issue #3021: [FLINK-3617] Prevent NPE in CaseClassSerializer and infor...
Posted by chermenin <gi...@git.apache.org>.
Github user chermenin commented on the issue:
https://github.com/apache/flink/pull/3021
I've got results and here are:
Benchmark | Mode | Cnt | Score | Error | Units
-------------------|-------|------|-----------|---------|--------
Just operation | avgt | 200 | 74.672 | 0.944 | ns/op
if-else (_not_ null value) | avgt | 200 | 915.718 | 5.534 | ns/op
try-catch (_not_ null value) | avgt | 200 | 74.183 | 0.405 | ns/op
if-else (null value) | avgt | 200 | 901.775 | 5.368 | ns/op
try-catch (null value) | avgt | 200 | 8649.317 | 40.462 | ns/op
In this way `if-else-check` always adds more than 800 nanoseconds per operation to run-time.
While `try-catch-block` doesn't slow down normal performance. We really need this option, because null value isn't normal value for us now. I will change the code in the closest future.
---
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.
---
[GitHub] flink pull request #3021: [FLINK-3617] Prevent NPE in CaseClassSerializer an...
Posted by chermenin <gi...@git.apache.org>.
Github user chermenin closed the pull request at:
https://github.com/apache/flink/pull/3021
---
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.
---