[
https://issues.apache.org/jira/browse/FLUME-2857?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15611370#comment-15611370
]
Tristan Stevens commented on FLUME-2857:
----------------------------------------
Thanks [~bessbd]
As a quick test, I've just inspected the following sources/sinks/channels:
:~/Git/flume$ find . -name '*.java' | xargs grep -C3 'putAll' | grep
getSubProperties
./flume-ng-channels/flume-jdbc-channel/src/main/java/org/apache/flume/channel/jdbc/impl/JdbcChannelProviderImpl.java-
Map<String, String> sysPropsNew = context.getSubProperties(
./flume-ng-channels/flume-kafka-channel/src/main/java/org/apache/flume/channel/kafka/KafkaChannel.java:
producerProps.putAll(ctx.getSubProperties(KAFKA_PRODUCER_PREFIX));
./flume-ng-channels/flume-kafka-channel/src/main/java/org/apache/flume/channel/kafka/KafkaChannel.java:
consumerProps.putAll(ctx.getSubProperties(KAFKA_CONSUMER_PREFIX));
./flume-ng-configuration/src/main/java/org/apache/flume/conf/sink/SinkGroupConfiguration.java-
Map<String, String> params = context.getSubProperties(
./flume-ng-sinks/flume-ng-elasticsearch-sink/src/main/java/org/apache/flume/sink/elasticsearch/ElasticSearchSink.java:
elasticSearchClientContext.putAll(context.getSubProperties(CLIENT_PREFIX));
./flume-ng-sinks/flume-ng-elasticsearch-sink/src/main/java/org/apache/flume/sink/elasticsearch/ElasticSearchSink.java:
serializerContext.putAll(context.getSubProperties(SERIALIZER_PREFIX));
./flume-ng-sinks/flume-ng-elasticsearch-sink/src/main/java/org/apache/flume/sink/elasticsearch/ElasticSearchSink.java-
context.getSubProperties(INDEX_NAME_BUILDER_PREFIX));
./flume-ng-sinks/flume-ng-hbase-sink/src/main/java/org/apache/flume/sink/hbase/AsyncHBaseSink.java:
serializerContext.putAll(context.getSubProperties(
./flume-ng-sinks/flume-ng-hbase-sink/src/main/java/org/apache/flume/sink/hbase/HBaseSink.java:
serializerContext.putAll(context.getSubProperties(
./flume-ng-sinks/flume-ng-kafka-sink/src/main/java/org/apache/flume/sink/kafka/KafkaSink.java:
kafkaProps.putAll(context.getSubProperties(KAFKA_PRODUCER_PREFIX));
./flume-ng-sources/flume-kafka-source/src/main/java/org/apache/flume/source/kafka/KafkaSource.java:
kafkaProps.putAll(ctx.getSubProperties(KafkaSourceConstants.KAFKA_CONSUMER_PREFIX));
All of those above seem to be okay (i.e. they are preceded by a
re-initialisation). I would think that as most things use
Context.get{type}(String name, [default-value]) we should be okay.
[~bessbd] - thanks for pointing me in the right direction on this one - much
appreciated.
> Kafka Channel does not restore default values when live update config
> ---------------------------------------------------------------------
>
> Key: FLUME-2857
> URL: https://issues.apache.org/jira/browse/FLUME-2857
> Project: Flume
> Issue Type: Bug
> Components: Channel
> Reporter: Tristan Stevens
> Assignee: Tristan Stevens
> Attachments: FLUME-2857.patch
>
>
> Been using the following config:
> {noformat}
> tier1.channels.channel1.type = org.apache.flume.channel.kafka.KafkaChannel
> tier1.channels.channel1.capacity = 10000
> tier1.channels.channel1.transactionCapacity = 10000
> tier1.channels.channel1.brokerList =
> 10.0.0.64:9092,10.0.0.65:9092,10.0.0.66:9092
> tier1.channels.channel1.topic = flume.aggregator.channel
> tier1.channels.channel1.zookeeperConnect = 10.0.0.64:2181
> tier1.channels.channel1.kafka.producer.type=async
> tier1.channels.channel1.kafka.batch.num.messages=200
> {noformat}
> If I remove the producer.type and batch.num.messages (i.e. restore them to
> default values) when doing a live update config the new values do not take
> effect.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)