You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@samza.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2018/10/30 19:53:00 UTC

[jira] [Commented] (SAMZA-1971) Fix NPE in InMemorySystemProducer when message is null

    [ https://issues.apache.org/jira/browse/SAMZA-1971?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16669249#comment-16669249 ] 

ASF GitHub Bot commented on SAMZA-1971:
---------------------------------------

GitHub user bharathkk opened a pull request:

    https://github.com/apache/samza/pull/786

    SAMZA-1971: Fix NPE in partition key computation for InMemorySystemProducer

    

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/bharathkk/samza fix-inmemory-partitionkey-npe

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/samza/pull/786.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 #786
    
----
commit 71b9ad30bc3b86c7bb4e67bfd7257d9c0c1add7c
Author: bharathkk <co...@...>
Date:   2018-10-30T19:35:34Z

    Fix NPE in partition key computation for InMemorySystemProducer

----


> Fix NPE in InMemorySystemProducer when message is null
> ------------------------------------------------------
>
>                 Key: SAMZA-1971
>                 URL: https://issues.apache.org/jira/browse/SAMZA-1971
>             Project: Samza
>          Issue Type: Bug
>            Reporter: Bharath Kumarasubramanian
>            Assignee: Bharath Kumarasubramanian
>            Priority: Major
>             Fix For: 1.0
>
>
> For changelog topics, a delete on the record corresponds to an outgoing message envelope with valid key and null message. InMemorySystemProducer should handle it correctly as opposed to throwing NPE
> The order in which partition key is chosen is as follows
>  # If the partition key exists as part of OutgoingMessageEnvelope use it to compute partition hash
>  # If partitionKey is null, use the message key to compute partition hash
>  # If both partitionKey and messageKey is absent, use message to compute the partition key
> We throw exception the resulting key to compute hash code is still null.
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)