Package com.facebook.presto.client

Examples of com.facebook.presto.client.ClientSession


                true);
    }

    protected ClientSession getSampledClientSession()
    {
        return new ClientSession(
                coordinator.getBaseUrl(),
                SESSION.getUser(),
                SESSION.getSource(),
                SESSION.getCatalog(),
                "sampled",
View Full Code Here


        Closeables.closeQuietly(discoveryServer);
    }

    protected ClientSession getClientSession()
    {
        return new ClientSession(coordinator.getBaseUrl(),
                SESSION.getUser(),
                SESSION.getSource(),
                SESSION.getCatalog(),
                SESSION.getSchema(),
                SESSION.getTimeZoneKey().getId(),
View Full Code Here

        return prestoServer;
    }

    public ClientSession toClientSession(Session connectorSession)
    {
        return new ClientSession(
                prestoServer.getBaseUrl(),
                connectorSession.getUser(),
                connectorSession.getSource(),
                connectorSession.getCatalog(),
                connectorSession.getSchema(),
View Full Code Here

        return prestoServer;
    }

    public ClientSession toClientSession(ConnectorSession connectorSession)
    {
        return new ClientSession(
                prestoServer.getBaseUrl(),
                connectorSession.getUser(),
                connectorSession.getSource(),
                connectorSession.getCatalog(),
                connectorSession.getSchema(),
View Full Code Here

        {
            executor = listeningDecorator(newCachedThreadPool(new ThreadFactoryBuilder().setNameFormat("query-runner-%s").setDaemon(true).build()));

            ImmutableList.Builder<QueryRunner> runners = ImmutableList.builder();
            for (int i = 0; i < maxParallelism; i++) {
                ClientSession session = new ClientSession(server, "test-" + i, "presto-perf", catalog, schema, debug);
                runners.add(new QueryRunner(session, executor));
            }
            this.runners = runners.build();
        }
View Full Code Here

    }

    @Override
    protected MaterializedResult computeActual(@Language("SQL") String sql)
    {
        ClientSession session = new ClientSession(coordinator.getBaseUrl(), "testuser", "test", "default", "default", true);

        try (StatementClient client = new StatementClient(httpClient, queryResultsCodec, session, sql)) {
            AtomicBoolean loggedUri = new AtomicBoolean(false);
            ImmutableList.Builder<Tuple> rows = ImmutableList.builder();
            TupleInfo tupleInfo = null;
View Full Code Here

    public ClientOptions clientOptions = new ClientOptions();

    @Override
    public void run()
    {
        ClientSession session = clientOptions.toClientSession();
        boolean hasQuery = !Strings.isNullOrEmpty(clientOptions.execute);
        boolean isFromFile = !Strings.isNullOrEmpty(clientOptions.file);

        if (!hasQuery || !isFromFile) {
            AnsiConsole.systemInstall();
        }

        initializeLogging(session.isDebug());

        String query = clientOptions.execute;
        if (isFromFile) {
            if (hasQuery) {
                throw new RuntimeException("both --execute and --file specified");
View Full Code Here

        TSV_HEADER
    }

    public ClientSession toClientSession()
    {
        return new ClientSession(parseServer(server), user, "presto-cli", catalog, schema, debug);
    }
View Full Code Here

        }
    }

    protected ClientSession getClientSession()
    {
        return new ClientSession(coordinator.getBaseUrl(), SESSION.getUser(), SESSION.getSource(), SESSION.getCatalog(), SESSION.getSchema(), true);
    }
View Full Code Here

        return new ClientSession(coordinator.getBaseUrl(), SESSION.getUser(), SESSION.getSource(), SESSION.getCatalog(), SESSION.getSchema(), true);
    }

    protected ClientSession getSampledClientSession()
    {
        return new ClientSession(coordinator.getBaseUrl(), SESSION.getUser(), SESSION.getSource(), SESSION.getCatalog(), "sampled", true);
    }
View Full Code Here

TOP

Related Classes of com.facebook.presto.client.ClientSession

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.