From issues-return-6255-archive-asf-public=cust-asf.ponee.io@phoenix.apache.org Thu Apr 25 04:43:38 2019 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id 51A5C180668 for ; Thu, 25 Apr 2019 06:43:38 +0200 (CEST) Received: (qmail 31794 invoked by uid 500); 25 Apr 2019 04:43:37 -0000 Mailing-List: contact issues-help@phoenix.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@phoenix.apache.org Delivered-To: mailing list issues@phoenix.apache.org Received: (qmail 31785 invoked by uid 99); 25 Apr 2019 04:43:37 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 25 Apr 2019 04:43:37 +0000 From: GitBox To: issues@phoenix.apache.org Subject: [GitHub] [phoenix-queryserver] karanmehta93 commented on a change in pull request #5: PHOENIX-5255: Create Orchestrator for QueryServerCanaryTool in phoenix-queryserver project Message-ID: <155616741762.5685.4023156398500250500.gitbox@gitbox.apache.org> Date: Thu, 25 Apr 2019 04:43:37 -0000 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit karanmehta93 commented on a change in pull request #5: PHOENIX-5255: Create Orchestrator for QueryServerCanaryTool in phoenix-queryserver project URL: https://github.com/apache/phoenix-queryserver/pull/5#discussion_r278394370 ########## File path: queryserver-orchestrator/src/main/java/org/apache/phoenix/queryserver/orchestrator/QueryServerCanaryOrchestrator.java ########## @@ -0,0 +1,117 @@ +package org.apache.phoenix.queryserver.orchestrator; + +import net.sourceforge.argparse4j.ArgumentParsers; +import net.sourceforge.argparse4j.inf.ArgumentParser; +import net.sourceforge.argparse4j.inf.ArgumentParserException; +import net.sourceforge.argparse4j.inf.Namespace; +import org.apache.curator.framework.CuratorFramework; +import org.apache.curator.framework.CuratorFrameworkFactory; +import org.apache.curator.retry.BoundedExponentialBackoffRetry; + +import org.apache.curator.utils.CloseableUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.util.HashMap; +import java.util.Map; + +public class QueryServerCanaryOrchestrator { + private static final Logger logger = LoggerFactory.getLogger(QueryServerCanaryOrchestrator.class); + + private static String PATH = "/pqs/leader"; + + private static Namespace parseArgs(String[] args) { + + ArgumentParser parser = ArgumentParsers.newFor("PQS Canary Orchestrator").build() + .description("PQS Canary Orchestrator"); + + parser.addArgument("--zkpath", "-zkp").type(String.class).nargs("?").setDefault(PATH) + .help("ZKNode path default: " + PATH); + + parser.addArgument("--hostname", "-hn").type(String.class).nargs("?").help("Hostname on " Review comment: Will be good to add defaults here for hostname and port. ---------------------------------------------------------------- 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