You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@storm.apache.org by rukaya <gi...@git.apache.org> on 2017/07/16 18:21:18 UTC

[GitHub] storm pull request #2216: Update storm.py to be python3 compatible

GitHub user rukaya opened a pull request:

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

    Update storm.py to be python3 compatible

    Function `emitBolt()` emits a `map`, which is not json serializeble in python3. It should be changed to return a `list` in order to be json serializeble.

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

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

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

    https://github.com/apache/storm/pull/2216.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 #2216
    
----
commit 29fe7fbaef8421b7ec16f09f49645623a33b72a2
Author: rukaya <ru...@users.noreply.github.com>
Date:   2017-07-16T18:20:03Z

    Update storm.py to be python3 compatible  
    
    Function emitBolt() emits map, which is not json serializeble in python3. It should be changed to return a list in order to be json serializeble.

----


---
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 #2216: Update storm.py to be python3 compatible

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

    https://github.com/apache/storm/pull/2216
  
    Hi @rukaya. Thanks for the fix, it looks good. Could you file an issue on jira at https://issues.apache.org/jira and update this PR and the commit message to reflect the issue number?


---
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 pull request #2216: #2645 -- Update storm.py to be python3 compatible

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

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


---
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 #2216: #2645 -- Update storm.py to be python3 compatible

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

    https://github.com/apache/storm/pull/2216
  
    @srdo, I just created a jira issue: https://issues.apache.org/jira/browse/STORM-2645. I also updated the commit message.


---
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 #2216: Update storm.py to be python3 compatible

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

    https://github.com/apache/storm/pull/2216
  
    ```
    diff --git a/storm-multilang/python/src/main/resources/resources/storm.py b/storm-multilang/python/src/main/resources/resources/storm.py
    index 9106390b4..224ed120b 100755
    --- a/storm-multilang/python/src/main/resources/resources/storm.py
    +++ b/storm-multilang/python/src/main/resources/resources/storm.py
    @@ -109,7 +109,7 @@ def emitBolt(tup, stream=None, anchors = [], directTask=None):
         m = {"command": "emit"}
         if stream is not None:
             m["stream"] = stream
    -    m["anchors"] = map(lambda a: a.id, anchors)
    +    m["anchors"] = [a.id for a in anchors]
         if directTask is not None:
             m["task"] = directTask
         m["tuple"] = tup
    ```
    
    Is what I did to port it to master for testing on master.


---
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 #2216: Update storm.py to be python3 compatible

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

    https://github.com/apache/storm/pull/2216
  
    @rukaya 
    
    I am +1 on the change, but we need to have a the change go into master before it goes into any of the 1.x branches.  Do you have a pull request for master that I missed?


---
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 #2216: Update storm.py to be python3 compatible

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

    https://github.com/apache/storm/pull/2216
  
    @revans2, I just created a pull request from the master branch: https://github.com/apache/storm/pull/2229


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