public class FluxShellSpout extends ShellSpout implements IRichSpout
A generic ShellSpout
implementation that allows you specify output fields and even streams without having to subclass ShellSpout
to do so.
LOG
Constructor and Description |
---|
FluxShellSpout(String[] command)
Create a ShellSpout with command line arguments
|
FluxShellSpout(String[] args,
String[] outputFields)
Create a ShellSpout with command line arguments and output fields
|
Modifier and Type | Method and Description |
---|---|
void |
declareOutputFields(OutputFieldsDeclarer declarer) |
Map<String,Object> |
getComponentConfiguration() |
void |
setDefaultStream(String[] outputFields)
Set default stream outputFields, this method is called from YAML file:
|
void |
setNamedStream(String name,
String[] outputFields)
Set custom named stream outputFields, this method is called from YAML file:
|
ack, activate, close, deactivate, fail, nextTuple, open, setEnv
public FluxShellSpout(String[] command)
Create a ShellSpout with command line arguments
command
- Command line arguments for the boltpublic void setDefaultStream(String[] outputFields)
Set default stream outputFields, this method is called from YAML file:
spouts:
- className: org.apache.storm.flux.wrappers.bolts.FluxShellSpout
id: my_spout
constructorArgs:
- [python, my_spout.py]
configMethods:
- name: setDefaultStream
args:
- [word, count]
outputFields
- Names of fields the spout will emit (if any) in default stream.public void setNamedStream(String name, String[] outputFields)
Set custom named stream outputFields, this method is called from YAML file:
spouts:
- className: org.apache.storm.flux.wrappers.bolts.FluxShellSpout
id: my_spout
constructorArgs:
- [python, my_spout.py]
configMethods:
- name: setNamedStream
args:
- first
- [word, count]
name
- Name of stream the spout will emit into.outputFields
- Names of fields the spout will emit in custom named stream.public void declareOutputFields(OutputFieldsDeclarer declarer)
declareOutputFields
in interface IComponent
public Map<String,Object> getComponentConfiguration()
getComponentConfiguration
in interface IComponent
Copyright © 2016 The Apache Software Foundation. All Rights Reserved.