Java Code Examples for backtype.storm.Config.TOPOLOGY_METRICS_CONSUMER_REGISTER

The following are Jave code examples for showing how to use TOPOLOGY_METRICS_CONSUMER_REGISTER of the backtype.storm.Config class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
+ Save this method
Example 1
Project: jstorm-0.9.6.3-   File: MetricsConsumerBolt.java   View Source Code Vote up 6 votes
@Override
public void prepare(Map stormConf, TopologyContext context,
		OutputCollector collector) {
	try {
		_metricsConsumer = (IMetricsConsumer) Class.forName(
				_consumerClassName).newInstance();
	} catch (Exception e) {
		throw new RuntimeException(
				"Could not instantiate a class listed in config under section "
						+ Config.TOPOLOGY_METRICS_CONSUMER_REGISTER
						+ " with fully qualified name "
						+ _consumerClassName, e);
	}
	_metricsConsumer.prepare(stormConf, _registrationArgument, context,
			collector);
	_collector = collector;
}
 
Example 2
Project: learn_jstorm   File: MetricsConsumerBolt.java   View Source Code Vote up 6 votes
@Override
public void prepare(Map stormConf, TopologyContext context,
		OutputCollector collector) {
	try {
		_metricsConsumer = (IMetricsConsumer) Class.forName(
				_consumerClassName).newInstance();
	} catch (Exception e) {
		throw new RuntimeException(
				"Could not instantiate a class listed in config under section "
						+ Config.TOPOLOGY_METRICS_CONSUMER_REGISTER
						+ " with fully qualified name "
						+ _consumerClassName, e);
	}
	_metricsConsumer.prepare(stormConf, _registrationArgument, context,
			(IErrorReporter) collector);
	_collector = collector;
}
 
Example 3
Project: Tstream   File: MetricsConsumerBolt.java   View Source Code Vote up 6 votes
@Override
public void prepare(Map stormConf, TopologyContext context,
		OutputCollector collector) {
	try {
		_metricsConsumer = (IMetricsConsumer) Class.forName(
				_consumerClassName).newInstance();
	} catch (Exception e) {
		throw new RuntimeException(
				"Could not instantiate a class listed in config under section "
						+ Config.TOPOLOGY_METRICS_CONSUMER_REGISTER
						+ " with fully qualified name "
						+ _consumerClassName, e);
	}
	_metricsConsumer.prepare(stormConf, _registrationArgument, context,
			(IErrorReporter) collector);
	_collector = collector;
}
 
Example 4
Project: jstrom   File: MetricsConsumerBolt.java   View Source Code Vote up 5 votes
@Override
public void prepare(Map stormConf, TopologyContext context, OutputCollector collector) {
    try {
        _metricsConsumer = (IMetricsConsumer) Class.forName(_consumerClassName).newInstance();
    } catch (Exception e) {
        throw new RuntimeException("Could not instantiate a class listed in config under section " + Config.TOPOLOGY_METRICS_CONSUMER_REGISTER
                + " with fully qualified name " + _consumerClassName, e);
    }
    _metricsConsumer.prepare(stormConf, _registrationArgument, context, (IErrorReporter) collector);
    _collector = collector;
}