Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#2645 -- Update storm.py to be python3 compatible #2216

Merged
merged 1 commit into from Jul 21, 2017

Conversation

@rukaya
Copy link
Contributor

commented Jul 16, 2017

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.

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

This comment has been minimized.

Copy link
Contributor

commented Jul 19, 2017

@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?

@srdo

This comment has been minimized.

Copy link
Contributor

commented Jul 19, 2017

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?

@revans2

This comment has been minimized.

Copy link
Contributor

commented Jul 19, 2017

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.

@rukaya

This comment has been minimized.

Copy link
Contributor Author

commented Jul 19, 2017

@revans2, I just created a pull request from the master branch: #2229

@rukaya rukaya changed the title Update storm.py to be python3 compatible #2645 -- Update storm.py to be python3 compatible Jul 19, 2017

@rukaya

This comment has been minimized.

Copy link
Contributor Author

commented Jul 19, 2017

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

@revans2
Copy link
Contributor

left a comment

+1

@asfgit asfgit merged commit 29fe7fb into apache:1.1.x-branch Jul 21, 2017

1 check failed

continuous-integration/travis-ci/pr The Travis CI build failed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.