You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by GitBox <gi...@apache.org> on 2019/04/15 13:20:32 UTC

[GitHub] [incubator-druid] leventov commented on a change in pull request #7222: refactor lookups to be more chill to router

leventov commented on a change in pull request #7222: refactor lookups to be more chill to router
URL: https://github.com/apache/incubator-druid/pull/7222#discussion_r275356034
 
 

 ##########
 File path: services/src/main/java/org/apache/druid/cli/CliRouter.java
 ##########
 @@ -80,44 +79,39 @@ public CliRouter()
         new QueryRunnerFactoryModule(),
         new JettyHttpClientModule("druid.router.http", Router.class),
         JettyHttpClientModule.global(),
-        new Module()
-        {
-          @Override
-          public void configure(Binder binder)
-          {
-            binder.bindConstant().annotatedWith(Names.named("serviceName")).to("druid/router");
-            binder.bindConstant().annotatedWith(Names.named("servicePort")).to(8888);
-            binder.bindConstant().annotatedWith(Names.named("tlsServicePort")).to(9088);
+        binder -> {
 
 Review comment:
   I'm not sure an anonymous class conversion to a lambda makes code better in this case. You lose visibility into the fact that this lambda is a `Module` and that the method is `configure()`, making the code more cryptic, IMO.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

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