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

    https://github.com/apache/phoenix/pull/236#discussion_r122505939
  
    --- 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 --
    
    Question: How to make the IT test pass for Queryserver? In the IT tests, 
the queryserver loads up and registers itself to a ZKTestingServer . This uses 
curator client which is part of Registry class implementation. Now, this 
implementation is part of loadbalancer module. One way is to provide a mocked 
out implementation of Registry and LoadBalancerConf in the queryserver module. 
Do you think something else from your experience ?


---
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