[GitHub] [incubator-druid] gianm commented on a change in pull request #7328: EmitterModule: Throw an error on invalid emitter types.

2019-04-28 Thread GitBox
gianm commented on a change in pull request #7328: EmitterModule: Throw an 
error on invalid emitter types.
URL: https://github.com/apache/incubator-druid/pull/7328#discussion_r279212328
 
 

 ##
 File path: 
server/src/main/java/org/apache/druid/server/emitter/EmitterModule.java
 ##
 @@ -130,10 +131,10 @@ public void inject(Injector injector)
 {
   final List> emitterBindings = 
injector.findBindingsByType(new TypeLiteral(){});
 
-  emitter = findEmitter(emitterType, emitterBindings);
-
-  if (emitter == null) {
+  if (Strings.isNullOrEmpty(emitterType)) {
 
 Review comment:
   I added comments for the above points.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

-
To unsubscribe, e-mail: commits-unsubscr...@druid.apache.org
For additional commands, e-mail: commits-h...@druid.apache.org



[GitHub] [incubator-druid] gianm commented on a change in pull request #7328: EmitterModule: Throw an error on invalid emitter types.

2019-04-04 Thread GitBox
gianm commented on a change in pull request #7328: EmitterModule: Throw an 
error on invalid emitter types.
URL: https://github.com/apache/incubator-druid/pull/7328#discussion_r272303150
 
 

 ##
 File path: 
server/src/main/java/org/apache/druid/server/emitter/EmitterModule.java
 ##
 @@ -130,10 +131,10 @@ public void inject(Injector injector)
 {
   final List> emitterBindings = 
injector.findBindingsByType(new TypeLiteral(){});
 
-  emitter = findEmitter(emitterType, emitterBindings);
-
-  if (emitter == null) {
+  if (Strings.isNullOrEmpty(emitterType)) {
 
 Review comment:
   Oops, I forgot to reply here. I did it this way because we _do_ want to 
default to noop if it's null (not specified), and I was unsure how good the 
null vs empty distinction is preserved throughout the entire property handling 
system. (Like, I didn't want some unexpected behavior to happen if, somewhere, 
a null got translated to an empty string or vice versa.)


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

-
To unsubscribe, e-mail: commits-unsubscr...@druid.apache.org
For additional commands, e-mail: commits-h...@druid.apache.org