Github user rahulsIOT commented on a diff in the pull request:

    https://github.com/apache/phoenix/pull/236#discussion_r122059868
  
    --- Diff: 
phoenix-queryserver/src/main/java/org/apache/phoenix/queryserver/server/QueryServer.java
 ---
    @@ -233,16 +240,29 @@ public int run(String[] args) throws Exception {
           // Build and start the HttpServer
           server = builder.build();
           server.start();
    +      registerToServiceProvider(hostname);
           runningLatch.countDown();
           server.join();
           return 0;
         } catch (Throwable t) {
           LOG.fatal("Unrecoverable service error. Shutting down.", t);
           this.t = t;
           return -1;
    +    } finally {
    +      deRegister();
         }
       }
     
    +  private void registerToServiceProvider(String hostName) throws Exception 
{
    +      PqsZookeeperConf pqsZookeeperConf = new 
PqsZookeeperConfImpl(getConf());
    --- End diff --
    
    I think you suggest having implementation in load balancer module and 
interface def in query server module. Then load the implementation in 
queryserver module via service loader from loadbalancer module. But, How do 
make query server dependent on load balancer module when load balancer has a 
dependency on queryserver. Is there any plugin to load the jars from 
loadbalancer into queryserver target ? Please advise.  


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to