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

Emitting multiple fields from R doesn't work as expected #4

Open
filip-andrei opened this issue May 30, 2014 · 0 comments
Open

Emitting multiple fields from R doesn't work as expected #4

filip-andrei opened this issue May 30, 2014 · 0 comments

Comments

@filip-andrei
Copy link

If tuple$output only contains a single element, then everything looks as expected.
However if output is a multi-element vector, the output is still a single-element list in which that element is also a list containing all of the emitted items:

t$output = vector(mode="character", length=4);

for(i in 1:3){
t$output[i] = t$input[i];
} t$output[4] = as.numeric(t$input[3]) > 200;

s$emit(t);

produces the following log:
14282 [Thread-18] INFO backtype.storm.daemon.executor - Processing received message source: spout:5, stream: default, id: {}, [test, 01.01.2003 01:39:00, 4597]
14292 [Thread-27] INFO backtype.storm.daemon.task - Emitting: operationalFilter default [["test","01.01.2003 01:39:00","4597","TRUE"]]

This poses a problem if there's any field grouping to be done on that bolt's output.

EDIT:
A related issue would also be that if t$output[i] is also a multi-element vector, only the first element gets added to the output:

t$output[1] = c(1, 2, 3);
t$output[2] = c("A", "B", "C");

s$emit(t);

produces:
8917 [Thread-23] INFO backtype.storm.daemon.task - Emitting: operationalFilter default [["1","A"]]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant