Package com.facebook.presto.spi

Examples of com.facebook.presto.spi.Page


    }

    @Override
    public Page getOutput()
    {
        Page result = outputPage;
        outputPage = null;
        return result;
    }
View Full Code Here


                    else {
                        // if next operator needs input...
                        if (next.needsInput()) {
                            // get an output page from current operator
                            current.getOperatorContext().startIntervalTimer();
                            Page page = current.getOutput();
                            current.getOperatorContext().recordGetOutput(page);

                            // if we got an output page, add it to the next operator
                            if (page != null) {
                                next.getOperatorContext().startIntervalTimer();
View Full Code Here

        return readerFuture;
    }

    public synchronized Page removePage()
    {
        Page page = buffer.poll();
        if (page != null) {
            bufferBytes -= page.getSizeInBytes();
        }
        if (bufferBytes < maxBufferedBytes) {
            notifyBlockedWriters();
        }
        return page;
View Full Code Here

        for (Page page : table.getPages()) {
            Block[] blocks = new Block[channels.size()];
            for (int index = 0; index < blocks.length; index++) {
                blocks[index] = page.getBlock(channels.get(index));
            }
            pages.add(new Page(page.getPositionCount(), blocks));
        }
        return new FixedPageSource(pages.build());
    }
View Full Code Here

            }
        }

        // only flush full pages unless we are done
        if (pageBuilder.isFull() || (finishing && !pageBuilder.isEmpty())) {
            Page page = pageBuilder.build();
            pageBuilder.reset();
            return page;
        }

        return null;
View Full Code Here

        if (pageBuilder.isEmpty()) {
            return null;
        }

        Page page = pageBuilder.build();
        pageBuilder.reset();
        return page;
    }
View Full Code Here

        Block[] blocks = new Block[aggregates.size()];
        for (int i = 0; i < blocks.length; i++) {
            blocks[i] = aggregates.get(i).evaluate();
        }
        state = State.FINISHED;
        return new Page(blocks);
    }
View Full Code Here

            return hash.getGroupCount();
        }

        public void addBlock(Block block)
        {
            hash.getGroupIds(new Page(block));

            if (operatorContext != null) {
                operatorContext.setMemoryReservation(hash.getEstimatedSize());
            }
        }
View Full Code Here

    }

    @Override
    public Page getOutput()
    {
        Page page = exchange.removePage();
        if (page != null) {
            operatorContext.recordGeneratedInput(page.getSizeInBytes(), page.getPositionCount());
        }
        return page;
    }
View Full Code Here

        // only return a full page if buffer is full or we are finishing
        if (pageBuilder.isEmpty() || (!finishing && !pageBuilder.isFull())) {
            return null;
        }

        Page page = pageBuilder.build();
        pageBuilder.reset();
        return page;
    }
View Full Code Here

TOP

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

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.