flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ted Yu (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (FLINK-3210) Unnecessary call to deserializer#deserialize() in LegacyFetcher#SimpleConsumerThread#run()
Date Thu, 14 Jan 2016 17:30:39 GMT

     [ https://issues.apache.org/jira/browse/FLINK-3210?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Ted Yu updated FLINK-3210:
--------------------------
    Description: 
Here is related code:
{code}
                byte[] valueBytes;
                if (payload == null) {
                  deletedMessages++;
                  valueBytes = null;
                } else {
...
                final T value = deserializer.deserialize(keyBytes, valueBytes, fp.topic, offset);
{code}

When valueBytes is null, there is no need to call deserializer#deserialize()

  was:
Here is related code:
{code}
                byte[] valueBytes;
                if (payload == null) {
                  deletedMessages++;
                  valueBytes = null;
                } else {
...
                final T value = deserializer.deserialize(keyBytes, valueBytes, fp.topic, offset);
{code}
When valueBytes is null, there is no need to call deserializer#deserialize()


> Unnecessary call to deserializer#deserialize() in LegacyFetcher#SimpleConsumerThread#run()
> ------------------------------------------------------------------------------------------
>
>                 Key: FLINK-3210
>                 URL: https://issues.apache.org/jira/browse/FLINK-3210
>             Project: Flink
>          Issue Type: Bug
>            Reporter: Ted Yu
>            Priority: Minor
>
> Here is related code:
> {code}
>                 byte[] valueBytes;
>                 if (payload == null) {
>                   deletedMessages++;
>                   valueBytes = null;
>                 } else {
> ...
>                 final T value = deserializer.deserialize(keyBytes, valueBytes, fp.topic,
offset);
> {code}
> When valueBytes is null, there is no need to call deserializer#deserialize()



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message