issues #64 & #66 - JRubyShellSpout in wrong package & add missing shell components in repo (hidden by bad .gitignore)
This commit is contained in:
parent
ddff6b65ae
commit
eaa2ae1982
|
@ -0,0 +1,26 @@
|
|||
package redstorm.storm.jruby;
|
||||
|
||||
import backtype.storm.task.ShellBolt;
|
||||
import backtype.storm.topology.IRichBolt;
|
||||
import backtype.storm.topology.OutputFieldsDeclarer;
|
||||
import backtype.storm.tuple.Fields;
|
||||
import java.util.Map;
|
||||
|
||||
public class JRubyShellBolt extends ShellBolt implements IRichBolt {
|
||||
private String[] _fields;
|
||||
|
||||
public JRubyShellBolt(String[] command, String[] fields) {
|
||||
super(command);
|
||||
_fields = fields;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void declareOutputFields(OutputFieldsDeclarer declarer) {
|
||||
declarer.declare(new Fields(_fields));
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> getComponentConfiguration() {
|
||||
return null;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
package redstorm.storm.jruby;
|
||||
|
||||
import backtype.storm.spout.ShellSpout;
|
||||
import backtype.storm.topology.IRichSpout;
|
||||
import backtype.storm.topology.OutputFieldsDeclarer;
|
||||
import backtype.storm.tuple.Fields;
|
||||
import java.util.Map;
|
||||
|
||||
public class JRubyShellSpout extends ShellSpout implements IRichSpout {
|
||||
private String[] _fields;
|
||||
|
||||
public JRubyShellSpout(String[] command, String[] fields) {
|
||||
super(command);
|
||||
_fields = fields;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void declareOutputFields(OutputFieldsDeclarer declarer) {
|
||||
declarer.declare(new Fields(_fields));
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> getComponentConfiguration() {
|
||||
return null;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue