Package com.facebook.presto.spi

Examples of com.facebook.presto.spi.ConnectorSession


        return queryRunner;
    }

    private static ConnectorSession createSession(String schema)
    {
        return new ConnectorSession("user", "test", "cassandra", schema, UTC_KEY, ENGLISH, null, null);
    }
View Full Code Here


        }
    }

    public static LocalQueryRunner createLocalQueryRunner(File tempDir)
    {
        ConnectorSession session = new ConnectorSession("user", "test", "hive", "tpch", UTC_KEY, Locale.ENGLISH, null, null);
        LocalQueryRunner localQueryRunner = new LocalQueryRunner(session);

        // add tpch
        InMemoryNodeManager nodeManager = localQueryRunner.getNodeManager();
        localQueryRunner.createCatalog("tpch", new TpchConnectorFactory(nodeManager, 1), ImmutableMap.<String, String>of());
View Full Code Here

        }
    }

    private static ConnectorSession createSession(String schema)
    {
        return new ConnectorSession("user", "test", "hive", schema, UTC_KEY, ENGLISH, null, null);
    }
View Full Code Here

            locale = Locale.forLanguageTag(language);
        }

        String remoteUserAddress = requestContext.getRemoteAddr();

        ConnectorSession session = new ConnectorSession(user, source, catalog, schema, getTimeZoneKey(timeZoneId), locale, remoteUserAddress, userAgent);

        ExchangeClient exchangeClient = exchangeClientSupplier.get();
        Query query = new Query(session, statement, queryManager, exchangeClient);
        queries.put(query.getQueryId(), query);
        return Response.ok(query.getNextResults(uriInfo, new Duration(1, TimeUnit.MILLISECONDS))).build();
View Full Code Here

        return queryRunner;
    }

    private static ConnectorSession createSession(String schema)
    {
        return new ConnectorSession("user", "test", "mysql", schema, UTC_KEY, ENGLISH, null, null);
    }
View Full Code Here

                    break;
                default:
                    throw new IllegalStateException("Unknown task state " + outputTask.getState());
            }
            return new QueryInfo(outputTaskId.getQueryId(),
                    new ConnectorSession("user", "test", "test_catalog", "test_schema", UTC_KEY, Locale.ENGLISH, null, null),
                    state,
                    self,
                    ImmutableList.of("out"),
                    "query",
                    new QueryStats(),
View Full Code Here

    private BenchmarkQueryRunner() {}

    public static LocalQueryRunner createLocalSampledQueryRunner(ExecutorService executor)
    {
        ConnectorSession session = new ConnectorSession("user", "test", "default", "default", UTC_KEY, Locale.ENGLISH, null, null);
        LocalQueryRunner localQueryRunner = new LocalQueryRunner(session, executor);

        // add sampled tpch
        InMemoryNodeManager nodeManager = localQueryRunner.getNodeManager();
        localQueryRunner.createCatalog("tpch_sampled", new SampledTpchConnectorFactory(nodeManager, 1, 2), ImmutableMap.<String, String>of());
View Full Code Here

        return localQueryRunner;
    }

    public static LocalQueryRunner createLocalQueryRunner(ExecutorService executor)
    {
        ConnectorSession session = new ConnectorSession("user", "test", "default", "default", UTC_KEY, Locale.ENGLISH, null, null);
        LocalQueryRunner localQueryRunner = new LocalQueryRunner(session, executor);

        // add tpch
        InMemoryNodeManager nodeManager = localQueryRunner.getNodeManager();
        localQueryRunner.createCatalog("tpch", new TpchConnectorFactory(nodeManager, 1), ImmutableMap.<String, String>of());
View Full Code Here

        List<Iterable<Block>> sources = sourcesBuilder.build();
        ColumnFileHandle targetFileHandle = builder.build();

        if (!sources.isEmpty()) {
            // Throw out any stats generated by the optimization step
            ConnectorSession session = new ConnectorSession("user", "source", "catalog", "schema", UTC_KEY, Locale.ENGLISH, "address", "agent");
            OperatorContext operatorContext = new TaskContext(new TaskId("query", "stage", "task"), executor, session)
                    .addPipelineContext(true, true)
                    .addDriverContext()
                    .addOperatorContext(0, "OptimizeEncodings");
View Full Code Here

        return queryRunner;
    }

    private static ConnectorSession createSession(String schema)
    {
        return new ConnectorSession("user", "test", "default", schema, UTC_KEY, ENGLISH, null, null);
    }
View Full Code Here

TOP

Related Classes of com.facebook.presto.spi.ConnectorSession

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.