Search in sources :

Example 1 with SourceCounter

use of org.apache.flume.instrumentation.SourceCounter in project rocketmq-externals by apache.

the class RocketMQSource method doConfigure.

@Override
protected void doConfigure(Context context) throws FlumeException {
    nameServer = context.getString(NAME_SERVER_CONFIG);
    if (nameServer == null) {
        throw new ConfigurationException("NameServer must not be null");
    }
    topic = context.getString(TOPIC_CONFIG, TOPIC_DEFAULT);
    tag = context.getString(TAG_CONFIG, TAG_DEFAULT);
    consumerGroup = context.getString(CONSUMER_GROUP_CONFIG, CONSUMER_GROUP_DEFAULT);
    messageModel = context.getString(MESSAGE_MODEL_CONFIG, MESSAGE_MODEL_DEFAULT);
    batchSize = context.getInteger(BATCH_SIZE_CONFIG, BATCH_SIZE_DEFAULT);
    if (sourceCounter == null) {
        sourceCounter = new SourceCounter(getName());
    }
}
Also used : ConfigurationException(org.apache.flume.conf.ConfigurationException) SourceCounter(org.apache.flume.instrumentation.SourceCounter)

Aggregations

ConfigurationException (org.apache.flume.conf.ConfigurationException)1 SourceCounter (org.apache.flume.instrumentation.SourceCounter)1