public static void main()

in phoenix-queryserver-orchestrator/src/main/java/org/apache/phoenix/queryserver/orchestrator/QueryServerCanaryOrchestrator.java [101:139]


    public static void main(String[] args) {

        LOGGER.info("Starting PQS Canary Orchestrator...");
        ToolWrapper tool = new ToolWrapper();
        try {
            Namespace cArgs = parseArgs(args);
            if (cArgs == null) {
                throw new RuntimeException("Argument parsing failed");
            }

            Map<String, String> params = getArgs(cArgs);
            ZK_PATH = params.get("zkpath");

            CuratorFramework curatorClient = CuratorFrameworkFactory.newClient(params.get("zkurl"), new
                    BoundedExponentialBackoffRetry(1000, 60000, 50000));
            curatorClient.start();

            TestExecutorClient testExecutorClient = new TestExecutorClient(curatorClient, ZK_PATH, params, tool);

            try {
                testExecutorClient.start();
                while (!testExecutorClient.isDone()) {
                    Thread.sleep(1000);
                }
            } catch (Exception ex) {
                LOGGER.error("The Main thread was interrupted", ex);
            } finally {
                LOGGER.info("Shutdown Hook for PQS Canary Orchestrator running...");
                CloseableUtils.closeQuietly(testExecutorClient);
                CloseableUtils.closeQuietly(curatorClient);
                LOGGER.info("Closed Curator Client");
            }

        } catch (Exception e) {
            LOGGER.error("Error in PQS Canary Orchestrator. ", e);
            throw new RuntimeException(e);
        }
        LOGGER.info("Exiting PQS Canary Orchestrator...");
    }