use of org.apache.flume.conf.ConfigurationException 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());
}
}
use of org.apache.flume.conf.ConfigurationException in project rocketmq-externals by apache.
the class RocketMQSink method configure.
@Override
public void configure(Context context) {
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);
producerGroup = context.getString(PRODUCER_GROUP_CONFIG, PRODUCER_GROUP_DEFAULT);
batchSize = context.getInteger(BATCH_SIZE_CONFIG, BATCH_SIZE_DEFAULT);
maxProcessTime = context.getLong(MAX_PROCESS_TIME_CONFIG, MAX_PROCESS_TIME_DEFAULT);
if (sinkCounter == null) {
sinkCounter = new SinkCounter(getName());
}
}
Aggregations