Package com.facebook.presto

Examples of com.facebook.presto.UnpartitionedPagePartitionFunction


    @Test
    public void testFinishFreesReader()
            throws Exception
    {
        OutputBuffers outputBuffers = INITIAL_EMPTY_OUTPUT_BUFFERS
                .withBuffer("queue", new UnpartitionedPagePartitionFunction());
        SharedBuffer sharedBuffer = new SharedBuffer(TASK_ID, executor, sizeOfPages(5), outputBuffers);
        assertFalse(sharedBuffer.isFinished());

        ExecutorService executor = Executors.newCachedThreadPool();
View Full Code Here


    @Test
    public void testFinishFreesWriter()
            throws Exception
    {
        OutputBuffers outputBuffers = INITIAL_EMPTY_OUTPUT_BUFFERS
                .withBuffer("queue", new UnpartitionedPagePartitionFunction())
                .withNoMoreBufferIds();
        SharedBuffer sharedBuffer = new SharedBuffer(TASK_ID, executor, sizeOfPages(5), outputBuffers);
        assertFalse(sharedBuffer.isFinished());

        ExecutorService executor = Executors.newCachedThreadPool();
View Full Code Here

    @Test
    public void testDestroyFreesReader()
            throws Exception
    {
        OutputBuffers outputBuffers = INITIAL_EMPTY_OUTPUT_BUFFERS
                .withBuffer("queue", new UnpartitionedPagePartitionFunction())
                .withNoMoreBufferIds();
        SharedBuffer sharedBuffer = new SharedBuffer(TASK_ID, executor, sizeOfPages(5), outputBuffers);
        assertFalse(sharedBuffer.isFinished());

        ExecutorService executor = Executors.newCachedThreadPool();
View Full Code Here

    @Test
    public void testDestroyFreesWriter()
            throws Exception
    {
        OutputBuffers outputBuffers = INITIAL_EMPTY_OUTPUT_BUFFERS
                .withBuffer("queue", new UnpartitionedPagePartitionFunction())
                .withNoMoreBufferIds();
        SharedBuffer sharedBuffer = new SharedBuffer(TASK_ID, executor, sizeOfPages(5), outputBuffers);
        assertFalse(sharedBuffer.isFinished());

        ExecutorService executor = Executors.newCachedThreadPool();
View Full Code Here

    {
        TaskInfo taskInfo = sqlTaskManager.updateTask(session,
                taskId,
                testFragment,
                ImmutableList.<TaskSource>of(new TaskSource(tableScanNodeId, ImmutableSet.of(new ScheduledSplit(0, split)), true)),
                INITIAL_EMPTY_OUTPUT_BUFFERS.withBuffer("out", new UnpartitionedPagePartitionFunction()).withNoMoreBufferIds());
        assertEquals(taskInfo.getState(), TaskState.RUNNING);

        taskInfo = sqlTaskManager.getTaskInfo(taskInfo.getTaskId(), false);
        assertEquals(taskInfo.getState(), TaskState.RUNNING);
View Full Code Here

    {
        TaskInfo taskInfo = sqlTaskManager.updateTask(session,
                taskId,
                testFragment,
                ImmutableList.<TaskSource>of(new TaskSource(tableScanNodeId, ImmutableSet.of(new ScheduledSplit(0, split)), true)),
                INITIAL_EMPTY_OUTPUT_BUFFERS.withBuffer("out", new UnpartitionedPagePartitionFunction()).withNoMoreBufferIds());
        assertEquals(taskInfo.getState(), TaskState.RUNNING);

        taskInfo = sqlTaskManager.getTaskInfo(taskInfo.getTaskId(), false);
        assertEquals(taskInfo.getState(), TaskState.RUNNING);
View Full Code Here

            InMemoryNodeManager nodeManager = new InMemoryNodeManager();
            nodeManager.addNode("foo", new Node("other", URI.create("http://127.0.0.1:11"), NodeVersion.UNKNOWN));

            OutputBuffers outputBuffers = INITIAL_EMPTY_OUTPUT_BUFFERS
                    .withBuffer("out", new UnpartitionedPagePartitionFunction())
                    .withNoMoreBufferIds();

            stageExecution = new SqlStageExecution(new QueryId("query"),
                    new MockLocationFactory(),
                    joinPlan,
View Full Code Here

        // add new buffers
        OutputBuffers newOutputBuffers;
        if (fragment.getOutputPartitioning() == OutputPartitioning.NONE) {
            ImmutableMap.Builder<String, PagePartitionFunction> newBuffers = ImmutableMap.builder();
            for (Node parentNode : parentNodes) {
                newBuffers.put(parentNode.getNodeIdentifier(), new UnpartitionedPagePartitionFunction());
            }
            newOutputBuffers = startingOutputBuffers.withBuffers(newBuffers.build());

            // no more flag
            if (noMoreParentNodes) {
View Full Code Here

        // add new buffers
        OutputBuffers newOutputBuffers;
        if (fragment.getOutputPartitioning() == OutputPartitioning.NONE) {
            ImmutableMap.Builder<String, PagePartitionFunction> newBuffers = ImmutableMap.builder();
            for (Node parentNode : parentNodes) {
                newBuffers.put(parentNode.getNodeIdentifier(), new UnpartitionedPagePartitionFunction());
            }
            newOutputBuffers = startingOutputBuffers.withBuffers(newBuffers.build());

            // no more flag
            if (noMoreParentNodes) {
View Full Code Here

public class BufferResult
{
    public static BufferResult emptyResults(long token, boolean bufferClosed)
    {
        return new BufferResult(token, token, bufferClosed, ImmutableList.<Page>of(), new UnpartitionedPagePartitionFunction());
    }
View Full Code Here

TOP

Related Classes of com.facebook.presto.UnpartitionedPagePartitionFunction

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.