Search in sources :

Example 1 with SystemBolt

use of backtype.storm.metric.SystemBolt in project jstorm by alibaba.

the class Common method add_system_components.

public static StormTopology add_system_components(StormTopology topology) {
    // generate inputs
    Map<GlobalStreamId, Grouping> inputs = new HashMap<GlobalStreamId, Grouping>();
    // generate outputs
    HashMap<String, StreamInfo> outputs = new HashMap<String, StreamInfo>();
    //ArrayList<String> fields = new ArrayList<String>();
    outputs.put(Constants.SYSTEM_TICK_STREAM_ID, Thrift.outputFields(JStormUtils.mk_list("rate_secs")));
    outputs.put(Constants.METRICS_TICK_STREAM_ID, Thrift.outputFields(JStormUtils.mk_list("interval")));
    outputs.put(Constants.CREDENTIALS_CHANGED_STREAM_ID, Thrift.outputFields(JStormUtils.mk_list("creds")));
    // ComponentCommon common = new ComponentCommon(inputs, outputs);
    IBolt ackerbolt = new SystemBolt();
    Bolt bolt = Thrift.mkBolt(inputs, ackerbolt, outputs, Integer.valueOf(0));
    topology.put_to_bolts(Constants.SYSTEM_COMPONENT_ID, bolt);
    add_system_streams(topology);
    return topology;
}
Also used : IBolt(backtype.storm.task.IBolt) ShellBolt(backtype.storm.task.ShellBolt) IBolt(backtype.storm.task.IBolt) SystemBolt(backtype.storm.metric.SystemBolt) SystemBolt(backtype.storm.metric.SystemBolt)

Aggregations

SystemBolt (backtype.storm.metric.SystemBolt)1 IBolt (backtype.storm.task.IBolt)1 ShellBolt (backtype.storm.task.ShellBolt)1