Package com.facebook.presto

Examples of com.facebook.presto.Session


    }

    @Override
    protected Map<String, Long> runOnce()
    {
        Session session = Session.builder()
                .setUser("user")
                .setSource("source")
                .setCatalog("catalog")
                .setSchema("schema")
                .setTimeZoneKey(UTC_KEY)
View Full Code Here


    {
    }

    public static LocalQueryRunner createLocalQueryRunner()
    {
        Session session = Session
                .builder()
                .setUser("user")
                .setSource("test")
                .setCatalog("tpch")
                .setSchema(TINY_SCHEMA_NAME)
View Full Code Here

            @Context UriInfo uriInfo)
            throws InterruptedException
    {
        assertRequest(!isNullOrEmpty(statement), "SQL statement is empty");

        Session session = createSessionForRequest(servletRequest);

        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

    }

    private TupleDescriptor analyzeView(Query query, QualifiedTableName name, String catalog, String schema, Table node)
    {
        try {
            Session viewSession = Session.builder()
                    .setUser(session.getUser())
                    .setSource(session.getSource())
                    .setCatalog(catalog)
                    .setSchema(schema)
                    .setTimeZoneKey(session.getTimeZoneKey())
View Full Code Here

            @Context HttpServletRequest servletRequest,
            @Context UriInfo uriInfo)
    {
        assertRequest(!isNullOrEmpty(statement), "SQL statement is empty");

        Session session = createSessionForRequest(servletRequest);

        QueryInfo queryInfo = queryManager.createQuery(session, statement);
        URI pagesUri = uriBuilderFrom(uriInfo.getRequestUri()).appendPath(queryInfo.getQueryId().toString()).build();
        return Response.created(pagesUri).entity(queryInfo).build();
    }
View Full Code Here

    {
        if (!TABLES.containsKey(tableName)) {
            return null;
        }

        Session session = Session.builder()
                .setUser(connectorSession.getUser())
                .setSource("information_schema")
                .setCatalog("") // default catalog is not be used
                .setSchema("") // default schema is not be used
                .setTimeZoneKey(connectorSession.getTimeZoneKey())
View Full Code Here

        }
    }

    public static LocalQueryRunner createLocalQueryRunner(File tempDir)
    {
        Session session = Session.builder()
                .setUser("user")
                .setSource("test")
                .setCatalog("hive")
                .setSchema("tpch")
                .setTimeZoneKey(UTC_KEY)
View Full Code Here

TOP

Related Classes of com.facebook.presto.Session

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.