phoenix-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@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
Date Thu, 25 Apr 2019 04:43:37 GMT
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

Mime
View raw message