You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@storm.apache.org by ThijsMergaert <gi...@git.apache.org> on 2016/08/05 20:23:54 UTC

[GitHub] storm pull request #1613: Fix emitting of tuples from bolts with Python 3

GitHub user ThijsMergaert opened a pull request:

    https://github.com/apache/storm/pull/1613

    Fix emitting of tuples from bolts with Python 3

    In Python 3, the map() function no longer returns a list, but instead an iterable object, which is not JSON serializable.  To fix this, convert the result of the map() call to a list with the list() function.  This is still compatible with Python 2 (although will create a copy of the list).

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

    $ git pull https://github.com/ThijsMergaert/storm patch-1

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

    https://github.com/apache/storm/pull/1613.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 #1613
    
----
commit 0cd8d1da6ab53966ba158569915bc8008c85fb03
Author: Thijs Mergaert <th...@users.noreply.github.com>
Date:   2016-08-05T20:22:48Z

    Fix emitting of tuples from bolts with Python 3
    
    In Python 3, the map() function no longer returns a list, but instead an iterable object, which is not JSON serializable.  To fix this, convert the result of the map() call to a list with the list() function.  This is still compatible with Python 2 (although will create a copy of the list).

----


---
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] storm issue #1613: Fix emitting of tuples from bolts with Python 3

Posted by HeartSaVioR <gi...@git.apache.org>.
Github user HeartSaVioR commented on the issue:

    https://github.com/apache/storm/pull/1613
  
    @ThijsMergaert 
    Sorry to comment too late.
    
    I'm not sure how much python users use Storm python multi-lang directly, and what's more preferred version, 2 vs 3. If many users still rely on 2, it might be better to avoid creating list and find other workaround. (checking version and if-else?)


---
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.
---