Package com.facebook.presto

Examples of com.facebook.presto.UnpartitionedPagePartitionFunction


        ExecutorService remoteTaskExecutor = Executors.newCachedThreadPool(Threads.daemonThreadsNamed("remoteTaskExecutor"));
        MockRemoteTaskFactory remoteTaskFactory = new MockRemoteTaskFactory(remoteTaskExecutor);
        ExecutorService executor = Executors.newCachedThreadPool(Threads.daemonThreadsNamed("stageExecutor"));

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

        StageExecutionPlan tableScanPlan = createTableScanPlan("test", metadata, splitCount);
        return new SqlStageExecution(new QueryId("query"),
                locationFactory,
View Full Code Here


            InMemoryNodeManager nodeManager = new InMemoryNodeManager();
            nodeManager.addNode("foo", new PrestoNode("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

    @Test
    public void testBufferCloseOnFinish()
            throws Exception
    {
        outputBuffers = outputBuffers.withBuffer("out", new UnpartitionedPagePartitionFunction()).withNoMoreBufferIds();
        taskExecution.addResultQueue(outputBuffers);

        BufferResult bufferResult = taskExecution.getResults("out", 0, new DataSize(1, Unit.MEGABYTE), new Duration(0, TimeUnit.MILLISECONDS));
        assertFalse(bufferResult.isBufferClosed());
View Full Code Here

    @Test
    public void testBufferCloseOnCancel()
            throws Exception
    {
        outputBuffers = outputBuffers.withBuffer("out", new UnpartitionedPagePartitionFunction());
        taskExecution.addResultQueue(outputBuffers);

        BufferResult bufferResult = taskExecution.getResults("out", 0, new DataSize(1, Unit.MEGABYTE), new Duration(0, TimeUnit.MILLISECONDS));
        assertFalse(bufferResult.isBufferClosed());
View Full Code Here

    @Test
    public void testBufferNotCloseOnFail()
            throws Exception
    {
        outputBuffers = outputBuffers.withBuffer("out", new UnpartitionedPagePartitionFunction()).withNoMoreBufferIds();
        taskExecution.addResultQueue(outputBuffers);

        BufferResult bufferResult = taskExecution.getResults("out", 0, new DataSize(1, Unit.MEGABYTE), new Duration(0, TimeUnit.MILLISECONDS));
        assertFalse(bufferResult.isBufferClosed());
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

        ExecutorService remoteTaskExecutor = Executors.newCachedThreadPool(daemonThreadsNamed("remoteTaskExecutor"));
        MockRemoteTaskFactory remoteTaskFactory = new MockRemoteTaskFactory(remoteTaskExecutor);
        ExecutorService executor = Executors.newCachedThreadPool(daemonThreadsNamed("stageExecutor"));

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

        StageExecutionPlan tableScanPlan = createTableScanPlan("test", splitCount);
        return new SqlStageExecution(new QueryId("query"),
                locationFactory,
View Full Code Here

            InMemoryNodeManager nodeManager = new InMemoryNodeManager();
            nodeManager.addNode("foo", new PrestoNode("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

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

        taskInfo = sqlTaskManager.getTaskInfo(taskInfo.getTaskId());
        assertEquals(taskInfo.getState(), TaskState.RUNNING);
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.