package org.apache.storm.flux.bolts;

import backtype.storm.task.ShellBolt;
import backtype.storm.topology.IRichBolt;
import backtype.storm.topology.OutputFieldsDeclarer;

import java.util.Map;

public class GenericShellBolt extends ShellBolt implements IRichBolt{

    public GenericShellBolt(String[] command){
        super(command);
    }

    @Override
    public void declareOutputFields(OutputFieldsDeclarer outputFieldsDeclarer) {

    }

    @Override
    public Map<String, Object> getComponentConfiguration() {
        return null;
    }
}

@@ -163,16 +163,52 @@
 eclarer;
+%0Aimport backtype.storm.tuple.Fields;
 %0A%0Aimport
@@ -293,16 +293,51 @@
 ichBolt%7B
+%0A    private String%5B%5D outputFields;
 %0A%0A    pu
@@ -374,16 +374,39 @@
  command
+, String%5B%5D outputFields
 )%7B%0A     
@@ -424,16 +424,58 @@
 mmand);%0A
+        this.outputFields = outputFields;%0A
     %7D%0A%0A 
@@ -548,32 +548,76 @@
 rer 
-outputFieldsDeclarer) %7B%0A
+declarer) %7B%0A        declarer.declare(new Fields(this.outputFields));
 %0A   

update contructor to incude declared fields.