Package com.facebook.presto.spi

Examples of com.facebook.presto.spi.ConnectorPageSource


    }

    @Override
    public void finish()
    {
        ConnectorPageSource delegate = getSource();
        if (delegate == null) {
            return;
        }
        try {
            delegate.close();
        }
        catch (IOException e) {
            throw Throwables.propagate(e);
        }
    }
View Full Code Here


    }

    @Override
    public boolean isFinished()
    {
        ConnectorPageSource delegate = getSource();
        return delegate != null && delegate.isFinished();
    }
View Full Code Here

    }

    @Override
    public ListenableFuture<?> isBlocked()
    {
        ConnectorPageSource delegate = getSource();
        if (delegate != null) {
            return NOT_BLOCKED;
        }
        return blocked;
    }
View Full Code Here

    }

    @Override
    public Page getOutput()
    {
        ConnectorPageSource delegate = getSource();
        if (delegate == null) {
            return null;
        }

        Page page = delegate.getNextPage();
        if (page != null) {
            // update operator stats
            long endCompletedBytes = delegate.getCompletedBytes();
            long endReadTimeNanos = delegate.getReadTimeNanos();
            operatorContext.recordGeneratedInput(endCompletedBytes - completedBytes, page.getPositionCount(), endReadTimeNanos - readTimeNanos);
            completedBytes = endCompletedBytes;
            readTimeNanos = endReadTimeNanos;
        }
View Full Code Here

            @Override
            public Operator createOperator(DriverContext driverContext)
            {
                OperatorContext operatorContext = driverContext.addOperatorContext(operatorId, "BenchmarkSource");
                ConnectorPageSource pageSource = pageSourceManager.createPageSource(split, columnHandles);
                return new PageSourceOperator(pageSource, columnTypes, operatorContext);
            }

            @Override
            public void close()
View Full Code Here

    public synchronized void addSplit(Split split)
    {
        checkNotNull(split, "split is null");
        checkState(cursor == null && pageSource == null, "split already set");

        ConnectorPageSource pageSource = pageSourceProvider.createPageSource(split, columns);
        if (pageSource instanceof RecordPageSource) {
            cursor = ((RecordPageSource) pageSource).getCursor();
        }
        else {
            this.pageSource = pageSource;
View Full Code Here

TOP

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

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.