Skip to content

Fix a NPE using kafka emitter extension#4608

Merged
jihoonson merged 3 commits intoapache:masterfrom
wywlds:fix-npe
Aug 8, 2017
Merged

Fix a NPE using kafka emitter extension#4608
jihoonson merged 3 commits intoapache:masterfrom
wywlds:fix-npe

Conversation

@wywlds
Copy link
Copy Markdown
Contributor

@wywlds wywlds commented Jul 27, 2017

I found this exception when using kafka emitter according to doc kafka-emitter.
It said "druid.emitter.kafka.producer.config" is not required, so I didn't set it. As a result I got an NPE exception when starting up my overlord.

@b-slim
Copy link
Copy Markdown
Contributor

b-slim commented Jul 27, 2017

@wywlds thanks can you please fill the CLA http://druid.io/community/cla.html

@wywlds
Copy link
Copy Markdown
Contributor Author

wywlds commented Jul 28, 2017

@b-slim Hi, I already filled the form when I created a pull-request last weekend.

@niketh
Copy link
Copy Markdown
Contributor

niketh commented Jul 29, 2017

👍

this.alertTopic = Preconditions.checkNotNull(alertTopic, "alert.topic can not be null");
this.clusterName = clusterName;
this.kafkaProducerConfig = kafkaProducerConfig;
this.kafkaProducerConfig = kafkaProducerConfig == null? ImmutableMap.<String,String>of() : kafkaProducerConfig;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please annotate kafkaProducerConfig parameter as @Nullable

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@leventov Thank you for the review, I added @Nullable in the latest commit.

@jihoonson jihoonson merged commit f8dcb05 into apache:master Aug 8, 2017
@jon-wei jon-wei added this to the 0.11.0 milestone Oct 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants