Package com.facebook.presto.metadata

Examples of com.facebook.presto.metadata.Split


        waitForFinished(operator);
    }

    private Split newRemoteSplit(String taskId)
    {
        return new Split("remote", new RemoteSplit(URI.create("http://localhost/" + taskId)));
    }
View Full Code Here


        private IndexSnapshot batchLoadRequests(UnloadedIndexKeyRecordSet unloadedKeysRecordSet)
        {
            // Drive index lookup to produce the output (landing in pagesIndexOutput)
            Driver driver = driverFactory.createDriver(pipelineContext.addDriverContext());
            driver.updateSource(new TaskSource(sourcePlanNodeId, ImmutableSet.of(new ScheduledSplit(0, new Split("index", new IndexSplit(unloadedKeysRecordSet)))), true));
            while (!driver.isFinished()) {
                ListenableFuture<?> process = driver.process();
                checkState(process.isDone(), "Driver should never block");
            }
View Full Code Here

            currentSources.put(source.getPlanNodeId(), newSource);
        }

        // add new splits
        for (ScheduledSplit newSplit : newSplits) {
            Split split = newSplit.getSplit();

            SourceOperator sourceOperator = sourceOperators.get(source.getPlanNodeId());
            if (sourceOperator != null) {
                sourceOperator.addSplit(split);
            }
View Full Code Here

        }
        final List<ColumnHandle> columnHandles = columnHandlesBuilder.build();
        final List<Type> columnTypes = columnTypesBuilder.build();

        // get the split for this table
        final Split split = getLocalQuerySplit(tableHandle);

        return new OperatorFactory()
        {
            @Override
            public List<Type> getTypes()
View Full Code Here

    private Split getLocalQuerySplit(TableHandle tableHandle)
    {
        try {
            List<Partition> partitions = splitManager.getPartitions(tableHandle, Optional.<TupleDomain<ColumnHandle>>absent()).getPartitions();
            SplitSource splitSource = splitManager.getPartitionSplits(tableHandle, partitions);
            Split split = Iterables.getOnlyElement(splitSource.getNextBatch(1000));
            checkState(splitSource.isFinished(), "Expected only one split for a local query");
            return split;
        }
        catch (InterruptedException e) {
            Thread.currentThread().interrupt();
View Full Code Here

        boolean finished = allSourceComplete && outputBuffers.isNoMoreBufferIds();

        // update tasks
        for (RemoteTask task : tasks.values()) {
            for (Entry<PlanNodeId, URI> entry : newExchangeLocations.entries()) {
                Split remoteSplit = createRemoteSplitFor(task.getNodeId(), entry.getValue());
                task.addSplits(entry.getKey(), ImmutableList.of(remoteSplit));
            }
            task.setOutputBuffers(outputBuffers);
            for (PlanNodeId completeSource : completeSources) {
                task.noMoreSplits(completeSource);
View Full Code Here

    }

    private Split createRemoteSplitFor(String nodeId, URI taskLocation)
    {
        URI splitLocation = uriBuilderFrom(taskLocation).appendPath("results").appendPath(nodeId).build();
        return new Split("remote", new RemoteSplit(splitLocation));
    }
View Full Code Here

        }
        final List<ColumnHandle> columnHandles = columnHandlesBuilder.build();
        final List<Type> columnTypes = columnTypesBuilder.build();

        // get the split for this table
        final Split split = getLocalQuerySplit(tableHandle);

        return new OperatorFactory()
        {
            @Override
            public List<Type> getTypes()
View Full Code Here

    private Split getLocalQuerySplit(TableHandle tableHandle)
    {
        try {
            List<Partition> partitions = splitManager.getPartitions(tableHandle, Optional.<TupleDomain<ColumnHandle>>absent()).getPartitions();
            SplitSource splitSource = splitManager.getPartitionSplits(tableHandle, partitions);
            Split split = Iterables.getOnlyElement(splitSource.getNextBatch(1000));
            while (!splitSource.isFinished()) {
                checkState(splitSource.getNextBatch(1000).isEmpty(), "Expected only one split for a local query");
            }
            return split;
        }
View Full Code Here

        private IndexSnapshot batchLoadRequests(UnloadedIndexKeyRecordSet unloadedKeysRecordSet)
        {
            // Drive index lookup to produce the output (landing in pagesIndexOutput)
            Driver driver = driverFactory.createDriver(pipelineContext.addDriverContext());
            driver.updateSource(new TaskSource(sourcePlanNodeId, ImmutableSet.of(new ScheduledSplit(0, new Split("index", new IndexSplit(unloadedKeysRecordSet)))), true));
            while (!driver.isFinished()) {
                ListenableFuture<?> process = driver.process();
                checkState(process.isDone(), "Driver should never block");
            }
View Full Code Here

TOP

Related Classes of com.facebook.presto.metadata.Split

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.